Function Repository Resource:

GeometricAssertionForm

Source Notebook

Print a human-readable form of a hypothesis in an abstract 2D geometric scene

Contributed by: Ian Ford (Wolfram Research)

ResourceFunction["GeometricAssertionForm"][hyp]

formats as a human-readable form of the abstract 2D geometric hypothesis hyp expressed in terms of symbolic points and scalar quantities.

ResourceFunction["GeometricAssertionForm"][hyp,params]

specifies the lists of points and quantities params.

Details

In ResourceFunction["GeometricAssertionForm"][hyp,], the points and scalar quantities can be strings, symbols or other symbolic expressions.
The hyp can be any GeometricAssertion object or any other hypothesis supported by GeometricScene.

Examples

Basic Examples (1) 

Print a human-readable form of an abstract 2D geometric hypothesis:

In[1]:=
ResourceFunction["GeometricAssertionForm"][
 GeometricAssertion[{InfiniteLine[{a, b}], InfiniteLine[{c, d}]}, "Parallel"]]
Out[1]=

Scope (4) 

Use any objects supported by GeometricScene:

In[2]:=
ResourceFunction["GeometricAssertionForm"][Circle[o, {a, b}]]
Out[2]=

Use any constructions supported by GeometricScene:

In[3]:=
ResourceFunction["GeometricAssertionForm"][
 TriangleConstruct[{a, b, c}, "Circumcircle"]]
Out[3]=

Use any measurements supported by GeometricScene:

In[4]:=
ResourceFunction["GeometricAssertionForm"][ArcLength[Circle[]]]
Out[4]=

Use any predicates or relations supported by GeometricAssertion:

In[5]:=
ResourceFunction["GeometricAssertionForm"][
 GeometricAssertion[{Polygon[{a, b, c, d}], Polygon[{e, f, g, h}]}, "Equilateral", "Similar"]]
Out[5]=

Properties and Relations (3) 

GeometricAssertionForm supports Row objects:

In[6]:=
ResourceFunction["GeometricAssertionForm"][
 Row[{"Let ", Line[{a, b}], " be given. Construct a point ", c, " such that ", GeometricAssertion[Triangle[{a, b, c}], "Equilateral"], "."}]]
Out[6]=

GeometricAssertionForm supports relational operators and heads with the NumericFunction attribute:

In[7]:=
ResourceFunction["GeometricAssertionForm"][
 1/EuclideanDistance[a, b] - 1/EuclideanDistance[c, d] <= 1/EuclideanDistance[e, f]]
Out[7]=

GeometricAssertionForm uses special formatting for equations and certain logical operators:

In[8]:=
ResourceFunction["GeometricAssertionForm"][
 Not@GeometricAssertion[Triangle[{a, b, c}], "Equilateral"] && EuclideanDistance[a, b] == 2]
Out[8]=
In[9]:=
ResourceFunction["GeometricAssertionForm"][
 GeometricAssertion[{InfiniteLine[{a, b}], InfiniteLine[{c, d}]}, "Concurrent"] || GeometricAssertion[{InfiniteLine[{a, b}], InfiniteLine[{c, d}]}, "Parallel"]]
Out[9]=

Possible Issues (2) 

GeometricAssertionForm[hyp] assumes parameters are quantities in some cases of ambiguity:

In[10]:=
ResourceFunction["GeometricAssertionForm"][
 Line[{{a, b}, {c, d}, {e, f}}]]
Out[10]=

GeometricAssertionForm[hyp,{{p1,p2,},{k1,k2,}}] assumes the parameters pi are points and the parameters ki are quantities:

In[11]:=
ResourceFunction["GeometricAssertionForm"][
 Line[{{a, b}, {c, d}, {e, f}}], {{a, b, c, d, e, f}, {}}]
Out[11]=

Version History

  • 1.0.0 – 25 May 2023

Related Resources

Author Notes

GeometricAssertionForm works transparently with the heads Unequal, Less, LessEqual, Greater, GreaterEqual, BracketingBar, Perpendicular, Tilde, and TildeFullEqual.

GeometricAssertionFrom has limited support for Infix and Overscript objects.

License Information