import MyNat.Definition
import MyNat.Inequality -- le_iff_exists_add
import AdvancedAdditionWorld.Level11 -- add_right_eq_zero
namespace MyNat
open MyNat

Inequality world

Level 7: le_zero

We proved add_right_eq_zero back in advanced addition world. Remember that you can do things like have h2 := add_right_eq_zero h1 if h1 : a + c = 0.

Lemma : le_zero

For all naturals a, if a ≤ 0 then a = 0.

lemma 
le_zero: ∀ (a : MyNat), a ≤ 0 → a = 0
le_zero
(
a: MyNat
a
:
MyNat: Type
MyNat
) (
h: a ≤ 0
h
:
a: MyNat
a
0: MyNat
0
) :
a: MyNat
a
=
0: MyNat
0
:=
a: MyNat
h: a 0

a = 0
a: MyNat
h: a 0

a = 0
a, c: MyNat
hc: 0 = a + c

intro
a = 0
a, c: MyNat
hc✝: 0 = a + c
hc: a + c = 0

intro
a = 0

Goals accomplished! 🐙

Next up Level 8