Documentation

Mathlib.Algebra.Order.Ring.Cast

Order properties of cast of integers #

This file proves additional properties about the canonical homomorphism from the integers into an additive group with a one (Int.cast), particularly results involving algebraic homomorphisms or the order structure on โ„ค which were not available in the import dependencies of Mathlib/Data/Int/Cast/Basic.lean.

TODO #

Move order lemmas about Nat.cast, Rat.cast, NNRat.cast here.

@[simp]
theorem Int.cast_nonneg {R : Type u_1} [AddCommGroupWithOne R] [PartialOrder R] [AddLeftMono R] [ZeroLEOneClass R] {n : โ„ค} :
0 โ‰ค n โ†’ 0 โ‰ค โ†‘n
@[simp]
theorem Int.cast_le {R : Type u_1} [AddCommGroupWithOne R] [PartialOrder R] [AddLeftMono R] [ZeroLEOneClass R] [NeZero 1] {m n : โ„ค} :
โ†‘m โ‰ค โ†‘n โ†” m โ‰ค n
@[simp]
theorem Int.cast_lt {R : Type u_1} [AddCommGroupWithOne R] [PartialOrder R] [AddLeftMono R] [ZeroLEOneClass R] [NeZero 1] {m n : โ„ค} :
โ†‘m < โ†‘n โ†” m < n
@[simp]
theorem Int.cast_pos {R : Type u_1} [AddCommGroupWithOne R] [PartialOrder R] [AddLeftMono R] [ZeroLEOneClass R] [NeZero 1] {n : โ„ค} :
0 < โ†‘n โ†” 0 < n
@[simp]
theorem Int.cast_min {R : Type u_1} [Ring R] [LinearOrder R] [IsStrictOrderedRing R] {a b : โ„ค} :
โ†‘(min a b) = min โ†‘a โ†‘b
@[simp]
theorem Int.cast_max {R : Type u_1} [Ring R] [LinearOrder R] [IsStrictOrderedRing R] {a b : โ„ค} :
โ†‘(max a b) = max โ†‘a โ†‘b
@[simp]
theorem Int.cast_abs {R : Type u_1} [Ring R] [LinearOrder R] [IsStrictOrderedRing R] {a : โ„ค} :
โ†‘|a| = |โ†‘a|
theorem Int.nneg_mul_add_sq_of_abs_le_one {R : Type u_1} [Ring R] [LinearOrder R] [IsStrictOrderedRing R] {x : R} (n : โ„ค) (hx : |x| โ‰ค 1) :
0 โ‰ค โ†‘n * x + โ†‘n * โ†‘n
@[deprecated Nat.cast_natAbs (since := "2025-11-07")]
theorem Int.cast_natAbs {ฮฑ : Type u_1} [AddGroupWithOne ฮฑ] (n : โ„ค) :
โ†‘n.natAbs = โ†‘|n|

Alias of Nat.cast_natAbs.

Order dual #

@[simp]
theorem toDual_intCast {R : Type u_1} [IntCast R] (n : โ„ค) :
OrderDual.toDual โ†‘n = โ†‘n
@[simp]
theorem ofDual_intCast {R : Type u_1} [IntCast R] (n : โ„ค) :
OrderDual.ofDual โ†‘n = โ†‘n

Lexicographic order #

instance Lex.instIntCast {R : Type u_1} [IntCast R] :
Equations
    @[simp]
    theorem toLex_intCast {R : Type u_1} [IntCast R] (n : โ„ค) :
    toLex โ†‘n = โ†‘n
    @[simp]
    theorem ofLex_intCast {R : Type u_1} [IntCast R] (n : โ„ค) :
    ofLex โ†‘n = โ†‘n