Documentation

LeanPool.OrderMaintenance.Impl.Memory

M6: the memory of a core #

The arrays of a core of capacity N ≥ 64 (all the arrays Enc asks for, with the capacities capsOf (proofParams N)) hold at most 40000 · N cells (core_mem). The large constant comes from the top structure's per-node lists (162 or 322 entries each); the node count is O(N / L).

The cells of all the arrays of a core with capacities κ (the parameters included).

Equations
Instances For
    theorem OrderMaintenance.Impl.memOf_eq (P : Model.Params) :
    memOf (capsOf P) = 5343 + P.N * 37 + cb P * 671 + cb P * P.H + nbMax P * 2596 + P.H * 2
    theorem OrderMaintenance.Impl.div_bound {L : ℕ} (h8 : 8 ≤ L) :
    L * L ≤ 8 * (vth L + 1 - vcm L)

    The chunk bound's divisor is at least L² / 8.

    theorem OrderMaintenance.Impl.pow_ge_lin (k : ℕ) :
    6 ≤ k → 8 * (k + 1) ≤ 2 ^ k
    theorem OrderMaintenance.Impl.pL_small {N : ℕ} (hN : 64 ≤ N) :
    8 * Proof.pL N ≤ N
    theorem OrderMaintenance.Impl.core_mem {N : ℕ} (hN : 64 ≤ N) :

    The memory of a core: at most 40000 · N cells.

    The memory of the reachable states #

    The cells of slot p's arrays in machine state m.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem OrderMaintenance.Impl.Enc.cap_slot {p : ℕ} {κ : Caps} {s : Model.Core} {m : Machine.State} (h : Enc p κ s m) (sl : Slot) :
      m.cap (arr p sl) = capOf κ sl
      theorem OrderMaintenance.Impl.Enc.slotMem_eq {p : ℕ} {κ : Caps} {s : Model.Core} {m : Machine.State} (h : Enc p κ s m) :
      slotMem m p = memOf κ
      theorem OrderMaintenance.Impl.reach_mem {KB : ℕ} {m : Machine.State} {Sp : Spec.State} (hR : Reach KB m Sp) :
      ∃ (om : Model.OrderMaintenance) (p : ℕ), WEnc om m p ∧ slotMem m p ≤ 40000 * om.cur.P.N ∧ ∀ (n : Model.Core), om.nxt = some n → slotMem m (1 - p) ≤ 40000 * n.P.N ∧ n.P.N ≤ 4 * om.cur.P.N

      The memory of a reachable state: the slot of cur holds at most 40000 · N cells, and the slot of nxt (during a rebuild) at most 40000 · N', with N' ≤ 4 · N. (The handle maps are allocated with nextHandle + (N − count) + N' cells, which grows with the number of insertions.)