Encyclopedia Foundation Foundation Primitive Recognition Calculus Grow Ratio Orbit Dense Mediant
ARTICLE 3 claims 3 theorems
Foundation Primitive Recognition Calculus Grow Ratio Orbit Dense Mediant
Between any two ratios on a recognition orbit, a third ratio always lies between them, and the machine-checked proof shows why the orbit never gaps.
The dense orbit
A mediant is the fraction formed by adding the numerators and denominators of two other fractions: the mediant of a/b and c/d is (a+c)/(b+d). For example, the mediant of 1/2 and 2/3 is 3/5, which sits between them. This simple operation has a long history in number theory, where it generates the Farey sequence and the Stern-Brocot tree, and it appears in music theory as the way to find intermediate intervals. The classical fact is that the mediant of two fractions always lies strictly between them when the fractions are in lowest terms.
In Recognition Science, the framework models recognition events as a discrete ledger, a record of events with no gaps. The module called RatioOrbitDenseMediant, part of the foundation primitive recognition calculus, proves a structural property of the ratios that appear in such a ledger. A ratio orbit is the set of all ratios reachable from a starting ratio by repeated scaling. The framework proves that this orbit is dense: between any two distinct ratios on the orbit, there is always another ratio on the orbit. The proof uses the mediant construction, showing that the mediant of two orbit ratios is itself an orbit ratio and lies strictly between them.
The key theorem, ltQ_mediant, states that for any two ratios p and q on the orbit, if p is less than q, then p is less than the mediant of p and q, and the mediant is less than q. This is proved in the machine-checked library of formal theorems, a collection of proofs verified by a computer, with no gaps in the logical chain. The proof reduces the ordering of ratios to a comparison of natural numbers, then applies the arithmetic fact that the mediant of two numbers lies between them.
Density matters because it means the orbit has no holes. In a discrete ledger, one might expect ratios to appear only at isolated points, but the framework shows the opposite: between any two ratios, another ratio always appears. This is the same property that makes the rational numbers dense in the real numbers, and it is a necessary condition for the continuous scaling behavior that the framework derives elsewhere. The result does not say the orbit is continuous, only that it is dense, which is a weaker but still powerful property.
The practical consequence is that any finite interval of ratios contains infinitely many orbit ratios. This supports the framework's claim that recognition events can occur at arbitrarily fine scales, a property that underlies the derivation of continuous parameters from a discrete starting point. The module thus establishes a bridge between the discrete ledger and the continuous mathematics used in the rest of the framework.
THEOREM ltQ_mediant · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
theorem ltQ_mediant : ∀ p q, ltQ p q → ltQ p (mediant p q) ∧ ltQ (mediant p q) q := by
intro p q h
rw [ltQ_iff_toNat] at h
refine ⟨?_, ?_⟩
· rw [ltQ_iff_toNat]
simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg,
DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul]
generalize p.num.pos.toNat * p.den.toNat = e1 at *
generalize p.num.pos.toNat * q.den.toNat = e2 at *
generalize p.num.neg.toNat * p.den.toNat = e3 at *
generalize q.num.neg.toNat * p.den.toNat = e4 at *
generalize q.num.pos.toNat * p.den.toNat = e5 at *
generalize p.num.neg.toNat * q.den.toNat = e6 at *
omega
· rw [ltQ_iff_toNat]
simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg,
DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul]
generalize p.num.pos.toNat * q.den.toNat = e2 at *
generalize q.num.pos.toNat * q.den.toNat = e7 at *
generalize q.num.neg.toNat * p.den.toNat = e4 at *
generalize q.num.neg.toNat * q.den.toNat = e8 at *
generalize q.num.pos.toNat * p.den.toNat = e5 at *
generalize p.num.neg.toNat * q.den.toNat = e6 at *
omega
THEOREM ltQ_mediant · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
theorem ltQ_mediant : ∀ p q, ltQ p q → ltQ p (mediant p q) ∧ ltQ (mediant p q) q := by
intro p q h
rw [ltQ_iff_toNat] at h
refine ⟨?_, ?_⟩
· rw [ltQ_iff_toNat]
simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg,
DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul]
generalize p.num.pos.toNat * p.den.toNat = e1 at *
generalize p.num.pos.toNat * q.den.toNat = e2 at *
generalize p.num.neg.toNat * p.den.toNat = e3 at *
generalize q.num.neg.toNat * p.den.toNat = e4 at *
generalize q.num.pos.toNat * p.den.toNat = e5 at *
generalize p.num.neg.toNat * q.den.toNat = e6 at *
omega
· rw [ltQ_iff_toNat]
simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg,
DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul]
generalize p.num.pos.toNat * q.den.toNat = e2 at *
generalize q.num.pos.toNat * q.den.toNat = e7 at *
generalize q.num.neg.toNat * p.den.toNat = e4 at *
generalize q.num.neg.toNat * q.den.toNat = e8 at *
generalize q.num.pos.toNat * p.den.toNat = e5 at *
generalize p.num.neg.toNat * q.den.toNat = e6 at *
omega
THEOREM ltQ_iff_toNat · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
theorem ltQ_iff_toNat (p q : RatioOrbit) :
ltQ p q ↔
p.num.pos.toNat * q.den.toNat + q.num.neg.toNat * p.den.toNat <
q.num.pos.toNat * p.den.toNat + p.num.neg.toNat * q.den.toNat := by
unfold ltQ leQ RatioOrbit.crossEq
rw [le_iff_toNat_cf, SignedOrbit.balanced_iff_toNat_eq]
simp only [SignedOrbit.mul_pos, SignedOrbit.mul_neg, SignedOrbit.scaleByNat_pos,
SignedOrbit.scaleByNat_neg, SignedOrbit.ofOrbit,
DistinctionNat.toNat_add, DistinctionNat.toNat_mul]
constructor
· intro h
have hz : DistinctionNat.zero.toNat = 0 := rfl
simp only [hz, Nat.mul_zero, Nat.add_zero, Nat.zero_add] at *
obtain ⟨h1, h2⟩ := h
omega
· intro h
have hz : DistinctionNat.zero.toNat = 0 := rfl
simp only [hz, Nat.mul_zero, Nat.add_zero, Nat.zero_add] at *
refine ⟨?_, ?_⟩
· omega
· omega
What this page does not claim
The ratio orbit is continuous; density does not imply continuity. The mediant operation is the only way to generate intermediate ratios on the orbit. The framework derives the golden ratio from the mediant operation alone.
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/RatioOrbitDenseMediant.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:
- How does the density of the ratio orbit connect to the derivation of continuous scaling parameters?
- What other classical number-theoretic structures, besides Farey sequences, arise from the mediant operation on orbits?
- Does the density property extend to higher-dimensional ratios or only to one-dimensional ratios?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM ltQ_mediant · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
theorem ltQ_mediant : ∀ p q, ltQ p q → ltQ p (mediant p q) ∧ ltQ (mediant p q) q := by intro p q h rw [ltQ_iff_toNat] at h refine ⟨?_, ?_⟩ · rw [ltQ_iff_toNat] simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg, DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul] generalize p.num.pos.toNat * p.den.toNat = e1 at * generalize p.num.pos.toNat * q.den.toNat = e2 at * generalize p.num.neg.toNat * p.den.toNat = e3 at * generalize q.num.neg.toNat * p.den.toNat = e4 at * generalize q.num.pos.toNat * p.den.toNat = e5 at * generalize p.num.neg.toNat * q.den.toNat = e6 at * omega · rw [ltQ_iff_toNat] simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg, DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul] generalize p.num.pos.toNat * q.den.toNat = e2 at * generalize q.num.pos.toNat * q.den.toNat = e7 at * generalize q.num.neg.toNat * p.den.toNat = e4 at * generalize q.num.neg.toNat * q.den.toNat = e8 at * generalize q.num.pos.toNat * p.den.toNat = e5 at * generalize p.num.neg.toNat * q.den.toNat = e6 at * omegaThe mediant of two fractions always lies strictly between them when the fractions are in lowest terms. ltQ_mediant · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.leanTHEOREM ltQ_mediant · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
theorem ltQ_mediant : ∀ p q, ltQ p q → ltQ p (mediant p q) ∧ ltQ (mediant p q) q := by intro p q h rw [ltQ_iff_toNat] at h refine ⟨?_, ?_⟩ · rw [ltQ_iff_toNat] simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg, DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul] generalize p.num.pos.toNat * p.den.toNat = e1 at * generalize p.num.pos.toNat * q.den.toNat = e2 at * generalize p.num.neg.toNat * p.den.toNat = e3 at * generalize q.num.neg.toNat * p.den.toNat = e4 at * generalize q.num.pos.toNat * p.den.toNat = e5 at * generalize p.num.neg.toNat * q.den.toNat = e6 at * omega · rw [ltQ_iff_toNat] simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg, DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul] generalize p.num.pos.toNat * q.den.toNat = e2 at * generalize q.num.pos.toNat * q.den.toNat = e7 at * generalize q.num.neg.toNat * p.den.toNat = e4 at * generalize q.num.neg.toNat * q.den.toNat = e8 at * generalize q.num.pos.toNat * p.den.toNat = e5 at * generalize p.num.neg.toNat * q.den.toNat = e6 at * omegaBetween any two distinct ratios on the orbit, there is always another ratio on the orbit. ltQ_mediant · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.leanTHEOREM ltQ_iff_toNat · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
theorem ltQ_iff_toNat (p q : RatioOrbit) : ltQ p q ↔ p.num.pos.toNat * q.den.toNat + q.num.neg.toNat * p.den.toNat < q.num.pos.toNat * p.den.toNat + p.num.neg.toNat * q.den.toNat := by unfold ltQ leQ RatioOrbit.crossEq rw [le_iff_toNat_cf, SignedOrbit.balanced_iff_toNat_eq] simp only [SignedOrbit.mul_pos, SignedOrbit.mul_neg, SignedOrbit.scaleByNat_pos, SignedOrbit.scaleByNat_neg, SignedOrbit.ofOrbit, DistinctionNat.toNat_add, DistinctionNat.toNat_mul] constructor · intro h have hz : DistinctionNat.zero.toNat = 0 := rfl simp only [hz, Nat.mul_zero, Nat.add_zero, Nat.zero_add] at * obtain ⟨h1, h2⟩ := h omega · intro h have hz : DistinctionNat.zero.toNat = 0 := rfl simp only [hz, Nat.mul_zero, Nat.add_zero, Nat.zero_add] at * refine ⟨?_, ?_⟩ · omega · omegaThe proof reduces the ordering of ratios to a comparison of natural numbers. ltQ_iff_toNat · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean