Download lean/OAI/Combinatorics/MatchingCount/Probability/OnlineLawBridge.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 848 Bytes
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/MatchingCount/Probability/OnlineLawBridge.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Combinatorics/MatchingCount/Probability/OnlineLawBridge.lean
-
curl -L -o OnlineLawBridge.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/MatchingCount/Probability/OnlineLawBridge.lean
848 Bytes
| import Mathlib | |
| import OAI.Combinatorics.MatchingCount.Machines.OnlineUniform | |
| namespace OAI | |
| namespace MatchingFPRAS.PhysicalStream | |
| open Finset Variation | |
| variable {A B C : Type} [Fintype A] [Fintype B] [Fintype C] | |
| lemma qaverage_imageLaw (f : A→B) (h : B→ℚ) : | |
| ((qaverage (fun a=>h (f a)) : ℚ):ℝ)=∑ b,imageLaw f b*(h b:ℝ) := by | |
| classical | |
| unfold imageLaw push uniform | |
| simp only [sum_mul,ite_mul,zero_mul] | |
| rw [sum_comm] | |
| simp only [sum_ite_eq,mem_univ,ite_true,one_div,inv_mul_eq_div] | |
| unfold qaverage | |
| push_cast | |
| rw [sum_div] | |
| lemma qaverage_eq_of_imageLaw_eq (f : A→C) (g : B→C) | |
| (he : imageLaw f=imageLaw g) (h : C→ℚ) : | |
| qaverage (fun a=>h (f a))=qaverage (fun b=>h (g b)) := by | |
| apply Rat.cast_injective (α:=ℝ) | |
| rw [qaverage_imageLaw,qaverage_imageLaw,he] | |
| end MatchingFPRAS.PhysicalStream | |
| end OAI | |