author | krauss |
Mon, 23 Apr 2012 21:31:52 +0200 | |
changeset 47703 | 400fccb77ec8 |
parent 42814 | 5af15f1e2ef6 |
child 51309 | 473303ef6e34 |
permissions | -rw-r--r-- |
41959 | 1 |
(* Title: Sequents/S43.thy |
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
2 |
Author: Martin Coen |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
3 |
Copyright 1991 University of Cambridge |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
4 |
|
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
5 |
This implements Rajeev Gore's sequent calculus for S43. |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
6 |
*) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
7 |
|
17481 | 8 |
theory S43 |
9 |
imports Modal0 |
|
10 |
begin |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
11 |
|
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
12 |
consts |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
13 |
S43pi :: "[seq'=>seq', seq'=>seq', seq'=>seq', |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
14 |
seq'=>seq', seq'=>seq', seq'=>seq'] => prop" |
14765 | 15 |
syntax |
35113 | 16 |
"_S43pi" :: "[seq, seq, seq, seq, seq, seq] => prop" |
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
17 |
("S43pi((_);(_);(_);(_);(_);(_))" [] 5) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
18 |
|
35113 | 19 |
parse_translation {* |
20 |
let |
|
21 |
val tr = seq_tr; |
|
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; |
|
24 |
in [(@{syntax_const "_S43pi"}, s43pi_tr)] end |
|
17481 | 25 |
*} |
26 |
||
35113 | 27 |
print_translation {* |
28 |
let |
|
29 |
val tr' = seq_tr'; |
|
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; |
|
32 |
in [(@{const_syntax S43pi}, s43pi_tr')] end |
|
33 |
*} |
|
17481 | 34 |
|
35 |
axioms |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
36 |
(* Definition of the star operation using a set of Horn clauses *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
37 |
(* For system S43: gamma * == {[]P | []P : gamma} *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
38 |
(* delta * == {<>P | <>P : delta} *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
39 |
|
17481 | 40 |
lstar0: "|L>" |
41 |
lstar1: "$G |L> $H ==> []P, $G |L> []P, $H" |
|
42 |
lstar2: "$G |L> $H ==> P, $G |L> $H" |
|
43 |
rstar0: "|R>" |
|
44 |
rstar1: "$G |R> $H ==> <>P, $G |R> <>P, $H" |
|
45 |
rstar2: "$G |R> $H ==> P, $G |R> $H" |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
46 |
|
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
47 |
(* Set of Horn clauses to generate the antecedents for the S43 pi rule *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
48 |
(* ie *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
49 |
(* S1...Sk,Sk+1...Sk+m *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
50 |
(* ---------------------------------- *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
51 |
(* <>P1...<>Pk, $G |- $H, []Q1...[]Qm *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
52 |
(* *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
53 |
(* where Si == <>P1...<>Pi-1,<>Pi+1,..<>Pk,Pi, $G * |- $H *, []Q1...[]Qm *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
54 |
(* and Sj == <>P1...<>Pk, $G * |- $H *, []Q1...[]Qj-1,[]Qj+1...[]Qm,Qj *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
55 |
(* and 1<=i<=k and k<j<=k+m *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
56 |
|
17481 | 57 |
S43pi0: "S43pi $L;; $R;; $Lbox; $Rdia" |
58 |
S43pi1: |
|
59 |
"[| (S43pi <>P,$L'; $L;; $R; $Lbox;$Rdia); $L',P,$L,$Lbox |- $R,$Rdia |] ==> |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
60 |
S43pi $L'; <>P,$L;; $R; $Lbox;$Rdia" |
17481 | 61 |
S43pi2: |
62 |
"[| (S43pi $L';; []P,$R'; $R; $Lbox;$Rdia); $L',$Lbox |- $R',P,$R,$Rdia |] ==> |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
63 |
S43pi $L';; $R'; []P,$R; $Lbox;$Rdia" |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
64 |
|
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
65 |
(* Rules for [] and <> for S43 *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
66 |
|
17481 | 67 |
boxL: "$E, P, $F, []P |- $G ==> $E, []P, $F |- $G" |
68 |
diaR: "$E |- $F, P, $G, <>P ==> $E |- $F, <>P, $G" |
|
69 |
pi1: |
|
70 |
"[| $L1,<>P,$L2 |L> $Lbox; $L1,<>P,$L2 |R> $Ldia; $R |L> $Rbox; $R |R> $Rdia; |
|
71 |
S43pi ; $Ldia;; $Rbox; $Lbox; $Rdia |] ==> |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
72 |
$L1, <>P, $L2 |- $R" |
17481 | 73 |
pi2: |
74 |
"[| $L |L> $Lbox; $L |R> $Ldia; $R1,[]P,$R2 |L> $Rbox; $R1,[]P,$R2 |R> $Rdia; |
|
75 |
S43pi ; $Ldia;; $Rbox; $Lbox; $Rdia |] ==> |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
76 |
$L |- $R1, []P, $R2" |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
77 |
|
21426 | 78 |
|
79 |
ML {* |
|
80 |
structure S43_Prover = Modal_ProverFun |
|
81 |
( |
|
39159 | 82 |
val rewrite_rls = @{thms rewrite_rls} |
83 |
val safe_rls = @{thms safe_rls} |
|
84 |
val unsafe_rls = @{thms unsafe_rls} @ [@{thm pi1}, @{thm pi2}] |
|
85 |
val bound_rls = @{thms bound_rls} @ [@{thm boxL}, @{thm diaR}] |
|
86 |
val aside_rls = [@{thm lstar0}, @{thm lstar1}, @{thm lstar2}, @{thm rstar0}, |
|
87 |
@{thm rstar1}, @{thm rstar2}, @{thm S43pi0}, @{thm S43pi1}, @{thm S43pi2}] |
|
21426 | 88 |
) |
89 |
*} |
|
90 |
||
91 |
||
92 |
method_setup S43_solve = {* |
|
30549 | 93 |
Scan.succeed (K (SIMPLE_METHOD |
94 |
(S43_Prover.solve_tac 2 ORELSE S43_Prover.solve_tac 3))) |
|
42814 | 95 |
*} |
21426 | 96 |
|
97 |
||
98 |
(* Theorems of system T from Hughes and Cresswell and Hailpern, LNCS 129 *) |
|
99 |
||
100 |
lemma "|- []P --> P" by S43_solve |
|
101 |
lemma "|- [](P-->Q) --> ([]P-->[]Q)" by S43_solve (* normality*) |
|
102 |
lemma "|- (P--<Q) --> []P --> []Q" by S43_solve |
|
103 |
lemma "|- P --> <>P" by S43_solve |
|
104 |
||
105 |
lemma "|- [](P & Q) <-> []P & []Q" by S43_solve |
|
106 |
lemma "|- <>(P | Q) <-> <>P | <>Q" by S43_solve |
|
107 |
lemma "|- [](P<->Q) <-> (P>-<Q)" by S43_solve |
|
108 |
lemma "|- <>(P-->Q) <-> ([]P--><>Q)" by S43_solve |
|
109 |
lemma "|- []P <-> ~<>(~P)" by S43_solve |
|
110 |
lemma "|- [](~P) <-> ~<>P" by S43_solve |
|
111 |
lemma "|- ~[]P <-> <>(~P)" by S43_solve |
|
112 |
lemma "|- [][]P <-> ~<><>(~P)" by S43_solve |
|
113 |
lemma "|- ~<>(P | Q) <-> ~<>P & ~<>Q" by S43_solve |
|
114 |
||
115 |
lemma "|- []P | []Q --> [](P | Q)" by S43_solve |
|
116 |
lemma "|- <>(P & Q) --> <>P & <>Q" by S43_solve |
|
117 |
lemma "|- [](P | Q) --> []P | <>Q" by S43_solve |
|
118 |
lemma "|- <>P & []Q --> <>(P & Q)" by S43_solve |
|
119 |
lemma "|- [](P | Q) --> <>P | []Q" by S43_solve |
|
120 |
lemma "|- <>(P-->(Q & R)) --> ([]P --> <>Q) & ([]P--><>R)" by S43_solve |
|
121 |
lemma "|- (P--<Q) & (Q--<R) --> (P--<R)" by S43_solve |
|
122 |
lemma "|- []P --> <>Q --> <>(P & Q)" by S43_solve |
|
123 |
||
124 |
||
125 |
(* Theorems of system S4 from Hughes and Cresswell, p.46 *) |
|
126 |
||
127 |
lemma "|- []A --> A" by S43_solve (* refexivity *) |
|
128 |
lemma "|- []A --> [][]A" by S43_solve (* transitivity *) |
|
129 |
lemma "|- []A --> <>A" by S43_solve (* seriality *) |
|
130 |
lemma "|- <>[](<>A --> []<>A)" by S43_solve |
|
131 |
lemma "|- <>[](<>[]A --> []A)" by S43_solve |
|
132 |
lemma "|- []P <-> [][]P" by S43_solve |
|
133 |
lemma "|- <>P <-> <><>P" by S43_solve |
|
134 |
lemma "|- <>[]<>P --> <>P" by S43_solve |
|
135 |
lemma "|- []<>P <-> []<>[]<>P" by S43_solve |
|
136 |
lemma "|- <>[]P <-> <>[]<>[]P" by S43_solve |
|
137 |
||
138 |
(* Theorems for system S4 from Hughes and Cresswell, p.60 *) |
|
139 |
||
140 |
lemma "|- []P | []Q <-> []([]P | []Q)" by S43_solve |
|
141 |
lemma "|- ((P>-<Q) --< R) --> ((P>-<Q) --< []R)" by S43_solve |
|
142 |
||
143 |
(* These are from Hailpern, LNCS 129 *) |
|
144 |
||
145 |
lemma "|- [](P & Q) <-> []P & []Q" by S43_solve |
|
146 |
lemma "|- <>(P | Q) <-> <>P | <>Q" by S43_solve |
|
147 |
lemma "|- <>(P --> Q) <-> ([]P --> <>Q)" by S43_solve |
|
148 |
||
149 |
lemma "|- [](P --> Q) --> (<>P --> <>Q)" by S43_solve |
|
150 |
lemma "|- []P --> []<>P" by S43_solve |
|
151 |
lemma "|- <>[]P --> <>P" by S43_solve |
|
152 |
||
153 |
lemma "|- []P | []Q --> [](P | Q)" by S43_solve |
|
154 |
lemma "|- <>(P & Q) --> <>P & <>Q" by S43_solve |
|
155 |
lemma "|- [](P | Q) --> []P | <>Q" by S43_solve |
|
156 |
lemma "|- <>P & []Q --> <>(P & Q)" by S43_solve |
|
157 |
lemma "|- [](P | Q) --> <>P | []Q" by S43_solve |
|
158 |
||
159 |
||
160 |
(* Theorems of system S43 *) |
|
161 |
||
162 |
lemma "|- <>[]P --> []<>P" by S43_solve |
|
163 |
lemma "|- <>[]P --> [][]<>P" by S43_solve |
|
164 |
lemma "|- [](<>P | <>Q) --> []<>P | []<>Q" by S43_solve |
|
165 |
lemma "|- <>[]P & <>[]Q --> <>([]P & []Q)" by S43_solve |
|
166 |
lemma "|- []([]P --> []Q) | []([]Q --> []P)" by S43_solve |
|
167 |
lemma "|- [](<>P --> <>Q) | [](<>Q --> <>P)" by S43_solve |
|
168 |
lemma "|- []([]P --> Q) | []([]Q --> P)" by S43_solve |
|
169 |
lemma "|- [](P --> <>Q) | [](Q --> <>P)" by S43_solve |
|
170 |
lemma "|- [](P --> []Q-->R) | [](P | ([]R --> Q))" by S43_solve |
|
171 |
lemma "|- [](P | (Q --> <>C)) | [](P --> C --> <>Q)" by S43_solve |
|
172 |
lemma "|- []([]P | Q) & [](P | []Q) --> []P | []Q" by S43_solve |
|
173 |
lemma "|- <>P & <>Q --> <>(<>P & Q) | <>(P & <>Q)" by S43_solve |
|
174 |
lemma "|- [](P | Q) & []([]P | Q) & [](P | []Q) --> []P | []Q" by S43_solve |
|
175 |
lemma "|- <>P & <>Q --> <>(P & Q) | <>(<>P & Q) | <>(P & <>Q)" by S43_solve |
|
176 |
lemma "|- <>[]<>P <-> []<>P" by S43_solve |
|
177 |
lemma "|- []<>[]P <-> <>[]P" by S43_solve |
|
178 |
||
179 |
(* These are from Hailpern, LNCS 129 *) |
|
180 |
||
181 |
lemma "|- [](P & Q) <-> []P & []Q" by S43_solve |
|
182 |
lemma "|- <>(P | Q) <-> <>P | <>Q" by S43_solve |
|
183 |
lemma "|- <>(P --> Q) <-> []P --> <>Q" by S43_solve |
|
184 |
||
185 |
lemma "|- [](P --> Q) --> <>P --> <>Q" by S43_solve |
|
186 |
lemma "|- []P --> []<>P" by S43_solve |
|
187 |
lemma "|- <>[]P --> <>P" by S43_solve |
|
188 |
lemma "|- []<>[]P --> []<>P" by S43_solve |
|
189 |
lemma "|- <>[]P --> <>[]<>P" by S43_solve |
|
190 |
lemma "|- <>[]P --> []<>P" by S43_solve |
|
191 |
lemma "|- []<>[]P <-> <>[]P" by S43_solve |
|
192 |
lemma "|- <>[]<>P <-> []<>P" by S43_solve |
|
193 |
||
194 |
lemma "|- []P | []Q --> [](P | Q)" by S43_solve |
|
195 |
lemma "|- <>(P & Q) --> <>P & <>Q" by S43_solve |
|
196 |
lemma "|- [](P | Q) --> []P | <>Q" by S43_solve |
|
197 |
lemma "|- <>P & []Q --> <>(P & Q)" by S43_solve |
|
198 |
lemma "|- [](P | Q) --> <>P | []Q" by S43_solve |
|
199 |
lemma "|- [](P | Q) --> []<>P | []<>Q" by S43_solve |
|
200 |
lemma "|- <>[]P & <>[]Q --> <>(P & Q)" by S43_solve |
|
201 |
lemma "|- <>[](P & Q) <-> <>[]P & <>[]Q" by S43_solve |
|
202 |
lemma "|- []<>(P | Q) <-> []<>P | []<>Q" by S43_solve |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
203 |
|
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
204 |
end |