Skip to content

Commit a9b4451

Browse files
author
mathlib4-bot
committed
Merge remote-tracking branch 'origin/master' into bump/v4.22.0
2 parents 667ad7e + 953440d commit a9b4451

File tree

107 files changed

+2070
-445
lines changed

Some content is hidden

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

107 files changed

+2070
-445
lines changed

.github/workflows/PR_summary.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,32 @@ jobs:
110110
run: |
111111
cd pr-branch
112112
touch moved_without_deprecation.txt
113+
touch extraneous_deprecated_module.txt
113114
git checkout ${{ github.base_ref }}
114115
while IFS= read -r file
115116
do
116117
if grep ^deprecated_module "${file}" ; then
117-
printf 'info: removed file %s contains a deprecation\n' "${file}"
118+
# shellcheck disable=SC2016
119+
printf '\n⚠️ **warning**: removed file `%s` contains a module deprecation: please add this in a follow-up PR instead\n' "${file}" |
120+
tee -a extraneous_deprecated_module.txt
118121
else
119122
# shellcheck disable=SC2016
120-
printf '\n⚠️ **warning**: file `%s` was removed without a module deprecation\n' "${file}" |
123+
printf '\nnote: file `%s` was removed.\nPlease create a follow-up pull request adding a module deprecation. Thanks!\n' "${file}" |
121124
tee -a moved_without_deprecation.txt
122125
fi
123126
done < removed_files.txt
124127
IFS=$'\n'
125128
while IFS= read -r file
126129
do
127-
# shellcheck disable=SC2016
128-
printf '\n⚠️ **warning**: file %s without a module deprecation\n' "${file}" |
129-
tee -a moved_without_deprecation.txt
130+
if grep ^deprecated_module "${file}" ; then
131+
# shellcheck disable=SC2016
132+
printf '\n⚠️ **warning**: renamed file `%s` contains a module deprecation: please add this in a follow-up PR instead\n' "${file}" |
133+
tee -a extraneous_deprecated_module.txt
134+
else
135+
# shellcheck disable=SC2016
136+
printf '\nnote: file `%s` without a module deprecation\nPlease create a follow-up pull request adding one. Thanks!\n' "${file}" |
137+
tee -a moved_without_deprecation.txt
138+
fi
130139
done < renamed_files.txt
131140
132141
# we return to the PR branch, since the next step wants it!
@@ -209,12 +218,18 @@ jobs:
209218
# store in a file, to avoid "long arguments" error.
210219
printf '%s [%s](%s)%s\n\n%s\n\n---\n\n%s\n\n---\n\n%s\n' "${title}" "$(git rev-parse --short HEAD)" "${hashURL}" "${high_percentages}" "${importCount}" "${declDiff}" "${techDebtVar}" > please_merge_master.md
211220
212-
echo "Include any errors about removed or renamed files without deprecation."
221+
echo "Include any errors about removed or renamed files without deprecation,"
222+
echo "as well as errors about extraneous deprecated_module additions."
213223
if [ -s moved_without_deprecation.txt ]
214224
then
215225
printf '\n\n---\n\n' >> please_merge_master.md
216226
cat moved_without_deprecation.txt >> please_merge_master.md
217227
fi
228+
if [ -s extraneous_deprecated_module.txt ]
229+
then
230+
printf '\n\n---\n\n' >> please_merge_master.md
231+
cat extraneous_deprecated_module.txt >> please_merge_master.md
232+
fi
218233
219234
cat please_merge_master.md
220235
../master-branch/scripts/update_PR_comment.sh please_merge_master.md "${title}" "${PR}"

Archive/Imo/Imo1982Q1.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ lemma superadditive {m n : ℕ+} : f m + f n ≤ f (m + n) := by
7272
have h := hf.rel m n
7373
rcases h with ( hl | hr )
7474
· rw [hl]
75-
· rw [hr]; nth_rewrite 1 [← add_zero (f n), ← add_assoc]; apply add_le_add_right (by norm_num)
75+
· rw [hr]; nth_rewrite 1 [← add_zero (f n), ← add_assoc]; gcongr; norm_num
7676

7777
lemma superhomogeneous {m n : ℕ+} : ↑n * f m ≤ f (n * m) := by
7878
induction n with
7979
| one => simp
8080
| succ n' ih =>
8181
calc
8282
↑(n' + 1) * f m = ↑n' * f m + f m := by rw [PNat.add_coe, add_mul, PNat.val_ofNat, one_mul]
83-
_ ≤ f (n' * m) + f m := add_le_add_right ih (f m)
83+
_ ≤ f (n' * m) + f m := by gcongr
8484
_ ≤ f (n' * m + m) := hf.superadditive
8585
_ = f ((n' + 1) * m) := by congr; rw [add_mul, one_mul]
8686

Archive/Wiedijk100Theorems/CubingACube.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ theorem w_lt_w (hi : i ∈ bcubes cs c) : (cs i).w < c.w := by
269269
apply lt_of_le_of_ne _ (v.2.2 i hi.1)
270270
have j : Fin n := ⟨1, Nat.le_of_succ_le_succ h.three_le⟩
271271
rw [← add_le_add_iff_left ((cs i).b j.succ)]
272-
apply le_trans (t_le_t hi j); rw [add_le_add_iff_right]; apply b_le_b hi
272+
apply le_trans (t_le_t hi j); gcongr; apply b_le_b hi
273273

274274
/-- There are at least two cubes in a valley -/
275275
theorem nontrivial_bcubes : (bcubes cs c).Nontrivial := by
@@ -292,8 +292,9 @@ theorem nontrivial_bcubes : (bcubes cs c).Nontrivial := by
292292
rintro rfl
293293
apply not_le_of_gt (hi'.21, Nat.le_of_succ_le_succ h.three_le⟩).2
294294
simp only [tail, Cube.tail, p]
295-
rw [if_pos, add_le_add_iff_right]
296-
· exact (hi.2 _).1
295+
rw [if_pos]
296+
· gcongr
297+
exact (hi.2 _).1
297298
rfl
298299

299300
/-- There is a cube in the valley -/
@@ -367,7 +368,7 @@ theorem smallest_onBoundary {j} (bi : OnBoundary (mi_mem_bcubes : mi h v ∈ _)
367368
· simp only [side, not_and_or, not_lt, not_le, mem_Ico]; left; exact hx
368369
intro i'' hi'' h2i'' h3i''; constructor; swap; · apply lt_trans hx h3i''.2
369370
rw [le_sub_iff_add_le]
370-
refine le_trans ?_ (t_le_t hi'' j); rw [add_le_add_iff_left]; apply h3i' i'' ⟨hi'', _⟩
371+
refine le_trans ?_ (t_le_t hi'' j); gcongr; apply h3i' i'' ⟨hi'', _⟩
371372
simp [i, mem_singleton, h2i'']
372373

373374
variable (h v)

Mathlib.lean

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ import Mathlib.Algebra.Order.Antidiag.Nat
753753
import Mathlib.Algebra.Order.Antidiag.Pi
754754
import Mathlib.Algebra.Order.Antidiag.Prod
755755
import Mathlib.Algebra.Order.Archimedean.Basic
756+
import Mathlib.Algebra.Order.Archimedean.Class
756757
import Mathlib.Algebra.Order.Archimedean.Hom
757758
import Mathlib.Algebra.Order.Archimedean.IndicatorCard
758759
import Mathlib.Algebra.Order.Archimedean.Submonoid
@@ -827,6 +828,7 @@ import Mathlib.Algebra.Order.GroupWithZero.Action.Synonym
827828
import Mathlib.Algebra.Order.GroupWithZero.Bounds
828829
import Mathlib.Algebra.Order.GroupWithZero.Canonical
829830
import Mathlib.Algebra.Order.GroupWithZero.Finset
831+
import Mathlib.Algebra.Order.GroupWithZero.Lex
830832
import Mathlib.Algebra.Order.GroupWithZero.Submonoid
831833
import Mathlib.Algebra.Order.GroupWithZero.Synonym
832834
import Mathlib.Algebra.Order.GroupWithZero.Unbundled
@@ -860,6 +862,7 @@ import Mathlib.Algebra.Order.Monoid.Basic
860862
import Mathlib.Algebra.Order.Monoid.Canonical.Basic
861863
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
862864
import Mathlib.Algebra.Order.Monoid.Defs
865+
import Mathlib.Algebra.Order.Monoid.Lex
863866
import Mathlib.Algebra.Order.Monoid.NatCast
864867
import Mathlib.Algebra.Order.Monoid.OrderDual
865868
import Mathlib.Algebra.Order.Monoid.Prod
@@ -3802,6 +3805,7 @@ import Mathlib.GroupTheory.QuotientGroup.Basic
38023805
import Mathlib.GroupTheory.QuotientGroup.Defs
38033806
import Mathlib.GroupTheory.QuotientGroup.Finite
38043807
import Mathlib.GroupTheory.Rank
3808+
import Mathlib.GroupTheory.RegularWreathProduct
38053809
import Mathlib.GroupTheory.Schreier
38063810
import Mathlib.GroupTheory.SchurZassenhaus
38073811
import Mathlib.GroupTheory.SemidirectProduct
@@ -4885,6 +4889,7 @@ import Mathlib.Order.Preorder.Chain
48854889
import Mathlib.Order.Preorder.Finite
48864890
import Mathlib.Order.PrimeIdeal
48874891
import Mathlib.Order.PrimeSeparator
4892+
import Mathlib.Order.Prod.Lex.Hom
48884893
import Mathlib.Order.PropInstances
48894894
import Mathlib.Order.Radical
48904895
import Mathlib.Order.Rel.GaloisConnection
@@ -5027,11 +5032,13 @@ import Mathlib.RepresentationTheory.Character
50275032
import Mathlib.RepresentationTheory.Coinduced
50285033
import Mathlib.RepresentationTheory.Coinvariants
50295034
import Mathlib.RepresentationTheory.FDRep
5030-
import Mathlib.RepresentationTheory.GroupCohomology.Basic
5031-
import Mathlib.RepresentationTheory.GroupCohomology.Functoriality
5032-
import Mathlib.RepresentationTheory.GroupCohomology.Hilbert90
5033-
import Mathlib.RepresentationTheory.GroupCohomology.LowDegree
5034-
import Mathlib.RepresentationTheory.GroupCohomology.Resolution
5035+
import Mathlib.RepresentationTheory.FiniteIndex
5036+
import Mathlib.RepresentationTheory.Homological.GroupCohomology.Basic
5037+
import Mathlib.RepresentationTheory.Homological.GroupCohomology.Functoriality
5038+
import Mathlib.RepresentationTheory.Homological.GroupCohomology.Hilbert90
5039+
import Mathlib.RepresentationTheory.Homological.GroupCohomology.LowDegree
5040+
import Mathlib.RepresentationTheory.Homological.GroupHomology.Basic
5041+
import Mathlib.RepresentationTheory.Homological.Resolution
50355042
import Mathlib.RepresentationTheory.Induced
50365043
import Mathlib.RepresentationTheory.Invariants
50375044
import Mathlib.RepresentationTheory.Maschke

Mathlib/Algebra/Category/CoalgCat/ComonEquivalence.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ theorem tensorObj_comul (K L : CoalgCat R) :
134134
rfl
135135

136136
theorem tensorHom_toLinearMap (f : M →ₗc[R] N) (g : P →ₗc[R] Q) :
137-
(CoalgCat.ofHom f ⊗ CoalgCat.ofHom g).1.toLinearMap
137+
(CoalgCat.ofHom f ⊗ CoalgCat.ofHom g).1.toLinearMap
138138
= TensorProduct.map f.toLinearMap g.toLinearMap := rfl
139139

140140
theorem associator_hom_toLinearMap :

Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ namespace MonoidalCategory
175175

176176
@[simp]
177177
theorem tensorHom_tmul {K L M N : ModuleCat.{u} R} (f : K ⟶ L) (g : M ⟶ N) (k : K) (m : M) :
178-
(f ⊗ g) (k ⊗ₜ m) = f k ⊗ₜ g m :=
178+
(f ⊗ g) (k ⊗ₜ m) = f k ⊗ₜ g m :=
179179
rfl
180180

181181
@[simp]

Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace MonoidalCategory
2828

2929
@[simp]
3030
theorem braiding_naturality {X₁ X₂ Y₁ Y₂ : ModuleCat.{u} R} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) :
31-
(f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f) := by
31+
(f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f) := by
3232
ext : 1
3333
apply TensorProduct.ext'
3434
intro x y

Mathlib/Algebra/Category/ModuleCat/Presheaf/Monoidal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ lemma tensorObj_map_tmul {X Y : Cᵒᵖ} (f : X ⟶ Y) (m₁ : M₁.obj X) (m₂
7272
/-- The tensor product of two morphisms of presheaves of modules. -/
7373
@[simps]
7474
noncomputable def tensorHom (f : M₁ ⟶ M₂) (g : M₃ ⟶ M₄) : tensorObj M₁ M₃ ⟶ tensorObj M₂ M₄ where
75-
app X := f.app X ⊗ g.app X
75+
app X := f.app X ⊗ g.app X
7676
naturality {X Y} φ := ModuleCat.MonoidalCategory.tensor_ext (fun m₁ m₃ ↦ by
7777
dsimp
7878
rw [tensorObj_map_tmul]

Mathlib/Algebra/DirectSum/Internal.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ variable [CanonicallyOrderedAdd ι]
468468
/-- The difference with `DirectSum.listProd_apply_eq_zero` is that the indices at which
469469
the terms of the list are zero is allowed to vary. -/
470470
theorem listProd_apply_eq_zero' {l : List ((⨁ i, A i) × ι)}
471-
(hl : ∀ xn ∈ l, ∀ k < xn.2, xn.1 k = 0) ⦃n : ι⦄ (hn : n < (l.map Prod.snd).sum) :
471+
(hl : ∀ xn ∈ l, ∀ k < xn.2, xn.1 k = 0) ⦃n : ι⦄ (hn : n < (l.map Prod.snd).sum) :
472472
(l.map Prod.fst).prod n = 0 := by
473473
induction l generalizing n with
474474
| nil => simp [(zero_le n).not_gt] at hn
@@ -500,7 +500,7 @@ variable {A : ι → σ} [SetLike.GradedMonoid A]
500500
/-- The difference with `DirectSum.multisetProd_apply_eq_zero` is that the indices at which
501501
the terms of the multiset are zero is allowed to vary. -/
502502
theorem multisetProd_apply_eq_zero' {s : Multiset ((⨁ i, A i) × ι)}
503-
(hs : ∀ xn ∈ s, ∀ k < xn.2, xn.1 k = 0) ⦃n : ι⦄ (hn : n < (s.map Prod.snd).sum) :
503+
(hs : ∀ xn ∈ s, ∀ k < xn.2, xn.1 k = 0) ⦃n : ι⦄ (hn : n < (s.map Prod.snd).sum) :
504504
(s.map Prod.fst).prod n = 0 := by
505505
have := listProd_apply_eq_zero' (l := s.toList) (by simpa using hs)
506506
(by simpa [← Multiset.sum_coe, ← Multiset.map_coe])
@@ -516,7 +516,7 @@ theorem multisetProd_apply_eq_zero {s : Multiset (⨁ i, A i)} {m : ι}
516516
/-- The difference with `DirectSum.finsetProd_apply_eq_zero` is that the indices at which
517517
the terms of the multiset are zero is allowed to vary. -/
518518
theorem finsetProd_apply_eq_zero' {s : Finset ((⨁ i, A i) × ι)}
519-
(hs : ∀ xn ∈ s, ∀ k < xn.2, xn.1 k = 0) ⦃n : ι⦄ (hn : n < ∑ xn ∈ s, xn.2) :
519+
(hs : ∀ xn ∈ s, ∀ k < xn.2, xn.1 k = 0) ⦃n : ι⦄ (hn : n < ∑ xn ∈ s, xn.2) :
520520
(∏ xn ∈ s, xn.1) n = 0 := by
521521
simpa using listProd_apply_eq_zero' (l := s.toList) (by simpa using hs) (by simpa)
522522

Mathlib/Algebra/Group/End.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ theorem self_trans_inv (e : Perm α) : e.trans e⁻¹ = 1 :=
179179
theorem symm_mul (e : Perm α) : e.symm * e = 1 :=
180180
Equiv.self_trans_symm e
181181

182+
/-- If `α` is equivalent to `β`, then `Perm α` is isomorphic to `Perm β`. -/
183+
def permCongrHom (e : α ≃ β) : Equiv.Perm α ≃* Equiv.Perm β where
184+
toFun x := e.symm.trans (x.trans e)
185+
invFun y := e.trans (y.trans e.symm)
186+
left_inv _ := by ext; simp
187+
right_inv _ := by ext; simp
188+
map_mul' _ _ := by ext; simp
189+
182190
/-! Lemmas about `Equiv.Perm.sumCongr` re-expressed via the group structure. -/
183191

184192

0 commit comments

Comments
 (0)