Theoremagrees_append
Statement
theorem agrees_append {o : Oracle} {k : Nat} {L1 L2 : List Bool} (h : Agrees o k (L1 ++ L2)) :
Agrees o k L1 ∧ Agrees o (k + L1.length) L2Proof
by
constructor
· intro i hi
have := h i (by simp; omega)
rw [this, List.getElem_append_left hi]
· intro i hi
have := h (L1.length + i) (by simp; omega)
rw [show k + L1.length + i = k + (L1.length + i) by omega, this]
simpProved with tactics, which Lean expands into a proof term that its kernel checks.
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.