Algebraic order homomorphism classes #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines hom classes for common properties at the intersection of order theory and algebra.
Typeclasses #
Basic typeclasses
nonneg_hom_class
: Homs are nonnegative:∀ f a, 0 ≤ f a
subadditive_hom_class
: Homs are subadditive:∀ f a b, f (a + b) ≤ f a + f b
submultiplicative_hom_class
: Homs are submultiplicative:∀ f a b, f (a * b) ≤ f a * f b
mul_le_add_hom_class
:∀ f a b, f (a * b) ≤ f a + f b
nonarchimedean_hom_class
:∀ a b, f (a + b) ≤ max (f a) (f b)
Group norms
add_group_seminorm_class
: Homs are nonnegative, subadditive, even and preserve zero.group_seminorm_class
: Homs are nonnegative, respectf (a * b) ≤ f a + f b
,f a⁻¹ = f a
and preserve zero.add_group_norm_class
: Homs are seminorms such thatf x = 0 → x = 0
for allx
.group_norm_class
: Homs are seminorms such thatf x = 0 → x = 1
for allx
.
Ring norms
ring_seminorm_class
: Homs are submultiplicative group norms.ring_norm_class
: Homs are ring seminorms that are also additive group norms.mul_ring_seminorm_class
: Homs are ring seminorms that are multiplicative.mul_ring_norm_class
: Homs are ring norms that are multiplicative.
Notes #
Typeclasses for seminorms are defined here while types of seminorms are defined in
analysis.normed.group.seminorm
and analysis.normed.ring.seminorm
because absolute values are
multiplicative ring norms but outside of this use we only consider real-valued seminorms.
TODO #
Finitary versions of the current lemmas.
Diamond inheritance cannot depend on out_param
s in the following circumstances:
- there are three classes
top
,middle
,bottom
- all of these classes have a parameter
(α : out_param _)
- all of these classes have an instance parameter
[root α]
that depends on thisout_param
- the
root
class has two child classes:left
andright
, these are siblings in the hierarchy - the instance
bottom.to_middle
takes a[left α]
parameter - the instance
middle.to_top
takes a[right α]
parameter - there is a
leaf
class that inherits from bothleft
andright
. In that case, given instancesbottom α
andleaf α
, Lean cannot synthesize atop α
instance, even though the hypotheses of the instancesbottom.to_middle
andmiddle.to_top
are satisfied.
There are two workarounds:
- You could replace the bundled inheritance implemented by the instance
middle.to_top
with unbundled inheritance implemented by adding a[top α]
parameter to themiddle
class. This is the preferred option since it is also more compatible with Lean 4, at the cost of being more work to implement and more verbose to use. - You could weaken the
bottom.to_middle
instance by making it depend on a subclass ofmiddle.to_top
's parameter, in this example replacing[left α]
with[leaf α]
.
Basics #
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective nonneg_hom_class.coe
- map_nonneg : ∀ (f : F) (a : α), 0 ≤ ⇑f a
nonneg_hom_class F α β
states that F
is a type of nonnegative morphisms.
Instances of this typeclass
Instances of other typeclasses for nonneg_hom_class
- nonneg_hom_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective subadditive_hom_class.coe
- map_add_le_add : ∀ (f : F) (a b : α), ⇑f (a + b) ≤ ⇑f a + ⇑f b
subadditive_hom_class F α β
states that F
is a type of subadditive morphisms.
Instances of this typeclass
Instances of other typeclasses for subadditive_hom_class
- subadditive_hom_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective submultiplicative_hom_class.coe
- map_mul_le_mul : ∀ (f : F) (a b : α), ⇑f (a * b) ≤ ⇑f a * ⇑f b
submultiplicative_hom_class F α β
states that F
is a type of submultiplicative morphisms.
Instances of this typeclass
Instances of other typeclasses for submultiplicative_hom_class
- submultiplicative_hom_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective mul_le_add_hom_class.coe
- map_mul_le_add : ∀ (f : F) (a b : α), ⇑f (a * b) ≤ ⇑f a + ⇑f b
mul_le_add_hom_class F α β
states that F
is a type of subadditive morphisms.
Instances of this typeclass
Instances of other typeclasses for mul_le_add_hom_class
- mul_le_add_hom_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective nonarchimedean_hom_class.coe
- map_add_le_max : ∀ (f : F) (a b : α), ⇑f (a + b) ≤ linear_order.max (⇑f a) (⇑f b)
nonarchimedean_hom_class F α β
states that F
is a type of non-archimedean morphisms.
Instances of this typeclass
Instances of other typeclasses for nonarchimedean_hom_class
- nonarchimedean_hom_class.has_sizeof_inst
Group (semi)norms #
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective add_group_seminorm_class.coe
- map_add_le_add : ∀ (f : F) (a b : α), ⇑f (a + b) ≤ ⇑f a + ⇑f b
- map_zero : ∀ (f : F), ⇑f 0 = 0
- map_neg_eq_map : ∀ (f : F) (a : α), ⇑f (-a) = ⇑f a
add_group_seminorm_class F α
states that F
is a type of β
-valued seminorms on the additive
group α
.
You should extend this class when you extend add_group_seminorm
.
Instances of this typeclass
Instances of other typeclasses for add_group_seminorm_class
- add_group_seminorm_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective group_seminorm_class.coe
- map_mul_le_add : ∀ (f : F) (a b : α), ⇑f (a * b) ≤ ⇑f a + ⇑f b
- map_one_eq_zero : ∀ (f : F), ⇑f 1 = 0
- map_inv_eq_map : ∀ (f : F) (a : α), ⇑f a⁻¹ = ⇑f a
group_seminorm_class F α
states that F
is a type of β
-valued seminorms on the group α
.
You should extend this class when you extend group_seminorm
.
Instances of this typeclass
Instances of other typeclasses for group_seminorm_class
- group_seminorm_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective add_group_norm_class.coe
- map_add_le_add : ∀ (f : F) (a b : α), ⇑f (a + b) ≤ ⇑f a + ⇑f b
- map_zero : ∀ (f : F), ⇑f 0 = 0
- map_neg_eq_map : ∀ (f : F) (a : α), ⇑f (-a) = ⇑f a
- eq_zero_of_map_eq_zero : ∀ (f : F) {a : α}, ⇑f a = 0 → a = 0
add_group_norm_class F α
states that F
is a type of β
-valued norms on the additive group
α
.
You should extend this class when you extend add_group_norm
.
Instances of this typeclass
Instances of other typeclasses for add_group_norm_class
- add_group_norm_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective group_norm_class.coe
- map_mul_le_add : ∀ (f : F) (a b : α), ⇑f (a * b) ≤ ⇑f a + ⇑f b
- map_one_eq_zero : ∀ (f : F), ⇑f 1 = 0
- map_inv_eq_map : ∀ (f : F) (a : α), ⇑f a⁻¹ = ⇑f a
- eq_one_of_map_eq_zero : ∀ (f : F) {a : α}, ⇑f a = 0 → a = 1
group_norm_class F α
states that F
is a type of β
-valued norms on the group α
.
You should extend this class when you extend group_norm
.
Instances of this typeclass
Instances of other typeclasses for group_norm_class
- group_norm_class.has_sizeof_inst
Equations
- add_group_seminorm_class.to_zero_hom_class = {coe := add_group_seminorm_class.coe _inst_3, coe_injective' := _, map_zero := _}
Equations
- add_group_seminorm_class.to_nonneg_hom_class = {coe := add_group_seminorm_class.coe _inst_3, coe_injective' := _, map_nonneg := _}
Equations
- group_seminorm_class.to_nonneg_hom_class = {coe := group_seminorm_class.coe _inst_3, coe_injective' := _, map_nonneg := _}
Ring (semi)norms #
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective ring_seminorm_class.coe
- map_add_le_add : ∀ (f : F) (a b : α), ⇑f (a + b) ≤ ⇑f a + ⇑f b
- map_zero : ∀ (f : F), ⇑f 0 = 0
- map_neg_eq_map : ∀ (f : F) (a : α), ⇑f (-a) = ⇑f a
- map_mul_le_mul : ∀ (f : F) (a b : α), ⇑f (a * b) ≤ ⇑f a * ⇑f b
ring_seminorm_class F α
states that F
is a type of β
-valued seminorms on the ring α
.
You should extend this class when you extend ring_seminorm
.
Instances of this typeclass
Instances of other typeclasses for ring_seminorm_class
- ring_seminorm_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective ring_norm_class.coe
- map_add_le_add : ∀ (f : F) (a b : α), ⇑f (a + b) ≤ ⇑f a + ⇑f b
- map_zero : ∀ (f : F), ⇑f 0 = 0
- map_neg_eq_map : ∀ (f : F) (a : α), ⇑f (-a) = ⇑f a
- map_mul_le_mul : ∀ (f : F) (a b : α), ⇑f (a * b) ≤ ⇑f a * ⇑f b
- eq_zero_of_map_eq_zero : ∀ (f : F) {a : α}, ⇑f a = 0 → a = 0
ring_norm_class F α
states that F
is a type of β
-valued norms on the ring α
.
You should extend this class when you extend ring_norm
.
Instances of this typeclass
Instances of other typeclasses for ring_norm_class
- ring_norm_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective mul_ring_seminorm_class.coe
- map_add_le_add : ∀ (f : F) (a b : α), ⇑f (a + b) ≤ ⇑f a + ⇑f b
- map_zero : ∀ (f : F), ⇑f 0 = 0
- map_neg_eq_map : ∀ (f : F) (a : α), ⇑f (-a) = ⇑f a
- map_mul : ∀ (f : F) (x y : α), ⇑f (x * y) = ⇑f x * ⇑f y
- map_one : ∀ (f : F), ⇑f 1 = 1
mul_ring_seminorm_class F α
states that F
is a type of β
-valued multiplicative seminorms
on the ring α
.
You should extend this class when you extend mul_ring_seminorm
.
Instances of this typeclass
Instances of other typeclasses for mul_ring_seminorm_class
- mul_ring_seminorm_class.has_sizeof_inst
- coe : F → Π (a : α), (λ (_x : α), β) a
- coe_injective' : function.injective mul_ring_norm_class.coe
- map_add_le_add : ∀ (f : F) (a b : α), ⇑f (a + b) ≤ ⇑f a + ⇑f b
- map_zero : ∀ (f : F), ⇑f 0 = 0
- map_neg_eq_map : ∀ (f : F) (a : α), ⇑f (-a) = ⇑f a
- map_mul : ∀ (f : F) (x y : α), ⇑f (x * y) = ⇑f x * ⇑f y
- map_one : ∀ (f : F), ⇑f 1 = 1
- eq_zero_of_map_eq_zero : ∀ (f : F) {a : α}, ⇑f a = 0 → a = 0
mul_ring_norm_class F α
states that F
is a type of β
-valued multiplicative norms on the
ring α
.
You should extend this class when you extend mul_ring_norm
.
Instances of this typeclass
Instances of other typeclasses for mul_ring_norm_class
- mul_ring_norm_class.has_sizeof_inst
Equations
- mul_ring_seminorm_class.to_ring_seminorm_class = {coe := mul_ring_seminorm_class.coe _inst_3, coe_injective' := _, map_add_le_add := _, map_zero := _, map_neg_eq_map := _, map_mul_le_mul := _}
Equations
- mul_ring_norm_class.to_ring_norm_class = {coe := mul_ring_norm_class.coe _inst_3, coe_injective' := _, map_add_le_add := _, map_zero := _, map_neg_eq_map := _, map_mul_le_mul := _, eq_zero_of_map_eq_zero := _}