Elm Exactly

Theoremmem_tailsOf

StandardElmMech/Checks.lean:356, The log statements · term proof

Statement

theorem mem_tailsOf {α : Type} : ∀ {l t : List α}, t ∈ tailsOf l → ∃ pre, pre ++ t = l
  | [], t, h => by simp [tailsOf] at h; exact ⟨[], by simp [h]⟩
  | a :: l, t, h => by
    simp only [tailsOf, List.mem_cons] at h
    rcases h with h | h
    · exact ⟨[], by simp [h]⟩
    · obtain ⟨pre, hp⟩

Proof

mem_tailsOf h; exact ⟨a :: pre, by simp [hp]⟩

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

Used by

In StandardElmMech/Checks.lean: What a check states (plan decision D9): Expect (structural values) with its decider, the parser of CHECK values, CheckStmt, the log statements EntryPat, LogCheck, ExpChecks with their deciders, regular expressions Rx.

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.