Encyclopedia Delta Delta Kernel Sigma Conditional Ledger Syntactic
ARTICLE 5 claims 4 theorems 1 model
Delta Kernel Sigma Conditional Ledger Syntactic
A machine-checked theorem shows a proof's record of assumptions can be read directly from its syntax, like checking for a banned word.
The syntactic ledger
A ledger, a discrete record of events, in Recognition Science tracks which assumptions a derivation uses. The declaration conditional_ledger_syntactic proves that this record is always computable from the derivation's syntax alone, without running the checking algorithm. The theorem states that if the checker accepts a derivation and assigns it a ledger, that ledger equals the result of a simple structural scan of the derivation tree. This scan, called scanLedger, folds over the tree, ignoring contexts and conclusions, and only looks at the constructors used.
The scan works because the language restricts how assumptions enter a proof. The only constructors that can add to the ledger are the three posit nodes and the induction node on a quantified formula. A posit node marks an assumption; an induction node on a quantified formula marks a higher tier of reasoning. Everything else just merges the ledgers of its children. So the scan is a syntactic occurrence check, like grepping a text file for a forbidden word. The theorem scan_eq_check guarantees the scan agrees with the checker on every accepted derivation, making the ledger tamper-evident: no routing of rules can hide a posit, and no arrangement of posits can fake one.
This result has a practical consequence for auditing. A third party can verify that a derivation is FORCED, meaning it uses no assumptions, by walking the tree and checking that no posit symbol appears. The theorem forced_iff_positFree states this equivalence directly. Similarly, the induction tier is a syntactic occurrence check via usesFullInd_eq_scan_indFull. A FORCED verdict in the quantifier-free induction tier is therefore a pure syntactic fact, auditable with no knowledge of the checker's implementation.
In Recognition Science, this is the oracle-symbol refactor: the posits are syntactic symbols already, because a derivation is plain data. The theorem conditional_ledger_syntactic extends this to conditional proofs, where the ledger is not empty. It shows that even a conditional sigma-grade is grep-auditable. What this does not claim is that the scan itself determines whether a derivation is valid; it only describes the ledger of an accepted derivation. The checker's acceptance remains a separate semantic fact.
THEOREM conditional_ledger_syntactic · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- The checker's ledger on any accepted derivation is computable without
running the checker: `Conditional` σ-grades are grep-auditable too. -/
theorem conditional_ledger_syntactic {Γ : Ctx} {d : Deriv} {φ : DFormula}
{O : Ledger} (h : Conditional Γ d φ O) : O = scanLedger d :=
scan_eq_check h
MODEL scanLedger · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- The syntactic σ-scan: compute the ledger by folding over the derivation
TREE, ignoring contexts and conclusions entirely. Posit constructors
contribute their posit; an induction node on a quantified formula contributes
the FULL-IND tier flag; everything else merges its children. -/
def scanLedger : Deriv → Ledger
| .hyp _ => .empty
| .eqRefl _ => .empty
| .eqSubst _ _ _ dEq dT => (scanLedger dEq).union (scanLedger dT)
| .succNeZero _ => .empty
| .succInj d => scanLedger d
| .addZero _ => .empty
| .addSucc _ _ => .empty
| .mulZero _ => .empty
| .mulSucc _ _ => .empty
| .ind φ d₀ dS =>
if φ.isQF then (scanLedger d₀).union (scanLedger dS)
else ((scanLedger d₀).union (scanLedger dS)).union .ofIndFull
| .implIntro _ d => scanLedger d
| .implElim d₁ d₂ => (scanLedger d₁).union (scanLedger d₂)
| .conjIntro d₁ d₂ => (scanLedger d₁).union (scanLedger d₂)
| .conjElim1 d => scanLedger d
| .conjElim2 d => scanLedger d
| .disjIntro1 _ d => scanLedger d
| .disjIntro2 _ d => scanLedger d
| .disjElim d dL dR => ((scanLedger d).union (scanLedger dL)).union (scanLedger dR)
| .flsElim _ d => scanLedger d
| .allIntro d => scanLedger d
| .allElim _ d => scanLedger d
| .exIntro _ _ d => scanLedger d
| .exElim _ d dBody => (scanLedger d).union (scanLedger dBody)
| .emPosit _ => .ofEM
| .lpoPosit _ => .ofLPO
| .mpPosit _ => .ofMP
THEOREM scan_eq_check · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- AGREEMENT: on every derivation the checker accepts, the checker's
threaded ledger is EXACTLY the syntactic σ-scan of the tree. So the σ-grade
of a checked judgment is an oracle-symbol occurrence fact about the
derivation data, not an artifact of the checking algorithm: the ledger is
tamper-evident. -/
theorem scan_eq_check {d : Deriv} :
∀ {Γ : Ctx} {φ : DFormula} {O : Ledger},
check Γ d = some (φ, O) → O = scanLedger d := by
induction d with
| hyp i =>
intro Γ φ O hchk
simp only [check] at hchk
cases hg : Γ[i]? with
| none => simp [hg] at hchk
| some ψ =>
simp only [hg, Option.some.injEq, Prod.mk.injEq] at hchk
exact hchk.2.symm
| eqRefl t =>
intro Γ φ O hchk
simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk
exact hchk.2.symm
| eqSubst hole t s dEq dT ihEq ihT =>
intro Γ φ O hchk
simp only [check] at hchk
cases hdE : check Γ dEq with
| none => simp [hdE] at hchk
| some cpE =>
obtain ⟨cEq, o₁⟩ := cpE
cases hdT : check Γ dT with
| none => simp [hdE, hdT] at hchk
| some cpT =>
obtain ⟨cT, o₂⟩ := cpT
simp only [hdE, hdT] at hchk
split at hchk
· split at hchk
· simp only [Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ihEq hdE, ihT hdT] at hO
exact hO.symm
· nomatch hchk
· nomatch hchk
| succNeZero t =>
intro Γ φ O hchk
simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk
exact hchk.2.symm
| succInj d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
cases c with
| eq a b =>
cases a with
| succ ta =>
cases b with
| succ tb =>
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| var _ => simp [hd] at hchk
| zero => simp [hd] at hchk
| add _ _ => simp [hd] at hchk
| mul _ _ => simp [hd] at hchk
| var _ => simp [hd] at hchk
| zero => simp [hd] at hchk
| add _ _ => simp [hd] at hchk
| mul _ _ => simp [hd] at hchk
| fls => simp [hd] at hchk
| conj _ _ => simp [hd] at hchk
| disj _ _ => simp [hd] at hchk
| impl _ _ => simp [hd] at hchk
| all _ => simp [hd] at hchk
| ex _ => simp [hd] at hchk
| addZero t =>
intro Γ φ O hchk
simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk
exact hchk.2.symm
| addSucc t s =>
intro Γ φ O hchk
simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk
exact hchk.2.symm
| mulZero t =>
intro Γ φ O hchk
simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk
exact hchk.2.symm
| mulSucc t s =>
intro Γ φ O hchk
simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk
exact hchk.2.symm
| ind hole d₀ dS ih₀ ihS =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd0 : check Γ d₀ with
| none => simp [hd0] at hchk
| some cp0 =>
obtain ⟨c₀, o₁⟩ := cp0
cases hdS : check Γ dS with
| none => simp [hd0, hdS] at hchk
| some cpS =>
obtain ⟨cS, o₂⟩ := cpS
simp only [hd0, hdS] at hchk
split at hchk
· split at hchk
· simp only [Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih₀ hd0, ihS hdS] at hO
exact hO.symm
· nomatch hchk
· nomatch hchk
| implIntro hole d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check (hole :: Γ) d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| implElim d₁ d₂ ih₁ ih₂ =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd1 : check Γ d₁ with
| none => simp [hd1] at hchk
| some cp1 =>
obtain ⟨c₁, o₁⟩ := cp1
cases hd2 : check Γ d₂ with
| none => simp [hd1, hd2] at hchk
| some cp2 =>
obtain ⟨c₂, o₂⟩ := cp2
cases c₁ with
| impl a b =>
simp only [hd1, hd2] at hchk
split at hchk
· simp only [Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih₁ hd1, ih₂ hd2] at hO
exact hO.symm
· nomatch hchk
| eq _ _ => simp [hd1, hd2] at hchk
| fls => simp [hd1, hd2] at hchk
| conj _ _ => simp [hd1, hd2] at hchk
| disj _ _ => simp [hd1, hd2] at hchk
| all _ => simp [hd1, hd2] at hchk
| ex _ => simp [hd1, hd2] at hchk
| conjIntro d₁ d₂ ih₁ ih₂ =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd1 : check Γ d₁ with
| none => simp [hd1] at hchk
| some cp1 =>
obtain ⟨c₁, o₁⟩ := cp1
cases hd2 : check Γ d₂ with
| none => simp [hd1, hd2] at hchk
| some cp2 =>
obtain ⟨c₂, o₂⟩ := cp2
simp only [hd1, hd2, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih₁ hd1, ih₂ hd2] at hO
exact hO.symm
| conjElim1 d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
cases c with
| conj a b =>
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| eq _ _ => simp [hd] at hchk
| fls => simp [hd] at hchk
| disj _ _ => simp [hd] at hchk
| impl _ _ => simp [hd] at hchk
| all _ => simp [hd] at hchk
| ex _ => simp [hd] at hchk
| conjElim2 d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
cases c with
| conj a b =>
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| eq _ _ => simp [hd] at hchk
| fls => simp [hd] at hchk
| disj _ _ => simp [hd] at hchk
| impl _ _ => simp [hd] at hchk
| all _ => simp [hd] at hchk
| ex _ => simp [hd] at hchk
| disjIntro1 ψ d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| disjIntro2 ψ d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| disjElim d dL dR ih ihL ihR =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
cases c with
| disj a b =>
simp only [hd] at hchk
cases hdL : check (a :: Γ) dL with
| none => simp [hdL] at hchk
| some cpL =>
obtain ⟨χ₁, o₁⟩ := cpL
cases hdR : check (b :: Γ) dR with
| none => simp [hdL, hdR] at hchk
| some cpR =>
obtain ⟨χ₂, o₂⟩ := cpR
simp only [hdL, hdR] at hchk
split at hchk
· simp only [Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd, ihL hdL, ihR hdR] at hO
exact hO.symm
· nomatch hchk
| eq _ _ => simp [hd] at hchk
| fls => simp [hd] at hchk
| conj _ _ => simp [hd] at hchk
| impl _ _ => simp [hd] at hchk
| all _ => simp [hd] at hchk
| ex _ => simp [hd] at hchk
| flsElim ψ d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
cases c with
| fls =>
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| eq _ _ => simp [hd] at hchk
| conj _ _ => simp [hd] at hchk
| disj _ _ => simp [hd] at hchk
| impl _ _ => simp [hd] at hchk
| all _ => simp [hd] at hchk
| ex _ => simp [hd] at hchk
| allIntro d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check (Γ.map (DFormula.lift 1 0)) d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| allElim t d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
cases c with
| all a =>
simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
| eq _ _ => simp [hd] at hchk
| fls => simp [hd] at hchk
| conj _ _ => simp [hd] at hchk
| disj _ _ => simp [hd] at hchk
| impl _ _ => simp [hd] at hchk
| ex _ => simp [hd] at hchk
| exIntro ψ t d ih =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
simp only [hd] at hchk
split at hchk
· simp only [Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd] at hO
exact hO.symm
· nomatch hchk
| exElim ψ d dBody ih ihBody =>
intro Γ φ O hchk
simp only [check] at hchk
cases hd : check Γ d with
| none => simp [hd] at hchk
| some cp =>
obtain ⟨c, o⟩ := cp
cases c with
| ex a =>
simp only [hd] at hchk
cases hdB : check (a :: Γ.map (DFormula.lift 1 0)) dBody with
| none => simp [hdB] at hchk
| some cpB =>
obtain ⟨χ, o₂⟩ := cpB
simp only [hdB] at hchk
split at hchk
· simp only [Option.some.injEq, Prod.mk.injEq] at hchk
obtain ⟨_, hO⟩ := hchk
rw [ih hd, ihBody hdB] at hO
exact hO.symm
-- … truncated for the page; open the module for the rest.
THEOREM forced_iff_positFree · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- A checked derivation is FORCED iff its tree contains NO posit symbol.
Left to right is the tamper-evidence direction: a σ0 certificate implies the
grep-level audit passes. Right to left says the checker never invents posits. -/
theorem forced_iff_positFree {Γ : Ctx} {d : Deriv} {φ : DFormula} {O : Ledger}
(h : check Γ d = some (φ, O)) :
O.isForced = true ↔ positFree d = true := by
rw [scan_eq_check h, positFree_eq_scan_isForced]
THEOREM forced_syntactic_audit · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- A FORCED verdict (empty ledger) implies the tree is posit-free AND stayed
in the QF induction tier: the `σ0 @ QF-IND` certificate is a pure syntactic
occurrence fact, auditable by tree-walk with no knowledge of the checker. -/
theorem forced_syntactic_audit {Γ : Ctx} {d : Deriv} {φ : DFormula}
(h : Forced Γ d φ) :
positFree d = true ∧ usesFullInd d = false := by
have hscan : Ledger.empty = scanLedger d := scan_eq_check h
constructor
· rw [positFree_eq_scan_isForced, ← hscan]; rfl
· rw [usesFullInd_eq_scan_indFull, ← hscan]; rfl
What this page does not claim
The scan does not determine whether a derivation is valid; it only describes the ledger of an accepted derivation. The theorem does not claim that the checker's acceptance is itself a syntactic property. The result does not address derivations that the checker rejects.
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/DeltaKernel/Sigma.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 syntactic scan handle derivations that use the induction node on a non-quantified formula?
- What is the exact definition of the ledger union operation that merges child ledgers?
- Can the syntactic audit be extended to check other properties of a derivation beyond posit freedom and induction tier?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM conditional_ledger_syntactic · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- The checker's ledger on any accepted derivation is computable without running the checker: `Conditional` σ-grades are grep-auditable too. -/ theorem conditional_ledger_syntactic {Γ : Ctx} {d : Deriv} {φ : DFormula} {O : Ledger} (h : Conditional Γ d φ O) : O = scanLedger d := scan_eq_check hThe theorem states that if the checker accepts a derivation and assigns it a ledger, that ledger equals the result of a simple structural scan of the derivation tree. conditional_ledger_syntactic · IndisputableMonolith/DeltaKernel/Sigma.leanMODEL scanLedger · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- The syntactic σ-scan: compute the ledger by folding over the derivation TREE, ignoring contexts and conclusions entirely. Posit constructors contribute their posit; an induction node on a quantified formula contributes the FULL-IND tier flag; everything else merges its children. -/ def scanLedger : Deriv → Ledger | .hyp _ => .empty | .eqRefl _ => .empty | .eqSubst _ _ _ dEq dT => (scanLedger dEq).union (scanLedger dT) | .succNeZero _ => .empty | .succInj d => scanLedger d | .addZero _ => .empty | .addSucc _ _ => .empty | .mulZero _ => .empty | .mulSucc _ _ => .empty | .ind φ d₀ dS => if φ.isQF then (scanLedger d₀).union (scanLedger dS) else ((scanLedger d₀).union (scanLedger dS)).union .ofIndFull | .implIntro _ d => scanLedger d | .implElim d₁ d₂ => (scanLedger d₁).union (scanLedger d₂) | .conjIntro d₁ d₂ => (scanLedger d₁).union (scanLedger d₂) | .conjElim1 d => scanLedger d | .conjElim2 d => scanLedger d | .disjIntro1 _ d => scanLedger d | .disjIntro2 _ d => scanLedger d | .disjElim d dL dR => ((scanLedger d).union (scanLedger dL)).union (scanLedger dR) | .flsElim _ d => scanLedger d | .allIntro d => scanLedger d | .allElim _ d => scanLedger d | .exIntro _ _ d => scanLedger d | .exElim _ d dBody => (scanLedger d).union (scanLedger dBody) | .emPosit _ => .ofEM | .lpoPosit _ => .ofLPO | .mpPosit _ => .ofMPThe only constructors that can add to the ledger are the three posit nodes and the induction node on a quantified formula. scanLedger · IndisputableMonolith/DeltaKernel/Sigma.leanTHEOREM scan_eq_check · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- AGREEMENT: on every derivation the checker accepts, the checker's threaded ledger is EXACTLY the syntactic σ-scan of the tree. So the σ-grade of a checked judgment is an oracle-symbol occurrence fact about the derivation data, not an artifact of the checking algorithm: the ledger is tamper-evident. -/ theorem scan_eq_check {d : Deriv} : ∀ {Γ : Ctx} {φ : DFormula} {O : Ledger}, check Γ d = some (φ, O) → O = scanLedger d := by induction d with | hyp i => intro Γ φ O hchk simp only [check] at hchk cases hg : Γ[i]? with | none => simp [hg] at hchk | some ψ => simp only [hg, Option.some.injEq, Prod.mk.injEq] at hchk exact hchk.2.symm | eqRefl t => intro Γ φ O hchk simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk exact hchk.2.symm | eqSubst hole t s dEq dT ihEq ihT => intro Γ φ O hchk simp only [check] at hchk cases hdE : check Γ dEq with | none => simp [hdE] at hchk | some cpE => obtain ⟨cEq, o₁⟩ := cpE cases hdT : check Γ dT with | none => simp [hdE, hdT] at hchk | some cpT => obtain ⟨cT, o₂⟩ := cpT simp only [hdE, hdT] at hchk split at hchk · split at hchk · simp only [Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ihEq hdE, ihT hdT] at hO exact hO.symm · nomatch hchk · nomatch hchk | succNeZero t => intro Γ φ O hchk simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk exact hchk.2.symm | succInj d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp cases c with | eq a b => cases a with | succ ta => cases b with | succ tb => simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | var _ => simp [hd] at hchk | zero => simp [hd] at hchk | add _ _ => simp [hd] at hchk | mul _ _ => simp [hd] at hchk | var _ => simp [hd] at hchk | zero => simp [hd] at hchk | add _ _ => simp [hd] at hchk | mul _ _ => simp [hd] at hchk | fls => simp [hd] at hchk | conj _ _ => simp [hd] at hchk | disj _ _ => simp [hd] at hchk | impl _ _ => simp [hd] at hchk | all _ => simp [hd] at hchk | ex _ => simp [hd] at hchk | addZero t => intro Γ φ O hchk simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk exact hchk.2.symm | addSucc t s => intro Γ φ O hchk simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk exact hchk.2.symm | mulZero t => intro Γ φ O hchk simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk exact hchk.2.symm | mulSucc t s => intro Γ φ O hchk simp only [check, Option.some.injEq, Prod.mk.injEq] at hchk exact hchk.2.symm | ind hole d₀ dS ih₀ ihS => intro Γ φ O hchk simp only [check] at hchk cases hd0 : check Γ d₀ with | none => simp [hd0] at hchk | some cp0 => obtain ⟨c₀, o₁⟩ := cp0 cases hdS : check Γ dS with | none => simp [hd0, hdS] at hchk | some cpS => obtain ⟨cS, o₂⟩ := cpS simp only [hd0, hdS] at hchk split at hchk · split at hchk · simp only [Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih₀ hd0, ihS hdS] at hO exact hO.symm · nomatch hchk · nomatch hchk | implIntro hole d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check (hole :: Γ) d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | implElim d₁ d₂ ih₁ ih₂ => intro Γ φ O hchk simp only [check] at hchk cases hd1 : check Γ d₁ with | none => simp [hd1] at hchk | some cp1 => obtain ⟨c₁, o₁⟩ := cp1 cases hd2 : check Γ d₂ with | none => simp [hd1, hd2] at hchk | some cp2 => obtain ⟨c₂, o₂⟩ := cp2 cases c₁ with | impl a b => simp only [hd1, hd2] at hchk split at hchk · simp only [Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih₁ hd1, ih₂ hd2] at hO exact hO.symm · nomatch hchk | eq _ _ => simp [hd1, hd2] at hchk | fls => simp [hd1, hd2] at hchk | conj _ _ => simp [hd1, hd2] at hchk | disj _ _ => simp [hd1, hd2] at hchk | all _ => simp [hd1, hd2] at hchk | ex _ => simp [hd1, hd2] at hchk | conjIntro d₁ d₂ ih₁ ih₂ => intro Γ φ O hchk simp only [check] at hchk cases hd1 : check Γ d₁ with | none => simp [hd1] at hchk | some cp1 => obtain ⟨c₁, o₁⟩ := cp1 cases hd2 : check Γ d₂ with | none => simp [hd1, hd2] at hchk | some cp2 => obtain ⟨c₂, o₂⟩ := cp2 simp only [hd1, hd2, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih₁ hd1, ih₂ hd2] at hO exact hO.symm | conjElim1 d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp cases c with | conj a b => simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | eq _ _ => simp [hd] at hchk | fls => simp [hd] at hchk | disj _ _ => simp [hd] at hchk | impl _ _ => simp [hd] at hchk | all _ => simp [hd] at hchk | ex _ => simp [hd] at hchk | conjElim2 d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp cases c with | conj a b => simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | eq _ _ => simp [hd] at hchk | fls => simp [hd] at hchk | disj _ _ => simp [hd] at hchk | impl _ _ => simp [hd] at hchk | all _ => simp [hd] at hchk | ex _ => simp [hd] at hchk | disjIntro1 ψ d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | disjIntro2 ψ d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | disjElim d dL dR ih ihL ihR => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp cases c with | disj a b => simp only [hd] at hchk cases hdL : check (a :: Γ) dL with | none => simp [hdL] at hchk | some cpL => obtain ⟨χ₁, o₁⟩ := cpL cases hdR : check (b :: Γ) dR with | none => simp [hdL, hdR] at hchk | some cpR => obtain ⟨χ₂, o₂⟩ := cpR simp only [hdL, hdR] at hchk split at hchk · simp only [Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd, ihL hdL, ihR hdR] at hO exact hO.symm · nomatch hchk | eq _ _ => simp [hd] at hchk | fls => simp [hd] at hchk | conj _ _ => simp [hd] at hchk | impl _ _ => simp [hd] at hchk | all _ => simp [hd] at hchk | ex _ => simp [hd] at hchk | flsElim ψ d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp cases c with | fls => simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | eq _ _ => simp [hd] at hchk | conj _ _ => simp [hd] at hchk | disj _ _ => simp [hd] at hchk | impl _ _ => simp [hd] at hchk | all _ => simp [hd] at hchk | ex _ => simp [hd] at hchk | allIntro d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check (Γ.map (DFormula.lift 1 0)) d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | allElim t d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp cases c with | all a => simp only [hd, Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm | eq _ _ => simp [hd] at hchk | fls => simp [hd] at hchk | conj _ _ => simp [hd] at hchk | disj _ _ => simp [hd] at hchk | impl _ _ => simp [hd] at hchk | ex _ => simp [hd] at hchk | exIntro ψ t d ih => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp simp only [hd] at hchk split at hchk · simp only [Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd] at hO exact hO.symm · nomatch hchk | exElim ψ d dBody ih ihBody => intro Γ φ O hchk simp only [check] at hchk cases hd : check Γ d with | none => simp [hd] at hchk | some cp => obtain ⟨c, o⟩ := cp cases c with | ex a => simp only [hd] at hchk cases hdB : check (a :: Γ.map (DFormula.lift 1 0)) dBody with | none => simp [hdB] at hchk | some cpB => obtain ⟨χ, o₂⟩ := cpB simp only [hdB] at hchk split at hchk · simp only [Option.some.injEq, Prod.mk.injEq] at hchk obtain ⟨_, hO⟩ := hchk rw [ih hd, ihBody hdB] at hO exact hO.symm -- … truncated for the page; open the module for the rest.The theorem scan_eq_check guarantees the scan agrees with the checker on every accepted derivation, making the ledger tamper-evident. scan_eq_check · IndisputableMonolith/DeltaKernel/Sigma.leanTHEOREM forced_iff_positFree · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- A checked derivation is FORCED iff its tree contains NO posit symbol. Left to right is the tamper-evidence direction: a σ0 certificate implies the grep-level audit passes. Right to left says the checker never invents posits. -/ theorem forced_iff_positFree {Γ : Ctx} {d : Deriv} {φ : DFormula} {O : Ledger} (h : check Γ d = some (φ, O)) : O.isForced = true ↔ positFree d = true := by rw [scan_eq_check h, positFree_eq_scan_isForced]A third party can verify that a derivation is FORCED, meaning it uses no assumptions, by walking the tree and checking that no posit symbol appears. forced_iff_positFree · IndisputableMonolith/DeltaKernel/Sigma.leanTHEOREM forced_syntactic_audit · IndisputableMonolith/DeltaKernel/Sigma.lean
/-- A FORCED verdict (empty ledger) implies the tree is posit-free AND stayed in the QF induction tier: the `σ0 @ QF-IND` certificate is a pure syntactic occurrence fact, auditable by tree-walk with no knowledge of the checker. -/ theorem forced_syntactic_audit {Γ : Ctx} {d : Deriv} {φ : DFormula} (h : Forced Γ d φ) : positFree d = true ∧ usesFullInd d = false := by have hscan : Ledger.empty = scanLedger d := scan_eq_check h constructor · rw [positFree_eq_scan_isForced, ← hscan]; rfl · rw [usesFullInd_eq_scan_indFull, ← hscan]; rflA FORCED verdict in the quantifier-free induction tier is therefore a pure syntactic fact, auditable with no knowledge of the checker's implementation. forced_syntactic_audit · IndisputableMonolith/DeltaKernel/Sigma.lean