Elm Exactly

Theoremkeys_atPatList

StandardElmMech/Stat/RefuseScope.lean:527, The keys of the value environments of patterns and bindings · term proof

Statement

theorem keys_atPatList : (as : List AAtPat) →
    ∀ f ∈ AAtPat.veList as, KeysIn f (atPatListVars (AAtPat.eraseList as))
  | [] => by simp [AAtPat.veList]
  | a :: as => by
    intro f hf
    simp only [AAtPat.veList, List.mem_cons] at hf
    simp only [AAtPat.eraseList, atPatListVars]
    rcases hf with rfl | hf
    · exact keysIn_mono (keys_atPat a) (by intro x hx; simp [hx])
    · exact keysIn_mono (keys_atPatList as f hf) (by intro x hx; simp [hx])

Proof

Proved by a term, which Lean's kernel checks directly.

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.