Skip to content

Commit 274377a

Browse files
committed
merge upstream/master
2 parents 00b2942 + d496dc0 commit 274377a

182 files changed

Lines changed: 1893 additions & 642 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/actions/get-mathlib-ci/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inputs:
1010
# Default pinned commit used by workflows unless they explicitly override.
1111
# Update this ref as needed to pick up changes to mathlib-ci scripts
1212
# This is also updated automatically by .github/workflows/update_dependencies.yml
13-
default: 0efe1f98dd7e3b632b596b0360dd01cb7f4bc4c7
13+
default: 650f6b52cdb1e35e704c85daad0a6c6d7a02e05c
1414
path:
1515
description: Checkout destination path.
1616
required: false

Mathlib.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5488,6 +5488,7 @@ public import Mathlib.MeasureTheory.Measure.Typeclasses.Finite
54885488
public import Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms
54895489
public import Mathlib.MeasureTheory.Measure.Typeclasses.Probability
54905490
public import Mathlib.MeasureTheory.Measure.Typeclasses.SFinite
5491+
public import Mathlib.MeasureTheory.Measure.Typeclasses.ZeroOne
54915492
public import Mathlib.MeasureTheory.Measure.WithDensity
54925493
public import Mathlib.MeasureTheory.Measure.WithDensityFinite
54935494
public import Mathlib.MeasureTheory.Order.Group.Lattice
@@ -6165,6 +6166,7 @@ public import Mathlib.Probability.Kernel.Composition.RadonNikodym
61656166
public import Mathlib.Probability.Kernel.CondDistrib
61666167
public import Mathlib.Probability.Kernel.Condexp
61676168
public import Mathlib.Probability.Kernel.Defs
6169+
public import Mathlib.Probability.Kernel.Deterministic
61686170
public import Mathlib.Probability.Kernel.Disintegration.Basic
61696171
public import Mathlib.Probability.Kernel.Disintegration.CDFToKernel
61706172
public import Mathlib.Probability.Kernel.Disintegration.CondCDF
@@ -6757,6 +6759,8 @@ public import Mathlib.RingTheory.QuotSMulTop
67576759
public import Mathlib.RingTheory.Radical
67586760
public import Mathlib.RingTheory.Radical.Basic
67596761
public import Mathlib.RingTheory.Radical.NatInt
6762+
public import Mathlib.RingTheory.RamificationInertia.Inertia
6763+
public import Mathlib.RingTheory.RamificationInertia.Ramification
67606764
public import Mathlib.RingTheory.ReesAlgebra
67616765
public import Mathlib.RingTheory.Regular.Category
67626766
public import Mathlib.RingTheory.Regular.Depth
@@ -7639,6 +7643,7 @@ public import Mathlib.Topology.Convenient.Category
76397643
public import Mathlib.Topology.Convenient.ContinuousMapGeneratedBy
76407644
public import Mathlib.Topology.Convenient.GeneratedBy
76417645
public import Mathlib.Topology.Convenient.HomSpace
7646+
public import Mathlib.Topology.Convenient.OpenClosed
76427647
public import Mathlib.Topology.Covering
76437648
public import Mathlib.Topology.Covering.AddCircle
76447649
public import Mathlib.Topology.Covering.Basic

Mathlib/Algebra/Algebra/Equiv.lean

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,17 @@ def toAlgHom : A₁ →ₐ[R] A₂ :=
174174
map_one' := map_one e
175175
map_zero' := map_zero e }
176176

177-
@[simp]
177+
instance : CoeOut (A₁ ≃ₐ[R] A₂) (A₁ →ₐ[R] A₂) where coe := AlgEquiv.toAlgHom
178+
179+
@[deprecated "Now a syntactic equality" (since := "2026-04-29"), nolint synTaut]
178180
theorem toAlgHom_eq_coe : e.toAlgHom = e :=
179181
rfl
180182

181183
theorem toAlgHom_apply (x : A₁) : e.toAlgHom x = e x :=
182184
rfl
183185

184186
@[simp, norm_cast]
185-
theorem coe_algHom : DFunLike.coe (e.toAlgHom) = DFunLike.coe e :=
187+
theorem coe_algHom : DFunLike.coe e.toAlgHom = DFunLike.coe e :=
186188
rfl
187189

188190
theorem coe_algHom_injective : Function.Injective ((↑) : (A₁ ≃ₐ[R] A₂) → A₁ →ₐ[R] A₂) :=
@@ -405,10 +407,10 @@ def arrowCongr (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂') : (A
405407
toFun f := (e₂.toAlgHom.comp f).comp e₁.symm.toAlgHom
406408
invFun f := (e₂.symm.toAlgHom.comp f).comp e₁.toAlgHom
407409
left_inv f := by
408-
simp only [AlgHom.comp_assoc, toAlgHom_eq_coe, symm_comp]
410+
simp only [AlgHom.comp_assoc, symm_comp]
409411
simp only [← AlgHom.comp_assoc, symm_comp, AlgHom.id_comp, AlgHom.comp_id]
410412
right_inv f := by
411-
simp only [AlgHom.comp_assoc, toAlgHom_eq_coe, comp_symm]
413+
simp only [AlgHom.comp_assoc, comp_symm]
412414
simp only [← AlgHom.comp_assoc, comp_symm, AlgHom.id_comp, AlgHom.comp_id]
413415

414416
theorem arrowCongr_comp (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂')
@@ -573,7 +575,7 @@ lemma toLinearMap_ofBijective (f : A₁ →ₐ[R] A₂) (hf : Function.Bijective
573575

574576
@[simp]
575577
lemma toAlgHom_ofBijective (f : A₁ →ₐ[R] A₂) (hf : Function.Bijective f) :
576-
AlgHomClass.toAlgHom (ofBijective f hf) = f := rfl
578+
(ofBijective f hf).toAlgHom = f := rfl
577579

578580
lemma ofBijective_apply_symm_apply (f : A₁ →ₐ[R] A₂) (hf : Function.Bijective f) (x : A₂) :
579581
f ((ofBijective f hf).symm x) = x :=

Mathlib/Algebra/Algebra/Hom.lean

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ def toAlgHom {F : Type*} [FunLike F A B] [AlgHomClass F R A B] (f : F) : A →
7171
toFun := f
7272
commutes' := AlgHomClass.commutes f
7373

74-
instance coeTC {F : Type*} [FunLike F A B] [AlgHomClass F R A B] : CoeTC F (A →ₐ[R] B) :=
75-
⟨AlgHomClass.toAlgHom⟩
76-
7774
end AlgHomClass
7875

7976
namespace AlgHom
@@ -111,7 +108,7 @@ initialize_simps_projections AlgHom (toFun → apply)
111108

112109
@[simp]
113110
protected theorem coe_coe {F : Type*} [FunLike F A B] [AlgHomClass F R A B] (f : F) :
114-
⇑(f : A →ₐ[R] B) = f :=
111+
⇑(AlgHomClass.toAlgHom f : A →ₐ[R] B) = f :=
115112
rfl
116113

117114
@[simp]

Mathlib/Algebra/Algebra/Subalgebra/Centralizer.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ lemma centralizer_coe_image_includeRight_eq_center_tensorProduct
117117
fun h b hb ↦ (Algebra.TensorProduct.comm R A B).symm.injective <| by aesop, fun h b hb ↦
118118
(Algebra.TensorProduct.comm R A B).injective <| by aesop⟩
119119
· ext x
120-
simp only [AlgHom.mem_range, AlgEquiv.toAlgHom_eq_coe, mem_comap, AlgHom.coe_coe]
120+
simp only [AlgHom.mem_range, mem_comap, AlgEquiv.coe_algHom]
121121
constructor
122122
· rintro ⟨x, rfl⟩
123123
exact ⟨(Algebra.TensorProduct.comm R _ _) x,

Mathlib/Algebra/Category/CommBialgCat.lean

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ initialize_simps_projections Hom (hom' → hom)
9797
The results below duplicate the `ConcreteCategory` simp lemmas, but we can keep them for `dsimp`.
9898
-/
9999

100-
@[simp] lemma hom_id : (𝟙 A : A ⟶ A).hom = AlgHom.id R A := rfl
100+
@[simp] lemma hom_id : (𝟙 A : A ⟶ A).hom = .id R A := rfl
101101
@[simp] lemma hom_comp (f : A ⟶ B) (g : B ⟶ C) : (f ≫ g).hom = g.hom.comp f.hom := rfl
102102

103103
lemma id_apply (A : CommBialgCat.{v} R) (a : A) : (𝟙 A : A ⟶ A) a = a := by simp
@@ -132,13 +132,14 @@ instance : Bialgebra R ((forget (CommBialgCat R)).obj A) := inferInstanceAs <| B
132132

133133
instance hasForgetToCommAlgCat : HasForget₂ (CommBialgCat.{v} R) (CommAlgCat.{v} R) where
134134
forget₂.obj M := .of R M
135-
forget₂.map f := CommAlgCat.ofHom f.hom
135+
forget₂.map f := CommAlgCat.ofHom f.hom.toAlgHom
136136

137137
@[simp] lemma forget₂_commAlgCat_obj (A : CommBialgCat.{v} R) :
138138
(forget₂ (CommBialgCat.{v} R) (CommAlgCat.{v} R)).obj A = .of R A := rfl
139139

140140
@[simp] lemma forget₂_commAlgCat_map (f : A ⟶ B) :
141-
(forget₂ (CommBialgCat.{v} R) (CommAlgCat.{v} R)).map f = CommAlgCat.ofHom f.hom := rfl
141+
(forget₂ (CommBialgCat.{v} R) (CommAlgCat.{v} R)).map f =
142+
CommAlgCat.ofHom f.hom.toAlgHom := rfl
142143

143144
/-- Forgetting to the underlying type and then building the bundled object returns the original
144145
bialgebra. -/
@@ -203,7 +204,7 @@ instance {A : Type u} [CommRing A] [Bialgebra R A] [IsCocomm R A] :
203204
mul_comm := by ext; exact comm_comul R _
204205

205206
instance {A B : Type u} [CommRing A] [Bialgebra R A] [CommRing B] [Bialgebra R B]
206-
(f : A →ₐc[R] B) : IsMonHom (CommAlgCat.ofHom (f : A →ₐ[R] B)).op where
207+
(f : A →ₐc[R] B) : IsMonHom (CommAlgCat.ofHom f.toAlgHom).op where
207208

208209
instance (A : (CommAlgCat R)ᵒᵖ) [MonObj A] : Bialgebra R A.unop :=
209210
.ofAlgHom μ[A].unop.hom η[A].unop.hom
@@ -218,7 +219,7 @@ variable (R) in
218219
unitIso_inv_app counitIso_hom_app counitIso_inv_app]
219220
def commBialgCatEquivComonCommAlgCat : CommBialgCat R ≌ (Mon (CommAlgCat R)ᵒᵖ)ᵒᵖ where
220221
functor.obj A := .op <| .mk <| .op <| .of R A
221-
functor.map {A B} f := .op <| .mk' <| .op <| CommAlgCat.ofHom f.hom
222+
functor.map {A B} f := .op <| .mk' <| .op <| CommAlgCat.ofHom <| f.hom.toAlgHom
222223
inverse.obj A := .of R A.unop.X.unop
223224
inverse.map {A B} f := CommBialgCat.ofHom <| .ofAlgHom f.unop.hom.unop.hom
224225
congr(($(IsMonHom.one_hom (f := f.unop.hom))).unop.hom)
@@ -231,12 +232,12 @@ def commBialgCatEquivComonCommAlgCat : CommBialgCat R ≌ (Mon (CommAlgCat R)ᵒ
231232
@[simp]
232233
lemma commBialgCatEquivComonCommAlgCat_functor_map_unop_hom {A B : CommBialgCat R} (f : A ⟶ B) :
233234
((commBialgCatEquivComonCommAlgCat R).functor.map f).unop.hom =
234-
(CommAlgCat.ofHom (AlgHomClass.toAlgHom f.hom)).op := rfl
235+
(CommAlgCat.ofHom f.hom.toAlgHom).op := rfl
235236

236237
@[simp]
237238
lemma commBialgCatEquivComonCommAlgCat_inverse_map_unop_hom
238239
{A B : (Mon (CommAlgCat R)ᵒᵖ)ᵒᵖ} (f : A ⟶ B) :
239-
AlgHomClass.toAlgHom ((commBialgCatEquivComonCommAlgCat R).inverse.map f).hom =
240+
((commBialgCatEquivComonCommAlgCat R).inverse.map f).hom.toAlgHom =
240241
f.unop.hom.unop.hom := rfl
241242

242243
instance {A : CommBialgCat.{u} R} [IsCocomm R A] :

Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean

Lines changed: 53 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -486,14 +486,13 @@ end Unbundled
486486
variable (M : ModuleCat.{v} R)
487487

488488
/-- If `M` is an `R`-module, then the set of `R`-linear maps `S →ₗ[R] M` is an `S`-module with
489-
scalar multiplication defined by `s • l := x ↦ l (x • s)` -/
489+
scalar multiplication defined by `s • l := x ↦ l (x • s)`.
490+
491+
This is an implementation detail: use `(coextendScalars f).obj` instead.
492+
-/
490493
def obj' : ModuleCat S :=
491494
of _ ((restrictScalars f).obj (of _ S) →ₗ[R] M)
492495

493-
set_option backward.inferInstanceAs.wrap.data false in
494-
instance : CoeFun (obj' f M) fun _ => S → M :=
495-
inferInstanceAs <| CoeFun ((restrictScalars f).obj (of _ S) →ₗ[R] M) _
496-
497496
/-- If `M, M'` are `R`-modules, then any `R`-linear map `g : M ⟶ M'` induces an `S`-linear map
498497
`(S →ₗ[R] M) ⟶ (S →ₗ[R] M')` defined by `h ↦ g ∘ h` -/
499498
@[simps!]
@@ -509,6 +508,8 @@ end CoextendScalars
509508
For any rings `R, S` and a ring homomorphism `f : R →+* S`, there is a functor from `R`-module to
510509
`S`-module defined by `M ↦ (S →ₗ[R] M)` where `S` is considered as an `R`-module via restriction of
511510
scalars and `g : M ⟶ M'` is sent to `h ↦ g ∘ h`.
511+
512+
The definition of `(coextendScalars f).obj` is given by `CoextendScalars.equiv`.
512513
-/
513514
def coextendScalars {R : Type u₁} {S : Type u₂} [Ring R] [Ring S] (f : R →+* S) :
514515
ModuleCat R ⥤ ModuleCat S where
@@ -521,9 +522,22 @@ namespace CoextendScalars
521522

522523
variable {R : Type u₁} {S : Type u₂} [Ring R] [Ring S] (f : R →+* S)
523524

524-
set_option backward.inferInstanceAs.wrap.data false in
525-
instance (M : ModuleCat R) : CoeFun ((coextendScalars f).obj M) fun _ => S → M :=
526-
inferInstanceAs <| CoeFun (CoextendScalars.obj' f M) _
525+
/-- The carrier of `(coextendScalars f).obj M` is `S →ₗ[R] M` where `S` is considered as an
526+
`R`-module via restriction of scalars. -/
527+
def equiv (M : ModuleCat R) :
528+
(coextendScalars f).obj M ≃ₗ[S] ((restrictScalars f).obj (of _ S) →ₗ[R] M) where
529+
toFun f := f
530+
invFun f := f
531+
map_add' _ _ := rfl
532+
map_smul' _ _ := rfl
533+
534+
instance (M : ModuleCat R) : CoeFun ((coextendScalars f).obj M) fun _ => S → M where
535+
coe g := equiv f M g
536+
537+
variable {f} in
538+
@[ext] lemma ext {M : ModuleCat R} {g g' : (coextendScalars f).obj M}
539+
(h : CoextendScalars.equiv f M g = CoextendScalars.equiv f M g') :
540+
g = g' := (CoextendScalars.equiv f M).injective h
527541

528542
theorem smul_apply (M : ModuleCat R) (g : (coextendScalars f).obj M) (s s' : S) :
529543
(s • g) s' = g (s' * s) :=
@@ -547,20 +561,19 @@ corresponds to `Y ⟶ (coextendScalars f).obj X` by sending `y ↦ (s ↦ g (s
547561
def HomEquiv.fromRestriction {X : ModuleCat R} {Y : ModuleCat S}
548562
(g : (restrictScalars f).obj Y ⟶ X) : Y ⟶ (coextendScalars f).obj X :=
549563
ofHom
550-
{ toFun := fun y : Y =>
564+
{ toFun := fun y : Y => (CoextendScalars.equiv _ _).symm
551565
{ toFun := fun s : S => g <| (s • y : Y)
552-
map_add' := fun s1 s2 : S => by simp only [add_smul]; rw [map_add]
566+
map_add' := fun s1 s2 : S => by simp [add_smul]
553567
map_smul' := fun r (s : S) => by
554568
-- Porting note: dsimp clears out some rw's but less eager to apply others with Lean 4
555569
dsimp
556570
rw [← g.hom.map_smul]
557-
erw [smul_eq_mul, mul_smul]
558-
rfl }
559-
map_add' := fun y1 y2 : Y =>
560-
LinearMap.ext fun s : S => by
561-
simp [smul_add, map_add]
562-
map_smul' := fun (s : S) (y : Y) => LinearMap.ext fun t : S => by
563-
simp [mul_smul] }
571+
erw [smul_eq_mul]
572+
simp [mul_smul] }
573+
map_add' (y1 y2 : Y) := (CoextendScalars.equiv _ _).injective <|
574+
LinearMap.ext fun s : S => by simp
575+
map_smul' (s : S) (y : Y) := (CoextendScalars.equiv _ _).injective <|
576+
LinearMap.ext fun t : S => by simp [mul_smul] }
564577

565578
/-- This should be autogenerated by `@[simps]` but we need to give `s` the correct type here. -/
566579
@[simp] lemma HomEquiv.fromRestriction_hom_apply_apply {X : ModuleCat R} {Y : ModuleCat S}
@@ -576,13 +589,11 @@ def HomEquiv.toRestriction {X : ModuleCat R} {Y : ModuleCat S} (g : Y ⟶ (coext
576589
-- TODO: after https://github.com/leanprover-community/mathlib4/pull/19511 we need to hint `(X := ...)`.
577590
-- This suggests `restrictScalars` needs to be redesigned.
578591
ofHom (X := (restrictScalars f).obj Y)
579-
{ toFun := fun y : Y => (g y) (1 : S)
580-
map_add' := fun x y => by dsimp; rw [g.hom.map_add, LinearMap.add_apply]
581-
map_smul' := fun r (y : Y) => by
582-
dsimp
592+
{ toFun y := (g y) (1 : S)
593+
map_add' x y := by simp
594+
map_smul' r (y : Y) := by
583595
rw [← map_smul]
584-
erw [smul_eq_mul, mul_one, map_smul]
585-
rw [CoextendScalars.smul_apply (s := f r) (g := g y) (s' := 1), one_mul]
596+
erw [smul_eq_mul]
586597
simp }
587598

588599
/-- This should be autogenerated by `@[simps]` but we need to give `1` the correct type here. -/
@@ -594,28 +605,18 @@ set_option backward.defeqAttrib.useBackward true in
594605
set_option backward.isDefEq.respectTransparency false in
595606
/-- Auxiliary definition for `unit'`, to address timeouts. -/
596607
def app' (Y : ModuleCat S) : Y →ₗ[S] (restrictScalars f ⋙ coextendScalars f).obj Y :=
597-
{ toFun := fun y : Y =>
598-
{ toFun := fun s : S => (s • y : Y)
599-
map_add' := fun _ _ => add_smul _ _ _
600-
map_smul' := fun r (s : S) => by
601-
dsimp only [AddHom.toFun_eq_coe, AddHom.coe_mk, RingHom.id_apply]
602-
erw [smul_eq_mul, mul_smul]
603-
simp }
604-
map_add' := fun y1 y2 =>
608+
{ toFun y := (CoextendScalars.equiv _ _).symm
609+
{ toFun (s : S) := s • y
610+
map_add' _ _ := add_smul _ _ _
611+
map_smul' r (s : S) := by
612+
erw [smul_eq_mul]
613+
simp [mul_smul] }
614+
map_add' y1 y2 := (CoextendScalars.equiv _ _).injective <|
605615
LinearMap.ext fun s : S => by
606-
-- Porting note: double dsimp seems odd
607-
dsimp only [AddHom.toFun_eq_coe, AddHom.coe_mk, RingHom.id_apply,
608-
RingHom.toMonoidHom_eq_coe, OneHom.toFun_eq_coe, MonoidHom.toOneHom_coe,
609-
MonoidHom.coe_coe, ZeroHom.coe_mk, smul_eq_mul, id_eq, eq_mpr_eq_cast, cast_eq,
610-
Functor.comp_obj]
611-
rw [LinearMap.add_apply, LinearMap.coe_mk, LinearMap.coe_mk, LinearMap.coe_mk]
612-
dsimp
613-
rw [smul_add]
614-
map_smul' := fun s (y : Y) => LinearMap.ext fun t : S => by
615-
-- Porting note: used to be simp [mul_smul]
616-
rw [RingHom.id_apply, LinearMap.coe_mk, CoextendScalars.smul_apply', LinearMap.coe_mk]
617-
dsimp
618-
rw [mul_smul] }
616+
simp [smul_add]
617+
map_smul' s (y : Y) := (CoextendScalars.equiv _ _).injective <|
618+
LinearMap.ext fun t : S => by
619+
simp [mul_smul] }
619620

620621
/--
621622
The natural transformation from identity functor to the composition of restriction and coextension
@@ -625,7 +626,7 @@ of scalars.
625626
protected noncomputable def unit' : 𝟭 (ModuleCat S) ⟶ restrictScalars f ⋙ coextendScalars f where
626627
app Y := ofHom (app' f Y)
627628
naturality Y Y' g :=
628-
hom_ext <| LinearMap.ext fun y : Y => LinearMap.ext fun s : S => by
629+
hom_ext <| LinearMap.ext fun y : Y => CoextendScalars.ext <| LinearMap.ext fun s : S => by
629630
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/10745): previously simp [CoextendScalars.map_apply]
630631
simp only [ModuleCat.hom_comp, Functor.id_map, Functor.id_obj,
631632
Functor.comp_map]
@@ -641,16 +642,14 @@ protected noncomputable def counit' : coextendScalars f ⋙ restrictScalars f
641642
-- TODO: after https://github.com/leanprover-community/mathlib4/pull/19511 we need to hint `(X := ...)`.
642643
-- This suggests `restrictScalars` needs to be redesigned.
643644
app X := ofHom (X := (restrictScalars f).obj ((coextendScalars f).obj X))
644-
{ toFun := fun g => g.toFun (1 : S)
645-
map_add' := fun x1 x2 => by
646-
dsimp
647-
rw [LinearMap.add_apply]
648-
map_smul' := fun r (g : (restrictScalars f).obj ((coextendScalars f).obj X)) => by
645+
{ toFun g := CoextendScalars.equiv f X g (1 : S)
646+
map_add' x1 x2 := by simp
647+
map_smul' r g := by
649648
dsimp
650649
rw [CoextendScalars.smul_apply, one_mul, ← map_smul]
651650
congr
652651
change f r = f r • (1 : S)
653-
rw [smul_eq_mul (f r) 1, mul_one] }
652+
simp }
654653

655654
end RestrictionCoextensionAdj
656655

@@ -664,16 +663,12 @@ def restrictCoextendScalarsAdj {R : Type u₁} {S : Type u₂} [Ring R] [Ring S]
664663
homEquiv := fun X Y ↦
665664
{ toFun := RestrictionCoextensionAdj.HomEquiv.fromRestriction.{u₁, u₂, v} f
666665
invFun := RestrictionCoextensionAdj.HomEquiv.toRestriction.{u₁, u₂, v} f
667-
left_inv := fun g => by ext; simp
668-
right_inv := fun g => hom_ext <| LinearMap.ext fun x => LinearMap.ext fun s : S => by
669-
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/10745): once just simp
670-
rw [RestrictionCoextensionAdj.HomEquiv.fromRestriction_hom_apply_apply,
671-
RestrictionCoextensionAdj.HomEquiv.toRestriction_hom_apply, map_smulₛₗ,
672-
RingHom.id_apply, CoextendScalars.smul_apply', one_mul] }
666+
left_inv g := by ext; simp
667+
right_inv g := by ext; simp }
673668
unit := RestrictionCoextensionAdj.unit'.{u₁, u₂, v} f
674669
counit := RestrictionCoextensionAdj.counit'.{u₁, u₂, v} f
675670
homEquiv_unit := hom_ext <| LinearMap.ext fun _ => rfl
676-
homEquiv_counit := fun {X Y g} => by
671+
homEquiv_counit {X Y g} := by
677672
ext
678673
simp [RestrictionCoextensionAdj.counit'] }
679674

@@ -707,8 +702,6 @@ def HomEquiv.toRestrictScalars {X : ModuleCat R} {Y : ModuleCat S}
707702
{ toFun := fun x => g <| (1 : S) ⊗ₜ[R,f] x
708703
map_add' := fun _ _ => by dsimp; rw [tmul_add, map_add]
709704
map_smul' := fun r s => by
710-
letI : Module R S := Module.compHom S f
711-
letI : Module R Y := Module.compHom Y f
712705
dsimp
713706
rw [RestrictScalars.smul_def, ← LinearMap.map_smul]
714707
erw [tmul_smul]

Mathlib/Algebra/ContinuedFractions/Computation/ApproximationCorollaries.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ theorem of_convergence_epsilon :
113113
_ ≤ fib n := by exact_mod_cast le_fib_self <| le_trans (le_max_right N' 5) n_ge_N
114114
_ ≤ fib (n + 1) := by exact_mod_cast fib_le_fib_succ
115115
_ ≤ fib (n + 1) * fib (n + 1) := by exact_mod_cast (fib (n + 1)).le_mul_self
116-
_ ≤ fib (n + 1) * fib (n + 2) := by gcongr; exact_mod_cast fib_le_fib_succ
116+
_ ≤ fib (n + 1) * fib (n + 2) := by gcongr; lia
117117
_ ≤ B * nB := by gcongr
118118

119119
theorem of_convergence [TopologicalSpace K] [OrderTopology K] :

0 commit comments

Comments
 (0)