Parts of the background work #
Closing Lemma C3's undriven counts; the inserted element stays in its chunk through the group phase; the chunk count through the chunk drive.
theorem
OrderMaintenance.Proof.cmoveL_qsame
{s : Model.Core}
{x : ℕ}
{u labs : List ℕ}
(hxy : x ≠ cLl s x)
(hx : x < s.C.size)
(hy : cLl s x < s.C.size)
(hxs : cSt s x = Model.St.splitting)
(hys : cSt s (cLl s x) = Model.St.overflow)
:
QSame s (cmoveLState s x u labs)
theorem
OrderMaintenance.Proof.cmoveR_qsame
{s : Model.Core}
{x : ℕ}
{u labs : List ℕ}
(hxz : x ≠ cRr s x)
(hx : x < s.C.size)
(hz : cRr s x < s.C.size)
(hxs : cSt s x = Model.St.splitting)
(hzs : cSt s (cRr s x) = Model.St.overflow)
:
QSame s (cmoveRState s x u labs)
theorem
OrderMaintenance.Proof.cxsteps_count
{X Y : Model.Core → Prop}
{L : List ℕ}
{δ δu s₀ : ℕ → ℕ}
{x : ℕ}
(h : CXSteps X Y L δ δu s₀ x)
:
The chunk count through the chunk drive.
theorem
OrderMaintenance.Proof.driveChunk_run_split
{t : Model.Core}
{c : ℕ}
(h : cSt t c = Model.St.splitting)
:
theorem
OrderMaintenance.Proof.driveChunk_run_ovf
{t : Model.Core}
{c : ℕ}
(h : cSt t c = Model.St.overflow)
:
theorem
OrderMaintenance.Proof.driveChunk_run_quiet
{t : Model.Core}
{c : ℕ}
(h : cSt t c = Model.St.quiet)
:
theorem
OrderMaintenance.Proof.CPost.reservation_invariant
{TI : Model.Core → Prop}
{μ : Model.Core → ℕ}
{J k n R : ℕ}
{cap : Model.Params → ℕ}
{L : List ℕ}
{s₀ : ℕ → ℕ}
{s0 s2 s3 t4 : Model.Core}
{g c : ℕ}
(hCP : CPost L s₀ s3 t4)
(hTC : TopContract TI μ J cap)
(hPost : InsPost TI k J n R μ L s0 g c s2)
(hD : DFrame s2 t4)
:
ResInv TI k J n R μ L t4 0 t4
The chunk phase's lower invariant and frame initialize the common reservation invariant.
theorem
OrderMaintenance.Proof.driveChunk_ok
{t : Model.Core}
{A : Abs}
{L : List ℕ}
{gh : GGh}
{s₀ δu e : ℕ → ℕ}
{pops c : ℕ}
(hI : INV t A)
(hel : A.elist = L)
(hG : GInv t L gh fun (x : ℕ) => 0)
(hC : CInv t L (δ1 c) δu s₀)
(hLX : LX s₀ (δ1 c) δu t)
(hN : CountInv t e pops)
(hGP : GParams t.P)
(hCP : CParams t.P)
(hcL : LiveC t c)
(hcnd : cSt t c ≠ Model.St.dead)
(hcsz : 1 ≤ cSz t c)
:
∃ (t4 : Model.Core), EStateM.run (Model.driveChunk c) t = EStateM.Result.ok () t4 ∧ CPost L s₀ t t4
The chunk phase after an insertion into chunk c.