File size: 994 Bytes
f205175 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 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
|