Pith. sign in
module module moderate

IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.IntegerRational

show as:
view Lean formalization →

Integer and rational scaffolding on finite δ-orbit positions: truncated subtraction, absolute difference, Boolean comparison, and a signed-orbit type with an embedding into ℤ. Downstream Grow modules cite it for cross-multiplication order on ratio orbits, forced trichotomy, and integer divisibility. The module is mostly definitions plus elementary Nat/Int identities.

claimOn finite $\delta$-orbit positions one defines truncated subtraction $a \dot{-} b$, absolute difference $|a-b|$, and a Boolean order $\mathrm{leq}(a,b)$. A signed orbit type carries a map $\mathrm{toInt}$ into $\mathbb{Z}$, with a distinguished zero, so that numerators and denominators of ratio orbits can be compared by cross-multiplication in $\mathbb{Z}$.

background

Primitive Recognition Calculus works with finite discrete orbits under a recognition step $\delta$, not with bare $\mathbb{N}$ or $\mathbb{Q}$. The Orbit and OrbitArithmetic modules supply the underlying position type and basic arithmetic; this module adds the integer-like operations needed for ordered comparison and rational structure.

Truncated subtraction $a\dot{-}b$ is the Nat-style difference that floors at zero. Absolute difference and a Boolean $\mathrm{leq}$ are built from it, with lemmas relating their Boolean values to ordinary inequalities after casting to $\mathbb{N}$. SignedOrbit packages a sign with an orbit position and embeds into $\mathbb{Z}$ via $\mathrm{toInt}$, so products of numerators and denominators become ordinary integers.

That embedding is the bridge used later: positive distinctions (denominators) are cast in via $\mathrm{SignedOrbit.ofOrbit}$, and order on ratio orbits is defined by comparing signed products.

proof idea

Definition module with supporting Nat/Int lemmas, not a single theorem. Core objects are introduced as defs: truncatedSub, absDiff, leq, SignedOrbit, toInt, and zero. Companion lemmas (toNat_truncatedSub, leq_eq_true_iff / leq_eq_false_iff, toNat_absDiff, toInt_mk, zero_toInt) are short rewrites that connect the Boolean and truncated operations to Mathlib's Nat and Int arithmetic. No deep forcing argument lives here; the work is interface and casting hygiene.

why it matters in Recognition Science

Ratio-orbit order and trichotomy need a signed integer carrier for cross-multiplication. Downstream, RatioOrbitLeReflTotal defines $\mathrm{leQ},p,q$ by comparing the signed orbits $p.\mathrm{num}\cdot q.\mathrm{den}$ and $q.\mathrm{num}\cdot p.\mathrm{den}$ after casting dens through SignedOrbit.ofOrbit. Sibling Grow modules (ForcedTrichotomy, RatioOrbitLtTrichotomy, RatioOrbitLeNeg, RatioOrbitLeTransAntisymm, RatioOrbitDenseMediant, IntegerDivisibility, EtaCompletionM0a) import this layer so that order, density of mediants, and divisibility statements can be stated in $\mathbb{Z}$ rather than ad hoc on bare orbits.

In the broader RS foundation this is plumbing under the primitive calculus that eventually supports discrete forcing structure (octave period, dimension counts), not a T5–T8 landmark itself. It closes the gap between orbit positions and ordinary integer comparison.

scope and limits

used by (26)

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 (175)

… and 95 more