2014-12-01 05:16:01 +00:00
|
|
|
prelude constant A : Type.{1}
|
2014-09-17 21:39:05 +00:00
|
|
|
definition bool : Type.{1} := Type.{0}
|
2014-10-02 23:20:52 +00:00
|
|
|
constant eq : A → A → bool
|
2014-07-01 23:55:41 +00:00
|
|
|
infixl `=`:50 := eq
|
2014-06-18 00:15:38 +00:00
|
|
|
axiom subst (P : A → bool) (a b : A) (H1 : a = b) (H2 : P a) : P b
|
|
|
|
axiom eq_trans (a b c : A) (H1 : a = b) (H2 : b = c) : a = c
|
|
|
|
axiom eq_refl (a : A) : a = a
|
2014-10-02 23:20:52 +00:00
|
|
|
constant le : A → A → bool
|
2014-07-01 23:55:41 +00:00
|
|
|
infixl `≤`:50 := le
|
2014-06-18 00:15:38 +00:00
|
|
|
axiom le_trans (a b c : A) (H1 : a ≤ b) (H2 : b ≤ c) : a ≤ c
|
|
|
|
axiom le_refl (a : A) : a ≤ a
|
|
|
|
axiom eq_le_trans (a b c : A) (H1 : a = b) (H2 : b ≤ c) : a ≤ c
|
|
|
|
axiom le_eq_trans (a b c : A) (H1 : a ≤ b) (H2 : b = c) : a ≤ c
|
2015-05-02 22:15:35 +00:00
|
|
|
attribute subst [subst]
|
|
|
|
attribute eq_refl [refl]
|
|
|
|
attribute le_refl [refl]
|
|
|
|
attribute eq_trans [trans]
|
|
|
|
attribute le_trans [trans]
|
|
|
|
attribute eq_le_trans [trans]
|
|
|
|
attribute le_eq_trans [trans]
|
2014-10-02 23:20:52 +00:00
|
|
|
constants a b c d e f : A
|
2014-06-18 00:15:38 +00:00
|
|
|
axiom H1 : a = b
|
|
|
|
axiom H2 : b ≤ c
|
|
|
|
axiom H3 : c ≤ d
|
|
|
|
axiom H4 : d = e
|
|
|
|
check calc a = b : H1
|
|
|
|
... ≤ c : H2
|
|
|
|
... ≤ d : H3
|
|
|
|
... = e : H4
|
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant lt : A → A → bool
|
2014-07-01 23:55:41 +00:00
|
|
|
infixl `<`:50 := lt
|
2014-06-18 00:15:38 +00:00
|
|
|
axiom lt_trans (a b c : A) (H1 : a < b) (H2 : b < c) : a < c
|
|
|
|
axiom le_lt_trans (a b c : A) (H1 : a ≤ b) (H2 : b < c) : a < c
|
|
|
|
axiom lt_le_trans (a b c : A) (H1 : a < b) (H2 : b ≤ c) : a < c
|
|
|
|
axiom H5 : c < d
|
|
|
|
check calc b ≤ c : H2
|
|
|
|
... < d : H5 -- Error le_lt_trans was not registered yet
|
2015-05-02 22:15:35 +00:00
|
|
|
attribute le_lt_trans [trans]
|
2014-06-18 00:15:38 +00:00
|
|
|
check calc b ≤ c : H2
|
|
|
|
... < d : H5
|
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant le2 : A → A → bool
|
2014-07-01 23:55:41 +00:00
|
|
|
infixl `≤`:50 := le2
|
2014-10-02 23:20:52 +00:00
|
|
|
constant le2_trans (a b c : A) (H1 : le2 a b) (H2 : le2 b c) : le2 a c
|
2015-05-02 22:15:35 +00:00
|
|
|
attribute le2_trans [trans]
|
2014-06-18 00:15:38 +00:00
|
|
|
print raw calc b ≤ c : H2
|
|
|
|
... ≤ d : H3
|
|
|
|
... ≤ e : H4
|