Elm Exactly

TheoremnoDeriv_of_ctx

StandardElmMech/Stat/RefuseScope.lean:1074, One module: the shape of a concrete import context · tactic proof

Statement

theorem noDeriv_of_ctx {B : SBasis} {m : BModule} {C : Ctx} {Γ : Shape} (hC : importCtx B m.imports = some C)
    (hA : Abs C Γ) (h : scTopOpt Γ m.body = false) : NoDeriv B m

Proof

by
  intro a he
  have him : a.imports = m.imports := by rw [← he]; rfl
  have hb : a.body.map ATopDec.erase = m.body := by rw [← he]; rfl
  unfold checkModule
  rw [AModule.result_of_ctx (him ▸ hC)]
  unfold AModule.resultIn
  cases hd : checkTopDecOpt C a.body with
  | none => rfl
  | some EP =>
    obtain ⟨E, PE⟩ := EP
    have := sc_topOpt hA hd
    rw [hb, h] at this
    cases this

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

Theorems it uses

Used by

In StandardElmMech/Stat/RefuseScope.lean: Refusals by scope, constructor arity and imports, for one module and for a module after a helper (scopeFailB).

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.