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

Commit 0509c9c

Browse files
committed
1 parent c8edd60 commit 0509c9c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/analysis/special_functions/pow.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,11 +1864,11 @@ lemma filter.tendsto.ennrpow_const {α : Type*} {f : filter α} {m : α → ℝ
18641864
namespace norm_num
18651865
open tactic
18661866

1867-
theorem rpow_pos (a b : ℝ) (b' : ℕ) (c : ℝ) (hb : b = b') (h : a ^ b' = c) : a ^ b = c :=
1868-
by rw [← h, hb, real.rpow_nat_cast]
1867+
theorem rpow_pos (a b : ℝ) (b' : ℕ) (c : ℝ) (hb : (b':ℝ) = b) (h : a ^ b' = c) : a ^ b = c :=
1868+
by rw [← h, hb, real.rpow_nat_cast]
18691869
theorem rpow_neg (a b : ℝ) (b' : ℕ) (c c' : ℝ)
1870-
(a0 : 0 ≤ a) (hb : b = b') (h : a ^ b' = c) (hc : c⁻¹ = c') : a ^ -b = c' :=
1871-
by rw [← hc, ← h, hb, real.rpow_neg a0, real.rpow_nat_cast]
1870+
(a0 : 0 ≤ a) (hb : (b':ℝ) = b) (h : a ^ b' = c) (hc : c⁻¹ = c') : a ^ -b = c' :=
1871+
by rw [← hc, ← h, hb, real.rpow_neg a0, real.rpow_nat_cast]
18721872

18731873
/-- Evaluate `real.rpow a b` where `a` is a rational numeral and `b` is an integer.
18741874
(This cannot go via the generalized version `prove_rpow'` because `rpow_pos` has a side condition;

test/norm_num_ext.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import data.int.gcd
99
import data.nat.fib
1010
import data.nat.prime
1111
import data.nat.sqrt_norm_num
12+
import analysis.special_functions.pow
1213

1314
/-!
1415
# Tests for `norm_num` extensions
@@ -257,6 +258,10 @@ example : nat.fib 37 = 24157817 := by norm_num
257258
example : nat.fib 64 = 10610209857723 := by norm_num
258259
example : nat.fib 100 + nat.fib 101 = nat.fib 102 := by norm_num
259260

261+
example : (2 : ℝ) ^ (3 : ℝ) = 8 := by norm_num
262+
example : (1 : ℝ) ^ (20 : ℝ) = 1 := by norm_num
263+
example : (2 : ℝ) ^ (-3 : ℝ) = 1/8 := by norm_num
264+
260265
section big_operators
261266

262267
variables {α : Type*} [comm_ring α]

0 commit comments

Comments
 (0)