Download data/lean/OAI/Probability/BinarySweep/FiniteLaws/IndependentPush.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 1.54 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/BinarySweep/FiniteLaws/IndependentPush.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/BinarySweep/FiniteLaws/IndependentPush.lean
-
curl -L -o IndependentPush.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/BinarySweep/FiniteLaws/IndependentPush.lean
1.54 kB
| import Mathlib | |
| namespace OAI | |
| noncomputable section | |
| open scoped BigOperators Classical | |
| namespace BinaryCoordinateSweeps | |
| variable {I : Type*} [Fintype I] {Ξ© G : I β Type*} | |
| [βi,Fintype (Ξ© i)] [βi,Fintype (G i)] | |
| def finitePush {X Y : Type*} [Fintype X] (w : X β β) (f : X β Y) (y : Y) : β := | |
| βx, if f x=y then w x else 0 | |
| omit [β i, Fintype (G i)] in | |
| lemma finitePush_pi (w : βi, Ξ© i β β) (f : βi, Ξ© i β G i) (g : βi, G i) : | |
| (βi, finitePush (w i) (f i) (g i)) = | |
| finitePush (fun x : βi, Ξ© i => βi,w i (x i)) (fun x i => f i (x i)) g := by | |
| unfold finitePush | |
| rw [Fintype.prod_sum] | |
| apply Finset.sum_congr rfl | |
| intro x _ | |
| rw [Fintype.prod_ite_zero] | |
| congr 1 | |
| exact propext funext_iff.symm | |
| lemma finitePush_expectation {X Y V : Type*} [Fintype X] [Fintype Y] | |
| [AddCommMonoid V] [Module β V] (w : X β β) (f : X β Y) (F : Y β V) : | |
| (βy, finitePush w f y β’ F y)=βx,w x β’ F (f x) := by | |
| classical | |
| unfold finitePush | |
| simp only [Finset.sum_smul] | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro x _ | |
| simp only [ite_smul,zero_smul] | |
| simp | |
| lemma independentPush_expectation {V : Type*} [AddCommMonoid V] [Module β V] | |
| (w : βi, Ξ© i β β) (f : βi, Ξ© i β G i) (F : (βi,G i) β V) : | |
| (βg : βi,G i, (βi,finitePush (w i) (f i) (g i)) β’ F g)= | |
| βx : βi,Ξ© i, (βi,w i (x i)) β’ F (fun i=>f i (x i)) := by | |
| simp_rw [finitePush_pi] | |
| exact finitePush_expectation _ _ _ | |
| end BinaryCoordinateSweeps | |
| end | |
| end OAI | |