Skip to content

Commit afca995

Browse files
Impl one_sub_one_div_cast_* theorems
1 parent 89b7100 commit afca995

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Mathlib/Data/Nat/Cast/Order/Field.lean

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ This file concerns the canonical homomorphism `ℕ → F`, where `F` is a `Linea
1818

1919
namespace Nat
2020

21+
section LinearOrderedSemifield
22+
2123
variable {α : Type*} [Semifield α] [LinearOrder α] [IsStrictOrderedRing α]
2224

2325
lemma cast_inv_le_one : ∀ n : ℕ, (n⁻¹ : α) ≤ 1
@@ -57,4 +59,20 @@ theorem one_div_cast_nonneg (n : ℕ) : 0 ≤ 1 / (n : α) := one_div_nonneg.mpr
5759
theorem one_div_cast_ne_zero {n : ℕ} (hn : n ≠ 0) : 1 / (n : α) ≠ 0 :=
5860
_root_.ne_of_gt (one_div_cast_pos hn)
5961

62+
end LinearOrderedSemifield
63+
64+
section LinearOrderedField
65+
66+
variable {α : Type*} [Field α] [LinearOrder α] [IsStrictOrderedRing α]
67+
68+
theorem one_sub_one_div_cast_nonneg [AddRightMono α] (n : ℕ) : 01 - 1 / (n : α) := by
69+
rw [sub_nonneg, one_div]
70+
exact cast_inv_le_one n
71+
72+
theorem one_sub_one_div_cast_le_one [AddLeftMono α] (n : ℕ) : 1 - 1 / (n : α) ≤ 1 := by
73+
rw [sub_le_self_iff]
74+
exact one_div_cast_nonneg n
75+
76+
end LinearOrderedField
77+
6078
end Nat

0 commit comments

Comments
 (0)