import MyNat.Definition
import MyNat.Addition
import AdditionWorld.Level4 -- add_comm
import AdvancedAdditionWorld.Level10 -- add_left_eq_zero
namespace MyNat
open MyNat
Advanced Addition World
Level 11: add_right_eq_zero
We just proved add_left_eq_zero (a b : MyNat) : a + b = 0 → b = 0
.
Hopefully add_right_eq_zero
shouldn't be too hard now.
Lemma
If a
and b
are natural numbers such that if a + b = 0
then a = 0
.
lemmaadd_right_eq_zero {add_right_eq_zero: ∀ {a b : MyNat}, a + b = 0 → a = 0aa: MyNatb :b: MyNatMyNat} :MyNat: Typea +a: MyNatb =b: MyNat0 →0: MyNata =a: MyNat0 :=0: MyNata, b: MyNata + b = 0 → a = 0a, b: MyNat
h: a + b = 0a = 0a, b: MyNat
h: a + b = 0a = 0a, b: MyNat
h: b + a = 0a = 0a, b: MyNat
h: b + a = 0a = 0a, b: MyNat
h: b + a = 0a = 0Goals accomplished! 🐙
Next up Level 12