math / data /lean /OAI /Computability /VertexCover /Repetition /SelectedCommon.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.84 kB
import Mathlib
import OAI.Computability.VertexCover.Repetition.SelectedMarginal
namespace OAI
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
namespace UniqueGames.Foundations.Repetition
open scoped BigOperators
open Games Information
noncomputable section
theorem isProbability_comp_equiv {A B : Type*} [Fintype A] [Fintype B]
(e : A ≃ B) (p : B β†’ ℝ) (hp : IsProbability p) :
IsProbability (fun a => p (e a)) := by
constructor
Β· intro a
exact hp.1 _
Β· rw [e.sum_comp]
exact hp.2
theorem partialRevealMarginal_isProbability
{I T X Y : Type*} [Fintype I] [DecidableEq I] [Fintype T]
[Fintype X] [Fintype Y] [DecidableEq X] [DecidableEq Y]
(ΞΌ : FiniteDistribution (X Γ— Y)) (j : I)
(likelihood : T β†’ (I β†’ X Γ— Y) β†’ ℝ)
(hp : IsProbability (fullRevealMarginal ΞΌ j likelihood)) :
IsProbability (partialRevealMarginal ΞΌ j likelihood) := by
apply (maskedJoint_isProbability_iff _).mp
have h := isProbability_comp_equiv (revealSplitEquiv (T := T) j).symm _ hp
have he : (fun z => fullRevealMarginal ΞΌ j likelihood
((revealSplitEquiv (T := T) j).symm z)) =
maskedJoint (partialRevealMarginal ΞΌ j likelihood) := by
funext z
exact fullRevealMarginal_merge ΞΌ j likelihood z.1.1.1 z.1.1.2 z.1.2 z.2
rw [he] at h
exact h
variable {Q₁ Qβ‚‚ A₁ Aβ‚‚ : Type*}
[Fintype Q₁] [Fintype Qβ‚‚] [Fintype A₁] [Fintype Aβ‚‚]
[DecidableEq Q₁] [DecidableEq Qβ‚‚] {n : Nat}
abbrev SelectedCommonData (selected : Finset (Fin n))
(j : {i : Fin n // i βˆ‰ selected}) :=
((selected β†’ Q₁ Γ— Qβ‚‚) Γ— SelectedLabels (A₁ := A₁) (Aβ‚‚ := Aβ‚‚) selected) Γ—
({i : {i : Fin n // i βˆ‰ selected} // i β‰  j} β†’ Q₁ βŠ• Qβ‚‚)
theorem selected_fullReveal_isProbability (G : Game Q₁ Qβ‚‚ A₁ Aβ‚‚)
(strategy : Strategy (Fin n β†’ Q₁) (Fin n β†’ Qβ‚‚) (Fin n β†’ A₁) (Fin n β†’ Aβ‚‚))
(selected : Finset (Fin n)) (positive : 0 < G.selectedSuccess strategy selected)
(j : {i : Fin n // i βˆ‰ selected}) :
IsProbability (fullRevealMarginal G.questions j
(selectedOutsideLikelihood G strategy selected)) := by
have h := isProbability_comp_equiv
(selectedObservationEquiv (Q₁ := Q₁) (Qβ‚‚ := Qβ‚‚) (A₁ := A₁) (Aβ‚‚ := Aβ‚‚) selected).symm
_ (selectedRawMarginal_isProbability G strategy selected positive j)
have he : (fun z => selectedRawMarginal G strategy selected j
((selectedObservationEquiv (Q₁ := Q₁) (Qβ‚‚ := Qβ‚‚) (A₁ := A₁) (Aβ‚‚ := Aβ‚‚) selected).symm z)) =
fullRevealMarginal G.questions j (selectedOutsideLikelihood G strategy selected) := by
funext z
exact selectedRawMarginal_fullReveal G strategy selected j z
rw [he] at h
exact h
def selectedCommonLaw (G : Game Q₁ Qβ‚‚ A₁ Aβ‚‚)
(strategy : Strategy (Fin n β†’ Q₁) (Fin n β†’ Qβ‚‚) (Fin n β†’ A₁) (Fin n β†’ Aβ‚‚))
(selected : Finset (Fin n)) (positive : 0 < G.selectedSuccess strategy selected)
(j : {i : Fin n // i βˆ‰ selected}) :
FiniteDistribution (SelectedCommonData (Q₁ := Q₁) (Qβ‚‚ := Qβ‚‚)
(A₁ := A₁) (Aβ‚‚ := Aβ‚‚) selected j Γ— (Q₁ Γ— Qβ‚‚)) :=
toGameLaw (partialRevealMarginal G.questions j (selectedOutsideLikelihood G strategy selected))
(partialRevealMarginal_isProbability G.questions j _
(selected_fullReveal_isProbability G strategy selected positive j))
end
end UniqueGames.Foundations.Repetition
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end OAI