Documentation

LeanPool.OrderMaintenance.Proof.Word.PeakLeaf

Theorem W, option (A), stage A1: the leaves of the generic lemma from option (B) #

memW_of_enc: a core with WB K (every stored value below 2^K, handles excepted), handles below 2^KH, encoded in a machine state with capacities below 2^K, satisfies MemW K KH κ, the leaf hypothesis of Exp.wd_sound. So option (B)'s theoremW_stored provides the leaves at the start of every core procedure; inside a procedure, each write must keep MemW (stage A2).

theorem OrderMaintenance.Proof.Word.b2n_lt {K : ℕ} (hK : 1 ≤ K) (b : Bool) :
Impl.b2n b < 2 ^ K
theorem OrderMaintenance.Proof.Word.small_lt {K n : ℕ} (hK : 3 ≤ K) (hn : n ≤ 4) :
n < 2 ^ K
theorem OrderMaintenance.Proof.Word.getD_mem {α : Type} {l : List α} {j : ℕ} {d : α} (hj : j < l.length) :
l.getD j d ∈ l
theorem OrderMaintenance.Proof.Word.arrB_getX_of {K : ℕ} {a : Array ℕ} (h : ∀ v ∈ a, v < 2 ^ K) :
ArrB K a
theorem OrderMaintenance.Proof.Word.fld_of_WB {K KH : ℕ} {s : Model.Core} (hW : WB K s) (hK : 3 ≤ K) (hh : ∀ (i : ℕ), (s.E.getX i).h < 2 ^ KH) (f : Impl.Fld) (j : ℕ) :
Impl.Fld.get s j f < 2 ^ Impl.Fld.wd K KH f

The fields of a core with WB.

theorem OrderMaintenance.Proof.Word.lst_of_WB {K : ℕ} {s : Model.Core} (hW : WB K s) (hK : 3 ≤ K) (k : Impl.LK) (i j : ℕ) (hj : j < (Impl.LK.view s i k).length) :
((Impl.LK.view s i k).getD j (0, 0)).1 < 2 ^ K ∧ ((Impl.LK.view s i k).getD j (0, 0)).2 < 2 ^ K

The list entries of a core with WB.

theorem OrderMaintenance.Proof.Word.row_of_WB {K : ℕ} {s : Model.Core} (hW : WB K s) (c j : ℕ) :
(Impl.rowOf s c).getX j < 2 ^ K

The path rows of a core with WB.

theorem OrderMaintenance.Proof.Word.opt_of_WB {K : ℕ} {s : Model.Core} (hW : WB K s) (hK : 3 ≤ K) (o : Impl.OF) :
Impl.OF.get s o < 2 ^ K

The optional records of a core with WB.

theorem OrderMaintenance.Proof.Word.memW_of_enc {K KH : ℕ} {κ : Impl.Caps} {s : Model.Core} {p : ℕ} {m : Machine.State} (h : Impl.Enc p κ s m) (hW : WB K s) (hK : 3 ≤ K) (hh : ∀ (i : ℕ), (s.E.getX i).h < 2 ^ KH) (hT : ∀ (t : Impl.Tbl), κ.tbl t < 2 ^ K) (hpw : κ.pw < 2 ^ K) :
Impl.MemW K KH κ s

The leaves of the generic lemma, from option (B). A core with WB K (and handles below 2^KH) encoded with capacities below 2^K satisfies MemW K KH κ.

theorem OrderMaintenance.Proof.Word.vb_of_WB {K KH : ℕ} {κ : Impl.Caps} {s : Model.Core} (hW : WB K s) (hK : 3 ≤ K) (hh : ∀ (i : ℕ), (s.E.getX i).h < 2 ^ KH) (hR : Impl.PRoom K s.P) :
Impl.VB K KH κ s

The stored values of a core with WB, as the invariant of stage A2 needs them.

theorem OrderMaintenance.Proof.Word.gd_of_WB {K KH : ℕ} {κ : Impl.Caps} {s : Model.Core} {p : ℕ} {m : Machine.State} {Γ : Machine.Reg → ℕ} {L : Impl.Loc} (h : Impl.Enc p κ s m) (hW : WB K s) (hK : 3 ≤ K) (hh : ∀ (i : ℕ), (s.E.getX i).h < 2 ^ KH) (hR : Impl.PRoom K s.P) (hL : ∀ (x : Machine.Reg), L x < 2 ^ Γ x) :
Impl.Gd K KH κ Γ s L

The invariant at the entry of a core procedure, from option (B)'s WB.