Buckets:
| import Mathlib.Algebra.BigOperators.Expect | |
| import Mathlib.LinearAlgebra.Prod | |
| import OAI.Computability.PerfectCompleteness.Algebra.BilinearGramCompressionLemmas | |
| import OAI.Computability.PerfectCompleteness.Algebra.UniformLinearImage | |
| import OAI.Computability.UniqueGames.Games.FinishBoundsLemmas | |
| namespace OAI | |
| section | |
| namespace PerfectCompleteness.MatrixRowQuotientLaw | |
| noncomputable section | |
| open scoped BigOperators | |
| open UniqueGamesTheorem.Foundations.Games | |
| open MatrixRowQuotient | |
| variable {๐ H K : Type*} [Field ๐] | |
| [AddCommGroup H] [Module ๐ H] [AddCommGroup K] [Module ๐ K] | |
| def projectMatrixLinear (W : Submodule ๐ H) : | |
| (Module.Dual ๐ H โโ[๐] K) โโ[๐] (Module.Dual ๐ (H โงธ W) โโ[๐] K) where | |
| toFun := projectMatrix W | |
| map_add' X Y := by | |
| apply LinearMap.ext | |
| intro q | |
| rfl | |
| map_smul' a X := by | |
| apply LinearMap.ext | |
| intro q | |
| rfl | |
| @[simp] theorem projectMatrixLinear_apply (W : Submodule ๐ H) | |
| (X : Module.Dual ๐ H โโ[๐] K) : | |
| projectMatrixLinear W X = projectMatrix W X := rfl | |
| def jointProjection (W : Submodule ๐ H) : | |
| ((Module.Dual ๐ H โโ[๐] K) ร H) โโ[๐] | |
| ((Module.Dual ๐ (H โงธ W) โโ[๐] K) ร (H โงธ W)) := | |
| (projectMatrixLinear W).prodMap W.mkQ | |
| @[simp] theorem jointProjection_apply (W : Submodule ๐ H) | |
| (p : (Module.Dual ๐ H โโ[๐] K) ร H) : | |
| jointProjection W p = (projectMatrix W p.1, W.mkQ p.2) := rfl | |
| theorem jointProjection_surjective (W : Submodule ๐ H) : | |
| Function.Surjective (jointProjection (K := K) W) := by | |
| rintro โจX, hโฉ | |
| obtain โจY, hYโฉ := projectMatrix_surjective W X | |
| obtain โจg, hgโฉ := W.mkQ_surjective h | |
| exact โจ(Y, g), Prod.ext hY hgโฉ | |
| theorem uniform_product {A B : Type*} [Fintype A] [Fintype B] | |
| [Nonempty A] [Nonempty B] : | |
| (FiniteDistribution.uniform A).product (FiniteDistribution.uniform B) = | |
| FiniteDistribution.uniform (A ร B) := by | |
| apply FiniteDistribution.eq_of_weight_eq | |
| intro p | |
| change (1 / (Fintype.card A : โ)) * (1 / (Fintype.card B : โ)) = | |
| 1 / (Fintype.card (A ร B) : โ) | |
| simp only [Fintype.card_prod, Nat.cast_mul, one_div, mul_inv] | |
| variable (W : Submodule ๐ H) | |
| [Fintype H] [Fintype (H โงธ W)] | |
| [Fintype (Module.Dual ๐ H โโ[๐] K)] | |
| [Fintype (Module.Dual ๐ (H โงธ W) โโ[๐] K)] | |
| theorem uniform_jointProjection : | |
| (FiniteDistribution.uniform ((Module.Dual ๐ H โโ[๐] K) ร H)).pushforward | |
| (jointProjection W) = | |
| FiniteDistribution.uniform ((Module.Dual ๐ (H โงธ W) โโ[๐] K) ร (H โงธ W)) := | |
| UniformLinearImage.uniform_pushforward_linearMap | |
| (jointProjection W) (jointProjection_surjective W) | |
| theorem independent_uniform_jointProjection : | |
| ((FiniteDistribution.uniform (Module.Dual ๐ H โโ[๐] K)).product | |
| (FiniteDistribution.uniform H)).pushforward (jointProjection W) = | |
| (FiniteDistribution.uniform (Module.Dual ๐ (H โงธ W) โโ[๐] K)).product | |
| (FiniteDistribution.uniform (H โงธ W)) := by | |
| rw [uniform_product, uniform_product] | |
| exact uniform_jointProjection W | |
| private theorem expect_prod {A B : Type*} [Fintype A] [Fintype B] | |
| (f : A ร B โ โ) : | |
| (๐ผ p : A ร B, f p) = ๐ผ a : A, ๐ผ b : B, f (a, b) := by | |
| simpa only [Finset.univ_product_univ] using | |
| Finset.expect_product (Finset.univ : Finset A) (Finset.univ : Finset B) f | |
| theorem expect_project_matrix_increment | |
| (f : (Module.Dual ๐ (H โงธ W) โโ[๐] K) โ (H โงธ W) โ โ) : | |
| (๐ผ X : Module.Dual ๐ H โโ[๐] K, ๐ผ h : H, | |
| f (projectMatrix W X) (W.mkQ h)) = | |
| ๐ผ X : Module.Dual ๐ (H โงธ W) โโ[๐] K, ๐ผ h : H โงธ W, f X h := by | |
| have he := congrArg | |
| (fun ฮผ : FiniteDistribution ((Module.Dual ๐ (H โงธ W) โโ[๐] K) ร (H โงธ W)) => | |
| ฮผ.expectation (fun p => f p.1 p.2)) (uniform_jointProjection W) | |
| rw [FiniteDistribution.expectation_pushforward, | |
| FiniteDistribution.expectation_uniform, FiniteDistribution.expectation_uniform] at he | |
| have he' : | |
| (๐ผ p : (Module.Dual ๐ H โโ[๐] K) ร H, | |
| f (projectMatrix W p.1) (W.mkQ p.2)) = | |
| ๐ผ p : (Module.Dual ๐ (H โงธ W) โโ[๐] K) ร (H โงธ W), f p.1 p.2 := by | |
| simpa only [Fintype.expect_eq_sum_div_card, jointProjection_apply] using he | |
| simpa only [expect_prod] using he' | |
| theorem rankOne_pair_law (a : K) : | |
| ((FiniteDistribution.uniform (Module.Dual ๐ H โโ[๐] K)).product | |
| (FiniteDistribution.uniform H)).pushforward | |
| (fun p => (projectMatrix W p.1, | |
| projectMatrix W (p.1 + (Module.Dual.eval ๐ H p.2).smulRight a))) = | |
| ((FiniteDistribution.uniform (Module.Dual ๐ (H โงธ W) โโ[๐] K)).product | |
| (FiniteDistribution.uniform (H โงธ W))).pushforward | |
| (fun p => (p.1, p.1 + (Module.Dual.eval ๐ (H โงธ W) p.2).smulRight a)) := by | |
| have he := congrArg | |
| (fun ฮผ : FiniteDistribution ((Module.Dual ๐ (H โงธ W) โโ[๐] K) ร (H โงธ W)) => | |
| ฮผ.pushforward (fun p => | |
| (p.1, p.1 + (Module.Dual.eval ๐ (H โงธ W) p.2).smulRight a))) | |
| (independent_uniform_jointProjection W) | |
| rw [FiniteDistribution.pushforward_comp] at he | |
| simpa only [jointProjection_apply, project_rankOne] using he | |
| theorem expect_project_rankOne_pair (a : K) | |
| (f : (Module.Dual ๐ (H โงธ W) โโ[๐] K) โ | |
| (Module.Dual ๐ (H โงธ W) โโ[๐] K) โ โ) : | |
| (๐ผ X : Module.Dual ๐ H โโ[๐] K, ๐ผ h : H, | |
| f (projectMatrix W X) | |
| (projectMatrix W (X + (Module.Dual.eval ๐ H h).smulRight a))) = | |
| ๐ผ X : Module.Dual ๐ (H โงธ W) โโ[๐] K, ๐ผ h : H โงธ W, | |
| f X (X + (Module.Dual.eval ๐ (H โงธ W) h).smulRight a) := by | |
| simpa only [project_rankOne] using expect_project_matrix_increment W | |
| (fun X h => f X (X + (Module.Dual.eval ๐ (H โงธ W) h).smulRight a)) | |
| end | |
| end PerfectCompleteness.MatrixRowQuotientLaw | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 5.94 kB
- Xet hash:
- 9d1bfd85c85aa70951963e08bab13804506db13f3727ceb80ca46cac0b4c22c9
ยท
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.