Elm Exactly

Theoremmem_dedupL

StandardElmMech/Stat/Schemes.lean:184, Explicit type variables (sec:static-core-explicit) · term proof

Statement

theorem mem_dedupL {α : Type} [DecidableEq α] {x : α} : ∀ {l : List α}, x ∈ dedupL l ↔ x ∈ l
  | [] => by simp [dedupL]
  | y :: l => by
    simp only [dedupL, List.mem_cons, List.mem_filter, mem_dedupL, decide_eq_true_eq, ne_eq]
    constructor
    · rintro (h | ⟨h, _⟩)
      · exact .inl h
      · exact .inr h
    · rintro (h | h)
      · exact .inl h
      · by_cases e : x = y
        · exact .inl e
        · exact .inr ⟨h, e⟩

Proof

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

Used by

In StandardElmMech/Stat/Schemes.lean: Type functions, schemes and their canonical form, instances (Gen, genAt), explicit variables (NewFor), closure (closGroup, A93).

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.