Encyclopedia Foundation Foundation Bool From Logic To Bool From Bool
ARTICLE 4 claims 4 theorems
Foundation Bool From Logic To Bool From Bool
A small formal bridge shows that the two sides of a logical distinction translate exactly into the two Boolean values, with nothing lost and nothing added.
The Boolean translation
In classical logic, a distinction has two sides and nothing else. The Recognition Science framework's ledger, a discrete record of events, begins with this primitive act of distinguishing: one side is affirm, the other deny. These are not numbers and carry no numeric content; they are only "this side" and "the other side" of one cut. The framework's machine-checked library of formal theorems defines this two-constructor structure as LogicBool.
The declaration toBool_fromBool states a round-trip property: if you take a Boolean value, convert it into the logical side (true becomes affirm, false becomes deny), and then convert it back with the reverse map, you recover exactly the Boolean value you started with. The companion theorem fromBool_toBool states the same round-trip in the other direction. Together they establish that the two logical sides and the two Boolean values are interchangeable: a one-to-one correspondence exists between them, with no information lost in either direction.
This correspondence is not merely asserted but proved. The library proves that affirm and deny are distinct, that the translation maps affirm to true and deny to false, and that the round-trip identities hold for every input. The same library also verifies that the logical operations of not, and, and or translate correctly into their Boolean counterparts, and that equality between logical sides is exactly equality between their Boolean images. These are formal theorems, checked by the machine, not informal claims.
What the declaration does not claim is broader significance. It does not say that Boolean logic is the only possible structure for a ledger, nor that the choice of which side maps to true is forced. The library explicitly considers a swapped map (where affirm maps to false) and rejects it only because it fails to preserve the and-operation, not because it is inconceivable. The declaration also does not claim that this translation is part of the framework's main forcing chain that derives constants like the golden ratio or three spatial dimensions; it is a standalone bridge between a primitive logical distinction and the familiar Boolean values.
THEOREM toBool_fromBool · IndisputableMonolith/Foundation/BoolFromLogic.lean
theorem toBool_fromBool : ∀ b : Bool, toBool (fromBool b) = b := by
intro b; cases b <;> rfl
THEOREM fromBool_toBool · IndisputableMonolith/Foundation/BoolFromLogic.lean
theorem fromBool_toBool : ∀ a : LogicBool, fromBool (toBool a) = a := by
intro a; cases a <;> rfl
THEOREM affirm_ne_deny · IndisputableMonolith/Foundation/BoolFromLogic.lean
/-- **The distinction is real**: the two sides differ. Forced by the
constructor disjointness of the inductive type, which is exactly the
statement that δ cuts something. -/
theorem affirm_ne_deny : affirm ≠ deny := by decide
THEOREM toBool_not · toBool_and · toBool_or · IndisputableMonolith/Foundation/BoolFromLogic.lean
/-- **Recovery (negation)**: the swap of sides is Boolean `not`. -/
theorem toBool_not (a : LogicBool) : toBool (lnot a) = !(toBool a) := by
cases a <;> rfl
/-- **Recovery (conjunction)**: the meet is Boolean `and`. -/
theorem toBool_and (a b : LogicBool) :
toBool (land a b) = (toBool a && toBool b) := by
cases a <;> cases b <;> rfl
/-- **Recovery (disjunction)**: the join is Boolean `or`. -/
theorem toBool_or (a b : LogicBool) :
toBool (lor a b) = (toBool a || toBool b) := by
cases a <;> cases b <;> rfl
What this page does not claim
The declaration does not claim that Boolean logic is the only possible structure for a ledger. The declaration does not claim that the choice of which side maps to true is forced. The declaration does not claim that this translation is part of the framework's main forcing chain that derives constants like the golden ratio or three spatial dimensions.
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/BoolFromLogic.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 primitive act of distinguishing relate to the framework's main forcing chain?
- What role does the round-trip property play in later constructions within the framework?
- Does the framework offer a formal account of what a distinction is, beyond the two-constructor structure?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM toBool_fromBool · IndisputableMonolith/Foundation/BoolFromLogic.lean
theorem toBool_fromBool : ∀ b : Bool, toBool (fromBool b) = b := by intro b; cases b <;> rflThe declaration toBool_fromBool states a round-trip property: converting a Boolean value to a logical side and back recovers the original value. toBool_fromBool · IndisputableMonolith/Foundation/BoolFromLogic.leanTHEOREM fromBool_toBool · IndisputableMonolith/Foundation/BoolFromLogic.lean
theorem fromBool_toBool : ∀ a : LogicBool, fromBool (toBool a) = a := by intro a; cases a <;> rflThe companion theorem fromBool_toBool states the same round-trip in the other direction. fromBool_toBool · IndisputableMonolith/Foundation/BoolFromLogic.leanTHEOREM affirm_ne_deny · IndisputableMonolith/Foundation/BoolFromLogic.lean
/-- **The distinction is real**: the two sides differ. Forced by the constructor disjointness of the inductive type, which is exactly the statement that δ cuts something. -/ theorem affirm_ne_deny : affirm ≠ deny := by decideThe library proves that affirm and deny are distinct. affirm_ne_deny · IndisputableMonolith/Foundation/BoolFromLogic.leanTHEOREM toBool_not · toBool_and · toBool_or · IndisputableMonolith/Foundation/BoolFromLogic.lean
/-- **Recovery (negation)**: the swap of sides is Boolean `not`. -/ theorem toBool_not (a : LogicBool) : toBool (lnot a) = !(toBool a) := by cases a <;> rfl/-- **Recovery (conjunction)**: the meet is Boolean `and`. -/ theorem toBool_and (a b : LogicBool) : toBool (land a b) = (toBool a && toBool b) := by cases a <;> cases b <;> rfl/-- **Recovery (disjunction)**: the join is Boolean `or`. -/ theorem toBool_or (a b : LogicBool) : toBool (lor a b) = (toBool a || toBool b) := by cases a <;> cases b <;> rflThe library verifies that the logical operations of not, and, and or translate correctly into their Boolean counterparts. toBool_not · toBool_and · toBool_or · IndisputableMonolith/Foundation/BoolFromLogic.lean