Skip to content

Commit f2e6589

Browse files
Merge master into nightly-testing
2 parents eac921f + 72acbe6 commit f2e6589

26 files changed

Lines changed: 736 additions & 107 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4338,6 +4338,7 @@ public import Mathlib.Dynamics.Ergodic.Function
43384338
public import Mathlib.Dynamics.Ergodic.MeasurePreserving
43394339
public import Mathlib.Dynamics.Ergodic.RadonNikodym
43404340
public import Mathlib.Dynamics.FixedPoints.Basic
4341+
public import Mathlib.Dynamics.FixedPoints.Defs
43414342
public import Mathlib.Dynamics.FixedPoints.Prufer
43424343
public import Mathlib.Dynamics.FixedPoints.Topology
43434344
public import Mathlib.Dynamics.Flow

Mathlib/Algebra/Lie/Graded.lean

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ public import Mathlib.Algebra.Lie.Derivation.Basic
1212
# Graded Lie algebras
1313
1414
This file defines typeclasses `SetLike.GradedBracket` and `GradedLieAlgebra`, for working with Lie
15-
algebras that are graded by a collection `ℒ` of submodules. The additivity of degree with respect to
16-
the bracket product is encoded by an addition condition so we can avoid the usual difficulties of
17-
adding elements of `A (i + j)` to elements of `A (j + i)`.
15+
algebras that are graded by a collection `ℒ` of submodules.
1816
1917
## Main definitions
2018
@@ -25,6 +23,12 @@ adding elements of `A (i + j)` to elements of `A (j + i)`.
2523
* `LieDerivation.ofGrading`: A Lie derivation on a graded Lie algebra, that scalar-multiplies graded
2624
pieces by an additive map applied to degree.
2725
26+
## Implementation notes
27+
28+
For now we only implement internally-graded Lie algebras; supporting the externally-graded case
29+
would be achieved by generalizing the `LieRing (⨁ i, ℒ i)` instance to take a family of types,
30+
and defining a new `GradedMonoid.GBracket` class to provide the data piecewise.
31+
2832
-/
2933

3034
@[expose] public section
@@ -38,7 +42,7 @@ section SetLike
3842
/-- A class that ensures a bracket product preserves an additive grading. -/
3943
class SetLike.GradedBracket [SetLike σ L] [Bracket L L] [Add ι] (ℒ : ι → σ) : Prop where
4044
/-- Bracket is homogeneous -/
41-
bracket_mem : ∀ ⦃i j k⦄ {gi gj}, i + j = k → gi ∈ ℒ i → gj ∈ ℒ j → ⁅gi, gj⁆ ∈ ℒ k
45+
bracket_mem : ∀ ⦃i j⦄ {gi gj}, gi ∈ ℒ i → gj ∈ ℒ j → ⁅gi, gj⁆ ∈ ℒ (i + j)
4246

4347
variable [DecidableEq ι] [AddCommMonoid ι] [CommRing R] [LieRing L] [LieAlgebra R L]
4448
(ℒ : ι → Submodule R L)
@@ -125,7 +129,7 @@ def ofGradingSum (φ : ι →+ R) : LieDerivation R (⨁ i, ℒ i) (⨁ i, ℒ i
125129
add_lie, smul_add, add_sub, ← sub_sub]
126130
congr 1
127131
have : (decompose ℒ).symm ⁅of (fun i ↦ ℒ i) i a, of (fun i ↦ ℒ i) k b⁆ ∈ ℒ (i + k) := by
128-
simp [SetLike.GradedBracket.bracket_mem rfl (Submodule.coe_mem a) (Submodule.coe_mem b)]
132+
simp [SetLike.GradedBracket.bracket_mem (Submodule.coe_mem a) (Submodule.coe_mem b)]
129133
rw [hM _ _ this, hM k (of (ℒ ·) k b) (by simp), ← lie_skew (of (ℒ ·) k b),
130134
add_sub_right_comm, add_right_cancel_iff, add_comm i k, map_add, add_smul,
131135
DirectSum.add_apply, Submodule.coe_add, sub_eq_add_neg, lie_smul, add_left_cancel_iff,

Mathlib/Algebra/Module/Torsion/PrimaryComponent.lean

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module
77

88
public import Mathlib.Algebra.Module.Torsion.Basic
99
public import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas
10+
public import Mathlib.RingTheory.DedekindDomain.Factorization
1011

1112
/-!
1213
# I-Primary Components of modules
@@ -15,7 +16,7 @@ Let `A` be a commutative ring and `I`, an ideal of `A`.
1516
Given an `A`-Module `M` it's `I`-primary component is defined as
1617
$$M(I) := \bigcup_{i : \mathbb{N}} \text{torsionBySet A M } I ^ i.$$
1718
18-
For `P : HeightOneSpectrum A`, the main result of this file (TODO) is that
19+
For `P : HeightOneSpectrum A`, the main result of this file is that
1920
$$M \cong \bigoplus_{P} M(P).$$
2021
2122
## Main definitions
@@ -28,6 +29,8 @@ For `P : HeightOneSpectrum A`, the main result of this file (TODO) is that
2829

2930
variable {A M M₁ M₂ : Type*} [CommRing A]
3031

32+
open IsDedekindDomain Submodule Module HeightOneSpectrum Set Function
33+
3134
namespace Ideal
3235

3336
variable (I : Ideal A)
@@ -127,6 +130,64 @@ theorem primaryComponent_sup (N₁ N₂ : Submodule A M) (hD : Disjoint N₁ N
127130
aesop
128131
· use y, hymem, z, hzmem
129132

133+
section IsDedekindDomain
134+
135+
variable [IsDedekindDomain A]
136+
137+
open scoped nonZeroDivisors
138+
139+
theorem iSup_primaryComponent_eq_top (h : IsTorsion A M) :
140+
⨆ P : HeightOneSpectrum A, primaryComponent M (P : Ideal A) = ⊤ := by
141+
rw [eq_top_iff']
142+
intro x
143+
obtain ⟨⟨a : A, ha : a ∈ A⁰⟩, hmem : a • x = 0⟩ := h (x := x)
144+
replace hmem : x ∈ torsionBySet A M (span {a}) := by
145+
simp_all [← torsionBySet_eq_torsionBySet_span {a}]
146+
have ha0 : span {a} ≠ ⊥ := by simpa using nonZeroDivisors.ne_zero ha
147+
rw [← iInf_maxPowDividing_eq ha0] at hmem
148+
let : Fintype (mulSupport fun v : HeightOneSpectrum A => v.maxPowDividing (span {a})) :=
149+
Finite.fintype (hasFiniteMulSupport ha0)
150+
let S := (mulSupport fun v : HeightOneSpectrum A => v.maxPowDividing (span {a})).toFinset
151+
have : (⨅ i : HeightOneSpectrum A, i.maxPowDividing (span {a})) =
152+
(⨅ i ∈ S, i.maxPowDividing (span {a})) := by
153+
ext x
154+
constructor
155+
· aesop
156+
· simp only [mem_iInf]
157+
intro h i
158+
by_cases htop : i.maxPowDividing (span {a}) = ⊤ <;> simp_all [S]
159+
have hPairwise : (S : Set (HeightOneSpectrum _)).Pairwise
160+
fun i j ↦ i.maxPowDividing (span {a}) ⊔ j.maxPowDividing (span {a}) = ⊤ :=
161+
fun r hr s hs hrs ↦ (isCoprime_pow_of_ne _ _ hrs _ _).sup_eq
162+
rw [this, ← iSup_torsionBySet_ideal_eq_torsionBySet_iInf hPairwise] at hmem
163+
revert x
164+
rw [← SetLike.le_def]
165+
refine iSup_mono (fun P x hxmem ↦ ?_)
166+
by_cases hPS : P ∈ S
167+
· simp_all only [mem_nonZeroDivisors_iff_ne_zero, ne_eq, mem_toFinset, mem_mulSupport,
168+
one_eq_top, primaryComponent_mem, mem_torsionBySet_iff, SetLike.coe_sort_coe,
169+
Subtype.forall, iSup_pos, S]
170+
exact ⟨(Associates.mk P.asIdeal).count (Associates.mk (span {a})).factors, fun _ b ↦ hxmem _ b⟩
171+
· simp_all
172+
173+
variable (A M) in
174+
theorem iSupIndep_primaryComponent :
175+
iSupIndep fun P : HeightOneSpectrum A => primaryComponent M (P : Ideal A) := by
176+
rw [iSupIndep_iff_finset_sum_eq_zero_imp_eq_zero]
177+
intro s p hmem hsum
178+
simp only [primaryComponent_mem] at hmem
179+
choose! f hmem using hmem
180+
let m := s.sup f
181+
have hSupIndep : iSupIndep fun i : HeightOneSpectrum A ↦ torsionBySet A M ↑(i.asIdeal ^ m) := by
182+
rw [iSupIndep_iff_supIndep]
183+
exact fun _ ↦ supIndep_torsionBySet_ideal
184+
fun _ _ _ _ hPQ ↦ (isCoprime_pow_of_ne _ _ hPQ _ _).sup_eq
185+
rw [iSupIndep_iff_finset_sum_eq_zero_imp_eq_zero] at hSupIndep
186+
apply hSupIndep _ _ ?_ hsum
187+
exact fun P hP ↦ torsionBySet_le_torsionBySet_pow _ _ (Finset.le_sup hP) _ (hmem P hP)
188+
189+
end IsDedekindDomain
190+
130191
end AddCommGroup
131192

132193
end CommRing

Mathlib/AlgebraicGeometry/Gluing.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ namespace Scheme
7777
limits library easier.)
7878
4. An open immersion `f i j : V i j ⟶ U i` for each `i j : ι`.
7979
5. A transition map `t i j : V i j ⟶ V j i` for each `i j : ι`.
80+
8081
such that
8182
6. `f i i` is an isomorphism.
8283
7. `t i i` is the identity.
@@ -500,6 +501,7 @@ For such a diagram, we can glue them directly since the gluing conditions are al
500501
The intended usage is to provide the following instances:
501502
- `∀ {i j} (f : i ⟶ j), IsOpenImmersion (F.map f)`
502503
- `(F ⋙ forget).IsLocallyDirected`
504+
503505
and to directly use the `colimit` API.
504506
Also see `AlgebraicGeometry.Scheme.IsLocallyDirected.openCover` for the open cover of the `colimit`.
505507

Mathlib/AlgebraicGeometry/Morphisms/Basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ schemes, it is equivalent to `Q : AffineTargetMorphismProperty`.
473473
To make the proofs easier, we state it instead as
474474
1. `Q` is local at the target
475475
2. `P f` if and only if `∀ U, Q (f ∣_ U)` ranging over all affine opens of the target of `f`.
476+
476477
See `HasAffineProperty.iff`.
477478
-/
478479
class HasAffineProperty (P : MorphismProperty Scheme)

Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ and for `f : Spec B ⟶ Spec A`, it is equivalent to the ring hom property `Q`.
250250
To make the proofs easier, we state it instead as
251251
1. `Q` is local (See `RingHom.PropertyIsLocal`)
252252
2. `P f` if and only if `Q` holds for every `Γ(Y, U) ⟶ Γ(X, V)` for all affine `U`, `V`.
253-
See `HasRingHomProperty.iff_appLE`.
253+
See `HasRingHomProperty.iff_appLE`.
254254
-/
255255
class HasRingHomProperty (P : MorphismProperty Scheme.{u})
256256
(Q : outParam (∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop)) : Prop where

Mathlib/Analysis/InnerProductSpace/Orthonormal.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ theorem orthonormal_iff_ite [DecidableEq ι] {v : ι → E} :
9595
· intro i j hij
9696
simpa [hij] using h i j
9797

98+
@[simp]
99+
theorem orthonormal_subsingleton_iff [Subsingleton ι] {v : ι → E} :
100+
Orthonormal 𝕜 v ↔ ∀ i, ‖v i‖ = 1 := by
101+
simp [orthonormal_iff_ite, ← map_pow, pow_eq_one_iff_of_nonneg]
102+
98103
/-- `if ... then ... else` characterization of a set of vectors being orthonormal. (Inner product
99104
equals Kronecker delta.) -/
100105
theorem orthonormal_subtype_iff_ite [DecidableEq E] {s : Set E} :

Mathlib/Analysis/InnerProductSpace/PiL2.lean

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ the last section, various properties of matrices are explored.
5151
- `stdOrthonormalBasis`: provides an arbitrarily-chosen `OrthonormalBasis` of a given
5252
finite-dimensional inner product space
5353
54+
- `orthonormalBasisSingleton`: an orthonormal basis formed by a single unit vector in a
55+
one-dimensional inner product space.
56+
5457
For consequences in infinite dimension (Hilbert bases, etc.), see the file
5558
`Analysis.InnerProductSpace.L2Space`.
5659
@@ -636,7 +639,7 @@ variable (ι 𝕜) in
636639
/-- `OrthonormalBasis.singleton ι 𝕜` is the orthonormal basis sending the unique element of `ι` to
637640
`1 : 𝕜`. -/
638641
protected noncomputable def singleton : OrthonormalBasis ι 𝕜 𝕜 :=
639-
(Basis.singleton ι 𝕜).toOrthonormalBasis (by simp [orthonormal_iff_ite, Unique.eq_default])
642+
(Basis.singleton ι 𝕜).toOrthonormalBasis (by simp)
640643

641644
@[simp]
642645
theorem singleton_apply (i) : OrthonormalBasis.singleton ι 𝕜 i = 1 := Basis.singleton_apply _ _ _
@@ -1312,3 +1315,34 @@ theorem InnerProductSpace.symm_toEuclideanLin_rankOne {𝕜 m n : Type*} [RCLike
13121315
[Fintype n] [DecidableEq n] (x : EuclideanSpace 𝕜 m) (y : EuclideanSpace 𝕜 n) :
13131316
toEuclideanLin.symm (rankOne 𝕜 x y) = .vecMulVec x (star y) := by
13141317
simp [toLpLin, toMatrix', ← ext_iff, vecMulVec_apply, inner_single_right, mul_comm]
1318+
1319+
namespace FiniteDimensional
1320+
variable [Unique ι] (h : Module.finrank 𝕜 E = 1) {v : E} (hv : ‖v‖ = 1)
1321+
1322+
variable (ι 𝕜 v) in
1323+
/-- In an inner product space with dimension 1, a set `{v}` is an orthonormal basis for
1324+
`‖v‖ = 1`. -/
1325+
def orthonormalBasisSingleton : OrthonormalBasis ι 𝕜 E :=
1326+
(basisSingleton ι h v (by aesop)).toOrthonormalBasis (by simpa)
1327+
1328+
@[simp]
1329+
theorem orthonormalBasisSingleton_apply (i : ι) :
1330+
orthonormalBasisSingleton ι 𝕜 h v hv i = v := by
1331+
simp [orthonormalBasisSingleton]
1332+
1333+
@[simp]
1334+
theorem toBasis_orthonormalBasisSingleton :
1335+
(orthonormalBasisSingleton ι 𝕜 h v hv).toBasis = basisSingleton ι h v (by aesop) := by
1336+
simp [orthonormalBasisSingleton]
1337+
1338+
@[simp]
1339+
theorem orthonormalBasisSingleton_repr_apply (w : E) :
1340+
(orthonormalBasisSingleton ι 𝕜 h v hv).repr w = .single default ⟪v, w⟫ := by
1341+
ext
1342+
simp [OrthonormalBasis.repr_apply_apply, Unique.eq_default]
1343+
1344+
theorem range_orthonormalBasisSingleton :
1345+
Set.range (orthonormalBasisSingleton ι 𝕜 h v hv) = {v} := by
1346+
simp
1347+
1348+
end FiniteDimensional

Mathlib/Combinatorics/SimpleGraph/Connectivity/Connected.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ lemma preconnected_iff_reachable_eq_top : G.Preconnected ↔ G.Reachable = ⊤ :
238238
aesop (add simp Preconnected)
239239

240240
lemma preconnected_bot_iff_subsingleton : (⊥ : SimpleGraph V).Preconnected ↔ Subsingleton V := by
241-
refine ⟨fun h ↦ ?_, fun h ↦ by simpa [subsingleton_iff, ← reachable_bot] using h
241+
refine ⟨fun h ↦ ?_, fun h ↦ by simp [Preconnected]
242242
contrapose! h
243243
simp [nontrivial_iff.mp h, Preconnected, reachable_bot]
244244

Mathlib/Combinatorics/SimpleGraph/Diam.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ lemma ediam_eq_top : G.ediam = ⊤ ↔ ∀ b < ⊤, ∃ u v, b < G.edist u v :=
151151
simp only [ediam, eccent, iSup_eq_top, lt_iSup_iff]
152152

153153
lemma ediam_eq_zero_of_subsingleton [Subsingleton α] : G.ediam = 0 := by
154-
rw [ediam_def, ENat.iSup_eq_zero]
155-
simpa [edist_eq_zero_iff, Prod.forall] using subsingleton_iff.mp ‹_›
154+
simp [ediam_def]
156155

157156
lemma nontrivial_of_ediam_ne_zero (h : G.ediam ≠ 0) : Nontrivial α := by
158157
contrapose! h

0 commit comments

Comments
 (0)