1440
|
1 |
|
|
2 |
(** basic properties of "Inf" and "Sup" **)
|
|
3 |
|
|
4 |
(* unique existence *)
|
|
5 |
|
5069
|
6 |
Goalw [Inf_def] "is_Inf A (Inf A)";
|
4153
|
7 |
by (rtac (ex_Inf RS spec RS selectI1) 1);
|
1440
|
8 |
qed "Inf_is_Inf";
|
|
9 |
|
5069
|
10 |
Goal "is_Inf A inf --> Inf A = inf";
|
4153
|
11 |
by (rtac impI 1);
|
|
12 |
by (rtac (is_Inf_uniq RS mp) 1);
|
|
13 |
by (rtac conjI 1);
|
|
14 |
by (rtac Inf_is_Inf 1);
|
|
15 |
by (assume_tac 1);
|
1440
|
16 |
qed "Inf_uniq";
|
|
17 |
|
5069
|
18 |
Goalw [Ex1_def] "ALL A. EX! inf::'a::clattice. is_Inf A inf";
|
4153
|
19 |
by Safe_tac;
|
1899
|
20 |
by (Step_tac 1);
|
|
21 |
by (Step_tac 1);
|
4153
|
22 |
by (rtac Inf_is_Inf 1);
|
|
23 |
by (rtac (Inf_uniq RS mp RS sym) 1);
|
|
24 |
by (assume_tac 1);
|
1440
|
25 |
qed "ex1_Inf";
|
|
26 |
|
|
27 |
|
5069
|
28 |
Goalw [Sup_def] "is_Sup A (Sup A)";
|
4153
|
29 |
by (rtac (ex_Sup RS spec RS selectI1) 1);
|
1440
|
30 |
qed "Sup_is_Sup";
|
|
31 |
|
5069
|
32 |
Goal "is_Sup A sup --> Sup A = sup";
|
4153
|
33 |
by (rtac impI 1);
|
|
34 |
by (rtac (is_Sup_uniq RS mp) 1);
|
|
35 |
by (rtac conjI 1);
|
|
36 |
by (rtac Sup_is_Sup 1);
|
|
37 |
by (assume_tac 1);
|
1440
|
38 |
qed "Sup_uniq";
|
|
39 |
|
5069
|
40 |
Goalw [Ex1_def] "ALL A. EX! sup::'a::clattice. is_Sup A sup";
|
4153
|
41 |
by Safe_tac;
|
1899
|
42 |
by (Step_tac 1);
|
|
43 |
by (Step_tac 1);
|
4153
|
44 |
by (rtac Sup_is_Sup 1);
|
|
45 |
by (rtac (Sup_uniq RS mp RS sym) 1);
|
|
46 |
by (assume_tac 1);
|
1440
|
47 |
qed "ex1_Sup";
|
|
48 |
|
|
49 |
|
|
50 |
(* "Inf" yields g.l.bs, "Sup" yields l.u.bs. --- in pieces *)
|
|
51 |
|
|
52 |
val prems = goalw thy [Inf_def] "x:A ==> Inf A [= x";
|
|
53 |
by (cut_facts_tac prems 1);
|
4153
|
54 |
by (rtac selectI2 1);
|
|
55 |
by (rtac Inf_is_Inf 1);
|
1465
|
56 |
by (rewtac is_Inf_def);
|
1899
|
57 |
by (Fast_tac 1);
|
1440
|
58 |
qed "Inf_lb";
|
|
59 |
|
|
60 |
val [prem] = goalw thy [Inf_def] "(!!x. x:A ==> z [= x) ==> z [= Inf A";
|
4153
|
61 |
by (rtac selectI2 1);
|
|
62 |
by (rtac Inf_is_Inf 1);
|
1465
|
63 |
by (rewtac is_Inf_def);
|
1899
|
64 |
by (Step_tac 1);
|
|
65 |
by (Step_tac 1);
|
4153
|
66 |
by (etac mp 1);
|
|
67 |
by (rtac ballI 1);
|
|
68 |
by (etac prem 1);
|
1440
|
69 |
qed "Inf_ub_lbs";
|
|
70 |
|
|
71 |
|
|
72 |
val prems = goalw thy [Sup_def] "x:A ==> x [= Sup A";
|
|
73 |
by (cut_facts_tac prems 1);
|
4153
|
74 |
by (rtac selectI2 1);
|
|
75 |
by (rtac Sup_is_Sup 1);
|
1465
|
76 |
by (rewtac is_Sup_def);
|
1899
|
77 |
by (Fast_tac 1);
|
1440
|
78 |
qed "Sup_ub";
|
|
79 |
|
|
80 |
val [prem] = goalw thy [Sup_def] "(!!x. x:A ==> x [= z) ==> Sup A [= z";
|
4153
|
81 |
by (rtac selectI2 1);
|
|
82 |
by (rtac Sup_is_Sup 1);
|
1465
|
83 |
by (rewtac is_Sup_def);
|
1899
|
84 |
by (Step_tac 1);
|
|
85 |
by (Step_tac 1);
|
4153
|
86 |
by (etac mp 1);
|
|
87 |
by (rtac ballI 1);
|
|
88 |
by (etac prem 1);
|
1440
|
89 |
qed "Sup_lb_ubs";
|
|
90 |
|
|
91 |
|
|
92 |
(** minorized Infs / majorized Sups **)
|
|
93 |
|
5069
|
94 |
Goal "(x [= Inf A) = (ALL y:A. x [= y)";
|
4153
|
95 |
by (rtac iffI 1);
|
1440
|
96 |
(*==>*)
|
4153
|
97 |
by (rtac ballI 1);
|
|
98 |
by (rtac (le_trans RS mp) 1);
|
|
99 |
by (etac conjI 1);
|
|
100 |
by (etac Inf_lb 1);
|
1440
|
101 |
(*<==*)
|
4153
|
102 |
by (rtac Inf_ub_lbs 1);
|
1899
|
103 |
by (Fast_tac 1);
|
1440
|
104 |
qed "le_Inf_eq";
|
|
105 |
|
5069
|
106 |
Goal "(Sup A [= x) = (ALL y:A. y [= x)";
|
4153
|
107 |
by (rtac iffI 1);
|
1440
|
108 |
(*==>*)
|
4153
|
109 |
by (rtac ballI 1);
|
|
110 |
by (rtac (le_trans RS mp) 1);
|
|
111 |
by (rtac conjI 1);
|
|
112 |
by (etac Sup_ub 1);
|
|
113 |
by (assume_tac 1);
|
1440
|
114 |
(*<==*)
|
4153
|
115 |
by (rtac Sup_lb_ubs 1);
|
1899
|
116 |
by (Fast_tac 1);
|
1440
|
117 |
qed "ge_Sup_eq";
|
|
118 |
|
|
119 |
|
|
120 |
|
|
121 |
(** Subsets and limits **)
|
|
122 |
|
5069
|
123 |
Goal "A <= B --> Inf B [= Inf A";
|
4153
|
124 |
by (rtac impI 1);
|
1440
|
125 |
by (stac le_Inf_eq 1);
|
1465
|
126 |
by (rewtac Ball_def);
|
4153
|
127 |
by Safe_tac;
|
|
128 |
by (dtac subsetD 1);
|
|
129 |
by (assume_tac 1);
|
|
130 |
by (etac Inf_lb 1);
|
1440
|
131 |
qed "Inf_subset_antimon";
|
|
132 |
|
5069
|
133 |
Goal "A <= B --> Sup A [= Sup B";
|
4153
|
134 |
by (rtac impI 1);
|
1440
|
135 |
by (stac ge_Sup_eq 1);
|
1465
|
136 |
by (rewtac Ball_def);
|
4153
|
137 |
by Safe_tac;
|
|
138 |
by (dtac subsetD 1);
|
|
139 |
by (assume_tac 1);
|
|
140 |
by (etac Sup_ub 1);
|
1440
|
141 |
qed "Sup_subset_mon";
|
|
142 |
|
|
143 |
|
|
144 |
(** singleton / empty limits **)
|
|
145 |
|
5069
|
146 |
Goal "Inf {x} = x";
|
4153
|
147 |
by (rtac (Inf_uniq RS mp) 1);
|
1465
|
148 |
by (rewtac is_Inf_def);
|
4153
|
149 |
by Safe_tac;
|
|
150 |
by (rtac le_refl 1);
|
1899
|
151 |
by (Fast_tac 1);
|
1440
|
152 |
qed "sing_Inf_eq";
|
|
153 |
|
5069
|
154 |
Goal "Sup {x} = x";
|
4153
|
155 |
by (rtac (Sup_uniq RS mp) 1);
|
1465
|
156 |
by (rewtac is_Sup_def);
|
4153
|
157 |
by Safe_tac;
|
|
158 |
by (rtac le_refl 1);
|
1899
|
159 |
by (Fast_tac 1);
|
1440
|
160 |
qed "sing_Sup_eq";
|
|
161 |
|
|
162 |
|
5069
|
163 |
Goal "Inf {} = Sup {x. True}";
|
4153
|
164 |
by (rtac (Inf_uniq RS mp) 1);
|
1465
|
165 |
by (rewtac is_Inf_def);
|
4153
|
166 |
by Safe_tac;
|
|
167 |
by (rtac (sing_Sup_eq RS subst) 1);
|
1440
|
168 |
back();
|
4153
|
169 |
by (rtac (Sup_subset_mon RS mp) 1);
|
1899
|
170 |
by (Fast_tac 1);
|
1440
|
171 |
qed "empty_Inf_eq";
|
|
172 |
|
5069
|
173 |
Goal "Sup {} = Inf {x. True}";
|
4153
|
174 |
by (rtac (Sup_uniq RS mp) 1);
|
1465
|
175 |
by (rewtac is_Sup_def);
|
4153
|
176 |
by Safe_tac;
|
|
177 |
by (rtac (sing_Inf_eq RS subst) 1);
|
|
178 |
by (rtac (Inf_subset_antimon RS mp) 1);
|
1899
|
179 |
by (Fast_tac 1);
|
1440
|
180 |
qed "empty_Sup_eq";
|