equal
deleted
inserted
replaced
9 imports Finite_Set |
9 imports Finite_Set |
10 begin |
10 begin |
11 |
11 |
12 subsection {* Type class for partial orders *} |
12 subsection {* Type class for partial orders *} |
13 |
13 |
14 -- {* introduce a (syntactic) class for the constant @{text "<<"} *} |
14 class sq_ord = type + |
15 axclass sq_ord < type |
15 fixes sq_le :: "'a \<Rightarrow> 'a \<Rightarrow> bool" |
16 |
16 |
17 -- {* characteristic constant @{text "<<"} for po *} |
17 notation |
18 consts |
18 sq_le (infixl "<<" 55) |
19 "<<" :: "['a,'a::sq_ord] => bool" (infixl "<<" 55) |
19 |
20 |
20 notation (xsymbols) |
21 syntax (xsymbols) |
21 sq_le (infixl "\<sqsubseteq>" 55) |
22 "<<" :: "['a,'a::sq_ord] => bool" (infixl "\<sqsubseteq>" 55) |
|
23 |
22 |
24 axclass po < sq_ord |
23 axclass po < sq_ord |
25 -- {* class axioms: *} |
24 refl_less [iff]: "x \<sqsubseteq> x" |
26 refl_less [iff]: "x \<sqsubseteq> x" |
|
27 antisym_less: "\<lbrakk>x \<sqsubseteq> y; y \<sqsubseteq> x\<rbrakk> \<Longrightarrow> x = y" |
25 antisym_less: "\<lbrakk>x \<sqsubseteq> y; y \<sqsubseteq> x\<rbrakk> \<Longrightarrow> x = y" |
28 trans_less: "\<lbrakk>x \<sqsubseteq> y; y \<sqsubseteq> z\<rbrakk> \<Longrightarrow> x \<sqsubseteq> z" |
26 trans_less: "\<lbrakk>x \<sqsubseteq> y; y \<sqsubseteq> z\<rbrakk> \<Longrightarrow> x \<sqsubseteq> z" |
29 |
27 |
30 text {* minimal fixes least element *} |
28 text {* minimal fixes least element *} |
31 |
29 |