MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch16.A705SupportPrograms.Games

19.38's reference arithmetic: the finite closeness game (SD17–SD19) and the four-node centipede (SD20–SD22).

noncomputable def MindFormal.A705SupportPrograms.closenessLoss (N : ℕ) (γ z zbar : ℝ) :

SD17: own squared-distance loss when the target is γ times the actual group mean of N numbers, own number z included, the others' mean zbar.

Equations
Instances For
    noncomputable def MindFormal.A705SupportPrograms.replyCoeff (N : ℕ) (γ : ℝ) :

    SD17's reply coefficient h_N = γ(N-1)/(N-γ).

    Equations
    Instances For
      theorem MindFormal.A705SupportPrograms.closenessLoss_eq {N : ℕ} (hN : 2 ≤ N) {γ : ℝ} (hγ1 : γ < 1) (z zbar : ℝ) :
      closenessLoss N γ z zbar = (1 - γ / ↑N) ^ 2 * (z - replyCoeff N γ * zbar) ^ 2

      SD17: the loss factors through the reply coefficient.

      theorem MindFormal.A705SupportPrograms.replyCoeff_mem {N : ℕ} (hN : 2 ≤ N) {γ : ℝ} (hγ0 : 0 < γ) (hγ1 : γ < 1) :
      0 < replyCoeff N γ ∧ replyCoeff N γ < 1
      In the supporting results, whose steps the book's proofs use, clause 4 of key 19.38: Calculating the wrong opponent more thoroughly can cost the prize (Worked example) · INDEX.md
      theorem MindFormal.A705SupportPrograms.result_19_38_4_L706 {N : ℕ} (hN : 2 ≤ N) {γ : ℝ} (hγ0 : 0 < γ) (hγ1 : γ < 1) :
      (∀ (z zbar : ℝ), closenessLoss N γ z zbar = (1 - γ / ↑N) ^ 2 * (z - replyCoeff N γ * zbar) ^ 2) ∧ (0 < replyCoeff N γ ∧ replyCoeff N γ < 1) ∧ (∀ (M : Finset ℝ) (zbar zstar : ℝ), zstar ∈ M → ((∀ z ∈ M, closenessLoss N γ zstar zbar ≤ closenessLoss N γ z zbar) ↔ ∀ z ∈ M, |zstar - replyCoeff N γ * zbar| ≤ |z - replyCoeff N γ * zbar|)) ∧ (∀ (M : Finset ℝ), M.Nonempty → ∀ (zbar : ℝ), ∃ zstar ∈ M, ∀ z ∈ M, |zstar - replyCoeff N γ * zbar| ≤ |z - replyCoeff N γ * zbar|) ∧ (∀ {Ω : Type} [inst : MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (zbar : Ω → ℝ), MeasureTheory.MemLp zbar 2 μ → ∀ (z : ℝ), ∫ (ω : Ω), closenessLoss N γ z (zbar ω) ∂μ = (1 - γ / ↑N) ^ 2 * ((z - replyCoeff N γ * ∫ (ω : Ω), zbar ω ∂μ) ^ 2 + replyCoeff N γ ^ 2 * ProbabilityTheory.variance zbar μ)) ∧ (∀ {Ω : Type} [inst : MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (zbar : Ω → ℝ), MeasureTheory.MemLp zbar 2 μ → ∀ (M : Finset ℝ), ∀ zstar ∈ M, (∀ z ∈ M, ∫ (ω : Ω), closenessLoss N γ zstar (zbar ω) ∂μ ≤ ∫ (ω : Ω), closenessLoss N γ z (zbar ω) ∂μ) ↔ ∀ z ∈ M, |zstar - replyCoeff N γ * ∫ (ω : Ω), zbar ω ∂μ| ≤ |z - replyCoeff N γ * ∫ (ω : Ω), zbar ω ∂μ|) ∧ (∀ (z₀ : ℝ) (d h : ℕ), closenessLoss N γ (z₀ * replyCoeff N γ ^ d) (z₀ * replyCoeff N γ ^ h) = (1 - γ / ↑N) ^ 2 * z₀ ^ 2 * (replyCoeff N γ ^ d - replyCoeff N γ ^ (h + 1)) ^ 2) ∧ (∀ (z₀ : ℝ), 0 < z₀ → ∀ (h d d' : ℕ), d < d' → (d' ≤ h + 1 → closenessLoss N γ (z₀ * replyCoeff N γ ^ d') (z₀ * replyCoeff N γ ^ h) < closenessLoss N γ (z₀ * replyCoeff N γ ^ d) (z₀ * replyCoeff N γ ^ h)) ∧ (h + 1 ≤ d → closenessLoss N γ (z₀ * replyCoeff N γ ^ d) (z₀ * replyCoeff N γ ^ h) < closenessLoss N γ (z₀ * replyCoeff N γ ^ d') (z₀ * replyCoeff N γ ^ h))) ∧ (replyCoeff 3 (2 / 3) = 4 / 7 ∧ closenessLoss 3 (2 / 3) 20 20 = 400 / 9 ∧ closenessLoss 3 (2 / 3) 0 20 = 6400 / 81 ∧ closenessLoss 3 (2 / 3) (80 / 7) 20 = 0 ∧ closenessLoss 3 (2 / 3) 0 20 - closenessLoss 3 (2 / 3) 20 20 = 2800 / 81 ∧ 0 < closenessLoss 3 (2 / 3) 0 20 - closenessLoss 3 (2 / 3) 20 20 ∧ closenessLoss 3 (2 / 3) (320 / 49) 20 = 6400 / 441) ∧ closenessLoss N γ 0 0 = 0 ∧ ∀ (z : ℝ), z ≠ 0 → 0 < closenessLoss N γ z 0

      19.38, clause 4 (SD17–SD19): the finite closeness game's nearest-menu response, its specified depth-dependent losses and the explicit gap 2800/81. Hypotheses: N ≥ 2 players, a target coefficient 0 < γ < 1. With L(z; z̄) = (z - (γ/N)(z + (N-1)z̄))² (own number in the actual mean) and h_N = γ(N-1)/(N-γ): (SD17) L = (1-γ/N)²(z - h_N z̄)² with 0 < h_N < 1; on every finite nonempty menu the minimizers of L(·; z̄) are exactly the menu points nearest to h_N z̄, and one exists (any declared tie rule among them is a best reply); for stochastic opponents, on any probability space and any square-integrable opponents' mean z̄ (correlations among opponents included, no independence of levels), 𝔼L(z; z̄) = (1-γ/N)²[(z - h_N𝔼z̄)² + h_N² Var z̄], so the expected-loss minimizers on the menu are exactly the points nearest to h_N𝔼z̄. (SD18) for anchor z₀ > 0 and depths z_d = z₀h_N^d, against opponents using z_h the loss of z_d is (1-γ/N)² z₀² (h_N^d - h_N^{h+1})², strictly decreasing in d up to h+1 and strictly increasing from h+1. (SD19) at N = 3, γ = 2/3, opponents both at 20: h_N = 4/7, the simple response 20, the zero prescription 0 and the correct response 80/7 lose 400/9, 6400/81 and 0, the gap L(0) - L(20) = 2800/81 > 0, one level past the correct response, 320/49, loses 6400/441; and all-zero is a Nash profile on every menu containing 0: against all zero every nonzero number has strictly positive loss. Supplied steps: none.

      SD20's four-node centipede, focal player 1: the focal gross payment of the contingent plan (pass at node 1?, pass at node 3?) against a partner whose own contingent plan passes node 2 (s2) and node 4 (s4). Terminal cells: take at 1 (2,1), partner takes at 2 (1,3), take at 3 (4,2), partner takes at 4 (3,5), pass at 4 (6,4). Only reached moves pay.

      Equations
      Instances For

        The partner's gross payment in the same cells.

        Equations
        Instances For
          In the supporting results, whose steps the book's proofs use, clause 7 of key 19.38: Calculating the wrong opponent more thoroughly can cost the prize (Worked example) · INDEX.md
          theorem MindFormal.A705SupportPrograms.result_19_38_7_L706 :
          (5 > 4 ∧ 4 > 3 ∧ 3 > 2 ∧ 2 > 1) ∧ (∀ (q : Bool × Bool → ℝ) (θ₂ θ₄ : ℝ), (∀ (s : Bool × Bool), 0 ≤ q s) → ∑ s : Bool × Bool, q s = 1 → θ₂ = q (true, true) + q (true, false) → q (true, true) = θ₂ * θ₄ → θ₄ ∈ Set.Icc 0 1 → have V := fun (pass1 pass3 : Bool) => ∑ s : Bool × Bool, q s * centipedeFocal pass1 pass3 s.1 s.2; V true true = 1 + θ₂ * (3 + 3 * θ₄ - 1) ∧ V true false = 1 + θ₂ * (4 - 1) ∧ (∀ (pass3 : Bool), V false pass3 = 2) ∧ (0 < θ₂ → (q (true, false) * 3 + q (true, true) * 6) / θ₂ = 3 + 3 * θ₄ ∧ (q (true, false) * 4 + q (true, true) * 4) / θ₂ = 4) ∧ max (V true true) (V true false) = 1 + θ₂ * (max 4 (3 + 3 * θ₄) - 1) ∧ (3 + 3 * θ₄ > 4 ↔ θ₄ > 1 / 3) ∧ (max (V true true) (V true false) > V false false ↔ θ₂ > (max 4 (3 + 3 * θ₄) - 1)⁻¹)) ∧ (centipedeFocal true true true false = 3 ∧ centipedeFocal false true true false = 2 ∧ centipedeFocal false false true false = 2 ∧ centipedeFocal true false true false = 4 ∧ centipedeFocal true false true false - centipedeFocal true true true false = 1 ∧ centipedeFocal true true true false - centipedeFocal false true true false = 1) ∧ centipedeFocal true true true true = 6 ∧ centipedePartner true true true true = 4 ∧ centipedeFocal false true true true = 2 ∧ centipedePartner false true true true = 1

          19.38, clause 7 (SD20–SD22): the four-node centipede's conditional continuation values and pass thresholds, and the gross payments 3, 2, 4 at (θ₂,θ₄) = (1,0). The game is the displayed two-player game; the partner's contingent plan (s2, s4) has an arbitrary joint law q on the four plans (nonnegative, total one; correlation between its two choices allowed). θ₂ is the actual probability that the partner passes node 2 and θ₄ its conditional probability of passing node 4 given that node is reached under the focal continuation (q(pass,pass) = θ₂θ₄, θ₄ in [0,1]; at θ₂ = 0 any such θ₄). Conclusions: backward induction under certainty of selfish maximization takes at node 4 (5 > 4), node 3 (4 > 3), node 2 (3 > 2) and node 1 (2 > 1); the focal expected gross payments are 1 + θ₂(3+3θ₄-1) for pass-both, 1 + θ₂(4-1) for pass-then-take and 2 for a first take whatever the later choice; when node 3 is reached with positive probability the conditional continuation values there are V₃(pass) = 3 + 3θ₄ and V₃(take) = 4; the first-node pass with optimal later play earns V₁ = 1 + θ₂(max(4, 3+3θ₄) - 1); later passing is preferable iff θ₄ > 1/3; first-node passing is preferable iff θ₂ > 1/(max(4,3+3θ₄)-1). Against the partner that passes node 2 and takes node 4 (θ₂ = 1, θ₄ = 0), pass-both, first-take and pass-then-take earn 3, 2 and 4, adjacent differences of magnitude one; against the partner that passes both, two passing players earn (6,4) while a first take earns (2,1). Supplied steps: none.

          theorem MindFormal.A705SupportPrograms.payment_transfer {Ω : Type u_1} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (pay : Ω → ℝ) (hpay : Measurable pay) {lo R ref ε : ℝ} (hbound : ∀ (ω : Ω), pay ω ∈ Set.Icc lo (lo + R)) (href : ref ∈ Set.Icc lo (lo + R)) (good : Set Ω) (hgood : MeasurableSet good) (hfail : μ.real goodᶜ ≤ ε) (hcert : ∀ ω ∈ good, pay ω = ref) :
          |∫ (ω : Ω), pay ω ∂μ - ref| ≤ R * ε

          SD23's coupling transfer: a bounded native payment equal to its certified reference on an event of failure at most ε has expectation within R ε of the reference.

          theorem MindFormal.A705SupportPrograms.result_19_38_5_L706 {Ω₁ : Type u_1} {Ω₀ : Type u_2} [MeasurableSpace Ω₁] [MeasurableSpace Ω₀] {N₁ n₁ N₀ n₀ : ℕ} {T₁ : Type u_3} {Λ₁ : Type u_4} {J₁ : Type u_5} {T₀ : Type u_6} {Λ₀ : Type u_7} {J₀ : Type u_8} [Fintype T₁] [Fintype Λ₁] [Fintype J₁] [Fintype T₀] [Fintype Λ₀] [Fintype J₀] (E₁ : StateExperiment Ω₁ N₁ n₁ T₁ Λ₁ J₁) (E₀ : StateExperiment Ω₀ N₀ n₀ T₀ Λ₀ J₀) (pay₁ : Ω₁ → ℝ) (pay₀ : Ω₀ → ℝ) (hm₁ : Measurable pay₁) (hm₀ : Measurable pay₀) {lo R ref₁ ref₀ ε₁ ε₀ : ℝ} (hb₁ : ∀ (ω : Ω₁), pay₁ ω ∈ Set.Icc lo (lo + R)) (hb₀ : ∀ (ω : Ω₀), pay₀ ω ∈ Set.Icc lo (lo + R)) (hr₁ : ref₁ ∈ Set.Icc lo (lo + R)) (hr₀ : ref₀ ∈ Set.Icc lo (lo + R)) (good₁ : Set Ω₁) (good₀ : Set Ω₀) (hg₁ : MeasurableSet good₁) (hg₀ : MeasurableSet good₀) (hf₁ : E₁.ground.μ.real good₁ᶜ ≤ ε₁) (hf₀ : E₀.ground.μ.real good₀ᶜ ≤ ε₀) (hc₁ : ∀ ω ∈ good₁, pay₁ ω = ref₁) (hc₀ : ∀ ω ∈ good₀, pay₀ ω = ref₀) (cost₁ : Ω₁ → ℝ) (cost₀ : Ω₀ → ℝ) (Λ : ℝ) (hΛ : 0 < Λ) :
          have ΔC := ∫ (ω : Ω₁), cost₁ ω ∂E₁.ground.μ - ∫ (ω : Ω₀), cost₀ ω ∂E₀.ground.μ; (|∫ (ω : Ω₁), pay₁ ω ∂E₁.ground.μ - ref₁| ≤ R * ε₁ ∧ |∫ (ω : Ω₀), pay₀ ω ∂E₀.ground.μ - ref₀| ≤ R * ε₀) ∧ Λ * (ref₁ - ref₀ - R * (ε₁ + ε₀)) - ΔC ≤ Λ * ∫ (ω : Ω₁), pay₁ ω ∂E₁.ground.μ - ∫ (ω : Ω₁), cost₁ ω ∂E₁.ground.μ - (Λ * ∫ (ω : Ω₀), pay₀ ω ∂E₀.ground.μ - ∫ (ω : Ω₀), cost₀ ω ∂E₀.ground.μ) ∧ (∀ (D₁ : Ω₁ → ℝ) (D₀ : Ω₀ → ℝ) (B : ℝ), Measurable D₁ → Measurable D₀ → (∀ (ω : Ω₁), |D₁ ω| ≤ B) → (∀ (ω : Ω₀), |D₀ ω| ≤ B) → R * (ε₁ + ε₀) < ref₁ - ref₀ → (2 * B + |ΔC|) / (ref₁ - ref₀ - R * (ε₁ + ε₀)) < Λ → Λ * ∫ (ω : Ω₀), pay₀ ω ∂E₀.ground.μ + ∫ (ω : Ω₀), D₀ ω ∂E₀.ground.μ - ∫ (ω : Ω₀), cost₀ ω ∂E₀.ground.μ < Λ * ∫ (ω : Ω₁), pay₁ ω ∂E₁.ground.μ + ∫ (ω : Ω₁), D₁ ω ∂E₁.ground.μ - ∫ (ω : Ω₁), cost₁ ω ∂E₁.ground.μ) ∧ (∀ (Np : ℕ), 1 ≤ Np → ↑Np * (1 / 1000 / ↑Np) = 1 / 1000) ∧ 2800 / 81 - 1225 * (1 / 1000 + 1 / 1000) = 52031 / 1620 ∧ 3211 / 100 < 52031 / 1620 ∧ 1 - 6 * (1 / 1000 + 1 / 1000) = 988 / 1000

          19.38, clause 5 (SD23–SD25): the payment gaps survive the complete native run, its noise and the computation-cost bill. Hypotheses: the two compared arms are original admitted own-noise StateExperiments E₁ (the arm whose certified reference pays more) and E₀, with every writer, gain, value, focus, act and return native and possibly different spaces; pay₁, pay₀ are their actual game payments, measurable reads of the run with oscillation at most R ([lo, lo+R], aborted or malformed submissions included), equal to the certified reference payments ref₁, ref₀ on measurable certified events whose complete population failures are at most ε₁, ε₀ (this is the native coupling of the actual records to the certified prescribed records, every partner, mark, disclosure and initial error included); cost₁, cost₀ are the actual delivered processing payments, integrable, with ΔC their expected difference; Λ > 0 scales game payments. Conclusions: (SD23) each arm's expected payment is within R ε_e of its reference; (SD25) the native advantage is at least Λ(Δ - R(ε₁+ε₀)) - ΔC, Δ = ref₁ - ref₀; for total signed deliveries, whatever the additional measurable processing deliveries D_e with |D_e| ≤ B on every branch, once R(ε₁+ε₀) < Δ (noise chosen first) every Λ > (2B + |ΔC|)/(Δ - R(ε₁+ε₀)) gives the same strict ranking. And the numerical bill: with N ≥ 1 participants each charged .001/N the arm's total is .001; at beauty range 1225 the losing-zero contrast 2800/81 keeps at least 2800/81 - 2.45 = 52031/1620 > 32.11; at centipede range 6 each unit contrast keeps 1 - .012 = .988. These are margins, not equalities of native means with the reference. Supplied steps: none.