14 seq'=>seq', seq'=>seq', seq'=>seq'] => prop" |
14 seq'=>seq', seq'=>seq', seq'=>seq'] => prop" |
15 syntax |
15 syntax |
16 "_S43pi" :: "[seq, seq, seq, seq, seq, seq] => prop" |
16 "_S43pi" :: "[seq, seq, seq, seq, seq, seq] => prop" |
17 ("S43pi((_);(_);(_);(_);(_);(_))" [] 5) |
17 ("S43pi((_);(_);(_);(_);(_);(_))" [] 5) |
18 |
18 |
19 parse_translation {* |
19 parse_translation \<open> |
20 let |
20 let |
21 val tr = seq_tr; |
21 val tr = seq_tr; |
22 fun s43pi_tr [s1, s2, s3, s4, s5, s6] = |
22 fun s43pi_tr [s1, s2, s3, s4, s5, s6] = |
23 Const (@{const_syntax S43pi}, dummyT) $ tr s1 $ tr s2 $ tr s3 $ tr s4 $ tr s5 $ tr s6; |
23 Const (@{const_syntax S43pi}, dummyT) $ tr s1 $ tr s2 $ tr s3 $ tr s4 $ tr s5 $ tr s6; |
24 in [(@{syntax_const "_S43pi"}, K s43pi_tr)] end |
24 in [(@{syntax_const "_S43pi"}, K s43pi_tr)] end |
25 *} |
25 \<close> |
26 |
26 |
27 print_translation {* |
27 print_translation \<open> |
28 let |
28 let |
29 val tr' = seq_tr'; |
29 val tr' = seq_tr'; |
30 fun s43pi_tr' [s1, s2, s3, s4, s5, s6] = |
30 fun s43pi_tr' [s1, s2, s3, s4, s5, s6] = |
31 Const(@{syntax_const "_S43pi"}, dummyT) $ tr' s1 $ tr' s2 $ tr' s3 $ tr' s4 $ tr' s5 $ tr' s6; |
31 Const(@{syntax_const "_S43pi"}, dummyT) $ tr' s1 $ tr' s2 $ tr' s3 $ tr' s4 $ tr' s5 $ tr' s6; |
32 in [(@{const_syntax S43pi}, K s43pi_tr')] end |
32 in [(@{const_syntax S43pi}, K s43pi_tr')] end |
33 *} |
33 \<close> |
34 |
34 |
35 axiomatization where |
35 axiomatization where |
36 (* Definition of the star operation using a set of Horn clauses *) |
36 (* Definition of the star operation using a set of Horn clauses *) |
37 (* For system S43: gamma * == {[]P | []P : gamma} *) |
37 (* For system S43: gamma * == {[]P | []P : gamma} *) |
38 (* delta * == {<>P | <>P : delta} *) |
38 (* delta * == {<>P | <>P : delta} *) |
74 "[| $L |L> $Lbox; $L |R> $Ldia; $R1,[]P,$R2 |L> $Rbox; $R1,[]P,$R2 |R> $Rdia; |
74 "[| $L |L> $Lbox; $L |R> $Ldia; $R1,[]P,$R2 |L> $Rbox; $R1,[]P,$R2 |R> $Rdia; |
75 S43pi ; $Ldia;; $Rbox; $Lbox; $Rdia |] ==> |
75 S43pi ; $Ldia;; $Rbox; $Lbox; $Rdia |] ==> |
76 $L |- $R1, []P, $R2" |
76 $L |- $R1, []P, $R2" |
77 |
77 |
78 |
78 |
79 ML {* |
79 ML \<open> |
80 structure S43_Prover = Modal_ProverFun |
80 structure S43_Prover = Modal_ProverFun |
81 ( |
81 ( |
82 val rewrite_rls = @{thms rewrite_rls} |
82 val rewrite_rls = @{thms rewrite_rls} |
83 val safe_rls = @{thms safe_rls} |
83 val safe_rls = @{thms safe_rls} |
84 val unsafe_rls = @{thms unsafe_rls} @ [@{thm pi1}, @{thm pi2}] |
84 val unsafe_rls = @{thms unsafe_rls} @ [@{thm pi1}, @{thm pi2}] |
85 val bound_rls = @{thms bound_rls} @ [@{thm boxL}, @{thm diaR}] |
85 val bound_rls = @{thms bound_rls} @ [@{thm boxL}, @{thm diaR}] |
86 val aside_rls = [@{thm lstar0}, @{thm lstar1}, @{thm lstar2}, @{thm rstar0}, |
86 val aside_rls = [@{thm lstar0}, @{thm lstar1}, @{thm lstar2}, @{thm rstar0}, |
87 @{thm rstar1}, @{thm rstar2}, @{thm S43pi0}, @{thm S43pi1}, @{thm S43pi2}] |
87 @{thm rstar1}, @{thm rstar2}, @{thm S43pi0}, @{thm S43pi1}, @{thm S43pi2}] |
88 ) |
88 ) |
89 *} |
89 \<close> |
90 |
90 |
91 |
91 |
92 method_setup S43_solve = {* |
92 method_setup S43_solve = \<open> |
93 Scan.succeed (fn ctxt => SIMPLE_METHOD |
93 Scan.succeed (fn ctxt => SIMPLE_METHOD |
94 (S43_Prover.solve_tac ctxt 2 ORELSE S43_Prover.solve_tac ctxt 3)) |
94 (S43_Prover.solve_tac ctxt 2 ORELSE S43_Prover.solve_tac ctxt 3)) |
95 *} |
95 \<close> |
96 |
96 |
97 |
97 |
98 (* Theorems of system T from Hughes and Cresswell and Hailpern, LNCS 129 *) |
98 (* Theorems of system T from Hughes and Cresswell and Hailpern, LNCS 129 *) |
99 |
99 |
100 lemma "|- []P --> P" by S43_solve |
100 lemma "|- []P --> P" by S43_solve |