import MyNat.Definition
import MyNat.Addition -- add_zero
import MyNat.Inequality -- le_iff_exists_add
import Mathlib.Tactic.Use -- use tactic
import InequalityWorld.Level15 -- lt_aux₁
import InequalityWorld.Level16 -- lt_aux₂
import AdvancedAdditionWorld.Level13 -- ne_succ_self
namespace MyNat
open MyNat
Inequality world.
Level 17: definition of <
OK so we are going to define a < b
by a ≤ b ∧ ¬ (b ≤ a)
,
and given lt_aux_one a b
and lt_aux_two a b
it should now just
be a few lines to prove a < b ↔ succ a ≤ b
.
Lemma : lt_iff_succ_le
For all naturals a
and b
, a<b ↔ succ a ≤ b.
lemmalt_iff_succ_le (lt_iff_succ_le: ∀ (a b : MyNat), a < b ↔ succ a ≤ baa: MyNatb :b: MyNatMyNat) :MyNat: Typea <a: MyNatb ↔b: MyNatsuccsucc: MyNat → MyNata ≤a: MyNatb :=b: MyNata, b: MyNata < b ↔ succ a ≤ ba, b: MyNat
mpa < b → succ a ≤ ba, b: MyNatsucc a ≤ b → a < ba, b: MyNat
mprsucc a ≤ b → a < bGoals accomplished! 🐙
Sadly that is the end of all our nicely documented levels in this tutorial!
Interested in playing levels involving other kinds of mathematics? Look here for more ideas about what to do next.
Interested in learning more? Join us on the
Zulip Lean chat
and ask questions in the #new members
stream. Real names preferred. Be nice.
If you want to see a whole bunch of great examples see Level 18