TheoremfmLookup_isSome_mem
Statement
theorem fmLookup_isSome_mem {β : Type} : ∀ (f : List (String × β)) (a : String),
(fmLookup f a).isSome → a ∈ fmDom f
| [], a, h => by simp [fmLookup] at h
| (k, x) :: f, a, h => by
simp only [fmLookup] at h
by_cases hk : k = a
· subst hk; simp [fmDom]
· have hk' : (k == a) = falseProof
by simpa using hk
rw [hk'] at h
have := fmLookup_isSome_mem f a (by simpa using h)
simp only [fmDom, List.map_cons, List.mem_cons]
exact Or.inr thisProved with tactics, which Lean expands into a proof term that its kernel checks.
Used by
In StandardElmMech/Mod/Good.lean: The property of interfaces (Interface.Good): ME0 and the harness have it (ME0_good), a top-level declaration with distinct bound names infers an interface with it (EvalTopDec.good), a header's exposing list keeps it (EvalHeader.good), and so does every interface a module puts in the basis (EvalModule.good).
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.