OAI/Probability/DilutedSpin/ActualCharging.lean
58 declarations, 0 contain sorry, 0 declared as axioms
- def
OAI.DilutedSpinGlass.MarkSelector.rademacherline 11Source documentation
Each mark coordinate is a genuine independent fair Rademacher variable.
noncomputable def rademacher : FiniteLaw Bool where …
Mentions: OAI.DilutedSpinGlass.FiniteLaw
- def
OAI.DilutedSpinGlass.MarkSelector.signline 16 - theorem
OAI.DilutedSpinGlass.MarkSelector.sign_sqline 18 - theorem
OAI.DilutedSpinGlass.MarkSelector.abs_signline 19 - theorem
OAI.DilutedSpinGlass.MarkSelector.mean_signline 20 - theorem
OAI.DilutedSpinGlass.MarkSelector.pair_selectorline 25Source documentation
Independent vertex marks select sharing of the vertex, not equality of spins.
theorem pair_selector {V : Type*} [Fintype V] [DecidableEq V] (a b : V) : (FiniteLaw.pi (fun _ : V => rademacher)).expect (fun x => sign (x a) * sign (x b)) = if a = b then 1 else 0 := by …Mentions: OAI.DilutedSpinGlass.FiniteLaw.pi, OAI.DilutedSpinGlass.MarkSelector.rademacher, OAI.DilutedSpinGlass.MarkSelector.sign
- theorem
OAI.DilutedSpinGlass.MarkSelector.requirements_selectorline 42Source documentation
Different requested color pairs use separate independent coordinates.
theorem requirements_selector {R V : Type*} [Fintype R] [DecidableEq R] [Fintype V] [DecidableEq V] (a b : R → V) : (FiniteLaw.pi (fun _ : R => FiniteLaw.pi (fun _ : V => rademacher))).expect (fun x => ∏ r, sign (x r (a r)) * sign (x r (b r))) = ∏ r, if a r = b r then (1 : ℝ) else 0 := by …Mentions: OAI.DilutedSpinGlass.FiniteLaw.pi, OAI.DilutedSpinGlass.MarkSelector.rademacher, OAI.DilutedSpinGlass.MarkSelector.sign
- def
OAI.DilutedSpinGlass.MarkSelector.colorMarkline 57Source documentation
Factor assigned to one color from a pair requirement. Pair endpoints are assumed distinct colors, as stipulated in the canceled-anchor expansion.
noncomputable def colorMark {C R V : Type*} [Fintype R] [DecidableEq C] (a b : R → C) (pos : C → V) (x : R → V → Bool) (c : C) : ℝ := … - theorem
OAI.DilutedSpinGlass.MarkSelector.colorMark_absline 62 - theorem
OAI.DilutedSpinGlass.MarkSelector.colored_selectorline 73Source documentation
Regrouping the factors assigned to colors gives precisely the selector.
theorem colored_selector {C R V : Type*} [Fintype C] [DecidableEq C] [Fintype R] [DecidableEq R] [Fintype V] [DecidableEq V] (a b : R → C) (pos : C → V) : (FiniteLaw.pi (fun _ : R => FiniteLaw.pi (fun _ : V => rademacher))).expect (fun x => ∏ c, colorMark a b pos x c) = ∏ r, if pos (a r) = pos (b r) then (1 : ℝ) else 0 := by …Mentions: OAI.DilutedSpinGlass.FiniteLaw.pi, OAI.DilutedSpinGlass.MarkSelector.rademacher, OAI.DilutedSpinGlass.MarkSelector.colorMark
- def
OAI.DilutedSpinGlass.PrescribedTree.clusterline 98Source documentation
The actual depth-d vertex is represented by its set of descendant leaf positions. Depths range from the root through the terminal leaf positions.
noncomputable def cluster {n : ℕ} (S : PrescribedTree n) (d : ℕ) (a : Leaf S) : Finset (Leaf S) := Finset.univ.filter (fun b => d ≤ splitDepth S a b)Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Leaf, OAI.DilutedSpinGlass.PrescribedTree.splitDepth
- theorem
OAI.DilutedSpinGlass.PrescribedTree.mem_clusterline 101 - theorem
OAI.DilutedSpinGlass.PrescribedTree.cluster_eq_iffline 105Source documentation
Equality of depth vertices is exactly sharing of the prefix.
theorem cluster_eq_iff {n : ℕ} (S : PrescribedTree n) {d : ℕ} (hd : d ≤ n) (a b : Leaf S) : cluster S d a = cluster S d b ↔ d ≤ splitDepth S a b := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Leaf, OAI.DilutedSpinGlass.PrescribedTree.cluster, OAI.DilutedSpinGlass.PrescribedTree.splitDepth
- theorem
OAI.DilutedSpinGlass.PrescribedTree.tree_mark_selectorline 124Source documentation
The marker projector in pert:mark-selector on actual tree positions.
theorem tree_mark_selector {n : ℕ} (S : PrescribedTree n) {C R : Type*} [Fintype C] [DecidableEq C] [Fintype R] [DecidableEq R] (a b : R → C) (pos : C → Leaf S) (d : R → ℕ) (hd : ∀ r, d r ≤ n) : (FiniteLaw.pi (fun _ : R => FiniteLaw.pi (fun _ : Finset (Leaf S) => MarkSelector.rademacher))).expect (fun x => ∏ r, MarkSelector.sign (x r (cluster S (d r) (pos (a r)))) * MarkSelector.sign (x r (cluster S (d r) (pos (b r))))) = ∏ r, if d r ≤ splitDepth S (pos (a r)) (pos (b r)) then (1 : ℝ) else 0 := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Leaf, OAI.DilutedSpinGlass.FiniteLaw.pi, OAI.DilutedSpinGlass.MarkSelector.rademacher, OAI.DilutedSpinGlass.MarkSelector.sign, OAI.DilutedSpinGlass.PrescribedTree.cluster, OAI.DilutedSpinGlass.PrescribedTree.splitDepth
- theorem
OAI.DilutedSpinGlass.PrescribedTree.exact_split_selectorline 138Source documentation
Exact splitting is the difference of consecutive sharing projectors.
theorem exact_split_selector {n : ℕ} (S : PrescribedTree n) (a b : Leaf S) (d : ℕ) : (if d ≤ splitDepth S a b then (1 : ℝ) else 0) - (if d+1 ≤ splitDepth S a b then 1 else 0) = if splitDepth S a b = d then 1 else 0 := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Leaf, OAI.DilutedSpinGlass.PrescribedTree.splitDepth
- def
OAI.DilutedSpinGlass.PrescribedTree.branchProductline 158Source documentation
The local product of reference factors for k represented children. The empty and unary induced vertices contribute no factor.
noncomputable def branchProduct (x y : ℝ) (k : ℕ) : ℝ := …
- theorem
OAI.DilutedSpinGlass.PrescribedTree.branchProduct_zeroline 161 - theorem
OAI.DilutedSpinGlass.PrescribedTree.branchProduct_oneline 164 - theorem
OAI.DilutedSpinGlass.PrescribedTree.branchProduct_succline 168 - def
OAI.DilutedSpinGlass.PrescribedTree.partialKappaline 175 - theorem
OAI.DilutedSpinGlass.PrescribedTree.childRefs_emptyline 182 - theorem
OAI.DilutedSpinGlass.PrescribedTree.childRefs_insert_sameline 189 - theorem
OAI.DilutedSpinGlass.PrescribedTree.childRefs_insert_otherline 207 - theorem
OAI.DilutedSpinGlass.PrescribedTree.childRefs_singleton_sameline 222 - theorem
OAI.DilutedSpinGlass.PrescribedTree.childRefs_singleton_otherline 236 - theorem
OAI.DilutedSpinGlass.PrescribedTree.partialKappa_emptyline 245 - theorem
OAI.DilutedSpinGlass.PrescribedTree.partialKappa_singletonline 252 - theorem
OAI.DilutedSpinGlass.PrescribedTree.prod_local_factorline 276 - theorem
OAI.DilutedSpinGlass.PrescribedTree.childRefs_eq_empty_of_unoccupiedline 286 - theorem
OAI.DilutedSpinGlass.PrescribedTree.partialKappa_insertline 294 - def
OAI.DilutedSpinGlass.PrescribedTree.referencePlanRefsline 384Source documentation
The actual final set of leaf positions in a finite reference prescription.
noncomputable def referencePlanRefs {n : ℕ} (T : PrescribedTree n) : {p : ℕ} → {s : Fin (p+1) → Leaf T} → ReferencePlan T s → Finset (Leaf T) | _, s, .nil => Finset.univ.image s | _, _, .cons _ _ _ _ next => referencePlanRefs T nextMentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Leaf, OAI.DilutedSpinGlass.PrescribedTree.ReferencePlan
- theorem
OAI.DilutedSpinGlass.PrescribedTree.image_cons_refsline 389 - theorem
OAI.DilutedSpinGlass.PrescribedTree.partialKappa_referencePlanline 408Source documentation
The history's reference normalization is the unordered branching-vertex product, independently of the order in which the colors were added.
theorem partialKappa_referencePlan {n p : ℕ} (T : PrescribedTree n) (m : Fin (n+1) → ℝ) {s : Fin (p+1) → Leaf T} (P : ReferencePlan T s) : partialKappa T m (referencePlanRefs T P) = referencePlanNormalizer T m P * partialKappa T m (Finset.univ.image s) := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Leaf, OAI.DilutedSpinGlass.PrescribedTree.ReferencePlan, OAI.DilutedSpinGlass.PrescribedTree.partialKappa, OAI.DilutedSpinGlass.PrescribedTree.referencePlanRefs, OAI.DilutedSpinGlass.PrescribedTree.referencePlanNormalizer
- theorem
OAI.DilutedSpinGlass.PrescribedTree.reference_history_kappaline 431 - def
OAI.DilutedSpinGlass.PrescribedTree.vertexDepthline 462Source documentation
Depth and arity refer to the genuine internal vertices, not their sampled values.
def vertexDepth : {n : ℕ} → (S : PrescribedTree n) → Internal S → ℕ | 0, .leaf, v => nomatch v | _+1, .node _ C, v => match (v : Option ((i : _) × Internal (C i))) with | none => 0 | some ⟨i,v⟩ => vertexDepth (C i) v + 1Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Internal
- def
OAI.DilutedSpinGlass.PrescribedTree.vertexArityline 469 - def
OAI.DilutedSpinGlass.PrescribedTree.branchingCountline 476 - theorem
OAI.DilutedSpinGlass.PrescribedTree.leaves_singleline 485 - theorem
OAI.DilutedSpinGlass.PrescribedTree.leaves_posline 493 - theorem
OAI.DilutedSpinGlass.PrescribedTree.branchingCount_singleline 499 - theorem
OAI.DilutedSpinGlass.PrescribedTree.branchingCount_growline 511Source documentation
One fresh growth creates at most one branching vertex; new continuations are unary. This holds even at coincident depths elsewhere in the tree.
theorem branchingCount_grow {n : ℕ} (S : PrescribedTree n) (v : Internal S) (P : ℕ → Prop) : branchingCount (grow S v) P = branchingCount S P + (if P (vertexDepth S v) ∧ vertexArity S v = 1 then 1 else 0) := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Internal, OAI.DilutedSpinGlass.PrescribedTree.branchingCount, OAI.DilutedSpinGlass.PrescribedTree.grow, OAI.DilutedSpinGlass.PrescribedTree.vertexDepth, OAI.DilutedSpinGlass.PrescribedTree.vertexArity
- def
OAI.DilutedSpinGlass.PrescribedTree.depthCountline 555Source documentation
Count of vertices at one depth, including unary vertices.
noncomputable def depthCount : {n : ℕ} → PrescribedTree n → ℕ → ℕ | 0, .leaf, _ => 0 | _+1, .node _ _, 0 => 1 | _+1, .node _ C, d+1 => ∑ i, depthCount (C i) dMentions: OAI.DilutedSpinGlass.PrescribedTree
- theorem
OAI.DilutedSpinGlass.PrescribedTree.depthCount_le_leavesline 560 - theorem
OAI.DilutedSpinGlass.PrescribedTree.depthCount_eq_sumline 570Source documentation
Identification with the actual finite internal-vertex index type.
theorem depthCount_eq_sum {n : ℕ} (S : PrescribedTree n) (d : ℕ) : (∑ v : Internal S, if vertexDepth S v = d then (1:ℕ) else 0) = depthCount S d := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Internal, OAI.DilutedSpinGlass.PrescribedTree.vertexDepth, OAI.DilutedSpinGlass.PrescribedTree.depthCount
- def
OAI.DilutedSpinGlass.PrescribedTree.gridline 583Source documentation
Equally spaced exponents, with an arbitrary incoming depth.
noncomputable def grid (n d L : ℕ) : Fin (n+1) → ℝ := fun i => (d+i.val:ℕ) / (L:ℝ)
- theorem
OAI.DilutedSpinGlass.PrescribedTree.gamma_grid_unaryline 585 - theorem
OAI.DilutedSpinGlass.PrescribedTree.unary_depth_budgetline 607Source documentation
The sum of coefficients of unary splits at a specified depth is at most
leaves/L, uniformly in the total number of levels.theorem unary_depth_budget {n : ℕ} (S : PrescribedTree n) (d L q : ℕ) : (∑ v : Internal S, if vertexDepth S v = q ∧ vertexArity S v = 1 then |gamma S (grid n d L) v| else 0) ≤ (leaves S:ℝ) * (L:ℝ)⁻¹ := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.q, OAI.DilutedSpinGlass.PrescribedTree.Internal, OAI.DilutedSpinGlass.PrescribedTree.vertexDepth, OAI.DilutedSpinGlass.PrescribedTree.vertexArity, OAI.DilutedSpinGlass.PrescribedTree.gamma, OAI.DilutedSpinGlass.PrescribedTree.grid, OAI.DilutedSpinGlass.PrescribedTree.leaves
- def
OAI.DilutedSpinGlass.PrescribedTree.chargedline 634Source documentation
A charged step is precisely the first branching at a designated depth.
def charged {n : ℕ} (S : PrescribedTree n) (Q : Finset ℕ) (v : Internal S) : Prop := …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Internal
- theorem
OAI.DilutedSpinGlass.PrescribedTree.unary_set_budgetline 637 - theorem
OAI.DilutedSpinGlass.PrescribedTree.sum_abs_gamma_gridline 655 - def
OAI.DilutedSpinGlass.PrescribedTree.historyMassline 669Source documentation
The absolute history sum with a terminal test. The old-leaf multiplier is exactly the number of eligible leaves (each contributes coefficient one). Fresh histories keep the genuine grow operation and coefficient at every step.
noncomputable def historyMass {L : ℕ} (F : PrescribedTree L → ℝ) : ℕ → (S : PrescribedTree L) → ℕ → ℝ | 0, S, _ => F S | k+1, S, a => (a:ℝ) * historyMass F k S (a-1) + ∑ v : Internal S, |gamma S (grid L 0 L) v| * historyMass F k (grow S v) a /-- Histories having at least b charged steps, preserving their multiplicities. -/Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Internal, OAI.DilutedSpinGlass.PrescribedTree.gamma, OAI.DilutedSpinGlass.PrescribedTree.grid, OAI.DilutedSpinGlass.PrescribedTree.grow, OAI.DilutedSpinGlass.PrescribedTree.charged
- def
OAI.DilutedSpinGlass.PrescribedTree.chargeMassline 676Source documentation
Histories having at least b charged steps, preserving their multiplicities.
noncomputable def chargeMass {L : ℕ} (Q : Finset ℕ) : ℕ → (S : PrescribedTree L) → ℕ → ℕ → ℝ | 0, _, _, b => if b = 0 then 1 else 0 | k+1, S, a, b => (a:ℝ) * chargeMass Q k S (a-1) b + ∑ v : Internal S, |gamma S (grid L 0 L) v| * chargeMass Q k (grow S v) a (b - if charged S Q v then 1 else 0) /-- Exact correspondence between charging steps and actual terminal branching vertices. Distinct vertices at the same depth are counted separately. -/Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.Internal, OAI.DilutedSpinGlass.PrescribedTree.gamma, OAI.DilutedSpinGlass.PrescribedTree.grid, OAI.DilutedSpinGlass.PrescribedTree.grow, OAI.DilutedSpinGlass.PrescribedTree.charged
- theorem
OAI.DilutedSpinGlass.PrescribedTree.chargeMass_eq_historyMassline 685Source documentation
Exact correspondence between charging steps and actual terminal branching vertices. Distinct vertices at the same depth are counted separately.
theorem chargeMass_eq_historyMass {L : ℕ} (Q : Finset ℕ) (B k a : ℕ) (S : PrescribedTree L) : chargeMass Q k S a (B - branchingCount S (· ∈ Q)) = historyMass (fun T => if B ≤ branchingCount T (· ∈ Q) then 1 else 0) k S a := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.chargeMass, OAI.DilutedSpinGlass.PrescribedTree.branchingCount, OAI.DilutedSpinGlass.PrescribedTree.historyMass
- def
OAI.DilutedSpinGlass.PrescribedTree.chargeBoundline 709 - theorem
OAI.DilutedSpinGlass.PrescribedTree.chargeBound_nonnegline 714 - theorem
OAI.DilutedSpinGlass.PrescribedTree.chargeBound_scaleline 725Source documentation
Every specified split contributes one factor delta; constants are independent of the grid denominator. This also handles arbitrarily repeated target depths.
theorem chargeBound_scale (C D δ : ℝ) (k b : ℕ) : chargeBound C (D*δ) k b = chargeBound C D k b * δ^b := by … - theorem
OAI.DilutedSpinGlass.PrescribedTree.chargeMass_boundline 737Source documentation
A genuine history estimate, not a distribution postulated from the desired identity. R bounds the leaves during all the remaining growth steps.
theorem chargeMass_bound {L : ℕ} (hL : 0 < L) (Q : Finset ℕ) (R k b a : ℕ) (S : PrescribedTree L) (ha : a ≤ leaves S) (hR : leaves S + k ≤ R) : chargeMass Q k S a b ≤ chargeBound (2*(R:ℝ)) ((Q.card:ℝ)*(R:ℝ)*(L:ℝ)⁻¹) k b := by …Mentions: OAI.DilutedSpinGlass.PrescribedTree, OAI.DilutedSpinGlass.PrescribedTree.leaves, OAI.DilutedSpinGlass.PrescribedTree.chargeMass, OAI.DilutedSpinGlass.PrescribedTree.chargeBound
- theorem
OAI.DilutedSpinGlass.PrescribedTree.charging_final_shapeline 814