File size: 2,247 Bytes
4a56cd6 | 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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | import Mathlib
import OAI.Computability.MinUncut.Games.JointHintSampling
namespace OAI
section
noncomputable section
open scoped BigOperators
namespace MinUncut.Outer
open MinUncut.Inner OuterSmoothness MeasureTheory
attribute [local instance] Classical.propDecidable BinaryFourier.dualFintype
variable {Name I S : Type*} [Fintype I] [Fintype S]
abbrev EdgeStatistic (Name I : Type*) [Fintype I] :=
(U : I β Equation Name) β (hidden : I β Bool) β (pos : I β Fin 3) β β
def edgeMean (equations : S β Equation Name) (k : β) (F : EdgeStatistic Name I) : β :=
πΌ H : FixedSets I k, πΌ a : I β S, πΌ pos : I β Fin 3,
F (fun i => equations (a i)) (hiddenSet H.val) pos
lemma edgeMean_mono (equations : S β Equation Name) (k : β) {F G : EdgeStatistic Name I}
(h : β U hidden pos, F U hidden pos β€ G U hidden pos) :
edgeMean equations k F β€ edgeMean equations k G := by
exact Finset.expect_le_expect (fun H _ => Finset.expect_le_expect (fun a _ =>
Finset.expect_le_expect (fun pos _ => h _ _ _)))
lemma edgeMean_add (equations : S β Equation Name) (k : β) (F G : EdgeStatistic Name I) :
edgeMean equations k (fun U h pos => F U h pos+G U h pos) =
edgeMean equations k F+edgeMean equations k G := by
simp only [edgeMean,Finset.expect_add_distrib]
lemma edgeMean_mul (equations : S β Equation Name) (k : β) (F : EdgeStatistic Name I) (t : β) :
edgeMean equations k (fun U h pos => t*F U h pos) = t*edgeMean equations k F := by
simp only [edgeMean,β Finset.mul_expect]
lemma edgeMean_expect {X : Type*} [Fintype X] (equations : S β Equation Name) (k : β)
(F : X β EdgeStatistic Name I) :
(πΌ x, edgeMean equations k (F x)) = edgeMean equations k (fun U h pos => πΌ x,F x U h pos) := by
unfold edgeMean
rw [Finset.expect_comm]
congr 1
funext H
rw [Finset.expect_comm]
congr 1
funext a
rw [Finset.expect_comm]
lemma edgeMean_const [Nonempty S] (equations : S β Equation Name) {k : β}
(hk : kβ€Fintype.card I) (t : β) : edgeMean (I := I) equations k (fun _ _ _ => t)=t := by
let : Nonempty (FixedSets I k) := fixedSets_nonempty hk
simp only [edgeMean,Fintype.expect_const]
end MinUncut.Outer
end
end
end OAI
|