Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(algebra/{group_power,order}): split off field lemmas (#14849)
I want to refer to the rational numbers in the definition of a field, meaning we can't have `algebra.field.basic` in the transitive imports of `data.rat.basic`. This is half of rearranging those imports: remove the definition of a field from the dependencies of basic lemmas about `nsmul`, `npow`, `zsmul` and `zpow`. Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
- Loading branch information
1 parent
d939b0e
commit f57c0cd
Showing
5 changed files
with
46 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/- | ||
Copyright (c) 2020 Scott Morrison. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Yury Kudryashov, Scott Morrison | ||
-/ | ||
import algebra.group_power.lemmas | ||
import data.nat.cast | ||
import algebra.group_with_zero.power | ||
import algebra.order.field | ||
/-! | ||
# Powers of elements of linear ordered fields | ||
Some results on integer powers of elements of a linear ordered field. | ||
These results are in their own file because they depend both on | ||
`linear_ordered_field` and on the API for `zpow`; neither should be obviously | ||
an ancestor of the other. | ||
-/ | ||
|
||
section | ||
variables {R : Type*} [linear_ordered_field R] {a : R} | ||
|
||
lemma pow_minus_two_nonneg : 0 ≤ a^(-2 : ℤ) := | ||
begin | ||
simp only [inv_nonneg, zpow_neg], | ||
change 0 ≤ a ^ ((2 : ℕ) : ℤ), | ||
rw zpow_coe_nat, | ||
apply sq_nonneg, | ||
end | ||
|
||
/-- Bernoulli's inequality reformulated to estimate `(n : K)`. -/ | ||
theorem nat.cast_le_pow_sub_div_sub {K : Type*} [linear_ordered_field K] {a : K} (H : 1 < a) | ||
(n : ℕ) : | ||
(n : K) ≤ (a ^ n - 1) / (a - 1) := | ||
(le_div_iff (sub_pos.2 H)).2 $ le_sub_left_of_add_le $ | ||
one_add_mul_sub_le_pow ((neg_le_self zero_le_one).trans H.le) _ | ||
|
||
/-- For any `a > 1` and a natural `n` we have `n ≤ a ^ n / (a - 1)`. See also | ||
`nat.cast_le_pow_sub_div_sub` for a stronger inequality with `a ^ n - 1` in the numerator. -/ | ||
theorem nat.cast_le_pow_div_sub {K : Type*} [linear_ordered_field K] {a : K} (H : 1 < a) (n : ℕ) : | ||
(n : K) ≤ a ^ n / (a - 1) := | ||
(n.cast_le_pow_sub_div_sub H).trans $ div_le_div_of_le (sub_nonneg.2 H.le) | ||
(sub_le_self _ zero_le_one) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters