Theoremnot_legal_of_main
No derivation of the one module gives main a type of Chapter 9.
Statement
theorem not_legal_of_main {B : SBasis} {sp : SProgram} {m : BModule}
(hms : (Src.deriveProgram (Src.canonOrder sp)).modules = [m])
(h : ∀ (a : AModule) B' E, a.erase = m → a.result B = some (B', E) → ¬ MainOK E) :
¬ LegalProgram B spProof
by
rintro ⟨_, τ, PE, hel⟩
rw [hms] at hel
obtain ⟨m', rest, B', E, hc, hd, hmain, _⟩ := elProgram_inv hel
cases hc
obtain ⟨a, he, _, hr, _⟩ := principalModDer_check hd
exact h a B' E he hr (hmain rfl)Proved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
Used by
In StandardElmMech/Stat/Refusals.lean: Refusals (milestone 9d): inversion of Chapter 9's rules, and the lemmas that turn "no derivation checks", "no derivation meets the further restrictions" or "no derivation gives main a Chapter 9 type" into ¬ LegalProgram, with no hypothesis about principality.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.