Skip to content

Commit 877ba14

Browse files
committed
also for ring and field
1 parent 588a6c1 commit 877ba14

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Mathlib/Analysis/Normed/Field/Basic.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ class NormedDivisionRing (α : Type*) extends Norm α, DivisionRing α, MetricSp
4343
/-- The norm is multiplicative. -/
4444
protected norm_mul : ∀ a b, norm (a * b) = norm a * norm b
4545

46+
-- see Note [lower instance priority]
47+
attribute [instance 100] NormedDivisionRing.toDivisionRing
48+
4649
-- see Note [lower instance priority]
4750
/-- A normed division ring is a normed ring. -/
4851
instance (priority := 100) NormedDivisionRing.toNormedRing [β : NormedDivisionRing α] :
@@ -154,6 +157,9 @@ class NormedField (α : Type*) extends Norm α, Field α, MetricSpace α where
154157
/-- The norm is multiplicative. -/
155158
protected norm_mul : ∀ a b, norm (a * b) = norm a * norm b
156159

160+
-- see Note [lower instance priority]
161+
attribute [instance 100] NormedField.toField
162+
157163
/-- A nontrivially normed field is a normed field in which there is an element of norm different
158164
from `0` and `1`. This makes it possible to bring any element arbitrarily close to `0` by
159165
multiplication by the powers of any element, and thus to relate algebra and topology. -/

Mathlib/Analysis/Normed/Ring/Basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ class NonUnitalSeminormedRing (α : Type*) extends Norm α, NonUnitalRing α,
4343
/-- The norm is submultiplicative. -/
4444
protected norm_mul_le : ∀ a b, norm (a * b) ≤ norm a * norm b
4545

46+
-- see Note [lower instance priority]
47+
attribute [instance 100] NonUnitalSeminormedRing.toNonUnitalRing
48+
4649
/-- A seminormed ring is a ring endowed with a seminorm which satisfies the inequality
4750
`‖x y‖ ≤ ‖x‖ ‖y‖`. -/
4851
class SeminormedRing (α : Type*) extends Norm α, Ring α, PseudoMetricSpace α where
@@ -51,6 +54,9 @@ class SeminormedRing (α : Type*) extends Norm α, Ring α, PseudoMetricSpace α
5154
/-- The norm is submultiplicative. -/
5255
norm_mul_le : ∀ a b, norm (a * b) ≤ norm a * norm b
5356

57+
-- see Note [lower instance priority]
58+
attribute [instance 100] SeminormedRing.toRing
59+
5460
-- see Note [lower instance priority]
5561
/-- A seminormed ring is a non-unital seminormed ring. -/
5662
instance (priority := 100) SeminormedRing.toNonUnitalSeminormedRing [β : SeminormedRing α] :
@@ -65,6 +71,9 @@ class NonUnitalNormedRing (α : Type*) extends Norm α, NonUnitalRing α, Metric
6571
/-- The norm is submultiplicative. -/
6672
norm_mul_le : ∀ a b, norm (a * b) ≤ norm a * norm b
6773

74+
-- see Note [lower instance priority]
75+
attribute [instance 100] NonUnitalNormedRing.toNonUnitalRing
76+
6877
-- see Note [lower instance priority]
6978
/-- A non-unital normed ring is a non-unital seminormed ring. -/
7079
instance (priority := 100) NonUnitalNormedRing.toNonUnitalSeminormedRing
@@ -78,6 +87,9 @@ class NormedRing (α : Type*) extends Norm α, Ring α, MetricSpace α where
7887
/-- The norm is submultiplicative. -/
7988
norm_mul_le : ∀ a b, norm (a * b) ≤ norm a * norm b
8089

90+
-- see Note [lower instance priority]
91+
attribute [instance 100] NormedRing.toRing
92+
8193
-- see Note [lower instance priority]
8294
/-- A normed ring is a seminormed ring. -/
8395
instance (priority := 100) NormedRing.toSeminormedRing [β : NormedRing α] : SeminormedRing α :=

0 commit comments

Comments
 (0)