Skip to content

Commit 16ffd29

Browse files
committed
Merge branch 'master' into zfset_omega
2 parents 3c4d8e5 + 7048ffa commit 16ffd29

108 files changed

Lines changed: 1313 additions & 285 deletions

File tree

Some content is hidden

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

.github/build.in.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ jobs:
522522
if timeout 15m env LEAN_ABORT_ON_PANIC=1 stdbuf -oL lake exe runLinter --trace Mathlib 2>&1 | tee ".lake/lint_output_attempt_${attempt}.txt"; then
523523
break
524524
fi
525-
status=$?
525+
status=${PIPESTATUS[0]}
526526
if grep -q "cannot parse arguments" ".lake/lint_output_attempt_${attempt}.txt"; then
527527
echo ""
528528
echo "=============================================================================="

.github/workflows/bors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ jobs:
532532
if timeout 15m env LEAN_ABORT_ON_PANIC=1 stdbuf -oL lake exe runLinter --trace Mathlib 2>&1 | tee ".lake/lint_output_attempt_${attempt}.txt"; then
533533
break
534534
fi
535-
status=$?
535+
status=${PIPESTATUS[0]}
536536
if grep -q "cannot parse arguments" ".lake/lint_output_attempt_${attempt}.txt"; then
537537
echo ""
538538
echo "=============================================================================="

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ jobs:
538538
if timeout 15m env LEAN_ABORT_ON_PANIC=1 stdbuf -oL lake exe runLinter --trace Mathlib 2>&1 | tee ".lake/lint_output_attempt_${attempt}.txt"; then
539539
break
540540
fi
541-
status=$?
541+
status=${PIPESTATUS[0]}
542542
if grep -q "cannot parse arguments" ".lake/lint_output_attempt_${attempt}.txt"; then
543543
echo ""
544544
echo "=============================================================================="

.github/workflows/build_fork.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ jobs:
536536
if timeout 15m env LEAN_ABORT_ON_PANIC=1 stdbuf -oL lake exe runLinter --trace Mathlib 2>&1 | tee ".lake/lint_output_attempt_${attempt}.txt"; then
537537
break
538538
fi
539-
status=$?
539+
status=${PIPESTATUS[0]}
540540
if grep -q "cannot parse arguments" ".lake/lint_output_attempt_${attempt}.txt"; then
541541
echo ""
542542
echo "=============================================================================="

Counterexamples.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Counterexamples.GameMultiplication
1111
import Counterexamples.Girard
1212
import Counterexamples.HeawoodUnitDistance
1313
import Counterexamples.HomogeneousPrimeNotPrime
14+
import Counterexamples.InvertibleModuleNotIdeal
1415
import Counterexamples.IrrationalPowerOfIrrational
1516
import Counterexamples.MapFloor
1617
import Counterexamples.MonicNonRegular
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/-
2+
Copyright (c) 2025 Junyan Xu. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Junyan Xu
5+
-/
6+
import Mathlib.Algebra.TrivSqZeroExt
7+
import Mathlib.Data.DFinsupp.Module
8+
import Mathlib.RingTheory.PicardGroup
9+
10+
/-!
11+
# A class of examples of invertible modules that are not isomorphic to ideals
12+
13+
References: https://math.stackexchange.com/a/5090562 or https://mathoverflow.net/a/499258
14+
-/
15+
16+
variable (R : Type*) [CommRing R]
17+
18+
/-- The trivial square-zero extension of a commutative ring R given by the direct sum
19+
R ⊕ ⨁ₘ R⧸m where m ranges over maximal ideals of R. -/
20+
abbrev SqZeroExtQuotMax := TrivSqZeroExt R (Π₀ m : MaximalSpectrum R, R ⧸ m.1)
21+
22+
instance : IsFractionRing (SqZeroExtQuotMax R) (SqZeroExtQuotMax R) :=
23+
IsFractionRing.self_iff_nonZeroDivisors_le_isUnit.mpr fun x hx ↦
24+
TrivSqZeroExt.isUnit_iff_isUnit_fst.mpr <| of_not_not fun hr ↦ by
25+
have ⟨M, hM, hrM⟩ := exists_max_ideal_of_mem_nonunits hr
26+
classical
27+
have := hx.1 (.inr <| .single ⟨M, hM⟩ 1) <| by
28+
ext1; · simp
29+
simpa [-DFinsupp.single_apply, ← DFinsupp.single_smul, DFinsupp.single_eq_zero]
30+
using (Ideal.Quotient.mk_eq_mk_iff_sub_mem ..).mpr (by simpa)
31+
simpa using congr(($this).snd)
32+
33+
/-- R as an algebra over `SqZeroExtQuotMax R`. -/
34+
abbrev SqZeroExtQuotMax.algebraBase : Algebra (SqZeroExtQuotMax R) R := TrivSqZeroExt.algebraBase ..
35+
36+
open CommRing (Pic) in
37+
/-- If the Picard group of a commutative ring R is nontrivial, then `SqZeroExtQuotMax R`
38+
has an invertible module (which is the base change of an invertible ideal of R)
39+
not isomorphic to any ideal. -/
40+
theorem SqZeroExtQuotMax.not_exists_linearEquiv_ideal_of_invertible [Nontrivial (Pic R)] :
41+
∃ M : Pic (SqZeroExtQuotMax R),
42+
¬ ∃ I : Ideal (SqZeroExtQuotMax R), Nonempty (M ≃ₗ[SqZeroExtQuotMax R] I) := by
43+
by_contra! h
44+
have ⟨M, hM⟩ := exists_ne (1 : Pic R)
45+
have ⟨I, ⟨eI⟩⟩ := h (M.mapAlgebra R _)
46+
have ⟨J, ⟨eJ⟩⟩ := h (M⁻¹.mapAlgebra R _)
47+
have := Module.Invertible.congr eI
48+
have := Module.Invertible.congr eJ
49+
obtain ⟨rfl | rfl⟩ := I.eq_top_of_mk_tensor_eq_one J <| by
50+
rw [Pic.mk_tensor, ← Pic.mk_eq_mk_iff.mpr ⟨eI⟩, ← Pic.mk_eq_mk_iff.mpr ⟨eJ⟩,
51+
Pic.mk_eq_self, Pic.mk_eq_self, ← map_mul, mul_inv_cancel, map_one]
52+
have eq := Pic.mk_eq_one_iff.mpr ⟨eI ≪≫ₗ Submodule.topEquiv⟩
53+
rw [Pic.mk_eq_self] at eq
54+
let := TrivSqZeroExt.algebraBase
55+
have eq := congr(Pic.mapAlgebra (SqZeroExtQuotMax R) R $eq)
56+
exact hM <| by rwa [map_one, Pic.mapAlgebra_mapAlgebra, Pic.mapAlgebra_self] at eq

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,6 +1569,7 @@ public import Mathlib.Analysis.Calculus.ContDiff.Polynomial
15691569
public import Mathlib.Analysis.Calculus.ContDiff.RCLike
15701570
public import Mathlib.Analysis.Calculus.ContDiff.RestrictScalars
15711571
public import Mathlib.Analysis.Calculus.ContDiff.WithLp
1572+
public import Mathlib.Analysis.Calculus.ContDiffHolder.Pointwise
15721573
public import Mathlib.Analysis.Calculus.DSlope
15731574
public import Mathlib.Analysis.Calculus.Darboux
15741575
public import Mathlib.Analysis.Calculus.Deriv.Abs

Mathlib/Algebra/Algebra/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ instance (priority := 120) IsScalarTower.to_smulCommClass : SMulCommClass R A M
431431
instance (priority := 110) IsScalarTower.to_smulCommClass' : SMulCommClass A R M :=
432432
SMulCommClass.symm _ _ _
433433

434-
-- see Note [lower instance priority]
435-
instance (priority := 200) Algebra.to_smulCommClass {R A} [CommSemiring R] [Semiring A]
434+
/-- This has high priority because it is almost always the right instance when it applies. -/
435+
instance (priority := high) Algebra.to_smulCommClass {R A} [CommSemiring R] [Semiring A]
436436
[Algebra R A] : SMulCommClass R A A :=
437437
IsScalarTower.to_smulCommClass
438438

Mathlib/Algebra/BigOperators/Finprod.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ theorem one_lt_finprod_cond {M : Type*} [CommMonoid M] [PartialOrder M] [IsOrder
545545
· aesop
546546
· simp +contextual
547547

548+
@[deprecated (since := "2026-01-06")] alias finprod_cond_pos := finsum_cond_pos
549+
548550
@[to_additive finsum_pos]
549551
theorem one_lt_finprod {M : Type*} [CommMonoid M] [PartialOrder M] [IsOrderedCancelMonoid M]
550552
{f : ι → M}

Mathlib/Algebra/BigOperators/Group/Finset/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,15 @@ theorem prod_eq_single {s : Finset ι} {f : ι → M} (a : ι) (h₀ : ∀ b ∈
347347
@[to_additive (attr := simp)]
348348
lemma prod_ite_mem_eq [Fintype ι] (s : Finset ι) (f : ι → M) [DecidablePred (· ∈ s)] :
349349
(∏ i, if i ∈ s then f i else 1) = ∏ i ∈ s, f i := by
350-
rw [← Finset.prod_filter]; congr; aesop
350+
rw [← Finset.prod_filter]; congr; grind
351351

352352
@[to_additive]
353353
lemma prod_eq_ite [DecidableEq ι] {s : Finset ι} {f : ι → M} (a : ι)
354354
(h₀ : ∀ b ∈ s, b ≠ a → f b = 1) :
355355
∏ x ∈ s, f x = if a ∈ s then f a else 1 := by
356356
by_cases h : a ∈ s
357357
· simp [Finset.prod_eq_single_of_mem a h h₀, h]
358-
· replace h₀ : ∀ b ∈ s, f b = 1 := by aesop
358+
· replace h₀ : ∀ b ∈ s, f b = 1 := by grind
359359
simp +contextual [h₀]
360360

361361
@[to_additive]

0 commit comments

Comments
 (0)