3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
4 Copyright 2003 University of Cambridge |
4 Copyright 2003 University of Cambridge |
5 |
5 |
6 Specialized UNITY tactics, and ML bindings of theorems |
6 Specialized UNITY tactics, and ML bindings of theorems |
7 *) |
7 *) |
|
8 |
|
9 (*FP*) |
|
10 val stable_FP_Orig_Int = thm "stable_FP_Orig_Int"; |
|
11 val FP_Orig_weakest = thm "FP_Orig_weakest"; |
|
12 val stable_FP_Int = thm "stable_FP_Int"; |
|
13 val FP_equivalence = thm "FP_equivalence"; |
|
14 val FP_weakest = thm "FP_weakest"; |
|
15 val Compl_FP = thm "Compl_FP"; |
|
16 val Diff_FP = thm "Diff_FP"; |
|
17 |
|
18 (*SubstAx*) |
|
19 val LeadsTo_eq_leadsTo = thm "LeadsTo_eq_leadsTo"; |
|
20 val Always_LeadsTo_pre = thm "Always_LeadsTo_pre"; |
|
21 val Always_LeadsTo_post = thm "Always_LeadsTo_post"; |
|
22 val Always_LeadsToI = thm "Always_LeadsToI"; |
|
23 val Always_LeadsToD = thm "Always_LeadsToD"; |
|
24 val leadsTo_imp_LeadsTo = thm "leadsTo_imp_LeadsTo"; |
|
25 val LeadsTo_Trans = thm "LeadsTo_Trans"; |
|
26 val LeadsTo_Union = thm "LeadsTo_Union"; |
|
27 val LeadsTo_UNIV = thm "LeadsTo_UNIV"; |
|
28 val LeadsTo_Un_duplicate = thm "LeadsTo_Un_duplicate"; |
|
29 val LeadsTo_Un_duplicate2 = thm "LeadsTo_Un_duplicate2"; |
|
30 val LeadsTo_UN = thm "LeadsTo_UN"; |
|
31 val LeadsTo_Un = thm "LeadsTo_Un"; |
|
32 val single_LeadsTo_I = thm "single_LeadsTo_I"; |
|
33 val subset_imp_LeadsTo = thm "subset_imp_LeadsTo"; |
|
34 val empty_LeadsTo = thm "empty_LeadsTo"; |
|
35 val LeadsTo_weaken_R = thm "LeadsTo_weaken_R"; |
|
36 val LeadsTo_weaken_L = thm "LeadsTo_weaken_L"; |
|
37 val LeadsTo_weaken = thm "LeadsTo_weaken"; |
|
38 val Always_LeadsTo_weaken = thm "Always_LeadsTo_weaken"; |
|
39 val LeadsTo_Un_post = thm "LeadsTo_Un_post"; |
|
40 val LeadsTo_Trans_Un = thm "LeadsTo_Trans_Un"; |
|
41 val LeadsTo_Un_distrib = thm "LeadsTo_Un_distrib"; |
|
42 val LeadsTo_UN_distrib = thm "LeadsTo_UN_distrib"; |
|
43 val LeadsTo_Union_distrib = thm "LeadsTo_Union_distrib"; |
|
44 val LeadsTo_Basis = thm "LeadsTo_Basis"; |
|
45 val EnsuresI = thm "EnsuresI"; |
|
46 val Always_LeadsTo_Basis = thm "Always_LeadsTo_Basis"; |
|
47 val LeadsTo_Diff = thm "LeadsTo_Diff"; |
|
48 val LeadsTo_UN_UN = thm "LeadsTo_UN_UN"; |
|
49 val LeadsTo_UN_UN_noindex = thm "LeadsTo_UN_UN_noindex"; |
|
50 val all_LeadsTo_UN_UN = thm "all_LeadsTo_UN_UN"; |
|
51 val LeadsTo_Un_Un = thm "LeadsTo_Un_Un"; |
|
52 val LeadsTo_cancel2 = thm "LeadsTo_cancel2"; |
|
53 val LeadsTo_cancel_Diff2 = thm "LeadsTo_cancel_Diff2"; |
|
54 val LeadsTo_cancel1 = thm "LeadsTo_cancel1"; |
|
55 val LeadsTo_cancel_Diff1 = thm "LeadsTo_cancel_Diff1"; |
|
56 val LeadsTo_empty = thm "LeadsTo_empty"; |
|
57 val PSP_Stable = thm "PSP_Stable"; |
|
58 val PSP_Stable2 = thm "PSP_Stable2"; |
|
59 val PSP = thm "PSP"; |
|
60 val PSP2 = thm "PSP2"; |
|
61 val PSP_Unless = thm "PSP_Unless"; |
|
62 val Stable_transient_Always_LeadsTo = thm "Stable_transient_Always_LeadsTo"; |
|
63 val LeadsTo_wf_induct = thm "LeadsTo_wf_induct"; |
|
64 val Bounded_induct = thm "Bounded_induct"; |
|
65 val LessThan_induct = thm "LessThan_induct"; |
|
66 val integ_0_le_induct = thm "integ_0_le_induct"; |
|
67 val LessThan_bounded_induct = thm "LessThan_bounded_induct"; |
|
68 val GreaterThan_bounded_induct = thm "GreaterThan_bounded_induct"; |
|
69 val Completion = thm "Completion"; |
|
70 val Finite_completion_lemma = thm "Finite_completion_lemma"; |
|
71 val Finite_completion = thm "Finite_completion"; |
|
72 val Stable_completion = thm "Stable_completion"; |
|
73 val Finite_stable_completion = thm "Finite_stable_completion"; |
8 |
74 |
9 (*Union*) |
75 (*Union*) |
10 val Init_SKIP = thm "Init_SKIP"; |
76 val Init_SKIP = thm "Init_SKIP"; |
11 val Acts_SKIP = thm "Acts_SKIP"; |
77 val Acts_SKIP = thm "Acts_SKIP"; |
12 val AllowedActs_SKIP = thm "AllowedActs_SKIP"; |
78 val AllowedActs_SKIP = thm "AllowedActs_SKIP"; |
375 val PLam_preserves_snd = thm "PLam_preserves_snd"; |
441 val PLam_preserves_snd = thm "PLam_preserves_snd"; |
376 val guarantees_PLam_I = thm "guarantees_PLam_I"; |
442 val guarantees_PLam_I = thm "guarantees_PLam_I"; |
377 val Allowed_PLam = thm "Allowed_PLam"; |
443 val Allowed_PLam = thm "Allowed_PLam"; |
378 val PLam_preserves = thm "PLam_preserves"; |
444 val PLam_preserves = thm "PLam_preserves"; |
379 |
445 |
|
446 (*Follows*) |
|
447 val mono_Always_o = thm "mono_Always_o"; |
|
448 val mono_LeadsTo_o = thm "mono_LeadsTo_o"; |
|
449 val Follows_constant = thm "Follows_constant"; |
|
450 val mono_Follows_o = thm "mono_Follows_o"; |
|
451 val mono_Follows_apply = thm "mono_Follows_apply"; |
|
452 val Follows_trans = thm "Follows_trans"; |
|
453 val Follows_Increasing1 = thm "Follows_Increasing1"; |
|
454 val Follows_Increasing2 = thm "Follows_Increasing2"; |
|
455 val Follows_Bounded = thm "Follows_Bounded"; |
|
456 val Follows_LeadsTo = thm "Follows_LeadsTo"; |
|
457 val Follows_LeadsTo_pfixLe = thm "Follows_LeadsTo_pfixLe"; |
|
458 val Follows_LeadsTo_pfixGe = thm "Follows_LeadsTo_pfixGe"; |
|
459 val Always_Follows1 = thm "Always_Follows1"; |
|
460 val Always_Follows2 = thm "Always_Follows2"; |
|
461 val increasing_Un = thm "increasing_Un"; |
|
462 val Increasing_Un = thm "Increasing_Un"; |
|
463 val Always_Un = thm "Always_Un"; |
|
464 val Follows_Un_lemma = thm "Follows_Un_lemma"; |
|
465 val Follows_Un = thm "Follows_Un"; |
|
466 val increasing_union = thm "increasing_union"; |
|
467 val Increasing_union = thm "Increasing_union"; |
|
468 val Always_union = thm "Always_union"; |
|
469 val Follows_union_lemma = thm "Follows_union_lemma"; |
|
470 val Follows_union = thm "Follows_union"; |
|
471 val Follows_setsum = thm "Follows_setsum"; |
|
472 val Increasing_imp_Stable_pfixGe = thm "Increasing_imp_Stable_pfixGe"; |
|
473 val LeadsTo_le_imp_pfixGe = thm "LeadsTo_le_imp_pfixGe"; |
|
474 |
380 |
475 |
381 (*proves "co" properties when the program is specified*) |
476 (*proves "co" properties when the program is specified*) |
382 fun gen_constrains_tac(cs,ss) i = |
477 fun gen_constrains_tac(cs,ss) i = |
383 SELECT_GOAL |
478 SELECT_GOAL |
384 (EVERY [REPEAT (Always_Int_tac 1), |
479 (EVERY [REPEAT (Always_Int_tac 1), |
407 simp_tac (ss addsimps [Domain_def]) 3, |
502 simp_tac (ss addsimps [Domain_def]) 3, |
408 gen_constrains_tac (cs,ss) 1, |
503 gen_constrains_tac (cs,ss) 1, |
409 ALLGOALS (clarify_tac cs), |
504 ALLGOALS (clarify_tac cs), |
410 ALLGOALS (asm_lr_simp_tac ss)]); |
505 ALLGOALS (asm_lr_simp_tac ss)]); |
411 |
506 |
|
507 fun ensures_tac sact = gen_ensures_tac (claset(), simpset()) sact; |
|
508 |
412 |
509 |
413 (*Composition equivalences, from Lift_prog*) |
510 (*Composition equivalences, from Lift_prog*) |
414 |
511 |
415 fun make_o_equivs th = |
512 fun make_o_equivs th = |
416 [th, |
513 [th, |