Elm Exactly

Theoremagrees3

StandardElmMech/Complete.lean:175, Agreement of an oracle with a list of choices (for completeness, Completeness.lean) · tactic proof

Statement

theorem agrees3 {o : Oracle} {k : Nat} {L0 L1 L2 : List Bool} (h : Agrees o k (L0 ++ L1 ++ L2)) :
    Agrees o k L0 ∧ Agrees o (k + L0.length) L1 ∧ Agrees o (k + L0.length + L1.length) L2

Proof

by
  obtain ⟨h01, h2⟩ := agrees_append h
  obtain ⟨h0, h1⟩ := agrees_append h01
  exact ⟨h0, h1, by simpa [Nat.add_assoc] using h2⟩

Proved with tactics, which Lean expands into a proof term that its kernel checks.

Theorems it uses

Used by

In StandardElmMech/Complete.lean: The index of the next choice only grows (evExp_next and the others); Agrees; lemmas for the side conditions.

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.