2015-05-01 04:38:33 +00:00
|
|
|
import data.nat
|
|
|
|
|
|
|
|
open nat
|
2015-12-06 07:52:16 +00:00
|
|
|
namespace foo
|
2015-05-01 04:38:33 +00:00
|
|
|
definition lt.trans {a b c : nat} (H₁ : a < b) (H₂ : b < c) : a < c :=
|
|
|
|
have aux : a < b → a < c, from
|
2015-06-04 23:16:28 +00:00
|
|
|
le.rec_on H₂
|
2015-05-01 04:38:33 +00:00
|
|
|
(λ h₁, lt.step h₁)
|
|
|
|
(λ b₁ bb₁ ih h₁, by constructor; exact ih h₁),
|
|
|
|
aux H₁
|
|
|
|
|
|
|
|
definition succ_lt_succ {a b : nat} (H : a < b) : succ a < succ b :=
|
2015-06-04 23:16:28 +00:00
|
|
|
le.rec_on H
|
2015-05-01 04:38:33 +00:00
|
|
|
(by constructor)
|
|
|
|
(λ b hlt ih, lt.trans ih (by constructor))
|
|
|
|
|
|
|
|
definition lt_of_succ_lt {a b : nat} (H : succ a < b) : a < b :=
|
2015-06-04 23:16:28 +00:00
|
|
|
le.rec_on H
|
2015-05-01 04:38:33 +00:00
|
|
|
(by constructor; constructor)
|
|
|
|
(λ b h ih, by constructor; exact ih)
|
2015-12-06 07:52:16 +00:00
|
|
|
end foo
|