chore(library/init/data/nat): remove pow.lean
This commit is contained in:
parent
3f04d041f6
commit
bddc84664c
4 changed files with 16 additions and 28 deletions
|
|
@ -195,4 +195,16 @@ protected lemma bit1_ne_zero (n : ℕ) : bit1 n ≠ 0 :=
|
|||
show succ (n + n) ≠ 0, from
|
||||
λ h, nat.no_confusion h
|
||||
|
||||
/- Exponentiation -/
|
||||
|
||||
def pow (b : ℕ) : ℕ → ℕ
|
||||
| 0 := 1
|
||||
| (succ n) := pow n * b
|
||||
|
||||
infix `^` := pow
|
||||
|
||||
lemma pow_succ (b n : ℕ) : b^(succ n) = b^n * b := rfl
|
||||
|
||||
@[simp] lemma pow_zero (b : ℕ) : b^0 = 1 := rfl
|
||||
|
||||
end nat
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura
|
||||
-/
|
||||
prelude
|
||||
import init.data.nat.basic init.data.nat.div init.data.nat.pow init.data.nat.lemmas
|
||||
import init.data.nat.basic init.data.nat.div init.data.nat.lemmas
|
||||
init.data.nat.bitwise
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura, Jeremy Avigad
|
||||
-/
|
||||
prelude
|
||||
import init.data.nat.basic init.data.nat.div init.data.nat.pow init.meta init.algebra.functions
|
||||
import init.data.nat.basic init.data.nat.div init.meta init.algebra.functions
|
||||
universes u
|
||||
|
||||
namespace nat
|
||||
|
|
@ -1350,4 +1350,6 @@ begin
|
|||
simp [h₁] },
|
||||
rw [eq.symm (mod_eq_sub_mod p_b_ge)] }
|
||||
end
|
||||
|
||||
|
||||
end nat
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
/-
|
||||
Copyright (c) 2017 Galois Inc. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Author: Simon Hudon
|
||||
|
||||
exponentiation on natural numbers
|
||||
|
||||
This is a work-in-progress
|
||||
-/
|
||||
prelude
|
||||
|
||||
import init.data.nat.basic init.meta
|
||||
|
||||
namespace nat
|
||||
|
||||
def pow (b : ℕ) : ℕ → ℕ
|
||||
| 0 := 1
|
||||
| (succ n) := pow n * b
|
||||
|
||||
infix `^` := pow
|
||||
|
||||
lemma pow_succ (b n : ℕ) : b^(succ n) = b^n * b := rfl
|
||||
|
||||
@[simp] lemma pow_zero (b : ℕ) : b^0 = 1 := rfl
|
||||
|
||||
end nat
|
||||
Loading…
Add table
Reference in a new issue