Encyclopedia Foundation Foundation Primitive Recognition Calculus Integer Rational Signed Orbit Equiv Eq

ARTICLE 1 claim 1 theorem

Foundation Primitive Recognition Calculus Integer Rational Signed Orbit Equiv Eq

A signed orbit is a pair of counting numbers that records a position and a direction; the equivalence relation tells when two such records describe the same integer.

Signed orbit equivalence

A signed orbit is a discrete record of a position and a direction: a pair of natural numbers, one counting steps forward, one counting steps backward. The framework's recognition calculus, a machine-checked library of formal theorems, builds its integers from these pairs. The declaration signedOrbitEquiv_equivalence proves that the relation identifying two pairs when their forward count minus backward count agrees is an equivalence relation: reflexive, symmetric, and transitive. In plain terms, it establishes that the bookkeeping rule for merging signed orbits is consistent, so the resulting integer type is well-defined.

The construction mirrors the classical definition of the integers as equivalence classes of differences. Two pairs (a, b) and (c, d) are equivalent when a + d = c + b, which is exactly the condition that a - b and c - d name the same integer. The theorem does not define the integers themselves; it proves that the relation used to build them behaves correctly. That distinction matters: the equivalence relation is a ledger, a discrete record of events, and the theorem certifies that the ledger's merging rule is coherent.

What the declaration does not claim is broader. It does not assert that every integer has a unique signed-orbit representative, nor that the equivalence classes form a group under addition. It says nothing about multiplication, ordering, or the rational numbers built from ratio orbits. Those facts, when they hold, are separate theorems in the same library. The equivalence theorem is a foundation stone, not the whole building.

For a reader, the payoff is a guarantee about the framework's internal consistency. Before this theorem, one could ask whether the rule for identifying signed orbits might produce contradictions. The theorem removes that doubt for the relation itself, allowing later work to proceed on a stable base. The classical reader will recognize the move as the standard construction of integers from pairs of naturals, here re-derived inside the recognition framework.

THEOREM isZero · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/IntegerRational.lean
/-- K4.8. Choice-free structural zero test: a PRC rational is in the zero
class iff its representative's numerator balances the zero signed orbit.
Well-definedness routes through the integer cross-multiplication hub (no `ℚ`
display), so the definition depends only on `{propext, Quot.sound}`. -/
def isZero : PRCRat → Prop :=
  Quot.lift
    (fun q => SignedOrbit.balanced q.num SignedOrbit.zero)
    (by
      intro a b h
      have h' := (RatioOrbit.crossEq_iff_toIntCross a b).mp h
      have hda : (a.den.toNat : ℤ) ≠ 0 := by
        have := a.den_toNat_ne_zero
        omega
      have hdb : (b.den.toNat : ℤ) ≠ 0 := by
        have := b.den_toNat_ne_zero
        omega
      apply propext
      show SignedOrbit.balanced a.num SignedOrbit.zero
          ↔ SignedOrbit.balanced b.num SignedOrbit.zero
      rw [SignedOrbit.balanced_iff_toInt_eq, SignedOrbit.balanced_iff_toInt_eq,
          SignedOrbit.zero_toInt]
      constructor
      · intro ha0
        have h0 : b.num.toInt * (a.den.toNat : ℤ) = 0 * (a.den.toNat : ℤ) := by
          rw [← h', ha0, Int.zero_mul, Int.zero_mul]
        exact Int.eq_of_mul_eq_mul_right hda h0
      · intro hb0
        have h0 : a.num.toInt * (b.den.toNat : ℤ) = 0 * (b.den.toNat : ℤ) := by
          rw [h', hb0, Int.zero_mul, Int.zero_mul]
        exact Int.eq_of_mul_eq_mul_right hdb h0)

What this page does not claim

The theorem does not assert uniqueness of representatives for each integer equivalence class. The theorem does not establish that the integer type forms a group under addition. The theorem says nothing about multiplication, ordering, or the rational numbers built from ratio orbits.

Verify this page

Every tagged claim above names its theorem. To check one yourself rather than trust this page, elaborate the source module with Lean 4 and audit its axiom basis:

$ lake env lean IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/IntegerRational.lean
expected axiom basis: [propext, Classical.choice, Quot.sound] (the Lean kernel's standard three; no RS-specific axioms)

A page whose claims cannot be reproduced this way does not ship. In production, every anchor links to the exact declaration in the public source release, and this block carries the build receipt for the page itself.

Derived articles

This page is generated by a question-recursion engine: the questions its answers raise become the next pages. The current agenda, with open targets marked red:

MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND