In this file we define our copy MyNat of the natural numbers. To check that we don't cheat
using results already proved in mathlib we don't import any mathematics (the only import
provides code actions, improving the editor experience). (Note that even if MyNat is
defined here, the simple fact of, say, providing the Semiring instance allows to use a lot of
results in mathlib.)
@[implicit_reducible]
The following is to activate the notation (0 : MyNat).
Beware: if you just write 0, sometimes Lean thinks you mean the "usual" natural number 0.
Equations
- MyNat.instZero = { zero := MyNat.zero }
@[implicit_reducible]
Equations
- MyNat.instOne = { one := MyNat.one }
This is basically an axiom added by Lean when defining natural numbers (feel free to ask for more details if you want!)
@[implicit_reducible]
Equations
- MyNat.instAdd = { add := MyNat.add }
@[implicit_reducible]
Equations
- MyNat.instMul = { mul := MyNat.mul }
@[implicit_reducible]
Equations
- MyNat.instLE = { le := MyNat.le }
@[implicit_reducible]
Equations
- MyNat.instLT = { lt := MyNat.lt }