pith. machine review for the scientific record. sign in
abbrev

LogicInt

definition
show as:
view math explainer →
module
IndisputableMonolith.NumberTheory.LogicLedgerInterop
domain
NumberTheory
line
18 · github
papers citing
none yet

open explainer

Generate a durable explainer page for this declaration.

open lean source

IndisputableMonolith.NumberTheory.LogicLedgerInterop on GitHub at line 18.

browse module

All declarations in this module, on Recognition.

explainer page

Tracked in the explainer inventory; generation is lazy so crawlers do not trigger LLM jobs.

open explainer

depends on

used by

formal source

  15
  16open FinitePhaseCompleteness
  17
  18abbrev LogicInt := Foundation.IntegersFromLogic.LogicInt
  19abbrev logicIntToInt : LogicInt → Int := Foundation.IntegersFromLogic.LogicInt.toInt
  20
  21/-- A recovered integer ledger is non-identity when its `Int` recovery is
  22positive and not equal to one. -/
  23structure LogicIntNonIdentityReciprocal (z : LogicInt) : Prop where
  24  pos : 0 < logicIntToInt z
  25  nonidentity : logicIntToInt z ≠ 1
  26  reciprocal_budget : ∃ N : ℕ, 0 < N ∧ Int.natAbs (logicIntToInt z) ∣ N ^ 2
  27
  28/-- Positive recovered integers yield positive natural carriers. -/
  29theorem natAbs_pos_of_logicInt_pos
  30    {z : LogicInt}
  31    (hz : 0 < logicIntToInt z) :
  32    0 < Int.natAbs (logicIntToInt z) := by
  33  exact Int.natAbs_pos.mpr (ne_of_gt hz)
  34
  35/-- Convert a non-identity recovered integer ledger into the Nat-level
  36reciprocal ledger used by finite phase completeness. -/
  37def reciprocalIntegerLedger_of_logicInt
  38    {z : LogicInt}
  39    (h : LogicIntNonIdentityReciprocal z) :
  40    ReciprocalIntegerLedger where
  41  carrier := Int.natAbs (logicIntToInt z)
  42  carrier_pos := natAbs_pos_of_logicInt_pos h.pos
  43  nonidentity := by
  44    intro hcarrier
  45    have h_toInt_abs : Int.natAbs (logicIntToInt z) = 1 := hcarrier
  46    have h_toInt : logicIntToInt z = 1 := by
  47      have habs_cast : (Int.natAbs (logicIntToInt z) : Int) = 1 := by
  48        exact_mod_cast h_toInt_abs