Documentation

MIPRE.Background.Repetition.CommutingRepetition.Prerounding.Costs

@[reducible, inline]
abbrev CommutingRepetition.ALabel (n : ℕ) (X Y A : Type) :

The generalized Alice label: a revealed set, the reference words, and an answer word. The Alice effect at a label is setEffectA D R₀ μ xref yref zA.

Equations
Instances For
    @[reducible, inline]
    abbrev CommutingRepetition.BLabel (n : ℕ) (X Y B : Type) :

    The generalized Bob label.

    Equations
    Instances For
      noncomputable def CommutingRepetition.extendCoreA {n : ℕ} {A : Type} [Nonempty A] (D : Finset (Fin n)) (zD : ↥D → A) :
      Fin n → A

      Canonical extension of a core answer assignment to a full word (fixed default off the core — the node-1.2.11 fallback-answer pattern; the core effects read only the D-restriction).

      Equations
      Instances For
        noncomputable def CommutingRepetition.extendCoreB {n : ℕ} {B : Type} [Nonempty B] (D : Finset (Fin n)) (zD : ↥D → B) :
        Fin n → B

        Canonical extension of a core Bob assignment.

        Equations
        Instances For
          noncomputable def CommutingRepetition.keepOn {n : ℕ} {α : Type} [Nonempty α] (R₀ : Finset (Fin n)) (wd : Fin n → α) :
          Fin n → α

          Canonicalize a reference word to its values ON the revealed set (fixed default elsewhere). Labels are canonicalized so that two labels with the same effect coincide: setEffectA reads its xref only on R₀ and its yref only off R₀, so the Alice label at R₀ keeps xref on R₀ and yref off R₀; without this, an arena could assign unrelated branch vectors to behaviorally identical labels and the alignment bound would be false.

          Equations
          Instances For
            noncomputable def CommutingRepetition.keepOff {n : ℕ} {α : Type} [Nonempty α] (R₀ : Finset (Fin n)) (wd : Fin n → α) :
            Fin n → α

            Canonicalize a reference word to its values OFF the revealed set (fixed default on it).

            Equations
            Instances For
              noncomputable def CommutingRepetition.aLabel {n : ℕ} {X Y A : Type} [Nonempty X] [Nonempty Y] [Nonempty A] (D R₀ : Finset (Fin n)) (xw : Fin n → X) (yw : Fin n → Y) (zD : ↥D → A) :
              ALabel n X Y A

              The canonical Alice label at a revealed set: pinned side kept on R₀, weight side kept off R₀, core answers canonically extended.

              Equations
              Instances For
                noncomputable def CommutingRepetition.bLabel {n : ℕ} {X Y B : Type} [Nonempty X] [Nonempty Y] [Nonempty B] (D R₀ : Finset (Fin n)) (xw : Fin n → X) (yw : Fin n → Y) (zD : ↥D → B) :
                BLabel n X Y B

                The canonical Bob label: pinned side (yref) kept on R₀, weight side (xref) kept off R₀.

                Equations
                Instances For
                  noncomputable def CommutingRepetition.TracialStrategy.coreMass {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) :

                  The weighted core mass p = 𝔼[w_D] (05_prerounding.tex, eq p-q-m, in the weighted run of 07 sec 7.4): questions from the product prior, core answers from the strategy's core-effect correlation, weighted by w.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def CommutingRepetition.TracialStrategy.alignCostA {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {Af Bf : Type} [Fintype Af] [Fintype Bf] {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) :

                    The prior Alice alignment cost I_A (05_prerounding.tex, eq prior-alignment-costs): the ℙ⁰-weighted, w-weighted squared distances ‖φ_{r,x,y} − φ^B_{r,y}‖² — branch vectors of the generalized-family arena at the cut-adjacent Alice labels ({i} ∪ C_X, …) (the effective effect H_{r,x}) and (C_X, …) (the bar H̄_{r,Y_i}), against the full Bob label ({i} ∪ C_Y, …).

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def CommutingRepetition.TracialStrategy.alignCostB {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {Af Bf : Type} [Fintype Af] [Fintype Bf] {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) :

                      The prior Bob alignment cost I_B (eq prior-alignment-costs, second display): distances ‖φ_{r,x,y} − φ^A_{r,x}‖², the bar on the Bob side.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem CommutingRepetition.TracialStrategy.prior_alignment_bound {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [DecidableEq A] [DecidableEq B] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {D : Finset (Fin n)} {Af Bf : Type} [Fintype Af] [Fintype Bf] (μ : X → Y → ℝ) (hμ : ∀ (x : X) (y : Y), 0 ≤ μ x y) (hμsum : ∑ x : X, ∑ y : Y, μ x y = 1) {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (htotF : ∀ (s : ALabel n X Y A), ∑ a : Af, Ffam s a = S.setEffectA D s.1 μ s.2.1 s.2.2.1 s.2.2.2) (htotG : ∀ (t : BLabel n X Y B), ∑ b : Bf, Gfam t b = S.setEffectB D t.1 μ t.2.1 t.2.2.1 t.2.2.2) (hcol : R.ColEntropyBudget) (hrow : R.RowEntropyBudget) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (hw0 : ∀ (xw : Fin n → X) (yw : Fin n → Y) (zA : ↥D → A) (zB : ↥D → B), 0 ≤ w xw yw zA zB) (hw1 : ∀ (xw : Fin n → X) (yw : Fin n → Y) (zA : ↥D → A) (zB : ↥D → B), w xw yw zA zB ≤ 1) (hwD : ∀ (xw xw' : Fin n → X) (yw yw' : Fin n → Y) (zA : ↥D → A) (zB : ↥D → B), agreesOn D xw xw' → agreesOn D yw yw' → w xw yw zA zB = w xw' yw' zA zB) {p : ℝ} (hp : p = S.coreMass D μ w) (hppos : 0 < p) (hm : D.card < n) :
                        S.alignCostA R D μ w ≤ 2 * p * (Real.log p⁻¹ + ↑D.card * Real.log (↑(Fintype.card A) * ↑(Fintype.card B))) / (↑n - ↑D.card) ∧ S.alignCostB R D μ w ≤ 2 * p * (Real.log p⁻¹ + ↑D.card * Real.log (↑(Fintype.card A) * ↑(Fintype.card B))) / (↑n - ↑D.card)

                        Prior alignment bound (node 1.2.9; 05_prerounding.tex, eqs IA-size-bias-calculation, prior-alignment-bound): I_A, I_B ≤ 2p(t₀ + s₀)/m with t₀ = log(1/p), s₀ = |D|·log(|A||B|), m = n − |D| — for any generalized-family arena satisfying both entropy budgets (batch #13), any [0,1]-weight, and the hypothesis-pinned weighted core mass. The proof consumes the signed reverse experiments (batch #11), the reveal-martingale tower (batch #14), the budgets telescoped at the uniform cut, and the weighted accepted-word entropy (finite_weighted_entropy_le_of_weight_bound).

                        noncomputable def CommutingRepetition.TracialStrategy.posteriorQ {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {Af Bf : Type} [Fintype Af] [Fintype Bf] {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (p : ℝ) (t : RevealDatum n D × (Fin n → X) × (Fin n → Y) × (↥D → A) × (↥D → B)) :

                        The posterior branch law ℚ (05_prerounding.tex, eq posterior-branch-law): reveal randomness times prior questions times the weight times the exact branch mass ‖φ_{r,x,y}‖², divided by p. Junk-free consumption: every use divides by the hypothesis-pinned positive p.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem CommutingRepetition.TracialStrategy.posteriorQ_sum {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [DecidableEq A] [DecidableEq B] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {D : Finset (Fin n)} {Af Bf : Type} [Fintype Af] [Fintype Bf] (μ : X → Y → ℝ) (hμ : ∀ (x : X) (y : Y), 0 ≤ μ x y) {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (htotF : ∀ (s : ALabel n X Y A), ∑ a : Af, Ffam s a = S.setEffectA D s.1 μ s.2.1 s.2.2.1 s.2.2.2) (htotG : ∀ (t : BLabel n X Y B), ∑ b : Bf, Gfam t b = S.setEffectB D t.1 μ t.2.1 t.2.2.1 t.2.2.2) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (hwD : ∀ (xw xw' : Fin n → X) (yw yw' : Fin n → Y) (zA : ↥D → A) (zB : ↥D → B), agreesOn D xw xw' → agreesOn D yw yw' → w xw yw zA zB = w xw' yw' zA zB) {p : ℝ} (hp : p = S.coreMass D μ w) (hppos : 0 < p) (hm : D.card < n) :
                          ∑ t : RevealDatum n D × (Fin n → X) × (Fin n → Y) × (↥D → A) × (↥D → B), S.posteriorQ R D μ w p t = 1

                          Posterior normalization (eq posterior-branch-normalization): the branch-norm identity and the tower property make ℚ a probability law — the branch mass at the full labels is exactly the conditional core-word correlation, so the total mass is p/p = 1.

                          theorem CommutingRepetition.TracialStrategy.posterior_alignment_A {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [DecidableEq A] [DecidableEq B] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {D : Finset (Fin n)} {Af Bf : Type} [Fintype Af] [Fintype Bf] (μ : X → Y → ℝ) (hμ : ∀ (x : X) (y : Y), 0 ≤ μ x y) {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (hw0 : ∀ (xw : Fin n → X) (yw : Fin n → Y) (zA : ↥D → A) (zB : ↥D → B), 0 ≤ w xw yw zA zB) {p : ℝ} (hppos : 0 < p) :
                          ∑ t : RevealDatum n D × (Fin n → X) × (Fin n → Y) × (↥D → A) × (↥D → B), S.posteriorQ R D μ w p t * ‖R.candidate S.σ (aLabel D (insert t.1.i t.1.CX) t.2.1 t.2.2.1 t.2.2.2.1) (bLabel D (insert t.1.i t.1.CY) t.2.1 t.2.2.1 t.2.2.2.2) - R.candidate S.σ (aLabel D t.1.CX t.2.1 t.2.2.1 t.2.2.2.1) (bLabel D (insert t.1.i t.1.CY) t.2.1 t.2.2.1 t.2.2.2.2)‖ ^ 2 ≤ 4 * S.alignCostA R D μ w / p

                          Posterior alignment, Bob-candidate side (node 1.2.9; 05_prerounding.tex, eqs prerounding-normalization-inequality, two-alignment-bounds): multiplying the normalization inequality by ℚ cancels the ideal branch mass, so the posterior expected squared distance between the normalized candidates u_{st} and y_{i,r,y} is at most 4·I_A/p.

                          theorem CommutingRepetition.TracialStrategy.posterior_alignment_B {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [DecidableEq A] [DecidableEq B] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {D : Finset (Fin n)} {Af Bf : Type} [Fintype Af] [Fintype Bf] (μ : X → Y → ℝ) (hμ : ∀ (x : X) (y : Y), 0 ≤ μ x y) {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (hw0 : ∀ (xw : Fin n → X) (yw : Fin n → Y) (zA : ↥D → A) (zB : ↥D → B), 0 ≤ w xw yw zA zB) {p : ℝ} (hppos : 0 < p) :
                          ∑ t : RevealDatum n D × (Fin n → X) × (Fin n → Y) × (↥D → A) × (↥D → B), S.posteriorQ R D μ w p t * ‖R.candidate S.σ (aLabel D (insert t.1.i t.1.CX) t.2.1 t.2.2.1 t.2.2.2.1) (bLabel D (insert t.1.i t.1.CY) t.2.1 t.2.2.1 t.2.2.2.2) - R.candidate S.σ (aLabel D (insert t.1.i t.1.CX) t.2.1 t.2.2.1 t.2.2.2.1) (bLabel D t.1.CY t.2.1 t.2.2.1 t.2.2.2.2)‖ ^ 2 ≤ 4 * S.alignCostB R D μ w / p

                          Posterior alignment, Alice-candidate side (mirror): distance to x_{i,r,x} against I_B.

                          Posterior histories (node 1.2.10, closeness half) #

                          The flattened posterior over public histories and live questions, the locally generated conditional laws, and the history relative-entropy bound (05_prerounding.tex, eqs label-law-pi, J-A, J-B, conditioning-divergence, question-answer-conditioning-budget, JA-chain-rule, first-history-chain-term, bob-block-conditioning-budget, bob-block-chain-rule, second-history-chain-term, history-relative-entropy). The exact-seed half of node 1.2.10 is the Prelim/Seed.lean sampler applied to the conditional laws below at assembly time (node 1.2.11). The bound itself, history_relative_entropy, is stated (verbatim, at its frozen hash) in Prerounding/History.lean, which imports this file.

                          @[reducible, inline]

                          The posterior tuple space: reveal datum, full reference words, core word.

                          Equations
                          Instances For
                            noncomputable def CommutingRepetition.TracialStrategy.histCore {n : ℕ} {X Y A B : Type} [Nonempty X] [Nonempty Y] {D : Finset (Fin n)} (t : PostTuple n X Y A B D) :
                            PostTuple n X Y A B D

                            The public-history core of a posterior tuple (the manuscript's R = (i, T₀, Z), eq history-R): the reveal datum, the revealed question values (kept on C_X resp. C_Y — the live values excluded, since i ∉ C_X ∪ C_Y), and the core word.

                            Equations
                            Instances For
                              noncomputable def CommutingRepetition.TracialStrategy.flattenPost {n : ℕ} {X Y A B : Type} [Nonempty X] [Nonempty Y] {D : Finset (Fin n)} (t : PostTuple n X Y A B D) :
                              PostTuple n X Y A B D × X × Y

                              The flattening of a posterior tuple to (history, live questions) (the tuple format of eqs J-A, J-B).

                              Equations
                              Instances For
                                noncomputable def CommutingRepetition.TracialStrategy.flatQ {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {Af Bf : Type} [Fintype Af] [Fintype Bf] {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (p : ℝ) (u : PostTuple n X Y A B D × X × Y) :

                                The flattened posterior law ℚ(R, x, y) — the pushforward of posteriorQ under flattenPost (classical decidability of tuple equality is harmless: the law is noncomputable anyway).

                                Equations
                                Instances For
                                  noncomputable def CommutingRepetition.TracialStrategy.condQA {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {Af Bf : Type} [Fintype Af] [Fintype Bf] {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (p : ℝ) (i₀ : Fin n) (x : X) (h : PostTuple n X Y A B D) :

                                  The conditional history law ℚ(R = h ∣ i, X_i = x) (eq J-A's conditional): supported on histories whose datum has the given live coordinate; junk value 0 at a vanishing posterior marginal ("Zero posterior marginals use one fixed default distribution" — the default is chosen at assembly (node 1.2.11); the relative-entropy statements below are unaffected because zero-marginal cells carry zero ℚ-mass).

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    noncomputable def CommutingRepetition.TracialStrategy.condQB {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {Af Bf : Type} [Fintype Af] [Fintype Bf] {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (p : ℝ) (i₀ : Fin n) (y : Y) (h : PostTuple n X Y A B D) :

                                    The conditional history law ℚ(R = h ∣ i, Y_i = y) (eq J-B's conditional, mirror).

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      noncomputable def CommutingRepetition.TracialStrategy.flatJA {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {Af Bf : Type} [Fintype Af] [Fintype Bf] {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (p : ℝ) (u : PostTuple n X Y A B D × X × Y) :

                                      The locally generated Alice tuple law J_A(R, x, y) = m⁻¹ μ(x,y) ℚ(R ∣ i, X_i = x) (eq J-A), in its defaultless form (zero at zero-marginal cells; the assembly's fixed default redistributes only mass that carries no ℚ-weight).

                                      Equations
                                      Instances For
                                        noncomputable def CommutingRepetition.TracialStrategy.flatJB {n : ℕ} {X Y A B : Type} [Fintype X] [Fintype Y] [Fintype A] [Fintype B] [DecidableEq X] [DecidableEq Y] [Nonempty X] [Nonempty Y] [Nonempty A] [Nonempty B] (S : TracialStrategy (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)) {Af Bf : Type} [Fintype Af] [Fintype Bf] {Ffam : ALabel n X Y A → Af → S.M.A} {Gfam : BLabel n X Y B → Bf → S.M.A} (R : ResolverArena S.M Ffam Gfam) (D : Finset (Fin n)) (μ : X → Y → ℝ) (w : (Fin n → X) → (Fin n → Y) → (↥D → A) → (↥D → B) → ℝ) (p : ℝ) (u : PostTuple n X Y A B D × X × Y) :

                                        The locally generated Bob tuple law J_B (eq J-B, mirror).

                                        Equations
                                        Instances For