Skip to content

Commit 4ccbd1e

Browse files
authored
Merge branch 'leanprover-community:master' into HasMulAntidiagonal
2 parents e3d2520 + bcade54 commit 4ccbd1e

File tree

126 files changed

+2014
-957
lines changed

Some content is hidden

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

126 files changed

+2014
-957
lines changed

.github/build.in.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ jobs:
660660
# make sure everything is available for test/import_all.lean
661661
# and that miscellaneous executables still work
662662
run: |
663-
lake build Batteries Qq Aesop ProofWidgets Plausible pole unused
663+
lake build Batteries Qq Aesop ProofWidgets Plausible
664664
665665
- name: build AesopTest (nightly-testing only)
666666
# Only run on the mathlib4-nightly-testing repository

.github/workflows/add_label_from_diff.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
labels="$(lake exe autolabel)"
4141
printf '%s\n' "${labels}"
4242
# extract
43-
label="$(printf '%s' "${labels}" | sed -n 's=.*#\[\([^,]*\)\].*=\1=p')"
43+
label="$(printf '%s' "${labels}" | sed -n 's=^::notice::.*#\[\([^,]*\)\].*=\1=p')"
4444
printf 'label: "%s"\n' "${label}"
4545
if [ -n "${label}" ]
4646
then

.github/workflows/bors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ jobs:
670670
# make sure everything is available for test/import_all.lean
671671
# and that miscellaneous executables still work
672672
run: |
673-
lake build Batteries Qq Aesop ProofWidgets Plausible pole unused
673+
lake build Batteries Qq Aesop ProofWidgets Plausible
674674
675675
- name: build AesopTest (nightly-testing only)
676676
# Only run on the mathlib4-nightly-testing repository

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ jobs:
676676
# make sure everything is available for test/import_all.lean
677677
# and that miscellaneous executables still work
678678
run: |
679-
lake build Batteries Qq Aesop ProofWidgets Plausible pole unused
679+
lake build Batteries Qq Aesop ProofWidgets Plausible
680680
681681
- name: build AesopTest (nightly-testing only)
682682
# Only run on the mathlib4-nightly-testing repository

.github/workflows/build_fork.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ jobs:
674674
# make sure everything is available for test/import_all.lean
675675
# and that miscellaneous executables still work
676676
run: |
677-
lake build Batteries Qq Aesop ProofWidgets Plausible pole unused
677+
lake build Batteries Qq Aesop ProofWidgets Plausible
678678
679679
- name: build AesopTest (nightly-testing only)
680680
# Only run on the mathlib4-nightly-testing repository

Mathlib.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2161,6 +2161,7 @@ public import Mathlib.Analysis.SpecialFunctions.Gamma.Beta
21612161
public import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup
21622162
public import Mathlib.Analysis.SpecialFunctions.Gamma.Deligne
21632163
public import Mathlib.Analysis.SpecialFunctions.Gamma.Deriv
2164+
public import Mathlib.Analysis.SpecialFunctions.Gamma.Digamma
21642165
public import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform
21652166
public import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral
21662167
public import Mathlib.Analysis.SpecialFunctions.Gaussian.PoissonSummation
@@ -2961,6 +2962,7 @@ public import Mathlib.CategoryTheory.ObjectProperty.Opposite
29612962
public import Mathlib.CategoryTheory.ObjectProperty.Orthogonal
29622963
public import Mathlib.CategoryTheory.ObjectProperty.Retract
29632964
public import Mathlib.CategoryTheory.ObjectProperty.Shift
2965+
public import Mathlib.CategoryTheory.ObjectProperty.ShiftAdditive
29642966
public import Mathlib.CategoryTheory.ObjectProperty.SiteLocal
29652967
public import Mathlib.CategoryTheory.ObjectProperty.Small
29662968
public import Mathlib.CategoryTheory.Opposites
@@ -4330,6 +4332,7 @@ public import Mathlib.Geometry.Manifold.VectorBundle.Tangent
43304332
public import Mathlib.Geometry.Manifold.VectorField.LieBracket
43314333
public import Mathlib.Geometry.Manifold.VectorField.Pullback
43324334
public import Mathlib.Geometry.Manifold.WhitneyEmbedding
4335+
public import Mathlib.Geometry.Polygon.Basic
43334336
public import Mathlib.Geometry.RingedSpace.Basic
43344337
public import Mathlib.Geometry.RingedSpace.LocallyRingedSpace
43354338
public import Mathlib.Geometry.RingedSpace.LocallyRingedSpace.HasColimits
@@ -4401,6 +4404,7 @@ public import Mathlib.GroupTheory.GroupAction.Iwasawa
44014404
public import Mathlib.GroupTheory.GroupAction.Jordan
44024405
public import Mathlib.GroupTheory.GroupAction.MultiplePrimitivity
44034406
public import Mathlib.GroupTheory.GroupAction.MultipleTransitivity
4407+
public import Mathlib.GroupTheory.GroupAction.OfQuotient
44044408
public import Mathlib.GroupTheory.GroupAction.Period
44054409
public import Mathlib.GroupTheory.GroupAction.Pointwise
44064410
public import Mathlib.GroupTheory.GroupAction.Primitive
@@ -4419,6 +4423,7 @@ public import Mathlib.GroupTheory.GroupExtension.Defs
44194423
public import Mathlib.GroupTheory.HNNExtension
44204424
public import Mathlib.GroupTheory.Index
44214425
public import Mathlib.GroupTheory.IndexNormal
4426+
public import Mathlib.GroupTheory.IsSubnormal
44224427
public import Mathlib.GroupTheory.MonoidLocalization.Away
44234428
public import Mathlib.GroupTheory.MonoidLocalization.Basic
44244429
public import Mathlib.GroupTheory.MonoidLocalization.Cardinality
@@ -7514,7 +7519,6 @@ public import Mathlib.Topology.VectorBundle.Hom
75147519
public import Mathlib.Topology.VectorBundle.Riemannian
75157520
public import Mathlib.Util.AddRelatedDecl
75167521
public import Mathlib.Util.AliasIn
7517-
public import Mathlib.Util.AssertExistsExt
75187522
public import Mathlib.Util.AssertNoSorry
75197523
public import Mathlib.Util.AtLocation
75207524
public import Mathlib.Util.AtomM

Mathlib/Algebra/Algebra/Basic.lean

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -462,23 +462,6 @@ alias NoZeroSMulDivisors.iff_algebraMap_injective := isTorsionFree_iff_algebraMa
462462
@[deprecated (since := "2026-01-21")]
463463
alias NoZeroSMulDivisors.iff_faithfulSMul := isTorsionFree_iff_faithfulSMul
464464

465-
/-! TODO: The following lemmas no longer involve `Algebra` at all, and could be moved closer
466-
to `Algebra/Module/Submodule.lean`. Currently this is tricky because `ker`, `range`, `⊤`, and `⊥`
467-
are all defined in `LinearAlgebra/Basic.lean`. -/
468-
469-
section Module
470-
471-
variable (R : Type*) {S M N : Type*} [Semiring R] [Semiring S] [SMul R S]
472-
variable [AddCommMonoid M] [Module R M] [Module S M] [IsScalarTower R S M]
473-
variable [AddCommMonoid N] [Module R N] [Module S N] [IsScalarTower R S N]
474-
475-
@[simp]
476-
theorem LinearMap.ker_restrictScalars (f : M →ₗ[S] N) :
477-
LinearMap.ker (f.restrictScalars R) = (LinearMap.ker f).restrictScalars R :=
478-
rfl
479-
480-
end Module
481-
482465
example {R A} [CommSemiring R] [Semiring A] [Module R A] [SMulCommClass R A A]
483466
[IsScalarTower R A A] : Algebra R A :=
484467
Algebra.ofModule smul_mul_assoc mul_smul_comm

Mathlib/Algebra/BigOperators/Finprod.lean

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public import Mathlib.Algebra.Order.Ring.Defs
1515
public import Mathlib.Data.Set.Finite.Lattice
1616

1717
import Mathlib.Algebra.Module.End
18+
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
1819

1920
/-!
2021
# Finite products and sums over types and sets
@@ -558,6 +559,30 @@ alias finsum_pos' := finsum_pos
558559
@[to_additive existing finsum_pos', deprecated (since := "2026-01-03")]
559560
alias one_lt_finprod' := one_lt_finprod
560561

562+
/-- Monotonicity of `finprod`. See `finprod_le_finprod` for a variant where
563+
`M` is a `CommMonoidWithZero`. -/
564+
@[to_additive /-- Monotonicity of `finsum.` -/]
565+
lemma finprod_le_finprod' [PartialOrder M] [MulLeftMono M] (hf : f.mulSupport.Finite)
566+
(hg : g.mulSupport.Finite) (h : f ≤ g) :
567+
∏ᶠ a, f a ≤ ∏ᶠ a, g a := by
568+
have : Fintype ↑(f.mulSupport ∪ g.mulSupport) := (hf.union hg).fintype
569+
let s := (f.mulSupport ∪ g.mulSupport).toFinset
570+
rw [finprod_eq_finset_prod_of_mulSupport_subset f (show f.mulSupport ⊆ s by grind),
571+
finprod_eq_finset_prod_of_mulSupport_subset g (show g.mulSupport ⊆ s by grind)]
572+
exact Finset.prod_le_prod' fun i _ ↦ h i
573+
574+
/-- Monotonicity of `finprod`. See `finprod_le_finprod'` for a variant where
575+
`M` is an ordered `CommMonoid`. -/
576+
lemma finprod_le_finprod {M : Type*} [CommMonoidWithZero M] [PartialOrder M] [ZeroLEOneClass M]
577+
[PosMulMono M] {f g : α → M} (hf : f.mulSupport.Finite) (hf₀ : ∀ a, 0 ≤ f a)
578+
(hg : g.mulSupport.Finite) (h : f ≤ g) :
579+
∏ᶠ a, f a ≤ ∏ᶠ a, g a := by
580+
have : Fintype ↑(f.mulSupport ∪ g.mulSupport) := (hf.union hg).fintype
581+
let s := (f.mulSupport ∪ g.mulSupport).toFinset
582+
rw [finprod_eq_finset_prod_of_mulSupport_subset f (show f.mulSupport ⊆ s by grind),
583+
finprod_eq_finset_prod_of_mulSupport_subset g (show g.mulSupport ⊆ s by grind)]
584+
exact Finset.prod_le_prod (fun i _ ↦ hf₀ i) fun i _ ↦ h i
585+
561586
/-!
562587
### Distributivity w.r.t. addition, subtraction, and (scalar) multiplication
563588
-/

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ the product over `s`, as long as `a` is in `s` or `f a = 1`. -/
6262
the sum over `s`, as long as `a` is in `s` or `f a = 0`. -/]
6363
theorem prod_insert_of_eq_one_if_notMem [DecidableEq ι] (h : a ∉ s → f a = 1) :
6464
∏ x ∈ insert a s, f x = ∏ x ∈ s, f x := by
65-
by_cases hm : a ∈ s
66-
· simp_rw [insert_eq_of_mem hm]
67-
· rw [prod_insert hm, h hm, one_mul]
65+
by_cases a ∈ s <;> grind
6866

6967
/-- The product of `f` over `insert a s` is the same as
7068
the product over `s`, as long as `f a = 1`. -/
@@ -1073,6 +1071,14 @@ lemma mem_sum {a : M} {s : Finset ι} {m : ι → Multiset M} :
10731071
theorem _root_.Finset.mem_sum {f : ι → Multiset M} (s : Finset ι) (b : M) :
10741072
(b ∈ ∑ x ∈ s, f x) ↔ ∃ a ∈ s, b ∈ f a := Multiset.mem_sum
10751073

1074+
@[to_additive]
1075+
lemma prod_map_prod {α : Type*} [CommMonoid M] {m : Multiset ι} {s : Finset α} {f : ι → α → M} :
1076+
(m.map fun i ↦ ∏ a ∈ s, f i a).prod = ∏ a ∈ s, (m.map fun i ↦ f i a).prod := by
1077+
classical
1078+
induction s using Finset.induction with
1079+
| empty => simp
1080+
| insert a s ha ih => simp [Finset.prod_insert ha, prod_map_mul, ih]
1081+
10761082
variable [DecidableEq ι]
10771083

10781084
theorem toFinset_sum_count_eq (s : Multiset ι) : ∑ a ∈ s.toFinset, s.count a = card s := by

Mathlib/Algebra/Category/Grp/AB.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ attribute [local instance] Abelian.hasFiniteBiproducts
6161
instance : AB4 AddCommGrpCat.{u} := AB4.of_AB5 _
6262

6363
instance : HasExactLimitsOfShape (Discrete J) (AddCommGrpCat.{u}) := by
64-
apply (config := { allowSynthFailures := true }) hasExactLimitsOfShape_of_preservesEpi
64+
apply +allowSynthFailures hasExactLimitsOfShape_of_preservesEpi
6565
exact {
6666
preserves {X Y} f hf := by
6767
let iX : limit X ≅ AddCommGrpCat.of ((i : J) → X.obj ⟨i⟩) := (Pi.isoLimit X).symm ≪≫

0 commit comments

Comments
 (0)