Download lean/OAI/Probability/CriticalPercolation/Entropy/FiberValue.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 994 Bytes
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Probability/CriticalPercolation/Entropy/FiberValue.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Probability/CriticalPercolation/Entropy/FiberValue.lean
-
curl -L -o FiberValue.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Probability/CriticalPercolation/Entropy/FiberValue.lean
994 Bytes
| import Mathlib | |
| namespace OAI | |
| section | |
| section | |
| open Set MeasureTheory ProbabilityTheory | |
| open Real | |
| open Set Real | |
| open scoped Topology | |
| open scoped BigOperators | |
| open Set | |
| open Set MeasureTheory | |
| open Set MeasureTheory Real | |
| open scoped Interval | |
| open scoped Classical | |
| namespace CriticalPercolation.FiniteEntropy | |
| open scoped Classical | |
| variable {X Y : Type*} | |
| noncomputable def fiberValue (f : X → Y) (g : X → ℝ) (y : Y) : ℝ := | |
| if h : ∃ x, f x = y then g h.choose else 0 | |
| lemma fiberValue_apply (f : X → Y) (g : X → ℝ) | |
| (hg : ∀ x x', f x = f x' → g x = g x') (x : X) : fiberValue f g (f x) = g x := by | |
| unfold fiberValue | |
| rw [dite_eq_left ⟨x,rfl⟩] | |
| exact hg _ x (Exists.choose_spec (show ∃ y, f y = f x from ⟨x,rfl⟩)) | |
| lemma fiberValue_nonneg (f : X → Y) (g : X → ℝ) | |
| (hg : ∀ x, 0 ≤ g x) (y : Y) : 0 ≤ fiberValue f g y := by | |
| unfold fiberValue | |
| split_ifs | |
| · exact hg _ | |
| · exact le_rfl | |
| end CriticalPercolation.FiniteEntropy | |
| end | |
| end | |
| end OAI | |