Documentation

LeanPool.OrderMaintenance.Impl.ArrayLemmas

M6: array identities for the agreement lemmas #

theorem OrderMaintenance.Impl.Array.modify_modify_same {α : Type} (a : Array α) (i : ℕ) (f g : α → α) :
(a.modify i f).modify i g = a.modify i (g ∘ f)
theorem OrderMaintenance.Impl.Array.modify_push_size {α : Type} (a : Array α) (x : α) (f : α → α) :
(a.push x).modify a.size f = a.push (f x)
theorem OrderMaintenance.Impl.Array.modify_congr_getX {α : Type} [Inhabited α] (a : Array α) (i : ℕ) (f g : α → α) (h : f (a.getX i) = g (a.getX i)) :
a.modify i f = a.modify i g

Two updates of cell i agree if they agree on its current value.

Evaluate a core-language program symbolically (with extra facts).

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem OrderMaintenance.Impl.Array.set!_eq_modify {α : Type} (a : Array α) (i : ℕ) (v : α) :
    a.set! i v = a.modify i fun (x : α) => v

    set! is a modify with a constant.