Buckets:
| import Mathlib | |
| import OAI.Computability.VertexCover.Repetition.SelectedJoint | |
| 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 | |
| variable {Q₁ Q₂ A₁ A₂ : Type*} | |
| [Fintype Q₁] [Fintype Q₂] [Fintype A₁] [Fintype A₂] | |
| [DecidableEq Q₁] [DecidableEq Q₂] {n : Nat} | |
| omit [DecidableEq Q₁] [DecidableEq Q₂] in | |
| theorem selectedSplit_question_probability (G : Game Q₁ Q₂ A₁ A₂) | |
| (selected : Finset (Fin n)) | |
| (event : ((Fin n → Q₁) × (Fin n → Q₂)) → Bool) : | |
| (selectedSplitLaw G selected).probability | |
| (fun q => event (selectedQuestionTuple selected q.1 q.2)) = | |
| (G.repetition n).questions.probability event := by | |
| rw [selectedSplitLaw, ← iid_coordinate_split, FiniteDistribution.probability_transport] | |
| change (G.questions.iid n).probability _ = | |
| ((G.questions.iid n).transport (Game.tupleQuestionEquiv n)).probability event | |
| rw [FiniteDistribution.probability_transport] | |
| apply congrArg (G.questions.iid n).probability | |
| funext q | |
| congr 1 | |
| apply Prod.ext <;> funext i <;> | |
| simp [selectedQuestionTuple, coordinateSplitEquiv, mergeCoordinates, Game.tupleQuestionEquiv] | |
| theorem selectedJoint_eventMass (G : Game Q₁ Q₂ A₁ A₂) | |
| (strategy : Strategy (Fin n → Q₁) (Fin n → Q₂) (Fin n → A₁) (Fin n → A₂)) | |
| (selected : Finset (Fin n)) | |
| (event : ((Fin n → Q₁) × (Fin n → Q₂)) → Bool) : | |
| (∑ tv : SelectedInput Q₁ Q₂ selected × | |
| SelectedLabels (A₁ := A₁) (A₂ := A₂) selected, | |
| (selectedInputLaw G selected).weight tv.1 * | |
| ∑ u, independentProduct | |
| (fun i => (selectedInputProfile G selected tv.1 i).weight) u * | |
| selectedLikelihood G strategy selected tv.1.1 tv.2 u * | |
| (if event (selectedQuestionTuple selected tv.1.1 u) then 1 else 0)) = | |
| (G.repetition n).questions.probability | |
| (fun q => G.selectedWins strategy selected q && event q) := by | |
| classical | |
| have hlabel (t : SelectedInput Q₁ Q₂ selected) : | |
| (∑ v, ∑ u, independentProduct | |
| (fun i => (selectedInputProfile G selected t i).weight) u * | |
| selectedLikelihood G strategy selected t.1 v u * | |
| (if event (selectedQuestionTuple selected t.1 u) then 1 else 0)) = | |
| ∑ u, independentProduct | |
| (fun i => (selectedInputProfile G selected t i).weight) u * | |
| (if G.selectedWins strategy selected (selectedQuestionTuple selected t.1 u) && | |
| event (selectedQuestionTuple selected t.1 u) then 1 else 0) := by | |
| rw [Finset.sum_comm] | |
| apply Finset.sum_congr rfl | |
| intro u _ | |
| rw [← Finset.sum_mul, ← Finset.mul_sum, selectedLikelihood_sum] | |
| cases hw : G.selectedWins strategy selected (selectedQuestionTuple selected t.1 u) <;> | |
| cases he : event (selectedQuestionTuple selected t.1 u) <;> simp [] | |
| rw [Fintype.sum_prod_type] | |
| simp_rw [← Finset.mul_sum, hlabel] | |
| rw [Fintype.sum_prod_type] | |
| simp only [selectedInputLaw, FiniteDistribution.product, FiniteDistribution.table, selectedInputProfile, independentProduct] | |
| simp_rw [mul_assoc, ← Finset.mul_sum] | |
| have hforget (fixed : selected → Q₁ × Q₂) := | |
| reveal_product_expectation G.questions | |
| (fun u : {i : Fin n // i ∉ selected} → Q₁ × Q₂ => | |
| if G.selectedWins strategy selected (selectedQuestionTuple selected fixed u) && | |
| event (selectedQuestionTuple selected fixed u) then (1 : ℝ) else 0) | |
| simp_rw [hforget] | |
| have h := selectedSplit_question_probability G selected | |
| (fun q => G.selectedWins strategy selected q && event q) | |
| simpa [selectedSplitLaw, FiniteDistribution.probability, FiniteDistribution.product, | |
| FiniteDistribution.table, Fintype.sum_prod_type, Finset.mul_sum, mul_ite, mul_assoc] using h | |
| theorem selectedJointLaw_question_probability (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) | |
| (event : ((Fin n → Q₁) × (Fin n → Q₂)) → Bool) : | |
| (selectedJointLaw G strategy selected positive).probability | |
| (fun z => event (selectedQuestionTuple selected z.1.1.1 z.2)) = | |
| ((G.repetition n).questions.condition (G.selectedWins strategy selected) positive).probability | |
| event := by | |
| classical | |
| erw [FiniteDistribution.probability_condition] | |
| change | |
| (∑ z : (SelectedInput Q₁ Q₂ selected × | |
| SelectedLabels (A₁ := A₁) (A₂ := A₂) selected) × | |
| ({i : Fin n // i ∉ selected} → Q₁ × Q₂), | |
| if event (selectedQuestionTuple selected z.1.1.1 z.2) | |
| then selectedJointWeight G strategy selected z else 0) = | |
| (G.repetition n).questions.probability | |
| (fun q => G.selectedWins strategy selected q && event q) / | |
| G.selectedSuccess strategy selected | |
| calc | |
| _ = (∑ tv : SelectedInput Q₁ Q₂ selected × | |
| SelectedLabels (A₁ := A₁) (A₂ := A₂) selected, | |
| (selectedInputLaw G selected).weight tv.1 * | |
| ∑ u, independentProduct | |
| (fun i => (selectedInputProfile G selected tv.1 i).weight) u * | |
| selectedLikelihood G strategy selected tv.1.1 tv.2 u * | |
| (if event (selectedQuestionTuple selected tv.1.1 u) then 1 else 0)) / | |
| G.selectedSuccess strategy selected := by | |
| conv_lhs => rw [Fintype.sum_prod_type] | |
| simp only [div_eq_mul_inv, Finset.sum_mul, Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro tv _ | |
| apply Finset.sum_congr rfl | |
| intro u _ | |
| cases he : event (selectedQuestionTuple selected tv.1.1 u) <;> | |
| simp [selectedJointWeight, div_eq_mul_inv, mul_assoc] | |
| _ = _ := by rw [selectedJoint_eventMass] | |
| theorem selectedJointLaw_questions_pushforward (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) : | |
| (selectedJointLaw G strategy selected positive).pushforward | |
| (fun z => selectedQuestionTuple selected z.1.1.1 z.2) = | |
| (G.repetition n).questions.condition (G.selectedWins strategy selected) positive := by | |
| classical | |
| apply FiniteDistribution.eq_of_weight_eq | |
| intro questions | |
| have h : | |
| ((selectedJointLaw G strategy selected positive).pushforward | |
| (fun z => selectedQuestionTuple selected z.1.1.1 z.2)).probability | |
| (fun q => decide (q = questions)) = | |
| ((G.repetition n).questions.condition (G.selectedWins strategy selected) positive).probability | |
| (fun q => decide (q = questions)) := by | |
| rw [FiniteDistribution.probability_pushforward] | |
| exact selectedJointLaw_question_probability G strategy selected positive | |
| (fun q => decide (q = questions)) | |
| simpa [FiniteDistribution.probability] using h | |
| 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 | |
Xet Storage Details
- Size:
- 7.46 kB
- Xet hash:
- f2c7f4c0bdeaaf3f633e75025f66f937cf13ebed6eb341dc6338b5db0f907bff
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.