Theoremvesound_clos
Statement
theorem vesound_clos {VE : ValEnv} {bs : List (String × Option Nat)} (A : List BVar) (h : VESound VE bs) :
VESound (closVE A VE) bsProof
by
refine ⟨fun x b hx => ?_, fun x n hx => ?_⟩
· unfold closVE at hx
rw [find?_mapV] at hx
cases hv : FMap.find? VE x with
| none => rw [hv] at hx; cases hx
| some b0 =>
rw [hv] at hx; cases hx
obtain ⟨a, ha, hval⟩ := h.1 x b0 hv
exact ⟨a, ha, fun n hn hc => arity_clos (hval n hn hc)⟩
· unfold closVE
rw [find?_mapV]
have := h.2 x n hx
cases hv : FMap.find? VE x with
| none => rw [hv] at this; cases this
| some _ => rflProved 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.