Skip to content

Commit afe1f34

Browse files
committed
Merge branch 'bump/v4.27.0' into add-try-registrations
2 parents d07c124 + c0dea9c commit afe1f34

File tree

536 files changed

+12827
-6460
lines changed

Some content is hidden

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

536 files changed

+12827
-6460
lines changed

Archive/Wiedijk100Theorems/Partition.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ theorem partialOddGF_prop [Field α] (n m : ℕ) :
269269
/-- If m is big enough, the partial product's coefficient counts the number of odd partitions -/
270270
theorem oddGF_prop [Field α] (n m : ℕ) (h : n < m * 2) :
271271
#(Nat.Partition.odds n) = coeff n (partialOddGF α m) := by
272-
rw [← partialOddGF_prop, Nat.Partition.odds]
272+
rw [← partialOddGF_prop, Nat.Partition.odds, Nat.Partition.restricted]
273273
congr with p
274274
apply forall₂_congr
275275
intro i hi

Counterexamples/AharoniKorman.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,8 @@ theorem scattered {f : ℚ → Hollom} (hf : StrictMono f) : False := by
322322
-- Take `x ≠ y` with `g x = g y`
323323
obtain ⟨x, y, hgxy, hxy'⟩ : ∃ x y, g x = g y ∧ x ≠ y := by simpa [Function.Injective] using hg''
324324
-- and wlog `x < y`
325-
wlog hxy : x < y generalizing x y
326-
· simp only [not_lt] at hxy
327-
exact this y x hgxy.symm hxy'.symm (lt_of_le_of_ne' hxy hxy')
325+
wlog! hxy : x < y generalizing x y
326+
· exact this y x hgxy.symm hxy'.symm (lt_of_le_of_ne' hxy hxy')
328327
-- Now `f '' [x, y]` is infinite, as it is the image of an infinite set of rationals,
329328
have h₁ : (f '' Set.Icc x y).Infinite := (Set.Icc_infinite hxy).image hf.injective.injOn
330329
-- but it is contained in `[f x, f y]` by monotonicity

Mathlib.lean

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ public import Mathlib.Algebra.Homology.DerivedCategory.Ext.EnoughProjectives
545545
public import Mathlib.Algebra.Homology.DerivedCategory.Ext.ExactSequences
546546
public import Mathlib.Algebra.Homology.DerivedCategory.Ext.ExtClass
547547
public import Mathlib.Algebra.Homology.DerivedCategory.Ext.Linear
548+
public import Mathlib.Algebra.Homology.DerivedCategory.Ext.TStructure
548549
public import Mathlib.Algebra.Homology.DerivedCategory.Fractions
549550
public import Mathlib.Algebra.Homology.DerivedCategory.FullyFaithful
550551
public import Mathlib.Algebra.Homology.DerivedCategory.HomologySequence
@@ -1416,15 +1417,18 @@ public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.IsUnique
14161417
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.Pairing
14171418
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.PairingCore
14181419
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.Rank
1420+
public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.RankNat
14191421
public import Mathlib.AlgebraicTopology.SimplicialSet.Basic
14201422
public import Mathlib.AlgebraicTopology.SimplicialSet.Boundary
14211423
public import Mathlib.AlgebraicTopology.SimplicialSet.CategoryWithFibrations
14221424
public import Mathlib.AlgebraicTopology.SimplicialSet.CompStruct
14231425
public import Mathlib.AlgebraicTopology.SimplicialSet.CompStructTruncated
14241426
public import Mathlib.AlgebraicTopology.SimplicialSet.Coskeletal
14251427
public import Mathlib.AlgebraicTopology.SimplicialSet.Degenerate
1428+
public import Mathlib.AlgebraicTopology.SimplicialSet.Dimension
14261429
public import Mathlib.AlgebraicTopology.SimplicialSet.HomotopyCat
14271430
public import Mathlib.AlgebraicTopology.SimplicialSet.Horn
1431+
public import Mathlib.AlgebraicTopology.SimplicialSet.HornColimits
14281432
public import Mathlib.AlgebraicTopology.SimplicialSet.KanComplex
14291433
public import Mathlib.AlgebraicTopology.SimplicialSet.Monoidal
14301434
public import Mathlib.AlgebraicTopology.SimplicialSet.Nerve
@@ -1747,6 +1751,7 @@ public import Mathlib.Analysis.Convex.Star
17471751
public import Mathlib.Analysis.Convex.StdSimplex
17481752
public import Mathlib.Analysis.Convex.StoneSeparation
17491753
public import Mathlib.Analysis.Convex.Strict
1754+
public import Mathlib.Analysis.Convex.StrictCombination
17501755
public import Mathlib.Analysis.Convex.StrictConvexBetween
17511756
public import Mathlib.Analysis.Convex.StrictConvexSpace
17521757
public import Mathlib.Analysis.Convex.Strong
@@ -2259,6 +2264,7 @@ public import Mathlib.CategoryTheory.Bicategory.Functor.Strict
22592264
public import Mathlib.CategoryTheory.Bicategory.Functor.StrictPseudofunctor
22602265
public import Mathlib.CategoryTheory.Bicategory.Functor.StrictlyUnitary
22612266
public import Mathlib.CategoryTheory.Bicategory.FunctorBicategory.Oplax
2267+
public import Mathlib.CategoryTheory.Bicategory.FunctorBicategory.Pseudo
22622268
public import Mathlib.CategoryTheory.Bicategory.Grothendieck
22632269
public import Mathlib.CategoryTheory.Bicategory.InducedBicategory
22642270
public import Mathlib.CategoryTheory.Bicategory.Kan.Adjunction
@@ -2932,6 +2938,7 @@ public import Mathlib.CategoryTheory.Presentable.Limits
29322938
public import Mathlib.CategoryTheory.Presentable.LocallyPresentable
29332939
public import Mathlib.CategoryTheory.Presentable.OrthogonalReflection
29342940
public import Mathlib.CategoryTheory.Presentable.Retracts
2941+
public import Mathlib.CategoryTheory.Presentable.StrongGenerator
29352942
public import Mathlib.CategoryTheory.Presentable.Type
29362943
public import Mathlib.CategoryTheory.Products.Associator
29372944
public import Mathlib.CategoryTheory.Products.Basic
@@ -3128,6 +3135,7 @@ public import Mathlib.Combinatorics.Additive.PluenneckeRuzsa
31283135
public import Mathlib.Combinatorics.Additive.Randomisation
31293136
public import Mathlib.Combinatorics.Additive.RuzsaCovering
31303137
public import Mathlib.Combinatorics.Additive.SmallTripling
3138+
public import Mathlib.Combinatorics.Additive.SubsetSum
31313139
public import Mathlib.Combinatorics.Additive.VerySmallDoubling
31323140
public import Mathlib.Combinatorics.Colex
31333141
public import Mathlib.Combinatorics.Configuration
@@ -3146,6 +3154,8 @@ public import Mathlib.Combinatorics.Enumerative.InclusionExclusion
31463154
public import Mathlib.Combinatorics.Enumerative.Partition
31473155
public import Mathlib.Combinatorics.Enumerative.Partition.Basic
31483156
public import Mathlib.Combinatorics.Enumerative.Partition.GenFun
3157+
public import Mathlib.Combinatorics.Enumerative.Partition.Glaisher
3158+
public import Mathlib.Combinatorics.Enumerative.Schroder
31493159
public import Mathlib.Combinatorics.Enumerative.Stirling
31503160
public import Mathlib.Combinatorics.Extremal.RuzsaSzemeredi
31513161
public import Mathlib.Combinatorics.Graph.Basic
@@ -3629,6 +3639,7 @@ public import Mathlib.Data.List.NodupEquivFin
36293639
public import Mathlib.Data.List.OfFn
36303640
public import Mathlib.Data.List.Pairwise
36313641
public import Mathlib.Data.List.Palindrome
3642+
public import Mathlib.Data.List.PeriodicityLemma
36323643
public import Mathlib.Data.List.Perm.Basic
36333644
public import Mathlib.Data.List.Perm.Lattice
36343645
public import Mathlib.Data.List.Perm.Subperm
@@ -4004,6 +4015,7 @@ public import Mathlib.Deprecated.Estimator
40044015
public import Mathlib.Deprecated.MLList.BestFirst
40054016
public import Mathlib.Deprecated.Order
40064017
public import Mathlib.Deprecated.RingHom
4018+
public import Mathlib.Deprecated.Sort
40074019
public import Mathlib.Dynamics.BirkhoffSum.Average
40084020
public import Mathlib.Dynamics.BirkhoffSum.Basic
40094021
public import Mathlib.Dynamics.BirkhoffSum.NormedSpace
@@ -4106,6 +4118,7 @@ public import Mathlib.FieldTheory.Relrank
41064118
public import Mathlib.FieldTheory.Separable
41074119
public import Mathlib.FieldTheory.SeparableClosure
41084120
public import Mathlib.FieldTheory.SeparableDegree
4121+
public import Mathlib.FieldTheory.SeparablyGenerated
41094122
public import Mathlib.FieldTheory.SplittingField.Construction
41104123
public import Mathlib.FieldTheory.SplittingField.IsSplittingField
41114124
public import Mathlib.FieldTheory.Tower
@@ -4308,6 +4321,7 @@ public import Mathlib.GroupTheory.MonoidLocalization.Cardinality
43084321
public import Mathlib.GroupTheory.MonoidLocalization.DivPairs
43094322
public import Mathlib.GroupTheory.MonoidLocalization.Finite
43104323
public import Mathlib.GroupTheory.MonoidLocalization.GrothendieckGroup
4324+
public import Mathlib.GroupTheory.MonoidLocalization.Lemmas
43114325
public import Mathlib.GroupTheory.MonoidLocalization.MonoidWithZero
43124326
public import Mathlib.GroupTheory.MonoidLocalization.Order
43134327
public import Mathlib.GroupTheory.Nilpotent
@@ -4488,6 +4502,7 @@ public import Mathlib.LinearAlgebra.Dimension.Free
44884502
public import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition
44894503
public import Mathlib.LinearAlgebra.Dimension.LinearMap
44904504
public import Mathlib.LinearAlgebra.Dimension.Localization
4505+
public import Mathlib.LinearAlgebra.Dimension.OrzechProperty
44914506
public import Mathlib.LinearAlgebra.Dimension.RankNullity
44924507
public import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
44934508
public import Mathlib.LinearAlgebra.Dimension.Subsingleton
@@ -4540,7 +4555,8 @@ public import Mathlib.LinearAlgebra.FreeModule.Norm
45404555
public import Mathlib.LinearAlgebra.FreeModule.PID
45414556
public import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
45424557
public import Mathlib.LinearAlgebra.FreeProduct.Basic
4543-
public import Mathlib.LinearAlgebra.GeneralLinearGroup
4558+
public import Mathlib.LinearAlgebra.GeneralLinearGroup.AlgEquiv
4559+
public import Mathlib.LinearAlgebra.GeneralLinearGroup.Basic
45444560
public import Mathlib.LinearAlgebra.Goursat
45454561
public import Mathlib.LinearAlgebra.InvariantBasisNumber
45464562
public import Mathlib.LinearAlgebra.Isomorphisms
@@ -4624,6 +4640,7 @@ public import Mathlib.LinearAlgebra.Multilinear.Basic
46244640
public import Mathlib.LinearAlgebra.Multilinear.Basis
46254641
public import Mathlib.LinearAlgebra.Multilinear.Curry
46264642
public import Mathlib.LinearAlgebra.Multilinear.DFinsupp
4643+
public import Mathlib.LinearAlgebra.Multilinear.DirectSum
46274644
public import Mathlib.LinearAlgebra.Multilinear.FiniteDimensional
46284645
public import Mathlib.LinearAlgebra.Multilinear.Finsupp
46294646
public import Mathlib.LinearAlgebra.Multilinear.Pi
@@ -4635,6 +4652,9 @@ public import Mathlib.LinearAlgebra.PerfectPairing.Matrix
46354652
public import Mathlib.LinearAlgebra.PerfectPairing.Restrict
46364653
public import Mathlib.LinearAlgebra.Pi
46374654
public import Mathlib.LinearAlgebra.PiTensorProduct
4655+
public import Mathlib.LinearAlgebra.PiTensorProduct.DFinsupp
4656+
public import Mathlib.LinearAlgebra.PiTensorProduct.DirectSum
4657+
public import Mathlib.LinearAlgebra.PiTensorProduct.Finsupp
46384658
public import Mathlib.LinearAlgebra.Prod
46394659
public import Mathlib.LinearAlgebra.Projection
46404660
public import Mathlib.LinearAlgebra.Projectivization.Action
@@ -5206,6 +5226,7 @@ public import Mathlib.NumberTheory.ModularForms.JacobiTheta.Manifold
52065226
public import Mathlib.NumberTheory.ModularForms.JacobiTheta.OneVariable
52075227
public import Mathlib.NumberTheory.ModularForms.JacobiTheta.TwoVariable
52085228
public import Mathlib.NumberTheory.ModularForms.LevelOne
5229+
public import Mathlib.NumberTheory.ModularForms.NormTrace
52095230
public import Mathlib.NumberTheory.ModularForms.Petersson
52105231
public import Mathlib.NumberTheory.ModularForms.QExpansion
52115232
public import Mathlib.NumberTheory.ModularForms.SlashActions
@@ -5623,6 +5644,8 @@ public import Mathlib.Probability.Independence.InfinitePi
56235644
public import Mathlib.Probability.Independence.Integrable
56245645
public import Mathlib.Probability.Independence.Integration
56255646
public import Mathlib.Probability.Independence.Kernel
5647+
public import Mathlib.Probability.Independence.Kernel.Indep
5648+
public import Mathlib.Probability.Independence.Kernel.IndepFun
56265649
public import Mathlib.Probability.Independence.Process
56275650
public import Mathlib.Probability.Independence.ZeroOne
56285651
public import Mathlib.Probability.Integration
@@ -5838,6 +5861,7 @@ public import Mathlib.RingTheory.EuclideanDomain
58385861
public import Mathlib.RingTheory.Extension
58395862
public import Mathlib.RingTheory.Extension.Basic
58405863
public import Mathlib.RingTheory.Extension.Cotangent.Basic
5864+
public import Mathlib.RingTheory.Extension.Cotangent.Basis
58415865
public import Mathlib.RingTheory.Extension.Cotangent.Free
58425866
public import Mathlib.RingTheory.Extension.Cotangent.LocalizationAway
58435867
public import Mathlib.RingTheory.Extension.Generators
@@ -6161,6 +6185,7 @@ public import Mathlib.RingTheory.PolynomialLaw.Basic
61616185
public import Mathlib.RingTheory.PowerBasis
61626186
public import Mathlib.RingTheory.PowerSeries.Basic
61636187
public import Mathlib.RingTheory.PowerSeries.Binomial
6188+
public import Mathlib.RingTheory.PowerSeries.Catalan
61646189
public import Mathlib.RingTheory.PowerSeries.CoeffMulMem
61656190
public import Mathlib.RingTheory.PowerSeries.Derivative
61666191
public import Mathlib.RingTheory.PowerSeries.Evaluation
@@ -6224,7 +6249,9 @@ public import Mathlib.RingTheory.SimpleRing.Defs
62246249
public import Mathlib.RingTheory.SimpleRing.Field
62256250
public import Mathlib.RingTheory.SimpleRing.Matrix
62266251
public import Mathlib.RingTheory.SimpleRing.Principal
6252+
public import Mathlib.RingTheory.Smooth.AdicCompletion
62276253
public import Mathlib.RingTheory.Smooth.Basic
6254+
public import Mathlib.RingTheory.Smooth.Flat
62286255
public import Mathlib.RingTheory.Smooth.Kaehler
62296256
public import Mathlib.RingTheory.Smooth.Local
62306257
public import Mathlib.RingTheory.Smooth.Locus

Mathlib/Algebra/Algebra/Equiv.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,3 +845,25 @@ of algebras provided here unless `e 1 = 1`. -/
845845
_ = x := by rw [map_smul, Algebra.smul_def, mul_left_comm, ← Algebra.smul_def _ (e 1),
846846
← map_smul, smul_eq_mul, mul_one, e.apply_symm_apply, ← mul_assoc, ← Algebra.smul_def,
847847
← map_smul, smul_eq_mul, mul_one, e.apply_symm_apply, one_mul]
848+
849+
namespace LinearEquiv
850+
variable {R S M₁ M₂ : Type*} [CommSemiring R] [AddCommMonoid M₁] [Module R M₁]
851+
[AddCommMonoid M₂] [Module R M₂] [Semiring S] [Module S M₁] [Module S M₂]
852+
[SMulCommClass S R M₁] [SMulCommClass S R M₂] [SMul R S] [IsScalarTower R S M₁]
853+
[IsScalarTower R S M₂]
854+
855+
variable (R) in
856+
/-- A linear equivalence of two modules induces an equivalence of algebras of their
857+
endomorphisms. -/
858+
@[simps!] def conjAlgEquiv (e : M₁ ≃ₗ[S] M₂) : Module.End S M₁ ≃ₐ[R] Module.End S M₂ where
859+
__ := e.conjRingEquiv
860+
commutes' _ := by ext; change e.restrictScalars R _ = _; simp
861+
862+
@[deprecated (since := "2025-12-06")] alias algConj := conjAlgEquiv
863+
864+
theorem conjAlgEquiv_apply (e : M₁ ≃ₗ[S] M₂) (f : Module.End S M₁) :
865+
e.conjAlgEquiv R f = e.toLinearMap ∘ₗ f ∘ₗ e.symm.toLinearMap := rfl
866+
867+
theorem symm_conjAlgEquiv (e : M₁ ≃ₗ[S] M₂) : (e.conjAlgEquiv R).symm = e.symm.conjAlgEquiv R := rfl
868+
869+
end LinearEquiv

Mathlib/Algebra/Azumaya/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ End R A ------------> End R B
7171
-/
7272
lemma mulLeftRight_comp_congr (e : A ≃ₐ[R] B) :
7373
(AlgHom.mulLeftRight R B).comp (Algebra.TensorProduct.congr e e.op).toAlgHom =
74-
(e.toLinearEquiv.algConj R).toAlgHom.comp (AlgHom.mulLeftRight R A) := by
74+
(e.toLinearEquiv.conjAlgEquiv R).toAlgHom.comp (AlgHom.mulLeftRight R A) := by
7575
ext <;> simp
7676

7777
theorem of_AlgEquiv (e : A ≃ₐ[R] B) [IsAzumaya R A] : IsAzumaya R B :=

Mathlib/Algebra/BigOperators/Finsupp/Basic.lean

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ theorem sum_sub_index [AddGroup β] [AddCommGroup γ] {f g : α →₀ β} {h :
456456
theorem prod_embDomain [Zero M] [CommMonoid N] {v : α →₀ M} {f : α ↪ β} {g : β → M → N} :
457457
(v.embDomain f).prod g = v.prod fun a b => g (f a) b := by
458458
rw [prod, prod, support_embDomain, Finset.prod_map]
459-
simp_rw [embDomain_apply]
459+
simp_rw [embDomain_apply_self]
460460

461461
@[to_additive]
462462
theorem prod_finset_sum_index [AddCommMonoid M] [CommMonoid N] {s : Finset ι} {g : ι → α →₀ M}
@@ -584,18 +584,13 @@ At the time of writing Mathlib does not have a typeclass to express the conditio
584584
that addition on a `FunLike` type is pointwise; hence this is asserted via explicit hypotheses. -/
585585
theorem Finsupp.sum_apply'' {A F : Type*} [AddZeroClass A] [AddCommMonoid F] [FunLike F γ B]
586586
(g : ι →₀ A) (k : ι → A → F) (x : γ)
587-
(hg0 : ∀ (i : ι), k i 0 = 0) (hgadd : ∀ (i : ι) (a₁ a₂ : A), k i (a₁ + a₂) = k i a₁ + k i a₂)
588587
(h0 : (0 : F) x = 0) (hadd : ∀ (f g : F), (f + g : F) x = f x + g x) :
589588
g.sum k x = g.sum (fun i a ↦ k i a x) := by
590-
induction g using Finsupp.induction with
591-
| zero => simp [h0]
592-
| single_add i a f hf ha ih =>
593-
rw [Finsupp.sum_add_index' hg0 hgadd, Finsupp.sum_add_index', hadd, ih]
594-
· congr 1
595-
rw [Finsupp.sum_single_index (hg0 i), Finsupp.sum_single_index]
596-
simp [hg0, h0]
597-
· simp [hg0, h0]
598-
· simp [hgadd, hadd]
589+
classical
590+
unfold Finsupp.sum
591+
induction g.support using Finset.induction with
592+
| empty => simp [h0]
593+
| insert i s hi ih => simp [sum_insert hi, hadd, ih]
599594

600595
@[deprecated "use instead `sum_finset_sum_index` (with equality reversed)" (since := "2025-11-07")]
601596
theorem Finsupp.sum_sum_index' (h0 : ∀ i, t i 0 = 0) (h1 : ∀ i x y, t i (x + y) = t i x + t i y) :
@@ -632,10 +627,15 @@ end Nat
632627
namespace MulOpposite
633628
variable {ι M N : Type*} [AddCommMonoid M] [Zero N]
634629

635-
@[simp] lemma op_finsuppSum (f : ι →₀ N) (g : ι → N → M) :
630+
-- We additivise the following lemmas to themselves to avoid `to_additive` getting confused.
631+
-- TODO(Jovan): Remove the annotations once unnecessary again.
632+
633+
@[to_additive self (dont_translate := M), simp]
634+
lemma op_finsuppSum (f : ι →₀ N) (g : ι → N → M) :
636635
op (f.sum g) = f.sum fun i n ↦ op (g i n) := op_sum ..
637636

638-
@[simp] lemma unop_finsuppSum (f : ι →₀ N) (g : ι → N → Mᵐᵒᵖ) :
637+
@[to_additive self (dont_translate := M), simp]
638+
lemma unop_finsuppSum (f : ι →₀ N) (g : ι → N → Mᵐᵒᵖ) :
639639
unop (f.sum g) = f.sum fun i n ↦ unop (g i n) := unop_sum ..
640640

641641
end MulOpposite

Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,7 @@ instance hasSMul : SMul S <| (restrictScalars f).obj (of _ S) →ₗ[R] M where
395395
{ toFun := fun s' : S => g (s' * s : S)
396396
map_add' := fun x y : S => by rw [add_mul, map_add]
397397
map_smul' := fun r (t : S) => by
398-
-- Porting note: needed some erw's even after dsimp to clean things up
399-
dsimp
400-
rw [← map_smul]
401-
erw [smul_eq_mul, smul_eq_mul, mul_assoc] }
398+
simp [← map_smul, ModuleCat.restrictScalars.smul_def (M := ModuleCat.of _ S), mul_assoc] }
402399

403400
@[simp]
404401
theorem smul_apply' (s : S) (g : (restrictScalars f).obj (of _ S) →ₗ[R] M) (s' : S) :

Mathlib/Algebra/CharP/Defs.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ lemma cast_eq_mod (k : ℕ) : (k : R) = (k % p : ℕ) :=
6767
_ = ↑(k % p) := by simp [this]
6868

6969
lemma cast_eq_iff_mod_eq [IsLeftCancelAdd R] : (a : R) = (b : R) ↔ a % p = b % p := by
70-
wlog hle : a ≤ b
71-
· simpa only [eq_comm] using (this _ _ (lt_of_not_ge hle).le)
70+
wlog! hle : a ≤ b
71+
· simpa only [eq_comm] using (this _ _ hle.le)
7272
obtain ⟨c, rfl⟩ := Nat.exists_eq_add_of_le hle
7373
rw [Nat.cast_add, left_eq_add, CharP.cast_eq_zero_iff R p]
7474
constructor

Mathlib/Algebra/Colimit/DirectLimit.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ suppress_compilation
5050
variable {R ι : Type*} [Preorder ι] {G : ι → Type*}
5151
variable {T : ∀ ⦃i j : ι⦄, i ≤ j → Type*} {f : ∀ _ _ h, T h}
5252
variable [∀ i j (h : i ≤ j), FunLike (T h) (G i) (G j)] [DirectedSystem G (f · · ·)]
53-
variable [IsDirected ι (· ≤ ·)]
53+
variable [IsDirectedOrder ι]
5454

5555
namespace DirectLimit
5656

Mathlib/Algebra/Colimit/Finiteness.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ open DirectLimit
3535

3636
namespace fgSystem
3737

38-
instance : IsDirected {N : Submodule R M // N.FG} (· ≤ ·) where
38+
instance : IsDirectedOrder {N : Submodule R M // N.FG} where
3939
directed N₁ N₂ :=
4040
⟨⟨_, N₁.2.sup N₂.2⟩, Subtype.coe_le_coe.mp le_sup_left, Subtype.coe_le_coe.mp le_sup_right⟩
4141

0 commit comments

Comments
 (0)