Buckets:
| import Mathlib | |
| import OAI.Computability.MaxCut.PCP.SelectedProfileBudget | |
| import OAI.Computability.MaxCut.PCP.CompletedSampling | |
| import OAI.Computability.MaxCut.Machines.AlphabetBudget | |
| namespace OAI | |
| namespace MaxCutGames.Foundations.Repetition.SelectionSequence | |
| private theorem exists_unused_inline_SelectionSequence {n : Nat} (S : Finset (Fin n)) (hcard : S.card < n) : | |
| ∃ j : Fin n, j ∉ S := by | |
| classical | |
| apply Classical.byContradiction | |
| intro h | |
| have hall : ∀ j : Fin n, j ∈ S := by | |
| intro j | |
| apply Classical.byContradiction | |
| intro hj | |
| exact h ⟨j, hj⟩ | |
| have hfull : S = Finset.univ := | |
| Finset.ext (fun j => iff_of_true (hall j) (Finset.mem_univ j)) | |
| have hbad : n < n := by | |
| simpa only [hfull, Finset.card_univ, Fintype.card_fin] using hcard | |
| exact Nat.lt_irrefl n hbad | |
| /-- Insert a chosen unused coordinate while there are coordinates remaining. -/ | |
| noncomputable def nextSet {n : Nat} | |
| (Step : Finset (Fin n) → Fin n → Prop) | |
| (witness : ∀ S, S.card < n → ∃ j, j ∉ S ∧ Step S j) | |
| (S : Finset (Fin n)) : Finset (Fin n) := | |
| if hs : S.card < n then insert (Classical.choose (witness S hs)) S else S | |
| /-- A total sequence, constant after all `n` coordinates have been selected. -/ | |
| noncomputable def selectedSet {n : Nat} | |
| (Step : Finset (Fin n) → Fin n → Prop) | |
| (witness : ∀ S, S.card < n → ∃ j, j ∉ S ∧ Step S j) : Nat → Finset (Fin n) | |
| | 0 => ∅ | |
| | m + 1 => nextSet Step witness (selectedSet Step witness m) | |
| theorem selectedSet_card {n : Nat} | |
| (Step : Finset (Fin n) → Fin n → Prop) | |
| (witness : ∀ S, S.card < n → ∃ j, j ∉ S ∧ Step S j) (m : Nat) : | |
| (selectedSet Step witness m).card = min m n := by | |
| induction m with | |
| | zero => simp [selectedSet] | |
| | succ m ih => | |
| by_cases hm : m < n | |
| · have hc : (selectedSet Step witness m).card = m := by | |
| simpa only [Nat.min_eq_left (Nat.le_of_lt hm)] using ih | |
| have hs : (selectedSet Step witness m).card < n := by | |
| simpa only [hc] using hm | |
| rw [selectedSet, nextSet, dite_eq_left hs, | |
| Finset.card_insert_of_notMem ((Classical.choose_spec (witness _ hs)).1), | |
| hc, Nat.min_eq_left (Nat.succ_le_of_lt hm)] | |
| · have hc : (selectedSet Step witness m).card = n := by | |
| simpa only [Nat.min_eq_right (Nat.le_of_not_gt hm)] using ih | |
| have hs : ¬(selectedSet Step witness m).card < n := by | |
| rw [hc] | |
| exact Nat.not_lt.mpr (Nat.le_refl n) | |
| rw [selectedSet, nextSet, dite_eq_right hs, hc, | |
| Nat.min_eq_right (Nat.le_trans (Nat.le_of_not_gt hm) (Nat.le_succ m))] | |
| theorem selectedSet_subset_succ {n : Nat} | |
| (Step : Finset (Fin n) → Fin n → Prop) | |
| (witness : ∀ S, S.card < n → ∃ j, j ∉ S ∧ Step S j) (m : Nat) : | |
| selectedSet Step witness m ⊆ selectedSet Step witness (m + 1) := by | |
| change selectedSet Step witness m ⊆ nextSet Step witness (selectedSet Step witness m) | |
| unfold nextSet | |
| split | |
| · exact Finset.subset_insert _ _ | |
| · exact le_rfl | |
| theorem selectedSet_monotone {n : Nat} | |
| (Step : Finset (Fin n) → Fin n → Prop) | |
| (witness : ∀ S, S.card < n → ∃ j, j ∉ S ∧ Step S j) : | |
| Monotone (selectedSet Step witness) := | |
| monotone_nat_of_le_succ (selectedSet_subset_succ Step witness) | |
| theorem selectedSet_univ {n : Nat} | |
| (Step : Finset (Fin n) → Fin n → Prop) | |
| (witness : ∀ S, S.card < n → ∃ j, j ∉ S ∧ Step S j) : | |
| selectedSet Step witness n = Finset.univ := by | |
| apply Finset.eq_of_subset_of_card_le (Finset.subset_univ _) | |
| simp [selectedSet_card] | |
| theorem selectedSet_step {n : Nat} | |
| (Step : Finset (Fin n) → Fin n → Prop) | |
| (witness : ∀ S, S.card < n → ∃ j, j ∉ S ∧ Step S j) | |
| (m : Nat) (hm : m < n) : | |
| ∃ j, j ∉ selectedSet Step witness m ∧ | |
| selectedSet Step witness (m + 1) = insert j (selectedSet Step witness m) ∧ | |
| Step (selectedSet Step witness m) j := by | |
| have hc : (selectedSet Step witness m).card = m := by | |
| rw [selectedSet_card, Nat.min_eq_left (Nat.le_of_lt hm)] | |
| have hs : (selectedSet Step witness m).card < n := by simpa only [hc] using hm | |
| let j := Classical.choose (witness (selectedSet Step witness m) hs) | |
| have hj := Classical.choose_spec (witness (selectedSet Step witness m) hs) | |
| refine ⟨j, hj.1, ?_, hj.2⟩ | |
| simp only [selectedSet, nextSet, dite_eq_left hs, j] | |
| /-- The multiplicative scalar inequality for one actual selected-set update. -/ | |
| def SetStep {n : Nat} (P : Finset (Fin n) → ℝ) (v ell : ℝ) | |
| (S : Finset (Fin n)) (j : Fin n) : Prop := | |
| P (insert j S) ≤ P S * | |
| (v + 15 * Real.sqrt (((S.card : ℝ) * ell + logTwo (1 / P S)) / | |
| ((n : ℝ) - S.card))) | |
| /-- At zero success, any unused coordinate is safe and no conditioning occurs. -/ | |
| theorem totalSetStep {n : Nat} (P : Finset (Fin n) → ℝ) (v ell : ℝ) | |
| (hnonneg : ∀ S, 0 ≤ P S) (hanti : Antitone P) | |
| (hpositive : ∀ S, S.card < n → 0 < P S → | |
| ∃ j, j ∉ S ∧ SetStep P v ell S j) : | |
| ∀ S, S.card < n → ∃ j, j ∉ S ∧ SetStep P v ell S j := by | |
| intro S hcard | |
| by_cases hp : 0 < P S | |
| · exact hpositive S hcard hp | |
| · obtain ⟨j, hj⟩ := exists_unused_inline_SelectionSequence S hcard | |
| have hz : P S = 0 := le_antisymm (le_of_not_gt hp) (hnonneg S) | |
| have hnext : P (insert j S) = 0 := le_antisymm | |
| ((hanti (Finset.subset_insert j S)).trans (le_of_eq hz)) (hnonneg (insert j S)) | |
| refine ⟨j, hj, ?_⟩ | |
| simpa only [SetStep, hnext, hz, zero_mul] using (le_refl (0 : ℝ)) | |
| /-- Construct the scalar sequence from actual selected-set probabilities. -/ | |
| theorem exists_scalar_sequence {n : Nat} (P : Finset (Fin n) → ℝ) (v ell : ℝ) | |
| (hempty : P ∅ = 1) (hnonneg : ∀ S, 0 ≤ P S) (hanti : Antitone P) | |
| (hpositive : ∀ S, S.card < n → 0 < P S → | |
| ∃ j, j ∉ S ∧ SetStep P v ell S j) : | |
| ∃ p : Nat → ℝ, p 0 = 1 ∧ (∀ m, 0 ≤ p m) ∧ Antitone p ∧ | |
| ScalarRecurrence p n v ell ∧ p n = P Finset.univ := by | |
| let witness := totalSetStep P v ell hnonneg hanti hpositive | |
| let sets := selectedSet (SetStep P v ell) witness | |
| let p := fun m => P (sets m) | |
| refine ⟨p, ?_, ?_, ?_, ?_, ?_⟩ | |
| · change P (selectedSet (SetStep P v ell) witness 0) = 1 | |
| simpa only [selectedSet] using hempty | |
| · intro m | |
| exact hnonneg (sets m) | |
| · intro i j hij | |
| exact hanti (selectedSet_monotone (SetStep P v ell) witness hij) | |
| · intro m hm | |
| obtain ⟨j, _, hnext, hbound⟩ := | |
| selectedSet_step (SetStep P v ell) witness m hm | |
| have hc : (selectedSet (SetStep P v ell) witness m).card = m := by | |
| rw [selectedSet_card, Nat.min_eq_left (Nat.le_of_lt hm)] | |
| change P (selectedSet (SetStep P v ell) witness (m + 1)) ≤ _ | |
| rw [hnext] | |
| simpa only [SetStep, hc] using hbound | |
| · change P (selectedSet (SetStep P v ell) witness n) = P Finset.univ | |
| rw [selectedSet_univ] | |
| open MaxCutGames.Foundations.Games | |
| variable {Q₁ Q₂ A₁ A₂ : Type*} | |
| variable [Fintype Q₁] [Fintype Q₂] [Fintype A₁] [Fintype A₂] | |
| variable [Nonempty A₁] [Nonempty A₂] | |
| def ConditionalCoordinateBound (G : Game Q₁ Q₂ A₁ A₂) (n : Nat) | |
| (strategy : Strategy (Fin n → Q₁) (Fin n → Q₂) (Fin n → A₁) (Fin n → A₂)) | |
| (ell : ℝ) : Prop := | |
| ∀ (S : Finset (Fin n)) (_hcard : S.card < n) | |
| (hp : 0 < G.selectedSuccess strategy S), | |
| ∃ j, j ∉ S ∧ | |
| (((G.repetition n).questions.condition (G.selectedWins strategy S) hp).probability | |
| (G.coordinateWin strategy j)) ≤ | |
| G.value + 15 * Real.sqrt | |
| (((S.card : ℝ) * ell + logTwo (1 / G.selectedSuccess strategy S)) / | |
| ((n : ℝ) - S.card)) | |
| /-- Apply the proved scalar estimate to the success of an actual repeated-game | |
| strategy. The conditional-coordinate bound is the sole game-theoretic premise. -/ | |
| theorem repetition_success_le_of_conditionalCoordinateBound | |
| (G : Game Q₁ Q₂ A₁ A₂) (n : Nat) | |
| (strategy : Strategy (Fin n → Q₁) (Fin n → Q₂) (Fin n → A₁) (Fin n → A₂)) | |
| {v ell : ℝ} (hvalue : G.value ≤ v) (hv1 : v < 1) (hell : 1 ≤ ell) | |
| (hcoordinate : ConditionalCoordinateBound G n strategy ell) : | |
| (G.repetition n).success strategy ≤ | |
| (1 - (1 - v)^3 / 6000)^((n : ℝ) / ell) := by | |
| have hpositive : ∀ S : Finset (Fin n), S.card < n → | |
| 0 < G.selectedSuccess strategy S → | |
| ∃ j, j ∉ S ∧ SetStep (G.selectedSuccess strategy) v ell S j := by | |
| intro S hcard hp | |
| obtain ⟨j, hj, hbound⟩ := hcoordinate S hcard hp | |
| refine ⟨j, hj, ?_⟩ | |
| change G.selectedSuccess strategy (insert j S) ≤ _ | |
| rw [G.selectedSuccess_insert strategy S j hp] | |
| exact mul_le_mul_of_nonneg_left | |
| (hbound.trans (add_le_add hvalue (le_refl _))) (le_of_lt hp) | |
| obtain ⟨p, hp0, hpnonneg, hpmono, hrec, hpn⟩ := | |
| exists_scalar_sequence (G.selectedSuccess strategy) v ell | |
| (G.selectedSuccess_empty strategy) (G.selectedSuccess_nonnegative strategy) | |
| (G.selectedSuccess_antitone strategy) hpositive | |
| have hbound := scalar_bound_6000 p n | |
| (G.value_nonnegative.trans hvalue) hv1 hell hp0 hpnonneg hpmono hrec | |
| rw [hpn, G.selectedSuccess_univ strategy] at hbound | |
| exact hbound | |
| end MaxCutGames.Foundations.Repetition.SelectionSequence | |
| /-! Quantitative parallel repetition for actual finite two-player games. | |
| The coordinate bound is derived from the explicitly conditioned question law, | |
| finite reveal «variables», information estimates, shared rejection sampler, | |
| and normalized local completions. The scalar recurrence is then applied to | |
| the actual repeated strategy's success probability. -/ | |
| namespace MaxCutGames.Foundations.Repetition | |
| open scoped BigOperators | |
| open Games | |
| noncomputable section | |
| variable {Q₁ Q₂ A₁ A₂ : Type*} | |
| [Fintype Q₁] [Fintype Q₂] [Fintype A₁] [Fintype A₂] | |
| [Nonempty A₁] [Nonempty A₂] | |
| [DecidableEq Q₁] [DecidableEq Q₂] {n : Nat} | |
| theorem selected_coordinate_probability_le_value_add_error | |
| (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}) : | |
| ((G.repetition n).questions.condition (G.selectedWins strategy selected) positive).probability | |
| (G.coordinateWin strategy j.1) ≤ | |
| G.value + selectedEmbeddingError G strategy selected positive j := by | |
| classical | |
| let : Nonempty (SelectedCommonData (Q₁ := Q₁) (Q₂ := Q₂) | |
| (A₁ := A₁) (A₂ := A₂) selected j) := | |
| finiteDistribution_nonempty (selectedProfileFallback G strategy selected positive j) | |
| have h := coordinate_probability_le_value_of_local_completion G j.1 strategy | |
| (selectedSamplingTarget G strategy selected positive j) | |
| (selectedLeftProfile G strategy selected positive j) | |
| (selectedRightProfile G strategy selected positive j) | |
| (selectedFullLeftCompletion G strategy selected j) | |
| (selectedFullRightCompletion G strategy selected j) | |
| (selectedFullLeftCompletion_support G strategy selected j) | |
| (selectedFullRightCompletion_support G strategy selected j) | |
| (Classical.choice inferInstance) | |
| have htarget : (selectedSamplingTarget G strategy selected positive j).mixture | |
| (fun z => (selectedFullLeftCompletion G strategy selected j (z.1.1,z.2)).product | |
| (selectedFullRightCompletion G strategy selected j (z.1.2,z.2))) = | |
| (G.repetition n).questions.condition (G.selectedWins strategy selected) positive := | |
| selectedFullCompletionMixture_eq_conditionedQuestions G strategy selected positive j | |
| rw [htarget, selectedSamplingTarget_left_error, selectedSamplingTarget_right_error] at h | |
| exact h | |
| theorem holenstein_conditionalCoordinateBound | |
| (G : Game Q₁ Q₂ A₁ A₂) (n : Nat) | |
| (strategy : Strategy (Fin n → Q₁) (Fin n → Q₂) (Fin n → A₁) (Fin n → A₂)) | |
| (ell : ℝ) | |
| (halphabet : logTwo ((Fintype.card A₁ : ℝ) * (Fintype.card A₂ : ℝ)) ≤ ell) : | |
| SelectionSequence.ConditionalCoordinateBound G n strategy ell := by | |
| intro selected hcard positive | |
| obtain ⟨j,hj⟩ := exists_coordinate_le_information_budget G strategy selected positive ell | |
| halphabet hcard (selectedEmbeddingError G strategy selected positive) | |
| (selectedEmbeddingError_sum_le_fifteen G strategy selected positive) | |
| exact ⟨j.1,j.property, | |
| (selected_coordinate_probability_le_value_add_error G strategy selected positive j).trans | |
| (add_le_add le_rfl hj)⟩ | |
| /-- Holenstein's explicit constant-6000 repetition estimate, for the actual | |
| success probability of every finite deterministic repeated strategy. -/ | |
| theorem holenstein_repetition_success | |
| (G : Game Q₁ Q₂ A₁ A₂) (n : Nat) | |
| (strategy : Strategy (Fin n → Q₁) (Fin n → Q₂) (Fin n → A₁) (Fin n → A₂)) | |
| {v ell : ℝ} (hvalue : G.value ≤ v) (hv : v < 1) (hell : 1 ≤ ell) | |
| (halphabet : logTwo ((Fintype.card A₁ : ℝ) * (Fintype.card A₂ : ℝ)) ≤ ell) : | |
| (G.repetition n).success strategy ≤ | |
| (1 - (1 - v)^3 / 6000)^((n : ℝ) / ell) := | |
| SelectionSequence.repetition_success_le_of_conditionalCoordinateBound G n strategy | |
| hvalue hv hell (holenstein_conditionalCoordinateBound G n strategy ell halphabet) | |
| /-- Quantitative parallel repetition of the actual maximum game value. | |
| There is no repetition, embedding, information-budget, or independence premise. -/ | |
| theorem holenstein_repetition_value | |
| (G : Game Q₁ Q₂ A₁ A₂) (n : Nat) | |
| {v ell : ℝ} (hvalue : G.value ≤ v) (hv : v < 1) (hell : 1 ≤ ell) | |
| (halphabet : logTwo ((Fintype.card A₁ : ℝ) * (Fintype.card A₂ : ℝ)) ≤ ell) : | |
| (G.repetition n).value ≤ | |
| (1 - (1 - v)^3 / 6000)^((n : ℝ) / ell) := by | |
| apply ((G.repetition n).value_le_iff _).2 | |
| intro strategy | |
| exact holenstein_repetition_success G n strategy hvalue hv hell halphabet | |
| end | |
| end MaxCutGames.Foundations.Repetition | |
| end OAI | |
Xet Storage Details
- Size:
- 13.9 kB
- Xet hash:
- 47a9a5c0b5d1275b1025194079124d7e35b21a0dc00ed693af1bb00bc650f264
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.