Skip to content

Commit 67c2571

Browse files
committed
Merge branch 'definition-of-Cohen-Macaulay' into polynomial-over-CM-ring-is-CM
2 parents d008fc8 + 4521dbf commit 67c2571

File tree

254 files changed

+7281
-2014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+7281
-2014
lines changed

.github/workflows/nightly_bump_and_merge.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,13 @@ jobs:
337337
IFS='|' read -r PR_NUMBER GITHUB_DIFF _ <<< "$MERGE_INFO"
338338
MESSAGE+="- [lean-pr-testing-${PR_NUMBER}](${GITHUB_DIFF}) (adaptations for lean#${PR_NUMBER})"$'\n\n'
339339
MESSAGE+=$'```bash\n'
340-
MESSAGE+=$'tmp=$(mktemp)\n'
341-
MESSAGE+=$'wget -qO "$tmp" https://raw.githubusercontent.com/leanprover-community/mathlib-ci/${{ steps.get_mathlib_ci.outputs.ref }}/scripts/nightly/merge-lean-testing-pr.sh\n'
342-
MESSAGE+=$'chmod +x "$tmp"\n'
343-
MESSAGE+="\"\$tmp\" ${PR_NUMBER}"$'\n'
340+
MESSAGE+=$'tmpscript=$(mktemp)\n'
341+
MESSAGE+=$'wget -qO "$tmpscript" https://raw.githubusercontent.com/leanprover-community/mathlib-ci/${{ steps.get_mathlib_ci.outputs.ref }}/scripts/nightly/merge-lean-testing-pr.sh\n'
342+
MESSAGE+=$'chmod +x "$tmpscript"\n'
343+
MESSAGE+=$'tmpdir=$(mktemp -d)\n'
344+
MESSAGE+=$'git clone --depth=1 --filter=blob:none https://github.com/leanprover-community/mathlib4 "$tmpdir"\n'
345+
MESSAGE+=$'cd "$tmpdir"\n'
346+
MESSAGE+="\"\$tmpscript\" ${PR_NUMBER}"$'\n'
344347
MESSAGE+=$'```\n\n'
345348
done
346349
else

.github/workflows/nightly_detect_failure.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ jobs:
431431
bump_branch_suffix = bump_branch.replace('bump/', '')
432432
failed_link = f"https://github.com/{repository}/actions/runs/{current_run_id}"
433433
payload = f"🛠️: Automatic PR creation [failed]({failed_link}). Please create a new bump/nightly-{current_version} branch from nightly-testing (specifically {sha}), and then PR that to {bump_branch}. "
434-
payload += "To do so semi-automatically from a mathlib checkout, run:\n\n"
435-
payload += f"```bash\ntmp=$(mktemp)\nwget -qO \"$tmp\" https://raw.githubusercontent.com/leanprover-community/mathlib-ci/${{ steps.get_mathlib_ci.outputs.ref }}/scripts/nightly/create-adaptation-pr.sh\nchmod +x \"$tmp\"\n\"$tmp\" --bumpversion={bump_branch_suffix} --nightlydate={current_version} --nightlysha={sha}\n```\n"
434+
payload += "To do so semi-automatically, run:\n\n"
435+
payload += f"```bash\ntmpscript=$(mktemp)\nwget -qO \"$tmpscript\" https://raw.githubusercontent.com/leanprover-community/mathlib-ci/${{ steps.get_mathlib_ci.outputs.ref }}/scripts/nightly/create-adaptation-pr.sh\nchmod +x \"$tmpscript\"\ntmpdir=$(mktemp -d)\ngit clone --filter=blob:none https://github.com/leanprover-community/mathlib4 \"$tmpdir\"\ncd \"$tmpdir\"\n\"$tmpscript\" --bumpversion={bump_branch_suffix} --nightlydate={current_version} --nightlysha={sha}\n```\n"
436436
# Check if we already posted a message for this nightly date and bump branch.
437437
# We extract these fields from the last bot message rather than comparing substrings,
438438
# since the message also contains a run ID that differs between workflow runs.

Archive/Wiedijk100Theorems/AbelRuffini.lean

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,25 @@ import Mathlib.RingTheory.Int.Basic
1111
import Mathlib.RingTheory.RootsOfUnity.Minpoly
1212

1313
/-!
14-
# Construction of an algebraic number that is not solvable by radicals.
14+
# Construction of an algebraic number that is not solvable by radicals
1515
1616
The main ingredients are:
17-
* `solvableByRad.isSolvable'` in `Mathlib/FieldTheory/AbelRuffini.lean` :
18-
an irreducible polynomial with an `IsSolvableByRad` root has solvable Galois group
17+
18+
* `isSolvable_gal_of_irreducible` in `Mathlib/FieldTheory/AbelRuffini.lean`:
19+
an irreducible polynomial with an `IsSolvableByRad` root has solvable Galois group.
1920
* `galActionHom_bijective_of_prime_degree'` in `Mathlib/FieldTheory/PolynomialGaloisGroup.lean` :
20-
an irreducible polynomial of prime degree with 1-3 non-real roots has full Galois group
21+
an irreducible polynomial of prime degree with 1-3 non-real roots has full Galois group.
2122
* `Equiv.Perm.not_solvable` in `Mathlib/GroupTheory/Solvable.lean` : the symmetric group is not
22-
solvable
23+
solvable.
2324
2425
Then all that remains is the construction of a specific polynomial satisfying the conditions of
2526
`galActionHom_bijective_of_prime_degree'`, which is done in this file.
26-
2727
-/
2828

29-
3029
namespace AbelRuffini
3130

32-
3331
open Function Polynomial Polynomial.Gal Ideal
3432

35-
open scoped Polynomial
36-
3733
attribute [local instance] splits_ℚ_ℂ
3834

3935
variable (R : Type*) [CommRing R] (a b : ℕ)
@@ -155,19 +151,19 @@ theorem gal_Phi (hab : b < a) (h_irred : Irreducible (Φ ℚ a b)) :
155151
exact real_roots_Phi_ge a b hab
156152

157153
theorem not_solvable_by_rad (p : ℕ) (x : ℂ) (hx : aeval x (Φ ℚ a b) = 0) (hab : b < a)
158-
(hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b) (hp2b : ¬p ^ 2 ∣ b) : ¬IsSolvableByRad ℚ x := by
154+
(hp : p.Prime) (hpa : p ∣ a) (hpb : p ∣ b) (hp2b : ¬p ^ 2 ∣ b) : x ∉ solvableByRad ℚ ℂ := by
159155
have h_irred := irreducible_Phi a b p hp hpa hpb hp2b
160-
apply mt (solvableByRad.isSolvable' h_irred hx)
156+
apply mt (isSolvable_gal_of_irreducible · h_irred hx)
161157
intro h
162158
refine Equiv.Perm.not_solvable _ (le_of_eq ?_)
163159
(solvable_of_surjective (gal_Phi a b hab h_irred).2)
164160
rw_mod_cast [Cardinal.mk_fintype, complex_roots_Phi a b h_irred.separable]
165161

166-
theorem not_solvable_by_rad' (x : ℂ) (hx : aeval x (Φ ℚ 4 2) = 0) : ¬IsSolvableByRad ℚ x := by
162+
theorem not_solvable_by_rad' (x : ℂ) (hx : aeval x (Φ ℚ 4 2) = 0) : x ∉ solvableByRad ℚ ℂ := by
167163
apply not_solvable_by_rad 4 2 2 x hx <;> decide
168164

169165
/-- **Abel-Ruffini Theorem** -/
170-
theorem exists_not_solvable_by_rad : ∃ x : ℂ, IsAlgebraic ℚ x ∧ ¬IsSolvableByRad ℚ x := by
166+
theorem exists_not_solvable_by_rad : ∃ x : ℂ, IsAlgebraic ℚ x ∧ x ∉ solvableByRad ℚ ℂ := by
171167
obtain ⟨x, hx⟩ := (IsAlgClosed.splits (Φ ℂ 4 2)).exists_eval_eq_zero (by simp [degree_Phi])
172168
rw [← map_Phi 4 2 (algebraMap ℚ ℂ), eval_map] at hx
173169
exact ⟨x, ⟨Φ ℚ 4 2, (monic_Phi 4 2).ne_zero, hx⟩, not_solvable_by_rad' x hx⟩

Mathlib.lean

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ public import Mathlib.Algebra.Category.ModuleCat.Kernels
171171
public import Mathlib.Algebra.Category.ModuleCat.LeftResolution
172172
public import Mathlib.Algebra.Category.ModuleCat.Limits
173173
public import Mathlib.Algebra.Category.ModuleCat.Localization
174+
public import Mathlib.Algebra.Category.ModuleCat.Monoidal.Adjunction
174175
public import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
175176
public import Mathlib.Algebra.Category.ModuleCat.Monoidal.Closed
176177
public import Mathlib.Algebra.Category.ModuleCat.Monoidal.Symmetric
@@ -602,6 +603,7 @@ public import Mathlib.Algebra.Homology.EulerCharacteristic
602603
public import Mathlib.Algebra.Homology.ExactSequence
603604
public import Mathlib.Algebra.Homology.ExactSequenceFour
604605
public import Mathlib.Algebra.Homology.Factorizations.Basic
606+
public import Mathlib.Algebra.Homology.Factorizations.CM5a
605607
public import Mathlib.Algebra.Homology.Factorizations.CM5b
606608
public import Mathlib.Algebra.Homology.Functor
607609
public import Mathlib.Algebra.Homology.GrothendieckAbelian
@@ -677,6 +679,7 @@ public import Mathlib.Algebra.Homology.SpectralObject.EpiMono
677679
public import Mathlib.Algebra.Homology.SpectralObject.HasSpectralSequence
678680
public import Mathlib.Algebra.Homology.SpectralObject.Homology
679681
public import Mathlib.Algebra.Homology.SpectralObject.Page
682+
public import Mathlib.Algebra.Homology.SpectralObject.SpectralSequence
680683
public import Mathlib.Algebra.Homology.SpectralSequence.Basic
681684
public import Mathlib.Algebra.Homology.SpectralSequence.ComplexShape
682685
public import Mathlib.Algebra.Homology.Square
@@ -795,6 +798,7 @@ public import Mathlib.Algebra.Module.RingHom
795798
public import Mathlib.Algebra.Module.Shrink
796799
public import Mathlib.Algebra.Module.SnakeLemma
797800
public import Mathlib.Algebra.Module.SpanRank
801+
public import Mathlib.Algebra.Module.SpanRankOperations
798802
public import Mathlib.Algebra.Module.Submodule.Basic
799803
public import Mathlib.Algebra.Module.Submodule.Bilinear
800804
public import Mathlib.Algebra.Module.Submodule.Defs
@@ -1704,6 +1708,7 @@ public import Mathlib.Analysis.Calculus.FormalMultilinearSeries
17041708
public import Mathlib.Analysis.Calculus.Gradient.Basic
17051709
public import Mathlib.Analysis.Calculus.Implicit
17061710
public import Mathlib.Analysis.Calculus.ImplicitContDiff
1711+
public import Mathlib.Analysis.Calculus.ImplicitFunction.ProdDomain
17071712
public import Mathlib.Analysis.Calculus.InverseFunctionTheorem.Analytic
17081713
public import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ApproximatesLinearOn
17091714
public import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff
@@ -1947,6 +1952,7 @@ public import Mathlib.Analysis.InnerProductSpace.Rayleigh
19471952
public import Mathlib.Analysis.InnerProductSpace.Reproducing
19481953
public import Mathlib.Analysis.InnerProductSpace.Semisimple
19491954
public import Mathlib.Analysis.InnerProductSpace.Spectrum
1955+
public import Mathlib.Analysis.InnerProductSpace.StandardSubspace
19501956
public import Mathlib.Analysis.InnerProductSpace.StarOrder
19511957
public import Mathlib.Analysis.InnerProductSpace.Subspace
19521958
public import Mathlib.Analysis.InnerProductSpace.Symmetric
@@ -2183,8 +2189,10 @@ public import Mathlib.Analysis.NormedSpace.RCLike
21832189
public import Mathlib.Analysis.NormedSpace.Real
21842190
public import Mathlib.Analysis.NormedSpace.RieszLemma
21852191
public import Mathlib.Analysis.NormedSpace.SphereNormEquiv
2192+
public import Mathlib.Analysis.ODE.Basic
21862193
public import Mathlib.Analysis.ODE.Gronwall
21872194
public import Mathlib.Analysis.ODE.PicardLindelof
2195+
public import Mathlib.Analysis.ODE.Transform
21882196
public import Mathlib.Analysis.Oscillation
21892197
public import Mathlib.Analysis.PSeries
21902198
public import Mathlib.Analysis.PSeriesComplex
@@ -2297,6 +2305,7 @@ public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
22972305
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds
22982306
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev
22992307
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.Basic
2308+
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.ChebyshevGauss
23002309
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.Extremal
23012310
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.Orthogonality
23022311
public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.RootsExtrema
@@ -2427,6 +2436,7 @@ public import Mathlib.CategoryTheory.Bicategory.Functor.Pseudofunctor
24272436
public import Mathlib.CategoryTheory.Bicategory.Functor.Strict
24282437
public import Mathlib.CategoryTheory.Bicategory.Functor.StrictPseudofunctor
24292438
public import Mathlib.CategoryTheory.Bicategory.Functor.StrictlyUnitary
2439+
public import Mathlib.CategoryTheory.Bicategory.FunctorBicategory.Lax
24302440
public import Mathlib.CategoryTheory.Bicategory.FunctorBicategory.Oplax
24312441
public import Mathlib.CategoryTheory.Bicategory.FunctorBicategory.Pseudo
24322442
public import Mathlib.CategoryTheory.Bicategory.Grothendieck
@@ -2436,6 +2446,7 @@ public import Mathlib.CategoryTheory.Bicategory.Kan.HasKan
24362446
public import Mathlib.CategoryTheory.Bicategory.Kan.IsKan
24372447
public import Mathlib.CategoryTheory.Bicategory.LocallyDiscrete
24382448
public import Mathlib.CategoryTheory.Bicategory.LocallyGroupoid
2449+
public import Mathlib.CategoryTheory.Bicategory.Modification.Lax
24392450
public import Mathlib.CategoryTheory.Bicategory.Modification.Oplax
24402451
public import Mathlib.CategoryTheory.Bicategory.Modification.Pseudo
24412452
public import Mathlib.CategoryTheory.Bicategory.Monad.Basic
@@ -2759,6 +2770,7 @@ public import Mathlib.CategoryTheory.Limits.Preorder
27592770
public import Mathlib.CategoryTheory.Limits.Presentation
27602771
public import Mathlib.CategoryTheory.Limits.Preserves.Basic
27612772
public import Mathlib.CategoryTheory.Limits.Preserves.Bifunctor
2773+
public import Mathlib.CategoryTheory.Limits.Preserves.BifunctorCokernel
27622774
public import Mathlib.CategoryTheory.Limits.Preserves.Creates.Finite
27632775
public import Mathlib.CategoryTheory.Limits.Preserves.Creates.Pullbacks
27642776
public import Mathlib.CategoryTheory.Limits.Preserves.Filtered
@@ -3243,7 +3255,9 @@ public import Mathlib.CategoryTheory.Sites.Point.Category
32433255
public import Mathlib.CategoryTheory.Sites.Point.Comap
32443256
public import Mathlib.CategoryTheory.Sites.Point.Conservative
32453257
public import Mathlib.CategoryTheory.Sites.Point.IsMonoidalW
3258+
public import Mathlib.CategoryTheory.Sites.Point.Map
32463259
public import Mathlib.CategoryTheory.Sites.Point.Monoidal
3260+
public import Mathlib.CategoryTheory.Sites.Point.OfIsCofiltered
32473261
public import Mathlib.CategoryTheory.Sites.Point.Over
32483262
public import Mathlib.CategoryTheory.Sites.Point.Presheaf
32493263
public import Mathlib.CategoryTheory.Sites.Point.Skyscraper
@@ -3315,6 +3329,7 @@ public import Mathlib.CategoryTheory.Sums.Basic
33153329
public import Mathlib.CategoryTheory.Sums.Products
33163330
public import Mathlib.CategoryTheory.Thin
33173331
public import Mathlib.CategoryTheory.Topos.Classifier
3332+
public import Mathlib.CategoryTheory.Topos.Sheaf
33183333
public import Mathlib.CategoryTheory.Triangulated.Adjunction
33193334
public import Mathlib.CategoryTheory.Triangulated.Basic
33203335
public import Mathlib.CategoryTheory.Triangulated.Functor
@@ -3396,6 +3411,7 @@ public import Mathlib.Combinatorics.Enumerative.Schroder
33963411
public import Mathlib.Combinatorics.Enumerative.Stirling
33973412
public import Mathlib.Combinatorics.Extremal.RuzsaSzemeredi
33983413
public import Mathlib.Combinatorics.Graph.Basic
3414+
public import Mathlib.Combinatorics.Graph.Subgraph
33993415
public import Mathlib.Combinatorics.HalesJewett
34003416
public import Mathlib.Combinatorics.Hall.Basic
34013417
public import Mathlib.Combinatorics.Hall.Finite
@@ -3961,6 +3977,7 @@ public import Mathlib.Data.Multiset.UnionInter
39613977
public import Mathlib.Data.Multiset.ZeroCons
39623978
public import Mathlib.Data.NNRat.BigOperators
39633979
public import Mathlib.Data.NNRat.Defs
3980+
public import Mathlib.Data.NNRat.Encodable
39643981
public import Mathlib.Data.NNRat.Floor
39653982
public import Mathlib.Data.NNRat.Lemmas
39663983
public import Mathlib.Data.NNRat.Order
@@ -4125,6 +4142,7 @@ public import Mathlib.Data.Real.CompleteField
41254142
public import Mathlib.Data.Real.ConjExponents
41264143
public import Mathlib.Data.Real.ENatENNReal
41274144
public import Mathlib.Data.Real.Embedding
4145+
public import Mathlib.Data.Real.Hom
41284146
public import Mathlib.Data.Real.Irrational
41294147
public import Mathlib.Data.Real.Pointwise
41304148
public import Mathlib.Data.Real.Sign
@@ -4679,6 +4697,7 @@ public import Mathlib.Lean.GoalsLocation
46794697
public import Mathlib.Lean.Json
46804698
public import Mathlib.Lean.Linter
46814699
public import Mathlib.Lean.LocalContext
4700+
public import Mathlib.Lean.MessageData.ForExprs
46824701
public import Mathlib.Lean.MessageData.Trace
46834702
public import Mathlib.Lean.Meta
46844703
public import Mathlib.Lean.Meta.Basic

Mathlib/Algebra/BigOperators/Finprod.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,15 @@ lemma finprod_le_finprod {M : Type*} [CommMonoidWithZero M] [PartialOrder M] [Ze
602602
finprod_eq_finset_prod_of_mulSupport_subset g (show g.mulSupport ⊆ s by grind)]
603603
exact Finset.prod_le_prod (fun i _ ↦ hf₀ i) fun i _ ↦ h i
604604

605+
lemma finprod_zero_le_one {M α : Type*} [CommMonoidWithZero M] [PartialOrder M]
606+
[ZeroLEOneClass M] [PosMulMono M] :
607+
∏ᶠ _ : α, (0 : M) ≤ 1 := by
608+
rw [← finprod_one (α := α)]
609+
by_cases H : (fun _ : α ↦ (0 : M)).HasFiniteMulSupport
610+
· exact finprod_le_finprod H (fun _ ↦ le_rfl) (by fun_prop) fun _ ↦ zero_le_one
611+
· rw [finprod_of_not_hasFiniteMulSupport H]
612+
exact finprod_one.symm.le
613+
605614
/-!
606615
### Distributivity w.r.t. addition, subtraction, and (scalar) multiplication
607616
-/

Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,11 @@ def Counit.map {Y} : (restrictScalars f ⋙ extendScalars f).obj Y ⟶ Y :=
837837
rw [mul_smul]
838838
| add _ _ ih1 ih2 => rw [smul_add, map_add, map_add, ih1, ih2, smul_add] }
839839

840+
lemma Counit.map_apply_one_tmul {Y : ModuleCat S} (y : Y) :
841+
Counit.map f ((1 : S) ⊗ₜ[R] y) = y := by
842+
change (1 : S) • y = y
843+
simp
844+
840845
set_option backward.isDefEq.respectTransparency false in
841846
/-- The natural transformation from the composition of restriction and extension of scalars to the
842847
identity functor on `S`-module.
@@ -900,6 +905,11 @@ lemma extendRestrictScalarsAdj_unit_app_apply
900905
(extendRestrictScalarsAdj f).unit.app M m = (1 : S) ⊗ₜ[R,f] m :=
901906
rfl
902907

908+
@[simp]
909+
lemma extendRestrictScalarsAdj_counit_app_apply_one_tmul (M : ModuleCat S) (m : M) :
910+
dsimp% (extendRestrictScalarsAdj f).counit.app M ((1 : S) ⊗ₜ[R] m) = m := by
911+
apply ExtendRestrictScalarsAdj.Counit.map_apply_one_tmul
912+
903913
instance {R : Type u₁} {S : Type u₂} [CommRing R] [CommRing S] (f : R →+* S) :
904914
(extendScalars.{u₁, u₂, max u₂ w} f).IsLeftAdjoint :=
905915
(extendRestrictScalarsAdj f).isLeftAdjoint

0 commit comments

Comments
 (0)