Download data/lean/OAI/Combinatorics/IndependentSets/Reduction/DeletedProjection.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 11.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/IndependentSets/Reduction/DeletedProjection.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/IndependentSets/Reduction/DeletedProjection.lean
-
curl -L -o DeletedProjection.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/IndependentSets/Reduction/DeletedProjection.lean
11.3 kB
| import Mathlib | |
| import OAI.Combinatorics.IndependentSets.Reduction.DiscreteBoundAuxiliary | |
| import OAI.Combinatorics.IndependentSets.Reduction.SubchainBase | |
| import OAI.Combinatorics.IndependentSets.Geometry.DeletedLayerEquiv | |
| namespace OAI | |
| namespace LargeIndependentSets | |
| section | |
| open MeasureTheory ProductAveraging PhaseTest | |
| open scoped BigOperators Classical NNReal | |
| variable {U V L R C : Type} | |
| variable {n : β} (lc : LabelCoverData U V L R C) (chain : Fin n β C) | |
| noncomputable def deletedProjection {B : Finset (Fin (n+1))} (hB : 2 β€ B.card) (i : B) | |
| (j : {j : B // j β i}) : | |
| MixedTuple L R n (subchainBase (B.erase i.val) (deletion_nonempty hB i)).val.val β | |
| MixedTuple L R n j.val.val.val := | |
| chainComposite lc chain _ _ (subchainBase_le _ (deletion_nonempty hB i) (deletedLayerEquiv i j)) | |
| lemma deleted_phase_reindex {B : Finset (Fin (n+1))} (hB : 2 β€ B.card) (i : B) | |
| {m : β} (t : {j : B // j β i} β Fin (m+1)) | |
| (ΞΈ : (Sigma fun j : {j : B // j β i} => MixedTuple L R n j.val.val.val) β β) : | |
| phase (deletedProjection lc chain hB i) (fun j => Coefficient.value (t j)) ΞΈ = | |
| phase (fun j => (chainView lc chain (B.erase i.val)).projection | |
| (subchainBase (B.erase i.val) (deletion_nonempty hB i)) j | |
| (subchainBase_le _ (deletion_nonempty hB i) j)) | |
| (fun j => Coefficient.value (t ((deletedLayerEquiv i).symm j))) | |
| (reindex (deletedCoordEquiv (L:=L) (R:=R) i) ΞΈ) := by | |
| funext k | |
| simp only [phase] | |
| rw [β (deletedLayerEquiv i).sum_comp] | |
| apply Finset.sum_congr rfl | |
| intro j _ | |
| rfl | |
| noncomputable def ruleUnion {s m : β} | |
| (rule : β (I : Finset (Fin (n+1))), Small s I β | |
| SubchainView U V L R n I β (I β Fin (m+1)) β Finset (SubchainCoord L R n I)) | |
| (I : Finset (Fin (n+1))) (v : SubchainView U V L R n I) : Finset (SubchainCoord L R n I) := | |
| if hI : Small s I then Finset.univ.biUnion (rule I hI v) else β | |
| lemma mem_ruleUnion {s m : β} | |
| (rule : β (I : Finset (Fin (n+1))), Small s I β | |
| SubchainView U V L R n I β (I β Fin (m+1)) β Finset (SubchainCoord L R n I)) | |
| {I : Finset (Fin (n+1))} (hI : Small s I) (v : SubchainView U V L R n I) | |
| (t : I β Fin (m+1)) {d : SubchainCoord L R n I} (hd : d β rule I hI v t) : | |
| d β ruleUnion rule I v := by | |
| simp only [ruleUnion, dite_eq_left hI] | |
| exact Finset.mem_biUnion.mpr β¨t, Finset.mem_univ _,hdβ© | |
| lemma aligned_excludes_deleted {s m : β} {B : Finset (Fin (n+1))} | |
| (hB : 2 β€ B.card) (hBs : B.card β€ s) | |
| (rule : β (I : Finset (Fin (n+1))), Small s I β | |
| SubchainView U V L R n I β (I β Fin (m+1)) β Finset (SubchainCoord L R n I)) | |
| (a : MixedTuple L R n n β Fin (n+1)) | |
| (halign : β I, I.Nonempty β I β B β β x β | |
| terminalList lc chain I (ruleUnion rule I (chainView lc chain I)), a x β I) | |
| (i : B) (t : (B.erase i.val) β Fin (m+1)) | |
| (d : SubchainCoord L R n (B.erase i.val)) | |
| (hd : d β rule _ (deletion_small hB hBs i) (chainView lc chain _) t) : | |
| a (chainComposite lc chain d.1.val.val n (Nat.le_of_lt_succ d.1.val.isLt) d.2) β i.val := by | |
| have hmem := mem_ruleUnion rule (deletion_small hB hBs i) (chainView lc chain _) t hd | |
| have hx := halign (B.erase i.val) (deletion_nonempty hB i) (Finset.erase_subset _ _) | |
| _ (Finset.mem_image.mpr β¨d,hmem,rflβ©) | |
| exact (Finset.mem_erase.mp hx).1 | |
| end | |
| section | |
| open MeasureTheory ProductAveraging PhaseTest | |
| open scoped BigOperators Classical NNReal | |
| variable {U V L R C : Type} [Fintype L] [Fintype R] | |
| variable {n s m : β} (lc : LabelCoverData U V L R C) (chain : Fin n β C) | |
| noncomputable def deletedRule | |
| (rule : β (I : Finset (Fin (n+1))), Small s I β | |
| SubchainView U V L R n I β (I β Fin (m+1)) β Finset (SubchainCoord L R n I)) | |
| {B : Finset (Fin (n+1))} (hB : 2 β€ B.card) (hBs : B.card β€ s) (i : B) | |
| (t : {j : B // j β i} β Fin (m+1)) : | |
| Finset (Sigma fun j : {j : B // j β i} => MixedTuple L R n j.val.val.val) := | |
| (rule (B.erase i.val) (deletion_small hB hBs i) (chainView lc chain _) | |
| (fun j => t ((deletedLayerEquiv i).symm j))).image (deletedCoordEquiv i).symm | |
| lemma actual_deleted_junta | |
| (F : β q : LayerQuestion U V n, (LayerAnswer L R q β Circle) β β) | |
| (hFm : β q, Measurable (F q)) {Ξ³ : β} | |
| (rule : β (I : Finset (Fin (n+1))), Small s I β | |
| SubchainView U V L R n I β (I β Fin (m+1)) β Finset (SubchainCoord L R n I)) | |
| (hjunta : β I hI v t, (β« ΞΈ, (viewFunction F hI.1 v t ΞΈ - | |
| average rotationLaw (rule I hI v t) (viewFunction F hI.1 v t) ΞΈ)^2 | |
| βMeasure.pi (fun _ : SubchainCoord L R n I => rotationLaw)) < Ξ³^2) | |
| {B : Finset (Fin (n+1))} (hB : 2 β€ B.card) (hBs : B.card β€ s) (i : B) | |
| (t : {j : B // j β i} β Fin (m+1)) : | |
| let f := fun ΞΈ => F (occurrenceQuestion lc chain | |
| (subchainBase (B.erase i.val) (deletion_nonempty hB i)).val) | |
| (phase (deletedProjection lc chain hB i) (fun j => Coefficient.value (t j)) ΞΈ) | |
| (β« ΞΈ, (f ΞΈ - average rotationLaw (deletedRule lc chain rule hB hBs i t) f ΞΈ)^2 | |
| βMeasure.pi (fun _ : Sigma (fun j : {j : B // j β i} => MixedTuple L R n j.val.val.val) => rotationLaw)) < Ξ³^2 := by | |
| let c := subchainBase (B.erase i.val) (deletion_nonempty hB i) | |
| let v := chainView lc chain (B.erase i.val) | |
| let t' : (B.erase i.val) β Fin (m+1) := fun j => t ((deletedLayerEquiv i).symm j) | |
| let f := viewFunction F (deletion_nonempty hB i) v t' | |
| have hf : Measurable f := (hFm _).comp (phase_measurable _ _) | |
| have he : (fun ΞΈ => F (occurrenceQuestion lc chain c.val) | |
| (phase (deletedProjection lc chain hB i) (fun j => Coefficient.value (t j)) ΞΈ)) = | |
| f β reindex (deletedCoordEquiv (L:=L) (R:=R) i) := by | |
| funext ΞΈ | |
| exact congrArg (F (occurrenceQuestion lc chain c.val)) (deleted_phase_reindex lc chain hB i t ΞΈ) | |
| have heI := congrArg (fun g : ((Sigma fun j : {j : B // j β i} => | |
| MixedTuple L R n j.val.val.val) β β) β β => | |
| β« ΞΈ, (g ΞΈ - average rotationLaw (deletedRule lc chain rule hB hBs i t) g ΞΈ)^2 | |
| βMeasure.pi (fun _ => rotationLaw)) he | |
| apply lt_of_eq_of_lt heI | |
| exact (junta_error_reindex (deletedCoordEquiv (L:=L) (R:=R) i) | |
| (rule (B.erase i.val) (deletion_small hB hBs i) v t') f hf).trans_lt | |
| (hjunta (B.erase i.val) (deletion_small hB hBs i) v t') | |
| end | |
| open MeasureTheory ProductAveraging PhaseTest Coefficient BooleanJunta | |
| open scoped BigOperators Classical NNReal | |
| noncomputable def fiberSquare {U V L R C : Type} [Fintype L] [Fintype R] | |
| {n : β} (lc : LabelCoverData U V L R C) (chain : Fin n β C) | |
| (F : β q : LayerQuestion U V n, (LayerAnswer L R q β Circle) β β) | |
| (B : Finset (Fin (n+1))) (hB : B.Nonempty) (m : β) (Ο : β) (k : β) : β := | |
| β t : B β Fin (m+1), mass m Ο t * | |
| πΌ v : SubchainCoord L R n B β Cube k, | |
| (viewFunction F hB (chainView lc chain B) t (fun c => scalarCell (v c) 0))^2 | |
| theorem actual_aligned_fiber (Lip : ββ₯0) {Ξ΅ : β} (hΞ΅ : 0 < Ξ΅) : | |
| β Ξ² : β, 0 < Ξ² β§ β K : β, 1 β€ K β§ | |
| β (m s k : β) (Ο Ξ³ err : β), 0 < m β 2 β€ s β 0 β€ Ο β 0 β€ err β err < Ξ³ β | |
| (Lip:β)/m < Ξ²/2 β (1-levelMass m Ο β¨m,by omegaβ©)^s < Ξ΅ β | |
| Ο*K < Ξ΅ β (s:β)*(2*Ξ³)^2/Ξ²^2 < Ξ΅ β 2*Lip*s*(1/2:β)^k < Ξ΅ β | |
| β (U V L R C : Type) [Fintype L] [Fintype R] (n : β) | |
| (lc : LabelCoverData U V L R C) (chain : Fin n β C) | |
| (F : β q : LayerQuestion U V n, (LayerAnswer L R q β Circle) β β), | |
| (β q, LipschitzWith Lip (F q)) β (β q x, |F q x| β€ 1) β | |
| (β q x, F q (fun z => x z + ((1/2:β):Circle)) = -F q x) β | |
| (β (i j : Fin (n+1)) (hij : i β€ j) (y : MixedTuple L R n j.val β Circle), | |
| |F (occurrenceQuestion lc chain i) (y β chainComposite lc chain i.val j.val hij) - | |
| F (occurrenceQuestion lc chain j) y| β€ err) β | |
| β (rule : β (I : Finset (Fin (n+1))), Small s I β | |
| SubchainView U V L R n I β (I β Fin (m+1)) β Finset (SubchainCoord L R n I)), | |
| (β I hI v t, (β« ΞΈ, (viewFunction F hI.1 v t ΞΈ - | |
| average rotationLaw (rule I hI v t) (viewFunction F hI.1 v t) ΞΈ)^2 | |
| βMeasure.pi (fun _ : SubchainCoord L R n I => rotationLaw)) < Ξ³^2) β | |
| β (B : Finset (Fin (n+1))) (hB : B.Nonempty), B.card = s β | |
| Aligned (fun I => terminalList lc chain I (ruleUnion rule I (chainView lc chain I))) B β | |
| fiberSquare lc chain F B hB m Ο k < 6*Ξ΅ := by | |
| obtain β¨Ξ²,hΞ²,K,hK,HTβ© := arbitrary_coefficient_mean_square Lip hΞ΅ | |
| refine β¨Ξ²,hΞ²,K,hK,?_β© | |
| intro m s k Ο Ξ³ err hm hs hΟ he heΞ³ hstep hrare hpos hzero hgrid | |
| U V L R C _ _ n lc chain F hF hb hodd hcompat rule hjunta B hB hBs halign | |
| have hB2 : 2 β€ B.card := by omega | |
| let b := subchainBase B hB | |
| let M : B β Type := fun j => MixedTuple L R n j.val.val | |
| let ΞΊ := MixedTuple L R n b.val.val | |
| let Ο := MixedTuple L R n n | |
| let p : β j : B, ΞΊ β M j := fun j => | |
| chainComposite lc chain b.val.val j.val.val (subchainBase_le B hB j) | |
| let q : β j : B, M j β Ο := fun j => | |
| chainComposite lc chain j.val.val n (Nat.le_of_lt_succ j.val.isLt) | |
| let r : ΞΊ β Ο := chainComposite lc chain b.val.val n (Nat.le_of_lt_succ b.val.isLt) | |
| have hq : β j x, q j (p j x) = r x := fun j x => chainComposite_comp lc chain _ _ _ _ _ x | |
| let c (i : B) := subchainBase (B.erase i.val) (deletion_nonempty hB2 i) | |
| have hbc (i : B) : b.val β€ (c i).val := | |
| B.min'_le _ ((Finset.erase_subset _ _) (c i).property) | |
| let ΞΊ' : B β Type := fun i => MixedTuple L R n (c i).val.val | |
| let e : β i : B, ΞΊ β ΞΊ' i := fun i => chainComposite lc chain b.val.val (c i).val.val (hbc i) | |
| let p' : β i : B, β j : {j : B // j β i}, ΞΊ' i β M j.val := | |
| fun i => deletedProjection lc chain hB2 i | |
| have hp : β i j x, p j.val x = p' i j (e i x) := by | |
| intro i j x | |
| exact (chainComposite_comp lc chain _ _ _ _ _ x).symm | |
| let F' : β i : B, (ΞΊ' i β Circle) β β := fun i => F (occurrenceQuestion lc chain (c i).val) | |
| let S := deletedRule lc chain rule hB2 (le_of_eq hBs) | |
| obtain β¨a,haB,haβ© := halign | |
| let aa : Ο β B := fun z => β¨a z,haB zβ© | |
| have haux := HT B m hm Ο Ξ³ err hΟ he heΞ³ hstep (by simpa [hBs] using hrare) | |
| hpos (by simpa [hBs] using hzero) M ΞΊ Ο p q r hq | |
| (F (occurrenceQuestion lc chain b.val)) (hF _) | |
| (fun x => hb (occurrenceQuestion lc chain b.val) x) | |
| (fun x => hodd (occurrenceQuestion lc chain b.val) x) | |
| ΞΊ' p' e hp F' (fun i => (hF (occurrenceQuestion lc chain (c i).val)).continuous.measurable) | |
| (fun i x => hb (occurrenceQuestion lc chain (c i).val) x) | |
| (fun i y => hcompat b.val (c i).val (hbc i) y) S | |
| (fun i t => actual_deleted_junta lc chain F (fun q => (hF q).continuous.measurable) | |
| rule hjunta hB2 (le_of_eq hBs) i t) aa (by | |
| intro i t d hd | |
| obtain β¨D,hD,hD'β© := Finset.mem_image.mp hd | |
| subst d | |
| intro heq | |
| have hne := aligned_excludes_deleted lc chain hB2 (le_of_eq hBs) rule a ha i _ D hD | |
| exact hne (congrArg Subtype.val heq)) | |
| have hfin := discrete_bound_of_auxiliary p q r hq aa hm hΟ k | |
| (by simpa [hBs] using hrare) (by simpa [hBs] using hgrid) | |
| (F (occurrenceQuestion lc chain b.val)) (hF _) | |
| (fun x => hb (occurrenceQuestion lc chain b.val) x) haux | |
| exact hfin | |
| end LargeIndependentSets | |
| end OAI | |