Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement rpow norm_num extension (#9893)
* Implements a norm_num extension for `a ^ b` where `a` and `b` are reals. Unlike in the mathlib3 version, there is no restriction on the positivity of `a`. * Moves commented-out tests from test/norm_num_ext.lean into a new file test/norm_num_rpow.lean, to keep the dependencies of norm_num_ext.lean lightweight. Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
- Loading branch information
1 parent
b4f6049
commit 8050059
Showing
4 changed files
with
102 additions
and
73 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
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,15 @@ | ||
/- | ||
Copyright (c) 2021 Mario Carneiro All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Mario Carneiro, David Renshaw | ||
-/ | ||
import Mathlib.Analysis.SpecialFunctions.Pow.Real | ||
|
||
example : (2 : ℝ) ^ (3 : ℝ) = 8 := by norm_num1 | ||
example : (1 : ℝ) ^ (20 : ℝ) = 1 := by norm_num1 | ||
example : (-2 : ℝ) ^ (3 : ℝ) = -8 := by norm_num1 | ||
example : (1/5 : ℝ) ^ (2 : ℝ) = 1/25 := by norm_num1 | ||
example : (-1/3 : ℝ) ^ (-3 : ℝ) = -27 := by norm_num1 | ||
example : (1/2 : ℝ) ^ (-3 : ℝ) = 8 := by norm_num1 | ||
example : (2 : ℝ) ^ (-3 : ℝ) = 1/8 := by norm_num1 | ||
example : (-2 : ℝ) ^ (-3 : ℝ) = -1/8 := by norm_num1 |