Encyclopedia Foundation Foundation Primitive Recognition Calculus Integer Rational Negative Flag Eq True
Foundation Primitive Recognition Calculus Integer Rational Negative Flag Eq True
A small machine-checked theorem ties a bookkeeping flag for negative numbers to the ordinary integer comparison it represents.
The sign flag
In the Recognition Science framework, the primitive recognition calculus builds its own integers and rationals from scratch, starting from a discrete record of events called the ledger. Each integer is an orbit of signed positions, and one of the first things the framework needs is a way to ask whether such an integer is negative. The declaration negativeFlag_eq_true_iff_toInt_neg answers exactly that: it proves that the flag marking an integer as negative is true precisely when the integer's value, converted to the ordinary integers, is less than zero.
This is a theorem in the machine-checked library of formal theorems, meaning the equivalence is proved from the definitions, not assumed. The proof is short and direct: the negative flag is defined as the logical negation of the non-negative flag, and the non-negative flag is defined by comparing the integer with zero using the framework's own order. The theorem then closes the loop by showing that this internal comparison agrees with the standard sign of the integer after conversion. In plain terms, the framework's homegrown notion of negativity is not a separate invention; it is the same sign a mathematician already knows.
The declaration is a piece of internal plumbing, but it carries a real consequence. It means that every later theorem which uses the negative flag can be trusted to line up with ordinary arithmetic on the integers. When the framework later reasons about subtraction, reciprocals, or the order of rationals, it can rely on this bridge between its own representation and the familiar number line. The theorem is also a small example of the framework's method: define the object, prove the bridge, then build on it.
What the declaration does not claim is just as important. It does not say that the framework's integers are the same type as the ordinary integers; they are a distinct construction with a conversion map. It does not prove that the conversion is injective or surjective, only that this one sign comparison agrees. And it says nothing about rationals, real numbers, or any of the framework's larger results about cost, the golden ratio, or dimension. It is a narrow, verified fact about one flag and one comparison.
THEOREM instNeg · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/IntegerRational.lean
instance instNeg : Neg PRCInt := ⟨negate⟩
What this page does not claim
The framework's integers are not the same type as the ordinary integers, only connected by a conversion map. The declaration does not prove the conversion is injective or surjective. The declaration says nothing about rationals, reals, or any larger framework result.
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:
- How does the framework define the non-negative flag that the negative flag negates?
- What does the conversion map from the framework's integers to the ordinary integers do to addition and multiplication?
- Which later theorems about subtraction or order rely on this sign bridge?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM instNeg · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/IntegerRational.lean
instance instNeg : Neg PRCInt := ⟨negate⟩the flag marking an integer as negative is true precisely when the integer's value, converted to the ordinary integers, is less than zero instNeg · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/IntegerRational.lean