import MyNat.Definition
import MyNat.Addition -- add_zero
import MyNat.Inequality -- le_iff_exists_add
import Mathlib.Tactic.Use -- use tactic
import AdditionWorld.Level2 -- add_assoc
import AdditionWorld.Level3 -- succ_add
import InequalityWorld.Level2 -- le_refl
namespace MyNat
open MyNat
Inequality world.
Level 15: introducing <
To get the remaining collectibles in this world, we need to
give a definition of <
. By default, the definition of a < b
in Lean, once ≤
is defined, is this:
a < b := a ≤ b ∧ ¬ (b ≤ a)
But a much more usable definition would be this:
a < b := succ a ≤ b
Let's prove that these two definitions are the same
Lemma : lt_aux₁
For all naturals a
and b
, a ≤ b ∧ ¬(b ≤ a) ⟹ succ a ≤ b.
lemmalt_aux₁ (lt_aux₁: ∀ (a b : MyNat), a ≤ b ∧ ¬b ≤ a → succ a ≤ baa: MyNatb :b: MyNatMyNat) :MyNat: Typea ≤a: MyNatb ∧ ¬ (b: MyNatb ≤b: MyNata) →a: MyNatsuccsucc: MyNat → MyNata ≤a: MyNatb :=b: MyNata, b: MyNata ≤ b ∧ ¬b ≤ a → succ a ≤ ba, b: MyNat
h: a ≤ b ∧ ¬b ≤ asucc a ≤ ba, b: MyNat
h: a ≤ b ∧ ¬b ≤ asucc a ≤ ba, b: MyNat
h1: a ≤ b
h2: ¬b ≤ a
introsucc a ≤ ba, b: MyNat
h1: a ≤ b
h2: ¬b ≤ a
introsucc a ≤ ba, b: MyNat
h2: ¬b ≤ a
c: MyNat
hc: b = a + c
intro.introsucc a ≤ ba, b: MyNat
h2: ¬b ≤ a
c: MyNat
hc: b = a + c
intro.introsucc a ≤ ba, b: MyNat
h2: ¬b ≤ a
hc: b = a + zero
intro.intro.zerosucc a ≤ ba, b: MyNat
h2: ¬b ≤ a
hc: b = a + zero
intro.intro.zero.hFalsea, b: MyNat
h2: ¬b ≤ a
hc: b = a + zero
intro.intro.zero.hFalsea, b: MyNat
h2: ¬b ≤ a
hc: b = a + 0
intro.intro.zero.hFalsea, b: MyNat
h2: ¬b ≤ a
hc: b = a
intro.intro.zero.hFalsea, b: MyNat
h2: ¬b ≤ a
hc: b = a
intro.intro.zero.hFalsea, b: MyNat
h2: ¬b ≤ a
hc: b = a
intro.intro.zero.hFalsea, b: MyNat
h2: ¬b ≤ a
hc: b = a
intro.intro.zero.hb ≤ aa, b: MyNat
h2: ¬b ≤ a
hc: b = a
intro.intro.zero.hb ≤ aa, b: MyNat
h2: ¬b ≤ a
hc: b = a
intro.intro.zero.ha ≤ aGoals accomplished! 🐙a, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succsucc a ≤ ba, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succb = succ a + da, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succb = succ a + da, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succa + succ d = succ a + da, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succa + succ d = succ a + da, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succa + succ d = succ a + da, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succsucc (a + d) = succ a + da, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succsucc (a + d) = succ a + da, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succsucc (a + d) = succ a + da, b: MyNat
h2: ¬b ≤ a
d: MyNat
hc: b = a + succ d
intro.intro.succsucc (a + d) = succ (a + d)Goals accomplished! 🐙
Next up Level 16