Download data/lean/OAI/Combinatorics/DiscreteConvexity/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.43 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/DiscreteConvexity/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/DiscreteConvexity/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/DiscreteConvexity/Model.lean
2.43 kB
| import Mathlib.Data.Fintype.Powerset | |
| import Mathlib.Data.Finset.Union | |
| import Mathlib.Basic.Real.Basic | |
| import Mathlib.Algebra.Order.BigOperators.Group.Finset | |
| namespace OAI | |
| /-! | |
| # Finite families, containment covers, and exceptional sets | |
| All families are ordinary finite sets: repeated generators carry no extra cost. | |
| In contrast, the members of a union tuple may repeat. The exceptional family | |
| uses containment in a union, without any monotonicity assumption on the input. | |
| -/ | |
| namespace TalagrandDiscreteConvexity | |
| open scoped BigOperators | |
| abbrev Family (Ξ± : Type*) := Finset (Finset Ξ±) | |
| variable {Ξ± : Type*} [Fintype Ξ±] [DecidableEq Ξ±] | |
| noncomputable section | |
| /-- The mass of a subset under independent Bernoulli coordinates. -/ | |
| def bernoulliMass (p : β) (s : Finset Ξ±) : β := | |
| p ^ s.card * (1 - p) ^ (Finset.univ \ s).card | |
| /-- The Bernoulli measure of an arbitrary finite family. -/ | |
| def familyMeasure (p : β) (D : Family Ξ±) : β := | |
| β s β D, bernoulliMass p s | |
| /-- Cost at the specified density, counting each generator once. -/ | |
| def cost (p : β) (G : Family Ξ±) : β := β I β G, p ^ I.card | |
| /-- A cover supplies a contained generator for every target set. -/ | |
| def Covers (G A : Family Ξ±) : Prop := β S β A, β I β G, I β S | |
| /-- Smallness is witnessed by an actual containment cover of cost at most one half. -/ | |
| def Small (p : β) (A : Family Ξ±) : Prop := | |
| β G : Family Ξ±, Covers G A β§ cost p G β€ 1 / 2 | |
| /-- A union of exactly `k` entries; repetitions are allowed. -/ | |
| def unionTuple {k : β} (f : Fin k β Finset Ξ±) : Finset Ξ± := | |
| Finset.univ.biUnion f | |
| /-- All unions of `k` members of a family. -/ | |
| def unionFamily (k : β) (D : Family Ξ±) : Family Ξ± := by | |
| classical | |
| exact Finset.univ.filter (fun S => | |
| β f : Fin k β Finset Ξ±, (β j, f j β D) β§ unionTuple f = S) | |
| /-- Sets contained in no union of `k` members of `D`. -/ | |
| def exceptional (k : β) (D : Family Ξ±) : Family Ξ± := by | |
| classical | |
| exact Finset.univ.filter (fun S => | |
| β f : Fin k β Finset Ξ±, (β j, f j β D) β Β¬ S β unionTuple f) | |
| /-- The subset represented by a Boolean coordinate vector. -/ | |
| def cubeSet (x : Ξ± β Bool) : Finset Ξ± := | |
| Finset.univ.filter (fun i => x i = true) | |
| /-- The indicator of a family on the Boolean cube. -/ | |
| def familyIndicator (D : Family Ξ±) (x : Ξ± β Bool) : β := | |
| if cubeSet x β D then 1 else 0 | |
| end | |
| end TalagrandDiscreteConvexity | |
| end OAI | |