Documentation

Mathlib.Data.Nat.Cast.Order

Cast of natural numbers: lemmas about order #

theorem Nat.mono_cast {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] :
Monotone Nat.cast
@[simp]
theorem Nat.cast_nonneg' {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] (n : ) :
0 n
@[simp]
theorem Nat.cast_nonneg {α : Type u_3} [OrderedSemiring α] (n : ) :
0 n
@[simp]
theorem Nat.cast_min {α : Type u_3} [LinearOrderedSemiring α] {a : } {b : } :
↑(min a b) = min a b
@[simp]
theorem Nat.cast_max {α : Type u_3} [LinearOrderedSemiring α] {a : } {b : } :
↑(max a b) = max a b
theorem Nat.cast_add_one_pos {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [NeZero 1] (n : ) :
0 < n + 1
@[simp]
theorem Nat.cast_pos' {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [NeZero 1] {n : } :
0 < n 0 < n
@[simp]
theorem Nat.cast_pos {α : Type u_3} [OrderedSemiring α] [Nontrivial α] {n : } :
0 < n 0 < n
theorem Nat.strictMono_cast {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] :
StrictMono Nat.cast
@[simp]
theorem Nat.castOrderEmbedding_apply {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] :
Nat.castOrderEmbedding = Nat.cast
def Nat.castOrderEmbedding {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] :

Nat.cast : ℕ → α as an OrderEmbedding

Instances For
    @[simp]
    theorem Nat.cast_le {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] {m : } {n : } :
    m n m n
    @[simp]
    theorem Nat.cast_lt {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] {m : } {n : } :
    m < n m < n
    @[simp]
    theorem Nat.one_lt_cast {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] {n : } :
    1 < n 1 < n
    @[simp]
    theorem Nat.one_le_cast {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] {n : } :
    1 n 1 n
    @[simp]
    theorem Nat.cast_lt_one {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] {n : } :
    n < 1 n = 0
    @[simp]
    theorem Nat.cast_le_one {α : Type u_1} [AddCommMonoidWithOne α] [PartialOrder α] [CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] [ZeroLEOneClass α] [CharZero α] {n : } :
    n 1 n 1
    @[simp]
    theorem Nat.cast_tsub {α : Type u_1} [CanonicallyOrderedCommSemiring α] [Sub α] [OrderedSub α] [ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] (m : ) (n : ) :
    ↑(m - n) = m - n

    A version of Nat.cast_sub that works for ℝ≥0 and ℚ≥0. Note that this proof doesn't work for ℕ∞ and ℝ≥0∞, so we use type-specific lemmas for these types.

    @[simp]
    theorem Nat.abs_cast {α : Type u_1} [LinearOrderedRing α] (a : ) :
    |a| = a
    theorem NeZero.nat_of_injective {R : Type u_3} {S : Type u_4} {F : Type u_5} [NonAssocSemiring R] [NonAssocSemiring S] {n : } [h : NeZero n] [RingHomClass F R S] {f : F} (hf : Function.Injective f) :
    NeZero n