-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathInvariant.lean
More file actions
211 lines (163 loc) · 7.94 KB
/
Invariant.lean
File metadata and controls
211 lines (163 loc) · 7.94 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
/-
Copyright (c) 2024 Oliver Nash. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Oliver Nash
-/
module
public import Mathlib.Algebra.Module.Equiv.Basic
public import Mathlib.Algebra.Module.Submodule.Map
public import Mathlib.LinearAlgebra.Span.Defs
public import Mathlib.Order.Sublattice
/-!
# The lattice of invariant submodules
In this file we defined the type `Module.End.invtSubmodule`, associated to a linear endomorphism of
a module. Its utility stems primarily from those occasions on which we wish to take advantage of the
lattice structure of invariant submodules.
See also `Mathlib/Algebra/Polynomial/Module/AEval.lean`.
-/
@[expose] public section
open Submodule (span)
namespace Module.End
variable {R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M] (f g : End R M)
/-- Given an endomorphism, `f` of some module, this is the sublattice of all `f`-invariant
submodules. -/
def invtSubmodule : Sublattice (Submodule R M) where
carrier := {p : Submodule R M | p ≤ p.comap f}
supClosed' p hp q hq := sup_le_iff.mpr
⟨le_trans hp <| Submodule.comap_mono le_sup_left,
le_trans hq <| Submodule.comap_mono le_sup_right⟩
infClosed' p hp q hq := by
simp only [Set.mem_setOf_eq, Submodule.comap_inf, le_inf_iff]
exact ⟨inf_le_of_left_le hp, inf_le_of_right_le hq⟩
lemma mem_invtSubmodule {p : Submodule R M} :
p ∈ f.invtSubmodule ↔ p ≤ p.comap f :=
Iff.rfl
/-- `p` is `f` invariant if and only if `p.map f ≤ p`. -/
theorem mem_invtSubmodule_iff_map_le {p : Submodule R M} :
p ∈ f.invtSubmodule ↔ p.map f ≤ p := Submodule.map_le_iff_le_comap.symm
/-- `p` is `f` invariant if and only if `Set.MapsTo f p p`. -/
theorem mem_invtSubmodule_iff_mapsTo {p : Submodule R M} :
p ∈ f.invtSubmodule ↔ Set.MapsTo f p p := Iff.rfl
alias ⟨_, _root_.Set.Mapsto.mem_invtSubmodule⟩ := mem_invtSubmodule_iff_mapsTo
theorem mem_invtSubmodule_iff_forall_mem_of_mem {p : Submodule R M} :
p ∈ f.invtSubmodule ↔ ∀ x ∈ p, f x ∈ p :=
Iff.rfl
/-- `p` is `f.symm` invariant if and only if `p ≤ p.map f`. -/
lemma mem_invtSubmodule_symm_iff_le_map {f : M ≃ₗ[R] M} {p : Submodule R M} :
p ∈ invtSubmodule f.symm ↔ p ≤ p.map (f : M →ₗ[R] M) :=
(mem_invtSubmodule_iff_map_le _).trans (f.toEquiv.symm.subset_symm_image _ _).symm
lemma invtSubmodule_inf_invtSubmodule_le_invtSubmodule_add :
f.invtSubmodule ⊓ g.invtSubmodule ≤ (f + g).invtSubmodule :=
fun p ⟨hfp, hgp⟩ _ hx ↦ p.add_mem (hfp hx) (hgp hx)
section CommRing
variable {R S : Type*} [Semiring R] [Semiring S] [Module R M] [Module S M]
[DistribSMul S R] [SMulCommClass R S M] [IsScalarTower S R M] (f : End R M)
lemma invtSubmodule_le_invtSubmodule_smul (c : S) : f.invtSubmodule ≤ (c • f).invtSubmodule :=
fun p hfp _ hx ↦ p.smul_of_tower_mem c (hfp hx)
@[simp]
lemma invtSubmodule_smul (c : Sˣ) : (c • f).invtSubmodule = f.invtSubmodule := by
apply le_antisymm ?_ (invtSubmodule_le_invtSubmodule_smul f c.1)
grw [invtSubmodule_le_invtSubmodule_smul (c.1 • f) c⁻¹.1]
simp [smul_smul]
end CommRing
namespace invtSubmodule
variable {f}
lemma inf_mem {p q : Submodule R M} (hp : p ∈ f.invtSubmodule) (hq : q ∈ f.invtSubmodule) :
p ⊓ q ∈ f.invtSubmodule :=
Sublattice.inf_mem hp hq
lemma sup_mem {p q : Submodule R M} (hp : p ∈ f.invtSubmodule) (hq : q ∈ f.invtSubmodule) :
p ⊔ q ∈ f.invtSubmodule :=
Sublattice.sup_mem hp hq
variable (f)
@[simp]
protected lemma top_mem : ⊤ ∈ f.invtSubmodule := by simp [invtSubmodule]
@[simp]
protected lemma bot_mem : ⊥ ∈ f.invtSubmodule := by simp [invtSubmodule]
instance : BoundedOrder (f.invtSubmodule) where
top := ⟨⊤, invtSubmodule.top_mem f⟩
bot := ⟨⊥, invtSubmodule.bot_mem f⟩
le_top := fun ⟨p, hp⟩ ↦ by simp
bot_le := fun ⟨p, hp⟩ ↦ by simp
@[simp]
protected lemma zero :
(0 : End R M).invtSubmodule = ⊤ :=
eq_top_iff.mpr fun x ↦ by simp [invtSubmodule]
@[simp]
protected lemma id :
invtSubmodule (LinearMap.id : End R M) = ⊤ :=
eq_top_iff.mpr fun x ↦ by simp [invtSubmodule]
@[simp]
protected lemma one :
invtSubmodule (1 : End R M) = ⊤ :=
invtSubmodule.id
protected lemma mk_eq_bot_iff {p : Submodule R M} (hp : p ∈ f.invtSubmodule) :
(⟨p, hp⟩ : f.invtSubmodule) = ⊥ ↔ p = ⊥ :=
Subtype.mk_eq_bot_iff (by simp [invtSubmodule]) _
protected lemma mk_eq_top_iff {p : Submodule R M} (hp : p ∈ f.invtSubmodule) :
(⟨p, hp⟩ : f.invtSubmodule) = ⊤ ↔ p = ⊤ :=
Subtype.mk_eq_top_iff (by simp [invtSubmodule]) _
@[simp]
protected lemma disjoint_mk_iff {p q : Submodule R M}
(hp : p ∈ f.invtSubmodule) (hq : q ∈ f.invtSubmodule) :
Disjoint (α := f.invtSubmodule) ⟨p, hp⟩ ⟨q, hq⟩ ↔ Disjoint p q := by
rw [disjoint_iff, disjoint_iff, Sublattice.mk_inf_mk,
Subtype.mk_eq_bot_iff (⊥ : f.invtSubmodule).property]
protected lemma disjoint_iff {p q : f.invtSubmodule} :
Disjoint p q ↔ Disjoint (p : Submodule R M) (q : Submodule R M) := by
obtain ⟨p, hp⟩ := p
obtain ⟨q, hq⟩ := q
simp
@[simp]
protected lemma codisjoint_mk_iff {p q : Submodule R M}
(hp : p ∈ f.invtSubmodule) (hq : q ∈ f.invtSubmodule) :
Codisjoint (α := f.invtSubmodule) ⟨p, hp⟩ ⟨q, hq⟩ ↔ Codisjoint p q := by
rw [codisjoint_iff, codisjoint_iff, Sublattice.mk_sup_mk,
Subtype.mk_eq_top_iff (⊤ : f.invtSubmodule).property]
protected lemma codisjoint_iff {p q : f.invtSubmodule} :
Codisjoint p q ↔ Codisjoint (p : Submodule R M) (q : Submodule R M) := by
obtain ⟨p, hp⟩ := p
obtain ⟨q, hq⟩ := q
simp
@[simp]
protected lemma isCompl_mk_iff {p q : Submodule R M}
(hp : p ∈ f.invtSubmodule) (hq : q ∈ f.invtSubmodule) :
IsCompl (α := f.invtSubmodule) ⟨p, hp⟩ ⟨q, hq⟩ ↔ IsCompl p q := by
simp [isCompl_iff]
protected lemma isCompl_iff {p q : f.invtSubmodule} :
IsCompl p q ↔ IsCompl (p : Submodule R M) (q : Submodule R M) := by
obtain ⟨p, hp⟩ := p
obtain ⟨q, hq⟩ := q
simp
lemma map_subtype_mem_of_mem_invtSubmodule {p : Submodule R M} (hp : p ∈ f.invtSubmodule)
{q : Submodule R p} (hq : q ∈ invtSubmodule (LinearMap.restrict f hp)) :
Submodule.map p.subtype q ∈ f.invtSubmodule := by
rintro - ⟨⟨x, hx⟩, hx', rfl⟩
specialize hq hx'
rw [Submodule.mem_comap, LinearMap.restrict_apply] at hq
simpa [hq] using hp hx
protected lemma comp {p : Submodule R M} {g : End R M}
(hf : p ∈ f.invtSubmodule) (hg : p ∈ g.invtSubmodule) :
p ∈ invtSubmodule (f ∘ₗ g) :=
fun _ hx ↦ hf (hg hx)
@[simp] lemma _root_.LinearEquiv.map_mem_invtSubmodule_conj_iff {R M N : Type*} [CommSemiring R]
[AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] {f : End R M}
{e : M ≃ₗ[R] N} {p : Submodule R M} :
p.map (e : M →ₗ[R] N) ∈ (e.conj f).invtSubmodule ↔ p ∈ f.invtSubmodule := by
have : e.symm.toLinearMap ∘ₗ ((e ∘ₗ f) ∘ₗ e.symm.toLinearMap) ∘ₗ e = f := by ext; simp
rw [LinearEquiv.conj_apply, mem_invtSubmodule, mem_invtSubmodule, Submodule.map_le_iff_le_comap,
Submodule.map_equiv_eq_comap_symm, ← Submodule.comap_comp, ← Submodule.comap_comp, this]
lemma _root_.LinearEquiv.map_mem_invtSubmodule_iff {R M N : Type*} [CommSemiring R]
[AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] {f : End R N}
{e : M ≃ₗ[R] N} {p : Submodule R M} :
p.map (e : M →ₗ[R] N) ∈ f.invtSubmodule ↔ p ∈ (e.symm.conj f).invtSubmodule := by
simp [← e.map_mem_invtSubmodule_conj_iff]
end invtSubmodule
variable (R) in
lemma span_orbit_mem_invtSubmodule {G : Type*}
[Monoid G] [DistribMulAction G M] [SMulCommClass G R M] (x : M) (g : G) :
span R (MulAction.orbit G x) ∈ invtSubmodule (DistribSMul.toLinearMap R M g) := by
rw [mem_invtSubmodule, Submodule.span_le, Submodule.comap_coe]
intro y hy
simp only [Set.mem_preimage, DistribSMul.toLinearMap_apply, SetLike.mem_coe]
exact Submodule.subset_span <| MulAction.mem_orbit_of_mem_orbit g hy
end Module.End