FordFareyParameter #
Adapted from Wesley Pegden’s Apache-2.0 Trellis formalization of Levine–Pegden–Smart. Changes: pool module paths, public exports, project namespace and current Mathlib compatibility.
A reduced Ford--Farey parameter consists of integers $p,p_1,p_2$ and natural numbers $q,q_1,q_2$ such that $q>0$, $\gcd(q,|p|)=1$, $$ (p,q)=(p_1,q_1)+(p_2,q_2),\qquad p_1q-q_1p=1,\qquad p_2q-q_2p=-1, $$ with $0\leq q_1<q$ and $0<q_2$. When $q=1$ the data are required to be $(p_1,q_1)=(1,0)$ and $(p_2,q_2)=(p-1,1)$; the first of these denotes the oriented line parent, not a curvature-zero Ford circle.
- p : ℤ
The numerator of the reduced Ford fraction.
- q : ℕ
The positive denominator of the reduced Ford fraction.
- p₁ : ℤ
The numerator of the first Farey parent, with the line-parent convention at q = 1.
- q₁ : ℕ
The first parent denominator, strictly smaller than q.
- p₂ : ℤ
The numerator of the second Farey parent.
- q₂ : ℕ
The positive second parent denominator.