I try to solve the following problem, making use of 14.0 on Windows 10
Let a triangle $\Delta$ (a contour with its interior) be chosen in the unit square $S$. To prove that the closure of the difference of the sets $\overline{S\setminus \Delta}$ includes a triangle of the area at least $1/6$
Here are my unsuccessful attempts. First, I try to apply quantifiers to this
end.
Let us denote the coordinates of the vertices of the chosen triangle by {x1,x2}, {y1,y2}, {z1,z2}
and the coordinates of the vertices of the the desired triangle by {a1,a2}, {b1,b2}, {c1,c2}
.
The quantifiers do not directly work withRegion
s, so RegionMember
is needed to be used to rewrite regions as systems of algebraic equations and inequalities.
The command
ForAll[{x1, x2, y1, y2, z1, z2}, x1 >= 0 && x1 <= 1 && y1 >= 0 && y1 <= 1 && y2 >= 0 &&
y2 <= 1 && z1 >= 0 && z2 <= 1, Exists[{a1, a2, b1, b2, c1, c2},
RegionMember[RegionDifference[Rectangle[],
Triangle[{{x1, x2}, {y1, y2}, {z1, z2}}]], {a1, a2}] &&
RegionMember[RegionDifference[Rectangle[],
Triangle[{{x1, x2}, {y1, y2}, {z1, z2}}]], {b1, b2}] &&
RegionMember[RegionDifference[Rectangle[],
Triangle[{{x1, x2}, {y1, y2}, {z1, z2}}]], {c1, c2}],
Area[Triangle[{{a1, a2}, {b1, b2}, {c1, c2}}]] >= 1/6 &&
ForAll[{x, y},Implies[RegionMember[Triangle[{{a1, a2}, {b1, b2}, {c1, c2}}], {x, y}],
RegionMember[RegionConvert[RegionDifference[Rectangle[],
Triangle[{{x1, x2}, {y1, y2}, {z1, z2}}]], "Implicit"], {x,y}]]]]]
seems syntactically correct. Unfortunately,
Resolve[%, Reals]
The kernel Local has quit (exited) during the course of an evaluation
on my comp (which is not powerful) in several hours.
Second, I try to apply NMaximize
to find a desired triangle by
f[x1_?NumericQ, x2_?NumericQ, y1_?NumericQ, y2_?NumericQ, z1_?NumericQ, z2_?NumericQ] :=
NMaximize[{Area[ Triangle[{{a1, a2}, {b1, b2}, {c1, c2}}]],
(RegionConvert[ RegionDifference[Rectangle[],
Triangle[{{x1, x2}, {y1, y2}, {z1, z2}}]],
"Implicit"] /. {\[FormalX] -> a1, \[FormalY] -> a2})[[1]]
&& (RegionConvert[ RegionDifference[Rectangle[],
Triangle[{{x1, x2}, {y1, y2}, {z1, z2}}]],
"Implicit"] /. {\[FormalX] -> b1, \[FormalY] -> b2})[[
1]] && (RegionConvert[RegionDifference[Rectangle[],
Triangle[{{x1, x2}, {y1, y2}, {z1, z2}}]],
"Implicit"] /. {\[FormalX] -> c1, \[FormalY] -> c2})[[1]] &&
RegionIntersection[RegionDifference[Rectangle[],
Triangle[{{x1, x2}, {y1, y2}, {z1, z2}}]],
Triangle[{{a1, a2}, {b1, b2}, {c1, c2}}]] ==
Triangle[{{a1, a2}, {b1, b2}, {c1, c2}}]}, {a1, a2, b1, b2, c1, c2}]
and then to NMinimize
the function f
, but
f[1/4, 0.3, 1/4, 0.7, 0.8, 0.8]
NMaximize::bcons: The following constraints are not valid: {Triangle[{{a1,a2},{b1,b2},{c1,c2}}] ==BooleanRegion[{#1,#2}&,{Polygon[{{<<2>>},{<<2>>},{<<2>>},{<<2>>}}->{{<<3>>}}], Triangle[{{a1,a2},{b1,b2},{c1,c2}}]}],0. +1. a1<=1.,<<6>>,-0.8 c1-0.2 c2<=-0.8,-0.2 c1+0.2 c2<=0.}. Constraints should be equalities, inequalities, or domain specifications involving the variables.
I don't think GeometricTest
is able to solve it at the present and, as far as my knowledge goes,
AlphaGeometry
is not implemented in Mathematica yet.
Edit. In order to make the formulation more accurate, the difference of the sets $S\setminus \Delta$ is replaced by the closure of the difference of the sets $\overline{S\setminus \Delta}$.