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

Commit e63a4d5

Browse files
committed
feat(analysis/special_functions/pow): sqrt and inequalities (#16515)
This PR proves a few lemmas about `real.sqrt` and `real.rpow` as well as inequality lemmas for negative powers.
1 parent 345b38d commit e63a4d5

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

src/analysis/special_functions/pow.lean

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,44 @@ lemma rpow_lt_rpow_iff (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : 0 < z) : x ^ z < y ^
648648
lemma rpow_le_rpow_iff (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : 0 < z) : x ^ z ≤ y ^ z ↔ x ≤ y :=
649649
le_iff_le_iff_lt_iff_lt.2 $ rpow_lt_rpow_iff hy hx hz
650650

651+
lemma le_rpow_inv_iff_of_neg (hx : 0 < x) (hy : 0 < y) (hz : z < 0) :
652+
x ≤ y ^ z⁻¹ ↔ y ≤ x ^ z :=
653+
begin
654+
have hz' : 0 < -z := by rwa [lt_neg, neg_zero'],
655+
have hxz : 0 < x ^ (-z) := real.rpow_pos_of_pos hx _,
656+
have hyz : 0 < y ^ z⁻¹ := real.rpow_pos_of_pos hy _,
657+
rw [←real.rpow_le_rpow_iff hx.le hyz.le hz', ←real.rpow_mul hy.le],
658+
simp only [ne_of_lt hz, real.rpow_neg_one, mul_neg, inv_mul_cancel, ne.def, not_false_iff],
659+
rw [le_inv hxz hy, ←real.rpow_neg_one, ←real.rpow_mul hx.le],
660+
simp,
661+
end
662+
663+
lemma lt_rpow_inv_iff_of_neg (hx : 0 < x) (hy : 0 < y) (hz : z < 0) :
664+
x < y ^ z⁻¹ ↔ y < x ^ z :=
665+
begin
666+
have hz' : 0 < -z := by rwa [lt_neg, neg_zero'],
667+
have hxz : 0 < x ^ (-z) := real.rpow_pos_of_pos hx _,
668+
have hyz : 0 < y ^ z⁻¹ := real.rpow_pos_of_pos hy _,
669+
rw [←real.rpow_lt_rpow_iff hx.le hyz.le hz', ←real.rpow_mul hy.le],
670+
simp only [ne_of_lt hz, real.rpow_neg_one, mul_neg, inv_mul_cancel, ne.def, not_false_iff],
671+
rw [lt_inv hxz hy, ←real.rpow_neg_one, ←real.rpow_mul hx.le],
672+
simp,
673+
end
674+
675+
lemma rpow_inv_lt_iff_of_neg (hx : 0 < x) (hy : 0 < y) (hz : z < 0) :
676+
x ^ z⁻¹ < y ↔ y ^ z < x :=
677+
begin
678+
convert lt_rpow_inv_iff_of_neg (real.rpow_pos_of_pos hx _) (real.rpow_pos_of_pos hy _) hz;
679+
simp [←real.rpow_mul hx.le, ←real.rpow_mul hy.le, ne_of_lt hz],
680+
end
681+
682+
lemma rpow_inv_le_iff_of_neg (hx : 0 < x) (hy : 0 < y) (hz : z < 0) :
683+
x ^ z⁻¹ ≤ y ↔ y ^ z ≤ x :=
684+
begin
685+
convert le_rpow_inv_iff_of_neg (real.rpow_pos_of_pos hx _) (real.rpow_pos_of_pos hy _) hz;
686+
simp [←real.rpow_mul hx.le, ←real.rpow_mul hy.le, ne_of_lt hz],
687+
end
688+
651689
lemma rpow_lt_rpow_of_exponent_lt (hx : 1 < x) (hyz : y < z) : x^y < x^z :=
652690
begin
653691
repeat {rw [rpow_def_of_pos (lt_trans zero_lt_one hx)]},
@@ -959,6 +997,13 @@ begin
959997
rw [sqrt_eq_zero_of_nonpos h.le, rpow_def_of_neg h, this, cos_pi_div_two, mul_zero] }
960998
end
961999

1000+
lemma rpow_div_two_eq_sqrt {x : ℝ} (r : ℝ) (hx : 0 ≤ x) : x ^ (r/2) = (sqrt x) ^ r :=
1001+
begin
1002+
rw [sqrt_eq_rpow, ← rpow_mul hx],
1003+
congr,
1004+
ring,
1005+
end
1006+
9621007
end sqrt
9631008

9641009
end real

0 commit comments

Comments
 (0)