Elm Exactly

Theoremnot_legal_of_noDeriv

StandardElmMech/Stat/Refusals.lean:53, The refusals · tactic proof

The first module has no derivation.

Statement

theorem not_legal_of_noDeriv {B : SBasis} {sp : SProgram} {m : BModule} {rest : List BModule}
    (hms : (Src.deriveProgram (Src.canonOrder sp)).modules = m :: rest) (h : NoDeriv B m) :
    ¬ LegalProgram B sp

Proof

by
  rintro ⟨_, τ, PE, hel⟩
  rw [hms] at hel
  obtain ⟨m', _, B', E, hc, hd, _, _⟩ := elProgram_inv hel
  cases hc
  obtain ⟨a, he, hck, _, _⟩ := principalModDer_check hd
  rw [h a he] at hck
  cases hck

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.