File size: 4,879 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | import OAI.Combinatorics.MatchingPSD.SpectralContraction
namespace OAI
universe u_1 u_2 u_3
namespace MatchingSmoothing
namespace Pairing
variable {V : Type u_1}
lemma act_pointwise_mul (p : Equiv.Perm V) (f g : Pairing V โ โ) :
act p (f * g) = act p f * act p g := rfl
lemma act_pointwise_one (p : Equiv.Perm V) : act p (1 : Pairing V โ โ) = 1 := rfl
lemma act_edgeCoord (p : Equiv.Perm V) (e : V ร V) :
act p (edgeCoord e) = edgeCoord (p e.1, p e.2) := by
classical
ext M
simp only [act_apply, edgeCoord, relabel_apply, inv_inv]
congr 1
exact propext p.symm_apply_eq
lemma lowDegree_invariant (p : Equiv.Perm V) (d : โ)
(f : Pairing V โ โ) (hf : f โ lowDegree edgeCoord d) :
act p f โ lowDegree edgeCoord d := by
apply Submodule.span_induction (p := fun f _ => act p f โ lowDegree edgeCoord d)
_ _ _ _ hf
ยท rintro f โจl, hl, rflโฉ
have hprod : act p ((l.map edgeCoord).prod) =
((l.map (fun e => (p e.1, p e.2))).map edgeCoord).prod := by
clear hl
induction l with
| nil => exact act_pointwise_one p
| cons e l ih =>
simp only [List.map_cons, List.prod_cons, act_pointwise_mul,
act_edgeCoord, ih]
rw [hprod]
exact Submodule.subset_span โจ_, by simpa, rflโฉ
ยท simp
ยท intro f g _ _ hf hg
simpa only [map_add] using (lowDegree edgeCoord d).add_mem hf hg
ยท intro c f _ hf
simpa only [map_smul] using (lowDegree edgeCoord d).smul_mem c hf
end Pairing
open scoped RealInnerProductSpace
section EuclideanPermutations
variable {X : Type u_2} [Fintype X]
noncomputable def permIso (e : Equiv.Perm X) :
EuclideanSpace โ X โโแตข[โ] EuclideanSpace โ X :=
LinearIsometryEquiv.piLpCongrLeft 2 โ โ e
@[simp] lemma permIso_apply (e : Equiv.Perm X) (v : EuclideanSpace โ X) (x : X) :
permIso e v x = v (e.symm x) := rfl
lemma matrix_equivariant [DecidableEq X] (A : Matrix X X โ) (e : Equiv.Perm X)
(hA : โ x y, A (e x) (e y) = A x y) (v : EuclideanSpace โ X) :
A.toEuclideanLin (permIso e v) = permIso e (A.toEuclideanLin v) := by
ext x
change (โ y, A x y * v (e.symm y)) = โ y, A (e.symm x) y * v y
rw [โ Equiv.sum_comp e (fun y => A x y * v (e.symm y))]
apply Finset.sum_congr rfl
intro y _
rw [e.symm_apply_apply, โ hA (e.symm x) y, e.apply_symm_apply]
lemma matrix_trace_square [DecidableEq X] (A : Matrix X X โ) :
LinearMap.trace โ (EuclideanSpace โ X) (A.toEuclideanLin * A.toEuclideanLin) =
Matrix.trace (A * A) := by
simp only [Matrix.toLpLin_eq_toLin, Module.End.mul_eq_comp,
โ Matrix.toLin_mul, Matrix.trace_toLin_eq]
end EuclideanPermutations
section CompressionEquivariance
variable {E : Type u_3} [NormedAddCommGroup E] [InnerProductSpace โ E]
[FiniteDimensional โ E]
omit [FiniteDimensional โ E] in
lemma invariant_map_eq (W : Submodule โ E) (e : E โโแตข[โ] E)
(h : โ x, x โ W โ e x โ W) (hi : โ x, x โ W โ e.symm x โ W) :
W.map e.toLinearEquiv.toLinearMap = W := by
apply le_antisymm
ยท rintro _ โจx, hx, rflโฉ
exact h x hx
ยท intro x hx
exact โจe.symm x, hi x hx, e.apply_symm_apply xโฉ
omit [FiniteDimensional โ E] in
lemma invariant_orthogonal (W : Submodule โ E) (e : E โโแตข[โ] E)
(hi : โ x, x โ W โ e.symm x โ W) (x : E) (hx : x โ Wแฎ) :
e x โ Wแฎ := by
rw [Submodule.mem_orthogonal] at hx โข
intro y hy
rw [โ e.apply_symm_apply y, e.inner_map_map]
exact hx (e.symm y) (hi y hy)
lemma starProjection_equivariant (W : Submodule โ E) (e : E โโแตข[โ] E)
(h : โ x, x โ W โ e x โ W) (hi : โ x, x โ W โ e.symm x โ W)
(x : E) : e (W.starProjection x) = W.starProjection (e x) := by
symm
apply Submodule.eq_starProjection_of_mem_of_inner_eq_zero
ยท exact h _ (W.orthogonalProjectionOnto x).property
ยท intro y hy
rw [โ e.apply_symm_apply y, โ e.map_sub, e.inner_map_map]
exact W.starProjection_inner_eq_zero x (e.symm y) (hi y hy)
lemma compression_eigenspace_invariant (A : Module.End โ E) (W : Submodule โ E)
(e : E โโแตข[โ] E) (h : โ x, x โ W โ e x โ W)
(hi : โ x, x โ W โ e.symm x โ W)
(hA : โ x, A (e x) = e (A x)) (c : โ) (x : E)
(hx : x โ (Module.End.eigenspace (compression A W) c).map W.subtype) :
e x โ (Module.End.eigenspace (compression A W) c).map W.subtype := by
rcases hx with โจx, hx, rflโฉ
refine โจโจe x, h x x.2โฉ, ?_, rflโฉ
simp only [SetLike.mem_coe, Module.End.mem_eigenspace_iff] at hx โข
apply Subtype.ext
have he := congrArg (fun y : W => (y : E)) hx
change W.starProjection (A x) = c โข (x : E) at he
change W.starProjection (A (e (x : E))) = c โข e (x : E)
rw [hA, โ starProjection_equivariant W e h hi, he, map_smul]
end CompressionEquivariance
end MatchingSmoothing
end OAI
|