Built with doc-gen4, running Lean4. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓to navigate, Ctrl+πŸ–±οΈto focus. On Mac, use Cmdinstead of Ctrl.
/-
Copyright (c) 2021 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Anne Baanen

! This file was ported from Lean 3 source module algebra.order.absolute_value
! leanprover-community/mathlib commit fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Algebra.Order.Hom.Basic
import Mathlib.Algebra.Ring.Regular

/-!
# Absolute values

This file defines a bundled type of absolute values `AbsoluteValue R S`.

## Main definitions

 * `AbsoluteValue R S` is the type of absolute values on `R` mapping to `S`.
 * `AbsoluteValue.abs` is the "standard" absolute value on `S`, mapping negative `x` to `-x`.
 * `AbsoluteValue.toMonoidWithZeroHom`: absolute values mapping to a
   linear ordered field preserve `0`, `*` and `1`
 * `IsAbsoluteValue`: a type class stating that `f : Ξ² β†’ Ξ±` satisfies the axioms of an absolute
   value
-/


/-- `AbsoluteValue R S` is the type of absolute values on `R` mapping to `S`:
the maps that preserve `*`, are nonnegative, positive definite and satisfy the triangle equality. -/
structure 
AbsoluteValue: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ (toMulHom : R β†’β‚™* S) β†’ (βˆ€ (x : R), 0 ≀ MulHom.toFun toMulHom x) β†’ (βˆ€ (x : R), MulHom.toFun toMulHom x = 0 ↔ x = 0) β†’ (βˆ€ (x y : R), MulHom.toFun toMulHom (x + y) ≀ MulHom.toFun toMulHom x + MulHom.toFun toMulHom y) β†’ AbsoluteValue R S
AbsoluteValue
(
R: Type ?u.2
R
S: Type ?u.5
S
:
Type _: Type (?u.2+1)
Type _
) [
Semiring: Type ?u.8 β†’ Type ?u.8
Semiring
R: Type ?u.2
R
] [
OrderedSemiring: Type ?u.11 β†’ Type ?u.11
OrderedSemiring
S: Type ?u.5
S
] extends
R: Type ?u.2
R
β†’β‚™*
S: Type ?u.5
S
where /-- The absolute value is nonnegative -/
nonneg': βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x : R), 0 ≀ MulHom.toFun self.toMulHom x
nonneg'
: βˆ€
x: ?m.348
x
,
0: ?m.353
0
≀
toFun: R β†’ S
toFun
x: ?m.348
x
/-- The absolute value is positive definitive -/
eq_zero': βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x : R), MulHom.toFun self.toMulHom x = 0 ↔ x = 0
eq_zero'
: βˆ€
x: ?m.652
x
,
toFun: R β†’ S
toFun
x: ?m.652
x
=
0: ?m.657
0
↔
x: ?m.652
x
=
0: ?m.675
0
/-- The absolute value satisfies the triangle inequality -/
add_le': βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x y : R), MulHom.toFun self.toMulHom (x + y) ≀ MulHom.toFun self.toMulHom x + MulHom.toFun self.toMulHom y
add_le'
: βˆ€
x: ?m.851
x
y: ?m.854
y
,
toFun: R β†’ S
toFun
(
x: ?m.851
x
+
y: ?m.854
y
) ≀
toFun: R β†’ S
toFun
x: ?m.851
x
+
toFun: R β†’ S
toFun
y: ?m.854
y
#align absolute_value
AbsoluteValue: (R : Type u_1) β†’ (S : Type u_2) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (maxu_1u_2)
AbsoluteValue
namespace AbsoluteValue -- Porting note: Removing nolints. -- attribute [nolint doc_blame] AbsoluteValue.toMulHom section OrderedSemiring section Semiring variable {
R: Type ?u.15366
R
S: Type ?u.4874
S
:
Type _: Type (?u.14362+1)
Type _
} [
Semiring: Type ?u.3627 β†’ Type ?u.3627
Semiring
R: Type ?u.1954
R
] [
OrderedSemiring: Type ?u.7335 β†’ Type ?u.7335
OrderedSemiring
S: Type ?u.3624
S
] (
abv: AbsoluteValue R S
abv
:
AbsoluteValue: (R : Type ?u.1967) β†’ (S : Type ?u.1966) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.1967?u.1966)
AbsoluteValue
R: Type ?u.1954
R
S: Type ?u.1957
S
) instance
zeroHomClass: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ ZeroHomClass (AbsoluteValue R S) R S
zeroHomClass
:
ZeroHomClass: Type ?u.2022 β†’ (M : outParam (Type ?u.2021)) β†’ (N : outParam (Type ?u.2020)) β†’ [inst : Zero M] β†’ [inst : Zero N] β†’ Type (max(max?u.2022?u.2021)?u.2020)
ZeroHomClass
(
AbsoluteValue: (R : Type ?u.2024) β†’ (S : Type ?u.2023) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.2024?u.2023)
AbsoluteValue
R: Type ?u.1987
R
S: Type ?u.1990
S
)
R: Type ?u.1987
R
S: Type ?u.1990
S
where coe
f: ?m.2433
f
:=
f: ?m.2433
f
.
toFun: {M : Type ?u.2446} β†’ {N : Type ?u.2445} β†’ [inst : Mul M] β†’ [inst_1 : Mul N] β†’ (M β†’β‚™* N) β†’ M β†’ N
toFun
coe_injective'
f: ?m.2743
f
g: ?m.2746
g
h: ?m.2749
h
:=

Goals accomplished! πŸ™
R: Type ?u.1987

S: Type ?u.1990

inst✝¹: Semiring R

inst✝: OrderedSemiring S

abv, f, g: AbsoluteValue R S

h: (fun f => f.toFun) f = (fun f => f.toFun) g


f = g
R: Type ?u.1987

S: Type ?u.1990

inst✝¹: Semiring R

inst✝: OrderedSemiring S

abv, g: AbsoluteValue R S

toFun✝: R β†’ S

map_mul'✝: βˆ€ (x y : R), toFun✝ (x * y) = toFun✝ x * toFun✝ y

nonneg'✝: βˆ€ (x : R), 0 ≀ MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x

eq_zero'✝: βˆ€ (x : R), MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x = 0 ↔ x = 0

add_le'✝: βˆ€ (x y : R), MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } (x + y) ≀ MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x + MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } y

h: (fun f => f.toFun) { toMulHom := { toFun := toFun✝, map_mul' := map_mul'✝ }, nonneg' := nonneg'✝, eq_zero' := eq_zero'✝, add_le' := add_le'✝ } = (fun f => f.toFun) g


mk.mk
{ toMulHom := { toFun := toFun✝, map_mul' := map_mul'✝ }, nonneg' := nonneg'✝, eq_zero' := eq_zero'✝, add_le' := add_le'✝ } = g
R: Type ?u.1987

S: Type ?u.1990

inst✝¹: Semiring R

inst✝: OrderedSemiring S

abv, f, g: AbsoluteValue R S

h: (fun f => f.toFun) f = (fun f => f.toFun) g


f = g
R: Type ?u.1987

S: Type ?u.1990

inst✝¹: Semiring R

inst✝: OrderedSemiring S

abv: AbsoluteValue R S

toFun✝¹: R β†’ S

map_mul'✝¹: βˆ€ (x y : R), toFun✝¹ (x * y) = toFun✝¹ x * toFun✝¹ y

nonneg'✝¹: βˆ€ (x : R), 0 ≀ MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } x

eq_zero'✝¹: βˆ€ (x : R), MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } x = 0 ↔ x = 0

add_le'✝¹: βˆ€ (x y : R), MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } (x + y) ≀ MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } x + MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } y

toFun✝: R β†’ S

map_mul'✝: βˆ€ (x y : R), toFun✝ (x * y) = toFun✝ x * toFun✝ y

nonneg'✝: βˆ€ (x : R), 0 ≀ MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x

eq_zero'✝: βˆ€ (x : R), MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x = 0 ↔ x = 0

add_le'✝: βˆ€ (x y : R), MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } (x + y) ≀ MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x + MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } y

h: (fun f => f.toFun) { toMulHom := { toFun := toFun✝¹, map_mul' := map_mul'✝¹ }, nonneg' := nonneg'✝¹, eq_zero' := eq_zero'✝¹, add_le' := add_le'✝¹ } = (fun f => f.toFun) { toMulHom := { toFun := toFun✝, map_mul' := map_mul'✝ }, nonneg' := nonneg'✝, eq_zero' := eq_zero'✝, add_le' := add_le'✝ }


mk.mk.mk.mk
{ toMulHom := { toFun := toFun✝¹, map_mul' := map_mul'✝¹ }, nonneg' := nonneg'✝¹, eq_zero' := eq_zero'✝¹, add_le' := add_le'✝¹ } = { toMulHom := { toFun := toFun✝, map_mul' := map_mul'✝ }, nonneg' := nonneg'✝, eq_zero' := eq_zero'✝, add_le' := add_le'✝ }
R: Type ?u.1987

S: Type ?u.1990

inst✝¹: Semiring R

inst✝: OrderedSemiring S

abv, f, g: AbsoluteValue R S

h: (fun f => f.toFun) f = (fun f => f.toFun) g


f = g

Goals accomplished! πŸ™
map_zero
f: ?m.2762
f
:= (
f: ?m.2762
f
.
eq_zero': βˆ€ {R : Type ?u.2765} {S : Type ?u.2764} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x : R), MulHom.toFun self.toMulHom x = 0 ↔ x = 0
eq_zero'
_: ?m.2766
_
).
2: βˆ€ {a b : Prop}, (a ↔ b) β†’ b β†’ a
2
rfl: βˆ€ {Ξ± : Sort ?u.2784} {a : Ξ±}, a = a
rfl
#align absolute_value.zero_hom_class
AbsoluteValue.zeroHomClass: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ ZeroHomClass (AbsoluteValue R S) R S
AbsoluteValue.zeroHomClass
instance
mulHomClass: MulHomClass (AbsoluteValue R S) R S
mulHomClass
:
MulHomClass: Type ?u.3656 β†’ (M : outParam (Type ?u.3655)) β†’ (N : outParam (Type ?u.3654)) β†’ [inst : Mul M] β†’ [inst : Mul N] β†’ Type (max(max?u.3656?u.3655)?u.3654)
MulHomClass
(
AbsoluteValue: (R : Type ?u.3658) β†’ (S : Type ?u.3657) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.3658?u.3657)
AbsoluteValue
R: Type ?u.3621
R
S: Type ?u.3624
S
)
R: Type ?u.3621
R
S: Type ?u.3624
S
:= {
AbsoluteValue.zeroHomClass: {R : Type ?u.4001} β†’ {S : Type ?u.4000} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ ZeroHomClass (AbsoluteValue R S) R S
AbsoluteValue.zeroHomClass
with map_mul := fun
f: ?m.4709
f
=>
f: ?m.4709
f
.
map_mul': βˆ€ {M : Type ?u.4729} {N : Type ?u.4728} [inst : Mul M] [inst_1 : Mul N] (self : M β†’β‚™* N) (x y : M), MulHom.toFun self (x * y) = MulHom.toFun self x * MulHom.toFun self y
map_mul'
} #align absolute_value.mul_hom_class
AbsoluteValue.mulHomClass: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ MulHomClass (AbsoluteValue R S) R S
AbsoluteValue.mulHomClass
instance
nonnegHomClass: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ NonnegHomClass (AbsoluteValue R S) R S
nonnegHomClass
:
NonnegHomClass: Type ?u.4906 β†’ outParam (Type ?u.4905) β†’ (Ξ² : outParam (Type ?u.4904)) β†’ [inst : Zero Ξ²] β†’ [inst : LE Ξ²] β†’ Type (max(max?u.4906?u.4905)?u.4904)
NonnegHomClass
(
AbsoluteValue: (R : Type ?u.4908) β†’ (S : Type ?u.4907) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.4908?u.4907)
AbsoluteValue
R: Type ?u.4871
R
S: Type ?u.4874
S
)
R: Type ?u.4871
R
S: Type ?u.4874
S
:= {
AbsoluteValue.zeroHomClass: {R : Type ?u.5226} β†’ {S : Type ?u.5225} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ ZeroHomClass (AbsoluteValue R S) R S
AbsoluteValue.zeroHomClass
with map_nonneg := fun
f: ?m.5776
f
=>
f: ?m.5776
f
.
nonneg': βˆ€ {R : Type ?u.5779} {S : Type ?u.5778} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x : R), 0 ≀ MulHom.toFun self.toMulHom x
nonneg'
} #align absolute_value.nonneg_hom_class
AbsoluteValue.nonnegHomClass: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ NonnegHomClass (AbsoluteValue R S) R S
AbsoluteValue.nonnegHomClass
instance
subadditiveHomClass: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ SubadditiveHomClass (AbsoluteValue R S) R S
subadditiveHomClass
:
SubadditiveHomClass: Type ?u.5958 β†’ (Ξ± : outParam (Type ?u.5957)) β†’ (Ξ² : outParam (Type ?u.5956)) β†’ [inst : Add Ξ±] β†’ [inst : Add Ξ²] β†’ [inst : LE Ξ²] β†’ Type (max(max?u.5958?u.5957)?u.5956)
SubadditiveHomClass
(
AbsoluteValue: (R : Type ?u.5960) β†’ (S : Type ?u.5959) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.5960?u.5959)
AbsoluteValue
R: Type ?u.5923
R
S: Type ?u.5926
S
)
R: Type ?u.5923
R
S: Type ?u.5926
S
:= {
AbsoluteValue.zeroHomClass: {R : Type ?u.6389} β†’ {S : Type ?u.6388} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ ZeroHomClass (AbsoluteValue R S) R S
AbsoluteValue.zeroHomClass
with map_add_le_add := fun
f: ?m.7174
f
=>
f: ?m.7174
f
.
add_le': βˆ€ {R : Type ?u.7177} {S : Type ?u.7176} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x y : R), MulHom.toFun self.toMulHom (x + y) ≀ MulHom.toFun self.toMulHom x + MulHom.toFun self.toMulHom y
add_le'
} #align absolute_value.subadditive_hom_class
AbsoluteValue.subadditiveHomClass: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ SubadditiveHomClass (AbsoluteValue R S) R S
AbsoluteValue.subadditiveHomClass
@[simp] theorem
coe_mk: βˆ€ (f : R β†’β‚™* S) {h₁ : βˆ€ (x : R), 0 ≀ MulHom.toFun f x} {hβ‚‚ : βˆ€ (x : R), MulHom.toFun f x = 0 ↔ x = 0} {h₃ : βˆ€ (x y : R), MulHom.toFun f (x + y) ≀ MulHom.toFun f x + MulHom.toFun f y}, ↑{ toMulHom := f, nonneg' := h₁, eq_zero' := hβ‚‚, add_le' := h₃ } = ↑f
coe_mk
(f :
R: Type ?u.7326
R
β†’β‚™*
S: Type ?u.7329
S
) {
h₁: βˆ€ (x : R), 0 ≀ MulHom.toFun f x
h₁
hβ‚‚: ?m.7691
hβ‚‚
h₃: ?m.7694
h₃
} : (
AbsoluteValue.mk: {R : Type ?u.7702} β†’ {S : Type ?u.7701} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ (toMulHom : R β†’β‚™* S) β†’ (βˆ€ (x : R), 0 ≀ MulHom.toFun toMulHom x) β†’ (βˆ€ (x : R), MulHom.toFun toMulHom x = 0 ↔ x = 0) β†’ (βˆ€ (x y : R), MulHom.toFun toMulHom (x + y) ≀ MulHom.toFun toMulHom x + MulHom.toFun toMulHom y) β†’ AbsoluteValue R S
AbsoluteValue.mk
f
h₁: ?m.7688
h₁
hβ‚‚: ?m.7691
hβ‚‚
h₃: ?m.7694
h₃
:
R: Type ?u.7326
R
β†’
S: Type ?u.7329
S
) = f :=
rfl: βˆ€ {Ξ± : Sort ?u.10678} {a : Ξ±}, a = a
rfl
#align absolute_value.coe_mk
AbsoluteValue.coe_mk: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (f : R β†’β‚™* S) {h₁ : βˆ€ (x : R), 0 ≀ MulHom.toFun f x} {hβ‚‚ : βˆ€ (x : R), MulHom.toFun f x = 0 ↔ x = 0} {h₃ : βˆ€ (x y : R), MulHom.toFun f (x + y) ≀ MulHom.toFun f x + MulHom.toFun f y}, ↑{ toMulHom := f, nonneg' := h₁, eq_zero' := hβ‚‚, add_le' := h₃ } = ↑f
AbsoluteValue.coe_mk
@[ext] theorem
ext: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] ⦃f g : AbsoluteValue R S⦄, (βˆ€ (x : R), ↑f x = ↑g x) β†’ f = g
ext
⦃f g :
AbsoluteValue: (R : Type ?u.10781) β†’ (S : Type ?u.10780) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.10781?u.10780)
AbsoluteValue
R: Type ?u.10747
R
S: Type ?u.10750
S
⦄ : (βˆ€
x: ?m.10809
x
, f
x: ?m.10809
x
= g
x: ?m.10809
x
) β†’ f = g :=
FunLike.ext: βˆ€ {F : Sort ?u.11640} {Ξ± : Sort ?u.11641} {Ξ² : Ξ± β†’ Sort ?u.11639} [i : FunLike F Ξ± Ξ²] (f g : F), (βˆ€ (x : Ξ±), ↑f x = ↑g x) β†’ f = g
FunLike.ext
_: ?m.11642
_
_: ?m.11642
_
#align absolute_value.ext
AbsoluteValue.ext: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] ⦃f g : AbsoluteValue R S⦄, (βˆ€ (x : R), ↑f x = ↑g x) β†’ f = g
AbsoluteValue.ext
/-- See Note [custom simps projection]. -/ def
Simps.apply: AbsoluteValue R S β†’ R β†’ S
Simps.apply
(f :
AbsoluteValue: (R : Type ?u.12111) β†’ (S : Type ?u.12110) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.12111?u.12110)
AbsoluteValue
R: Type ?u.12077
R
S: Type ?u.12080
S
) :
R: Type ?u.12077
R
β†’
S: Type ?u.12080
S
:= f #align absolute_value.simps.apply
AbsoluteValue.Simps.apply: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ AbsoluteValue R S β†’ R β†’ S
AbsoluteValue.Simps.apply
initialize_simps_projections
AbsoluteValue: (R : Type u_1) β†’ (S : Type u_2) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (maxu_1u_2)
AbsoluteValue
(
toFun: (R : Type u_1) β†’ (S : Type u_2) β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ AbsoluteValue R S β†’ R β†’ S
toFun
β†’
apply: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ AbsoluteValue R S β†’ R β†’ S
apply
) -- Porting note: -- These helper instances are unhelpful in Lean 4, so omitting: -- /-- Helper instance for when there's too many metavariables to apply `fun_like.has_coe_to_fun` -- directly. -/ -- instance : CoeFun (AbsoluteValue R S) fun f => R β†’ S := -- FunLike.hasCoeToFun @[simp] theorem
coe_toMulHom: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S), abv.toMulHom = ↑abv
coe_toMulHom
:
abv: AbsoluteValue R S
abv
.
toMulHom: {R : Type ?u.13173} β†’ {S : Type ?u.13172} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ AbsoluteValue R S β†’ R β†’β‚™* S
toMulHom
=
abv: AbsoluteValue R S
abv
:=
rfl: βˆ€ {Ξ± : Sort ?u.13420} {a : Ξ±}, a = a
rfl
#align absolute_value.coe_to_mul_hom
AbsoluteValue.coe_toMulHom: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S), abv.toMulHom = ↑abv
AbsoluteValue.coe_toMulHom
protected theorem
nonneg: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x : R), 0 ≀ ↑abv x
nonneg
(
x: R
x
:
R: Type ?u.13446
R
) :
0: ?m.13483
0
≀
abv: AbsoluteValue R S
abv
x: R
x
:=
abv: AbsoluteValue R S
abv
.
nonneg': βˆ€ {R : Type ?u.14324} {S : Type ?u.14323} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x : R), 0 ≀ MulHom.toFun self.toMulHom x
nonneg'
x: R
x
#align absolute_value.nonneg
AbsoluteValue.nonneg: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x : R), 0 ≀ ↑abv x
AbsoluteValue.nonneg
@[simp] protected theorem
eq_zero: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x = 0 ↔ x = 0
eq_zero
{
x: R
x
:
R: Type ?u.14359
R
} :
abv: AbsoluteValue R S
abv
x: R
x
=
0: ?m.14822
0
↔
x: R
x
=
0: ?m.15103
0
:=
abv: AbsoluteValue R S
abv
.
eq_zero': βˆ€ {R : Type ?u.15290} {S : Type ?u.15289} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x : R), MulHom.toFun self.toMulHom x = 0 ↔ x = 0
eq_zero'
x: R
x
#align absolute_value.eq_zero
AbsoluteValue.eq_zero: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x = 0 ↔ x = 0
AbsoluteValue.eq_zero
protected theorem
add_le: βˆ€ (x y : R), ↑abv (x + y) ≀ ↑abv x + ↑abv y
add_le
(
x: R
x
y: R
y
:
R: Type ?u.15366
R
) :
abv: AbsoluteValue R S
abv
(
x: R
x
+
y: R
y
) ≀
abv: AbsoluteValue R S
abv
x: R
x
+
abv: AbsoluteValue R S
abv
y: R
y
:=
abv: AbsoluteValue R S
abv
.
add_le': βˆ€ {R : Type ?u.17450} {S : Type ?u.17449} [inst : Semiring R] [inst_1 : OrderedSemiring S] (self : AbsoluteValue R S) (x y : R), MulHom.toFun self.toMulHom (x + y) ≀ MulHom.toFun self.toMulHom x + MulHom.toFun self.toMulHom y
add_le'
x: R
x
y: R
y
#align absolute_value.add_le
AbsoluteValue.add_le: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x y : R), ↑abv (x + y) ≀ ↑abv x + ↑abv y
AbsoluteValue.add_le
-- Porting note: Removed since `map_mul` proves the theorem --@[simp] --protected theorem map_mul (x y : R) : abv (x * y) = abv x * abv y := map_mul _ _ _ --abv.map_mul' x y #align absolute_value.map_mul
map_mul: βˆ€ {M : Type u_2} {N : Type u_3} {F : Type u_1} [inst : Mul M] [inst_1 : Mul N] [inst_2 : MulHomClass F M N] (f : F) (x y : M), ↑f (x * y) = ↑f x * ↑f y
map_mul
protected theorem
ne_zero_iff: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x β‰  0 ↔ x β‰  0
ne_zero_iff
{
x: R
x
:
R: Type ?u.17490
R
} :
abv: AbsoluteValue R S
abv
x: R
x
β‰ 
0: ?m.17955
0
↔
x: R
x
β‰ 
0: ?m.18222
0
:=
abv: AbsoluteValue R S
abv
.
eq_zero: βˆ€ {R : Type ?u.18395} {S : Type ?u.18394} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x = 0 ↔ x = 0
eq_zero
.
not: βˆ€ {a b : Prop}, (a ↔ b) β†’ (Β¬a ↔ Β¬b)
not
#align absolute_value.ne_zero_iff
AbsoluteValue.ne_zero_iff: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x β‰  0 ↔ x β‰  0
AbsoluteValue.ne_zero_iff
protected theorem
pos: βˆ€ {x : R}, x β‰  0 β†’ 0 < ↑abv x
pos
{
x: R
x
:
R: Type ?u.18448
R
} (
hx: x β‰  0
hx
:
x: R
x
β‰ 
0: ?m.18486
0
) :
0: ?m.18662
0
<
abv: AbsoluteValue R S
abv
x: R
x
:=
lt_of_le_of_ne: βˆ€ {Ξ± : Type ?u.19503} [inst : PartialOrder Ξ±] {a b : Ξ±}, a ≀ b β†’ a β‰  b β†’ a < b
lt_of_le_of_ne
(
abv: AbsoluteValue R S
abv
.
nonneg: βˆ€ {R : Type ?u.19676} {S : Type ?u.19675} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x : R), 0 ≀ ↑abv x
nonneg
x: R
x
) (
Ne.symm: βˆ€ {Ξ± : Sort ?u.19704} {a b : Ξ±}, a β‰  b β†’ b β‰  a
Ne.symm
<|
mt: βˆ€ {a b : Prop}, (a β†’ b) β†’ Β¬b β†’ Β¬a
mt
abv: AbsoluteValue R S
abv
.
eq_zero: βˆ€ {R : Type ?u.19718} {S : Type ?u.19717} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x = 0 ↔ x = 0
eq_zero
.
mp: βˆ€ {a b : Prop}, (a ↔ b) β†’ a β†’ b
mp
hx: x β‰  0
hx
) #align absolute_value.pos
AbsoluteValue.pos: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, x β‰  0 β†’ 0 < ↑abv x
AbsoluteValue.pos
@[simp] protected theorem
pos_iff: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, 0 < ↑abv x ↔ x β‰  0
pos_iff
{
x: R
x
:
R: Type ?u.19755
R
} :
0: ?m.19792
0
<
abv: AbsoluteValue R S
abv
x: R
x
↔
x: R
x
β‰ 
0: ?m.20633
0
:= ⟨fun
h₁: ?m.20814
h₁
=>
mt: βˆ€ {a b : Prop}, (a β†’ b) β†’ Β¬b β†’ Β¬a
mt
abv: AbsoluteValue R S
abv
.
eq_zero: βˆ€ {R : Type ?u.20821} {S : Type ?u.20820} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x = 0 ↔ x = 0
eq_zero
.
mpr: βˆ€ {a b : Prop}, (a ↔ b) β†’ b β†’ a
mpr
h₁: ?m.20814
h₁
.
ne': βˆ€ {Ξ± : Type ?u.20854} [inst : Preorder Ξ±] {x y : Ξ±}, x < y β†’ y β‰  x
ne'
,
abv: AbsoluteValue R S
abv
.
pos: βˆ€ {R : Type ?u.21009} {S : Type ?u.21010} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, x β‰  0 β†’ 0 < ↑abv x
pos
⟩ #align absolute_value.pos_iff
AbsoluteValue.pos_iff: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, 0 < ↑abv x ↔ x β‰  0
AbsoluteValue.pos_iff
protected theorem
ne_zero: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, x β‰  0 β†’ ↑abv x β‰  0
ne_zero
{
x: R
x
:
R: Type ?u.21080
R
} (
hx: x β‰  0
hx
:
x: R
x
β‰ 
0: ?m.21118
0
) :
abv: AbsoluteValue R S
abv
x: R
x
β‰ 
0: ?m.21720
0
:= (
abv: AbsoluteValue R S
abv
.
pos: βˆ€ {R : Type ?u.21989} {S : Type ?u.21990} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, x β‰  0 β†’ 0 < ↑abv x
pos
hx: x β‰  0
hx
).
ne': βˆ€ {Ξ± : Type ?u.22026} [inst : Preorder Ξ±] {x y : Ξ±}, x < y β†’ y β‰  x
ne'
#align absolute_value.ne_zero
AbsoluteValue.ne_zero: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, x β‰  0 β†’ ↑abv x β‰  0
AbsoluteValue.ne_zero
theorem
map_one_of_isLeftRegular: IsLeftRegular (↑abv 1) β†’ ↑abv 1 = 1
map_one_of_isLeftRegular
(
h: IsLeftRegular (↑abv 1)
h
:
IsLeftRegular: {R : Type ?u.22224} β†’ [inst : Mul R] β†’ R β†’ Prop
IsLeftRegular
(
abv: AbsoluteValue R S
abv
1: ?m.22677
1
)) :
abv: AbsoluteValue R S
abv
1: ?m.23343
1
=
1: ?m.23346
1
:=
h: IsLeftRegular (↑abv 1)
h
<|

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝¹: Semiring R

inst✝: OrderedSemiring S

abv: AbsoluteValue R S

h: IsLeftRegular (↑abv 1)


(fun x => ↑abv 1 * x) (↑abv 1) = (fun x => ↑abv 1 * x) 1

Goals accomplished! πŸ™
#align absolute_value.map_one_of_is_regular
AbsoluteValue.map_one_of_isLeftRegular: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S), IsLeftRegular (↑abv 1) β†’ ↑abv 1 = 1
AbsoluteValue.map_one_of_isLeftRegular
-- Porting note: Removed since `map_zero` proves the theorem --@[simp] --protected theorem map_zero : abv 0 = 0 := map_zero _ --abv.eq_zero.2 rfl #align absolute_value.map_zero
map_zero: βˆ€ {M : Type u_2} {N : Type u_3} {F : Type u_1} [inst : Zero M] [inst_1 : Zero N] [inst_2 : ZeroHomClass F M N] (f : F), ↑f 0 = 0
map_zero
end Semiring section Ring variable {
R: Type ?u.27031
R
S: Type ?u.27236
S
:
Type _: Type (?u.27236+1)
Type _
} [
Ring: Type ?u.27037 β†’ Type ?u.27037
Ring
R: Type ?u.27233
R
] [
OrderedSemiring: Type ?u.27242 β†’ Type ?u.27242
OrderedSemiring
S: Type ?u.27236
S
] (
abv: AbsoluteValue R S
abv
:
AbsoluteValue: (R : Type ?u.27044) β†’ (S : Type ?u.27043) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.27044?u.27043)
AbsoluteValue
R: Type ?u.27233
R
S: Type ?u.38789
S
) protected theorem
sub_le: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (a b c : R), ↑abv (a - c) ≀ ↑abv (a - b) + ↑abv (b - c)
sub_le
(
a: R
a
b: R
b
c: R
c
:
R: Type ?u.27233
R
) :
abv: AbsoluteValue R S
abv
(
a: R
a
-
c: R
c
) ≀
abv: AbsoluteValue R S
abv
(
a: R
a
-
b: R
b
) +
abv: AbsoluteValue R S
abv
(
b: R
b
-
c: R
c
) :=

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝¹: Ring R

inst✝: OrderedSemiring S

abv: AbsoluteValue R S

a, b, c: R


↑abv (a - c) ≀ ↑abv (a - b) + ↑abv (b - c)

Goals accomplished! πŸ™
#align absolute_value.sub_le
AbsoluteValue.sub_le: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (a b c : R), ↑abv (a - c) ≀ ↑abv (a - b) + ↑abv (b - c)
AbsoluteValue.sub_le
@[simp (high)] theorem
map_sub_eq_zero_iff: βˆ€ (a b : R), ↑abv (a - b) = 0 ↔ a = b
map_sub_eq_zero_iff
(
a: R
a
b: R
b
:
R: Type ?u.38786
R
) :
abv: AbsoluteValue R S
abv
(
a: R
a
-
b: R
b
) =
0: ?m.39480
0
↔
a: R
a
=
b: R
b
:=
abv: AbsoluteValue R S
abv
.
eq_zero: βˆ€ {R : Type ?u.39765} {S : Type ?u.39764} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x = 0 ↔ x = 0
eq_zero
.
trans: βˆ€ {a b c : Prop}, (a ↔ b) β†’ (b ↔ c) β†’ (a ↔ c)
trans
sub_eq_zero: βˆ€ {G : Type ?u.39980} [inst : AddGroup G] {a b : G}, a - b = 0 ↔ a = b
sub_eq_zero
#align absolute_value.map_sub_eq_zero_iff
AbsoluteValue.map_sub_eq_zero_iff: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (a b : R), ↑abv (a - b) = 0 ↔ a = b
AbsoluteValue.map_sub_eq_zero_iff
end Ring end OrderedSemiring section OrderedRing section Semiring section IsDomain -- all of these are true for `NoZeroDivisors S`; but it doesn't work smoothly with the -- `IsDomain`/`CancelMonoidWithZero` API variable {
R: Type ?u.40085
R
S: Type ?u.40211
S
:
Type _: Type (?u.40419+1)
Type _
} [
Semiring: Type ?u.44594 β†’ Type ?u.44594
Semiring
R: Type ?u.40085
R
] [
OrderedRing: Type ?u.48083 β†’ Type ?u.48083
OrderedRing
S: Type ?u.40088
S
] (
abv: AbsoluteValue R S
abv
:
AbsoluteValue: (R : Type ?u.40432) β†’ (S : Type ?u.40431) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.40432?u.40431)
AbsoluteValue
R: Type ?u.40208
R
S: Type ?u.40088
S
) variable [
IsDomain: (Ξ± : Type ?u.44711) β†’ [inst : Semiring Ξ±] β†’ Prop
IsDomain
S: Type ?u.40422
S
] [
Nontrivial: Type ?u.42516 β†’ Prop
Nontrivial
R: Type ?u.42308
R
] @[simp (high)] protected theorem
map_one: ↑abv 1 = 1
map_one
:
abv: AbsoluteValue R S
abv
1: ?m.41058
1
=
1: ?m.41095
1
:=
abv: AbsoluteValue R S
abv
.
map_one_of_isLeftRegular: βˆ€ {R : Type ?u.41280} {S : Type ?u.41279} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S), IsLeftRegular (↑abv 1) β†’ ↑abv 1 = 1
map_one_of_isLeftRegular
(
isRegular_of_ne_zero: βˆ€ {R : Type ?u.41403} [inst : CancelMonoidWithZero R] {a : R}, a β‰  0 β†’ IsRegular a
isRegular_of_ne_zero
<|
abv: AbsoluteValue R S
abv
.
ne_zero: βˆ€ {R : Type ?u.41407} {S : Type ?u.41408} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, x β‰  0 β†’ ↑abv x β‰  0
ne_zero
one_ne_zero: βˆ€ {Ξ± : Type ?u.41581} [inst : Zero Ξ±] [inst_1 : One Ξ±] [inst_2 : NeZero 1], 1 β‰  0
one_ne_zero
).
left: βˆ€ {R : Type ?u.42189} [inst : Mul R] {c : R}, IsRegular c β†’ IsLeftRegular c
left
#align absolute_value.map_one
AbsoluteValue.map_one: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) [inst_2 : IsDomain S] [inst_3 : Nontrivial R], ↑abv 1 = 1
AbsoluteValue.map_one
instance: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedRing S] β†’ [inst_2 : IsDomain S] β†’ [inst_3 : Nontrivial R] β†’ MonoidWithZeroHomClass (AbsoluteValue R S) R S
instance
:
MonoidWithZeroHomClass: Type ?u.42521 β†’ (M : outParam (Type ?u.42520)) β†’ (N : outParam (Type ?u.42519)) β†’ [inst : MulZeroOneClass M] β†’ [inst : MulZeroOneClass N] β†’ Type (max(max?u.42521?u.42520)?u.42519)
MonoidWithZeroHomClass
(
AbsoluteValue: (R : Type ?u.42523) β†’ (S : Type ?u.42522) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.42523?u.42522)
AbsoluteValue
R: Type ?u.42308
R
S: Type ?u.42311
S
)
R: Type ?u.42308
R
S: Type ?u.42311
S
:= {
AbsoluteValue.mulHomClass: {R : Type ?u.42750} β†’ {S : Type ?u.42749} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedSemiring S] β†’ MulHomClass (AbsoluteValue R S) R S
AbsoluteValue.mulHomClass
with map_zero := fun
f: ?m.43396
f
=>
map_zero: βˆ€ {M : Type ?u.43399} {N : Type ?u.43400} {F : Type ?u.43398} [inst : Zero M] [inst_1 : Zero N] [inst_2 : ZeroHomClass F M N] (f : F), ↑f 0 = 0
map_zero
f: ?m.43396
f
, map_one := fun
f: ?m.43339
f
=>
f: ?m.43339
f
.
map_one: βˆ€ {R : Type ?u.43342} {S : Type ?u.43341} [inst : Semiring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) [inst_2 : IsDomain S] [inst_3 : Nontrivial R], ↑abv 1 = 1
map_one
} /-- Absolute values from a nontrivial `R` to a linear ordered ring preserve `*`, `0` and `1`. -/ def
toMonoidWithZeroHom: R β†’*β‚€ S
toMonoidWithZeroHom
:
R: Type ?u.44008
R
β†’*β‚€
S: Type ?u.44011
S
:=
abv: AbsoluteValue R S
abv
#align absolute_value.to_monoid_with_zero_hom
AbsoluteValue.toMonoidWithZeroHom: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedRing S] β†’ AbsoluteValue R S β†’ [inst_2 : IsDomain S] β†’ [inst_3 : Nontrivial R] β†’ R β†’*β‚€ S
AbsoluteValue.toMonoidWithZeroHom
@[simp] theorem
coe_toMonoidWithZeroHom: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) [inst_2 : IsDomain S] [inst_3 : Nontrivial R], ↑(toMonoidWithZeroHom abv) = ↑abv
coe_toMonoidWithZeroHom
: ⇑
abv: AbsoluteValue R S
abv
.
toMonoidWithZeroHom: {R : Type ?u.44801} β†’ {S : Type ?u.44800} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedRing S] β†’ AbsoluteValue R S β†’ [inst_2 : IsDomain S] β†’ [inst_3 : Nontrivial R] β†’ R β†’*β‚€ S
toMonoidWithZeroHom
=
abv: AbsoluteValue R S
abv
:=
rfl: βˆ€ {Ξ± : Sort ?u.47283} {a : Ξ±}, a = a
rfl
#align absolute_value.coe_to_monoid_with_zero_hom
AbsoluteValue.coe_toMonoidWithZeroHom: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) [inst_2 : IsDomain S] [inst_3 : Nontrivial R], ↑(toMonoidWithZeroHom abv) = ↑abv
AbsoluteValue.coe_toMonoidWithZeroHom
/-- Absolute values from a nontrivial `R` to a linear ordered ring preserve `*` and `1`. -/ def
toMonoidHom: R β†’* S
toMonoidHom
:
R: Type ?u.47334
R
β†’*
S: Type ?u.47337
S
:=
abv: AbsoluteValue R S
abv
#align absolute_value.to_monoid_hom
AbsoluteValue.toMonoidHom: {R : Type u_1} β†’ {S : Type u_2} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedRing S] β†’ AbsoluteValue R S β†’ [inst_2 : IsDomain S] β†’ [inst_3 : Nontrivial R] β†’ R β†’* S
AbsoluteValue.toMonoidHom
@[simp] theorem
coe_toMonoidHom: ↑(toMonoidHom abv) = ↑abv
coe_toMonoidHom
: ⇑
abv: AbsoluteValue R S
abv
.
toMonoidHom: {R : Type ?u.48287} β†’ {S : Type ?u.48286} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedRing S] β†’ AbsoluteValue R S β†’ [inst_2 : IsDomain S] β†’ [inst_3 : Nontrivial R] β†’ R β†’* S
toMonoidHom
=
abv: AbsoluteValue R S
abv
:=
rfl: βˆ€ {Ξ± : Sort ?u.50674} {a : Ξ±}, a = a
rfl
#align absolute_value.coe_to_monoid_hom
AbsoluteValue.coe_toMonoidHom: βˆ€ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) [inst_2 : IsDomain S] [inst_3 : Nontrivial R], ↑(toMonoidHom abv) = ↑abv
AbsoluteValue.coe_toMonoidHom
-- Porting note: Removed since `map_zero` proves the theorem --@[simp] --protected theorem map_pow (a : R) (n : β„•) : abv (a ^ n) = abv a ^ n := map_pow _ _ _ --abv.toMonoidHom.map_pow a n #align absolute_value.map_pow
map_pow: βˆ€ {G : Type u_1} {H : Type u_2} {F : Type u_3} [inst : Monoid G] [inst_1 : Monoid H] [inst_2 : MonoidHomClass F G H] (f : F) (a : G) (n : β„•), ↑f (a ^ n) = ↑f a ^ n
map_pow
end IsDomain end Semiring section Ring variable {
R: Type ?u.51017
R
S: Type ?u.51020
S
:
Type _: Type (?u.51020+1)
Type _
} [
Ring: Type ?u.50731 β†’ Type ?u.50731
Ring
R: Type ?u.50725
R
] [
OrderedRing: Type ?u.50734 β†’ Type ?u.50734
OrderedRing
S: Type ?u.51020
S
] (
abv: AbsoluteValue R S
abv
:
AbsoluteValue: (R : Type ?u.50738) β†’ (S : Type ?u.50737) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.50738?u.50737)
AbsoluteValue
R: Type ?u.50725
R
S: Type ?u.50728
S
) protected theorem
le_sub: βˆ€ (a b : R), ↑abv a - ↑abv b ≀ ↑abv (a - b)
le_sub
(
a: R
a
b: R
b
:
R: Type ?u.51017
R
) :
abv: AbsoluteValue R S
abv
a: R
a
-
abv: AbsoluteValue R S
abv
b: R
b
≀
abv: AbsoluteValue R S
abv
(
a: R
a
-
b: R
b
) :=
sub_le_iff_le_add: βˆ€ {Ξ± : Type ?u.52859} [inst : AddGroup Ξ±] [inst_1 : LE Ξ±] [inst_2 : CovariantClass Ξ± Ξ± (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1] {a b c : Ξ±}, a - c ≀ b ↔ a ≀ b + c
sub_le_iff_le_add
.
2: βˆ€ {a b : Prop}, (a ↔ b) β†’ b β†’ a
2
<|

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝¹: Ring R

inst✝: OrderedRing S

abv: AbsoluteValue R S

a, b: R


↑abv a ≀ ↑abv (a - b) + ↑abv b

Goals accomplished! πŸ™
#align absolute_value.le_sub
AbsoluteValue.le_sub: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) (a b : R), ↑abv a - ↑abv b ≀ ↑abv (a - b)
AbsoluteValue.le_sub
end Ring end OrderedRing section OrderedCommRing variable {
R: Type ?u.57154
R
S: Type ?u.56663
S
:
Type _: Type (?u.57157+1)
Type _
} [
Ring: Type ?u.57160 β†’ Type ?u.57160
Ring
R: Type ?u.56410
R
] [
OrderedCommRing: Type ?u.57163 β†’ Type ?u.57163
OrderedCommRing
S: Type ?u.56413
S
] (
abv: AbsoluteValue R S
abv
:
AbsoluteValue: (R : Type ?u.56423) β†’ (S : Type ?u.56422) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.56423?u.56422)
AbsoluteValue
R: Type ?u.56410
R
S: Type ?u.56413
S
) variable [
NoZeroDivisors: (Mβ‚€ : Type ?u.57404) β†’ [inst : Mul Mβ‚€] β†’ [inst : Zero Mβ‚€] β†’ Prop
NoZeroDivisors
S: Type ?u.56663
S
] @[simp] protected theorem
map_neg: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : OrderedCommRing S] (abv : AbsoluteValue R S) [inst_2 : NoZeroDivisors S] (a : R), ↑abv (-a) = ↑abv a
map_neg
(
a: R
a
:
R: Type ?u.57154
R
) :
abv: AbsoluteValue R S
abv
(-
a: R
a
) =
abv: AbsoluteValue R S
abv
a: R
a
:=

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R


↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: a = 0


pos
↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


neg
↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: a = 0


pos
↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


neg
↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R


↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: a = 0


pos
↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: a = 0


pos
↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


neg
↑abv (-a) = ↑abv a

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R


↑abv (-a) = ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


neg
↑abv (-a) = ↑abv a

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


↑abv (-a) * ↑abv (-a) = ↑abv a * ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


↑abv (-a) * ↑abv (-a) = ↑abv a * ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


↑abv (-a * -a) = ↑abv a * ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


↑abv (-a) * ↑abv (-a) = ↑abv a * ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


↑abv (a * a) = ↑abv a * ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


↑abv (-a) * ↑abv (-a) = ↑abv a * ↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


↑abv a * ↑abv a = ↑abv a * ↑abv a

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R

ha: Β¬a = 0


neg
¬↑abv (-a) = -↑abv a
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a: R


↑abv (-a) = ↑abv a

Goals accomplished! πŸ™
#align absolute_value.map_neg
AbsoluteValue.map_neg: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : OrderedCommRing S] (abv : AbsoluteValue R S) [inst_2 : NoZeroDivisors S] (a : R), ↑abv (-a) = ↑abv a
AbsoluteValue.map_neg
protected theorem
map_sub: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : OrderedCommRing S] (abv : AbsoluteValue R S) [inst_2 : NoZeroDivisors S] (a b : R), ↑abv (a - b) = ↑abv (b - a)
map_sub
(
a: R
a
b: R
b
:
R: Type ?u.61436
R
) :
abv: AbsoluteValue R S
abv
(
a: R
a
-
b: R
b
) =
abv: AbsoluteValue R S
abv
(
b: R
b
-
a: R
a
) :=

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a, b: R


↑abv (a - b) = ↑abv (b - a)
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a, b: R


↑abv (a - b) = ↑abv (b - a)
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a, b: R


↑abv (-(b - a)) = ↑abv (b - a)
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a, b: R


↑abv (a - b) = ↑abv (b - a)
R: Type u_2

S: Type u_1

inst✝²: Ring R

inst✝¹: OrderedCommRing S

abv: AbsoluteValue R S

inst✝: NoZeroDivisors S

a, b: R


↑abv (b - a) = ↑abv (b - a)

Goals accomplished! πŸ™
#align absolute_value.map_sub
AbsoluteValue.map_sub: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : OrderedCommRing S] (abv : AbsoluteValue R S) [inst_2 : NoZeroDivisors S] (a b : R), ↑abv (a - b) = ↑abv (b - a)
AbsoluteValue.map_sub
end OrderedCommRing section LinearOrderedRing variable {
R: Type ?u.63068
R
S: Type ?u.63071
S
:
Type _: Type (?u.64298+1)
Type _
} [
Semiring: Type ?u.63177 β†’ Type ?u.63177
Semiring
R: Type ?u.63068
R
] [
LinearOrderedRing: Type ?u.63180 β†’ Type ?u.63180
LinearOrderedRing
S: Type ?u.63174
S
] (
abv: AbsoluteValue R S
abv
:
AbsoluteValue: (R : Type ?u.63184) β†’ (S : Type ?u.63183) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.63184?u.63183)
AbsoluteValue
R: Type ?u.63068
R
S: Type ?u.63174
S
) /-- `AbsoluteValue.abs` is `abs` as a bundled `AbsoluteValue`. -/ @[
simps: βˆ€ {S : Type u_1} [inst : LinearOrderedRing S] (a : S), ↑AbsoluteValue.abs a = abs a
simps
] protected def
abs: AbsoluteValue S S
abs
:
AbsoluteValue: (R : Type ?u.63275) β†’ (S : Type ?u.63274) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.63275?u.63274)
AbsoluteValue
S: Type ?u.63174
S
S: Type ?u.63174
S
where toFun :=
abs: {Ξ± : Type ?u.63450} β†’ [self : Abs Ξ±] β†’ Ξ± β†’ Ξ±
abs
nonneg' :=
abs_nonneg: βˆ€ {Ξ± : Type ?u.63647} [inst : AddGroup Ξ±] [inst_1 : LinearOrder Ξ±] [inst_2 : CovariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1] (a : Ξ±), 0 ≀ abs a
abs_nonneg
eq_zero'
_: ?m.63849
_
:=
abs_eq_zero: βˆ€ {Ξ± : Type ?u.63851} [inst : AddGroup Ξ±] [inst_1 : LinearOrder Ξ±] [inst_2 : CovariantClass Ξ± Ξ± (fun x x_1 => x + x_1) fun x x_1 => x ≀ x_1] {a : Ξ±}, abs a = 0 ↔ a = 0
abs_eq_zero
add_le' :=
abs_add: βˆ€ {Ξ± : Type ?u.63921} [inst : LinearOrderedAddCommGroup Ξ±] (a b : Ξ±), abs (a + b) ≀ abs a + abs b
abs_add
map_mul' :=
abs_mul: βˆ€ {Ξ± : Type ?u.63603} [inst : LinearOrderedRing Ξ±] (a b : Ξ±), abs (a * b) = abs a * abs b
abs_mul
#align absolute_value.abs
AbsoluteValue.abs: {S : Type u_1} β†’ [inst : LinearOrderedRing S] β†’ AbsoluteValue S S
AbsoluteValue.abs
#align absolute_value.abs_apply
AbsoluteValue.abs_apply: βˆ€ {S : Type u_1} [inst : LinearOrderedRing S] (a : S), ↑AbsoluteValue.abs a = abs a
AbsoluteValue.abs_apply
#align absolute_value.abs_to_mul_hom_apply
AbsoluteValue.abs_apply: βˆ€ {S : Type u_1} [inst : LinearOrderedRing S] (a : S), ↑AbsoluteValue.abs a = abs a
AbsoluteValue.abs_apply
instance: {S : Type u_1} β†’ [inst : LinearOrderedRing S] β†’ Inhabited (AbsoluteValue S S)
instance
:
Inhabited: Sort ?u.64398 β†’ Sort (max1?u.64398)
Inhabited
(
AbsoluteValue: (R : Type ?u.64400) β†’ (S : Type ?u.64399) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.64400?u.64399)
AbsoluteValue
S: Type ?u.64298
S
S: Type ?u.64298
S
) := ⟨
AbsoluteValue.abs: {S : Type ?u.64520} β†’ [inst : LinearOrderedRing S] β†’ AbsoluteValue S S
AbsoluteValue.abs
⟩ end LinearOrderedRing section LinearOrderedCommRing variable {
R: Type ?u.64581
R
S: Type ?u.64820
S
:
Type _: Type (?u.64820+1)
Type _
} [
Ring: Type ?u.64823 β†’ Type ?u.64823
Ring
R: Type ?u.64581
R
] [
LinearOrderedCommRing: Type ?u.64590 β†’ Type ?u.64590
LinearOrderedCommRing
S: Type ?u.64584
S
] (
abv: AbsoluteValue R S
abv
:
AbsoluteValue: (R : Type ?u.64594) β†’ (S : Type ?u.64593) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.64594?u.64593)
AbsoluteValue
R: Type ?u.64581
R
S: Type ?u.64584
S
) theorem
abs_abv_sub_le_abv_sub: βˆ€ (a b : R), abs (↑abv a - ↑abv b) ≀ ↑abv (a - b)
abs_abv_sub_le_abv_sub
(
a: R
a
b: R
b
:
R: Type ?u.64817
R
) :
abs: {Ξ± : Type ?u.65058} β†’ [self : Abs Ξ±] β†’ Ξ± β†’ Ξ±
abs
(
abv: AbsoluteValue R S
abv
a: R
a
-
abv: AbsoluteValue R S
abv
b: R
b
) ≀
abv: AbsoluteValue R S
abv
(
a: R
a
-
b: R
b
) :=
abs_sub_le_iff: βˆ€ {Ξ± : Type ?u.66670} [inst : LinearOrderedAddCommGroup Ξ±] {a b c : Ξ±}, abs (a - b) ≀ c ↔ a - b ≀ c ∧ b - a ≀ c
abs_sub_le_iff
.
2: βˆ€ {a b : Prop}, (a ↔ b) β†’ b β†’ a
2
⟨
abv: AbsoluteValue R S
abv
.
le_sub: βˆ€ {R : Type ?u.66746} {S : Type ?u.66745} [inst : Ring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) (a b : R), ↑abv a - ↑abv b ≀ ↑abv (a - b)
le_sub
_: ?m.66754
_
_: ?m.66754
_
,

Goals accomplished! πŸ™
R: Type u_2

S: Type u_1

inst✝¹: Ring R

inst✝: LinearOrderedCommRing S

abv: AbsoluteValue R S

a, b: R


↑abv b - ↑abv a ≀ ↑abv (a - b)
R: Type u_2

S: Type u_1

inst✝¹: Ring R

inst✝: LinearOrderedCommRing S

abv: AbsoluteValue R S

a, b: R


↑abv b - ↑abv a ≀ ↑abv (a - b)
R: Type u_2

S: Type u_1

inst✝¹: Ring R

inst✝: LinearOrderedCommRing S

abv: AbsoluteValue R S

a, b: R


↑abv b - ↑abv a ≀ ↑abv (b - a)
R: Type u_2

S: Type u_1

inst✝¹: Ring R

inst✝: LinearOrderedCommRing S

abv: AbsoluteValue R S

a, b: R


↑abv b - ↑abv a ≀ ↑abv (b - a)
R: Type u_2

S: Type u_1

inst✝¹: Ring R

inst✝: LinearOrderedCommRing S

abv: AbsoluteValue R S

a, b: R


↑abv b - ↑abv a ≀ ↑abv (b - a)
R: Type u_2

S: Type u_1

inst✝¹: Ring R

inst✝: LinearOrderedCommRing S

abv: AbsoluteValue R S

a, b: R


↑abv b - ↑abv a ≀ ↑abv (a - b)

Goals accomplished! πŸ™
⟩ #align absolute_value.abs_abv_sub_le_abv_sub
AbsoluteValue.abs_abv_sub_le_abv_sub: βˆ€ {R : Type u_2} {S : Type u_1} [inst : Ring R] [inst_1 : LinearOrderedCommRing S] (abv : AbsoluteValue R S) (a b : R), abs (↑abv a - ↑abv b) ≀ ↑abv (a - b)
AbsoluteValue.abs_abv_sub_le_abv_sub
end LinearOrderedCommRing end AbsoluteValue -- Porting note: Removed [] in fields, see -- leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Infer.20kinds.20are.20unsupported /-- A function `f` is an absolute value if it is nonnegative, zero only at 0, additive, and multiplicative. See also the type `AbsoluteValue` which represents a bundled version of absolute values. -/ class
IsAbsoluteValue: {S : Type u_1} β†’ [inst : OrderedSemiring S] β†’ {R : Type u_2} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
{
S: ?m.67135
S
} [
OrderedSemiring: Type ?u.67138 β†’ Type ?u.67138
OrderedSemiring
S: ?m.67135
S
] {
R: ?m.67141
R
} [
Semiring: Type ?u.67144 β†’ Type ?u.67144
Semiring
R: ?m.67141
R
] (
f: R β†’ S
f
:
R: ?m.67141
R
β†’
S: ?m.67135
S
) :
Prop: Type
Prop
where /-- The absolute value is nonnegative -/
abv_nonneg': βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x : R), 0 ≀ f x
abv_nonneg'
: βˆ€
x: ?m.67153
x
,
0: ?m.67158
0
≀
f: R β†’ S
f
x: ?m.67153
x
/-- The absolute value is positive definitive -/
abv_eq_zero': βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] {x : R}, f x = 0 ↔ x = 0
abv_eq_zero'
: βˆ€ {
x: ?m.67487
x
},
f: R β†’ S
f
x: ?m.67487
x
=
0: ?m.67492
0
↔
x: ?m.67487
x
=
0: ?m.67510
0
/-- The absolute value satisfies the triangle inequality -/
abv_add': βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x y : R), f (x + y) ≀ f x + f y
abv_add'
: βˆ€
x: ?m.67698
x
y: ?m.67701
y
,
f: R β†’ S
f
(
x: ?m.67698
x
+
y: ?m.67701
y
) ≀
f: R β†’ S
f
x: ?m.67698
x
+
f: R β†’ S
f
y: ?m.67701
y
/-- The absolute value is multiplicative -/
abv_mul': βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x y : R), f (x * y) = f x * f y
abv_mul'
: βˆ€
x: ?m.68272
x
y: ?m.68275
y
,
f: R β†’ S
f
(
x: ?m.68272
x
*
y: ?m.68275
y
) =
f: R β†’ S
f
x: ?m.68272
x
*
f: R β†’ S
f
y: ?m.68275
y
#align is_absolute_value
IsAbsoluteValue: {S : Type u_1} β†’ [inst : OrderedSemiring S] β†’ {R : Type u_2} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
namespace IsAbsoluteValue section OrderedSemiring variable {
S: Type ?u.71634
S
:
Type _: Type (?u.71054+1)
Type _
} [
OrderedSemiring: Type ?u.72493 β†’ Type ?u.72493
OrderedSemiring
S: Type ?u.68820
S
] variable {
R: Type ?u.68890
R
:
Type _: Type (?u.72496+1)
Type _
} [
Semiring: Type ?u.71643 β†’ Type ?u.71643
Semiring
R: Type ?u.68890
R
] (
abv: R β†’ S
abv
:
R: Type ?u.68890
R
β†’
S: Type ?u.72490
S
) [
IsAbsoluteValue: {S : Type ?u.71071} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.71070} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: R β†’ S
abv
] lemma
abv_nonneg: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (x : R), 0 ≀ abv x
abv_nonneg
(
x: R
x
) :
0: ?m.68947
0
≀
abv: R β†’ S
abv
x: ?m.68942
x
:=
abv_nonneg': βˆ€ {S : Type ?u.69277} [inst : OrderedSemiring S] {R : Type ?u.69276} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x : R), 0 ≀ f x
abv_nonneg'
x: R
x
#align is_absolute_value.abv_nonneg
IsAbsoluteValue.abv_nonneg: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (x : R), 0 ≀ abv x
IsAbsoluteValue.abv_nonneg
open Lean Meta Mathlib Meta Positivity Qq in /-- The `positivity` extension which identifies expressions of the form `abv a`. -/ @[positivity (
_: Ξ±
_
:
Ξ±: ?m.71047
Ξ±
)] def
Mathlib.Meta.Positivity.evalAbv: PositivityExt
Mathlib.Meta.Positivity.evalAbv
:
PositivityExt: Type
PositivityExt
where eval {
_: ?m.69415
_
_Ξ±: ?m.69418
_Ξ±
}
_zΞ±: ?m.69421
_zΞ±
_pΞ±: ?m.69424
_pΞ±
e: ?m.69427
e
:= do let (
.app: Expr β†’ Expr β†’ Expr
.app
f: Expr
f
a: Expr
a
) ←
whnfR: Expr β†’ MetaM Expr
whnfR
e: ?m.69427
e
|
throwError "not abv Β·": ?m.69679 ?m.69680
throwError
throwError "not abv Β·": ?m.69679 ?m.69680
"not abv Β·"
let
pa': ?m.69581
pa'
←
mkAppM: Name β†’ Array Expr β†’ MetaM Expr
mkAppM
``
abv_nonneg: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (x : R), 0 ≀ abv x
abv_nonneg
#[
f: Expr
f
,
a: Expr
a
]
pure: {f : Type ?u.69584 β†’ Type ?u.69583} β†’ [self : Pure f] β†’ {Ξ± : Type ?u.69584} β†’ Ξ± β†’ f Ξ±
pure
(
.nonnegative: {u : Level} β†’ {Ξ± : Q(Type u)} β†’ {zΞ± : Q(Zero Β«$Ξ±Β»)} β†’ {pΞ± : Q(PartialOrder Β«$Ξ±Β»)} β†’ {e : Q(Β«$Ξ±Β»)} β†’ Q(0 ≀ Β«$eΒ») β†’ Strictness zΞ± pΞ± e
.nonnegative
pa': ?m.69581
pa'
) lemma
abv_eq_zero: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] {x : R}, abv x = 0 ↔ x = 0
abv_eq_zero
{
x: R
x
} :
abv: R β†’ S
abv
x: ?m.71112
x
=
0: ?m.71117
0
↔
x: ?m.71112
x
=
0: ?m.71346
0
:=
abv_eq_zero': βˆ€ {S : Type ?u.71535} [inst : OrderedSemiring S] {R : Type ?u.71534} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] {x : R}, f x = 0 ↔ x = 0
abv_eq_zero'
#align is_absolute_value.abv_eq_zero
IsAbsoluteValue.abv_eq_zero: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] {x : R}, abv x = 0 ↔ x = 0
IsAbsoluteValue.abv_eq_zero
lemma
abv_add: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (x y : R), abv (x + y) ≀ abv x + abv y
abv_add
(
x: ?m.71692
x
y: ?m.71695
y
) :
abv: R β†’ S
abv
(
x: ?m.71692
x
+
y: ?m.71695
y
) ≀
abv: R β†’ S
abv
x: ?m.71692
x
+
abv: R β†’ S
abv
y: ?m.71695
y
:=
abv_add': βˆ€ {S : Type ?u.72402} [inst : OrderedSemiring S] {R : Type ?u.72401} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x y : R), f (x + y) ≀ f x + f y
abv_add'
x: R
x
y: R
y
#align is_absolute_value.abv_add
IsAbsoluteValue.abv_add: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (x y : R), abv (x + y) ≀ abv x + abv y
IsAbsoluteValue.abv_add
lemma
abv_mul: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (x y : R), abv (x * y) = abv x * abv y
abv_mul
(
x: ?m.72548
x
y: ?m.72551
y
) :
abv: R β†’ S
abv
(
x: ?m.72548
x
*
y: ?m.72551
y
) =
abv: R β†’ S
abv
x: ?m.72548
x
*
abv: R β†’ S
abv
y: ?m.72551
y
:=
abv_mul': βˆ€ {S : Type ?u.73180} [inst : OrderedSemiring S] {R : Type ?u.73179} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x y : R), f (x * y) = f x * f y
abv_mul'
x: R
x
y: R
y
#align is_absolute_value.abv_mul
IsAbsoluteValue.abv_mul: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (x y : R), abv (x * y) = abv x * abv y
IsAbsoluteValue.abv_mul
/-- A bundled absolute value is an absolute value. -/ instance
_root_.AbsoluteValue.isAbsoluteValue: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : AbsoluteValue R S), IsAbsoluteValue ↑abv
_root_.AbsoluteValue.isAbsoluteValue
(
abv: AbsoluteValue R S
abv
:
AbsoluteValue: (R : Type ?u.73318) β†’ (S : Type ?u.73317) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.73318?u.73317)
AbsoluteValue
R: Type ?u.73265
R
S: Type ?u.73259
S
) :
IsAbsoluteValue: {S : Type ?u.73339} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.73338} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: AbsoluteValue R S
abv
where abv_nonneg' :=
abv: AbsoluteValue R S
abv
.
nonneg: βˆ€ {R : Type ?u.73799} {S : Type ?u.73798} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x : R), 0 ≀ ↑abv x
nonneg
abv_eq_zero' :=
abv: AbsoluteValue R S
abv
.
eq_zero: βˆ€ {R : Type ?u.73819} {S : Type ?u.73818} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, ↑abv x = 0 ↔ x = 0
eq_zero
abv_add' :=
abv: AbsoluteValue R S
abv
.
add_le: βˆ€ {R : Type ?u.73850} {S : Type ?u.73849} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x y : R), ↑abv (x + y) ≀ ↑abv x + ↑abv y
add_le
abv_mul' :=
abv: AbsoluteValue R S
abv
.
map_mul: βˆ€ {M : Type ?u.73880} {N : Type ?u.73881} [inst : Mul M] [inst_1 : Mul N] (f : M β†’β‚™* N) (a b : M), ↑f (a * b) = ↑f a * ↑f b
map_mul
#align absolute_value.is_absolute_value
AbsoluteValue.isAbsoluteValue: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : AbsoluteValue R S), IsAbsoluteValue ↑abv
AbsoluteValue.isAbsoluteValue
/-- Convert an unbundled `IsAbsoluteValue` to a bundled `AbsoluteValue`. -/ @[
simps: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a : R), ↑(toAbsoluteValue abv) a = abv a
simps
] def
toAbsoluteValue: {S : Type u_1} β†’ [inst : OrderedSemiring S] β†’ {R : Type u_2} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
:
AbsoluteValue: (R : Type ?u.74334) β†’ (S : Type ?u.74333) β†’ [inst : Semiring R] β†’ [inst : OrderedSemiring S] β†’ Type (max?u.74334?u.74333)
AbsoluteValue
R: Type ?u.74281
R
S: Type ?u.74275
S
where toFun :=
abv: R β†’ S
abv
add_le' :=
abv_add': βˆ€ {S : Type ?u.74913} [inst : OrderedSemiring S] {R : Type ?u.74912} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x y : R), f (x + y) ≀ f x + f y
abv_add'
eq_zero'
_: ?m.74856
_
:=
abv_eq_zero': βˆ€ {S : Type ?u.74859} [inst : OrderedSemiring S] {R : Type ?u.74858} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] {x : R}, f x = 0 ↔ x = 0
abv_eq_zero'
nonneg' :=
abv_nonneg': βˆ€ {S : Type ?u.74788} [inst : OrderedSemiring S] {R : Type ?u.74787} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x : R), 0 ≀ f x
abv_nonneg'
map_mul' :=
abv_mul': βˆ€ {S : Type ?u.74696} [inst : OrderedSemiring S] {R : Type ?u.74695} [inst_1 : Semiring R] {f : R β†’ S} [self : IsAbsoluteValue f] (x y : R), f (x * y) = f x * f y
abv_mul'
#align is_absolute_value.to_absolute_value
IsAbsoluteValue.toAbsoluteValue: {S : Type u_1} β†’ [inst : OrderedSemiring S] β†’ {R : Type u_2} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
IsAbsoluteValue.toAbsoluteValue
#align is_absolute_value.to_absolute_value_apply
IsAbsoluteValue.toAbsoluteValue_apply: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a : R), ↑(toAbsoluteValue abv) a = abv a
IsAbsoluteValue.toAbsoluteValue_apply
#align is_absolute_value.to_absolute_value_to_mul_hom_apply
IsAbsoluteValue.toAbsoluteValue_apply: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a : R), ↑(toAbsoluteValue abv) a = abv a
IsAbsoluteValue.toAbsoluteValue_apply
theorem
abv_zero: abv 0 = 0
abv_zero
:
abv: R β†’ S
abv
0: ?m.75172
0
=
0: ?m.75345
0
:=
map_zero: βˆ€ {M : Type ?u.75574} {N : Type ?u.75575} {F : Type ?u.75573} [inst : Zero M] [inst_1 : Zero N] [inst_2 : ZeroHomClass F M N] (f : F), ↑f 0 = 0
map_zero
(
toAbsoluteValue: {S : Type ?u.75583} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.75582} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
) #align is_absolute_value.abv_zero
IsAbsoluteValue.abv_zero: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv], abv 0 = 0
IsAbsoluteValue.abv_zero
theorem
abv_pos: βˆ€ {a : R}, 0 < abv a ↔ a β‰  0
abv_pos
{
a: R
a
:
R: Type ?u.76125
R
} :
0: ?m.76181
0
<
abv: R β†’ S
abv
a: R
a
↔
a: R
a
β‰ 
0: ?m.76510
0
:= (
toAbsoluteValue: {S : Type ?u.76685} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.76684} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
pos_iff: βˆ€ {R : Type ?u.76723} {S : Type ?u.76722} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, 0 < ↑abv x ↔ x β‰  0
pos_iff
#align is_absolute_value.abv_pos
IsAbsoluteValue.abv_pos: βˆ€ {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] {a : R}, 0 < abv a ↔ a β‰  0
IsAbsoluteValue.abv_pos
end OrderedSemiring section LinearOrderedRing variable {
S: Type ?u.76787
S
:
Type _: Type (?u.76787+1)
Type _
} [
LinearOrderedRing: Type ?u.76784 β†’ Type ?u.76784
LinearOrderedRing
S: Type ?u.76781
S
] instance
abs_isAbsoluteValue: βˆ€ {S : Type u_1} [inst : LinearOrderedRing S], IsAbsoluteValue abs
abs_isAbsoluteValue
:
IsAbsoluteValue: {S : Type ?u.76794} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.76793} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
(
abs: {Ξ± : Type ?u.76818} β†’ [self : Abs Ξ±] β†’ Ξ± β†’ Ξ±
abs
:
S: Type ?u.76787
S
β†’
S: Type ?u.76787
S
) :=
AbsoluteValue.abs: {S : Type ?u.77088} β†’ [inst : LinearOrderedRing S] β†’ AbsoluteValue S S
AbsoluteValue.abs
.
isAbsoluteValue: βˆ€ {S : Type ?u.77095} [inst : OrderedSemiring S] {R : Type ?u.77094} [inst_1 : Semiring R] (abv : AbsoluteValue R S), IsAbsoluteValue ↑abv
isAbsoluteValue
#align is_absolute_value.abs_is_absolute_value
IsAbsoluteValue.abs_isAbsoluteValue: βˆ€ {S : Type u_1} [inst : LinearOrderedRing S], IsAbsoluteValue abs
IsAbsoluteValue.abs_isAbsoluteValue
end LinearOrderedRing section OrderedRing variable {
S: Type ?u.77187
S
:
Type _: Type (?u.77335+1)
Type _
} [
OrderedRing: Type ?u.77184 β†’ Type ?u.77184
OrderedRing
S: Type ?u.77181
S
] section Semiring variable {
R: Type ?u.77193
R
:
Type _: Type (?u.77341+1)
Type _
} [
Semiring: Type ?u.78193 β†’ Type ?u.78193
Semiring
R: Type ?u.77193
R
] (
abv: R β†’ S
abv
:
R: Type ?u.77574
R
β†’
S: Type ?u.78792
S
) [
IsAbsoluteValue: {S : Type ?u.77585} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.77584} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: R β†’ S
abv
] variable [
IsDomain: (Ξ± : Type ?u.78332) β†’ [inst : Semiring Ξ±] β†’ Prop
IsDomain
S: Type ?u.77335
S
] theorem
abv_one: βˆ€ [inst : Nontrivial R], abv 1 = 1
abv_one
[
Nontrivial: Type ?u.77801 β†’ Prop
Nontrivial
R: Type ?u.77574
R
] :
abv: R β†’ S
abv
1: ?m.77806
1
=
1: ?m.77845
1
:= (
toAbsoluteValue: {S : Type ?u.77998} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.77997} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
map_one: βˆ€ {R : Type ?u.78126} {S : Type ?u.78125} [inst : Semiring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) [inst_2 : IsDomain S] [inst_3 : Nontrivial R], ↑abv 1 = 1
map_one
#align is_absolute_value.abv_one
IsAbsoluteValue.abv_one: βˆ€ {S : Type u_2} [inst : OrderedRing S] {R : Type u_1} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] [inst_3 : IsDomain S] [inst_4 : Nontrivial R], abv 1 = 1
IsAbsoluteValue.abv_one
/-- `abv` as a `MonoidWithZeroHom`. -/ def
abvHom: [inst : Nontrivial R] β†’ R β†’*β‚€ S
abvHom
[
Nontrivial: Type ?u.78417 β†’ Prop
Nontrivial
R: Type ?u.78190
R
] :
R: Type ?u.78190
R
β†’*β‚€
S: Type ?u.78184
S
:= (
toAbsoluteValue: {S : Type ?u.78569} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.78568} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
toMonoidWithZeroHom: {R : Type ?u.78668} β†’ {S : Type ?u.78667} β†’ [inst : Semiring R] β†’ [inst_1 : OrderedRing S] β†’ AbsoluteValue R S β†’ [inst_2 : IsDomain S] β†’ [inst_3 : Nontrivial R] β†’ R β†’*β‚€ S
toMonoidWithZeroHom
#align is_absolute_value.abv_hom
IsAbsoluteValue.abvHom: {S : Type u_1} β†’ [inst : OrderedRing S] β†’ {R : Type u_2} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ [inst_3 : IsDomain S] β†’ [inst_4 : Nontrivial R] β†’ R β†’*β‚€ S
IsAbsoluteValue.abvHom
theorem
abv_pow: βˆ€ [inst : Nontrivial R] (abv : R β†’ S) [inst : IsAbsoluteValue abv] (a : R) (n : β„•), abv (a ^ n) = abv a ^ n
abv_pow
[
Nontrivial: Type ?u.79025 β†’ Prop
Nontrivial
R: Type ?u.78798
R
] (
abv: R β†’ S
abv
:
R: Type ?u.78798
R
β†’
S: Type ?u.78792
S
) [
IsAbsoluteValue: {S : Type ?u.79033} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.79032} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: R β†’ S
abv
] (
a: R
a
:
R: Type ?u.78798
R
) (n :
β„•: Type
β„•
) :
abv: R β†’ S
abv
(
a: R
a
^ n) =
abv: R β†’ S
abv
a: R
a
^ n :=
map_pow: βˆ€ {G : Type ?u.79563} {H : Type ?u.79564} {F : Type ?u.79565} [inst : Monoid G] [inst_1 : Monoid H] [inst_2 : MonoidHomClass F G H] (f : F) (a : G) (n : β„•), ↑f (a ^ n) = ↑f a ^ n
map_pow
(
toAbsoluteValue: {S : Type ?u.79573} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.79572} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
)
a: R
a
n #align is_absolute_value.abv_pow
IsAbsoluteValue.abv_pow: βˆ€ {S : Type u_2} [inst : OrderedRing S] {R : Type u_1} [inst_1 : Semiring R] [inst_2 : IsDomain S] [inst_3 : Nontrivial R] (abv : R β†’ S) [inst_4 : IsAbsoluteValue abv] (a : R) (n : β„•), abv (a ^ n) = abv a ^ n
IsAbsoluteValue.abv_pow
end Semiring section Ring variable {
R: Type ?u.80372
R
:
Type _: Type (?u.80055+1)
Type _
} [
Ring: Type ?u.80058 β†’ Type ?u.80058
Ring
R: Type ?u.80055
R
] (
abv: R β†’ S
abv
:
R: Type ?u.80055
R
β†’
S: Type ?u.80049
S
) [
IsAbsoluteValue: {S : Type ?u.80066} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.80065} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: R β†’ S
abv
] theorem
abv_sub_le: βˆ€ {S : Type u_1} [inst : OrderedRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a b c : R), abv (a - c) ≀ abv (a - b) + abv (b - c)
abv_sub_le
(
a: R
a
b: R
b
c: R
c
:
R: Type ?u.80372
R
) :
abv: R β†’ S
abv
(
a: R
a
-
c: R
c
) ≀
abv: R β†’ S
abv
(
a: R
a
-
b: R
b
) +
abv: R β†’ S
abv
(
b: R
b
-
c: R
c
) :=

Goals accomplished! πŸ™
S: Type u_1

inst✝²: OrderedRing S

R: Type u_2

inst✝¹: Ring R

abv: R β†’ S

inst✝: IsAbsoluteValue abv

a, b, c: R


abv (a - c) ≀ abv (a - b) + abv (b - c)

Goals accomplished! πŸ™
#align is_absolute_value.abv_sub_le
IsAbsoluteValue.abv_sub_le: βˆ€ {S : Type u_1} [inst : OrderedRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a b c : R), abv (a - c) ≀ abv (a - b) + abv (b - c)
IsAbsoluteValue.abv_sub_le
theorem
sub_abv_le_abv_sub: βˆ€ {S : Type u_1} [inst : OrderedRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a b : R), abv a - abv b ≀ abv (a - b)
sub_abv_le_abv_sub
(
a: R
a
b: R
b
:
R: Type ?u.83601
R
) :
abv: R β†’ S
abv
a: R
a
-
abv: R β†’ S
abv
b: R
b
≀
abv: R β†’ S
abv
(
a: R
a
-
b: R
b
) := (
toAbsoluteValue: {S : Type ?u.84188} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.84187} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
le_sub: βˆ€ {R : Type ?u.84485} {S : Type ?u.84484} [inst : Ring R] [inst_1 : OrderedRing S] (abv : AbsoluteValue R S) (a b : R), ↑abv a - ↑abv b ≀ ↑abv (a - b)
le_sub
a: R
a
b: R
b
#align is_absolute_value.sub_abv_le_abv_sub
IsAbsoluteValue.sub_abv_le_abv_sub: βˆ€ {S : Type u_1} [inst : OrderedRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a b : R), abv a - abv b ≀ abv (a - b)
IsAbsoluteValue.sub_abv_le_abv_sub
end Ring end OrderedRing section OrderedCommRing variable {
S: Type ?u.84529
S
:
Type _: Type (?u.84535+1)
Type _
} [
OrderedCommRing: Type ?u.84538 β†’ Type ?u.84538
OrderedCommRing
S: Type ?u.86188
S
] section Ring variable {
R: Type ?u.86194
R
:
Type _: Type (?u.85335+1)
Type _
} [
Ring: Type ?u.84544 β†’ Type ?u.84544
Ring
R: Type ?u.84541
R
] (
abv: R β†’ S
abv
:
R: Type ?u.84541
R
β†’
S: Type ?u.84535
S
) [
IsAbsoluteValue: {S : Type ?u.84552} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.84551} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: R β†’ S
abv
] variable [
NoZeroDivisors: (Mβ‚€ : Type ?u.86463) β†’ [inst : Mul Mβ‚€] β†’ [inst : Zero Mβ‚€] β†’ Prop
NoZeroDivisors
S: Type ?u.84810
S
] theorem
abv_neg: βˆ€ {S : Type u_1} [inst : OrderedCommRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] [inst : NoZeroDivisors S] (a : R), abv (-a) = abv a
abv_neg
(
a: R
a
:
R: Type ?u.85335
R
) :
abv: R β†’ S
abv
(-
a: R
a
) =
abv: R β†’ S
abv
a: R
a
:= (
toAbsoluteValue: {S : Type ?u.85878} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.85877} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
map_neg: βˆ€ {R : Type ?u.86133} {S : Type ?u.86132} [inst : Ring R] [inst_1 : OrderedCommRing S] (abv : AbsoluteValue R S) [inst_2 : NoZeroDivisors S] (a : R), ↑abv (-a) = ↑abv a
map_neg
a: R
a
#align is_absolute_value.abv_neg
IsAbsoluteValue.abv_neg: βˆ€ {S : Type u_1} [inst : OrderedCommRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] [inst : NoZeroDivisors S] (a : R), abv (-a) = abv a
IsAbsoluteValue.abv_neg
theorem
abv_sub: βˆ€ (a b : R), abv (a - b) = abv (b - a)
abv_sub
(
a: R
a
b: R
b
:
R: Type ?u.86194
R
) :
abv: R β†’ S
abv
(
a: R
a
-
b: R
b
) =
abv: R β†’ S
abv
(
b: R
b
-
a: R
a
) := (
toAbsoluteValue: {S : Type ?u.86811} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.86810} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
map_sub: βˆ€ {R : Type ?u.87066} {S : Type ?u.87065} [inst : Ring R] [inst_1 : OrderedCommRing S] (abv : AbsoluteValue R S) [inst_2 : NoZeroDivisors S] (a b : R), ↑abv (a - b) = ↑abv (b - a)
map_sub
a: R
a
b: R
b
#align is_absolute_value.abv_sub
IsAbsoluteValue.abv_sub: βˆ€ {S : Type u_1} [inst : OrderedCommRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] [inst : NoZeroDivisors S] (a b : R), abv (a - b) = abv (b - a)
IsAbsoluteValue.abv_sub
end Ring end OrderedCommRing section LinearOrderedCommRing variable {
S: Type ?u.87129
S
:
Type _: Type (?u.87123+1)
Type _
} [
LinearOrderedCommRing: Type ?u.87126 β†’ Type ?u.87126
LinearOrderedCommRing
S: Type ?u.87123
S
] section Ring variable {
R: Type ?u.87396
R
:
Type _: Type (?u.87135+1)
Type _
} [
Ring: Type ?u.87138 β†’ Type ?u.87138
Ring
R: Type ?u.87135
R
] (
abv: R β†’ S
abv
:
R: Type ?u.87135
R
β†’
S: Type ?u.87390
S
) [
IsAbsoluteValue: {S : Type ?u.87146} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.87145} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: R β†’ S
abv
] theorem
abs_abv_sub_le_abv_sub: βˆ€ {S : Type u_1} [inst : LinearOrderedCommRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a b : R), abs (abv a - abv b) ≀ abv (a - b)
abs_abv_sub_le_abv_sub
(
a: R
a
b: R
b
:
R: Type ?u.87396
R
) :
abs: {Ξ± : Type ?u.87656} β†’ [self : Abs Ξ±] β†’ Ξ± β†’ Ξ±
abs
(
abv: R β†’ S
abv
a: R
a
-
abv: R β†’ S
abv
b: R
b
) ≀
abv: R β†’ S
abv
(
a: R
a
-
b: R
b
) := (
toAbsoluteValue: {S : Type ?u.87973} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.87972} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
abs_abv_sub_le_abv_sub: βˆ€ {R : Type ?u.88214} {S : Type ?u.88213} [inst : Ring R] [inst_1 : LinearOrderedCommRing S] (abv : AbsoluteValue R S) (a b : R), abs (↑abv a - ↑abv b) ≀ ↑abv (a - b)
abs_abv_sub_le_abv_sub
a: R
a
b: R
b
#align is_absolute_value.abs_abv_sub_le_abv_sub
IsAbsoluteValue.abs_abv_sub_le_abv_sub: βˆ€ {S : Type u_1} [inst : LinearOrderedCommRing S] {R : Type u_2} [inst_1 : Ring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a b : R), abs (abv a - abv b) ≀ abv (a - b)
IsAbsoluteValue.abs_abv_sub_le_abv_sub
end Ring end LinearOrderedCommRing section LinearOrderedField variable {
S: Type ?u.90880
S
:
Type _: Type (?u.88273+1)
Type _
} [
LinearOrderedSemifield: Type ?u.88276 β†’ Type ?u.88276
LinearOrderedSemifield
S: Type ?u.88273
S
] section Semiring variable {
R: Type ?u.88373
R
:
Type _: Type (?u.88285+1)
Type _
} [
Semiring: Type ?u.88288 β†’ Type ?u.88288
Semiring
R: Type ?u.88285
R
] [
Nontrivial: Type ?u.88291 β†’ Prop
Nontrivial
R: Type ?u.88285
R
] (
abv: R β†’ S
abv
:
R: Type ?u.88285
R
β†’
S: Type ?u.88279
S
) [
IsAbsoluteValue: {S : Type ?u.88299} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.88298} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: R β†’ S
abv
] theorem
abv_one': abv 1 = 1
abv_one'
:
abv: R β†’ S
abv
1: ?m.88457
1
=
1: ?m.88496
1
:= (
toAbsoluteValue: {S : Type ?u.88574} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.88573} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
map_one_of_isLeftRegular: βˆ€ {R : Type ?u.88639} {S : Type ?u.88638} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S), IsLeftRegular (↑abv 1) β†’ ↑abv 1 = 1
map_one_of_isLeftRegular
<| (
isRegular_of_ne_zero: βˆ€ {R : Type ?u.88657} [inst : CancelMonoidWithZero R] {a : R}, a β‰  0 β†’ IsRegular a
isRegular_of_ne_zero
<| (
toAbsoluteValue: {S : Type ?u.88662} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.88661} β†’ [inst_1 : Semiring R] β†’ (abv : R β†’ S) β†’ [inst_2 : IsAbsoluteValue abv] β†’ AbsoluteValue R S
toAbsoluteValue
abv: R β†’ S
abv
).
ne_zero: βˆ€ {R : Type ?u.88671} {S : Type ?u.88672} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) {x : R}, x β‰  0 β†’ ↑abv x β‰  0
ne_zero
one_ne_zero: βˆ€ {Ξ± : Type ?u.89176} [inst : Zero Ξ±] [inst_1 : One Ξ±] [inst_2 : NeZero 1], 1 β‰  0
one_ne_zero
).
left: βˆ€ {R : Type ?u.89955} [inst : Mul R] {c : R}, IsRegular c β†’ IsLeftRegular c
left
#align is_absolute_value.abv_one'
IsAbsoluteValue.abv_one': βˆ€ {S : Type u_1} [inst : LinearOrderedSemifield S] {R : Type u_2} [inst_1 : Semiring R] [inst_2 : Nontrivial R] (abv : R β†’ S) [inst_3 : IsAbsoluteValue abv], abv 1 = 1
IsAbsoluteValue.abv_one'
/-- An absolute value as a monoid with zero homomorphism, assuming the target is a semifield. -/ def
abvHom': R β†’*β‚€ S
abvHom'
:
R: Type ?u.90155
R
β†’*β‚€
S: Type ?u.90149
S
:= ⟨⟨
abv: R β†’ S
abv
,
abv_zero: βˆ€ {S : Type ?u.90438} [inst : OrderedSemiring S] {R : Type ?u.90439} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv], abv 0 = 0
abv_zero
abv: R β†’ S
abv
⟩,
abv_one': βˆ€ {S : Type ?u.90706} [inst : LinearOrderedSemifield S] {R : Type ?u.90707} [inst_1 : Semiring R] [inst_2 : Nontrivial R] (abv : R β†’ S) [inst_3 : IsAbsoluteValue abv], abv 1 = 1
abv_one'
abv: R β†’ S
abv
,
abv_mul: βˆ€ {S : Type ?u.90734} [inst : OrderedSemiring S] {R : Type ?u.90735} [inst_1 : Semiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (x y : R), abv (x * y) = abv x * abv y
abv_mul
abv: R β†’ S
abv
⟩ #align is_absolute_value.abv_hom'
IsAbsoluteValue.abvHom': {S : Type u_1} β†’ [inst : LinearOrderedSemifield S] β†’ {R : Type u_2} β†’ [inst_1 : Semiring R] β†’ [inst_2 : Nontrivial R] β†’ (abv : R β†’ S) β†’ [inst_3 : IsAbsoluteValue abv] β†’ R β†’*β‚€ S
IsAbsoluteValue.abvHom'
end Semiring section DivisionSemiring variable {
R: Type ?u.91080
R
:
Type _: Type (?u.92071+1)
Type _
} [
DivisionSemiring: Type ?u.90889 β†’ Type ?u.90889
DivisionSemiring
R: Type ?u.90886
R
] (
abv: R β†’ S
abv
:
R: Type ?u.90886
R
β†’
S: Type ?u.90880
S
) [
IsAbsoluteValue: {S : Type ?u.91091} β†’ [inst : OrderedSemiring S] β†’ {R : Type ?u.91090} β†’ [inst : Semiring R] β†’ (R β†’ S) β†’ Prop
IsAbsoluteValue
abv: R β†’ S
abv
] theorem
abv_inv: βˆ€ (a : R), abv a⁻¹ = (abv a)⁻¹
abv_inv
(
a: R
a
:
R: Type ?u.91080
R
) :
abv: R β†’ S
abv
a: R
a
⁻¹ = (
abv: R β†’ S
abv
a: R
a
)⁻¹ :=
map_invβ‚€: βˆ€ {Gβ‚€ : Type ?u.91391} {Gβ‚€' : Type ?u.91390} {F : Type ?u.91392} [inst : GroupWithZero Gβ‚€] [inst_1 : GroupWithZero Gβ‚€'] [inst_2 : MonoidWithZeroHomClass F Gβ‚€ Gβ‚€'] (f : F) (a : Gβ‚€), ↑f a⁻¹ = (↑f a)⁻¹
map_invβ‚€
(
abvHom': {S : Type ?u.91400} β†’ [inst : LinearOrderedSemifield S] β†’ {R : Type ?u.91399} β†’ [inst_1 : Semiring R] β†’ [inst_2 : Nontrivial R] β†’ (abv : R β†’ S) β†’ [inst_3 : IsAbsoluteValue abv] β†’ R β†’*β‚€ S
abvHom'
abv: R β†’ S
abv
)
a: R
a
#align is_absolute_value.abv_inv
IsAbsoluteValue.abv_inv: βˆ€ {S : Type u_1} [inst : LinearOrderedSemifield S] {R : Type u_2} [inst_1 : DivisionSemiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a : R), abv a⁻¹ = (abv a)⁻¹
IsAbsoluteValue.abv_inv
theorem
abv_div: βˆ€ (a b : R), abv (a / b) = abv a / abv b
abv_div
(
a: R
a
b: R
b
:
R: Type ?u.92071
R
) :
abv: R β†’ S
abv
(
a: R
a
/
b: R
b
) =
abv: R β†’ S
abv
a: R
a
/
abv: R β†’ S
abv
b: R
b
:=
map_divβ‚€: βˆ€ {Gβ‚€ : Type ?u.92467} {Gβ‚€' : Type ?u.92466} {F : Type ?u.92468} [inst : GroupWithZero Gβ‚€] [inst_1 : GroupWithZero Gβ‚€'] [inst_2 : MonoidWithZeroHomClass F Gβ‚€ Gβ‚€'] (f : F) (a b : Gβ‚€), ↑f (a / b) = ↑f a / ↑f b
map_divβ‚€
(
abvHom': {S : Type ?u.92476} β†’ [inst : LinearOrderedSemifield S] β†’ {R : Type ?u.92475} β†’ [inst_1 : Semiring R] β†’ [inst_2 : Nontrivial R] β†’ (abv : R β†’ S) β†’ [inst_3 : IsAbsoluteValue abv] β†’ R β†’*β‚€ S
abvHom'
abv: R β†’ S
abv
)
a: R
a
b: R
b
#align is_absolute_value.abv_div
IsAbsoluteValue.abv_div: βˆ€ {S : Type u_1} [inst : LinearOrderedSemifield S] {R : Type u_2} [inst_1 : DivisionSemiring R] (abv : R β†’ S) [inst_2 : IsAbsoluteValue abv] (a b : R), abv (a / b) = abv a / abv b
IsAbsoluteValue.abv_div
end DivisionSemiring end LinearOrderedField end IsAbsoluteValue