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