mu = 0.1
alpha = 0.5
inullval: mu / alpha
xmax = 1.1
xmin = -0.12
ymin = -0.12
ymax = 1.1
visibleregion, a, b, c, d = Polygon((xmin, ymin), (xmin, ymax), (xmax, ymax), (xmax, ymin))
IN1P2sub = PointIn(visibleregion)
nulltol = 0.02
dnull = 0.1
IN1P1sub = PointIn(visibleregion)
IN2P2sub = PointIn(visibleregion)
IN2P1sub = PointIn(visibleregion)
SN2P2sub = PointIn(visibleregion)
SN2P1sub = PointIn(visibleregion)
SN1P2sub = PointIn(visibleregion)
SN1P1sub = PointIn(visibleregion)
dx = 0.1
A = (0.8925776965265084, 0.26783950617283947)
B = (0.977330895795247, 0.1774691358024691)
SN1P1 = DynamicCoordinates(SN1P1sub, If[abs(x(SN1P1sub))  <  nulltol, 0, If[abs(Mod[x(SN1P1sub) - inullval + nulltol, dnull] - nulltol)  <  nulltol, inullval + (dnull * round((x(SN1P1sub) - inullval) / dnull)), x(SN1P1sub)]], If[abs(y(SN1P1sub))  <  nulltol, 0, y(SN1P1sub)])
SN1P2 = DynamicCoordinates(SN1P2sub, If[abs(x(SN1P2sub))  <  nulltol, 0, If[abs(Mod[x(SN1P2sub) - inullval + nulltol, dnull] - nulltol)  <  nulltol, inullval + (dnull * round((x(SN1P2sub) - inullval) / dnull)), x(SN1P2sub)]], If[abs(y(SN1P2sub))  <  nulltol, 0, y(SN1P2sub)])
snull1 = Line(SN1P1, SN1P2)
SN2P1 = DynamicCoordinates(SN2P1sub, If[abs(x(SN2P1sub))  <  nulltol, 0, If[abs(Mod[x(SN2P1sub) - inullval + nulltol, dnull] - nulltol)  <  nulltol, inullval + (dnull * round((x(SN2P1sub) - inullval) / dnull)), x(SN2P1sub)]], If[abs(y(SN2P1sub))  <  nulltol, 0, y(SN2P1sub)])
SN2P2 = DynamicCoordinates(SN2P2sub, If[abs(x(SN2P2sub))  <  nulltol, 0, If[abs(Mod[x(SN2P2sub) - inullval + nulltol, dnull] - nulltol)  <  nulltol, inullval + (dnull * round((x(SN2P2sub) - inullval) / dnull)), x(SN2P2sub)]], If[abs(y(SN2P2sub))  <  nulltol, 0, y(SN2P2sub)])
snull2 = Line(SN2P1, SN2P2)
IN1P1 = DynamicCoordinates(IN1P1sub, If[abs(x(IN1P1sub))  <  nulltol, 0, If[abs(Mod[x(IN1P1sub) - inullval + nulltol, dnull] - nulltol)  <  nulltol, inullval + (dnull * round((x(IN1P1sub) - inullval) / dnull)), x(IN1P1sub)]], If[abs(y(IN1P1sub))  <  nulltol, 0, y(IN1P1sub)])
IN1P2 = DynamicCoordinates(IN1P2sub, If[abs(x(IN1P2sub))  <  nulltol, 0, If[abs(Mod[x(IN1P2sub) - inullval + nulltol, dnull] - nulltol)  <  nulltol, inullval + (dnull * round((x(IN1P2sub) - inullval) / dnull)), x(IN1P2sub)]], If[abs(y(IN1P2sub))  <  nulltol, 0, y(IN1P2sub)])
inull1 = Line(IN1P1, IN1P2)
IN2P1 = DynamicCoordinates(IN2P1sub, If[abs(x(IN2P1sub))  <  nulltol, 0, If[abs(Mod[x(IN2P1sub) - inullval + nulltol, dnull] - nulltol)  <  nulltol, inullval + (dnull * round((x(IN2P1sub) - inullval) / dnull)), x(IN2P1sub)]], If[abs(y(IN2P1sub))  <  nulltol, 0, y(IN2P1sub)])
IN2P2 = DynamicCoordinates(IN2P2sub, If[abs(x(IN2P2sub))  <  nulltol, 0, If[abs(Mod[x(IN2P2sub) - inullval + nulltol, dnull] - nulltol)  <  nulltol, inullval + (dnull * round((x(IN2P2sub) - inullval) / dnull)), x(IN2P2sub)]], If[abs(y(IN2P2sub))  <  nulltol, 0, y(IN2P2sub)])
inull2 = Line(IN2P1, IN2P2)
snull1correct: snull1 ≟ snullreal1 ∨ snull1 ≟ snullreal2
snull2correct: (snull2 ≟ snullreal1 ∨ snull2 ≟ snullreal2) ∧ (snull2 ≠ snull1)
inullreal2: x = inullval
inull1correct: inull1 ≟ inullreal1 ∨ inull1 ≟ inullreal2
inull2correct: (inull2 ≟ inullreal1 ∨ inull2 ≟ inullreal2) ∧ (inull2 ≠ inull1)
dxs: (dx * {(1, 0), (0, 1), (-1, 0), (0, -1), (1 / sqrt(2), 1 / sqrt(2)), (1 / sqrt(2), (-1) / sqrt(2)), ((-1) / sqrt(2), (-1) / sqrt(2)), ((-1) / sqrt(2), 1 / sqrt(2))})
Adx: A + dxs
Apoint = Point(Adx)
u = Vector(A, Apoint)
Bdx: B + dxs
Bpoint = Point(Bdx)
v = Vector(B, Bpoint)
Ainregion1: (x(A) > 0) ∧ (x(A)  <  mu / alpha) ∧ (y(A) > 0) ∧ (y(A) ≤ 1)
Ainregion2: (x(A) > mu / alpha) ∧ (x(A) ≤ 1) ∧ (y(A) > 0) ∧ (y(A) ≤ 1)
Binregion1: (x(B) > 0) ∧ (x(B)  <  mu / alpha) ∧ (y(B) > 0) ∧ (y(B) ≤ 1)
Binregion2: (x(B) > mu / alpha) ∧ (x(B) ≤ 1) ∧ (y(B) > 0) ∧ (y(B) ≤ 1)
ABinregions: Ainregion1 ∧ Binregion2 ∨ Ainregion2 ∧ Binregion1
Acorrectangle: Ainregion1 ∧ Apoint ≟ A + (dx * ((-1) / sqrt(2), (-1) / sqrt(2))) ∨ Ainregion2 ∧ Apoint ≟ A + (dx * ((-1) / sqrt(2), 1 / sqrt(2)))
Bcorrectangle: Binregion1 ∧ Bpoint ≟ B + (dx * ((-1) / sqrt(2), (-1) / sqrt(2))) ∨ Binregion2 ∧ Bpoint ≟ B + (dx * ((-1) / sqrt(2), 1 / sqrt(2)))
showcorrect = false