Download data/lean/OAI/Combinatorics/DiscreteConvexity/SignedArrays.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.02 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/DiscreteConvexity/SignedArrays.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/DiscreteConvexity/SignedArrays.lean
-
curl -L -o SignedArrays.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/DiscreteConvexity/SignedArrays.lean
6.02 kB
| import OAI.Combinatorics.DiscreteConvexity.Basic | |
| import OAI.Combinatorics.DiscreteConvexity.FourierWeights | |
| import OAI.Combinatorics.DiscreteConvexity.ColumnExpansion | |
| import OAI.Combinatorics.DiscreteConvexity.ExceptionalWeightBound | |
| namespace OAI | |
| /-! | |
| # Signed arrays force weight on every exceptional set | |
| The arrays have one common set of rows. Each column in `S` receives the | |
| Bernoulli product mass minus the product of the alternating corrections. | |
| All-zero columns in `S` have zero signed mass. This gives pointwise vanishing | |
| for exceptional sets, without any nonnegativity assumption on these masses. | |
| Expanding the column products and summing independently over the rows gives | |
| the exact signed coefficient identity. | |
| -/ | |
| noncomputable section | |
| open scoped BigOperators | |
| namespace TalagrandDiscreteConvexity | |
| variable {V : Type*} [Fintype V] [DecidableEq V] | |
| def signedArrayMass (q : β) {k : β} (S : Finset V) | |
| (X : Fin k β V β Bool) : β := | |
| β i, ((β j, bitWeight q (X j i)) - | |
| if i β S then β j, correction q (X j i) else 0) | |
| /-- Choosing the correction columns factors into the same coefficient kernel | |
| in every row. -/ | |
| theorem columnKernel_eq_rowKernel (q : β) {k : β} (U : Finset V) | |
| (X : Fin k β V β Bool) : | |
| (β i, if i β U then β j, correction q (X j i) | |
| else β j, bitWeight q (X j i)) = | |
| β j, rowKernel q U (X j) := by | |
| unfold rowKernel | |
| rw [Finset.prod_comm] | |
| apply Finset.prod_congr rfl | |
| intro i _ | |
| by_cases hi : i β U <;> simp only [hi, ite_true, ite_false] | |
| /-- The finite product expansion, followed by exact row factorization. | |
| It is valid for every real q and every real-valued row function. -/ | |
| theorem signed_array_identity (q : β) (k : β) | |
| (f : (V β Bool) β β) (S : Finset V) : | |
| (β X : Fin k β V β Bool, (β j, f (X j)) * signedArrayMass q S X) = | |
| β U β S.powerset, (-1 : β) ^ U.card * b q f U ^ k := by | |
| classical | |
| calc | |
| (β X : Fin k β V β Bool, (β j, f (X j)) * signedArrayMass q S X) = | |
| β X : Fin k β V β Bool, β U β S.powerset, | |
| (-1 : β) ^ U.card * β j, (f (X j) * rowKernel q U (X j)) := by | |
| apply Finset.sum_congr rfl | |
| intro X _ | |
| rw [signedArrayMass, prod_sub_ite_eq_sum_powerset, Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro U _ | |
| rw [columnKernel_eq_rowKernel, Finset.prod_mul_distrib] | |
| exact mul_left_comm _ _ _ | |
| _ = β U β S.powerset, (-1 : β) ^ U.card * | |
| β X : Fin k β V β Bool, β j, (f (X j) * rowKernel q U (X j)) := by | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro U _ | |
| rw [Finset.mul_sum] | |
| _ = β U β S.powerset, (-1 : β) ^ U.card * b q f U ^ k := by | |
| apply Finset.sum_congr rfl | |
| intro U _ | |
| congr 1 | |
| rw [β Fintype.prod_sum (fun (_ : Fin k) (x : V β Bool) => | |
| f x * rowKernel q U x)] | |
| simp only [b, Finset.prod_const, Finset.card_univ, Fintype.card_fin] | |
| /-- An all-zero column in S cancels exactly; the masses may be signed. -/ | |
| theorem signedArrayMass_eq_zero_of_zero_column (q : β) {k : β} | |
| {S : Finset V} {X : Fin k β V β Bool} {i : V} | |
| (hi : i β S) (hzero : β j, X j i = false) : | |
| signedArrayMass q S X = 0 := by | |
| apply Finset.prod_eq_zero (Finset.mem_univ i) | |
| simp [hi, hzero, bitWeight, correction] | |
| /-- On an exceptional set, either one row leaves the family or some column | |
| of S is all zero. In either case the signed summand vanishes. -/ | |
| theorem exceptional_signed_summand_eq_zero (q : β) {k : β} | |
| {D : Family V} {S : Finset V} (hS : S β exceptional k D) | |
| (X : Fin k β V β Bool) : | |
| (β j, familyIndicator D (X j)) * signedArrayMass q S X = 0 := by | |
| classical | |
| by_cases hrows : β j, cubeSet (X j) β D | |
| Β· obtain β¨i, hi, hmissingβ© := | |
| exceptional_tuple_misses hS (fun j => cubeSet (X j)) hrows | |
| have hzero (j : Fin k) : X j i = false := by | |
| cases hbit : X j i with | |
| | false => rfl | |
| | true => | |
| exact False.elim (hmissing j (by simp [cubeSet, hbit])) | |
| rw [signedArrayMass_eq_zero_of_zero_column q hi hzero, mul_zero] | |
| Β· obtain β¨j, hjβ© := not_forall.mp hrows | |
| have hprod : (β j, familyIndicator D (X j)) = 0 := by | |
| apply Finset.prod_eq_zero (Finset.mem_univ j) | |
| simp only [familyIndicator, ite_eq_right hj] | |
| rw [hprod, zero_mul] | |
| /-- The exact vanishing signed expansion on an exceptional set. -/ | |
| theorem exceptional_signed_sum_eq_zero (q : β) {k : β} | |
| {D : Family V} {S : Finset V} (hS : S β exceptional k D) : | |
| (β U β S.powerset, (-1 : β) ^ U.card * b q (familyIndicator D) U ^ k) = 0 := by | |
| rw [β signed_array_identity] | |
| apply Finset.sum_eq_zero | |
| intro X _ | |
| exact exceptional_signed_summand_eq_zero q hS X | |
| theorem exceptional_signed_identity (q : β) | |
| {D : Family V} {S : Finset V} (hS : S β exceptional 32 D) : | |
| 0 = β U β S.powerset, (-1 : β) ^ U.card * b q (familyIndicator D) U ^ 32 := | |
| (exceptional_signed_sum_eq_zero q hS).symm | |
| /-- The actual exceptional-weight bound, at the original family density. -/ | |
| theorem exceptional_weight_lower_bound (q : β) | |
| {D : Family V} (hD : (1 / 2 : β) β€ familyMeasure q D) | |
| {S : Finset V} (hS : S β exceptional 32 D) : | |
| (1 / 2 : β) ^ 32 β€ | |
| β U β S.powerset.erase β , w q (familyIndicator D) U ^ 16 := by | |
| apply exceptional_lower_bound_of_signed_sum S (b q (familyIndicator D)) | |
| (exceptional_signed_sum_eq_zero q hS) | |
| simpa only [b_empty, cubeExpectation_familyIndicator] using hD | |
| /-- The filter form used to combine the exceptional bound with weight bins. -/ | |
| theorem exceptional_weight_lower_bound_filter (q : β) | |
| {D : Family V} (hD : (1 / 2 : β) β€ familyMeasure q D) | |
| {S : Finset V} (hS : S β exceptional 32 D) : | |
| (1 / 2 : β) ^ 32 β€ | |
| β U β S.powerset.filter (fun U => U β β ), w q (familyIndicator D) U ^ 16 := by | |
| simpa only [Finset.filter_ne'] using exceptional_weight_lower_bound q hD hS | |
| end TalagrandDiscreteConvexity | |
| end | |
| end OAI | |