Documentation

LeanPool.OrderMaintenance.Impl.PeakInit

Theorem W, option (A), stage A2: the peak of the construction of a core #

Nothing here is used by Theorems A and B.

theorem OrderMaintenance.Impl.PK.prepSetV {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} {Γ : Machine.Reg → ℕ} {h b t : Exp} {vh vb vt : ℕ} (hG : Gd K KH κ Γ s L) (hv : evList κ s L [h, b, t] = some [vh, vb, vt]) (hpk : pkList κ s L [h, b, t] < 2 ^ W) (h1 : vh < 2 ^ K) (h2 : vb < 2 ^ K) (h3 : vt < 2 ^ K) :
PK K KH κ Γ W (Stm.prepSet h b t) s L

prepSet with known values below 2^K.

theorem OrderMaintenance.Impl.isPre_vals {κ : Caps} {s s1 : Model.Core} {L L1 : Loc} {n : ℕ} {pr : Model.Prep} (h : evalF κ isPre s L = Res.ok s1 L1 n) (hp : s.prep = some pr) :
L1 "h" = pr.h ∧ L1 "tg" = pr.tag ∧ L1 "c" = pr.chunk ∧ L1 "bl" = pr.below ∧ s1.prep = s.prep
theorem OrderMaintenance.Impl.initStep_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hG : Gd K KH κ (ΓK K) s L) (htag : ∀ (pr : Model.Prep), s.prep = some pr → pr.h ≤ s.P.H → pr.tag < 2 ^ ((pr.h - 1) * s.P.beta) ∧ 1 ≤ pr.h) (hb1 : 1 ≤ s.P.beta) :
PK K KH κ (ΓK K) W initStepP.body s L

One stage of the chain (initStep), given the stage invariant on the tag.

theorem OrderMaintenance.Impl.PK.wr_centre {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) {Γ : Machine.Reg → ℕ} {f : Fld} {i : Exp} {k : PF} (hG : Gd K KH κ Γ s L) (hi : Exp.OK Γ K KH W i) (hk1 : 1 ≤ PF.get s.P k) (hkK : PF.get s.P k ≤ K) (hf : Fld.wd K KH f = K) :
PK K KH κ Γ W (Stm.wr f i (Exp.bin Machine.BinOp.shl 1 (Exp.prm k - 1))) s L

A write of the centre label 2^(B − 1) (B a parameter, 1 ≤ B ≤ K).

theorem OrderMaintenance.Impl.initElt_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hG : Gd K KH κ (ΓK K) s L) :
PK K KH κ (ΓK K) W initEltS s L
theorem OrderMaintenance.Impl.initGrp_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hG : Gd K KH κ (ΓK K) s L) :
PK K KH κ (ΓK K) W initGrpS s L
theorem OrderMaintenance.Impl.initState_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hG : Gd K KH κ (ΓK K) s L) :
PK K KH κ (ΓK K) W initStateS s L

The initial state of a core.

theorem OrderMaintenance.Impl.initLoop_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (I : ℕ → Model.Core → Prop) (h0 : I 0 s) (hstep : ∀ (j : ℕ) (t : Model.Core), I j t → j < s.P.H + 1 → ∃ (b : Bool) (t' : Model.Core) (L' : Loc) (n : ℕ), (evalF κ initStepP.body t fun (x : Machine.Reg) => 0) = Res.ok t' L' n ∧ L' "done" = b2n b ∧ (b = false → I (j + 1) t') ∧ ((Gd K KH κ (ΓK K) t fun (x : Machine.Reg) => 0) → PKok K KH κ (ΓK K) W initStepP.body t fun (x : Machine.Reg) => 0)) (hG : Gd K KH κ (ΓK K) s L) :
PKok K KH κ (ΓK K) W initLoopS s L

The loop of stages, along a Level F invariant I (as in initLoopS_agree).

theorem OrderMaintenance.Impl.initCore_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hG : Gd K KH κ (ΓK K) s L) (hloop : ∀ (s1 : Model.Core) (L1 : Loc), Gd K KH κ (ΓK K) s1 L1 → PKok K KH κ (ΓK K) W initLoopS s1 L1) :
PKok K KH κ (ΓK K) W initCoreS s L

The construction of a core (initCore), lazy (lz = 1) or eager (lz = 0, with the loop of stages).

theorem OrderMaintenance.Impl.prepP_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hG : Gd K KH κ (ΓK K) s L) (hstep : (Gd K KH κ (ΓK K) s fun (x : Machine.Reg) => 0) → PKok K KH κ (ΓK K) W initStepP.body s fun (x : Machine.Reg) => 0) :
PKok K KH κ (ΓK K) W prepP.body s L

A preparation step (prepareStep): one stage when the core is not ready.