Elm Exactly

TheoremresultIn_check

StandardElmMech/Stat/RefuseTypes.lean:1725, The type of `main` · tactic proof

Statement

theorem resultIn_check {B : SBasis} {C : Ctx} {a : AModule} {B' : SBasis} {E : Env}
    (h : a.resultIn B C = some (B', E)) : ∃ PE, checkTopDecOpt C a.body = some (E, PE)

Proof

by
  unfold AModule.resultIn at h
  split at h
  · cases h
  · rename_i E' PE' hc
    split at h
    · cases h
    · split at h
      · cases h
      · simp only [Option.some.injEq, Prod.mk.injEq] at h
        obtain ⟨_, rfl⟩ := h
        exact ⟨_, hc⟩

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

Used by

In StandardElmMech/Stat/RefuseTypes.lean: Refusals by type expressions (aliases, constructor arguments, annotations, ports) and by the type of main (typesFailB, mainFailB), for every choice of generated names and variable sorts.

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.