Theorema25_step
One turn of the loop: forcing at fuel M + 14 comes back to forcing at M + 6.
Statement
theorem a25_step (E1 : Env) (o : Oracle) (M k : Nat) :
(appVal o (M + 14) (cloA25 E1) .unit k).out = (appVal o (M + 6) (cloA25 E1) .unit k).outProof
by
conv => lhs; rw [show M + 14 = (M + 12) + 2 from rfl, cloA25, appVal_wild_out]
simp (config := {decide := true}) only [a25T, evExp, evAtExp, evDec, evValBind, evValBindOpt,
isRecursive, recVE, Env.plusVE, fmPlus, Env.lookup, fmLookup, Env.VE, Env.QE, List.filter_cons,
List.filter_nil, List.map_cons, List.map_nil, List.any_cons, List.any_nil, List.nil_append,
List.cons_append, Bool.or_false, Bool.not_false, ite_true, ite_false,
fmDom, fvValBindRhs, fvValBindRhsOpt, fvExp, fvAtExp, boundAtPat, removeAll,
List.contains_cons, List.contains_nil, List.append_nil]
rw [show M + 10 = (M + 8) + 2 from rfl, appVal_wild]
simp (config := {decide := true}) only [evExp, evAtExp, recVE, Env.plusVE, fmPlus,
Env.lookup, fmLookup, Env.VE, Env.QE, List.filter_cons, List.map_nil,
List.any_nil, List.nil_append, Bool.not_false,
ite_true, List.append_nil]
rw [cloA25, a25T]
generalize appVal o (M + 6) _ Val.unit k = r
rcases r with ⟨out, l, k'⟩
cases out <;> rflProved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
Used by
In StandardElmMech/Mod/A25.lean: A25: the module x = let f _ = x in f () has no meaning (a25_no_value, a25_no_meaning), by the loop of the evaluator forcing x's thunk (a25_loop) and completeness.
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.