Actual reference-batch laws for mutual Gram tests
Lax342547.GramOrbitDensity · concepts/Lax342547/GramOrbitDensity.lean · lax-342547
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
Flatten both signs of a paired Gram orbit into one batch. Its independent-bit density denominator is explicit; arbitrary tests retain the reciprocal mutual-Gram comparison with no independence assumption inside either batch.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax342547.FrameTuples |
| 2 | import Lax342547.RealCellLaws |
| 3 | import Lax342547.CrossGramBasis |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Actual reference-batch laws for mutual Gram tests |
| 8 | type: lemma |
| 9 | --- |
| 10 | Flatten both signs of a paired Gram orbit into one batch. Its independent-bit |
| 11 | density denominator is explicit; arbitrary tests retain the reciprocal |
| 12 | mutual-Gram comparison with no independence assumption inside either batch. |
| 13 | -/ |
| 14 | |
| 15 | namespace Lax342547.GramOrbitDensity |
| 16 | |
| 17 | open Lax342547.RelativeEntropy |
| 18 | open scoped BigOperators |
| 19 | |
| 20 | open Lax342547.MomentSpace Lax342547.FrameTuples Lax342547.RealCellLaws |
| 21 | |
| 22 | def batchEquiv {I J N : Type} : |
| 23 | (Matrix N I Binary × Matrix N J Binary) ≃ (N × (I ⊕ J) → Binary) where |
| 24 | toFun z p := match p.2 with |
| 25 | | Sum.inl i => z.1 p.1 i |
| 26 | | Sum.inr j => z.2 p.1 j |
| 27 | invFun x := (fun n i => x (n,Sum.inl i),fun n j => x (n,Sum.inr j)) |
| 28 | left_inv z := rfl |
| 29 | right_inv x := by funext p; rcases p with ⟨n,i|j⟩ <;> rfl |
| 30 | |
| 31 | noncomputable def batchLaw {I J N : Type} [Fintype I] [Fintype J] [Fintype N] |
| 32 | [DecidableEq N] (G : Matrix I J Binary) [Nonempty (Orbit N G)] : |
| 33 | (N × (I ⊕ J) → Binary) → ℝ := |
| 34 | weights ((PMF.uniformOfFintype (Orbit N G)).map (fun z => batchEquiv z.val)) |
| 35 | |
| 36 | axiom batch_probability {I J N : Type} [Fintype I] [Fintype J] [Fintype N] |
| 37 | [DecidableEq I] [DecidableEq J] [DecidableEq N] (G : Matrix I J Binary) |
| 38 | [Nonempty (Orbit N G)] : Probability (batchLaw (N := N) G) |
| 39 | |
| 40 | axiom batch_point_cap {I J N : Type} [Fintype I] [Fintype J] [Fintype N] |
| 41 | [DecidableEq I] [DecidableEq J] [DecidableEq N] (G : Matrix I J Binary) |
| 42 | [Nonempty (Orbit N G)] (hN : Fintype.card I+Fintype.card J+1 ≤ Fintype.card N) |
| 43 | (x : N × (I ⊕ J) → Binary) : |
| 44 | batchLaw G x ≤ (2 : ℝ)^(Fintype.card I*Fintype.card J+2)/ |
| 45 | (2 : ℝ)^(Fintype.card N*(Fintype.card I+Fintype.card J)) |
| 46 | |
| 47 | axiom mutual_gram_comparison {I J K L : Type} [Fintype I] [Fintype J] |
| 48 | [Fintype K] [Fintype L] [DecidableEq I] [DecidableEq J] [DecidableEq K] [DecidableEq L] |
| 49 | (N : ℕ) (G : Matrix I J Binary) (H : Matrix K L Binary) |
| 50 | [Nonempty (Orbit (Fin N) G)] [Nonempty (Orbit (Fin N) H)] |
| 51 | (f : (Fin N × (I ⊕ J) → Binary) → ℝ) (g : (Fin N × (K ⊕ L) → Binary) → ℝ) |
| 52 | (target : Lax342547.CrossGramBasis.Slots I J K L → Binary) |
| 53 | (hN₁ : Fintype.card I+Fintype.card J+1 ≤ N) |
| 54 | (hN₂ : Fintype.card K+Fintype.card L+1 ≤ N) |
| 55 | (hf : ∀ x,|f x| ≤ 1) (hg : ∀ y,|g y| ≤ 1) |
| 56 | (hsmall : ((2 : ℝ)^(Fintype.card I*Fintype.card J+2))* |
| 57 | ((2 : ℝ)^(Fintype.card K*Fintype.card L+2))/Real.sqrt ((2 : ℝ)^N) ≤ |
| 58 | 1/(2 : ℝ)^(Fintype.card (Lax342547.CrossGramBasis.Slots I J K L)+1)) : |
| 59 | |Lax342547.FourierTests.patternMass (fun xy => batchLaw G xy.1*batchLaw H xy.2*(f xy.1*g xy.2)) |
| 60 | (Lax342547.CrossBatchMixing.crossBits Lax342547.CrossGramBasis.tests N) target / |
| 61 | Lax342547.FourierTests.patternMass (fun xy => batchLaw G xy.1*batchLaw H xy.2) |
| 62 | (Lax342547.CrossBatchMixing.crossBits Lax342547.CrossGramBasis.tests N) target - |
| 63 | (∑ x,batchLaw G x*f x)*(∑ y,batchLaw H y*g y)| ≤ |
| 64 | (2 : ℝ)^(Fintype.card (Lax342547.CrossGramBasis.Slots I J K L)+2)* |
| 65 | (((2 : ℝ)^(Fintype.card I*Fintype.card J+2))* |
| 66 | ((2 : ℝ)^(Fintype.card K*Fintype.card L+2))/Real.sqrt ((2 : ℝ)^N)) |
| 67 | |
| 68 | end Lax342547.GramOrbitDensity |
| 69 |
Used by
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments