Skip to content

Commit 664f0b3

Browse files
committed
feat: 0 < a0 < a + b (leanprover-community#37641)
1 parent 3f56d9a commit 664f0b3

5 files changed

Lines changed: 31 additions & 10 deletions

File tree

Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,25 @@ theorem one_lt_of_gt (h : a < b) : 1 < b :=
153153
alias LT.lt.pos := pos_of_gt
154154
@[to_additive existing] alias LT.lt.one_lt := one_lt_of_gt
155155

156+
@[to_additive]
157+
theorem Left.one_lt_mul_of_left [MulLeftMono α] (ha : 1 < a) (b : α) : 1 < a * b :=
158+
Left.one_lt_mul_of_lt_of_le ha (one_le b)
159+
160+
@[to_additive]
161+
theorem Left.one_lt_mul_of_right [MulLeftStrictMono α] (hb : 1 < b) (a : α) : 1 < a * b :=
162+
Left.one_lt_mul_of_le_of_lt (one_le a) hb
163+
164+
@[to_additive]
165+
theorem Right.one_lt_mul_of_left [MulRightStrictMono α] (ha : 1 < a) (b : α) : 1 < a * b :=
166+
Right.one_lt_mul_of_lt_of_le ha (one_le b)
167+
168+
@[to_additive]
169+
theorem Right.one_lt_mul_of_right [MulRightMono α] (hb : 1 < b) (a : α) : 1 < a * b :=
170+
Right.one_lt_mul_of_le_of_lt (one_le a) hb
171+
172+
@[to_additive add_pos_of_left] alias one_lt_mul_of_left := Left.one_lt_mul_of_left
173+
@[to_additive add_pos_of_right] alias one_lt_mul_of_right := Right.one_lt_mul_of_right
174+
156175
end Preorder
157176

158177
section PartialOrder

Mathlib/SetTheory/Ordinal/Basic.lean

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -911,16 +911,17 @@ theorem add_succ (o₁ o₂ : Ordinal) : o₁ + succ o₂ = succ (o₁ + o₂) :
911911
protected theorem one_le_iff_ne_zero {o : Ordinal} : 1 ≤ o ↔ o ≠ 0 :=
912912
Order.one_le_iff_ne_zero
913913

914+
@[deprecated add_pos_of_right (since := "2026-04-04")]
914915
theorem succ_pos (o : Ordinal) : 0 < succ o :=
915-
bot_lt_succ o
916+
add_pos_of_right zero_lt_one o
916917

917-
-- TODO: generalize to `SuccAddOrder`
918+
@[deprecated add_pos_of_right (since := "2026-04-04")]
918919
theorem add_one_ne_zero (o : Ordinal) : o + 10 :=
919-
(succ_pos o).ne'
920+
(add_pos_of_right zero_lt_one o).ne'
920921

921-
@[deprecated add_one_ne_zero (since := "2026-02-27")]
922+
@[deprecated add_pos_of_right (since := "2026-02-27")]
922923
theorem succ_ne_zero (o : Ordinal) : succ o ≠ 0 :=
923-
add_one_ne_zero o
924+
(add_pos_of_right zero_lt_one o).ne'
924925

925926
@[deprecated Order.lt_one_iff (since := "2026-03-24")]
926927
theorem lt_one_iff_zero {a : Ordinal} : a < 1 ↔ a = 0 :=

Mathlib/SetTheory/Ordinal/Exponential.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ theorem opow_zero (a : Ordinal) : a ^ (0 : Ordinal) = 1 := by
5757
@[simp]
5858
theorem opow_add_one (a b : Ordinal) : a ^ (b + 1) = a ^ b * a := by
5959
obtain rfl | h := eq_or_ne a 0
60-
· rw [zero_opow (add_one_ne_zero b), mul_zero]
60+
· rw [zero_opow (add_pos_of_right zero_lt_one b).ne', mul_zero]
6161
· rw [opow_of_ne_zero h, opow_of_ne_zero h]
6262
exact limitRecOn_succ ..
6363

@@ -483,7 +483,7 @@ theorem lt_omega0_opow {a b : Ordinal} (hb : b ≠ 0) :
483483

484484
theorem lt_omega0_opow_succ {a b : Ordinal} : a < ω ^ succ b ↔ ∃ n : ℕ, a < ω ^ b * n := by
485485
refine ⟨fun ha ↦ ?_, fun ⟨n, hn⟩ ↦ hn.trans (omega0_opow_mul_nat_lt (lt_succ b) n)⟩
486-
obtain ⟨c, hc, n, hn⟩ := (lt_omega0_opow (add_one_ne_zero b)).1 ha
486+
obtain ⟨c, hc, n, hn⟩ := (lt_omega0_opow (add_pos_of_right zero_lt_one b).ne').1 ha
487487
refine ⟨n, hn.trans_le ?_⟩
488488
grw [lt_succ_iff.1 hc]
489489
exact omega0_pos

Mathlib/SetTheory/Ordinal/Topology.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
7979
have hlub : IsLUB t (sSup t) := isLUB_csSup hne hbdd
8080
let ⟨y, hyt⟩ := hne
8181
classical
82-
refine ⟨sSup t + 1, add_one_ne_zero _, fun x _ => if x ∈ t then x else y, fun x _ => ?_, ?_⟩
82+
refine ⟨_, (add_pos_of_right zero_lt_one (sSup t)).ne',
83+
fun x _ ↦ if x ∈ t then x else y, fun x _ => ?_, ?_⟩
8384
· simp only
8485
split_ifs with h <;> exact hts ‹_›
8586
· refine le_antisymm (bsup_le fun x _ => ?_) (csSup_le hne fun x hx => ?_)

Mathlib/SetTheory/Ordinal/Veblen.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ theorem veblenWith_mem_range : veblenWith f o a ∈ range f := by
117117
simp
118118

119119
theorem veblenWith_add_one (o : Ordinal) : veblenWith f (o + 1) = deriv (veblenWith f o) := by
120-
rw [deriv_eq_enumOrd (isNormal_veblenWith hf o), veblenWith_of_ne_zero f (add_one_ne_zero _),
121-
derivFamily_eq_enumOrd]
120+
rw [deriv_eq_enumOrd (isNormal_veblenWith hf o),
121+
veblenWith_of_ne_zero f (add_pos_of_right zero_lt_one _).ne', derivFamily_eq_enumOrd]
122122
· apply congr_arg
123123
ext a
124124
rw [mem_iInter]

0 commit comments

Comments
 (0)