Files
NNG/Game/MyNat/Power.lean
2023-12-15 15:22:45 +01:00

22 lines
404 B
Lean4
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Game.MyNat.Multiplication
namespace MyNat
open MyNat
opaque pow :
-- notation `a ^ b` for `pow a b`
instance : Pow where
pow := pow
-- Note: since v4.2.0-rc2
macro_rules | `($x ^ $y) => `(HPow.hPow ($x : MyNat) ($y : MyNat))
@[MyNat_decide]
axiom pow_zero (m : ) : m ^ 0 = 1
@[MyNat_decide]
axiom pow_succ (m n : ) : m ^ (succ n) = m ^ n * m
end MyNat