Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit e22fb94

Browse files
committed
chore(data/nat/cast,algebra/ordered_group): 2 trivial lemmas (#5436)
1 parent 5de6757 commit e22fb94

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/algebra/ordered_group.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ lemma lt_inv' : a < b⁻¹ ↔ b < a⁻¹ :=
325325
have (a⁻¹)⁻¹ < b⁻¹ ↔ b < a⁻¹, from inv_lt_inv_iff,
326326
by rwa inv_inv at this
327327

328+
@[to_additive]
329+
lemma inv_lt_self (h : 1 < a) : a⁻¹ < a :=
330+
(inv_lt_one'.2 h).trans h
331+
328332
@[to_additive]
329333
lemma le_inv_mul_iff_mul_le : b ≤ a⁻¹ * c ↔ a * b ≤ c :=
330334
have a⁻¹ * (a * b) ≤ a⁻¹ * c ↔ a * b ≤ c, from mul_le_mul_iff_left _,

src/data/nat/cast.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ begin
270270
exact with_top.coe_le_coe.2 (with_top.coe_lt_coe.1 h)
271271
end
272272

273+
lemma one_le_iff_pos {n : with_top ℕ} : 1 ≤ n ↔ 0 < n :=
274+
⟨λ h, (coe_lt_coe.2 zero_lt_one).trans_le h,
275+
λ h, by simpa only [zero_add] using add_one_le_of_lt h⟩
276+
273277
@[elab_as_eliminator]
274278
lemma nat_induction {P : with_top ℕ → Prop} (a : with_top ℕ)
275279
(h0 : P 0) (hsuc : ∀n:ℕ, P n → P n.succ) (htop : (∀n : ℕ, P n) → P ⊤) : P a :=

0 commit comments

Comments
 (0)