Theoremfind?_vs
Statement
theorem find?_vs (xs : List String) (x : String) :
FMap.find? (vs xs) x = if x ∈ xs then some none else noneProof
by
induction xs with
| nil => simp [vs]
| cons y ys ih =>
simp only [vs, List.map_cons, FMap.find?] at ih ⊢
rw [ih]
by_cases h : y = x
· subst h; simp
· have h' : ¬ x = y := fun e => h e.symm
simp [h, h']Proved with tactics, which Lean expands into a proof term that its kernel checks.
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.