1440
|
1 |
|
|
2 |
|
|
3 |
(** basic properties of limits **)
|
|
4 |
|
|
5 |
(* uniqueness *)
|
|
6 |
|
|
7 |
val tac =
|
|
8 |
rtac impI 1 THEN
|
|
9 |
rtac (le_antisym RS mp) 1 THEN
|
1899
|
10 |
Fast_tac 1;
|
1440
|
11 |
|
|
12 |
|
5069
|
13 |
Goalw [is_inf_def] "is_inf x y inf & is_inf x y inf' --> inf = inf'";
|
1440
|
14 |
by tac;
|
|
15 |
qed "is_inf_uniq";
|
|
16 |
|
5069
|
17 |
Goalw [is_sup_def] "is_sup x y sup & is_sup x y sup' --> sup = sup'";
|
1440
|
18 |
by tac;
|
|
19 |
qed "is_sup_uniq";
|
|
20 |
|
|
21 |
|
5069
|
22 |
Goalw [is_Inf_def] "is_Inf A inf & is_Inf A inf' --> inf = inf'";
|
1440
|
23 |
by tac;
|
|
24 |
qed "is_Inf_uniq";
|
|
25 |
|
5069
|
26 |
Goalw [is_Sup_def] "is_Sup A sup & is_Sup A sup' --> sup = sup'";
|
1440
|
27 |
by tac;
|
|
28 |
qed "is_Sup_uniq";
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
(* commutativity *)
|
|
33 |
|
5069
|
34 |
Goalw [is_inf_def] "is_inf x y inf = is_inf y x inf";
|
1899
|
35 |
by (Fast_tac 1);
|
1440
|
36 |
qed "is_inf_commut";
|
|
37 |
|
5069
|
38 |
Goalw [is_sup_def] "is_sup x y sup = is_sup y x sup";
|
1899
|
39 |
by (Fast_tac 1);
|
1440
|
40 |
qed "is_sup_commut";
|
|
41 |
|
|
42 |
|
|
43 |
(* associativity *)
|
|
44 |
|
5069
|
45 |
Goalw [is_inf_def] "is_inf x y xy & is_inf y z yz & is_inf xy z xyz --> is_inf x yz xyz";
|
4153
|
46 |
by Safe_tac;
|
1440
|
47 |
(*level 1*)
|
4153
|
48 |
by (rtac (le_trans RS mp) 1);
|
|
49 |
by (etac conjI 1);
|
|
50 |
by (assume_tac 1);
|
1440
|
51 |
(*level 4*)
|
1899
|
52 |
by (Step_tac 1);
|
1440
|
53 |
back();
|
4153
|
54 |
by (etac mp 1);
|
|
55 |
by (rtac conjI 1);
|
|
56 |
by (rtac (le_trans RS mp) 1);
|
|
57 |
by (etac conjI 1);
|
|
58 |
by (assume_tac 1);
|
|
59 |
by (assume_tac 1);
|
1440
|
60 |
(*level 11*)
|
1899
|
61 |
by (Step_tac 1);
|
1440
|
62 |
back();
|
|
63 |
back();
|
4153
|
64 |
by (etac mp 1);
|
|
65 |
by (rtac conjI 1);
|
1899
|
66 |
by (Step_tac 1);
|
4153
|
67 |
by (etac mp 1);
|
|
68 |
by (etac conjI 1);
|
|
69 |
by (rtac (le_trans RS mp) 1);
|
|
70 |
by (etac conjI 1);
|
|
71 |
by (assume_tac 1);
|
|
72 |
by (rtac (le_trans RS mp) 1);
|
|
73 |
by (etac conjI 1);
|
1440
|
74 |
back(); (* !! *)
|
4153
|
75 |
by (assume_tac 1);
|
1440
|
76 |
qed "is_inf_assoc";
|
|
77 |
|
|
78 |
|
5069
|
79 |
Goalw [is_sup_def] "is_sup x y xy & is_sup y z yz & is_sup xy z xyz --> is_sup x yz xyz";
|
4153
|
80 |
by Safe_tac;
|
1440
|
81 |
(*level 1*)
|
4153
|
82 |
by (rtac (le_trans RS mp) 1);
|
|
83 |
by (etac conjI 1);
|
|
84 |
by (assume_tac 1);
|
1440
|
85 |
(*level 4*)
|
1899
|
86 |
by (Step_tac 1);
|
1440
|
87 |
back();
|
4153
|
88 |
by (etac mp 1);
|
|
89 |
by (rtac conjI 1);
|
|
90 |
by (rtac (le_trans RS mp) 1);
|
|
91 |
by (etac conjI 1);
|
|
92 |
by (assume_tac 1);
|
|
93 |
by (assume_tac 1);
|
1440
|
94 |
(*level 11*)
|
1899
|
95 |
by (Step_tac 1);
|
1440
|
96 |
back();
|
|
97 |
back();
|
4153
|
98 |
by (etac mp 1);
|
|
99 |
by (rtac conjI 1);
|
1899
|
100 |
by (Step_tac 1);
|
4153
|
101 |
by (etac mp 1);
|
|
102 |
by (etac conjI 1);
|
|
103 |
by (rtac (le_trans RS mp) 1);
|
|
104 |
by (etac conjI 1);
|
1440
|
105 |
back(); (* !! *)
|
4153
|
106 |
by (assume_tac 1);
|
|
107 |
by (rtac (le_trans RS mp) 1);
|
|
108 |
by (etac conjI 1);
|
|
109 |
by (assume_tac 1);
|
1440
|
110 |
qed "is_sup_assoc";
|
|
111 |
|
|
112 |
|
|
113 |
(** limits in linear orders **)
|
|
114 |
|
5069
|
115 |
Goalw [minimum_def, is_inf_def] "is_inf (x::'a::linear_order) y (minimum x y)";
|
4831
|
116 |
by (stac split_if 1);
|
1440
|
117 |
by (REPEAT_FIRST (resolve_tac [conjI, impI]));
|
|
118 |
(*case "x [= y"*)
|
4153
|
119 |
by (rtac le_refl 1);
|
|
120 |
by (assume_tac 1);
|
1899
|
121 |
by (Fast_tac 1);
|
1440
|
122 |
(*case "~ x [= y"*)
|
4153
|
123 |
by (rtac (le_linear RS disjE) 1);
|
|
124 |
by (assume_tac 1);
|
|
125 |
by (etac notE 1);
|
|
126 |
by (assume_tac 1);
|
|
127 |
by (rtac le_refl 1);
|
1899
|
128 |
by (Fast_tac 1);
|
1440
|
129 |
qed "min_is_inf";
|
|
130 |
|
5069
|
131 |
Goalw [maximum_def, is_sup_def] "is_sup (x::'a::linear_order) y (maximum x y)";
|
4831
|
132 |
by (stac split_if 1);
|
1440
|
133 |
by (REPEAT_FIRST (resolve_tac [conjI, impI]));
|
|
134 |
(*case "x [= y"*)
|
4153
|
135 |
by (assume_tac 1);
|
|
136 |
by (rtac le_refl 1);
|
1899
|
137 |
by (Fast_tac 1);
|
1440
|
138 |
(*case "~ x [= y"*)
|
4153
|
139 |
by (rtac le_refl 1);
|
|
140 |
by (rtac (le_linear RS disjE) 1);
|
|
141 |
by (assume_tac 1);
|
|
142 |
by (etac notE 1);
|
|
143 |
by (assume_tac 1);
|
1899
|
144 |
by (Fast_tac 1);
|
1440
|
145 |
qed "max_is_sup";
|
|
146 |
|
|
147 |
|
|
148 |
|
|
149 |
(** general vs. binary limits **)
|
|
150 |
|
5069
|
151 |
Goalw [is_inf_def, is_Inf_def] "is_Inf {x, y} inf = is_inf x y inf";
|
4153
|
152 |
by (rtac iffI 1);
|
1440
|
153 |
(*==>*)
|
1899
|
154 |
by (Fast_tac 1);
|
1440
|
155 |
(*<==*)
|
4153
|
156 |
by Safe_tac;
|
1899
|
157 |
by (Step_tac 1);
|
4153
|
158 |
by (etac mp 1);
|
1899
|
159 |
by (Fast_tac 1);
|
1440
|
160 |
qed "bin_is_Inf_eq";
|
|
161 |
|
5069
|
162 |
Goalw [is_sup_def, is_Sup_def] "is_Sup {x, y} sup = is_sup x y sup";
|
4153
|
163 |
by (rtac iffI 1);
|
1440
|
164 |
(*==>*)
|
1899
|
165 |
by (Fast_tac 1);
|
1440
|
166 |
(*<==*)
|
4153
|
167 |
by Safe_tac;
|
1899
|
168 |
by (Step_tac 1);
|
4153
|
169 |
by (etac mp 1);
|
1899
|
170 |
by (Fast_tac 1);
|
1440
|
171 |
qed "bin_is_Sup_eq";
|