Documentation

LeanPool.OrderMaintenance.Proof.Top.CopyRest

M5: the completed path copy #

The views of copyRest j H t l: chunks y, z of job j carry x's path on levels l..H, and the range pointers of the nodes on that part of x's path move to y (first) and z (last).

def OrderMaintenance.Proof.Top.cpHit (j : Model.Job) (H : ℕ) (t : TS) (l u : ℕ) :

u is on x's path at a level from l to H.

Equations
Instances For
    theorem OrderMaintenance.Proof.Top.cpHit_iff (j : Model.Job) (H : ℕ) (t : TS) (l u : ℕ) :
    cpHit j H t l u = true ↔ ∃ (i : ℕ), l ≤ i ∧ i ≤ H ∧ u = pth t j.x i
    def OrderMaintenance.Proof.Top.cpFirst (j : Model.Job) (H : ℕ) (t : TS) (l u : ℕ) :

    The first pointer after the copy from level l.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def OrderMaintenance.Proof.Top.cpLast (j : Model.Job) (H : ℕ) (t : TS) (l u : ℕ) :

      The last range pointer after copying the path from the indicated level.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        structure OrderMaintenance.Proof.Top.CopyOK (j : Model.Job) (H : ℕ) (t : TS) (l : ℕ) :

        The copy's hypotheses: three distinct chunks, distinct path nodes, room in the new paths.

        Instances For
          theorem OrderMaintenance.Proof.Top.copyS_views (t : TS) (j : Model.Job) (l : ℕ) (hyz : j.y ≠ j.z) (hv : pth t j.x l < t.nodes.size) :
          (copyS t j l).P = t.P ∧ (copyS t j l).cin = t.cin ∧ (copyS t j l).lpar = t.lpar ∧ (copyS t j l).tag = t.tag ∧ (copyS t j l).nodes.size = t.nodes.size ∧ (∀ (c : ℕ), c ≠ j.y → c ≠ j.z → (copyS t j l).path.getX c = t.path.getX c) ∧ (copyS t j l).path.getX j.y = (t.path.getX j.y).setX l (pth t j.x l) ∧ (copyS t j l).path.getX j.z = (t.path.getX j.z).setX l (pth t j.x l) ∧ ∀ (u : ℕ), nd (copyS t j l) u = have __src := nd t u; { height := __src.height, livePar := __src.livePar, children := __src.children, weight := __src.weight, table := __src.table, inTables := __src.inTables, first := if u = pth t j.x l ∧ (nd t u).first = j.x then j.y else (nd t u).first, last := if u = pth t j.x l ∧ (nd t u).last = j.x then j.z else (nd t u).last, draining := __src.draining, t1 := __src.t1, t2 := __src.t2, side := __src.side, overflowOf := __src.overflowOf, alive := __src.alive }
          theorem OrderMaintenance.Proof.Top.cpHit_succ (j : Model.Job) (H : ℕ) (t : TS) (l u : ℕ) (hl : l ≤ H) :
          cpHit j H t l u = true ↔ u = pth t j.x l ∨ cpHit j H t (l + 1) u = true
          theorem OrderMaintenance.Proof.Top.copyRest_views (j : Model.Job) (H k : ℕ) (t : TS) (l : ℕ) :
          H + 1 - l = k → CopyOK j H t l → (∀ (i : ℕ), l ≤ i → i ≤ H → pth t j.x i < t.nodes.size) → (copyRest j H t l).P = t.P ∧ (copyRest j H t l).cin = t.cin ∧ (copyRest j H t l).lpar = t.lpar ∧ (copyRest j H t l).tag = t.tag ∧ (copyRest j H t l).nodes.size = t.nodes.size ∧ (∀ (c : ℕ), c ≠ j.y → c ≠ j.z → (copyRest j H t l).path.getX c = t.path.getX c) ∧ (∀ (i : ℕ), ((copyRest j H t l).path.getX j.y).getX i = if l ≤ i ∧ i ≤ H then pth t j.x i else (t.path.getX j.y).getX i) ∧ (∀ (i : ℕ), ((copyRest j H t l).path.getX j.z).getX i = if l ≤ i ∧ i ≤ H then pth t j.x i else (t.path.getX j.z).getX i) ∧ ((copyRest j H t l).path.getX j.y).size = (t.path.getX j.y).size ∧ ((copyRest j H t l).path.getX j.z).size = (t.path.getX j.z).size ∧ ∀ (u : ℕ), nd (copyRest j H t l) u = have __src := nd t u; { height := __src.height, livePar := __src.livePar, children := __src.children, weight := __src.weight, table := __src.table, inTables := __src.inTables, first := cpFirst j H t l u, last := cpLast j H t l u, draining := __src.draining, t1 := __src.t1, t2 := __src.t2, side := __src.side, overflowOf := __src.overflowOf, alive := __src.alive }

          The completed copy.