1440
|
1 |
|
|
2 |
open OrdDefs;
|
|
3 |
|
|
4 |
|
|
5 |
(** lifting of quasi / partial orders **)
|
|
6 |
|
|
7 |
(* pairs *)
|
|
8 |
|
5069
|
9 |
Goalw [le_prod_def] "x [= (x::'a::quasi_order*'b::quasi_order)";
|
4153
|
10 |
by (rtac conjI 1);
|
|
11 |
by (rtac le_refl 1);
|
|
12 |
by (rtac le_refl 1);
|
1440
|
13 |
qed "le_prod_refl";
|
|
14 |
|
5069
|
15 |
Goalw [le_prod_def] "x [= y & y [= z --> x [= (z::'a::quasi_order*'b::quasi_order)";
|
4153
|
16 |
by Safe_tac;
|
|
17 |
by (etac (conjI RS (le_trans RS mp)) 1);
|
|
18 |
by (assume_tac 1);
|
|
19 |
by (etac (conjI RS (le_trans RS mp)) 1);
|
|
20 |
by (assume_tac 1);
|
1440
|
21 |
qed "le_prod_trans";
|
|
22 |
|
5069
|
23 |
Goalw [le_prod_def] "x [= y & y [= x --> x = (y::'a::partial_order*'b::partial_order)";
|
4153
|
24 |
by Safe_tac;
|
1440
|
25 |
by (stac Pair_fst_snd_eq 1);
|
4153
|
26 |
by (rtac conjI 1);
|
|
27 |
by (etac (conjI RS (le_antisym RS mp)) 1);
|
|
28 |
by (assume_tac 1);
|
|
29 |
by (etac (conjI RS (le_antisym RS mp)) 1);
|
|
30 |
by (assume_tac 1);
|
1440
|
31 |
qed "le_prod_antisym";
|
|
32 |
|
|
33 |
|
|
34 |
(* functions *)
|
|
35 |
|
5069
|
36 |
Goalw [le_fun_def] "f [= (f::'a=>'b::quasi_order)";
|
4153
|
37 |
by (rtac allI 1);
|
|
38 |
by (rtac le_refl 1);
|
1440
|
39 |
qed "le_fun_refl";
|
|
40 |
|
5069
|
41 |
Goalw [le_fun_def] "f [= g & g [= h --> f [= (h::'a=>'b::quasi_order)";
|
4153
|
42 |
by Safe_tac;
|
|
43 |
by (rtac (le_trans RS mp) 1);
|
1899
|
44 |
by (Fast_tac 1);
|
1440
|
45 |
qed "le_fun_trans";
|
|
46 |
|
5069
|
47 |
Goalw [le_fun_def] "f [= g & g [= f --> f = (g::'a=>'b::partial_order)";
|
4153
|
48 |
by Safe_tac;
|
|
49 |
by (rtac ext 1);
|
|
50 |
by (rtac (le_antisym RS mp) 1);
|
1899
|
51 |
by (Fast_tac 1);
|
1440
|
52 |
qed "le_fun_antisym";
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
(** duals **)
|
|
57 |
|
|
58 |
(*"'a dual" is even an isotype*)
|
5069
|
59 |
Goal "Rep_dual (Abs_dual y) = y";
|
4153
|
60 |
by (rtac Abs_dual_inverse 1);
|
1465
|
61 |
by (rewtac dual_def);
|
1899
|
62 |
by (Fast_tac 1);
|
1440
|
63 |
qed "Abs_dual_inverse'";
|
|
64 |
|
|
65 |
|
5069
|
66 |
Goalw [le_dual_def] "x [= (x::'a::quasi_order dual)";
|
4153
|
67 |
by (rtac le_refl 1);
|
1440
|
68 |
qed "le_dual_refl";
|
|
69 |
|
5069
|
70 |
Goalw [le_dual_def] "x [= y & y [= z --> x [= (z::'a::quasi_order dual)";
|
1440
|
71 |
by (stac conj_commut 1);
|
4153
|
72 |
by (rtac le_trans 1);
|
1440
|
73 |
qed "le_dual_trans";
|
|
74 |
|
5069
|
75 |
Goalw [le_dual_def] "x [= y & y [= x --> x = (y::'a::partial_order dual)";
|
4153
|
76 |
by Safe_tac;
|
|
77 |
by (rtac (Rep_dual_inverse RS subst) 1);
|
|
78 |
by (rtac sym 1);
|
|
79 |
by (rtac (Rep_dual_inverse RS subst) 1);
|
|
80 |
by (rtac arg_cong 1);
|
1440
|
81 |
back();
|
4153
|
82 |
by (etac (conjI RS (le_antisym RS mp)) 1);
|
|
83 |
by (assume_tac 1);
|
1440
|
84 |
qed "le_dual_antisym";
|
|
85 |
|
5069
|
86 |
Goalw [le_dual_def] "x [= y | y [= (x::'a::linear_order dual)";
|
4153
|
87 |
by (rtac le_linear 1);
|
2606
|
88 |
qed "le_dual_linear";
|