MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch07.FinitePracticePower

LI2.4--5: finite components, sharp logarithmic remainder and a fixed midpoint/tail quadrature on the whole practice window.

theorem MindFormal.FinitePracticePower.log_remainder {v : ℝ} (hv : 0 ≤ v) (hv1 : v < 1) :
0 ≤ -Real.log (1 - v) - v ∧ -Real.log (1 - v) - v ≤ v ^ 2 / (2 * (1 - v))
noncomputable def MindFormal.FinitePracticePower.deficit {L : Type u_1} [Fintype L] (nu A : ℝ) (w rate : L → ℝ) (N : ℝ) :
Equations
Instances For
    noncomputable def MindFormal.FinitePracticePower.linear {L : Type u_1} [Fintype L] (A : ℝ) (w rate : L → ℝ) (N : ℝ) :
    Equations
    Instances For
      noncomputable def MindFormal.FinitePracticePower.logBill {L : Type u_1} [Fintype L] (nu A wmax : ℝ) (w : L → ℝ) :
      Equations
      Instances For
        theorem MindFormal.FinitePracticePower.components {L : Type u_1} [Fintype L] {nu A wmax N : ℝ} (w rate : L → ℝ) (hn : 0 < nu) (hA : 0 < A) (hw : ∀ (j : L), 0 ≤ w j) (hm : ∀ (j : L), w j ≤ wmax) (hamp : nu * A * wmax < 1) (hr : ∀ (j : L), 0 ≤ rate j) (hN : 0 ≤ N) :
        0 ≤ deficit nu A w rate N - linear A w rate N ∧ deficit nu A w rate N - linear A w rate N ≤ logBill nu A wmax w
        theorem MindFormal.FinitePracticePower.kernel_lipschitz {N x y : ℝ} (hN : 0 ≤ N) (hx : 0 ≤ x) (hy : 0 ≤ y) :
        |Real.exp (-y * N) - Real.exp (-x * N)| ≤ N * |y - x|

        The rate derivative bound, including rate zero, costs exactly N.

        noncomputable def MindFormal.FinitePracticePower.binWeight {L : Type u_1} (p b : ℝ) (cell : ℝ → L) (j : L) :
        Equations
        Instances For
          theorem MindFormal.FinitePracticePower.quadrature {L : Type u_1} [Fintype L] [MeasurableSpace L] [MeasurableSingletonClass L] (cell : ℝ → L) (hcell : Measurable cell) (rate : L → ℝ) {p b h R N : ℝ} (hp : 0 < p) (hb : 0 < b) (hh : 0 ≤ h) (hR : 0 ≤ R) (hrate : ∀ (j : L), 0 ≤ rate j) (midpoint : ∀ (r : ℝ), 0 < r → r < R → |rate (cell r) - r| ≤ h / 2) (tail : ∀ (r : ℝ), R ≤ r → rate (cell r) = R) (hN : 6 ≤ N) (hN60 : N ≤ 60) :
          (∀ (j : L), 0 ≤ binWeight p b cell j) ∧ ∑ j : L, binWeight p b cell j = 1 ∧ |∑ j : L, binWeight p b cell j * Real.exp (-rate j * N) - (b / (b + N)) ^ p| ≤ 30 * h + Real.exp (-6 * R)
          theorem MindFormal.FinitePracticePower.power {L : Type u_1} [Fintype L] [MeasurableSpace L] [MeasurableSingletonClass L] (cell : ℝ → L) (hcell : Measurable cell) (rate : L → ℝ) {p b h R nu A wmax : ℝ} (hp : 0 < p) (hb : 0 < b) (hh : 0 ≤ h) (hR : 0 ≤ R) (hn : 0 < nu) (hA : 0 < A) (hrate : ∀ (j : L), 0 ≤ rate j) (midpoint : ∀ (r : ℝ), 0 < r → r < R → |rate (cell r) - r| ≤ h / 2) (tail : ∀ (r : ℝ), R ≤ r → rate (cell r) = R) (hmax : ∀ (j : L), binWeight p b cell j ≤ wmax) (hamp : nu * A * wmax < 1) :
          have w := binWeight p b cell; (∀ (j : L), 0 ≤ w j) ∧ ∑ j : L, w j = 1 ∧ ∀ N ∈ Set.Icc 6 60, |deficit nu A w rate N - A * (b / (b + N)) ^ p| ≤ A * (30 * h + Real.exp (-6 * R)) + logBill nu A wmax w

          The fixed finite partition and its computed weights work for every practice count in the whole window, with LI2.5's exact error constant.

          theorem MindFormal.FinitePracticePower.central_scores {I : Type u_1} (value : I → ℝ) (a b : I) (F : ℝ → ℝ) (branch : Set ℝ) {center eps L : ℝ} (hL : 0 ≤ L) (score : ∀ x ∈ branch, ∀ y ∈ branch, |F x - F y| ≤ L * |x - y|) (ha_branch : value a ∈ branch) (hb_branch : value b ∈ branch) (hc_branch : center ∈ branch) (ha : |value a - center| ≤ eps) (hb : |value b - center| ≤ eps) :
          |(F (value a) + F (value b)) / 2 - F center| ≤ L * eps

          Apply the fixed score before taking the average of the central scores. This theorem covers a single central individual by taking a=b, and the two central individuals in an even group by taking their two rank indices.

          theorem MindFormal.FinitePracticePower.median {I : Type u_1} (value : I → ℝ) (F : ℝ → ℝ) {center eps L : ℝ} (hL : 0 ≤ L) (score : ∀ (x y : ℝ), |F x - F y| ≤ L * |x - y|) (band : ∀ (i : I), |value i - center| ≤ eps) {K : ℕ} (rank : Fin K → I) (ordered : Monotone fun (q : Fin K) => F (value (rank q))) (a b : Fin K) :
          (Monotone fun (q : Fin K) => F (value (rank q))) ∧ |(F (value (rank a)) + F (value (rank b))) / 2 - F center| ≤ L * eps

          Uniform individual bands imply the same median band for every odd or even group. The supplied rank map orders the actual already-scored data; there is no population-mean-to-median inference.