@@ -129,9 +129,11 @@ theorem rpow_nat_cast (x : ℝ≥0) (n : ℕ) : x ^ (n : ℝ) = x ^ n :=
129
129
#align nnreal.rpow_nat_cast NNReal.rpow_nat_cast
130
130
131
131
@[simp]
132
- theorem rpow_two (x : ℝ≥0 ) : x ^ (2 : ℝ) = x ^ 2 := by
133
- rw [← rpow_nat_cast]
134
- simp only [Nat.cast_ofNat]
132
+ lemma rpow_ofNat (x : ℝ≥0 ) (n : ℕ) [n.AtLeastTwo] :
133
+ x ^ (no_index (OfNat.ofNat n) : ℝ) = x ^ (OfNat.ofNat n : ℕ) :=
134
+ rpow_nat_cast x n
135
+
136
+ theorem rpow_two (x : ℝ≥0 ) : x ^ (2 : ℝ) = x ^ 2 := rpow_ofNat x 2
135
137
#align nnreal.rpow_two NNReal.rpow_two
136
138
137
139
theorem mul_rpow {x y : ℝ≥0 } {z : ℝ} : (x * y) ^ z = x ^ z * y ^ z :=
@@ -487,6 +489,9 @@ theorem rpow_eq_top_iff_of_pos {x : ℝ≥0∞} {y : ℝ} (hy : 0 < y) : x ^ y =
487
489
simp [rpow_eq_top_iff, hy, asymm hy]
488
490
#align ennreal.rpow_eq_top_iff_of_pos ENNReal.rpow_eq_top_iff_of_pos
489
491
492
+ lemma rpow_lt_top_iff_of_pos {x : ℝ≥0 ∞} {y : ℝ} (hy : 0 < y) : x ^ y < ∞ ↔ x < ∞ := by
493
+ simp only [lt_top_iff_ne_top, Ne.def, rpow_eq_top_iff_of_pos hy]
494
+
490
495
theorem rpow_eq_top_of_nonneg (x : ℝ≥0 ∞) {y : ℝ} (hy0 : 0 ≤ y) : x ^ y = ⊤ → x = ⊤ := by
491
496
rw [ENNReal.rpow_eq_top_iff]
492
497
rintro (h|h)
@@ -552,9 +557,11 @@ theorem rpow_nat_cast (x : ℝ≥0∞) (n : ℕ) : x ^ (n : ℝ) = x ^ n := by
552
557
#align ennreal.rpow_nat_cast ENNReal.rpow_nat_cast
553
558
554
559
@[simp]
555
- theorem rpow_two (x : ℝ≥0 ∞) : x ^ (2 : ℝ) = x ^ 2 := by
556
- rw [← rpow_nat_cast]
557
- simp only [Nat.cast_ofNat]
560
+ lemma rpow_ofNat (x : ℝ≥0 ∞) (n : ℕ) [n.AtLeastTwo] :
561
+ x ^ (no_index (OfNat.ofNat n) : ℝ) = x ^ (OfNat.ofNat n) :=
562
+ rpow_nat_cast x n
563
+
564
+ theorem rpow_two (x : ℝ≥0 ∞) : x ^ (2 : ℝ) = x ^ 2 := rpow_ofNat x 2
558
565
#align ennreal.rpow_two ENNReal.rpow_two
559
566
560
567
theorem mul_rpow_eq_ite (x y : ℝ≥0 ∞) (z : ℝ) :
0 commit comments