Download data/lean/OAI/Computability/DepthThree/CylinderProbability.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 1.86 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/DepthThree/CylinderProbability.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/DepthThree/CylinderProbability.lean
-
curl -L -o CylinderProbability.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/DepthThree/CylinderProbability.lean
1.86 kB
| import OAI.Computability.DepthThree.FiniteProbability | |
| import Mathlib.Algebra.BigOperators.GroupWithZero.Finset | |
| import Mathlib.Tactic.NormNum | |
| namespace OAI | |
| universe uDepth1 | |
| noncomputable section | |
| open scoped BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| namespace DepthThreeLowerBound | |
| variable {V : Type uDepth1} [Fintype V] | |
| theorem finiteAvg_eq_pattern (U : Finset V) (Ο : Cube V) : | |
| finiteAvg (fun x : Cube V => | |
| if β v β U, x v = Ο v then (1 : β) else 0) = | |
| ((2 : β) ^ U.card)β»ΒΉ := by | |
| classical | |
| let q : V β Bool β β := fun v b => if v β U β b = Ο v then 1 else 0 | |
| have hpoint (x : Cube V) : | |
| (if β v β U, x v = Ο v then (1 : β) else 0) = β v, q v (x v) := by | |
| dsimp [q] | |
| rw [Fintype.prod_boole] | |
| have hcoordinate (v : V) : | |
| finiteAvg (q v) = if v β U then (2 : β)β»ΒΉ else 1 := by | |
| by_cases hv : v β U | |
| Β· cases hΟ : Ο v <;> | |
| norm_num [q, hv, hΟ, finiteAvg, Fintype.sum_bool] | |
| Β· simp [q, hv] | |
| calc | |
| _ = finiteAvg (fun x : Cube V => β v, q v (x v)) := finiteAvg_congr hpoint | |
| _ = β v, finiteAvg (q v) := finiteAvg_pi_prod q | |
| _ = β v, if v β U then (2 : β)β»ΒΉ else 1 := by | |
| exact Finset.prod_congr rfl (fun v _ => hcoordinate v) | |
| _ = ((2 : β) ^ U.card)β»ΒΉ := by | |
| rw [β Finset.prod_filter] | |
| have hfilter : Finset.univ.filter (fun v => v β U) = U := by | |
| ext v | |
| simp | |
| rw [hfilter, Finset.prod_const, inv_pow] | |
| theorem finiteAvg_indicator_eq_pattern (U : Finset V) (Ο : Cube V) : | |
| finiteAvg (fun x : Cube V => indicator (decide (β v β U, x v = Ο v))) = | |
| ((2 : β) ^ U.card)β»ΒΉ := by | |
| refine (finiteAvg_congr fun x => ?_).trans (finiteAvg_eq_pattern U Ο) | |
| by_cases hx : β v β U, x v = Ο v <;> simp [indicator, hx] | |
| end DepthThreeLowerBound | |
| end | |
| end OAI | |