File: theorems.tex

package info (click to toggle)
hol88 2.02.19940316-35
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 65,988 kB
  • ctags: 21,623
  • sloc: ml: 199,939; ansic: 9,666; sh: 7,118; makefile: 6,095; lisp: 2,747; yacc: 894; sed: 201; cpp: 87; awk: 5
file content (253 lines) | stat: -rw-r--r-- 7,336 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
\chapter{Pre-proved Theorems}\input{theorems-intro}\section{Basic definitions}\THEOREM wo\_chain WELLORDER
|- !l P. chain l P = (!x y. P x /\ P y ==> l(x,y) \/ l(y,x))
\ENDTHEOREM
\THEOREM wo\_fl WELLORDER
|- !l x. fl l x = (?y. l(x,y) \/ l(y,x))
\ENDTHEOREM
\THEOREM wo\_inseg WELLORDER
|- !l m. l inseg m = (!x y. l(x,y) = m(x,y) /\ fl l y))
\ENDTHEOREM
\THEOREM wo\_linseg WELLORDER
|- !l a. linseg l a = (\(x,y). l(x,y) /\ less l(y,a)))
\ENDTHEOREM
\THEOREM wo\_ordinal WELLORDER
|- !l.
    ordinal l = woset l /\ (!x. fl l x ==> (x = (@y. ~less l(y,x)))))
\ENDTHEOREM
\THEOREM wo\_poset WELLORDER
|- !l.
    poset l =
    (!x. fl l x ==> l(x,x)) /\
    (!x y z. l(x,y) /\ l(y,z) ==> l(x,z)) /\
    (!x y. l(x,y) /\ l(y,x) ==> (x = y))
\ENDTHEOREM
\THEOREM wo\_subset WELLORDER
|- !P Q. P subset Q = (!x. P x ==> Q x)
\ENDTHEOREM
\THEOREM wo\_Union WELLORDER
|- !P. Union P = (\x. ?p. P p /\ p x)
\ENDTHEOREM
\THEOREM wo\_woset WELLORDER
|- !l.
    woset l =
    (!x. fl l x ==> l(x,x)) /\
    (!x y z. l(x,y) /\ l(y,z) ==> l(x,z)) /\
    (!x y. l(x,y) /\ l(y,x) ==> (x = y)) /\
    (!x y. fl l x /\ fl l y ==> l(x,y) \/ l(y,x)) /\
    (!P.
      (!x. P x ==> fl l x) /\ (?x. P x) ==>
      (?y. P y /\ (!z. P z ==> l(y,z))))
\ENDTHEOREM
\section{Miscellaneous lemmas}\THEOREM AGREE\_LEMMA WELLORDER
|- !l h ms m n f g z.
    woset l /\
    (!x. fl l(ms x)) /\
    (!f f' x.
      (!y. less l(ms y,ms x) ==> (f y = f' y)) ==> (h f x = h f' x)) /\
    (!x. l(ms x,m) ==> (f x = h f x)) /\
    (!x. l(ms x,n) ==> (g x = h g x)) /\
    l(ms z,m) /\
    l(ms z,n) ==>
    (f z = g z)
\ENDTHEOREM
\THEOREM CHAIN\_SUBSET WELLORDER
|- !l P Q. chain l P /\ Q subset P ==> chain l Q
\ENDTHEOREM
\THEOREM EXTEND\_FL WELLORDER
|- !l x. woset l ==> (fl(\(x,y). l(x,y) /\ l(y,a))x = l(x,a))
\ENDTHEOREM
\THEOREM EXTEND\_INSEG WELLORDER
|- !l a. woset l /\ fl l a ==> (\(x,y). l(x,y) /\ l(y,a)) inseg l
\ENDTHEOREM
\THEOREM EXTEND\_LINSEG WELLORDER
|- !l a.
    woset l /\ fl l a ==>
    (\(x,y).
      linseg l a(x,y) \/ (y = a) /\ (fl(linseg l a)x \/ (x = a))) inseg
    l
\ENDTHEOREM
\THEOREM FL\_NUM WELLORDER
|- !n. fl(\(m,n). m <= n)n
\ENDTHEOREM
\THEOREM FL\_SUC WELLORDER
|- !l a.
    fl(\(x,y). l(x,y) \/ (y = a) /\ (fl l x \/ (x = a)))x =
    fl l x \/ (x = a)
\ENDTHEOREM
\THEOREM INSEG\_LINSEG WELLORDER
|- !l m.
    woset l ==>
    (m inseg l = (m = l) \/ (?a. fl l a /\ (m = linseg l a)))
\ENDTHEOREM
\THEOREM INSEG\_PROPER\_SUBSET WELLORDER
|- !l m. m inseg l /\ ~(l = m) ==> (?x y. l(x,y) /\ ~m(x,y))
\ENDTHEOREM
\THEOREM INSEG\_PROPER\_SUBSET\_FL WELLORDER
|- !l m. m inseg l /\ ~(l = m) ==> (?a. fl l a /\ ~fl m a)
\ENDTHEOREM
\THEOREM INSEG\_SUBSET WELLORDER
|- !l m. m inseg l ==> (!x y. m(x,y) ==> l(x,y))
\ENDTHEOREM
\THEOREM INSEG\_SUBSET\_FL WELLORDER
|- !l m. m inseg l ==> (!x. fl m x ==> fl l x)
\ENDTHEOREM
\THEOREM INSEG\_WOSET WELLORDER
|- !l m. m inseg l /\ woset l ==> woset m
\ENDTHEOREM
\THEOREM KL\_POSET\_LEMMA WELLORDER
|- poset(\(c1,c2). C subset c1 /\ c1 subset c2 /\ chain l c2)
\ENDTHEOREM
\THEOREM LINSEG\_FL WELLORDER
|- !l a x. woset l ==> (fl(linseg l a)x = less l(x,a))
\ENDTHEOREM
\THEOREM LINSEG\_INSEG WELLORDER
|- !l a. woset l ==> (linseg l a) inseg l
\ENDTHEOREM
\THEOREM LINSEG\_WOSET WELLORDER
|- !l a. woset l ==> woset(linseg l a)
\ENDTHEOREM
\THEOREM ORDINAL\_CHAINED WELLORDER
|- !l m. ordinal l /\ ordinal m ==> m inseg l \/ l inseg m
\ENDTHEOREM
\THEOREM ORDINAL\_SUC WELLORDER
|- !l.
    ordinal l /\ (?x. ~fl l x) ==>
    ordinal
    (\(x,y).
      l(x,y) \/ (y = (@y. ~fl l y)) /\ (fl l x \/ (x = (@y. ~fl l y))))
\ENDTHEOREM
\THEOREM ORDINAL\_UNION WELLORDER
|- !P. (!l. P l ==> ordinal l) ==> ordinal(Union P)
\ENDTHEOREM
\THEOREM ORDINAL\_UNION\_LEMMA WELLORDER
|- !l x. ordinal l ==> fl l x ==> fl(Union ordinal)x
\ENDTHEOREM
\THEOREM ORDINAL\_UP WELLORDER
|- !l.
    ordinal l ==>
    (!x. fl l x) \/ (?m x. ordinal m /\ fl m x /\ ~fl l x)
\ENDTHEOREM
\THEOREM PAIRED\_EXT WELLORDER
|- !l m. (!x y. l(x,y) = m(x,y)) = (l = m)
\ENDTHEOREM
\THEOREM POSET\_FLEQ WELLORDER
|- !l. poset l ==> (!x. fl l x = l(x,x))
\ENDTHEOREM
\THEOREM SUBSET\_ANTISYM WELLORDER
|- !P Q. P subset Q /\ Q subset P ==> (P = Q)
\ENDTHEOREM
\THEOREM SUBSET\_REFL WELLORDER
|- !P. P subset P
\ENDTHEOREM
\THEOREM SUBSET\_TRANS WELLORDER
|- !P Q R. P subset Q /\ Q subset R ==> P subset R
\ENDTHEOREM
\THEOREM UNION\_FL WELLORDER
|- !P l. fl(Union P)x = (?l. P l /\ fl l x)
\ENDTHEOREM
\THEOREM UNION\_INSEG WELLORDER
|- !P l. (!m. P m ==> m inseg l) ==> (Union P) inseg l
\ENDTHEOREM
\THEOREM WO\_FL\_RESTRICT WELLORDER
|- !l.
    woset l ==>
    (!P. fl(\(x,y). P x /\ P y /\ l(x,y))x = P x /\ fl l x)
\ENDTHEOREM
\THEOREM WO\_INDUCT WELLORDER
|- !P l.
    woset l /\ (!x. fl l x /\ (!y. less l(y,x) ==> P y) ==> P x) ==>
    (!x. fl l x ==> P x)
\ENDTHEOREM
\THEOREM WO\_LEMMA WELLORDER
|- ?l. ordinal l /\ (!x. fl l x)
\ENDTHEOREM
\THEOREM WO\_RECURSE  WELLORDER
|- !l h ms.
    woset l /\
    (!x. fl l(ms x)) /\
    (!f g x.
      (!y. less l(ms y,ms x) ==> (f y = g y)) ==> (h f x = h g x)) ==>
    (?! f. !x. f x = h f x)
\ENDTHEOREM
\THEOREM WO\_RECURSE\_EXISTS WELLORDER
|- !l h ms.
    woset l /\
    (!x. fl l(ms x)) /\
    (!f f' x.
      (!y. less l(ms y,ms x) ==> (f y = f' y)) ==> (h f x = h f' x)) ==>
    (?f. !x. f x = h f x)
\ENDTHEOREM
\THEOREM WO\_RECURSE\_LOCAL WELLORDER
|- !l h ms.
    woset l /\
    (!x. fl l(ms x)) /\
    (!f f' x.
      (!y. less l(ms y,ms x) ==> (f y = f' y)) ==> (h f x = h f' x)) ==>
    (!n. ?f. !x. l(ms x,n) ==> (f x = h f x))
\ENDTHEOREM
\THEOREM WO\_RECURSE\_NUM WELLORDER
|- !h ms.
    (!f g x.
      (!y. (ms y) < (ms x) ==> (f y = g y)) ==> (h f x = h g x)) ==>
    (?! f. !x. f x = h f x)
\ENDTHEOREM
\THEOREM WOSET WELLORDER
|- !l.
    woset l =
    (!x y. l(x,y) /\ l(y,x) ==> (x = y)) /\
    (!P.
      (!x. P x ==> fl l x) /\ (?x. P x) ==>
      (?y. P y /\ (!z. P z ==> l(y,z))))
\ENDTHEOREM
\THEOREM WOSET\_FLEQ WELLORDER
|- !l. woset l ==> (!x. fl l x = l(x,x))
\ENDTHEOREM
\THEOREM WOSET\_NUM WELLORDER
|- woset(\(m,n). m <= n)
\ENDTHEOREM
\THEOREM WOSET\_POSET WELLORDER
|- !l. woset l ==> poset l
\ENDTHEOREM
\THEOREM WOSET\_TOTAL\_LE WELLORDER
|- !l. woset l ==> (!x y. fl l x /\ fl l y ==> l(x,y) \/ less l(y,x))
\ENDTHEOREM
\THEOREM WOSET\_TOTAL\_LT WELLORDER
|- !l.
    woset l ==>
    (!x y. fl l x /\ fl l y ==> (x = y) \/ less l(x,y) \/ less l(y,x))
\ENDTHEOREM
\THEOREM WOSET\_TRANS\_LE WELLORDER
|- !l. woset l ==> (!x y z. l(x,y) /\ less l(y,z) ==> less l(x,z))
\ENDTHEOREM
\THEOREM WOSET\_TRANS\_LESS WELLORDER
|- !l. woset l ==> (!x y z. less l(x,y) /\ l(y,z) ==> less l(x,z))
\ENDTHEOREM
\THEOREM WOSET\_WELL\_CONTRAPOS WELLORDER
|- !l.
    woset l ==>
    (!P.
      (!x. P x ==> fl l x) /\ (?x. P x) ==>
      (?y. P y /\ (!z. less l(z,y) ==> ~P z)))
\ENDTHEOREM
\section{Main theorems}\THEOREM HP WELLORDER
|- !l.
    poset l ==>
    (?P. chain l P /\ (!Q. chain l Q /\ P subset Q ==> (Q = P)))
\ENDTHEOREM
\THEOREM KL WELLORDER
|- !l.
    poset l ==>
    (!Q.
      chain l Q ==>
      (?P.
        (chain l P /\ Q subset P) /\
        (!R. chain l R /\ P subset R ==> (R = P))))
\ENDTHEOREM
\THEOREM WO WELLORDER
|- !P. ?l. woset l /\ (fl l = P)
\ENDTHEOREM
\THEOREM ZL WELLORDER
|- !l.
    poset l /\ (!P. chain l P ==> (?y. fl l y /\ (!x. P x ==> l(x,y)))) ==>
    (?y. fl l y /\ (!x. l(y,x) ==> (y = x)))
\ENDTHEOREM