math / data /lean /OAI /Computability /UniqueGames /Inverse /KMSBasisComparisonNeighborsRetention.lean
Download data/lean/OAI/Computability/UniqueGames/Inverse/KMSBasisComparisonNeighborsRetention.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.05 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/UniqueGames/Inverse/KMSBasisComparisonNeighborsRetention.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/UniqueGames/Inverse/KMSBasisComparisonNeighborsRetention.lean
-
curl -L -o KMSBasisComparisonNeighborsRetention.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/UniqueGames/Inverse/KMSBasisComparisonNeighborsRetention.lean
3.05 kB
| import OAI.Computability.UniqueGames.Inverse.KMSBasisComparisonLemmas | |
| import OAI.Computability.UniqueGames.Inverse.MatrixChartIntervalsLemmas | |
| namespace OAI | |
| section | |
| /-! Local ordered-basis retention in the precise KMS vertex representation. -/ | |
| namespace UniqueGamesTheorem.Inverse.KMSBasisComparison | |
| noncomputable section | |
| open scoped BigOperators Classical | |
| private theorem relativeDensity_eq_expect_subtype {Ξ© : Type*} [Fintype Ξ©] | |
| (S : Finset Ξ©) (P : Ξ© β Prop) : | |
| KMS.relativeDensity S (Finset.univ.filter P) = | |
| πΌ x : {x : Ξ© // P x}, if x.val β S then (1 : β) else 0 := by | |
| unfold KMS.relativeDensity | |
| rw [Fintype.expect_eq_sum_div_card] | |
| rw [β Finset.sum_subtype (Finset.univ.filter P) (by simp) | |
| (fun x => if x β S then (1 : β) else 0)] | |
| rw [Finset.sum_boole, Fintype.card_subtype] | |
| have hsets : S β© Finset.univ.filter P = | |
| (Finset.univ.filter P).filter (fun x => x β S) := by | |
| ext x | |
| simp only [Finset.mem_inter, Finset.mem_filter, Finset.mem_univ, true_and] | |
| exact and_comm | |
| rw [hsets] | |
| /-- The ordered-basis test conditioned on its good event samples every full | |
| Grassmann neighbor uniformly. The target observable is the original lifted | |
| indicator, so this identity directly feeds the matrix-test retention bound. -/ | |
| theorem outsideNeighbor_retention {n ell : β} (S : Finset (KMS.Vertex n ell)) | |
| (X : BasisMap n ell) (hX : Function.Injective X) : | |
| (πΌ p : OutsideNeighborFactors X, | |
| liftedIndicator S (rankOneUpdate X p.1.val p.2.val)) = | |
| KMS.relativeDensity S (KMS.neighbors (rangeVertex X hX)) := by | |
| let e : MatrixChart.GrassmannNeighbors X.range β | |
| {W : KMS.Vertex n ell // KMS.Adjacent (rangeVertex X hX) W} := | |
| MatrixChart.kmsNeighborsEquiv (rangeVertex X hX) | |
| let : Fintype (MatrixChart.GrassmannNeighbors X.range) := | |
| Fintype.ofEquiv {W : KMS.Vertex n ell // KMS.Adjacent (rangeVertex X hX) W} e.symm | |
| let g : MatrixChart.GrassmannNeighbors X.range β β := | |
| fun W => if (e W).val β S then 1 else 0 | |
| calc | |
| _ = πΌ p : OutsideNeighborFactors X, g (outsideNeighborSample X hX p) := by | |
| apply Finset.expect_congr rfl | |
| intro p _ | |
| unfold liftedIndicator | |
| rw [inLift_iff_rangeVertex_mem S _ | |
| (injective_rankOneUpdate X hX p.1.val p.2.property)] | |
| have hv : rangeVertex (rankOneUpdate X p.1.val p.2.val) | |
| (injective_rankOneUpdate X hX p.1.val p.2.property) = | |
| (e (outsideNeighborSample X hX p)).val := by | |
| apply Subtype.ext | |
| rfl | |
| rw [hv] | |
| by_cases hp : (e (outsideNeighborSample X hX p)).val β S <;> simp [g, hp] | |
| _ = πΌ W : MatrixChart.GrassmannNeighbors X.range, g W := | |
| expect_outsideNeighborSample X hX g | |
| _ = πΌ W : {W : KMS.Vertex n ell // KMS.Adjacent (rangeVertex X hX) W}, | |
| if W.val β S then (1 : β) else 0 := | |
| Fintype.expect_equiv e _ _ (fun _ => rfl) | |
| _ = _ := (relativeDensity_eq_expect_subtype S | |
| (KMS.Adjacent (rangeVertex X hX))).symm | |
| end | |
| end UniqueGamesTheorem.Inverse.KMSBasisComparison | |
| end | |
| end OAI | |