IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.IntegerRational
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
- Does not prove uniqueness of J or force φ; those live in the UnifiedForcingChain.
- Does not define ratio-orbit order itself; only the signed integer carrier used by leQ.
- Does not establish trichotomy, density of mediants, or divisibility; Grow modules do.
- Does not treat infinite orbits or continuous reals; only finite δ-orbit positions.
- Does not claim a full ordered field structure on orbits beyond the exported casts and lemmas.
used by (26)
-
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.EtaCompletionM0a -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.ForcedTrichotomy -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.IntegerDivisibility -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitDenseMediant -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitLeNeg -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitLeReflTotal -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitLeTransAntisymm -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitLtTrichotomy -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitMulPos -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitOrderAddMono -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitOrderMulNonneg -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.RatioOrbitZeroLtOne -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitLeCongrLeftOfBalancedChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitLeCongrOfBalancedChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitLeCongrRightOfBalancedChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitLeMulRightIffOfNonnegFlagOfNotBalancedZeroChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitLeOfProductRightFactorIffOfBalancedChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitLeProductRightFactorIffOfBalancedChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitMulBalancedZeroOfBalancedZeroRightChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitNonnegFlagMulOfOrbitRightOfNeZeroChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitOrderChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Grow.SignedOrbitZeroLeIffNonnegFlagChoiceFree -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.IntegerOrder -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.Kernel -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.OrbitEuclidean -
IndisputableMonolith.Foundation.PrimitiveRecognitionCalculus.RealCompletion
depends on (2)
declarations in this module (175)
-
def
truncatedSub -
def
leq -
def
absDiff -
theorem
toNat_truncatedSub -
theorem
leq_eq_true_iff -
theorem
leq_eq_false_iff -
theorem
toNat_absDiff -
structure
SignedOrbit -
def
toInt -
theorem
toInt_mk -
def
zero -
theorem
zero_toInt -
def
one -
theorem
one_toInt -
def
ofOrbit -
theorem
ofOrbit_toInt -
def
add -
theorem
add_pos -
theorem
add_neg -
theorem
add_toInt -
def
negate -
theorem
negate_pos -
theorem
negate_neg -
theorem
negate_toInt -
def
mul -
theorem
mul_pos -
theorem
mul_neg -
theorem
mul_toInt -
def
sub -
theorem
sub_toInt -
def
scaleByNat -
theorem
scaleByNat_pos -
theorem
scaleByNat_neg -
theorem
scaleByNat_toInt -
def
balanced -
instance
instDecidableBalanced -
theorem
balanced_iff_toNat_eq -
theorem
balanced_iff_toInt_eq -
theorem
balanced_refl -
theorem
balanced_symm -
theorem
balanced_trans -
theorem
balanced_equivalence -
def
nonneg -
def
nonnegFlag -
def
negativeFlag -
def
le -
def
lt -
def
abs -
theorem
nonnegFlag_eq_true_iff -
theorem
nonnegFlag_eq_false_iff -
theorem
nonneg_iff_toInt_nonneg -
theorem
nonnegFlag_eq_true_iff_nonneg -
theorem
negativeFlag_eq_true_iff_toInt_neg -
theorem
abs_toNat -
theorem
abs_eq_zero_iff_toInt_eq_zero -
theorem
abs_ne_zero_of_toInt_ne_zero -
theorem
abs_ne_zero_of_not_balanced_zero -
theorem
le_iff_toInt_le -
theorem
lt_iff_toInt_lt -
def
signedOrbitEquiv -
theorem
signedOrbitEquiv_equivalence -
theorem
signedOrbitEquiv_iff_toInt_eq -
def
signedOrbitSetoid -
def
PRCInt -
def
mk -
theorem
mk_eq_mk_of_balanced -
theorem
add_respects_balanced -
theorem
add_mk -
theorem
toInt_add -
theorem
negate_respects_balanced -
theorem
negate_mk -
theorem
toInt_negate -
theorem
toInt_injective -
theorem
mul_respects_balanced -
theorem
mul_mk -
theorem
toInt_mul -
theorem
toInt_sub -
theorem
add_comm -
theorem
add_assoc -
theorem
zero_add