IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.OrbitEuclidean
Fuelled Euclidean division and GCD on recognition orbits: quotient and remainder by repeated subtraction, with the first argument an orbit fuel rather than ordinary Nat. Supplies the divisibility arithmetic that factorization charts, the PRC kernel, and the J-cost layer import. Correctness is by fuelled recursion plus transport lemmas to Nat.
claimOn recognition orbits, define fuelled division: given fuel $f$ and divisor $d$, obtain quotient $q$ and remainder $r$ by repeated subtraction so that $n = q\cdot d + r$ with $r < d$ (when the fuel is adequate). Lift the same recursion to a fuelled $\gcd$. Transport lemmas identify these with the usual $\mathrm{Nat}$ quotient, remainder, and $\gcd$.
background
Primitive Recognition Calculus builds arithmetic without treating verifier Nat as primitive. Integer and rational structure live in the IntegerRational layer; OrbitDivisibility supplies the orbit-level divisibility predicates this module consumes.
Here the Euclidean step is re-implemented with an explicit orbit fuel: divModFuel / divMod produce quotient and remainder by repeated subtraction, and gcdFuel / gcd iterate that step. The fuel is an orbit resource, not a bare natural, so termination and well-foundedness stay inside the recognition calculus.
Companion lemmas (remainder_lt_divisor, quotient_mul_divisor_add_remainder_eq, and the *_toNat family) state the usual Euclidean identities and the bridge to Mathlib Nat division, so later layers can quote standard arithmetic while staying orbit-native at the definition site.
proof idea
Definition-heavy module with fuelled recursive constructions. divModFuel subtracts the divisor while fuel remains; divMod, quotient, and remainder package that pair. gcdFuel / gcd reuse the same fuel discipline on the Euclidean algorithm.
Proof content is mostly structural: auxiliary toNat lemmas relate fuelled results to ordinary natural division; remainder_lt_divisor and quotient_mul_divisor_add_remainder_eq discharge the two Euclidean invariants by induction on fuel. No deep analytic argument; the work is making orbit-fuel recursion match classical div-mod/GCD.
why it matters in Recognition Science
Factorization chart transitions, the PRC kernel, and the PRC J-cost module all import this file. They need orbit-native quotient, remainder, and GCD so divisibility and cost bookkeeping do not drop out of the recognition calculus into bare Nat.
In the broader Foundation stack this is plumbing under the forcing chain rather than a T5–T8 landmark: it equips later uniqueness and cost arguments with Euclidean arithmetic that still tracks orbit fuel. Without it, chart factorization and kernel identities would either sorry out or smuggle verifier naturals into the primitive layer.
scope and limits
- Does not define J-cost, RCL, or any T5–T8 forcing step.
- Does not prove uniqueness of factorization; only fuelled div-mod and GCD.
- Does not replace Mathlib Nat division globally; only supplies orbit-fuel analogues plus transport.
- Does not address real or continuous quotients; discrete orbit arithmetic only.
- Does not specify physical units or mass-ladder rungs.
used by (3)
depends on (2)
declarations in this module (36)
-
def
divModFuel -
def
divMod -
def
quotient -
def
remainder -
theorem
divModFuel_toNat_aux -
theorem
divMod_toNat -
theorem
quotient_toNat -
theorem
remainder_toNat -
theorem
remainder_lt_divisor -
theorem
quotient_mul_divisor_add_remainder_eq -
def
gcdFuel -
def
gcd -
def
coprime -
theorem
gcdFuel_toNat_aux -
theorem
gcd_toNat -
theorem
coprime_iff_nat_coprime -
theorem
gcd_divides_left -
theorem
gcd_divides_right -
theorem
divides_gcd_of_divides_left_right -
theorem
coprime_divides_of_divides_mul_left -
theorem
gcd_ne_zero_of_right_ne_zero -
theorem
quotient_mul_divisor_toNat_of_divides -
theorem
quotient_ne_zero_of_divides -
def
signedQuotient -
theorem
signedQuotient_abs_toNat -
theorem
signedQuotient_mul_divisor_toInt_of_divides -
def
normalizeRatio -
theorem
normalizeRatio_num_mul_gcd_toInt -
theorem
normalizeRatio_den_mul_gcd_toNat -
theorem
normalizeRatio_toRat -
theorem
normalizeRatio_crossEq -
theorem
normalizeRatio_coprime -
def
RatioNormalizationTarget -
theorem
ratio_normalization_target -
structure
OrbitEuclideanCertificate -
theorem
orbit_euclidean_certificate