/- 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. -/ structureAbsoluteValue (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 SRR: Type ?u.2S :S: Type ?u.5Type _) [SemiringType _: Type (?u.2+1)R] [OrderedSemiringR: Type ?u.2S] extendsS: Type ?u.5R ββ*R: Type ?u.2S where /-- The absolute value is nonnegative -/S: Type ?u.5nonneg' : β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 xx,x: ?m.3480 β€0: ?m.353toFuntoFun: R β Sx /-- The absolute value is positive definitive -/x: ?m.348eq_zero' : β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 = 0x,x: ?m.652toFuntoFun: R β Sx =x: ?m.6520 β0: ?m.657x =x: ?m.6520 /-- The absolute value satisfies the triangle inequality -/0: ?m.675add_le' : β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 yxx: ?m.851y,y: ?m.854toFun (toFun: R β Sx +x: ?m.851y) β€y: ?m.854toFuntoFun: R β Sx +x: ?m.851toFuntoFun: R β Sy #align absolute_valuey: ?m.854AbsoluteValue namespace AbsoluteValue -- Porting note: Removing nolints. -- attribute [nolint doc_blame] AbsoluteValue.toMulHom section OrderedSemiring section Semiring variable {AbsoluteValue: (R : Type u_1) β (S : Type u_2) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (maxu_1u_2)RR: Type ?u.15366S :S: Type ?u.4874Type _} [SemiringType _: Type (?u.14362+1)R] [OrderedSemiringR: Type ?u.1954S] (S: Type ?u.3624abv :abv: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.1967) β (S : Type ?u.1966) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.1967?u.1966)RR: Type ?u.1954S) instanceS: Type ?u.1957zeroHomClass : ZeroHomClass (zeroHomClass: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β ZeroHomClass (AbsoluteValue R S) R SAbsoluteValueAbsoluteValue: (R : Type ?u.2024) β (S : Type ?u.2023) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.2024?u.2023)RR: Type ?u.1987S)S: Type ?u.1990RR: Type ?u.1987S where coeS: Type ?u.1990f :=f: ?m.2433f.toFun coe_injective'f: ?m.2433ff: ?m.2743gg: ?m.2746h :=h: ?m.2749Goals 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) gf = gR: 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'β } = gR: 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) gf = gR: 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) gf = gmap_zeroGoals accomplished! πf := (f: ?m.2762f.f: ?m.2762eq_zero'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_).2 rfl #align absolute_value.zero_hom_class_: ?m.2766AbsoluteValue.zeroHomClass instanceAbsoluteValue.zeroHomClass: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β ZeroHomClass (AbsoluteValue R S) R SmulHomClass : MulHomClass (mulHomClass: MulHomClass (AbsoluteValue R S) R SAbsoluteValueAbsoluteValue: (R : Type ?u.3658) β (S : Type ?u.3657) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.3658?u.3657)RR: Type ?u.3621S)S: Type ?u.3624RR: Type ?u.3621S := {S: Type ?u.3624AbsoluteValue.zeroHomClass with map_mul := funAbsoluteValue.zeroHomClass: {R : Type ?u.4001} β {S : Type ?u.4000} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β ZeroHomClass (AbsoluteValue R S) R Sf =>f: ?m.4709f.f: ?m.4709map_mul' } #align absolute_value.mul_hom_classmap_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 yAbsoluteValue.mulHomClass instanceAbsoluteValue.mulHomClass: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β MulHomClass (AbsoluteValue R S) R SnonnegHomClass : NonnegHomClass (nonnegHomClass: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β NonnegHomClass (AbsoluteValue R S) R SAbsoluteValueAbsoluteValue: (R : Type ?u.4908) β (S : Type ?u.4907) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.4908?u.4907)RR: Type ?u.4871S)S: Type ?u.4874RR: Type ?u.4871S := {S: Type ?u.4874AbsoluteValue.zeroHomClass with map_nonneg := funAbsoluteValue.zeroHomClass: {R : Type ?u.5226} β {S : Type ?u.5225} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β ZeroHomClass (AbsoluteValue R S) R Sf =>f: ?m.5776f.f: ?m.5776nonneg' } #align absolute_value.nonneg_hom_classnonneg': β {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 xAbsoluteValue.nonnegHomClass instanceAbsoluteValue.nonnegHomClass: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β NonnegHomClass (AbsoluteValue R S) R SsubadditiveHomClass : SubadditiveHomClass (subadditiveHomClass: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β SubadditiveHomClass (AbsoluteValue R S) R SAbsoluteValueAbsoluteValue: (R : Type ?u.5960) β (S : Type ?u.5959) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.5960?u.5959)RR: Type ?u.5923S)S: Type ?u.5926RR: Type ?u.5923S := {S: Type ?u.5926AbsoluteValue.zeroHomClass with map_add_le_add := funAbsoluteValue.zeroHomClass: {R : Type ?u.6389} β {S : Type ?u.6388} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β ZeroHomClass (AbsoluteValue R S) R Sf =>f: ?m.7174f.f: ?m.7174add_le' } #align absolute_value.subadditive_hom_classadd_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 yAbsoluteValue.subadditiveHomClass @[simp] theoremAbsoluteValue.subadditiveHomClass: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β SubadditiveHomClass (AbsoluteValue R S) R Scoe_mk (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β } = βff :f: R ββ* SR ββ*R: Type ?u.7326S) {S: Type ?u.7329hβhβ: β (x : R), 0 β€ MulHom.toFun f xhβhβ: ?m.7691hβ} : (hβ: ?m.7694AbsoluteValue.mkAbsoluteValue.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 Sff: R ββ* Shβhβ: ?m.7688hβhβ: ?m.7691hβ :hβ: ?m.7694R βR: Type ?u.7326S) =S: Type ?u.7329f := rfl #align absolute_value.coe_mkf: R ββ* SAbsoluteValue.coe_mk @[ext] theoremAbsoluteValue.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β } = βfext β¦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 = gff: AbsoluteValue R Sg :g: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.10781) β (S : Type ?u.10780) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.10781?u.10780)RR: Type ?u.10747Sβ¦ : (βS: Type ?u.10750x,x: ?m.10809ff: AbsoluteValue R Sx =x: ?m.10809gg: AbsoluteValue R Sx) βx: ?m.10809f =f: AbsoluteValue R Sg := FunLike.extg: AbsoluteValue R S__: ?m.11642_ #align absolute_value.ext_: ?m.11642AbsoluteValue.ext /-- See Note [custom simps projection]. -/ defAbsoluteValue.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 = gSimps.apply (Simps.apply: AbsoluteValue R S β R β Sf :f: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.12111) β (S : Type ?u.12110) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.12111?u.12110)RR: Type ?u.12077S) :S: Type ?u.12080R βR: Type ?u.12077S :=S: Type ?u.12080f #align absolute_value.simps.applyf: AbsoluteValue R SAbsoluteValue.Simps.apply initialize_simps_projectionsAbsoluteValue.Simps.apply: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β AbsoluteValue R S β R β SAbsoluteValue (AbsoluteValue: (R : Type u_1) β (S : Type u_2) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (maxu_1u_2)toFun βtoFun: (R : Type u_1) β (S : Type u_2) β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β AbsoluteValue R S β R β Sapply) -- 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] theoremapply: {R : Type u_1} β {S : Type u_2} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β AbsoluteValue R S β R β Scoe_toMulHom :coe_toMulHom: β {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S), abv.toMulHom = βabvabv.abv: AbsoluteValue R StoMulHom =toMulHom: {R : Type ?u.13173} β {S : Type ?u.13172} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β AbsoluteValue R S β R ββ* Sabv := rfl #align absolute_value.coe_to_mul_homabv: AbsoluteValue R SAbsoluteValue.coe_toMulHom protected theoremAbsoluteValue.coe_toMulHom: β {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S), abv.toMulHom = βabvnonneg (nonneg: β {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x : R), 0 β€ βabv xx :x: RR) :R: Type ?u.134460 β€0: ?m.13483abvabv: AbsoluteValue R Sx :=x: Rabv.abv: AbsoluteValue R Snonneg'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 xx #align absolute_value.nonnegx: RAbsoluteValue.nonneg @[simp] protected theoremAbsoluteValue.nonneg: β {R : Type u_2} {S : Type u_1} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x : R), 0 β€ βabv xeq_zero {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 = 0x :x: RR} :R: Type ?u.14359abvabv: AbsoluteValue R Sx =x: R0 β0: ?m.14822x =x: R0 :=0: ?m.15103abv.abv: AbsoluteValue R Seq_zero'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 = 0x #align absolute_value.eq_zerox: RAbsoluteValue.eq_zero protected theorem add_le (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 = 0xx: Ry :y: RR) :R: Type ?u.15366abv (abv: AbsoluteValue R Sx +x: Ry) β€y: Rabvabv: AbsoluteValue R Sx +x: Rabvabv: AbsoluteValue R Sy :=y: Rabv.abv: AbsoluteValue R Sadd_le'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 yxx: Ry #align absolute_value.add_ley: RAbsoluteValue.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 protected theoremAbsoluteValue.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 yne_zero_iff {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 β 0x :x: RR} :R: Type ?u.17490abvabv: AbsoluteValue R Sx βx: R0 β0: ?m.17955x βx: R0 :=0: ?m.18222abv.abv: AbsoluteValue R Seq_zero.not #align absolute_value.ne_zero_iffeq_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 = 0AbsoluteValue.ne_zero_iff protected theorem pos {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 β 0x :x: RR} (R: Type ?u.18448hx :hx: x β 0x βx: R0) :0: ?m.184860 <0: ?m.18662abvabv: AbsoluteValue R Sx :=x: Rlt_of_le_of_ne (lt_of_le_of_ne: β {Ξ± : Type ?u.19503} [inst : PartialOrder Ξ±] {a b : Ξ±}, a β€ b β a β b β a < babv.abv: AbsoluteValue R Snonnegnonneg: β {R : Type ?u.19676} {S : Type ?u.19675} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x : R), 0 β€ βabv xx) (Ne.symm <| mtx: Rabv.abv: AbsoluteValue R Seq_zero.mpeq_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 = 0hx) #align absolute_value.poshx: x β 0AbsoluteValue.pos @[simp] protected theoremAbsoluteValue.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 xpos_iff {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 β 0x :x: RR} :R: Type ?u.197550 <0: ?m.19792abvabv: AbsoluteValue R Sx βx: Rx βx: R0 := β¨fun0: ?m.20633hβ => mthβ: ?m.20814abv.abv: AbsoluteValue R Seq_zero.mpreq_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 = 0hβ.ne',hβ: ?m.20814abv.abv: AbsoluteValue R Sposβ© #align absolute_value.pos_iffpos: β {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 xAbsoluteValue.pos_iff protected theoremAbsoluteValue.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 β 0ne_zero {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 β 0x :x: RR} (R: Type ?u.21080hx :hx: x β 0x βx: R0) :0: ?m.21118abvabv: AbsoluteValue R Sx βx: R0 := (0: ?m.21720abv.abv: AbsoluteValue R Spospos: β {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 xhx).ne' #align absolute_value.ne_zerohx: x β 0AbsoluteValue.ne_zero theoremAbsoluteValue.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 β 0map_one_of_isLeftRegular (map_one_of_isLeftRegular: IsLeftRegular (βabv 1) β βabv 1 = 1h : IsLeftRegular (h: IsLeftRegular (βabv 1)abvabv: AbsoluteValue R S1)) :1: ?m.22677abvabv: AbsoluteValue R S1 =1: ?m.233431 :=1: ?m.23346h <|h: IsLeftRegular (βabv 1)Goals accomplished! πR: Type u_2
S: Type u_1
instβΒΉ: Semiring R
instβ: OrderedSemiring S
abv: AbsoluteValue R S
h: IsLeftRegular (βabv 1)#align absolute_value.map_one_of_is_regularGoals accomplished! π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 end Semiring section Ring variable {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 = 1RR: Type ?u.27031S :S: Type ?u.27236Type _} [RingType _: Type (?u.27236+1)R] [OrderedSemiringR: Type ?u.27233S] (S: Type ?u.27236abv :abv: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.27044) β (S : Type ?u.27043) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.27044?u.27043)RR: Type ?u.27233S) protected theoremS: Type ?u.38789sub_le (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)aa: Rbb: Rc :c: RR) :R: Type ?u.27233abv (abv: AbsoluteValue R Sa -a: Rc) β€c: Rabv (abv: AbsoluteValue R Sa -a: Rb) +b: Rabv (abv: AbsoluteValue R Sb -b: Rc) :=c: RGoals accomplished! π#align absolute_value.sub_leGoals accomplished! πAbsoluteValue.sub_le @[simp (high)] theorem map_sub_eq_zero_iff (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)aa: Rb :b: RR) :R: Type ?u.38786abv (abv: AbsoluteValue R Sa -a: Rb) =b: R0 β0: ?m.39480a =a: Rb :=b: Rabv.abv: AbsoluteValue R Seq_zero.trans sub_eq_zero #align absolute_value.map_sub_eq_zero_iffeq_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 = 0AbsoluteValue.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 {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 = bRR: Type ?u.40085S :S: Type ?u.40211Type _} [SemiringType _: Type (?u.40419+1)R] [OrderedRingR: Type ?u.40085S] (S: Type ?u.40088abv :abv: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.40432) β (S : Type ?u.40431) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.40432?u.40431)RR: Type ?u.40208S) variable [IsDomainS: Type ?u.40088S] [NontrivialS: Type ?u.40422R] @[simp (high)] protected theoremR: Type ?u.42308map_one :map_one: βabv 1 = 1abvabv: AbsoluteValue R S1 =1: ?m.410581 :=1: ?m.41095abv.abv: AbsoluteValue R Smap_one_of_isLeftRegular (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 = 1isRegular_of_ne_zero <|isRegular_of_ne_zero: β {R : Type ?u.41403} [inst : CancelMonoidWithZero R] {a : R}, a β 0 β IsRegular aabv.abv: AbsoluteValue R Sne_zero one_ne_zero).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 β 0left #align absolute_value.map_oneleft: β {R : Type ?u.42189} [inst : Mul R] {c : R}, IsRegular c β IsLeftRegular cAbsoluteValue.map_oneAbsoluteValue.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 = 1instance :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 SMonoidWithZeroHomClass (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)AbsoluteValueAbsoluteValue: (R : Type ?u.42523) β (S : Type ?u.42522) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.42523?u.42522)RR: Type ?u.42308S)S: Type ?u.42311RR: Type ?u.42308S := {S: Type ?u.42311AbsoluteValue.mulHomClass with map_zero := funAbsoluteValue.mulHomClass: {R : Type ?u.42750} β {S : Type ?u.42749} β [inst : Semiring R] β [inst_1 : OrderedSemiring S] β MulHomClass (AbsoluteValue R S) R Sf => map_zerof: ?m.43396f, map_one := funf: ?m.43396f =>f: ?m.43339f.f: ?m.43339map_one } /-- Absolute values from a nontrivial `R` to a linear ordered ring preserve `*`, `0` and `1`. -/ defmap_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 = 1toMonoidWithZeroHom :toMonoidWithZeroHom: R β*β SR β*βR: Type ?u.44008S :=S: Type ?u.44011abv #align absolute_value.to_monoid_with_zero_homabv: AbsoluteValue R SAbsoluteValue.toMonoidWithZeroHom @[simp] theoremAbsoluteValue.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 β*β Scoe_toMonoidWithZeroHom : β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) = βabvabv.abv: AbsoluteValue R StoMonoidWithZeroHom =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 β*β Sabv := rfl #align absolute_value.coe_to_monoid_with_zero_homabv: AbsoluteValue R SAbsoluteValue.coe_toMonoidWithZeroHom /-- Absolute values from a nontrivial `R` to a linear ordered ring preserve `*` and `1`. -/ defAbsoluteValue.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) = βabvtoMonoidHom :toMonoidHom: R β* SR β*R: Type ?u.47334S :=S: Type ?u.47337abv #align absolute_value.to_monoid_homabv: AbsoluteValue R SAbsoluteValue.toMonoidHom @[simp] theoremAbsoluteValue.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 β* Scoe_toMonoidHom : βcoe_toMonoidHom: β(toMonoidHom abv) = βabvabv.abv: AbsoluteValue R StoMonoidHom =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 β* Sabv := rfl #align absolute_value.coe_to_monoid_homabv: AbsoluteValue R SAbsoluteValue.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 end IsDomain end Semiring section Ring variable {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) = βabvRR: Type ?u.51017S :S: Type ?u.51020Type _} [RingType _: Type (?u.51020+1)R] [OrderedRingR: Type ?u.50725S] (S: Type ?u.51020abv :abv: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.50738) β (S : Type ?u.50737) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.50738?u.50737)RR: Type ?u.50725S) protected theorem le_sub (S: Type ?u.50728aa: Rb :b: RR) :R: Type ?u.51017abvabv: AbsoluteValue R Sa -a: Rabvabv: AbsoluteValue R Sb β€b: Rabv (abv: AbsoluteValue R Sa -a: Rb) := sub_le_iff_le_add.2 <|b: RGoals accomplished! π#align absolute_value.le_subGoals accomplished! πAbsoluteValue.le_sub end Ring end OrderedRing section OrderedCommRing variable {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)RR: Type ?u.57154S :S: Type ?u.56663Type _} [RingType _: Type (?u.57157+1)R] [OrderedCommRingR: Type ?u.56410S] (S: Type ?u.56413abv :abv: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.56423) β (S : Type ?u.56422) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.56423?u.56422)RR: Type ?u.56410S) variable [NoZeroDivisorsS: Type ?u.56413S] @[simp] protected theoremS: Type ?u.56663map_neg (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 aa :a: RR) :R: Type ?u.57154abv (-abv: AbsoluteValue R Sa) =a: Rabvabv: AbsoluteValue R Sa :=a: RGoals accomplished! πR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: RR: 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
posR: 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
negR: 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
posR: 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
negR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: RR: 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
posR: 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
posR: 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
negGoals accomplished! πR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: RR: 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
negGoals 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 = 0R: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: R
ha: Β¬a = 0R: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: R
ha: Β¬a = 0R: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: R
ha: Β¬a = 0R: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: R
ha: Β¬a = 0R: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: R
ha: Β¬a = 0R: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: R
ha: Β¬a = 0Goals 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
negR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a: R#align absolute_value.map_negGoals accomplished! πAbsoluteValue.map_neg protected theoremAbsoluteValue.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 amap_sub (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)aa: Rb :b: RR) :R: Type ?u.61436abv (abv: AbsoluteValue R Sa -a: Rb) =b: Rabv (abv: AbsoluteValue R Sb -b: Ra) :=a: RGoals accomplished! πR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a, b: RR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a, b: RR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a, b: RR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a, b: RR: Type u_2
S: Type u_1
instβΒ²: Ring R
instβΒΉ: OrderedCommRing S
abv: AbsoluteValue R S
instβ: NoZeroDivisors S
a, b: R#align absolute_value.map_subGoals accomplished! πAbsoluteValue.map_sub end OrderedCommRing section LinearOrderedRing variable {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)RR: Type ?u.63068S :S: Type ?u.63071Type _} [SemiringType _: Type (?u.64298+1)R] [LinearOrderedRingR: Type ?u.63068S] (S: Type ?u.63174abv :abv: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.63184) β (S : Type ?u.63183) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.63184?u.63183)RR: Type ?u.63068S) /-- `AbsoluteValue.abs` is `abs` as a bundled `AbsoluteValue`. -/ @[S: Type ?u.63174simps] protected defsimps: β {S : Type u_1} [inst : LinearOrderedRing S] (a : S), βAbsoluteValue.abs a = abs aabs :abs: AbsoluteValue S SAbsoluteValueAbsoluteValue: (R : Type ?u.63275) β (S : Type ?u.63274) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.63275?u.63274)SS: Type ?u.63174S where toFun := abs nonneg' :=S: Type ?u.63174abs_nonneg eq_zero'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_ :=_: ?m.63849abs_eq_zero add_le' := abs_add map_mul' := abs_mul #align absolute_value.absabs_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 = 0AbsoluteValue.abs #align absolute_value.abs_applyAbsoluteValue.abs: {S : Type u_1} β [inst : LinearOrderedRing S] β AbsoluteValue S SAbsoluteValue.abs_apply #align absolute_value.abs_to_mul_hom_applyAbsoluteValue.abs_apply: β {S : Type u_1} [inst : LinearOrderedRing S] (a : S), βAbsoluteValue.abs a = abs aAbsoluteValue.abs_applyAbsoluteValue.abs_apply: β {S : Type u_1} [inst : LinearOrderedRing S] (a : S), βAbsoluteValue.abs a = abs ainstance : Inhabited (instance: {S : Type u_1} β [inst : LinearOrderedRing S] β Inhabited (AbsoluteValue S S)AbsoluteValueAbsoluteValue: (R : Type ?u.64400) β (S : Type ?u.64399) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.64400?u.64399)SS: Type ?u.64298S) := β¨S: Type ?u.64298AbsoluteValue.absβ© end LinearOrderedRing section LinearOrderedCommRing variable {AbsoluteValue.abs: {S : Type ?u.64520} β [inst : LinearOrderedRing S] β AbsoluteValue S SRR: Type ?u.64581S :S: Type ?u.64820Type _} [RingType _: Type (?u.64820+1)R] [LinearOrderedCommRingR: Type ?u.64581S] (S: Type ?u.64584abv :abv: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.64594) β (S : Type ?u.64593) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.64594?u.64593)RR: Type ?u.64581S) theorem abs_abv_sub_le_abv_sub (S: Type ?u.64584aa: Rb :b: RR) : abs (R: Type ?u.64817abvabv: AbsoluteValue R Sa -a: Rabvabv: AbsoluteValue R Sb) β€b: Rabv (abv: AbsoluteValue R Sa -a: Rb) := abs_sub_le_iff.2 β¨b: Rabv.abv: AbsoluteValue R Sle_suble_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)__: ?m.66754_,_: ?m.66754Goals accomplished! πR: Type u_2
S: Type u_1
instβΒΉ: Ring R
instβ: LinearOrderedCommRing S
abv: AbsoluteValue R S
a, b: RR: Type u_2
S: Type u_1
instβΒΉ: Ring R
instβ: LinearOrderedCommRing S
abv: AbsoluteValue R S
a, b: RR: Type u_2
S: Type u_1
instβΒΉ: Ring R
instβ: LinearOrderedCommRing S
abv: AbsoluteValue R S
a, b: RR: Type u_2
S: Type u_1
instβΒΉ: Ring R
instβ: LinearOrderedCommRing S
abv: AbsoluteValue R S
a, b: RR: Type u_2
S: Type u_1
instβΒΉ: Ring R
instβ: LinearOrderedCommRing S
abv: AbsoluteValue R S
a, b: RR: Type u_2
S: Type u_1
instβΒΉ: Ring R
instβ: LinearOrderedCommRing S
abv: AbsoluteValue R S
a, b: Rβ© #align absolute_value.abs_abv_sub_le_abv_subGoals accomplished! π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. -/ classAbsoluteValue.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)IsAbsoluteValue {IsAbsoluteValue: {S : Type u_1} β [inst : OrderedSemiring S] β {R : Type u_2} β [inst : Semiring R] β (R β S) β PropS} [OrderedSemiringS: ?m.67135S] {S: ?m.67135R} [SemiringR: ?m.67141R] (R: ?m.67141f :f: R β SR βR: ?m.67141S) :S: ?m.67135Prop where /-- The absolute value is nonnegative -/Prop: Typeabv_nonneg' : β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 xx,x: ?m.671530 β€0: ?m.67158ff: R β Sx /-- The absolute value is positive definitive -/x: ?m.67153abv_eq_zero' : β {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 = 0x},x: ?m.67487ff: R β Sx =x: ?m.674870 β0: ?m.67492x =x: ?m.674870 /-- The absolute value satisfies the triangle inequality -/0: ?m.67510abv_add' : β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 yxx: ?m.67698y,y: ?m.67701f (f: R β Sx +x: ?m.67698y) β€y: ?m.67701ff: R β Sx +x: ?m.67698ff: R β Sy /-- The absolute value is multiplicative -/y: ?m.67701abv_mul' : β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 yxx: ?m.68272y,y: ?m.68275f (f: R β Sx *x: ?m.68272y) =y: ?m.68275ff: R β Sx *x: ?m.68272ff: R β Sy #align is_absolute_valuey: ?m.68275IsAbsoluteValue namespace IsAbsoluteValue section OrderedSemiring variable {IsAbsoluteValue: {S : Type u_1} β [inst : OrderedSemiring S] β {R : Type u_2} β [inst : Semiring R] β (R β S) β PropS :S: Type ?u.71634Type _} [OrderedSemiringType _: Type (?u.71054+1)S] variable {S: Type ?u.68820R :R: Type ?u.68890Type _} [SemiringType _: Type (?u.72496+1)R] (R: Type ?u.68890abv :abv: R β SR βR: Type ?u.68890S) [S: Type ?u.72490IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.71071} β [inst : OrderedSemiring S] β {R : Type ?u.71070} β [inst : Semiring R] β (R β S) β Propabv] lemmaabv: R β Sabv_nonneg (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 xx) :x: R0 β€0: ?m.68947abvabv: R β Sx :=x: ?m.68942abv_nonneg'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 xx #align is_absolute_value.abv_nonnegx: RIsAbsoluteValue.abv_nonneg open Lean Meta Mathlib Meta Positivity Qq in /-- The `positivity` extension which identifies expressions of the form `abv a`. -/ @[positivity (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_ :_: Ξ±Ξ±)] defΞ±: ?m.71047Mathlib.Meta.Positivity.evalAbv :Mathlib.Meta.Positivity.evalAbv: PositivityExtPositivityExt where eval {PositivityExt: Type__: ?m.69415_Ξ±}_Ξ±: ?m.69418_zΞ±_zΞ±: ?m.69421_pΞ±_pΞ±: ?m.69424e := do let (.appe: ?m.69427ff: Expra) β whnfRa: Expre |e: ?m.69427throwErrorthrowError "not abv Β·": ?m.69679 ?m.69680"not abv Β·" letthrowError "not abv Β·": ?m.69679 ?m.69680pa' β mkAppM ``pa': ?m.69581abv_nonneg #[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 xf,f: Expra] pure (a: Expr.nonnegative.nonnegative: {u : Level} β {Ξ± : Q(Type u)} β {zΞ± : Q(Zero Β«$Ξ±Β»)} β {pΞ± : Q(PartialOrder Β«$Ξ±Β»)} β {e : Q(Β«$Ξ±Β»)} β Q(0 β€ Β«$eΒ») β Strictness zΞ± pΞ± epa') lemmapa': ?m.69581abv_eq_zero {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 = 0x} :x: Rabvabv: R β Sx =x: ?m.711120 β0: ?m.71117x =x: ?m.711120 :=0: ?m.71346abv_eq_zero' #align is_absolute_value.abv_eq_zeroabv_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 = 0IsAbsoluteValue.abv_eq_zero lemmaIsAbsoluteValue.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 = 0abv_add (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 yxx: ?m.71692y) :y: ?m.71695abv (abv: R β Sx +x: ?m.71692y) β€y: ?m.71695abvabv: R β Sx +x: ?m.71692abvabv: R β Sy :=y: ?m.71695abv_add'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 yxx: Ry #align is_absolute_value.abv_addy: RIsAbsoluteValue.abv_add lemmaIsAbsoluteValue.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 yabv_mul (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 yxx: ?m.72548y) :y: ?m.72551abv (abv: R β Sx *x: ?m.72548y) =y: ?m.72551abvabv: R β Sx *x: ?m.72548abvabv: R β Sy :=y: ?m.72551abv_mul'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 yxx: Ry #align is_absolute_value.abv_muly: RIsAbsoluteValue.abv_mul /-- A bundled absolute value is an absolute value. -/ instanceIsAbsoluteValue.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_root_.AbsoluteValue.isAbsoluteValue (_root_.AbsoluteValue.isAbsoluteValue: β {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : AbsoluteValue R S), IsAbsoluteValue βabvabv :abv: AbsoluteValue R SAbsoluteValueAbsoluteValue: (R : Type ?u.73318) β (S : Type ?u.73317) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.73318?u.73317)RR: Type ?u.73265S) :S: Type ?u.73259IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.73339} β [inst : OrderedSemiring S] β {R : Type ?u.73338} β [inst : Semiring R] β (R β S) β Propabv where abv_nonneg' :=abv: AbsoluteValue R Sabv.abv: AbsoluteValue R Snonneg abv_eq_zero' :=nonneg: β {R : Type ?u.73799} {S : Type ?u.73798} [inst : Semiring R] [inst_1 : OrderedSemiring S] (abv : AbsoluteValue R S) (x : R), 0 β€ βabv xabv.abv: AbsoluteValue R Seq_zero abv_add' :=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 = 0abv.abv: AbsoluteValue R Sadd_le abv_mul' :=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 yabv.map_mul #align absolute_value.is_absolute_valueabv: AbsoluteValue R SAbsoluteValue.isAbsoluteValue /-- Convert an unbundled `IsAbsoluteValue` to a bundled `AbsoluteValue`. -/ @[AbsoluteValue.isAbsoluteValue: β {S : Type u_1} [inst : OrderedSemiring S] {R : Type u_2} [inst_1 : Semiring R] (abv : AbsoluteValue R S), IsAbsoluteValue βabvsimps] defsimps: β {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 atoAbsoluteValue :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 SAbsoluteValueAbsoluteValue: (R : Type ?u.74334) β (S : Type ?u.74333) β [inst : Semiring R] β [inst : OrderedSemiring S] β Type (max?u.74334?u.74333)RR: Type ?u.74281S where toFun :=S: Type ?u.74275abv add_le' :=abv: R β Sabv_add' eq_zero'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_ :=_: ?m.74856abv_eq_zero' nonneg' :=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 = 0abv_nonneg' map_mul' :=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 xabv_mul' #align is_absolute_value.to_absolute_valueabv_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 yIsAbsoluteValue.toAbsoluteValue #align is_absolute_value.to_absolute_value_applyIsAbsoluteValue.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 SIsAbsoluteValue.toAbsoluteValue_apply #align is_absolute_value.to_absolute_value_to_mul_hom_applyIsAbsoluteValue.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 aIsAbsoluteValue.toAbsoluteValue_apply theoremIsAbsoluteValue.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 aabv_zero :abv_zero: abv 0 = 0abvabv: R β S0 =0: ?m.751720 := map_zero (0: ?m.75345toAbsoluteValuetoAbsoluteValue: {S : Type ?u.75583} β [inst : OrderedSemiring S] β {R : Type ?u.75582} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv) #align is_absolute_value.abv_zeroabv: R β SIsAbsoluteValue.abv_zero theorem abv_pos {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 = 0a :a: RR} :R: Type ?u.761250 <0: ?m.76181abvabv: R β Sa βa: Ra βa: R0 := (0: ?m.76510toAbsoluteValuetoAbsoluteValue: {S : Type ?u.76685} β [inst : OrderedSemiring S] β {R : Type ?u.76684} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β Spos_iff #align is_absolute_value.abv_pospos_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 β 0IsAbsoluteValue.abv_pos end OrderedSemiring section LinearOrderedRing variable {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 β 0S :S: Type ?u.76787Type _} [LinearOrderedRingType _: Type (?u.76787+1)S] instanceS: Type ?u.76781abs_isAbsoluteValue :abs_isAbsoluteValue: β {S : Type u_1} [inst : LinearOrderedRing S], IsAbsoluteValue absIsAbsoluteValue (abs :IsAbsoluteValue: {S : Type ?u.76794} β [inst : OrderedSemiring S] β {R : Type ?u.76793} β [inst : Semiring R] β (R β S) β PropS βS: Type ?u.76787S) :=S: Type ?u.76787AbsoluteValue.abs.AbsoluteValue.abs: {S : Type ?u.77088} β [inst : LinearOrderedRing S] β AbsoluteValue S SisAbsoluteValue #align is_absolute_value.abs_is_absolute_valueisAbsoluteValue: β {S : Type ?u.77095} [inst : OrderedSemiring S] {R : Type ?u.77094} [inst_1 : Semiring R] (abv : AbsoluteValue R S), IsAbsoluteValue βabvIsAbsoluteValue.abs_isAbsoluteValue end LinearOrderedRing section OrderedRing variable {IsAbsoluteValue.abs_isAbsoluteValue: β {S : Type u_1} [inst : LinearOrderedRing S], IsAbsoluteValue absS :S: Type ?u.77187Type _} [OrderedRingType _: Type (?u.77335+1)S] section Semiring variable {S: Type ?u.77181R :R: Type ?u.77193Type _} [SemiringType _: Type (?u.77341+1)R] (R: Type ?u.77193abv :abv: R β SR βR: Type ?u.77574S) [S: Type ?u.78792IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.77585} β [inst : OrderedSemiring S] β {R : Type ?u.77584} β [inst : Semiring R] β (R β S) β Propabv] variable [IsDomainabv: R β SS] theoremS: Type ?u.77335abv_one [Nontrivialabv_one: β [inst : Nontrivial R], abv 1 = 1R] :R: Type ?u.77574abvabv: R β S1 =1: ?m.778061 := (1: ?m.77845toAbsoluteValuetoAbsoluteValue: {S : Type ?u.77998} β [inst : OrderedSemiring S] β {R : Type ?u.77997} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β Smap_one #align is_absolute_value.abv_onemap_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 = 1IsAbsoluteValue.abv_one /-- `abv` as a `MonoidWithZeroHom`. -/ defIsAbsoluteValue.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 = 1abvHom [NontrivialabvHom: [inst : Nontrivial R] β R β*β SR] :R: Type ?u.78190R β*βR: Type ?u.78190S := (S: Type ?u.78184toAbsoluteValuetoAbsoluteValue: {S : Type ?u.78569} β [inst : OrderedSemiring S] β {R : Type ?u.78568} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β StoMonoidWithZeroHom #align is_absolute_value.abv_homtoMonoidWithZeroHom: {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 β*β SIsAbsoluteValue.abvHom theoremIsAbsoluteValue.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 β*β Sabv_pow [Nontrivialabv_pow: β [inst : Nontrivial R] (abv : R β S) [inst : IsAbsoluteValue abv] (a : R) (n : β), abv (a ^ n) = abv a ^ nR] (R: Type ?u.78798abv :abv: R β SR βR: Type ?u.78798S) [S: Type ?u.78792IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.79033} β [inst : OrderedSemiring S] β {R : Type ?u.79032} β [inst : Semiring R] β (R β S) β Propabv] (abv: R β Sa :a: RR) (R: Type ?u.78798n :n: ββ) :β: Typeabv (abv: R β Sa ^a: Rn) =n: βabvabv: R β Sa ^a: Rn := map_pow (n: βtoAbsoluteValuetoAbsoluteValue: {S : Type ?u.79573} β [inst : OrderedSemiring S] β {R : Type ?u.79572} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv)abv: R β Saa: Rn #align is_absolute_value.abv_pown: βIsAbsoluteValue.abv_pow end Semiring section Ring variable {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 ^ nR :R: Type ?u.80372Type _} [RingType _: Type (?u.80055+1)R] (R: Type ?u.80055abv :abv: R β SR βR: Type ?u.80055S) [S: Type ?u.80049IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.80066} β [inst : OrderedSemiring S] β {R : Type ?u.80065} β [inst : Semiring R] β (R β S) β Propabv] theoremabv: R β Sabv_sub_le (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)aa: Rbb: Rc :c: RR) :R: Type ?u.80372abv (abv: R β Sa -a: Rc) β€c: Rabv (abv: R β Sa -a: Rb) +b: Rabv (abv: R β Sb -b: Rc) :=c: RGoals 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#align is_absolute_value.abv_sub_leGoals accomplished! πIsAbsoluteValue.abv_sub_le theoremIsAbsoluteValue.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)sub_abv_le_abv_sub (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)aa: Rb :b: RR) :R: Type ?u.83601abvabv: R β Sa -a: Rabvabv: R β Sb β€b: Rabv (abv: R β Sa -a: Rb) := (b: RtoAbsoluteValuetoAbsoluteValue: {S : Type ?u.84188} β [inst : OrderedSemiring S] β {R : Type ?u.84187} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β Sle_suble_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)aa: Rb #align is_absolute_value.sub_abv_le_abv_subb: RIsAbsoluteValue.sub_abv_le_abv_sub end Ring end OrderedRing section OrderedCommRing variable {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)S :S: Type ?u.84529Type _} [OrderedCommRingType _: Type (?u.84535+1)S] section Ring variable {S: Type ?u.86188R :R: Type ?u.86194Type _} [RingType _: Type (?u.85335+1)R] (R: Type ?u.84541abv :abv: R β SR βR: Type ?u.84541S) [S: Type ?u.84535IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.84552} β [inst : OrderedSemiring S] β {R : Type ?u.84551} β [inst : Semiring R] β (R β S) β Propabv] variable [NoZeroDivisorsabv: R β SS] theoremS: Type ?u.84810abv_neg (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 aa :a: RR) :R: Type ?u.85335abv (-abv: R β Sa) =a: Rabvabv: R β Sa := (a: RtoAbsoluteValuetoAbsoluteValue: {S : Type ?u.85878} β [inst : OrderedSemiring S] β {R : Type ?u.85877} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β Smap_negmap_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 aa #align is_absolute_value.abv_nega: RIsAbsoluteValue.abv_neg theorem abv_sub (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 aaa: Rb :b: RR) :R: Type ?u.86194abv (abv: R β Sa -a: Rb) =b: Rabv (abv: R β Sb -b: Ra) := (a: RtoAbsoluteValuetoAbsoluteValue: {S : Type ?u.86811} β [inst : OrderedSemiring S] β {R : Type ?u.86810} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β Smap_submap_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)aa: Rb #align is_absolute_value.abv_subb: RIsAbsoluteValue.abv_sub end Ring end OrderedCommRing section LinearOrderedCommRing variable {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)S :S: Type ?u.87129Type _} [LinearOrderedCommRingType _: Type (?u.87123+1)S] section Ring variable {S: Type ?u.87123R :R: Type ?u.87396Type _} [RingType _: Type (?u.87135+1)R] (R: Type ?u.87135abv :abv: R β SR βR: Type ?u.87135S) [S: Type ?u.87390IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.87146} β [inst : OrderedSemiring S] β {R : Type ?u.87145} β [inst : Semiring R] β (R β S) β Propabv] theoremabv: R β Sabs_abv_sub_le_abv_sub (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)aa: Rb :b: RR) : abs (R: Type ?u.87396abvabv: R β Sa -a: Rabvabv: R β Sb) β€b: Rabv (abv: R β Sa -a: Rb) := (b: RtoAbsoluteValuetoAbsoluteValue: {S : Type ?u.87973} β [inst : OrderedSemiring S] β {R : Type ?u.87972} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β Sabs_abv_sub_le_abv_subabs_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)aa: Rb #align is_absolute_value.abs_abv_sub_le_abv_subb: RIsAbsoluteValue.abs_abv_sub_le_abv_sub end Ring end LinearOrderedCommRing section LinearOrderedField variable {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)S :S: Type ?u.90880Type _} [LinearOrderedSemifieldType _: Type (?u.88273+1)S] section Semiring variable {S: Type ?u.88273R :R: Type ?u.88373Type _} [SemiringType _: Type (?u.88285+1)R] [NontrivialR: Type ?u.88285R] (R: Type ?u.88285abv :abv: R β SR βR: Type ?u.88285S) [S: Type ?u.88279IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.88299} β [inst : OrderedSemiring S] β {R : Type ?u.88298} β [inst : Semiring R] β (R β S) β Propabv] theoremabv: R β Sabv_one' :abv_one': abv 1 = 1abvabv: R β S1 =1: ?m.884571 := (1: ?m.88496toAbsoluteValuetoAbsoluteValue: {S : Type ?u.88574} β [inst : OrderedSemiring S] β {R : Type ?u.88573} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β Smap_one_of_isLeftRegular <| (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 = 1isRegular_of_ne_zero <| (isRegular_of_ne_zero: β {R : Type ?u.88657} [inst : CancelMonoidWithZero R] {a : R}, a β 0 β IsRegular atoAbsoluteValuetoAbsoluteValue: {S : Type ?u.88662} β [inst : OrderedSemiring S] β {R : Type ?u.88661} β [inst_1 : Semiring R] β (abv : R β S) β [inst_2 : IsAbsoluteValue abv] β AbsoluteValue R Sabv).abv: R β Sne_zero one_ne_zero).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 β 0left #align is_absolute_value.abv_one'left: β {R : Type ?u.89955} [inst : Mul R] {c : R}, IsRegular c β IsLeftRegular cIsAbsoluteValue.abv_one' /-- An absolute value as a monoid with zero homomorphism, assuming the target is a semifield. -/ defIsAbsoluteValue.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 = 1abvHom' :abvHom': R β*β SR β*βR: Type ?u.90155S := β¨β¨S: Type ?u.90149abv,abv: R β Sabv_zeroabv_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 = 0abvβ©,abv: R β Sabv_one'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 = 1abv,abv: R β Sabv_mulabv_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 yabvβ© #align is_absolute_value.abv_hom'abv: R β SIsAbsoluteValue.abvHom' end Semiring section DivisionSemiring variable {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 β*β SR :R: Type ?u.91080Type _} [DivisionSemiringType _: Type (?u.92071+1)R] (R: Type ?u.90886abv :abv: R β SR βR: Type ?u.90886S) [S: Type ?u.90880IsAbsoluteValueIsAbsoluteValue: {S : Type ?u.91091} β [inst : OrderedSemiring S] β {R : Type ?u.91090} β [inst : Semiring R] β (R β S) β Propabv] theorem abv_inv (abv: R β Sa :a: RR) :R: Type ?u.91080abvabv: R β Saβ»ΒΉ = (a: Rabvabv: R β Sa)β»ΒΉ :=a: Rmap_invβ (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)β»ΒΉabvHom'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 β*β Sabv)abv: R β Sa #align is_absolute_value.abv_inva: RIsAbsoluteValue.abv_inv theorem abv_div (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)β»ΒΉaa: Rb :b: RR) :R: Type ?u.92071abv (abv: R β Sa /a: Rb) =b: Rabvabv: R β Sa /a: Rabvabv: R β Sb :=b: Rmap_divβ (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 babvHom'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 β*β Sabv)abv: R β Saa: Rb #align is_absolute_value.abv_divb: RIsAbsoluteValue.abv_div end DivisionSemiring end LinearOrderedField end IsAbsoluteValueIsAbsoluteValue.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