Documentation

LeanPool.OrderMaintenance.Impl.Params

M6: computing a new core's parameters #

paramsS q computes proofParams N from N (local nN) in a constant number of steps, stores it in slot q's parameter array, and leaves the capacities of capsOf (proofParams N) in the locals kE … kW (CapLocs). msb gives ⌊log₂ N⌋; the truncating subtractions of proofParams become branch-free products with comparisons.

a - b, truncated at 0, without a failing subtraction: a·[b ≤ a] - b·[b ≤ a].

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    The parameters as expressions in L and N #

    RAM expression for the logarithmic scale.

    Equations
    Instances For

      RAM expression for the requested core capacity.

      Equations
      Instances For

        RAM expression for the chunk-split threshold.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          RAM expression for the group-move budget bound.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            RAM expression for the minimum group contribution.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              RAM expression for the group label-spacing exponent.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                RAM expression for the chunk unit-count bound.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  RAM expression for the chunk-move budget bound.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    RAM expression for the initial chunk-size allowance.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      RAM expression for the reservation-step allowance.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        RAM expression for the chunk label-spacing exponent.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          RAM expression for the chunk label-range allowance.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            RAM expression for the quiet-chunk size threshold.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              RAM expression for the top-tree height bound.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                RAM expression for the element-label bit width.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  RAM expression for the group-label bit width.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For

                                    RAM expression for the maximum quiet chunk contribution.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For

                                      RAM expression for the chunk-array capacity bound.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        RAM expression for the top-node-array capacity bound.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          Their values #

                                          Natural-number value of the group-split threshold.

                                          Equations
                                          Instances For

                                            Natural-number value of the chunk-split threshold.

                                            Equations
                                            Instances For

                                              Natural-number value of the group-move budget bound.

                                              Equations
                                              Instances For

                                                Natural-number value of the minimum group contribution.

                                                Equations
                                                Instances For

                                                  Natural-number value of the group label-spacing exponent.

                                                  Equations
                                                  Instances For

                                                    Natural-number value of the chunk unit-count bound.

                                                    Equations
                                                    Instances For

                                                      Natural-number value of the chunk-move budget bound.

                                                      Equations
                                                      Instances For

                                                        Natural-number value of the chunk move-count allowance.

                                                        Equations
                                                        Instances For

                                                          Natural-number value of the initial chunk-size allowance.

                                                          Equations
                                                          Instances For

                                                            Natural-number value of the chunk split-count bound.

                                                            Equations
                                                            Instances For

                                                              Natural-number value of the reservation-step allowance.

                                                              Equations
                                                              Instances For

                                                                Natural-number value of the chunk label-spacing exponent.

                                                                Equations
                                                                Instances For

                                                                  Natural-number value of the chunk label-range allowance.

                                                                  Equations
                                                                  Instances For

                                                                    Natural-number value of the quiet-chunk size threshold.

                                                                    Equations
                                                                    Instances For

                                                                      Natural-number value of the top-tree height bound.

                                                                      Equations
                                                                      Instances For

                                                                        Natural-number value of the element-label bit width.

                                                                        Equations
                                                                        Instances For

                                                                          Natural-number value of the group-label bit width.

                                                                          Equations
                                                                          Instances For

                                                                            Natural-number value of the maximum quiet chunk contribution.

                                                                            Equations
                                                                            Instances For

                                                                              Natural-number value of the chunk-array capacity bound.

                                                                              Equations
                                                                              Instances For

                                                                                Natural-number value of the top-node-array capacity bound.

                                                                                Equations
                                                                                Instances For
                                                                                  theorem OrderMaintenance.Impl.egm_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.eUG_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.euT_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.ekc_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.eMu_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.eIC_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.ecsB_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.ersB_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.eHC_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.ePC_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.eBe_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.eBg_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.ecm_ev {s : Machine.State} {L : ℕ} (hL : s.loc "L" = L) (h8 : 8 ≤ L) :
                                                                                  theorem OrderMaintenance.Impl.ecb_ev {s : Machine.State} {N L : ℕ} (hL : s.loc "L" = L) (hN : s.loc "nN" = N) (h8 : 8 ≤ L) (hc : vcm L ≤ vth L + 1) :
                                                                                  theorem OrderMaintenance.Impl.enb_ev {s : Machine.State} {N L : ℕ} (hL : s.loc "L" = L) (hN : s.loc "nN" = N) (h8 : 8 ≤ L) (hc : vcm L ≤ vth L + 1) :

                                                                                  They are proofParams and its capacities #

                                                                                  theorem OrderMaintenance.Impl.proofParams_eq (N : ℕ) :
                                                                                  Proof.proofParams N = { N := N, L := Proof.pL N, G := vG (Proof.pL N), T := vT (Proof.pL N), theta := vth (Proof.pL N), elementBits := vBe (Proof.pL N), groupBits := vBg (Proof.pL N), elementSpacing := 2 ^ vUG (Proof.pL N), groupSpacing := 2 ^ vHC (Proof.pL N), groupBudget := 4, chunkBudget := 4, reservationBudget := 8, a := 8, s := 11, beta := 64, H := vH (Proof.pL N) }
                                                                                  theorem OrderMaintenance.Impl.pL_eq {N : ℕ} (h : 0 < N) :
                                                                                  Proof.pL N = max 8 (N.log2 + 1)

                                                                                  A sequence preserves every local preserved by each of its statements.

                                                                                  The parameter computation: L, then the parameter array, then the capacity locals.

                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For

                                                                                    The parameters, as (index, expression) pairs.

                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For

                                                                                      Allocate the slot's parameter array and store all parameter expressions.

                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For

                                                                                        Populate the capacity locals from the computed scale and requested core capacity.

                                                                                        Equations
                                                                                        • One or more equations did not get rendered due to their size.
                                                                                        Instances For

                                                                                          Compute the logarithmic scale, parameter array and allocation-capacity locals.

                                                                                          Equations
                                                                                          Instances For

                                                                                            What the parts do #

                                                                                            theorem OrderMaintenance.Impl.partC_ok {s : Machine.State} {N L : ℕ} (hL : s.loc "L" = L) (hN : s.loc "nN" = N) (h8 : 8 ≤ L) (hc : vcm L ≤ vth L + 1) :
                                                                                            (Machine.exec partC s).status = Machine.Status.ok ∧ (Machine.exec partC s).st.mem = s.mem ∧ (Machine.exec partC s).st.cap = s.cap ∧ (Machine.exec partC s).st.loc "kE" = N + 2 ∧ (Machine.exec partC s).st.loc "kG" = 2 * N + 4 ∧ (Machine.exec partC s).st.loc "kC" = vcb N L + 2 ∧ (Machine.exec partC s).st.loc "kN" = vnb N L + vcb N L + 2 ∧ (Machine.exec partC s).st.loc "kB" = N + 3 ∧ (Machine.exec partC s).st.loc "kCc" = vcb N L + 2 ∧ (Machine.exec partC s).st.loc "kL" = vnb N L + vcb N L + 2 ∧ (Machine.exec partC s).st.loc "kR" = vnb N L + 2 ∧ (Machine.exec partC s).st.loc "kRc" = vnb N L + vcb N L + 2 ∧ (Machine.exec partC s).st.loc "kf" = 2 * N + 4 ∧ (Machine.exec partC s).st.loc "kW" = vH L + 1
                                                                                            theorem OrderMaintenance.Impl.partB_ok (q : ℕ) {s : Machine.State} {N L : ℕ} (hL : s.loc "L" = L) (hN : s.loc "nN" = N) (h8 : 8 ≤ L) :
                                                                                            theorem OrderMaintenance.Impl.partC_frame {s : Machine.State} (x : Machine.Reg) (h1 : x ≠ "kE") (h2 : x ≠ "kG") (h3 : x ≠ "kC") (h4 : x ≠ "kN") (h5 : x ≠ "kB") (h6 : x ≠ "kCc") (h7 : x ≠ "kL") (h8' : x ≠ "kR") (h9 : x ≠ "kRc") (h10 : x ≠ "kf") (h11 : x ≠ "kW") :
                                                                                            theorem OrderMaintenance.Impl.paramsS_ok (q : ℕ) {m : Machine.State} {N : ℕ} (hN : m.loc "nN" = N) (hpos : 0 < N) :
                                                                                            (Machine.exec (paramsS q) m).status = Machine.Status.ok ∧ (Machine.exec (paramsS q) m).cost ≤ 1500 ∧ (Machine.exec (paramsS q) m).st.cap (arr q Slot.prm) = 16 ∧ (∀ (k : PF), (Machine.exec (paramsS q) m).st.mem (arr q Slot.prm) k.idx = PF.get (Proof.proofParams N) k) ∧ CapLocs (Proof.proofParams N) (Machine.exec (paramsS q) m).st.loc ∧ (∀ (b : Machine.Arr), b ≠ arr q Slot.prm → Machine.Same b m (Machine.exec (paramsS q) m).st) ∧ ∀ (x : String), x ≠ "L" → x ≠ "kE" → x ≠ "kG" → x ≠ "kC" → x ≠ "kN" → x ≠ "kB" → x ≠ "kCc" → x ≠ "kL" → x ≠ "kR" → x ≠ "kRc" → x ≠ "kf" → x ≠ "kW" → (Machine.exec (paramsS q) m).st.loc x = m.loc x

                                                                                            The parameters of a new core, computed in a constant number of steps.