Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - chore: classify added instance porting notes #10755

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Archive/Arithcc.lean
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ protected theorem StateEq.trans {t : Register} (ζ₁ ζ₂ ζ₃ : State) :
· trans ζ₂ <;> assumption
#align arithcc.state_eq.trans Arithcc.StateEq.trans

-- Porting note: added
-- Porting note (#10754): added instance
instance (t : Register) : Trans (StateEq (t + 1)) (StateEq (t + 1)) (StateEq (t + 1)) :=
⟨@StateEq.trans _⟩

Expand All @@ -261,7 +261,7 @@ protected theorem StateEqStateEqRs.trans (t : Register) (ζ₁ ζ₂ ζ₃ : Sta
trans ζ₂ <;> assumption
#align arithcc.state_eq_state_eq_rs.trans Arithcc.StateEqStateEqRs.trans

-- Porting note: added
-- Porting note (#10754): added instance
instance (t : Register) : Trans (StateEq (t + 1)) (StateEqRs (t + 1)) (StateEqRs (t + 1)) :=
⟨@StateEqStateEqRs.trans _⟩

Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Category/Ring/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ instance instFunLike {X Y : SemiRingCat} : FunLike (X ⟶ Y) X Y :=
-- unfolding during unification
ConcreteCategory.instFunLike

-- Porting note: added
-- Porting note (#10754): added instance
instance instRingHomClass {X Y : SemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass

Expand Down Expand Up @@ -205,7 +205,7 @@ instance instFunLike {X Y : RingCat} : FunLike (X ⟶ Y) X Y :=
-- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
ConcreteCategory.instFunLike

-- Porting note: added
-- Porting note (#10754): added instance
instance instRingHomClass {X Y : RingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass

Expand Down Expand Up @@ -311,7 +311,7 @@ instance instFunLike {X Y : CommSemiRingCat} : FunLike (X ⟶ Y) X Y :=
-- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
ConcreteCategory.instFunLike

-- Porting note: added
-- Porting note (#10754): added instance
instance instRingHomClass {X Y : CommSemiRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass

Expand Down Expand Up @@ -431,7 +431,7 @@ instance instFunLike {X Y : CommRingCat} : FunLike (X ⟶ Y) X Y :=
-- Note: this is apparently _not_ defeq to RingHom.instFunLike with reducible transparency
ConcreteCategory.instFunLike

-- Porting note: added
-- Porting note (#10754): added instance
instance instRingHomClass {X Y : CommRingCat} : RingHomClass (X ⟶ Y) X Y :=
RingHom.instRingHomClass

Expand Down
14 changes: 7 additions & 7 deletions Mathlib/Analysis/Asymptotics/Theta.lean
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ theorem IsTheta.trans {f : α → E} {g : α → F'} {k : α → G} (h₁ : f =
⟨h₁.1.trans h₂.1, h₂.2.trans h₁.2⟩
#align asymptotics.is_Theta.trans Asymptotics.IsTheta.trans

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (α := α → E) (β := α → F') (γ := α → G) (IsTheta l) (IsTheta l) (IsTheta l) :=
⟨IsTheta.trans⟩

Expand All @@ -95,7 +95,7 @@ theorem IsBigO.trans_isTheta {f : α → E} {g : α → F'} {k : α → G} (h₁
h₁.trans h₂.1
#align asymptotics.is_O.trans_is_Theta Asymptotics.IsBigO.trans_isTheta

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (α := α → E) (β := α → F') (γ := α → G) (IsBigO l) (IsTheta l) (IsBigO l) :=
⟨IsBigO.trans_isTheta⟩

Expand All @@ -105,7 +105,7 @@ theorem IsTheta.trans_isBigO {f : α → E} {g : α → F'} {k : α → G} (h₁
h₁.1.trans h₂
#align asymptotics.is_Theta.trans_is_O Asymptotics.IsTheta.trans_isBigO

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (α := α → E) (β := α → F') (γ := α → G) (IsTheta l) (IsBigO l) (IsBigO l) :=
⟨IsTheta.trans_isBigO⟩

Expand All @@ -115,7 +115,7 @@ theorem IsLittleO.trans_isTheta {f : α → E} {g : α → F} {k : α → G'} (h
h₁.trans_isBigO h₂.1
#align asymptotics.is_o.trans_is_Theta Asymptotics.IsLittleO.trans_isTheta

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (α := α → E) (β := α → F') (γ := α → G') (IsLittleO l) (IsTheta l) (IsLittleO l) :=
⟨IsLittleO.trans_isTheta⟩

Expand All @@ -125,7 +125,7 @@ theorem IsTheta.trans_isLittleO {f : α → E} {g : α → F'} {k : α → G} (h
h₁.1.trans_isLittleO h₂
#align asymptotics.is_Theta.trans_is_o Asymptotics.IsTheta.trans_isLittleO

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (α := α → E) (β := α → F') (γ := α → G) (IsTheta l) (IsLittleO l) (IsLittleO l) :=
⟨IsTheta.trans_isLittleO⟩

Expand All @@ -135,7 +135,7 @@ theorem IsTheta.trans_eventuallyEq {f : α → E} {g₁ g₂ : α → F} (h : f
⟨h.1.trans_eventuallyEq hg, hg.symm.trans_isBigO h.2⟩
#align asymptotics.is_Theta.trans_eventually_eq Asymptotics.IsTheta.trans_eventuallyEq

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (α := α → E) (β := α → F) (γ := α → F) (IsTheta l) (EventuallyEq l) (IsTheta l) :=
⟨IsTheta.trans_eventuallyEq⟩

Expand All @@ -145,7 +145,7 @@ theorem _root_.Filter.EventuallyEq.trans_isTheta {f₁ f₂ : α → E} {g : α
⟨hf.trans_isBigO h.1, h.2.trans_eventuallyEq hf.symm⟩
#align filter.eventually_eq.trans_is_Theta Filter.EventuallyEq.trans_isTheta

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (α := α → E) (β := α → E) (γ := α → F) (EventuallyEq l) (IsTheta l) (IsTheta l) :=
⟨EventuallyEq.trans_isTheta⟩

Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Analysis/Normed/Group/SemiNormedGroupCat.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def of (M : Type u) [SeminormedAddCommGroup M] : SemiNormedGroupCat :=
instance (M : SemiNormedGroupCat) : SeminormedAddCommGroup M :=
M.str

-- Porting Note: added
-- Porting note (#10754): added instance
instance funLike {V W : SemiNormedGroupCat} : FunLike (V ⟶ W) V W where
coe := (forget SemiNormedGroupCat).map
coe_injective' := fun f g h => by cases f; cases g; congr
Expand Down Expand Up @@ -148,7 +148,7 @@ instance : LargeCategory.{u} SemiNormedGroupCat₁ where
id X := ⟨NormedAddGroupHom.id X, NormedAddGroupHom.NormNoninc.id⟩
comp {X Y Z} f g := ⟨g.1.comp f.1, g.2.comp f.2⟩

-- Porting Note: Added
-- Porting note (#10754): added instance
instance instFunLike (X Y : SemiNormedGroupCat₁) : FunLike (X ⟶ Y) X Y where
coe f := f.1.toFun
coe_injective' _ _ h := Subtype.val_inj.mp (NormedAddGroupHom.coe_injective h)
Expand All @@ -165,7 +165,7 @@ instance : ConcreteCategory.{u} SemiNormedGroupCat₁ where
map := fun f => f }
forget_faithful := { }

-- Porting note: added
-- Porting note (#10754): added instance
instance toAddMonoidHomClass {V W : SemiNormedGroupCat₁} : AddMonoidHomClass (V ⟶ W) V W where
map_add f := f.1.map_add'
map_zero f := (AddMonoidHom.mk' f.1 f.1.map_add').map_zero
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Order/Category/Semilat.lean
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ instance : LargeCategory.{u} SemilatInfCat where
comp_id := InfTopHom.id_comp
assoc _ _ _ := InfTopHom.comp_assoc _ _ _

-- Porting note: added
-- Porting note (#10754): added instance
instance instFunLike (X Y : SemilatInfCat) : FunLike (X ⟶ Y) X Y :=
show FunLike (InfTopHom X Y) X Y from inferInstance

Expand Down
10 changes: 5 additions & 5 deletions Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,14 @@ instance : Algebra R (v.adicCompletionIntegers K) where
(algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
rw [Algebra.smul_def]
refine' ValuationSubring.mul_mem _ _ _ _ x.2
--Porting note: added instance
--porting note (#10754): added instance
letI : Valued K ℤₘ₀ := adicValued v
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
exact v.valuation_le_one _⟩
toFun r :=
⟨(algebraMap R K r : adicCompletion K v), by
-- Porting note: added instance
-- porting note (#10754): added instance
letI : Valued K ℤₘ₀ := adicValued v
--Porting note: rest of proof was `simpa only
-- [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
Expand All @@ -445,13 +445,13 @@ instance : Algebra R (v.adicCompletionIntegers K) where
map_one' := by simp only [map_one]; rfl
map_mul' x y := by
ext
--Porting note: added instance
--porting note (#10754): added instance
letI : Valued K ℤₘ₀ := adicValued v
simp_rw [RingHom.map_mul, Subring.coe_mul, UniformSpace.Completion.coe_mul]
map_zero' := by simp only [map_zero]; rfl
map_add' x y := by
ext
--Porting note: added instance
--porting note (#10754): added instance
letI : Valued K ℤₘ₀ := adicValued v
simp_rw [RingHom.map_add, Subring.coe_add, UniformSpace.Completion.coe_add]
commutes' r x := by
Expand All @@ -462,7 +462,7 @@ instance : Algebra R (v.adicCompletionIntegers K) where
ext
--Porting note: added `dsimp`
dsimp
--Porting note: added instance
--porting note (#10754): added instance
letI : Valued K ℤₘ₀ := adicValued v
simp only [Subring.coe_mul, Algebra.smul_def]
rfl
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/RingTheory/Valuation/ValuationSubring.lean
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ instance ofPrimeAlgebra (A : ValuationSubring K) (P : Ideal A) [P.IsPrime] :
#align valuation_subring.of_prime_algebra ValuationSubring.ofPrimeAlgebra

instance ofPrime_scalar_tower (A : ValuationSubring K) (P : Ideal A) [P.IsPrime] :
-- Porting note: added instance
-- porting note (#10754): added instance
letI : SMul A (A.ofPrime P) := SMulZeroClass.toSMul
IsScalarTower A (A.ofPrime P) K :=
IsScalarTower.subalgebra' A K K
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/SetTheory/Game/PGame.lean
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ theorem lf_of_le_of_lf {x y z : PGame} (h₁ : x ≤ y) (h₂ : y ⧏ z) : x ⧏
exact fun h₃ => h₂ (h₃.trans h₁)
#align pgame.lf_of_le_of_lf SetTheory.PGame.lf_of_le_of_lf

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (· ≤ ·) (· ⧏ ·) (· ⧏ ·) := ⟨lf_of_le_of_lf⟩

@[trans]
Expand All @@ -575,7 +575,7 @@ theorem lf_of_lf_of_le {x y z : PGame} (h₁ : x ⧏ y) (h₂ : y ≤ z) : x ⧏
exact fun h₃ => h₁ (h₂.trans h₃)
#align pgame.lf_of_lf_of_le SetTheory.PGame.lf_of_lf_of_le

-- Porting note: added
-- Porting note (#10754): added instance
instance : Trans (· ⧏ ·) (· ≤ ·) (· ⧏ ·) := ⟨lf_of_lf_of_le⟩

alias _root_.LE.le.trans_lf := lf_of_le_of_lf
Expand Down
Loading