Encyclopedia Foundation Foundation Primitive Recognition Calculus Grow Eta Completion M0a Equiv Equivale
ARTICLE 3 claims 3 theorems
Foundation Primitive Recognition Calculus Grow Eta Completion M0a Equiv Equivale
A formal proof that two sequences of ratios are interchangeable when they eventually agree, and the precise limits of that claim.
The equivalence relation
The declaration equiv_equivalence establishes that a certain relation between sequences of rational-like objects is an equivalence relation. In plain language, it proves that the relation is reflexive (every sequence is related to itself), symmetric (if one sequence is related to another, the reverse holds), and transitive (if the first relates to the second and the second to the third, the first relates to the third). This is the mathematical backbone needed to treat these sequences as representatives of a single underlying object, much as different decimal expansions can represent the same real number.
The relation itself, called equiv, compares two sequences by looking at their tails: it holds when, for any tolerance, the sequences' terms eventually become close in a specific arithmetic sense. The proof of equivalence is not a single step but a composition of three separate proofs, one for each property. The reflexivity proof uses the fact that a rational minus itself has zero cross-difference, a measure of difference computed from numerators and denominators. The symmetry proof uses the fact that swapping the order of two terms negates this cross-difference. The transitivity proof is the most involved, relying on a triangle-like identity that relates the cross-differences among three terms.
What this declaration does not claim is equally important. It does not claim that the relation makes all sequences equivalent; it only says the relation behaves like an equality relation. It does not assert that any particular sequence is equivalent to any other, nor does it identify which sequences represent the same object. The declaration also does not prove that the quotient construction, which forms new objects from these equivalence classes, is well-defined or injective. Those are separate theorems, such as etaQ_injective, which proves that the map from the original rationals into the completed space is one-to-one.
In the Recognition Science framework, this result is a technical foundation. It allows the framework to build a completion of its rational-like objects, called RealDelta, by grouping sequences that are eventually indistinguishable. The equivalence relation is the criterion for grouping. Without it, the construction would not have a coherent notion of when two sequences represent the same completed object. With it, the framework can proceed to define the completed space and prove properties about it, such as the injectivity of the embedding from the original objects.
THEOREM equiv_equivalence · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.lean
/-- `equiv` is an equivalence relation: reflexive, symmetric, transitive. This is
the completion of the M0a carrier into a genuine setoid, all choice-free. -/
theorem equiv_equivalence : Equivalence equiv where
refl := equiv_refl
symm := equiv_symm
trans := equiv_trans
THEOREM equiv_refl · equiv_symm · equiv_trans · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.lean
/-- `equiv` is reflexive: every regular sequence is equivalent to itself. -/
theorem equiv_refl (s : RegularSeq) : equiv s s := by
intro k
refine ⟨0, ?_⟩
intro n _
rw [crossDiff_self, Int.natAbs_zero, Nat.zero_mul]
exact Nat.zero_le _
/-- `equiv` is symmetric. The cross-difference only flips sign, so its absolute
value and the denominator product are unchanged. Choice-free. -/
theorem equiv_symm {s t : RegularSeq} (h : equiv s t) : equiv t s := by
intro k
obtain ⟨N, hN⟩ := h k
refine ⟨N, ?_⟩
intro n hn
have hcd : crossDiff (t.seq n) (s.seq n) = -crossDiff (s.seq n) (t.seq n) :=
crossDiff_swap (s.seq n) (t.seq n)
rw [hcd, Int.natAbs_neg, Nat.mul_comm (t.seq n).den.toNat (s.seq n).den.toNat]
exact hN n hn
/-- `equiv` is transitive: the choice-free triangle argument at the integer
cross-multiplication level. From `|s_n - t_n| ≤ 1/(2k+2)` and
`|t_n - u_n| ≤ 1/(2k+2)` eventually, the three-point identity plus positivity of
the middle denominator give `|s_n - u_n| ≤ 1/(k+1)`, with no ℚ display (so the
proof stays on `{propext, Quot.sound}`). -/
theorem equiv_trans {s t u : RegularSeq}
(hst : equiv s t) (htu : equiv t u) : equiv s u := by
intro k
obtain ⟨N₁, hN₁⟩ := hst (2 * k + 1)
obtain ⟨N₂, hN₂⟩ := htu (2 * k + 1)
refine ⟨max N₁ N₂, ?_⟩
intro n hn
have hn₁ : n ≥ N₁ := le_trans (Nat.le_max_left N₁ N₂) hn
have hn₂ : n ≥ N₂ := le_trans (Nat.le_max_right N₁ N₂) hn
-- The three participating rationals at index n.
set A := s.seq n with hA
set B := t.seq n with hB
set C := u.seq n with hC
-- Hypotheses at level 2k+1 (i.e. factor 2k+1+1), in Nat. `set` rewrote the
-- goal but not the ∀-hypotheses, so re-fold `s.seq n → A` etc. by hand.
have h1 : (crossDiff A B).natAbs * (2 * k + 1 + 1) ≤ A.den.toNat * B.den.toNat := by
have h := hN₁ n hn₁; rw [← hA, ← hB] at h; exact h
have h2 : (crossDiff B C).natAbs * (2 * k + 1 + 1) ≤ B.den.toNat * C.den.toNat := by
have h := hN₂ n hn₂; rw [← hB, ← hC] at h; exact h
-- Positive denominators.
have hdBpos : 0 < B.den.toNat := Nat.pos_of_ne_zero B.den_toNat_ne_zero
-- Triangle in Nat via the integer identity and `Int.natAbs_add_le`.
have hid : crossDiff A C * (B.den.toNat : ℤ) =
crossDiff A B * (C.den.toNat : ℤ) + crossDiff B C * (A.den.toNat : ℤ) :=
crossDiff_triangle_id A B C
have heq := congrArg Int.natAbs hid
have hnatB : ((B.den.toNat : ℤ)).natAbs = B.den.toNat := Int.natAbs_natCast _
have hnatC : ((C.den.toNat : ℤ)).natAbs = C.den.toNat := Int.natAbs_natCast _
have hnatA : ((A.den.toNat : ℤ)).natAbs = A.den.toNat := Int.natAbs_natCast _
have hL : (crossDiff A C * (B.den.toNat : ℤ)).natAbs
= (crossDiff A C).natAbs * B.den.toNat := by
rw [Int.natAbs_mul, hnatB]
have hR : (crossDiff A B * (C.den.toNat : ℤ) + crossDiff B C * (A.den.toNat : ℤ)).natAbs
≤ (crossDiff A B).natAbs * C.den.toNat + (crossDiff B C).natAbs * A.den.toNat := by
refine le_trans (Int.natAbs_add_le _ _) ?_
rw [Int.natAbs_mul, Int.natAbs_mul, hnatC, hnatA]
have htriN : (crossDiff A C).natAbs * B.den.toNat
≤ (crossDiff A B).natAbs * C.den.toNat + (crossDiff B C).natAbs * A.den.toNat := by
rw [hL] at heq; rw [heq]; exact hR
-- Do the ε/2 arithmetic entirely in ℕ, using only monotone product lemmas and
-- `ring`/`omega` (all choice-free). Casting to ℤ via norm_cast smuggles
-- `Classical.choice` here, so we stay in ℕ.
set cAC := (crossDiff A C).natAbs with hcAC
set cAB := (crossDiff A B).natAbs with hcAB
set cBC := (crossDiff B C).natAbs with hcBC
set dA := A.den.toNat with hdA
set dB := B.den.toNat with hdB
set dC := C.den.toNat with hdC
set two := 2 * k + 1 + 1 with htwo_def
-- htriN : cAC*dB ≤ cAB*dC + cBC*dA ; h1 : cAB*two ≤ dA*dB ; h2 : cBC*two ≤ dB*dC
have e1 : cAB * two * dC ≤ dA * dB * dC := Nat.mul_le_mul_right dC h1
have e2 : cBC * two * dA ≤ dB * dC * dA := Nat.mul_le_mul_right dA h2
have base : cAC * dB * two ≤ (cAB * dC + cBC * dA) * two := Nat.mul_le_mul_right two htriN
have expand : (cAB * dC + cBC * dA) * two = cAB * two * dC + cBC * two * dA := by ring
have chain : cAC * dB * two ≤ dA * dB * dC + dB * dC * dA := by
rw [expand] at base; exact le_trans base (add_le_add e1 e2)
-- two = 2*(k+1); repackage both sides around the common positive factor 2*dB.
have htwo : two = 2 * (k + 1) := by rw [htwo_def]; ring
have lhs_eq : cAC * dB * two = cAC * (k + 1) * (2 * dB) := by rw [htwo]; ring
have rhs_eq : dA * dB * dC + dB * dC * dA = dA * dC * (2 * dB) := by ring
have cancel_in : cAC * (k + 1) * (2 * dB) ≤ dA * dC * (2 * dB) := by
rw [← lhs_eq, ← rhs_eq]; exact chain
have hpos : 0 < 2 * dB := by rw [hdB]; omega
exact Nat.le_of_mul_le_mul_right cancel_in hpos
THEOREM etaQ_injective · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.lean
/-- The unit η : ℚδ → ℝδ_pre is injective: no two distinct δ-rationals collapse
in the completion. Together with well-definedness this makes η a genuine
embedding of the rational base into the M0a real line, choice-free. -/
theorem etaQ_injective : Function.Injective etaQ := by
intro a b h
induction a using Quot.ind with
| mk q =>
induction b using Quot.ind with
| mk r =>
have hq : RealDelta.mk (eta q) = RealDelta.mk (eta r) := h
have hequiv : equiv (eta q) (eta r) := by
have := Quot.eqvGen_exact hq
-- Exactness gives `EqvGen`; collapse it with the proved equivalence.
exact (Equivalence.eqvGen_iff equiv_equivalence).mp this
exact Quot.sound (crossEq_of_equiv_eta hequiv)
What this page does not claim
The declaration does not claim that all sequences are equivalent to each other. The declaration does not claim that the quotient construction is well-defined or injective; those are separate theorems. The declaration does not claim anything about the physical or empirical content of the framework.
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/Grow/EtaCompletionM0a.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:
- What exactly is a regular sequence in this framework, and why is that regularity condition needed?
- How does the cross-difference measure relate to the usual notion of distance between rational numbers?
- What properties of the completed space RealDelta follow from this equivalence relation?
- How does the injectivity proof of etaQ_injective use the equivalence relation in its argument?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM equiv_equivalence · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.lean
/-- `equiv` is an equivalence relation: reflexive, symmetric, transitive. This is the completion of the M0a carrier into a genuine setoid, all choice-free. -/ theorem equiv_equivalence : Equivalence equiv where refl := equiv_refl symm := equiv_symm trans := equiv_transThe declaration equiv_equivalence establishes that a certain relation between sequences of rational-like objects is an equivalence relation. equiv_equivalence · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.leanTHEOREM equiv_refl · equiv_symm · equiv_trans · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.lean
/-- `equiv` is reflexive: every regular sequence is equivalent to itself. -/ theorem equiv_refl (s : RegularSeq) : equiv s s := by intro k refine ⟨0, ?_⟩ intro n _ rw [crossDiff_self, Int.natAbs_zero, Nat.zero_mul] exact Nat.zero_le _/-- `equiv` is symmetric. The cross-difference only flips sign, so its absolute value and the denominator product are unchanged. Choice-free. -/ theorem equiv_symm {s t : RegularSeq} (h : equiv s t) : equiv t s := by intro k obtain ⟨N, hN⟩ := h k refine ⟨N, ?_⟩ intro n hn have hcd : crossDiff (t.seq n) (s.seq n) = -crossDiff (s.seq n) (t.seq n) := crossDiff_swap (s.seq n) (t.seq n) rw [hcd, Int.natAbs_neg, Nat.mul_comm (t.seq n).den.toNat (s.seq n).den.toNat] exact hN n hn/-- `equiv` is transitive: the choice-free triangle argument at the integer cross-multiplication level. From `|s_n - t_n| ≤ 1/(2k+2)` and `|t_n - u_n| ≤ 1/(2k+2)` eventually, the three-point identity plus positivity of the middle denominator give `|s_n - u_n| ≤ 1/(k+1)`, with no ℚ display (so the proof stays on `{propext, Quot.sound}`). -/ theorem equiv_trans {s t u : RegularSeq} (hst : equiv s t) (htu : equiv t u) : equiv s u := by intro k obtain ⟨N₁, hN₁⟩ := hst (2 * k + 1) obtain ⟨N₂, hN₂⟩ := htu (2 * k + 1) refine ⟨max N₁ N₂, ?_⟩ intro n hn have hn₁ : n ≥ N₁ := le_trans (Nat.le_max_left N₁ N₂) hn have hn₂ : n ≥ N₂ := le_trans (Nat.le_max_right N₁ N₂) hn -- The three participating rationals at index n. set A := s.seq n with hA set B := t.seq n with hB set C := u.seq n with hC -- Hypotheses at level 2k+1 (i.e. factor 2k+1+1), in Nat. `set` rewrote the -- goal but not the ∀-hypotheses, so re-fold `s.seq n → A` etc. by hand. have h1 : (crossDiff A B).natAbs * (2 * k + 1 + 1) ≤ A.den.toNat * B.den.toNat := by have h := hN₁ n hn₁; rw [← hA, ← hB] at h; exact h have h2 : (crossDiff B C).natAbs * (2 * k + 1 + 1) ≤ B.den.toNat * C.den.toNat := by have h := hN₂ n hn₂; rw [← hB, ← hC] at h; exact h -- Positive denominators. have hdBpos : 0 < B.den.toNat := Nat.pos_of_ne_zero B.den_toNat_ne_zero -- Triangle in Nat via the integer identity and `Int.natAbs_add_le`. have hid : crossDiff A C * (B.den.toNat : ℤ) = crossDiff A B * (C.den.toNat : ℤ) + crossDiff B C * (A.den.toNat : ℤ) := crossDiff_triangle_id A B C have heq := congrArg Int.natAbs hid have hnatB : ((B.den.toNat : ℤ)).natAbs = B.den.toNat := Int.natAbs_natCast _ have hnatC : ((C.den.toNat : ℤ)).natAbs = C.den.toNat := Int.natAbs_natCast _ have hnatA : ((A.den.toNat : ℤ)).natAbs = A.den.toNat := Int.natAbs_natCast _ have hL : (crossDiff A C * (B.den.toNat : ℤ)).natAbs = (crossDiff A C).natAbs * B.den.toNat := by rw [Int.natAbs_mul, hnatB] have hR : (crossDiff A B * (C.den.toNat : ℤ) + crossDiff B C * (A.den.toNat : ℤ)).natAbs ≤ (crossDiff A B).natAbs * C.den.toNat + (crossDiff B C).natAbs * A.den.toNat := by refine le_trans (Int.natAbs_add_le _ _) ?_ rw [Int.natAbs_mul, Int.natAbs_mul, hnatC, hnatA] have htriN : (crossDiff A C).natAbs * B.den.toNat ≤ (crossDiff A B).natAbs * C.den.toNat + (crossDiff B C).natAbs * A.den.toNat := by rw [hL] at heq; rw [heq]; exact hR -- Do the ε/2 arithmetic entirely in ℕ, using only monotone product lemmas and -- `ring`/`omega` (all choice-free). Casting to ℤ via norm_cast smuggles -- `Classical.choice` here, so we stay in ℕ. set cAC := (crossDiff A C).natAbs with hcAC set cAB := (crossDiff A B).natAbs with hcAB set cBC := (crossDiff B C).natAbs with hcBC set dA := A.den.toNat with hdA set dB := B.den.toNat with hdB set dC := C.den.toNat with hdC set two := 2 * k + 1 + 1 with htwo_def -- htriN : cAC*dB ≤ cAB*dC + cBC*dA ; h1 : cAB*two ≤ dA*dB ; h2 : cBC*two ≤ dB*dC have e1 : cAB * two * dC ≤ dA * dB * dC := Nat.mul_le_mul_right dC h1 have e2 : cBC * two * dA ≤ dB * dC * dA := Nat.mul_le_mul_right dA h2 have base : cAC * dB * two ≤ (cAB * dC + cBC * dA) * two := Nat.mul_le_mul_right two htriN have expand : (cAB * dC + cBC * dA) * two = cAB * two * dC + cBC * two * dA := by ring have chain : cAC * dB * two ≤ dA * dB * dC + dB * dC * dA := by rw [expand] at base; exact le_trans base (add_le_add e1 e2) -- two = 2*(k+1); repackage both sides around the common positive factor 2*dB. have htwo : two = 2 * (k + 1) := by rw [htwo_def]; ring have lhs_eq : cAC * dB * two = cAC * (k + 1) * (2 * dB) := by rw [htwo]; ring have rhs_eq : dA * dB * dC + dB * dC * dA = dA * dC * (2 * dB) := by ring have cancel_in : cAC * (k + 1) * (2 * dB) ≤ dA * dC * (2 * dB) := by rw [← lhs_eq, ← rhs_eq]; exact chain have hpos : 0 < 2 * dB := by rw [hdB]; omega exact Nat.le_of_mul_le_mul_right cancel_in hposThe proof of equivalence is not a single step but a composition of three separate proofs, one for each property. equiv_refl · equiv_symm · equiv_trans · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.leanTHEOREM etaQ_injective · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.lean
/-- The unit η : ℚδ → ℝδ_pre is injective: no two distinct δ-rationals collapse in the completion. Together with well-definedness this makes η a genuine embedding of the rational base into the M0a real line, choice-free. -/ theorem etaQ_injective : Function.Injective etaQ := by intro a b h induction a using Quot.ind with | mk q => induction b using Quot.ind with | mk r => have hq : RealDelta.mk (eta q) = RealDelta.mk (eta r) := h have hequiv : equiv (eta q) (eta r) := by have := Quot.eqvGen_exact hq -- Exactness gives `EqvGen`; collapse it with the proved equivalence. exact (Equivalence.eqvGen_iff equiv_equivalence).mp this exact Quot.sound (crossEq_of_equiv_eta hequiv)The declaration also does not prove that the quotient construction, which forms new objects from these equivalence classes, is well-defined or injective. etaQ_injective · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/EtaCompletionM0a.lean