import MyNat.Power
import MyNat.Addition -- add_zero
import MultiplicationWorld.Level2 -- mul_one
import MultiplicationWorld.Level5 -- mul_assoc
namespace MyNat
open MyNat
Power World
Level 5: pow_add
Lemma
For all naturals a
, m
, n
, we have a^(m + n) = a ^ m a ^ n
.
lemmapow_add (pow_add: ∀ (a m n : MyNat), a ^ (m + n) = a ^ m * a ^ naa: MyNatmm: MyNatn :n: MyNatMyNat) :MyNat: Typea ^ (a: MyNatm +m: MyNatn) =n: MyNata ^a: MyNatm *m: MyNata ^a: MyNatn :=n: MyNata, m, n: MyNata ^ (m + n) = a ^ m * a ^ na, m, n: MyNata ^ (m + n) = a ^ m * a ^ na, m: MyNat
zeroa ^ (m + zero) = a ^ m * a ^ zeroa, m: MyNat
zeroa ^ (m + zero) = a ^ m * a ^ zeroa, m: MyNat
zeroa ^ (m + 0) = a ^ m * a ^ 0a, m: MyNat
zeroa ^ (m + 0) = a ^ m * a ^ 0a, m: MyNat
zeroa ^ (m + 0) = a ^ m * a ^ 0a, m: MyNat
zeroa ^ m = a ^ m * a ^ 0a, m: MyNat
zeroa ^ m = a ^ m * a ^ 0a, m: MyNat
zeroa ^ m = a ^ m * a ^ 0a, m: MyNat
zeroa ^ m = a ^ m * 1a, m: MyNat
zeroa ^ m = a ^ m * 1a, m: MyNat
zeroa ^ m = a ^ m * 1a, m: MyNat
zeroa ^ m = a ^ mGoals accomplished! 🐙a, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ (m + succ n) = a ^ m * a ^ succ na, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ (m + succ n) = a ^ m * a ^ succ na, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ succ (m + n) = a ^ m * a ^ succ na, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ succ (m + n) = a ^ m * a ^ succ na, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ succ (m + n) = a ^ m * a ^ succ na, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ (m + n) * a = a ^ m * a ^ succ na, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ (m + n) * a = a ^ m * a ^ succ na, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ (m + n) * a = a ^ m * a ^ succ na, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ (m + n) * a = a ^ m * (a ^ n * a)a, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ (m + n) * a = a ^ m * (a ^ n * a)a, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ (m + n) * a = a ^ m * (a ^ n * a)a, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ m * a ^ n * a = a ^ m * (a ^ n * a)a, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ m * a ^ n * a = a ^ m * (a ^ n * a)a, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ m * a ^ n * a = a ^ m * (a ^ n * a)a, m, n: MyNat
ih: a ^ (m + n) = a ^ m * a ^ n
succa ^ m * (a ^ n * a) = a ^ m * (a ^ n * a)Goals accomplished! 🐙
Remember you can combine all the rw
rules into one with
rw [add_succ, pow_succ, pow_succ, ih, mul_assoc]
but we have
broken it out here so you can more easily see all the intermediate
goal states.
Next up Level 6