File: Mathlib/Algebra/Order/AbsoluteValue.lean

full_name: AbsoluteValue
code: /-- `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 S : Type*) [Semiring R] [OrderedSemiring S] extends R →ₙ* S where
  /-- The absolute value is nonnegative -/
  nonneg' : ∀ x, 0 ≤ toFun x
  /-- The absolute value is positive definitive -/
  eq_zero' : ∀ x, toFun x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  add_le' : ∀ x y, toFun (x + y) ≤ toFun x + toFun y
goal: Type (max u_5 u_6)

full_name: AbsoluteValue.eq_zero'
code: /-- `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 S : Type*) [Semiring R] [OrderedSemiring S] extends R →ₙ* S where
  /-- The absolute value is nonnegative -/
  nonneg' : ∀ x, 0 ≤ toFun x
  /-- The absolute value is positive definitive -/
  eq_zero' : ∀ x, toFun x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  add_le' : ∀ x y, toFun (x + y) ≤ toFun x + toFun y
goal: self.toFun x = 0 ↔ x = 0

full_name: AbsoluteValue.add_le'
code: /-- `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 S : Type*) [Semiring R] [OrderedSemiring S] extends R →ₙ* S where
  /-- The absolute value is nonnegative -/
  nonneg' : ∀ x, 0 ≤ toFun x
  /-- The absolute value is positive definitive -/
  eq_zero' : ∀ x, toFun x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  add_le' : ∀ x y, toFun (x + y) ≤ toFun x + toFun y
goal: self.toFun (x + y) ≤ self.toFun x + self.toFun y

full_name: AbsoluteValue.nonneg'
code: /-- `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 S : Type*) [Semiring R] [OrderedSemiring S] extends R →ₙ* S where
  /-- The absolute value is nonnegative -/
  nonneg' : ∀ x, 0 ≤ toFun x
  /-- The absolute value is positive definitive -/
  eq_zero' : ∀ x, toFun x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  add_le' : ∀ x y, toFun (x + y) ≤ toFun x + toFun y
goal: 0 ≤ self.toFun x

full_name: AbsoluteValue.funLike
code: instance funLike : FunLike (AbsoluteValue R S) R S 
goal: FunLike (AbsoluteValue R S) R S

full_name: AbsoluteValue.zeroHomClass
code: instance zeroHomClass : ZeroHomClass (AbsoluteValue R S) R S 
goal: ZeroHomClass (AbsoluteValue R S) R S

full_name: AbsoluteValue.mulHomClass
code: instance mulHomClass : MulHomClass (AbsoluteValue R S) R S 
goal: MulHomClass (AbsoluteValue R S) R S

full_name: AbsoluteValue.nonnegHomClass
code: instance nonnegHomClass : NonnegHomClass (AbsoluteValue R S) R S 
goal: NonnegHomClass (AbsoluteValue R S) R S

full_name: AbsoluteValue.subadditiveHomClass
code: instance subadditiveHomClass : SubadditiveHomClass (AbsoluteValue R S) R S 
goal: SubadditiveHomClass (AbsoluteValue R S) R S

full_name: AbsoluteValue.coe_mk
code: @[simp]
theorem coe_mk (f : R →ₙ* S) {h₁ h₂ h₃} : (AbsoluteValue.mk f h₁ h₂ h₃ : R → S) = f 
goal: ⇑{ toMulHom := f, nonneg' := h₁, eq_zero' := h₂, add_le' := h₃ } = ⇑f

full_name: AbsoluteValue.ext
code: @[ext]
theorem ext ⦃f g : AbsoluteValue R S⦄ : (∀ x, f x = g x) → f = g 
goal: (∀ (x : R), f x = g x) → f = g

full_name: AbsoluteValue.Simps.apply
code: /-- See Note [custom simps projection]. -/
def Simps.apply (f : AbsoluteValue R S) : R → S 
goal: R → S

full_name: AbsoluteValue.instCoeFunForall
code: /-- Helper instance for when there's too many metavariables to apply `DFunLike.has_coe_to_fun`
directly. -/
instance : CoeFun (AbsoluteValue R S) fun _ => R → S 
goal: CoeFun (AbsoluteValue R S) fun x => R → S

full_name: AbsoluteValue.coe_toMulHom
code: @[simp]
theorem coe_toMulHom : ⇑abv.toMulHom = abv 
goal: ⇑abv.toMulHom = ⇑abv

full_name: AbsoluteValue.nonneg
code: protected theorem nonneg (x : R) : 0 ≤ abv x 
goal: 0 ≤ abv x

full_name: AbsoluteValue.eq_zero
code: @[simp]
protected theorem eq_zero {x : R} : abv x = 0 ↔ x = 0 
goal: abv x = 0 ↔ x = 0

full_name: AbsoluteValue.add_le
code: protected theorem add_le (x y : R) : abv (x + y) ≤ abv x + abv y 
goal: abv (x + y) ≤ abv x + abv y

full_name: AbsoluteValue.map_mul
code: protected theorem map_mul (x y : R) : abv (x * y) = abv x * abv y 
goal: abv (x * y) = abv x * abv y

full_name: AbsoluteValue.ne_zero_iff
code: protected theorem ne_zero_iff {x : R} : abv x ≠ 0 ↔ x ≠ 0 
goal: abv x ≠ 0 ↔ x ≠ 0

full_name: AbsoluteValue.pos
code: protected theorem pos {x : R} (hx : x ≠ 0) : 0 < abv x 
goal: 0 < abv x

full_name: AbsoluteValue.pos_iff
code: @[simp]
protected theorem pos_iff {x : R} : 0 < abv x ↔ x ≠ 0 
goal: 0 < abv x ↔ x ≠ 0

full_name: AbsoluteValue.ne_zero
code: protected theorem ne_zero {x : R} (hx : x ≠ 0) : abv x ≠ 0 
goal: abv x ≠ 0

full_name: AbsoluteValue.map_one_of_isLeftRegular
code: theorem map_one_of_isLeftRegular (h : IsLeftRegular (abv 1)) : abv 1 = 1 
goal: abv 1 = 1

full_name: AbsoluteValue.map_zero
code: protected theorem map_zero : abv 0 = 0 
goal: abv 0 = 0

full_name: AbsoluteValue.sub_le
code: protected theorem sub_le (a b c : R) : abv (a - c) ≤ abv (a - b) + abv (b - c) 
goal: abv (a - c) ≤ abv (a - b) + abv (b - c)

full_name: AbsoluteValue.map_sub_eq_zero_iff
code: @[simp high] -- Porting note: added `high` to apply it before `AbsoluteValue.eq_zero`
theorem map_sub_eq_zero_iff (a b : R) : abv (a - b) = 0 ↔ a = b 
goal: abv (a - b) = 0 ↔ a = b

full_name: AbsoluteValue.map_one
code: protected theorem map_one : abv 1 = 1 
goal: abv 1 = 1

full_name: AbsoluteValue.monoidWithZeroHomClass
code: instance monoidWithZeroHomClass : MonoidWithZeroHomClass (AbsoluteValue R S) R S 
goal: MonoidWithZeroHomClass (AbsoluteValue R S) R S

full_name: AbsoluteValue.toMonoidWithZeroHom
code: /-- Absolute values from a nontrivial `R` to a linear ordered ring preserve `*`, `0` and `1`. -/
def toMonoidWithZeroHom : R →*₀ S 
goal: R →*₀ S

full_name: AbsoluteValue.coe_toMonoidWithZeroHom
code: @[simp]
theorem coe_toMonoidWithZeroHom : ⇑abv.toMonoidWithZeroHom = abv 
goal: ⇑abv.toMonoidWithZeroHom = ⇑abv

full_name: AbsoluteValue.toMonoidHom
code: /-- Absolute values from a nontrivial `R` to a linear ordered ring preserve `*` and `1`. -/
def toMonoidHom : R →* S 
goal: R →* S

full_name: AbsoluteValue.coe_toMonoidHom
code: @[simp]
theorem coe_toMonoidHom : ⇑abv.toMonoidHom = abv 
goal: ⇑abv.toMonoidHom = ⇑abv

full_name: AbsoluteValue.map_pow
code: protected theorem map_pow (a : R) (n : ℕ) : abv (a ^ n) = abv a ^ n 
goal: abv (a ^ n) = abv a ^ n

full_name: AbsoluteValue.le_sub
code: protected theorem le_sub (a b : R) : abv a - abv b ≤ abv (a - b) 
goal: abv a - abv b ≤ abv (a - b)

full_name: AbsoluteValue.map_neg
code: @[simp]
protected theorem map_neg (a : R) : abv (-a) = abv a 
goal: abv (-a) = abv a

full_name: AbsoluteValue.map_sub
code: protected theorem map_sub (a b : R) : abv (a - b) = abv (b - a) 
goal: abv (a - b) = abv (b - a)

full_name: AbsoluteValue.le_add
code: /-- Bound `abv (a + b)` from below -/
protected theorem le_add (a b : R) : abv a - abv b ≤ abv (a + b) 
goal: abv a - abv b ≤ abv (a + b)

full_name: AbsoluteValue.sub_le_add
code: /-- Bound `abv (a - b)` from above -/
lemma sub_le_add (a b : R) : abv (a - b) ≤ abv a + abv b 
goal: abv (a - b) ≤ abv a + abv b

full_name: AbsoluteValue.instMulRingNormClassOfNontrivialOfIsDomain
code: instance [Nontrivial R] [IsDomain S] : MulRingNormClass (AbsoluteValue R S) R S 
goal: MulRingNormClass (AbsoluteValue R S) R S

full_name: AbsoluteValue.abs
code: /-- `AbsoluteValue.abs` is `abs` as a bundled `AbsoluteValue`. -/
@[simps]
protected def abs : AbsoluteValue S S 
goal: AbsoluteValue S S

full_name: AbsoluteValue.abs_apply
code: /-- `AbsoluteValue.abs` is `abs` as a bundled `AbsoluteValue`. -/
@[simps]
protected def abs : AbsoluteValue S S 
goal: AbsoluteValue.abs a = |a|

full_name: AbsoluteValue.abs_toFun
code: /-- `AbsoluteValue.abs` is `abs` as a bundled `AbsoluteValue`. -/
@[simps]
protected def abs : AbsoluteValue S S 
goal: AbsoluteValue.abs a = |a|

full_name: AbsoluteValue.instInhabited
code: instance : Inhabited (AbsoluteValue S S) 
goal: Inhabited (AbsoluteValue S S)

full_name: AbsoluteValue.abs_abv_sub_le_abv_sub
code: theorem abs_abv_sub_le_abv_sub (a b : R) : abs (abv a - abv b) ≤ abv (a - b) 
goal: |abv a - abv b| ≤ abv (a - b)

full_name: IsAbsoluteValue.abv_eq_zero'
code: /-- 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} [OrderedSemiring S] {R} [Semiring R] (f : R → S) : Prop where
  /-- The absolute value is nonnegative -/
  abv_nonneg' : ∀ x, 0 ≤ f x
  /-- The absolute value is positive definitive -/
  abv_eq_zero' : ∀ {x}, f x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  abv_add' : ∀ x y, f (x + y) ≤ f x + f y
  /-- The absolute value is multiplicative -/
  abv_mul' : ∀ x y, f (x * y) = f x * f y
goal: f x = 0 ↔ x = 0

full_name: IsAbsoluteValue.abv_mul'
code: /-- 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} [OrderedSemiring S] {R} [Semiring R] (f : R → S) : Prop where
  /-- The absolute value is nonnegative -/
  abv_nonneg' : ∀ x, 0 ≤ f x
  /-- The absolute value is positive definitive -/
  abv_eq_zero' : ∀ {x}, f x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  abv_add' : ∀ x y, f (x + y) ≤ f x + f y
  /-- The absolute value is multiplicative -/
  abv_mul' : ∀ x y, f (x * y) = f x * f y
goal: f (x * y) = f x * f y

full_name: IsAbsoluteValue.abv_add'
code: /-- 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} [OrderedSemiring S] {R} [Semiring R] (f : R → S) : Prop where
  /-- The absolute value is nonnegative -/
  abv_nonneg' : ∀ x, 0 ≤ f x
  /-- The absolute value is positive definitive -/
  abv_eq_zero' : ∀ {x}, f x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  abv_add' : ∀ x y, f (x + y) ≤ f x + f y
  /-- The absolute value is multiplicative -/
  abv_mul' : ∀ x y, f (x * y) = f x * f y
goal: f (x + y) ≤ f x + f y

full_name: IsAbsoluteValue.abv_nonneg'
code: /-- 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} [OrderedSemiring S] {R} [Semiring R] (f : R → S) : Prop where
  /-- The absolute value is nonnegative -/
  abv_nonneg' : ∀ x, 0 ≤ f x
  /-- The absolute value is positive definitive -/
  abv_eq_zero' : ∀ {x}, f x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  abv_add' : ∀ x y, f (x + y) ≤ f x + f y
  /-- The absolute value is multiplicative -/
  abv_mul' : ∀ x y, f (x * y) = f x * f y
goal: 0 ≤ f x

full_name: IsAbsoluteValue
code: /-- 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} [OrderedSemiring S] {R} [Semiring R] (f : R → S) : Prop where
  /-- The absolute value is nonnegative -/
  abv_nonneg' : ∀ x, 0 ≤ f x
  /-- The absolute value is positive definitive -/
  abv_eq_zero' : ∀ {x}, f x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  abv_add' : ∀ x y, f (x + y) ≤ f x + f y
  /-- The absolute value is multiplicative -/
  abv_mul' : ∀ x y, f (x * y) = f x * f y
goal: Prop

full_name: IsAbsoluteValue.abv_nonneg
code: lemma abv_nonneg (x) : 0 ≤ abv x 
goal: 0 ≤ abv x

full_name: IsAbsoluteValue.Mathlib.Meta.Positivity.evalAbv
code: /-- The `positivity` extension which identifies expressions of the form `abv a`. -/
@[positivity _]
def Mathlib.Meta.Positivity.evalAbv : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt

full_name: IsAbsoluteValue.abv_eq_zero
code: lemma abv_eq_zero {x} : abv x = 0 ↔ x = 0 
goal: abv x = 0 ↔ x = 0

full_name: IsAbsoluteValue.abv_add
code: lemma abv_add (x y) : abv (x + y) ≤ abv x + abv y 
goal: abv (x + y) ≤ abv x + abv y

full_name: IsAbsoluteValue.abv_mul
code: lemma abv_mul (x y) : abv (x * y) = abv x * abv y 
goal: abv (x * y) = abv x * abv y

full_name: AbsoluteValue.isAbsoluteValue
code: /-- A bundled absolute value is an absolute value. -/
instance _root_.AbsoluteValue.isAbsoluteValue (abv : AbsoluteValue R S) : IsAbsoluteValue abv 
goal: IsAbsoluteValue ⇑abv

full_name: IsAbsoluteValue.toAbsoluteValue
code: /-- Convert an unbundled `IsAbsoluteValue` to a bundled `AbsoluteValue`. -/
@[simps]
def toAbsoluteValue : AbsoluteValue R S 
goal: AbsoluteValue R S

full_name: IsAbsoluteValue.toAbsoluteValue_toFun
code: /-- Convert an unbundled `IsAbsoluteValue` to a bundled `AbsoluteValue`. -/
@[simps]
def toAbsoluteValue : AbsoluteValue R S 
goal: ∀ (a : R), (IsAbsoluteValue.toAbsoluteValue abv) a = abv a

full_name: IsAbsoluteValue.toAbsoluteValue_apply
code: /-- Convert an unbundled `IsAbsoluteValue` to a bundled `AbsoluteValue`. -/
@[simps]
def toAbsoluteValue : AbsoluteValue R S 
goal: ∀ (a : R), (IsAbsoluteValue.toAbsoluteValue abv) a = abv a

full_name: IsAbsoluteValue.abv_zero
code: theorem abv_zero : abv 0 = 0 
goal: abv 0 = 0

full_name: IsAbsoluteValue.abv_pos
code: theorem abv_pos {a : R} : 0 < abv a ↔ a ≠ 0 
goal: 0 < abv a ↔ a ≠ 0

full_name: IsAbsoluteValue.abs_isAbsoluteValue
code: instance abs_isAbsoluteValue : IsAbsoluteValue (abs : S → S) 
goal: IsAbsoluteValue abs

full_name: IsAbsoluteValue.abv_one
code: theorem abv_one [Nontrivial R] : abv 1 = 1 
goal: abv 1 = 1

full_name: IsAbsoluteValue.abvHom
code: /-- `abv` as a `MonoidWithZeroHom`. -/
def abvHom [Nontrivial R] : R →*₀ S 
goal: R →*₀ S

full_name: IsAbsoluteValue.abv_pow
code: theorem abv_pow [Nontrivial R] (abv : R → S) [IsAbsoluteValue abv] (a : R) (n : ℕ) :
    abv (a ^ n) = abv a ^ n 
goal: abv (a ^ n) = abv a ^ n

full_name: IsAbsoluteValue.abv_sub_le
code: theorem abv_sub_le (a b c : R) : abv (a - c) ≤ abv (a - b) + abv (b - c) 
goal: abv (a - c) ≤ abv (a - b) + abv (b - c)

full_name: IsAbsoluteValue.sub_abv_le_abv_sub
code: theorem sub_abv_le_abv_sub (a b : R) : abv a - abv b ≤ abv (a - b) 
goal: abv a - abv b ≤ abv (a - b)

full_name: IsAbsoluteValue.abv_neg
code: theorem abv_neg (a : R) : abv (-a) = abv a 
goal: abv (-a) = abv a

full_name: IsAbsoluteValue.abv_sub
code: theorem abv_sub (a b : R) : abv (a - b) = abv (b - a) 
goal: abv (a - b) = abv (b - a)

full_name: IsAbsoluteValue.abs_abv_sub_le_abv_sub
code: theorem abs_abv_sub_le_abv_sub (a b : R) : abs (abv a - abv b) ≤ abv (a - b) 
goal: |abv a - abv b| ≤ abv (a - b)

full_name: IsAbsoluteValue.abv_one'
code: theorem abv_one' : abv 1 = 1 
goal: abv 1 = 1

full_name: IsAbsoluteValue.abvHom'
code: /-- An absolute value as a monoid with zero homomorphism, assuming the target is a semifield. -/
def abvHom' : R →*₀ S 
goal: R →*₀ S

full_name: IsAbsoluteValue.abv_inv
code: theorem abv_inv (a : R) : abv a⁻¹ = (abv a)⁻¹ 
goal: abv a⁻¹ = (abv a)⁻¹

full_name: IsAbsoluteValue.abv_div
code: theorem abv_div (a b : R) : abv (a / b) = abv a / abv b 
goal: abv (a / b) = abv a / abv b