monge-rs
Monge's theorem for fleet mathematics — homothetic centers, radical axes, zero-holonomy consensus, and Pythagorean48 verification.
Designed to integrate with Forgemaster's constraint theory (jc1-ct-bridge).
Overview
Monge's theorem (1781) states that for three circles in the plane, the three pairs of external homothetic centers are collinear. This crate implements the theorem and several generalizations for multi-agent consensus and fleet geometry.
Modules
- geometry — Core types:
Circle,Sphere, 3D paraboloid lifting, nD Lassak generalization - homothetic — External and internal homothetic centers with Monge collinearity verification
- radical_axis — Radical axis as a 1-cocycle in Čech cohomology, radical center computation
- consensus — Zero-holonomy Lyapunov consensus protocol using Monge geometry for multi-agent systems
- p48 — Pythagorean48: zero-drift verification across 48 lattice directions from 6 primitive Pythagorean triples
Quick Start
use Vector2;
use Circle;
use ;
let c1 = new;
let c2 = new;
let c3 = new;
// External homothetic centers
let s12 = external_homothetic_center.unwrap;
let s23 = external_homothetic_center.unwrap;
let s31 = external_homothetic_center.unwrap;
// Verify Monge collinearity (area ≈ 0)
let area = monge_collinear_area.unwrap;
assert!;
Zero-Holonomy Consensus
Three agents with positions and trust radii converge to a common line (the Monge line) through the zero-holonomy protocol. Holonomy measures the area of the triangle formed by external homothetic centers — convergence is exponential with contraction factor λ = 2/3 for equal radii.
Pythagorean48
Verifies zero-drift Monge consistency across 48 lattice directions generated from the 6 primitive Pythagorean triples with c ≤ 37:
| (a, b, c) | Directions |
|---|---|
| (3, 4, 5) | 8 |
| (5, 12, 13) | 8 |
| (8, 15, 17) | 8 |
| (7, 24, 25) | 8 |
| (9, 40, 41) | 8 |
| (11, 60, 61) | 8 |
| Total | 48 |
License
MIT OR Apache-2.0