TheoreminferProgramFrom_cons
Statement
theorem inferProgramFrom_cons {B : SBasis} {m : BModule} {ms : List BModule} {a : AModule} {B' : SBasis}
{E : Env} (ha : inferModule B m = .ok a) (hr : a.result B = some (B', E)) :
inferProgramFrom B (m :: ms) = (inferProgramFrom (B.plus B') ms).map (a :: ·)Proof
by
rw [inferProgramFrom.eq_2]
simp only [ha, hr, bind, Except.bind, pure, Except.pure]
cases inferProgramFrom (B.plus B') ms <;> rflProved with tactics, which Lean expands into a proof term that its kernel checks.
Used by
In StandardElmMech/Stat/Legal.lean: The master theorems: a program whose inferred derivation checks, meets the further restrictions and gives main a Chapter 9 type is legal, under D11 (legal_of_infer1, legal_of_infer).
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.