Two-batch comparison across independent component groups
Lax342547.GroupTensorComparison · concepts/Lax342547/GroupTensorComparison.lean · lax-342547
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
Replacing one independent group at a time adds its bounded separate-test error. The global tests may depend arbitrarily on all groups, and the two observations inside each group retain their full joint dependence. Different groups may have different finite state spaces and column counts.
Concept map
Evidence
This concept declares 3 statements. Each proof establishes one of them relative to its assumptions.
1 product_comparison proven
2 reference_product_comparison proven
3 uniform_group_comparison proven
Lean source view on GitHub
| 1 | import Lax342547.RawFrameComparison |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Two-batch comparison across independent component groups |
| 6 | type: lemma |
| 7 | --- |
| 8 | Replacing one independent group at a time adds its bounded separate-test |
| 9 | error. The global tests may depend arbitrarily on all groups, and the two |
| 10 | observations inside each group retain their full joint dependence. Different |
| 11 | groups may have different finite state spaces and column counts. |
| 12 | -/ |
| 13 | |
| 14 | namespace Lax342547.GroupTensorComparison |
| 15 | noncomputable section |
| 16 | open Lax342547.RelativeEntropy |
| 17 | open scoped BigOperators |
| 18 | variable {ι : Type} [Fintype ι] [DecidableEq ι] |
| 19 | {X Y : ι → Type} [∀ i,Fintype (X i)] [∀ i,Fintype (Y i)] |
| 20 | |
| 21 | def mean (ρ : ∀ i,X i × Y i → ℝ) (f : (∀ i,X i) → ℝ) (g : (∀ i,Y i) → ℝ) : ℝ := |
| 22 | ∑ z : ∀ i,X i × Y i,(∏ i,ρ i (z i))*f (fun i => (z i).1)*g (fun i => (z i).2) |
| 23 | |
| 24 | axiom product_comparison (ρ σ : ∀ j,X j × Y j → ℝ) |
| 25 | (hρ : ∀ j,Probability (ρ j)) (hσ : ∀ j,Probability (σ j)) (ε : ι → ℝ) |
| 26 | (hc : ∀ i,∀ f : X i → ℝ,∀ g : Y i → ℝ,(∀ x,|f x| ≤ 1) → (∀ y,|g y| ≤ 1) → |
| 27 | |(∑ z : X i × Y i,ρ i z*f z.1*g z.2)-(∑ z : X i × Y i,σ i z*f z.1*g z.2)| ≤ ε i) |
| 28 | (f : (∀ j,X j) → ℝ) (g : (∀ j,Y j) → ℝ) |
| 29 | (hf : ∀ x,|f x| ≤ 1) (hg : ∀ y,|g y| ≤ 1) : |
| 30 | |mean ρ f g-mean σ f g| ≤ ∑ i,ε i |
| 31 | |
| 32 | axiom reference_product_comparison (ρ : ∀ i,X i × Y i → ℝ) |
| 33 | (α : ∀ i,X i → ℝ) (β : ∀ i,Y i → ℝ) |
| 34 | (hρ : ∀ i,Probability (ρ i)) (hα : ∀ i,Probability (α i)) (hβ : ∀ i,Probability (β i)) |
| 35 | (ε : ι → ℝ) |
| 36 | (hc : ∀ i,∀ f : X i → ℝ,∀ g : Y i → ℝ,(∀ x,|f x| ≤ 1) → (∀ y,|g y| ≤ 1) → |
| 37 | |(∑ z : X i × Y i,ρ i z*f z.1*g z.2)- |
| 38 | (∑ x,α i x*f x)*(∑ y,β i y*g y)| ≤ ε i) |
| 39 | (f : (∀ i,X i) → ℝ) (g : (∀ i,Y i) → ℝ) |
| 40 | (hf : ∀ x,|f x| ≤ 1) (hg : ∀ y,|g y| ≤ 1) : |
| 41 | |mean ρ f g-(∑ x,(∏ i,α i (x i))*f x)*(∑ y,(∏ i,β i (y i))*g y)| ≤ ∑ i,ε i |
| 42 | |
| 43 | end |
| 44 | noncomputable section |
| 45 | variable {ι : Type} [Fintype ι] [DecidableEq ι] |
| 46 | {X Y Ω : ι → Type} [∀ i,Fintype (Ω i)] [∀ i,Nonempty (Ω i)] |
| 47 | open Lax342547.RealCellLaws |
| 48 | |
| 49 | axiom uniform_group_comparison [∀ i,Fintype (X i)] [∀ i,Fintype (Y i)] (x : ∀ i,Ω i → X i) (y : ∀ i,Ω i → Y i) |
| 50 | (ε : ι → ℝ) |
| 51 | (hc : ∀ i,∀ f : X i → ℝ,∀ g : Y i → ℝ,(∀ x,|f x| ≤ 1) → (∀ y,|g y| ≤ 1) → |
| 52 | |(∑ o : Ω i,weights (PMF.uniformOfFintype _) o*(f (x i o)*g (y i o)))- |
| 53 | (∑ o : Ω i,weights (PMF.uniformOfFintype _) o*f (x i o))* |
| 54 | (∑ o : Ω i,weights (PMF.uniformOfFintype _) o*g (y i o))| ≤ ε i) |
| 55 | (f : (∀ i,X i) → ℝ) (g : (∀ i,Y i) → ℝ) |
| 56 | (hf : ∀ x,|f x| ≤ 1) (hg : ∀ y,|g y| ≤ 1) : |
| 57 | |(∑ o : ∀ i,Ω i,weights (PMF.uniformOfFintype _) o* |
| 58 | (f (fun i => x i (o i))*g (fun i => y i (o i))))- |
| 59 | (∑ o : ∀ i,Ω i,weights (PMF.uniformOfFintype _) o*f (fun i => x i (o i)))* |
| 60 | (∑ o : ∀ i,Ω i,weights (PMF.uniformOfFintype _) o*g (fun i => y i (o i)))| ≤ ∑ i,ε i |
| 61 | |
| 62 | end |
| 63 | end Lax342547.GroupTensorComparison |
| 64 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments