ratRel_refl
plain-language theorem explainer
Reflexivity of the cross-multiplication relation on pre-rationals is established directly from the definition. Researchers constructing quotients of LogicInt pairs to obtain a field of fractions would cite this result to complete the Setoid instance. The term proof introduces an arbitrary pre-rational and reduces the goal to an identity that holds by reflexivity of equality.
Claim. Let PreRat be the type of pairs $(n,d)$ with $n,d$ drawn from LogicInt and $d$ nonzero. Let $p.sim q$ hold precisely when $p.num · q.den = q.num · p.den. Then $p.sim p$ for every pre-rational $p$.
background
PreRat is the structure of raw numerator-denominator pairs over LogicInt with the explicit constraint that the denominator is nonzero. The predicate ratRel encodes the standard field-of-fractions equivalence: two pairs are related when their cross products agree. The module RationalsFromLogic builds LogicRat by quotienting PreRat under this relation, using arithmetic already available from the upstream IntegersFromLogic construction.
proof idea
The proof is a one-line term-mode wrapper. It introduces the arbitrary pre-rational p, unfolds the definition of ratRel p p to the equality p.num * p.den = p.num * p.den, and discharges the goal by reflexivity of equality.
why it matters
The lemma supplies the reflexivity component required by the Setoid instance on PreRat, which defines LogicRat as the quotient type. This step equips the logic-native numbers with a field structure and is a prerequisite for later Recognition Science constructions that rely on rational arithmetic, such as the phi-ladder and the derivation of constants in native units.
Switch to Lean above to see the machine-checked source, dependencies, and usage graph.