import MyNat.Power
import MultiplicationWorld.Level2 -- mul_one
import MultiplicationWorld.Level9 -- simp additions
namespace MyNat
open MyNat
Power World
Level 6: mul_pow
Here we use the attribute [simp]
additions we made in
level 9 of Multiplication World
so that the simp
tactic can simplify expressions involving *
.
Lemma
For all naturals a
, b
, n
, we have (ab) ^ n = a ^ nb ^ n
.
lemmamul_pow (mul_pow: ∀ (a b n : MyNat), (a * b) ^ n = a ^ n * b ^ naa: MyNatbb: MyNatn :n: MyNatMyNat) : (MyNat: Typea *a: MyNatb) ^b: MyNatn =n: MyNata ^a: MyNatn *n: MyNatb ^b: MyNatn :=n: MyNata, b, n: MyNat(a * b) ^ n = a ^ n * b ^ na, b, n: MyNat(a * b) ^ n = a ^ n * b ^ na, b: MyNat
zero(a * b) ^ zero = a ^ zero * b ^ zeroa, b: MyNat
zero(a * b) ^ zero = a ^ zero * b ^ zeroa, b: MyNat
zero(a * b) ^ 0 = a ^ 0 * b ^ 0a, b: MyNat
zero(a * b) ^ 0 = a ^ 0 * b ^ 0a, b: MyNat
zero(a * b) ^ 0 = a ^ 0 * b ^ 0a, b: MyNat
zero1 = 1 * b ^ 0a, b: MyNat
zero1 = a ^ 0 * b ^ 0a, b: MyNat
zero1 = 1 * 1a, b: MyNat
zero1 = 1 * 1a, b: MyNat
zero1 = 1Goals accomplished! 🐙a, b, n: MyNat
ih: (a * b) ^ n = a ^ n * b ^ n
succ(a * b) ^ succ n = a ^ succ n * b ^ succ na, b, n: MyNat
ih: (a * b) ^ n = a ^ n * b ^ n
succ(a * b) ^ succ n = a ^ succ n * b ^ succ na, b, n: MyNat
ih: (a * b) ^ n = a ^ n * b ^ n
succ(a * b) ^ n * (a * b) = a ^ succ n * b ^ succ na, b, n: MyNat
ih: (a * b) ^ n = a ^ n * b ^ n
succ(a * b) ^ n * (a * b) = a ^ n * a * (b ^ n * b)a, b, n: MyNat
ih: (a * b) ^ n = a ^ n * b ^ n
succ(a * b) ^ n * (a * b) = a ^ n * a * (b ^ n * b)a, b, n: MyNat
ih: (a * b) ^ n = a ^ n * b ^ n
succ(a * b) ^ n * (a * b) = a ^ n * a * (b ^ n * b)a, b, n: MyNat
ih: (a * b) ^ n = a ^ n * b ^ n
succa ^ n * b ^ n * (a * b) = a ^ n * a * (b ^ n * b)a, b, n: MyNat
ih: (a * b) ^ n = a ^ n * b ^ n
succa ^ n * b ^ n * (a * b) = a ^ n * a * (b ^ n * b)Goals accomplished! 🐙
Next up Level 7