File: maximumsort_why.sx

package info (click to toggle)
why 2.30%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,916 kB
  • sloc: ml: 116,979; java: 9,376; ansic: 5,175; makefile: 1,335; sh: 531; lisp: 127
file content (527 lines) | stat: -rw-r--r-- 16,728 bytes parent folder | download | duplicates (3)
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
(BG_PUSH 
  ; array_length
  (FORALL (t i v) (EQ (array_length (store t i v)) (array_length t)))
  ; booleans
  (DISTINCT |@true| |@false|)
  ; exchange
  (FORALL (t1 t2 i j)
	  (IFF (EQ (exchange t1 t2 i j) |@true|)
	       (AND (EQ (array_length t1) (array_length t2))
		    (EQ (select t1 i) (select t2 j))
		    (EQ (select t1 j) (select t2 i))
		    (FORALL (k) (IMPLIES (AND (NEQ k i) (NEQ k j))
					 (EQ (select t1 k) (select t2 k)))))))
  (FORALL (t1 t2 i j)
	  (IMPLIES (EQ (exchange t1 t2 i j) |@true|)
		   (EQ (array_length t1) (array_length t2))))
  ; permut
  (FORALL (t) (EQ (permut t t) |@true|))
  (FORALL (t1 t2) (IMPLIES (EQ (permut t1 t2) |@true|)
			   (EQ (permut t2 t1) |@true|)))
  (FORALL (t1 t2 t3) (IMPLIES (AND (EQ (permut t1 t2) |@true|)
				   (EQ (permut t2 t3) |@true|))
			      (EQ (permut t1 t3) |@true|)))
  (FORALL 
   (t i j) 
   (EQ (permut t (store (store t i (select t j)) j (select t i))) |@true|))
  (FORALL (t1 t2)
	  (IMPLIES (EQ (permut t1 t2) |@true|)
		   (EQ (array_length t1) (array_length t2))))
  ; sub_permut
  (FORALL (t g d) (EQ (sub_permut g d t t) |@true|))
  (FORALL (t1 t2 g d) (IMPLIES (EQ (sub_permut g d t1 t2) |@true|)
			   (EQ (sub_permut g d t2 t1) |@true|)))
  (FORALL (t1 t2 t3 g d) (IMPLIES (AND (EQ (sub_permut g d t1 t2) |@true|)
				       (EQ (sub_permut g d t2 t3) |@true|))
				  (EQ (sub_permut g d t1 t3) |@true|)))
  (FORALL 
   (t g d i j) 
   (IMPLIES (AND (<= g i) (<= i d) (<= g j) (<= j d))
	    (EQ (sub_permut g d t 
			    (store (store t i (select t j)) j (select t i))) 
		|@true|)))
  (FORALL 
   (t1 t2 g d i j)
   (IMPLIES (AND (EQ (exchange t1 t2 i j) |@true|)
		 (<= g i) (<= i d) (<= g j) (<= j d))
	    (EQ (sub_permut g d t1 t2) |@true|)))
  (FORALL (t1 t2 i j) 
	  (IMPLIES (EQ (sub_permut i j t1 t2) |@true|)
		   (EQ (permut t1 t2) |@true|)))
  (FORALL (t1 t2 i j)
	  (IMPLIES (EQ (sub_permut i j t1 t2) |@true|)
		   (EQ (array_length t1) (array_length t2))))
  ; sorted_array
  (FORALL 
   (t i j) 
   (IFF (EQ (sorted_array t i j) |@true|)
	(IMPLIES (<= i j)
		 (FORALL (k) (IMPLIES (AND (<= i k) (< k j))
				      (<= (select t k) (select t (+ k 1))))))))
)

(BG_PUSH
 ;; Why axiom Maximize_def
 (FORALL (t)
 (FORALL (n)
 (FORALL (x)
 (FORALL (k)
 (IFF (EQ (Maximize t n x k) |@true|)
 (FORALL (i) (IMPLIES (AND (<= k i) (<= i n)) (<= (select t k) x)))))))))

;; DO NOT EDIT BELOW THIS LINE

(BG_PUSH (NEQ |@true| |@false|))

(BG_PUSH
 ;; Why axiom bool_and_def
 (FORALL (a b)
 (IFF (EQ (bool_and a b) |@true|) (AND (EQ a |@true|) (EQ b |@true|)))))

(BG_PUSH
 ;; Why axiom bool_or_def
 (FORALL (a b)
 (IFF (EQ (bool_or a b) |@true|) (OR (EQ a |@true|) (EQ b |@true|)))))

(BG_PUSH
 ;; Why axiom bool_xor_def
 (FORALL (a b) (IFF (EQ (bool_xor a b) |@true|) (NEQ a b))))

(BG_PUSH
 ;; Why axiom bool_not_def
 (FORALL (a) (IFF (EQ (bool_not a) |@true|) (EQ a |@false|))))

(BG_PUSH
 ;; Why axiom ite_true
 (FORALL (x y) (EQ (ite |@true| x y) x)))

(BG_PUSH
 ;; Why axiom ite_false
 (FORALL (x y) (EQ (ite |@false| x y) y)))

(BG_PUSH
 ;; Why axiom lt_int_bool_axiom
 (FORALL (x y) (IFF (EQ (lt_int_bool x y) |@true|) (< x y))))

(BG_PUSH
 ;; Why axiom le_int_bool_axiom
 (FORALL (x y) (IFF (EQ (le_int_bool x y) |@true|) (<= x y))))

(BG_PUSH
 ;; Why axiom gt_int_bool_axiom
 (FORALL (x y) (IFF (EQ (gt_int_bool x y) |@true|) (> x y))))

(BG_PUSH
 ;; Why axiom ge_int_bool_axiom
 (FORALL (x y) (IFF (EQ (ge_int_bool x y) |@true|) (>= x y))))

(BG_PUSH
 ;; Why axiom eq_int_bool_axiom
 (FORALL (x y) (IFF (EQ (eq_int_bool x y) |@true|) (EQ x y))))

(BG_PUSH
 ;; Why axiom neq_int_bool_axiom
 (FORALL (x y) (IFF (EQ (neq_int_bool x y) |@true|) (NEQ x y))))

(BG_PUSH
 ;; Why axiom lt_real_bool_axiom
 (FORALL (x y)
 (IFF (EQ (lt_real_bool x y) |@true|) (EQ (lt_real x y) |@true|))))

(BG_PUSH
 ;; Why axiom le_real_bool_axiom
 (FORALL (x y)
 (IFF (EQ (le_real_bool x y) |@true|) (EQ (le_real x y) |@true|))))

(BG_PUSH
 ;; Why axiom gt_real_bool_axiom
 (FORALL (x y)
 (IFF (EQ (gt_real_bool x y) |@true|) (EQ (gt_real x y) |@true|))))

(BG_PUSH
 ;; Why axiom ge_real_bool_axiom
 (FORALL (x y)
 (IFF (EQ (ge_real_bool x y) |@true|) (EQ (ge_real x y) |@true|))))

(BG_PUSH
 ;; Why axiom eq_real_bool_axiom
 (FORALL (x y) (IFF (EQ (eq_real_bool x y) |@true|) (EQ x y))))

(BG_PUSH
 ;; Why axiom neq_real_bool_axiom
 (FORALL (x y) (IFF (EQ (neq_real_bool x y) |@true|) (NEQ x y))))

(DEFPRED (zwf_zero a b) (AND (<= 0 b) (< a b)))

(BG_PUSH
 ;; Why axiom access_update
 (FORALL (a i v) (EQ (access (update a i v) i) v)))

(BG_PUSH
 ;; Why axiom access_update_neq
 (FORALL (a i j v)
 (IMPLIES (NEQ i j) (EQ (access (update a i v) j) (access a j))))

 (FORALL (i j)
 (IMPLIES (NEQ i j)
 (FORALL (a v) (EQ (access (update a i v) j) (access a j))))))

(DEFPRED (sorted_array t i j)
  (FORALL (k1 k2)
  (IMPLIES (AND (AND (<= i k1) (<= k1 k2)) (<= k2 j))
  (<= (access t k1) (access t k2)))))

(DEFPRED (exchange a1 a2 i j)
  (AND (EQ (array_length a1) (array_length a2))
  (AND (EQ (access a1 i) (access a2 j))
  (AND (EQ (access a2 i) (access a1 j))
  (FORALL (k)
  (IMPLIES (AND (NEQ k i) (NEQ k j)) (EQ (access a1 k) (access a2 k))))))))

(BG_PUSH
 ;; Why axiom permut_refl
 (FORALL (t l u) (EQ (permut t t l u) |@true|)))

(BG_PUSH
 ;; Why axiom permut_sym
 (FORALL (t1 t2 l u)
 (IMPLIES (EQ (permut t1 t2 l u) |@true|) (EQ (permut t2 t1 l u) |@true|))))

(BG_PUSH
 ;; Why axiom permut_trans
 (FORALL (t1 t2 t3 l u)
 (IMPLIES (EQ (permut t1 t2 l u) |@true|)
 (IMPLIES (EQ (permut t2 t3 l u) |@true|) (EQ (permut t1 t3 l u) |@true|))))

 (FORALL (t1 t2 l u)
 (IMPLIES (EQ (permut t1 t2 l u) |@true|)
 (FORALL (t3)
 (IMPLIES (EQ (permut t2 t3 l u) |@true|) (EQ (permut t1 t3 l u) |@true|))))))

(BG_PUSH
 ;; Why axiom permut_exchange
 (FORALL (a1 a2 l u i j)
 (IMPLIES (AND (<= l i) (<= i u))
 (IMPLIES (AND (<= l j) (<= j u))
 (IMPLIES (exchange a1 a2 i j) (EQ (permut a1 a2 l u) |@true|)))))

 (FORALL (l u i)
 (IMPLIES (AND (<= l i) (<= i u))
 (FORALL (j)
 (IMPLIES (AND (<= l j) (<= j u))
 (FORALL (a1 a2)
 (IMPLIES (exchange a1 a2 i j) (EQ (permut a1 a2 l u) |@true|))))))))

(BG_PUSH
 ;; Why axiom exchange_upd
 (FORALL (a i j)
 (exchange a (update (update a i (access a j)) j (access a i)) i j)))

(BG_PUSH
 ;; Why axiom permut_weakening
 (FORALL (a1 a2 l1 r1 l2 r2)
 (IMPLIES (AND (AND (<= l1 l2) (<= l2 r2)) (<= r2 r1))
 (IMPLIES (EQ (permut a1 a2 l2 r2) |@true|)
 (EQ (permut a1 a2 l1 r1) |@true|))))

 (FORALL (l1 r1 l2 r2)
 (IMPLIES (AND (AND (<= l1 l2) (<= l2 r2)) (<= r2 r1))
 (FORALL (a2 a1)
 (IMPLIES (EQ (permut a1 a2 l2 r2) |@true|)
 (EQ (permut a1 a2 l1 r1) |@true|))))))

(BG_PUSH
 ;; Why axiom permut_eq
 (FORALL (a1 a2 l u)
 (IMPLIES (<= l u)
 (IMPLIES (EQ (permut a1 a2 l u) |@true|)
 (FORALL (i) (IMPLIES (OR (< i l) (< u i)) (EQ (access a2 i) (access a1 i)))))))

 (FORALL (l u)
 (IMPLIES (<= l u)
 (FORALL (a2 a1)
 (IMPLIES (EQ (permut a1 a2 l u) |@true|)
 (FORALL (i) (IMPLIES (OR (< i l) (< u i)) (EQ (access a2 i) (access a1 i)))))))))

(DEFPRED (permutation a1 a2)
  (EQ (permut a1 a2 0 (- (array_length a1) 1)) |@true|))

(BG_PUSH
 ;; Why axiom array_length_update
 (FORALL (a i v) (EQ (array_length (update a i v)) (array_length a))))

(BG_PUSH
 ;; Why axiom permut_array_length
 (FORALL (a1 a2 l u)
 (IMPLIES (EQ (permut a1 a2 l u) |@true|)
 (EQ (array_length a1) (array_length a2)))))

;; swap_po_1, File "maximumsort.mlw", line 10, characters 5-14
(FORALL (i)
(FORALL (j)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 i) (< i (array_length t)))
         (AND (<= 0 j) (< j (array_length t))))
(IMPLIES (AND (<= 0 i) (< i (array_length t)))
(FORALL (result)
(IMPLIES (EQ result (access t i))
(IMPLIES (AND (<= 0 j) (< j (array_length t)))
(FORALL (result0)
(IMPLIES (EQ result0 (access t j))
(IMPLIES (AND (<= 0 i) (< i (array_length t)))
(FORALL (t0)
(IMPLIES (EQ t0 (update t i result0)) (AND (<= 0 j) (< j (array_length t0))))))))))))))))

;; swap_po_2, File "maximumsort.mlw", line 12, characters 4-22
(FORALL (i)
(FORALL (j)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 i) (< i (array_length t)))
         (AND (<= 0 j) (< j (array_length t))))
(IMPLIES (AND (<= 0 i) (< i (array_length t)))
(FORALL (result)
(IMPLIES (EQ result (access t i))
(IMPLIES (AND (<= 0 j) (< j (array_length t)))
(FORALL (result0)
(IMPLIES (EQ result0 (access t j))
(IMPLIES (AND (<= 0 i) (< i (array_length t)))
(FORALL (t0)
(IMPLIES (EQ t0 (update t i result0))
(IMPLIES (AND (<= 0 j) (< j (array_length t0)))
(FORALL (t1) (IMPLIES (EQ t1 (update t0 j result)) (exchange t1 t i j)))))))))))))))))

(DEFPRED (Maximize t n x k)
  (FORALL (i) (IMPLIES (AND (<= k i) (<= i n)) (<= (access t k) x))))

;; maximum_po_1, File "maximumsort.mlw", line 31, characters 4-50
(FORALL (n)
(FORALL (k)
(FORALL (i)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 k) (<= k i))
         (AND (<= i n)
         (AND (< n (array_length t)) (Maximize t n (access t i) k))))
(IMPLIES (EQ k 0)
(AND (AND (<= 0 i) (<= i n)) (Maximize t n (access t i) 0))))))))

;; maximum_po_2, File "maximumsort.mlw", line 28, characters 10-15
(FORALL (n)
(FORALL (k)
(FORALL (i)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 k) (<= k i))
         (AND (<= i n)
         (AND (< n (array_length t)) (Maximize t n (access t i) k))))
(IMPLIES (NEQ k 0) (AND (<= 0 (- k 1)) (< (- k 1) (array_length t)))))))))

;; maximum_po_3, File "maximumsort.mlw", line 28, characters 16-20
(FORALL (n)
(FORALL (k)
(FORALL (i)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 k) (<= k i))
         (AND (<= i n)
         (AND (< n (array_length t)) (Maximize t n (access t i) k))))
(IMPLIES (NEQ k 0)
(IMPLIES (AND (<= 0 (- k 1)) (< (- k 1) (array_length t)))
(FORALL (result)
(IMPLIES (EQ result (access t (- k 1)))
(AND (<= 0 i) (< i (array_length t))))))))))))

;; maximum_po_4, File "maximumsort.mlw", line 29, characters 9-26
(FORALL (n)
(FORALL (k)
(FORALL (i)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 k) (<= k i))
         (AND (<= i n)
         (AND (< n (array_length t)) (Maximize t n (access t i) k))))
(IMPLIES (NEQ k 0)
(IMPLIES (AND (<= 0 (- k 1)) (< (- k 1) (array_length t)))
(FORALL (result)
(IMPLIES (EQ result (access t (- k 1)))
(IMPLIES (AND (<= 0 i) (< i (array_length t)))
(FORALL (result0)
(IMPLIES (EQ result0 (access t i))
(IMPLIES (> result result0) (AND (<= 0 k) (< (- k 1) k)))))))))))))))

;; maximum_po_5, File "maximumsort.mlw", line 29, characters 9-26
(FORALL (n)
(FORALL (k)
(FORALL (i)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 k) (<= k i))
         (AND (<= i n)
         (AND (< n (array_length t)) (Maximize t n (access t i) k))))
(IMPLIES (NEQ k 0)
(IMPLIES (AND (<= 0 (- k 1)) (< (- k 1) (array_length t)))
(FORALL (result)
(IMPLIES (EQ result (access t (- k 1)))
(IMPLIES (AND (<= 0 i) (< i (array_length t)))
(FORALL (result0)
(IMPLIES (EQ result0 (access t i))
(IMPLIES (> result result0)
(IMPLIES (AND (<= 0 k) (< (- k 1) k))
(AND (AND (<= 0 (- k 1)) (<= (- k 1) (- k 1)))
(AND (<= (- k 1) n)
(AND (< n (array_length t)) (Maximize t n (access t (- k 1)) (- k 1)))))))))))))))))))

;; maximum_po_6, File "maximumsort.mlw", line 30, characters 9-25
(FORALL (n)
(FORALL (k)
(FORALL (i)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 k) (<= k i))
         (AND (<= i n)
         (AND (< n (array_length t)) (Maximize t n (access t i) k))))
(IMPLIES (NEQ k 0)
(IMPLIES (AND (<= 0 (- k 1)) (< (- k 1) (array_length t)))
(FORALL (result)
(IMPLIES (EQ result (access t (- k 1)))
(IMPLIES (AND (<= 0 i) (< i (array_length t)))
(FORALL (result0)
(IMPLIES (EQ result0 (access t i))
(IMPLIES (<= result result0) (AND (<= 0 k) (< (- k 1) k)))))))))))))))

;; maximum_po_7, File "maximumsort.mlw", line 30, characters 9-25
(FORALL (n)
(FORALL (k)
(FORALL (i)
(FORALL (t)
(IMPLIES (AND (AND (<= 0 k) (<= k i))
         (AND (<= i n)
         (AND (< n (array_length t)) (Maximize t n (access t i) k))))
(IMPLIES (NEQ k 0)
(IMPLIES (AND (<= 0 (- k 1)) (< (- k 1) (array_length t)))
(FORALL (result)
(IMPLIES (EQ result (access t (- k 1)))
(IMPLIES (AND (<= 0 i) (< i (array_length t)))
(FORALL (result0)
(IMPLIES (EQ result0 (access t i))
(IMPLIES (<= result result0)
(IMPLIES (AND (<= 0 k) (< (- k 1) k))
(AND (AND (<= 0 (- k 1)) (<= (- k 1) i))
(AND (<= i n)
(AND (< n (array_length t)) (Maximize t n (access t i) (- k 1)))))))))))))))))))

;; maxisort_po_1, File "maximumsort.mlw", line 39, characters 18-198
(FORALL (t)
(IMPLIES (<= 0 (array_length t))
(FORALL (result)
(IMPLIES (EQ result (array_length t))
(AND (AND (<= 0 (+ (- result 1) 1)) (<= (+ (- result 1) 1) (array_length t)))
(AND (sorted_array t (+ (- result 1) 1) (- (array_length t) 1))
(AND (permutation t t)
(IMPLIES (< (+ (- result 1) 1) (array_length t))
(Maximize t (- result 1) (access t (+ (- result 1) 1)) 0)))))))))

;; maxisort_po_2, File "maximumsort.mlw", line 44, characters 16-34
(FORALL (t)
(IMPLIES (<= 0 (array_length t))
(FORALL (result)
(IMPLIES (EQ result (array_length t))
(FORALL (i)
(FORALL (t0)
(IMPLIES (AND (AND (<= 0 (+ i 1)) (<= (+ i 1) (array_length t0)))
         (AND (sorted_array t0 (+ i 1) (- (array_length t0) 1))
         (AND (permutation t0 t)
         (IMPLIES (< (+ i 1) (array_length t0))
         (Maximize t0 i (access t0 (+ i 1)) 0)))))
(IMPLIES (>= i 0)
(AND (AND (<= 0 i) (<= i i))
(AND (<= i i) (AND (< i (array_length t0)) (Maximize t0 i (access t0 i) i))))))))))))

;; maxisort_po_3, File "maximumsort.mlw", line 45, characters 8-19
(FORALL (t)
(IMPLIES (<= 0 (array_length t))
(FORALL (result)
(IMPLIES (EQ result (array_length t))
(FORALL (i)
(FORALL (t0)
(IMPLIES (AND (AND (<= 0 (+ i 1)) (<= (+ i 1) (array_length t0)))
         (AND (sorted_array t0 (+ i 1) (- (array_length t0) 1))
         (AND (permutation t0 t)
         (IMPLIES (< (+ i 1) (array_length t0))
         (Maximize t0 i (access t0 (+ i 1)) 0)))))
(IMPLIES (>= i 0)
(IMPLIES (AND (AND (<= 0 i) (<= i i))
         (AND (<= i i)
         (AND (< i (array_length t0)) (Maximize t0 i (access t0 i) i))))
(FORALL (result0)
(IMPLIES (AND (AND (<= 0 result0) (<= result0 i))
         (Maximize t0 i (access t0 result0) 0))
(AND (AND (<= 0 i) (< i (array_length t0)))
(AND (<= 0 result0) (< result0 (array_length t0)))))))))))))))

;; maxisort_po_4, File "maximumsort.mlw", line 39, characters 18-198
(FORALL (t)
(IMPLIES (<= 0 (array_length t))
(FORALL (result)
(IMPLIES (EQ result (array_length t))
(FORALL (i)
(FORALL (t0)
(IMPLIES (AND (AND (<= 0 (+ i 1)) (<= (+ i 1) (array_length t0)))
         (AND (sorted_array t0 (+ i 1) (- (array_length t0) 1))
         (AND (permutation t0 t)
         (IMPLIES (< (+ i 1) (array_length t0))
         (Maximize t0 i (access t0 (+ i 1)) 0)))))
(IMPLIES (>= i 0)
(IMPLIES (AND (AND (<= 0 i) (<= i i))
         (AND (<= i i)
         (AND (< i (array_length t0)) (Maximize t0 i (access t0 i) i))))
(FORALL (result0)
(IMPLIES (AND (AND (<= 0 result0) (<= result0 i))
         (Maximize t0 i (access t0 result0) 0))
(IMPLIES (AND (AND (<= 0 i) (< i (array_length t0)))
         (AND (<= 0 result0) (< result0 (array_length t0))))
(FORALL (t1)
(IMPLIES (exchange t1 t0 i result0)
(FORALL (i0)
(IMPLIES (EQ i0 (- i 1))
(AND (AND (<= 0 (+ i0 1)) (<= (+ i0 1) (array_length t1)))
(AND (sorted_array t1 (+ i0 1) (- (array_length t1) 1))
(AND (permutation t1 t)
(IMPLIES (< (+ i0 1) (array_length t1))
(Maximize t1 i0 (access t1 (+ i0 1)) 0)))))))))))))))))))))

;; maxisort_po_5, File "maximumsort.mlw", line 43, characters 16-19
(FORALL (t)
(IMPLIES (<= 0 (array_length t))
(FORALL (result)
(IMPLIES (EQ result (array_length t))
(FORALL (i)
(FORALL (t0)
(IMPLIES (AND (AND (<= 0 (+ i 1)) (<= (+ i 1) (array_length t0)))
         (AND (sorted_array t0 (+ i 1) (- (array_length t0) 1))
         (AND (permutation t0 t)
         (IMPLIES (< (+ i 1) (array_length t0))
         (Maximize t0 i (access t0 (+ i 1)) 0)))))
(IMPLIES (>= i 0)
(IMPLIES (AND (AND (<= 0 i) (<= i i))
         (AND (<= i i)
         (AND (< i (array_length t0)) (Maximize t0 i (access t0 i) i))))
(FORALL (result0)
(IMPLIES (AND (AND (<= 0 result0) (<= result0 i))
         (Maximize t0 i (access t0 result0) 0))
(IMPLIES (AND (AND (<= 0 i) (< i (array_length t0)))
         (AND (<= 0 result0) (< result0 (array_length t0))))
(FORALL (t1)
(IMPLIES (exchange t1 t0 i result0)
(FORALL (i0)
(IMPLIES (EQ i0 (- i 1)) (AND (<= 0 (+ i 1)) (< (+ i0 1) (+ i 1)))))))))))))))))))

;; maxisort_po_6, File "maximumsort.mlw", line 48, characters 4-61
(FORALL (t)
(IMPLIES (<= 0 (array_length t))
(FORALL (result)
(IMPLIES (EQ result (array_length t))
(FORALL (i)
(FORALL (t0)
(IMPLIES (AND (AND (<= 0 (+ i 1)) (<= (+ i 1) (array_length t0)))
         (AND (sorted_array t0 (+ i 1) (- (array_length t0) 1))
         (AND (permutation t0 t)
         (IMPLIES (< (+ i 1) (array_length t0))
         (Maximize t0 i (access t0 (+ i 1)) 0)))))
(IMPLIES (< i 0)
(AND (sorted_array t0 0 (- (array_length t0) 1)) (permutation t0 t))))))))))