cfahlgren1/math / lean /OAI /Combinatorics /MatchingPSD /PolynomialSpaces.lean
cfahlgren1's picture
download
raw
5.64 kB
import OAI.Combinatorics.MatchingPSD.EquivariantCompression
namespace OAI
namespace MatchingSmoothing
open scoped RealInnerProductSpace
abbrev MatchingSpace (h : ℕ) := EuclideanSpace ℝ (Pairing (Vertices h))
noncomputable def matchingEquiv (h : ℕ) :
MatchingSpace h ≃ₗ[ℝ] (Pairing (Vertices h) → ℝ) :=
WithLp.linearEquiv 2 ℝ _
noncomputable def polynomialSpace (h d : ℕ) : Submodule ℝ (MatchingSpace h) :=
(lowDegree Pairing.edgeCoord d).comap (matchingEquiv h).toLinearMap
noncomputable def relabelIso {h : ℕ} (p : Equiv.Perm (Vertices h)) :
MatchingSpace h ≃ₗᵢ[ℝ] MatchingSpace h := permIso (Pairing.relabelEquiv p)
lemma matchingEquiv_relabel {h : ℕ} (p : Equiv.Perm (Vertices h)) (f : MatchingSpace h) :
matchingEquiv h (relabelIso p f) = Pairing.act p (matchingEquiv h f) := rfl
lemma relabelIso_symm {h : ℕ} (p : Equiv.Perm (Vertices h)) :
(relabelIso p).symm = relabelIso p⁻¹ := by
simp only [relabelIso, permIso, LinearIsometryEquiv.piLpCongrLeft_symm]
congr 1
lemma polynomialSpace_invariant {h d : ℕ} (p : Equiv.Perm (Vertices h))
(f : MatchingSpace h) (hf : f ∈ polynomialSpace h d) :
relabelIso p f ∈ polynomialSpace h d :=
Pairing.lowDegree_invariant p d _ hf
lemma highSpace_invariant {h d : ℕ} (p : Equiv.Perm (Vertices h))
(f : MatchingSpace h) (hf : f ∈ (polynomialSpace h d)ᗮ) :
relabelIso p f ∈ (polynomialSpace h d)ᗮ := by
apply invariant_orthogonal (polynomialSpace h d) (relabelIso p) _ f hf
intro x hx
rw [relabelIso_symm]
exact polynomialSpace_invariant p⁻¹ x hx
lemma euclidean_high_degree_dimension {h : ℕ} (k : ℕ) (hk : 4*k < h)
(W : Submodule ℝ (MatchingSpace h))
(hW : ∀ p f, f ∈ W → relabelIso p f ∈ W)
(hle : W ≤ (polynomialSpace h ((4*k)*(4*k)))ᗮ)
(hne : ∃ f ∈ W, f ≠ 0) : h.choose k ≤ Module.finrank ℝ W := by
let l := matchingEquiv h
have he := invariant_high_degree_dimension k hk (W.map l.toLinearMap)
have hinv (p : Equiv.Perm (Vertices h)) (f : Pairing (Vertices h) → ℝ)
(hf : f ∈ W.map l.toLinearMap) : Pairing.act p f ∈ W.map l.toLinearMap := by
rcases hf with ⟨x, hx, rfl⟩
exact ⟨relabelIso p x, hW p x hx, matchingEquiv_relabel p x⟩
have hdis : Disjoint (W.map l.toLinearMap)
(lowDegree Pairing.edgeCoord ((4*k)*(4*k))) := by
rw [Submodule.disjoint_def]
rintro f ⟨x, hx, rfl⟩ hp
have hp' : x ∈ polynomialSpace h ((4*k)*(4*k)) := hp
have hx0 := Submodule.disjoint_def.mp
(polynomialSpace h ((4*k)*(4*k))).orthogonal_disjoint.symm x (hle hx) hp'
rw [hx0, map_zero]
have hn : ∃ f ∈ W.map l.toLinearMap, f ≠ 0 := by
obtain ⟨x, hx, hx0⟩ := hne
refine ⟨l x, ⟨x, hx, rfl⟩, ?_⟩
simpa using hx0
simpa only [LinearEquiv.finrank_map_eq] using he hinv hdis hn
lemma matching_compression_multiplicity {h : ℕ} (k : ℕ) (hk : 4*k < h)
(A : Module.End ℝ (MatchingSpace h))
(hA : ∀ p x, A (relabelIso p x) = relabelIso p (A x))
(c : ℝ) (hc : Module.End.HasEigenvalue
(compression A (polynomialSpace h ((4*k)*(4*k)))ᗮ) c) :
h.choose k ≤ Module.finrank ℝ (Module.End.eigenspace
(compression A (polynomialSpace h ((4*k)*(4*k)))ᗮ) c) := by
let W := (polynomialSpace h ((4*k)*(4*k)))ᗮ
let U := (Module.End.eigenspace (compression A W) c).map W.subtype
have hinv : ∀ p x, x ∈ U → relabelIso p x ∈ U := by
intro p x hx
apply compression_eigenspace_invariant A W (relabelIso p)
(highSpace_invariant p) _ (hA p) c x hx
intro y hy
rw [relabelIso_symm]
exact highSpace_invariant p⁻¹ y hy
have hle : U ≤ W := by
rintro x ⟨x, _, rfl⟩
exact x.2
have hne : ∃ x ∈ U, x ≠ 0 := by
obtain ⟨x, hx, hx0⟩ := hc.exists_hasEigenvector
refine ⟨x, ⟨x, hx, rfl⟩, ?_⟩
intro he
exact hx0 (Subtype.ext he)
have hd := euclidean_high_degree_dimension k hk U hinv hle hne
simpa only [U, Submodule.finrank_map_subtype_eq] using hd
lemma symmetric_matching_smoothing {h : ℕ} (k : ℕ) (hk : 4*k < h)
(A : Matrix (Pairing (Vertices h)) (Pairing (Vertices h)) ℝ)
(hA : A.IsHermitian)
(heq : ∀ p M N, A (Pairing.relabel p M) (Pairing.relabel p N) = A M N)
(H a : ℝ) (ha : 0 ≤ a)
(htrace : Matrix.trace (A * A) ≤ H)
(hHa : H ≤ (h.choose k : ℝ) * a ^ 2)
(f : MatchingSpace h) (hf : f ∈ (polynomialSpace h ((4*k)*(4*k)))ᗮ) :
⟪f, A.toEuclideanLin f⟫ ≤ a * ‖f‖ ^ 2 := by
classical
let W := (polynomialSpace h ((4*k)*(4*k)))ᗮ
have hm : (0 : ℝ) < h.choose k := Nat.cast_pos.mpr (Nat.choose_pos (by omega))
have hs : A.toEuclideanLin.IsSymmetric := Matrix.isSymmetric_toEuclideanLin_iff.mpr hA
have hd (c : ℝ) (_hc : c ≠ 0)
(he : Module.End.HasEigenvalue (compression A.toEuclideanLin W) c) :
(h.choose k : ℝ) ≤ Module.finrank ℝ
(Module.End.eigenspace (compression A.toEuclideanLin W) c) := by
exact_mod_cast matching_compression_multiplicity k hk A.toEuclideanLin
(fun p x => matrix_equivariant A (Pairing.relabelEquiv p) (heq p) x) c he
have ht : LinearMap.trace ℝ W (compression A.toEuclideanLin W *
compression A.toEuclideanLin W) ≤ H := by
apply (trace_square_compression_le A.toEuclideanLin hs W).trans
rwa [matrix_trace_square]
have hh := quadratic_form_le_of_multiplicity (compression A.toEuclideanLin W)
(compression_symmetric A.toEuclideanLin hs W) (h.choose k) H a hm ha hd ht hHa ⟨f, hf⟩
simpa only [compression_inner, ← Submodule.norm_coe] using hh
end MatchingSmoothing
end OAI

Xet Storage Details

Size:
5.64 kB
·
Xet hash:
bd6174980bab8a2669f27827943c96385b18b5dcb988f600bd8b658e90ceea3d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.