Skip to content

Commit 5856e86

Browse files
Merge master into nightly-testing
2 parents ee2618e + 22765e8 commit 5856e86

File tree

13 files changed

+732
-700
lines changed

13 files changed

+732
-700
lines changed

Mathlib.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4500,6 +4500,7 @@ import Mathlib.LinearAlgebra.RootSystem.RootPairingCat
45004500
import Mathlib.LinearAlgebra.RootSystem.RootPositive
45014501
import Mathlib.LinearAlgebra.RootSystem.WeylGroup
45024502
import Mathlib.LinearAlgebra.SModEq
4503+
import Mathlib.LinearAlgebra.SModEq.Basic
45034504
import Mathlib.LinearAlgebra.Semisimple
45044505
import Mathlib.LinearAlgebra.SesquilinearForm
45054506
import Mathlib.LinearAlgebra.SesquilinearForm.Basic
@@ -6178,6 +6179,7 @@ import Mathlib.Tactic.Basic
61786179
import Mathlib.Tactic.Bound
61796180
import Mathlib.Tactic.Bound.Attribute
61806181
import Mathlib.Tactic.Bound.Init
6182+
import Mathlib.Tactic.ByCases
61816183
import Mathlib.Tactic.ByContra
61826184
import Mathlib.Tactic.CC
61836185
import Mathlib.Tactic.CC.Addition
@@ -6916,6 +6918,7 @@ import Mathlib.Topology.NatEmbedding
69166918
import Mathlib.Topology.Neighborhoods
69176919
import Mathlib.Topology.NhdsKer
69186920
import Mathlib.Topology.NhdsSet
6921+
import Mathlib.Topology.NhdsWithin
69196922
import Mathlib.Topology.NoetherianSpace
69206923
import Mathlib.Topology.OmegaCompletePartialOrder
69216924
import Mathlib.Topology.OpenPartialHomeomorph

Mathlib/Analysis/Distribution/ContDiffMapSupportedIn.lean

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -172,25 +172,17 @@ instance : Zero 𝓓^{n}_{K}(E, F) where
172172
lemma coe_zero : (0 : 𝓓^{n}_{K}(E, F)) = (0 : E → F) :=
173173
rfl
174174

175-
@[simp]
176-
lemma zero_apply (x : E) : (0 : 𝓓^{n}_{K}(E, F)) x = 0 :=
177-
rfl
178-
179175
instance : Add 𝓓^{n}_{K}(E, F) where
180176
add f g := .mk (f + g) (f.contDiff.add g.contDiff) <| by
181177
rw [← add_zero 0]
182178
exact f.zero_on_compl.comp_left₂ g.zero_on_compl
183179

184-
-- TODO: can this and the next lemma be auto-generated, e.g. using `simps`?
180+
-- TODO: can this lemma be auto-generated, e.g. using `simps`?
185181
-- Investigate the same question for `zero` above and `sub` , `neg` and `smul` below.
186182
@[simp]
187183
lemma coe_add (f g : 𝓓^{n}_{K}(E, F)) : (f + g : 𝓓^{n}_{K}(E, F)) = (f : E → F) + g :=
188184
rfl
189185

190-
@[simp]
191-
lemma add_apply (f g : 𝓓^{n}_{K}(E, F)) (x : E) : (f + g) x = f x + g x :=
192-
rfl
193-
194186
instance : Neg 𝓓^{n}_{K}(E, F) where
195187
neg f := .mk (-f) (f.contDiff.neg) <| by
196188
rw [← neg_zero]
@@ -200,10 +192,6 @@ instance : Neg 𝓓^{n}_{K}(E, F) where
200192
lemma coe_neg (f : 𝓓^{n}_{K}(E, F)) : (-f : 𝓓^{n}_{K}(E, F)) = (-f : E → F) :=
201193
rfl
202194

203-
@[simp]
204-
theorem neg_apply {f : 𝓓^{n}_{K}(E, F)} {x : E} : (-f) x = - f x :=
205-
rfl
206-
207195
instance instSub : Sub 𝓓^{n}_{K}(E, F) where
208196
sub f g := .mk (f - g) (f.contDiff.sub g.contDiff) <| by
209197
rw [← sub_zero 0]
@@ -213,10 +201,6 @@ instance instSub : Sub 𝓓^{n}_{K}(E, F) where
213201
lemma coe_sub (f g : 𝓓^{n}_{K}(E, F)) : (f - g : 𝓓^{n}_{K}(E, F)) = (f : E → F) - g :=
214202
rfl
215203

216-
@[simp]
217-
theorem sub_apply {f g : 𝓓^{n}_{K}(E, F)} {x : E} : (f - g) x = f x - g x :=
218-
rfl
219-
220204
instance instSMul {R} [Semiring R] [Module R F] [SMulCommClass ℝ R F] [ContinuousConstSMul R F] :
221205
SMul R 𝓓^{n}_{K}(E, F) where
222206
smul c f := .mk (c • (f : E → F)) (f.contDiff.const_smul c) <| by
@@ -228,11 +212,6 @@ lemma coe_smul {R} [Semiring R] [Module R F] [SMulCommClass ℝ R F] [Continuous
228212
(c : R) (f : 𝓓^{n}_{K}(E, F)) : (c • f : 𝓓^{n}_{K}(E, F)) = c • (f : E → F) :=
229213
rfl
230214

231-
@[simp]
232-
lemma smul_apply {R} [Semiring R] [Module R F] [SMulCommClass ℝ R F] [ContinuousConstSMul R F]
233-
(c : R) (f : 𝓓^{n}_{K}(E, F)) (x : E) : (c • f) x = c • (f x) :=
234-
rfl
235-
236215
instance : AddCommGroup 𝓓^{n}_{K}(E, F) :=
237216
DFunLike.coe_injective.addCommGroup _ rfl (fun _ _ ↦ rfl) (fun _ ↦ rfl) (fun _ _ ↦ rfl)
238217
(fun _ _ ↦ rfl) fun _ _ ↦ rfl

Mathlib/LinearAlgebra/SModEq.lean

Lines changed: 2 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,3 @@
1-
/-
2-
Copyright (c) 2020 Kenny Lau. All rights reserved.
3-
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Kenny Lau
5-
-/
6-
import Mathlib.Algebra.Module.Submodule.Map
7-
import Mathlib.Algebra.Polynomial.Eval.Defs
8-
import Mathlib.RingTheory.Ideal.Quotient.Defs
1+
import Mathlib.LinearAlgebra.SModEq.Basic
92

10-
/-!
11-
# modular equivalence for submodule
12-
-/
13-
14-
15-
open Submodule
16-
17-
open Polynomial
18-
19-
variable {R : Type*} [Ring R]
20-
variable {A : Type*} [CommRing A]
21-
variable {M : Type*} [AddCommGroup M] [Module R M] (U U₁ U₂ : Submodule R M)
22-
variable {x x₁ x₂ y y₁ y₂ z z₁ z₂ : M}
23-
variable {N : Type*} [AddCommGroup N] [Module R N] (V V₁ V₂ : Submodule R N)
24-
25-
/-- A predicate saying two elements of a module are equivalent modulo a submodule. -/
26-
def SModEq (x y : M) : Prop :=
27-
(Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y
28-
29-
@[inherit_doc] notation:50 x " ≡ " y " [SMOD " N "]" => SModEq N x y
30-
31-
variable {U U₁ U₂}
32-
33-
protected theorem SModEq.def :
34-
x ≡ y [SMOD U] ↔ (Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y :=
35-
Iff.rfl
36-
37-
namespace SModEq
38-
39-
theorem sub_mem : x ≡ y [SMOD U] ↔ x - y ∈ U := by rw [SModEq.def, Submodule.Quotient.eq]
40-
41-
@[simp]
42-
theorem top : x ≡ y [SMOD (⊤ : Submodule R M)] :=
43-
(Submodule.Quotient.eq ⊤).2 mem_top
44-
45-
@[simp]
46-
theorem bot : x ≡ y [SMOD (⊥ : Submodule R M)] ↔ x = y := by
47-
rw [SModEq.def, Submodule.Quotient.eq, mem_bot, sub_eq_zero]
48-
49-
@[mono]
50-
theorem mono (HU : U₁ ≤ U₂) (hxy : x ≡ y [SMOD U₁]) : x ≡ y [SMOD U₂] :=
51-
(Submodule.Quotient.eq U₂).2 <| HU <| (Submodule.Quotient.eq U₁).1 hxy
52-
53-
@[refl]
54-
protected theorem refl (x : M) : x ≡ x [SMOD U] :=
55-
@rfl _ _
56-
57-
protected theorem rfl : x ≡ x [SMOD U] :=
58-
SModEq.refl _
59-
60-
instance : IsRefl _ (SModEq U) :=
61-
⟨SModEq.refl⟩
62-
63-
@[symm]
64-
nonrec theorem symm (hxy : x ≡ y [SMOD U]) : y ≡ x [SMOD U] :=
65-
hxy.symm
66-
67-
theorem comm : x ≡ y [SMOD U] ↔ y ≡ x [SMOD U] := ⟨symm, symm⟩
68-
69-
@[trans]
70-
nonrec theorem trans (hxy : x ≡ y [SMOD U]) (hyz : y ≡ z [SMOD U]) : x ≡ z [SMOD U] :=
71-
hxy.trans hyz
72-
73-
instance instTrans : Trans (SModEq U) (SModEq U) (SModEq U) where
74-
trans := trans
75-
76-
@[gcongr]
77-
theorem add (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ + x₂ ≡ y₁ + y₂ [SMOD U] := by
78-
rw [SModEq.def] at hxy₁ hxy₂ ⊢
79-
simp_rw [Quotient.mk_add, hxy₁, hxy₂]
80-
81-
@[gcongr]
82-
theorem sum {ι} {s : Finset ι} {x y : ι → M}
83-
(hxy : ∀ i ∈ s, x i ≡ y i [SMOD U]) : ∑ i ∈ s, x i ≡ ∑ i ∈ s, y i [SMOD U] := by
84-
classical
85-
induction s using Finset.cons_induction with
86-
| empty => simp [SModEq.rfl]
87-
| cons i s _ ih =>
88-
grw [Finset.sum_cons, Finset.sum_cons, hxy i (Finset.mem_cons_self i s),
89-
ih (fun j hj ↦ hxy j (Finset.mem_cons_of_mem hj))]
90-
91-
@[gcongr]
92-
theorem smul (hxy : x ≡ y [SMOD U]) (c : R) : c • x ≡ c • y [SMOD U] := by
93-
rw [SModEq.def] at hxy ⊢
94-
simp_rw [Quotient.mk_smul, hxy]
95-
96-
@[gcongr]
97-
lemma nsmul (hxy : x ≡ y [SMOD U]) (n : ℕ) : n • x ≡ n • y [SMOD U] := by
98-
rw [SModEq.def] at hxy ⊢
99-
simp_rw [Quotient.mk_smul, hxy]
100-
101-
@[gcongr]
102-
lemma zsmul (hxy : x ≡ y [SMOD U]) (n : ℤ) : n • x ≡ n • y [SMOD U] := by
103-
rw [SModEq.def] at hxy ⊢
104-
simp_rw [Quotient.mk_smul, hxy]
105-
106-
@[gcongr]
107-
theorem mul {I : Ideal A} {x₁ x₂ y₁ y₂ : A} (hxy₁ : x₁ ≡ y₁ [SMOD I])
108-
(hxy₂ : x₂ ≡ y₂ [SMOD I]) : x₁ * x₂ ≡ y₁ * y₂ [SMOD I] := by
109-
simp only [SModEq.def, Ideal.Quotient.mk_eq_mk, map_mul] at hxy₁ hxy₂ ⊢
110-
rw [hxy₁, hxy₂]
111-
112-
@[gcongr]
113-
theorem prod {I : Ideal A} {ι} {s : Finset ι} {x y : ι → A}
114-
(hxy : ∀ i ∈ s, x i ≡ y i [SMOD I]) : ∏ i ∈ s, x i ≡ ∏ i ∈ s, y i [SMOD I] := by
115-
classical
116-
induction s using Finset.cons_induction with
117-
| empty => simp [SModEq.rfl]
118-
| cons i s _ ih =>
119-
grw [Finset.prod_cons, Finset.prod_cons, hxy i (Finset.mem_cons_self i s),
120-
ih (fun j hj ↦ hxy j (Finset.mem_cons_of_mem hj))]
121-
122-
@[gcongr]
123-
lemma pow {I : Ideal A} {x y : A} (n : ℕ) (hxy : x ≡ y [SMOD I]) :
124-
x ^ n ≡ y ^ n [SMOD I] := by
125-
simp only [SModEq.def, Ideal.Quotient.mk_eq_mk, map_pow] at hxy ⊢
126-
rw [hxy]
127-
128-
@[gcongr]
129-
lemma neg (hxy : x ≡ y [SMOD U]) : - x ≡ - y [SMOD U] := by
130-
simpa only [SModEq.def, Quotient.mk_neg, neg_inj]
131-
132-
@[gcongr]
133-
lemma sub (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ - x₂ ≡ y₁ - y₂ [SMOD U] := by
134-
rw [SModEq.def] at hxy₁ hxy₂ ⊢
135-
simp_rw [Quotient.mk_sub, hxy₁, hxy₂]
136-
137-
theorem zero : x ≡ 0 [SMOD U] ↔ x ∈ U := by rw [SModEq.def, Submodule.Quotient.eq, sub_zero]
138-
139-
theorem _root_.sub_smodEq_zero : x - y ≡ 0 [SMOD U] ↔ x ≡ y [SMOD U] := by
140-
simp only [SModEq.sub_mem, sub_zero]
141-
142-
theorem map (hxy : x ≡ y [SMOD U]) (f : M →ₗ[R] N) : f x ≡ f y [SMOD U.map f] :=
143-
(Submodule.Quotient.eq _).2 <| f.map_sub x y ▸ mem_map_of_mem <| (Submodule.Quotient.eq _).1 hxy
144-
145-
theorem comap {f : M →ₗ[R] N} (hxy : f x ≡ f y [SMOD V]) : x ≡ y [SMOD V.comap f] :=
146-
(Submodule.Quotient.eq _).2 <|
147-
show f (x - y) ∈ V from (f.map_sub x y).symm ▸ (Submodule.Quotient.eq _).1 hxy
148-
149-
@[gcongr]
150-
theorem eval {R : Type*} [CommRing R] {I : Ideal R} {x y : R} (h : x ≡ y [SMOD I]) (f : R[X]) :
151-
f.eval x ≡ f.eval y [SMOD I] := by
152-
simp_rw [Polynomial.eval_eq_sum, Polynomial.sum]
153-
gcongr
154-
155-
end SModEq
3+
deprecated_module (since := "2025-10-28")
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
/-
2+
Copyright (c) 2020 Kenny Lau. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Kenny Lau
5+
-/
6+
import Mathlib.Algebra.Module.Submodule.Map
7+
import Mathlib.Algebra.Polynomial.Eval.Defs
8+
import Mathlib.RingTheory.Ideal.Quotient.Defs
9+
10+
/-!
11+
# modular equivalence for submodule
12+
-/
13+
14+
15+
open Submodule
16+
17+
open Polynomial
18+
19+
variable {R : Type*} [Ring R]
20+
variable {A : Type*} [CommRing A]
21+
variable {M : Type*} [AddCommGroup M] [Module R M] (U U₁ U₂ : Submodule R M)
22+
variable {x x₁ x₂ y y₁ y₂ z z₁ z₂ : M}
23+
variable {N : Type*} [AddCommGroup N] [Module R N] (V V₁ V₂ : Submodule R N)
24+
25+
/-- A predicate saying two elements of a module are equivalent modulo a submodule. -/
26+
def SModEq (x y : M) : Prop :=
27+
(Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y
28+
29+
@[inherit_doc] notation:50 x " ≡ " y " [SMOD " N "]" => SModEq N x y
30+
31+
variable {U U₁ U₂}
32+
33+
protected theorem SModEq.def :
34+
x ≡ y [SMOD U] ↔ (Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y :=
35+
Iff.rfl
36+
37+
namespace SModEq
38+
39+
theorem sub_mem : x ≡ y [SMOD U] ↔ x - y ∈ U := by rw [SModEq.def, Submodule.Quotient.eq]
40+
41+
@[simp]
42+
theorem top : x ≡ y [SMOD (⊤ : Submodule R M)] :=
43+
(Submodule.Quotient.eq ⊤).2 mem_top
44+
45+
@[simp]
46+
theorem bot : x ≡ y [SMOD (⊥ : Submodule R M)] ↔ x = y := by
47+
rw [SModEq.def, Submodule.Quotient.eq, mem_bot, sub_eq_zero]
48+
49+
@[mono]
50+
theorem mono (HU : U₁ ≤ U₂) (hxy : x ≡ y [SMOD U₁]) : x ≡ y [SMOD U₂] :=
51+
(Submodule.Quotient.eq U₂).2 <| HU <| (Submodule.Quotient.eq U₁).1 hxy
52+
53+
@[refl]
54+
protected theorem refl (x : M) : x ≡ x [SMOD U] :=
55+
@rfl _ _
56+
57+
protected theorem rfl : x ≡ x [SMOD U] :=
58+
SModEq.refl _
59+
60+
instance : IsRefl _ (SModEq U) :=
61+
⟨SModEq.refl⟩
62+
63+
@[symm]
64+
nonrec theorem symm (hxy : x ≡ y [SMOD U]) : y ≡ x [SMOD U] :=
65+
hxy.symm
66+
67+
theorem comm : x ≡ y [SMOD U] ↔ y ≡ x [SMOD U] := ⟨symm, symm⟩
68+
69+
@[trans]
70+
nonrec theorem trans (hxy : x ≡ y [SMOD U]) (hyz : y ≡ z [SMOD U]) : x ≡ z [SMOD U] :=
71+
hxy.trans hyz
72+
73+
instance instTrans : Trans (SModEq U) (SModEq U) (SModEq U) where
74+
trans := trans
75+
76+
@[gcongr]
77+
theorem add (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ + x₂ ≡ y₁ + y₂ [SMOD U] := by
78+
rw [SModEq.def] at hxy₁ hxy₂ ⊢
79+
simp_rw [Quotient.mk_add, hxy₁, hxy₂]
80+
81+
@[gcongr]
82+
theorem sum {ι} {s : Finset ι} {x y : ι → M}
83+
(hxy : ∀ i ∈ s, x i ≡ y i [SMOD U]) : ∑ i ∈ s, x i ≡ ∑ i ∈ s, y i [SMOD U] := by
84+
classical
85+
induction s using Finset.cons_induction with
86+
| empty => simp [SModEq.rfl]
87+
| cons i s _ ih =>
88+
grw [Finset.sum_cons, Finset.sum_cons, hxy i (Finset.mem_cons_self i s),
89+
ih (fun j hj ↦ hxy j (Finset.mem_cons_of_mem hj))]
90+
91+
@[gcongr]
92+
theorem smul (hxy : x ≡ y [SMOD U]) (c : R) : c • x ≡ c • y [SMOD U] := by
93+
rw [SModEq.def] at hxy ⊢
94+
simp_rw [Quotient.mk_smul, hxy]
95+
96+
@[gcongr]
97+
lemma nsmul (hxy : x ≡ y [SMOD U]) (n : ℕ) : n • x ≡ n • y [SMOD U] := by
98+
rw [SModEq.def] at hxy ⊢
99+
simp_rw [Quotient.mk_smul, hxy]
100+
101+
@[gcongr]
102+
lemma zsmul (hxy : x ≡ y [SMOD U]) (n : ℤ) : n • x ≡ n • y [SMOD U] := by
103+
rw [SModEq.def] at hxy ⊢
104+
simp_rw [Quotient.mk_smul, hxy]
105+
106+
@[gcongr]
107+
theorem mul {I : Ideal A} {x₁ x₂ y₁ y₂ : A} (hxy₁ : x₁ ≡ y₁ [SMOD I])
108+
(hxy₂ : x₂ ≡ y₂ [SMOD I]) : x₁ * x₂ ≡ y₁ * y₂ [SMOD I] := by
109+
simp only [SModEq.def, Ideal.Quotient.mk_eq_mk, map_mul] at hxy₁ hxy₂ ⊢
110+
rw [hxy₁, hxy₂]
111+
112+
@[gcongr]
113+
theorem prod {I : Ideal A} {ι} {s : Finset ι} {x y : ι → A}
114+
(hxy : ∀ i ∈ s, x i ≡ y i [SMOD I]) : ∏ i ∈ s, x i ≡ ∏ i ∈ s, y i [SMOD I] := by
115+
classical
116+
induction s using Finset.cons_induction with
117+
| empty => simp [SModEq.rfl]
118+
| cons i s _ ih =>
119+
grw [Finset.prod_cons, Finset.prod_cons, hxy i (Finset.mem_cons_self i s),
120+
ih (fun j hj ↦ hxy j (Finset.mem_cons_of_mem hj))]
121+
122+
@[gcongr]
123+
lemma pow {I : Ideal A} {x y : A} (n : ℕ) (hxy : x ≡ y [SMOD I]) :
124+
x ^ n ≡ y ^ n [SMOD I] := by
125+
simp only [SModEq.def, Ideal.Quotient.mk_eq_mk, map_pow] at hxy ⊢
126+
rw [hxy]
127+
128+
@[gcongr]
129+
lemma neg (hxy : x ≡ y [SMOD U]) : - x ≡ - y [SMOD U] := by
130+
simpa only [SModEq.def, Quotient.mk_neg, neg_inj]
131+
132+
@[gcongr]
133+
lemma sub (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ - x₂ ≡ y₁ - y₂ [SMOD U] := by
134+
rw [SModEq.def] at hxy₁ hxy₂ ⊢
135+
simp_rw [Quotient.mk_sub, hxy₁, hxy₂]
136+
137+
theorem zero : x ≡ 0 [SMOD U] ↔ x ∈ U := by rw [SModEq.def, Submodule.Quotient.eq, sub_zero]
138+
139+
theorem _root_.sub_smodEq_zero : x - y ≡ 0 [SMOD U] ↔ x ≡ y [SMOD U] := by
140+
simp only [SModEq.sub_mem, sub_zero]
141+
142+
theorem map (hxy : x ≡ y [SMOD U]) (f : M →ₗ[R] N) : f x ≡ f y [SMOD U.map f] :=
143+
(Submodule.Quotient.eq _).2 <| f.map_sub x y ▸ mem_map_of_mem <| (Submodule.Quotient.eq _).1 hxy
144+
145+
theorem comap {f : M →ₗ[R] N} (hxy : f x ≡ f y [SMOD V]) : x ≡ y [SMOD V.comap f] :=
146+
(Submodule.Quotient.eq _).2 <|
147+
show f (x - y) ∈ V from (f.map_sub x y).symm ▸ (Submodule.Quotient.eq _).1 hxy
148+
149+
@[gcongr]
150+
theorem eval {R : Type*} [CommRing R] {I : Ideal R} {x y : R} (h : x ≡ y [SMOD I]) (f : R[X]) :
151+
f.eval x ≡ f.eval y [SMOD I] := by
152+
simp_rw [Polynomial.eval_eq_sum, Polynomial.sum]
153+
gcongr
154+
155+
end SModEq

0 commit comments

Comments
 (0)