Pith. sign in
module module moderate

IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.OrbitEuclidean

show as:
view Lean formalization →

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

used by (3)

From the project-wide theorem graph. These declarations reference this one in their body.

depends on (2)

Lean names referenced from this declaration's body.

declarations in this module (36)