31 of 40 focal problems use RatMath for a calculation or a substantive step.
Direct calculation
30 · 75%
Assisted
1 · 2.5%
Worked by hand
9 · 22.5%
Using the packages
Exact constructions and symbolic incidence proofs help students compare Euclidean, projective and non-Euclidean models. The meaning of distance and parallelism depends on the chosen geometry.
Calculator interface
Give the model a persistent label and allow constructions to be replayed from their givens. Display which side conditions a proof needs and separate a sample drawing from its algebraic certificate.
Each of the 40 focal problems has equal weight. Direct means the displayed package calculation answers the computational question after the inputs are set up. Assisted means it contributes a step and the worked solution supplies essential reasoning, interpretation or selection. Worked by hand means the guide relies on a construction, argument or judgment for that task. The helpful share combines direct and assisted days. Courses and instructors assign different mixes of problems. The percentages describe this syllabus.
Classroom inputs and practical limits
31 of 40 days include a checked executable example. On 10 days the measured size sweep exercises a named API used in the lesson. Each day identifies its tested inputs and the mathematical property checked. Hand-worked days give the input scale and the argument to verify.
Ranges across the five units
Days 1–8 · Euclidean constructions. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Unit benchmark · geo.triangle, scale on a 3–4–5 triangle. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family.
Days 9–16 · Projective and algebraic geometry. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Unit benchmark · geo.midpoint, absolute coordinate. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family.
Days 17–24 · Polygons, lattices and symmetry. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
Unit benchmark · discrete.isBipartite, cycle vertices. Largest passing sample 10,000 (21.70 ms, 92.2 MiB peak process RSS). The runs did not locate a ceiling for this family.
Days 25–32 · Curved geometries. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
Unit benchmark · geo.triangle, scale on a 3–4–5 triangle. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family.
Days 33–40 · Finite and alternative models. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
Unit benchmark · geo.countTopologies, labeled points. Largest passing sample 5 (941 ms, 88.6 MiB peak process RSS). Library refusal at 6. The first sampled passing call above 100 ms used 5 (941 ms).
For the triangle , , , find the circumcentre and circumradius, the incentre and inradius, the orthocentre and the centroid.
Worked solution
Right angle at : the circumcentre is the midpoint of the hypotenuse, , radius . Inradius , incentre . The orthocentre is the right-angle vertex . Centroid .
Using RatMath
Enter the coordinates in vertex order. Read the requested centre, length or radius using the same coordinate system as the problem.
JavaScript module
import * as geo from "@ratmath/geo";
const T = geo.triangle([0, 0], [4, 0], [0, 3]);
console.log(
[T.circumcenter, T.circumradius, T.incenter, T.inradius, T.orthocenter, T.centroid].map(String)
);
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Focal example. The code above passed its displayed check in 1.47 ms on Node.
Same API, measured input family.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.triangle · 5 passing test cases, 4 distinct argument descriptions
For the triangle with vertices (0,0), (4,0) and (0,3), find the Euler line and verify that the centroid divides the orthocentre–circumcentre segment in ratio 2:1.
Worked solution
, , all lie on . , .
Using RatMath
Enter the coordinates in vertex order. Read the requested centre, length or radius using the same coordinate system as the problem.
JavaScript module
import * as geo from "@ratmath/geo";
const T = geo.triangle([0, 0], [4, 0], [0, 3]);
console.log(
[geo.collinear(T.circumcenter, T.centroid, T.orthocenter), geo.distance(T.orthocenter, T.centroid), geo.distance(T.centroid, T.circumcenter), String(T.eulerLine)]
);
Checked output
[true, 5/3, 5/6, "3·x - 4·y = 0"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Focal example. The code above passed its displayed check in 1.49 ms on Node.
Same API, measured input family.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.triangle · 5 passing test cases, 4 distinct argument descriptions
For the triangle with vertices (0,0), (4,0) and (0,3), find the centre and radius of the nine-point circle.
Worked solution
Its centre is the midpoint of , , and its radius is half the circumradius, .
Using RatMath
Enter the coordinates in vertex order. Read the requested centre, length or radius using the same coordinate system as the problem.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(String(geo.triangle([0, 0], [4, 0], [0, 3]).ninePointCircle));
Checked output
circle, centre (1, 3/4), radius 5/4
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Focal example. The code above passed its displayed check in 0.150 ms on Node.
Same API, measured input family.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.triangle · 5 passing test cases, 4 distinct argument descriptions
Find the images of and under inversion in the unit circle.
Worked solution
: and .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const inv = geo.inversion(geo.circle([0, 0], [1, 0]));
console.log([inv.apply(geo.point(2, 0)), inv.apply(geo.point(1, 1))].map(String));
Checked output
["(1/2, 0)", "(1/2, 1/2)"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Focal example. The code above passed its displayed check in 0.193 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.inversion · 1 passing test case, 1 distinct argument description
Reflect in the line , then in the -axis. What single isometry is this?
Worked solution
: rotation about the origin by , twice the angle between the mirrors.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const r = (p, q) => geo.reflection(geo.line(geo.point(...p), geo.point(...q)));
const T = r([0, 0], [1, 0]).compose(r([0, 0], [1, 1])); // x-axis after y = x
const c = T.classify();
console.log([c.kind, String(c.center), String(c.degrees)]);
Checked output
["rotation", "(0, 0)", "-90"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Focal example. The code above passed its displayed check in 0.435 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.reflection · 1 passing test case, 1 distinct argument description
For the triangle , , , find the side lengths and the angle at in degrees.
Worked solution
, , . , .
Using RatMath
Enter the coordinates in vertex order. Read the requested centre, length or radius using the same coordinate system as the problem.
JavaScript module
import * as geo from "@ratmath/geo";
const T = geo.triangle([0, 0], [4, 0], [0, 3]);
console.log([Object.values(T.sides).map(String), String(T.cosines.B), T.degrees.B]);
Checked output
[["5", "3", "4"], "4/5", 36.86989764584401]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Focal example. The code above passed its displayed check in 0.271 ms on Node.
Same API, measured input family.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.triangle · 5 passing test cases, 4 distinct argument descriptions
Find the centre and radius of the circle through .
Worked solution
Right angle at the origin, so the centre is the midpoint of the hypotenuse, ; radius .
Using RatMath
Enter the coordinates in vertex order. Read the requested centre, length or radius using the same coordinate system as the problem.
JavaScript module
import * as geo from "@ratmath/geo";
const T = geo.triangle([0, 0], [4, 0], [0, 6]);
console.log([T.circumcenter, T.circumradius]);
Checked output
[(2, 3), 3.605551275463…]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Focal example. The code above passed its displayed check in 0.854 ms on Node.
Same API, measured input family.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.triangle · 5 passing test cases, 4 distinct argument descriptions
What goes wrong with the circumcircle through three distinct collinear points?
Worked solution
Perpendicular bisectors of adjacent segments are parallel. No finite circle passes through all three points.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. A handful of plane points, lines and circles, with small exact coordinates and nondegenerate intersections.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 09 / 40 · Projective and algebraic geometry
Cross ratio
Direct calculation@ratmath/geo
Problem
Find the cross ratio of the points 0, 1, 2, 3 on a line.
Worked solution
.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const p = (x) => geo.point(x, 0);
console.log(String(geo.crossRatio(p(0), p(1), p(2), p(3))));
Checked output
4/3
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Focal example. The code above passed its displayed check in 0.502 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.point · 7 passing test cases, 20 distinct argument descriptions
On a line, , , . Find the harmonic conjugate of with respect to .
Worked solution
: , so , .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(String(geo.harmonicConjugate(geo.point(0, 0), geo.point(3, 0), geo.point(1, 0))));
Checked output
[-3 : 0 : 1]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Focal example. The code above passed its displayed check in 0.222 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.harmonicConjugate · 1 passing test case, 1 distinct argument description
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const c = geo.conicThrough([geo.point(1, 0), geo.point(-1, 0), geo.point(0, 2), geo.point(0, -2), geo.point("3/5", "8/5")]);
console.log([String(c), c.classify()]);
Checked output
["−x² − 1/4y² + 1 = 0", "ellipse"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Focal example. The code above passed its displayed check in 0.730 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.conicThrough · 2 passing test cases, 5 distinct argument descriptions
Write the equation of the circle with centre and radius 5. Is on it?
Worked solution
. Yes: .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const C = geo.circle([-2, 3], [3, 3]);
console.log([C, C.contains ? C.contains([1, 7]) : geo.distance([-2, 3], [1, 7])]);
Checked output
[circle, centre (-2, 3), radius 5, true]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Focal example. The code above passed its displayed check in 0.273 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.circle · 8 passing test cases, 9 distinct argument descriptions
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const p = geo.conicProperties("x^2/25 + y^2/9 = 1");
console.log([p.vertices.map(String), p.foci.map(String)]);
Checked output
[["(5, 0)", "(-5, 0)"], ["(4, 0)", "(-4, 0)"]]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Focal example. The code above passed its displayed check in 0.793 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.conicProperties · 8 passing test cases, 17 distinct argument descriptions
Where do the affine lines y=1 and y=2 meet in homogeneous coordinates?
Worked solution
Their equations are Y=Z and Y=2Z, giving Y=Z=0 and the common point [1:0:0].
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 15 / 40 · Projective and algebraic geometry
Homogeneous scale
Worked by hand
Problem
Do [2:4:2] and [1:2:1] describe different projective points?
Worked solution
A common nonzero factor leaves a projective point unchanged. Both have affine representative (1,2).
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 16 / 40 · Projective and algebraic geometry
Projective invariance
Worked by hand
Problem
Does a projective transformation generally preserve Euclidean length?
Worked solution
Incidence and cross ratios are preserved. An affine scaling already supplies a projectivity changing length.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Three-component homogeneous coordinates and low-degree conics; account for points at infinity and equivalent representatives.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 17 / 40 · Polygons, lattices and symmetry
Pick's theorem
Direct calculation@ratmath/geo
Problem
The rectangle with vertices , , , has how many interior lattice points? Check Pick's theorem.
Worked solution
Boundary points , interior . , the area.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const p = geo.pick([[0, 0], [4, 0], [4, 3], [0, 3]]);
console.log([p.interior, p.boundary, p.area, p.holds]);
Checked output
[6, 14, 12, true]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
Focal example. The code above passed its displayed check in 4.12 ms on Node.
Related workload in this unit.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.pick · 1 passing test case, 2 distinct argument descriptions
Find the interior angle of a regular 12-gon, as a fraction of a full turn and in degrees.
Worked solution
of a turn.
Using RatMath
Put the arithmetic inside the R tag so RatMath parses the literals. Keep fractions as ratios throughout the calculation and attach the units from the problem to the result.
JavaScript module
import * as geo from "@ratmath/geo";
import { R } from "@ratmath/core";
const a = geo.polygonAngle(12);
console.log([a, a.multiply(R`360`)]);
Checked output
[5/12, 150]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
Focal example. The code above passed its displayed check in 0.185 ms on Node.
Related workload in this unit.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.polygonAngle · 1 passing test case, 6 distinct argument descriptions
20 triangular faces, , five faces at each vertex so . .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const P = geo.solids.icosahedron();
console.log([P.V, P.E, P.F, P.euler]);
Checked output
[12, 30, 20, 2]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
For this problem type. This example selects a built-in theorem or solid. The input is a discrete choice from a finite catalog. The displayed call has no freely scalable numeric argument.
Focal example. The code above passed its displayed check in 144 ms on Node.
Same API, measured input family.geo.solids · number of catalog solids checked. Baseline test points across courses 1, 2, 3, 5. Compare the vertex, edge and face counts with the known convex polyhedra and verify V−E+F=2 for each.
Practical limit. Largest passing sample 9 (939 ms, 99.7 MiB peak process RSS). The first sampled passing call above 100 ms used 5 (444 ms). The runs did not locate a ceiling for this family. These inputs select named solids from a finite catalog. Mesh processing for an arbitrary number of faces would be a different operation.
Measured times, memory and outcomes
number of catalog solids checked · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
1.23
75.4
2
Baseline
Passed
3.73
75.8
3
Baseline
Passed
3.42
76.6
5
Baseline
Passed
444
94.9
7
Stretch
Passed
437
95.5
9
Stretch
Passed
939
99.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.solids.icosahedron · 2 passing test cases, 1 distinct argument description
Prove that the nine-point circle passes through the midpoints of the sides, the feet of the altitudes, and the midpoints from the orthocentre to the vertices, for every triangle.
Worked solution
For a nondegenerate triangle take the circumcentre as vector origin, so the orthocentre has vector h=a+b+c. The map P↦(H+P)/2 takes the circumcircle to a circle with centre (H+O)/2. Images of A,B,C are the three vertex–orthocentre midpoints. Images of their antipodes are the side midpoints, since (h−a)/2=(b+c)/2. Reflect H across each sideline: that reflection lies on the circumcircle by the supplementary-angle criterion, and its midpoint with H is the altitude foot. Thus all nine points lie on the image circle, with coincidences allowed.
Using RatMath
Read the construction hypotheses and trace the homothety in the worked solution. A named theorem result alone does not explain the geometry.
JavaScript module
import * as geo from "@ratmath/geo";
const p = geo.proofs.ninePointCircle;
const r = typeof p === "function" ? p() : p;
console.log([r.proved ?? r.holds ?? r.ok, String(r).slice(0, 40)]);
Checked output
[true, "Nine-point circle: proved (wu)"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
For this problem type. This example selects a built-in theorem or solid. The input is a discrete choice from a finite catalog. The displayed call has no freely scalable numeric argument.
Focal example. The code above passed its displayed check in 58.93 ms on Node.
Same API, measured input family.geo.proofs.ninePointCircle · coordinate scale of a separate specialization. Baseline test points across courses 1, 2, 5, 10. Check the fixed theorem result and a right triangle with legs 4n and 2n. The side-midpoint circle has center (n,n/2) and squared radius 5n²/4.
Practical limit. Largest passing sample 10,000 (114 ms, 91.3 MiB peak process RSS). The first sampled passing call above 100 ms used 1 (118 ms). The runs did not locate a ceiling for this family. The built-in theorem has fixed symbolic inputs. The independent right-triangle specialization tests coordinates at several scales; degenerate triangles fall outside the theorem.
Measured times, memory and outcomes
coordinate scale of a separate specialization · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
118
91.2
2
Baseline
Passed
201
91
5
Baseline
Passed
101
92.3
10
Baseline
Passed
109
90.8
100
Stretch
Passed
91.32
91.6
10,000
Stretch
Passed
114
91.3
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Day 21 / 40 · Polygons, lattices and symmetry
Polygon angles
Direct calculation@ratmath/geo
Problem
Find the sum of the interior angles of an octagon, and each angle of a regular octagon.
Worked solution
; .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log([geo.angleSum(8), geo.interiorAngle(8)]);
Checked output
[1080, 135]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
Focal example. The code above passed its displayed check in 0.096 ms on Node.
Related workload in this unit.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.angleSum · 2 passing test cases, 6 distinct argument descriptions
Compute for the tetrahedron, cube and icosahedron.
Worked solution
, , : all 2, the Euler characteristic of the sphere.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(["tetrahedron", "cube", "icosahedron"].map((n) => geo.solids[n]().euler));
Checked output
[2, 2, 2]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
For this problem type. Use a low-genus surface or a small complex with a few to tens of faces. Face identifications and valid boundary data matter as much as counts.
Focal example. The code above passed its displayed check in 105 ms on Node.
Same API, measured input family.geo.solids · number of catalog solids checked. Baseline test points across courses 1, 2, 3, 5. Compare the vertex, edge and face counts with the known convex polyhedra and verify V−E+F=2 for each.
Practical limit. Largest passing sample 9 (939 ms, 99.7 MiB peak process RSS). The first sampled passing call above 100 ms used 5 (444 ms). The runs did not locate a ceiling for this family. These inputs select named solids from a finite catalog. Mesh processing for an arbitrary number of faces would be a different operation.
Measured times, memory and outcomes
number of catalog solids checked · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
1.23
75.4
2
Baseline
Passed
3.73
75.8
3
Baseline
Passed
3.42
76.6
5
Baseline
Passed
444
94.9
7
Stretch
Passed
437
95.5
9
Stretch
Passed
939
99.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Day 23 / 40 · Polygons, lattices and symmetry
Reflection products
Worked by hand
Problem
What is the composition of two reflections in parallel Euclidean lines at distance d?
Worked solution
A translation perpendicular to the lines through distance 2d. Its direction depends on the order.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 24 / 40 · Polygons, lattices and symmetry
Pick's hypotheses
Worked by hand
Problem
Can Pick's theorem be applied directly to a smooth unit circle?
Worked solution
It requires a simple lattice polygon. A circular boundary has no polygonal list of lattice edges.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Small polygons, lattice coordinates and symmetry groups, commonly 3–12 sides and a few generators.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 25 / 40 · Curved geometries
Spherical triangles
Direct calculation@ratmath/geo
Problem
On the unit sphere, take the north pole and the equator points at longitudes 0° and 90°. Find the angle sum, excess and area of the triangle.
Worked solution
Three right angles: sum , excess , area = excess , one eighth of the sphere's .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const T = geo.striangle(geo.northPole(), geo.latLon(0, 0), geo.latLon(0, "1/4"));
console.log([T.angleSum, T.excess, T.area, T.fractionOfSphere].map(String));
Checked output
["3π/2", "π/2", "π/2", "1/8"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
Focal example. The code above passed its displayed check in 0.923 ms on Node.
Related workload in this unit.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.striangle · 3 passing test cases, 3 distinct argument descriptions
On the unit sphere, how far apart are the points at latitude 0°, longitudes 0° and 90°?
Worked solution
The central angle is : distance .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(String(geo.latLon(0, 0).distanceTo(geo.latLon(0, "1/4"))));
Checked output
π/2
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
Focal example. The code above passed its displayed check in 0.215 ms on Node.
Related workload in this unit.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.latLon · 1 passing test case, 1 distinct argument description
In the Poincaré disc, find the distance from the centre to the point .
Worked solution
.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(String(geo.horigin().distanceTo(geo.hpoint("1/2", 0))));
Checked output
ln(3)
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
Focal example. The code above passed its displayed check in 0.271 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.horigin · 3 passing test cases, 1 distinct argument description
In the Poincaré disc, find the angle sum and area of the triangle with vertices , , .
Worked solution
Sides (from 0) and . The angle at 0 is ; by the hyperbolic law of cosines the other two are each. Sum , area = defect .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const T = geo.htriangle(geo.horigin(), geo.hpoint("1/2", 0), geo.hpoint(0, "1/2"));
console.log([T.angleSum, T.defect]);
Checked output
[2.6516353273…, 0.4899573262…]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
Focal example. The code above passed its displayed check in 7.49 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.htriangle · 2 passing test cases, 4 distinct argument descriptions
[0, 0] (n=2), ["1/2", 0] (n=2), [0, "1/2"] (n=2) or HIdeal, HIdeal, HIdeal · triangles: defect is area
What is the area of a hyperbolic triangle whose three vertices are on the boundary circle?
Worked solution
All three angles are 0, so the area is the defect .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const T = geo.htriangle(geo.ideal(1, 0), geo.ideal(-1, 0), geo.ideal(0, 1));
console.log([T.angleSum, T.area].map(String));
Checked output
["0", "π"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
Focal example. The code above passed its displayed check in 0.330 ms on Node.
Related workload in this unit.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.htriangle · 2 passing test cases, 4 distinct argument descriptions
[0, 0] (n=2), ["1/2", 0] (n=2), [0, "1/2"] (n=2) or HIdeal, HIdeal, HIdeal · triangles: defect is area
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 77.55 ms on Node.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Find the Gaussian curvature of the half-plane metric .
Worked solution
For , ; here , , so .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
console.log(String(analytic.metric({ E: "1/v^2", F: 0, G: "1/v^2" }, ["u", "v"]).gaussian()));
Checked output
-1
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 2.51 ms on Node.
Related workload in this unit.symbolic.sym.diff · degree. Baseline test points across courses 1, 2, 4, 8. Derivative of x^n at 2 is n·2^(n−1).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,024 (0.459 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family. A monomial differentiates to one term. Products, repeated derivatives and expression expansion can make intermediate expressions much larger.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.157
75.7
2
Baseline
Passed
0.192
75.7
4
Baseline
Passed
0.276
75.2
8
Baseline
Passed
0.642
75.5
16
Stretch
Passed
18.83
74.7
64
Stretch
Passed
0.406
75
256
Stretch
Passed
0.241
75.3
1,024
Stretch
Passed
0.459
74.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.metric · 1 passing test case, 1 distinct argument description
On the unit sphere, what multiple of π gives the area of a triangle with three right angles?
Worked solution
The angle sum is 3π/2, so the excess and area are π/2.
Using RatMath
Put the arithmetic inside the R tag so RatMath parses the literals. Keep fractions as ratios throughout the calculation and attach the units from the problem to the result.
JavaScript module
import { R } from "@ratmath/core";
console.log(String(R`3/2-1`));
Checked output
1/2
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Spherical triangles on a specified radius or points strictly inside the hyperbolic disk. Near-boundary coordinates amplify numeric errors.
Focal example. The code above passed its displayed check in 0.126 ms on Node.
Same arithmetic expression. Replaced its first numeral 3 with 0, 1, 2, 7, 12, 100, 1000, -3, 1/2. All 9 defined variants agreed exactly with Python’s rational arithmetic. This varies the arithmetic operation while holding the rest of the expression fixed.
Related workload in this unit.core.Rational.add · denominator. Baseline test points across courses 1, 2, 3, 12, 100, 1,000. Cross-multiply 1/n + 1/(n+1) against (2n+1)/(n(n+1)).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,007 (0.038 ms, 76.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Exact work depends on the bit lengths of both numerator and denominator. A long sum of relatively prime fractions can build a large common denominator.
Measured times, memory and outcomes
denominator · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.034
74.9
2
Baseline
Passed
0.036
75.6
3
Baseline
Passed
0.040
75.9
12
Baseline
Passed
0.039
75.2
100
Baseline
Passed
0.041
75
1,000
Baseline
Passed
0.035
75.8
1,000,003
Stretch
Passed
0.044
75
1,000,000,007
Stretch
Passed
0.038
76.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
core.R · 2 passing test cases, 10 distinct argument descriptions
The Fano plane is the projective plane of order 2. How many lines does it have? How many points has the projective plane of order 3?
Worked solution
Order gives points and lines: 7 for , 13 for .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const F = geo.fano();
console.log([F.order, F.lines.length, F.isProjectivePlane(), geo.projectivePlane(3).lines.length]);
Checked output
[2, 7, true, 13]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
Focal example. The code above passed its displayed check in 1.09 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.fano · 2 passing test cases, 1 distinct argument description
Find the taxicab and Euclidean distances between and .
Worked solution
Taxicab: . Euclidean: .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(
[geo.metric("taxicab").distance([1, 2], [4, 6]), geo.distance(geo.point(1, 2), geo.point(4, 6))]
);
Checked output
[7, 5]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
Focal example. The code above passed its displayed check in 0.219 ms on Node.
Same API, measured input family.geo.metric.distance · absolute coordinate. Baseline test points across courses 0, 1, 3, 10. Taxicab distance from (0,−n) to (n,n) equals 3n.
Practical limit. Largest passing sample 1,000,000 (0.283 ms, 75.1 MiB peak process RSS). The runs did not locate a ceiling for this family. The metric determines the distance. Coordinate singularities or unsupported metrics need a different argument.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
3.83
75.1
1
Baseline
Passed
0.384
75.1
3
Baseline
Passed
0.286
73.9
10
Baseline
Passed
0.319
75.6
10,000
Stretch
Passed
0.286
75.3
1,000,000
Stretch
Passed
0.283
75.1
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.metric · 2 passing test cases, 2 distinct argument descriptions
Describe the unit ball of the taxicab metric in the plane. What is its "" (half the perimeter of the unit circle, measured in the same metric)?
Worked solution
The square with vertices , . Each side has taxicab length 2, so the perimeter is 8 and .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const m = geo.metric("taxicab");
console.log([String(m.circle([0, 0], 1)), m.pi]);
Checked output
["(1, 0),(0, 1),(-1, 0),(0, -1)", 4]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
Focal example. The code above passed its displayed check in 0.172 ms on Node.
Related workload in this unit.geo.countTopologies · labeled points. Baseline test points across courses 1, 2, 3, 4. Compare the counts of labeled topologies with 1,4,29,355,6942,209527.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 5 (941 ms, 88.6 MiB peak process RSS). Library refusal at 6. The first sampled passing call above 100 ms used 5 (941 ms). The number of labeled topologies grows rapidly. An explicit census on a finite set is much harder than checking a given topology.
Measured times, memory and outcomes
labeled points · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.172
75
2
Baseline
Passed
0.209
75.4
3
Baseline
Passed
0.298
76.1
4
Baseline
Passed
18.86
77.3
5
Stretch
Passed
941
88.6
6
Stretch
Library refusal · GeoError: counting by preorders is limited to n ≤ 5 here (6 points have 209527 topologies)
0.170
75.6
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.metric · 2 passing test cases, 2 distinct argument descriptions
The cube graph is planar with 8 vertices and 12 edges. How many faces does a plane drawing have?
Worked solution
: .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as discrete from "@ratmath/discrete";
const g = discrete.platonic("cube");
const p = discrete.planarity(g);
console.log([p.planar, p.faces[0].length, g.order - g.size + p.faces[0].length]);
Checked output
[true, 6, 2]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
For this problem type. Hand graph examples usually have 3–12 vertices. Include edges or graph density as a second input because exact searches of the same order can differ sharply.
Focal example. The code above passed its displayed check in 0.683 ms on Node.
Related workload in this unit.discrete.isBipartite · cycle vertices. Baseline test points across courses 3, 4, 5, 12, 30. A cycle has a bipartition precisely when its length is even.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 10,000 (21.70 ms, 92.2 MiB peak process RSS). The runs did not locate a ceiling for this family. Graph traversal depends on vertices and edges. A long sparse cycle has far fewer edges than a dense graph of the same order.
Measured times, memory and outcomes
cycle vertices · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
3
Baseline
Passed
0.252
75.7
4
Baseline
Passed
0.382
74.8
5
Baseline
Passed
0.406
75
12
Baseline
Passed
0.424
74.9
30
Baseline
Passed
0.349
75.7
100
Stretch
Passed
0.609
75.9
1,000
Stretch
Passed
20.72
77.9
10,000
Stretch
Passed
21.70
92.2
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
discrete.platonic · 9 passing test cases, 5 distinct argument descriptions
In the hyperbolic plane how many geodesics through a point outside a given complete geodesic fail to meet it?
Worked solution
Infinitely many. The two limiting parallels share an ideal endpoint with the line; the intervening family on the disjoint side includes ultraparallels.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 38 / 40 · Finite and alternative models
Incidence counting
Direct calculation@ratmath/core
Problem
In a finite projective plane of order 3 how many points lie on each line and how many points exist?
Worked solution
Each line has q+1=4 points and the plane has q²+q+1=13.
Using RatMath
Construct an Integer or Rational before applying its methods. Use fraction strings or integer inputs to preserve exact values.
JavaScript module
import { Integer } from "@ratmath/core";
console.log([new Integer(3+1),new Integer(3**2+3+1)]);
Checked output
[4, 13]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
Focal example. The code above passed its displayed check in 0.058 ms on Node.
Related workload in this unit.core.R · whole-number operand. Baseline test points across courses 0, 1, 10, 20, 100, 1,000, 1,000,000. (n+7)(n−3) by independent BigInt arithmetic.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 9,007,199,254,740,991 (1.67 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Exact integer arithmetic grows with operand bit length. Enter large integers as decimal strings or BigInts before any JavaScript Number conversion.
Measured times, memory and outcomes
whole-number operand · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.75
75
1
Baseline
Passed
1.70
75.7
10
Baseline
Passed
1.78
75.1
20
Baseline
Passed
1.88
75.4
100
Baseline
Passed
1.55
75.4
1,000
Baseline
Passed
1.36
75.3
1,000,000
Baseline
Passed
1.39
74.8
1,000,000,000
Stretch
Passed
1.69
76.3
9,007,199,254,740,991
Stretch
Passed
1.67
75.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
core.Integer · 170 passing test cases, 60 distinct argument descriptions
In taxicab distance, must a shortest path from (0,0) to (1,1) be unique?
Worked solution
Both coordinate orders give paths of length two. The triangle inequality proves two is minimal.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 40 / 40 · Finite and alternative models
Model comparison
Worked by hand
Problem
Can two distinct great circles on the sphere be parallel in the sense of having no intersection?
Worked solution
Their planes through the origin intersect in a line, giving two antipodal intersection points.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Small incidence structures or metric examples: typically a few points or projective planes of small prime-power order.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.