Skip to content

Commit 74f1297

Browse files
vihdzpYaelDillies
andcommitted
feat: if 1 < x then y ^ n < x for some 1 < y (#28942)
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com> Co-authored-by: Author Name <yael.dillies@gmail.com>
1 parent 2452ad7 commit 74f1297

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

Mathlib/Algebra/Order/Group/DenselyOrdered.lean

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ Copyright (c) 2016 Jeremy Avigad. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl
55
-/
6+
import Mathlib.Algebra.Order.Group.Defs
67
import Mathlib.Algebra.Order.Group.Unbundled.Basic
7-
import Mathlib.Algebra.Order.Monoid.Unbundled.OrderDual
8+
import Mathlib.Algebra.Order.Monoid.Defs
89
import Mathlib.Algebra.Order.Monoid.Unbundled.ExistsOfLE
10+
import Mathlib.Algebra.Order.Monoid.Unbundled.OrderDual
11+
import Mathlib.Algebra.Order.Monoid.Unbundled.Pow
912

1013
/-!
1114
# Lemmas about densely linearly ordered groups.
@@ -83,3 +86,42 @@ lemma mul_le_of_forall_lt [CommGroup α] [LinearOrder α] [MulLeftMono α]
8386
exact hd.le.trans (h a' ha' b' hb')
8487

8588
end DenselyOrdered
89+
90+
variable {M : Type*} [LinearOrder M] [DenselyOrdered M] {x : M}
91+
92+
section Monoid
93+
variable [CommMonoid M] [ExistsMulOfLE M] [IsOrderedCancelMonoid M]
94+
95+
@[to_additive]
96+
private theorem exists_pow_two_le_of_one_lt (hx : 1 < x) : ∃ y : M, 1 < y ∧ y ^ 2 ≤ x := by
97+
obtain ⟨y, hy, hyx⟩ := exists_between hx
98+
obtain hyx | hxy := le_total (y ^ 2) x
99+
· exact ⟨y, hy, hyx⟩
100+
obtain ⟨z, hz, rfl⟩ := exists_one_lt_mul_of_lt' hyx
101+
exact ⟨z, hz, by simpa [pow_succ] using hxy⟩
102+
103+
@[to_additive]
104+
theorem exists_pow_lt_of_one_lt (hx : 1 < x) : ∀ n : ℕ, ∃ y : M, 1 < y ∧ y ^ n < x
105+
| 0 => ⟨x, by simpa⟩
106+
| 1 => by simpa using exists_between hx
107+
| n + 2 => by
108+
obtain ⟨y, hy, hyx⟩ := exists_pow_lt_of_one_lt hx (n + 1)
109+
obtain ⟨z, hz, hzy⟩ := exists_pow_two_le_of_one_lt hy
110+
refine ⟨z, hz, hyx.trans_le' ?_⟩
111+
calc z ^ (n + 2)
112+
_ ≤ z ^ (2 * (n + 1)) := pow_right_monotone hz.le (by omega)
113+
_ = (z ^ 2) ^ (n + 1) := by rw [pow_mul]
114+
_ ≤ y ^ (n + 1) := pow_le_pow_left' hzy (n + 1)
115+
116+
end Monoid
117+
118+
section Group
119+
variable [CommGroup M] [IsOrderedCancelMonoid M]
120+
121+
@[to_additive]
122+
theorem exists_lt_pow_of_lt_one (hx : x < 1) (n : ℕ) : ∃ y : M, y < 1 ∧ x < y ^ n := by
123+
obtain ⟨y, hy, hy'⟩ := exists_pow_lt_of_one_lt (one_lt_inv_of_inv hx) n
124+
use y⁻¹, inv_lt_one_of_one_lt hy
125+
simpa [lt_inv'] using hy'
126+
127+
end Group

0 commit comments

Comments
 (0)