Elm Exactly

Theoremnot_legal_of_modsyn_one

StandardElmMech/Stat/RefuseAll.lean:52 · tactic proof

The same for a text of one module that step 8 refuses in its canonical order.

Statement

theorem not_legal_of_modsyn_one {B : SBasis} {sp : SProgram} (h1 : sp.modules.length = 1)
    (h : ¬ Src.ModulesSynOK sp) : ¬ LegalProgram B sp

Proof

by
  rintro ⟨⟨q, hperm, _, hq⟩, _⟩
  obtain ⟨m, hm⟩ : ∃ m, sp.modules = [m] := by
    match hp : sp.modules, h1 with
    | [m], _ => exact ⟨m, rfl⟩
  rw [hm] at hperm
  have hqm : q.modules = [m] := List.perm_singleton.mp hperm
  obtain ⟨_, _, qm⟩ := q
  obtain ⟨_, _, pm⟩ := sp
  simp only at hqm hm
  subst hqm; subst hm
  exact h (modulesSynOK_of_synOK hq)

Proved with tactics, which Lean expands into a proof term that its kernel checks.

Theorems it uses

In StandardElmMech/Stat/RefuseAll.lean: The refusal deciders certify tries, and the refusals of step 8's syntactic restrictions for one-module programs and texts without main.

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.