summary |
shortlog |
changelog |
graph |
tags |
branches |
files |
changeset |
file |
revisions |
annotate |
diff |
raw

src/Sequents/S43.thy

author | haftmann |

Fri Jun 19 21:08:07 2009 +0200 (2009-06-19) | |

changeset 31726 | ffd2dc631d88 |

parent 30549 | d2d7874648bd |

child 35113 | 1a0c129bb2e0 |

permissions | -rw-r--r-- |

merged

1 (* Title: Modal/S43.thy

2 ID: $Id$

3 Author: Martin Coen

4 Copyright 1991 University of Cambridge

6 This implements Rajeev Gore's sequent calculus for S43.

7 *)

9 theory S43

10 imports Modal0

11 begin

13 consts

14 S43pi :: "[seq'=>seq', seq'=>seq', seq'=>seq',

15 seq'=>seq', seq'=>seq', seq'=>seq'] => prop"

16 syntax

17 "@S43pi" :: "[seq, seq, seq, seq, seq, seq] => prop"

18 ("S43pi((_);(_);(_);(_);(_);(_))" [] 5)

20 ML {*

21 val S43pi = "S43pi";

22 val SS43pi = "@S43pi";

24 val tr = seq_tr;

25 val tr' = seq_tr';

27 fun s43pi_tr[s1,s2,s3,s4,s5,s6]=

28 Const(S43pi,dummyT)$tr s1$tr s2$tr s3$tr s4$tr s5$tr s6;

29 fun s43pi_tr'[s1,s2,s3,s4,s5,s6] =

30 Const(SS43pi,dummyT)$tr' s1$tr' s2$tr' s3$tr' s4$tr' s5$tr' s6;

32 *}

34 parse_translation {* [(SS43pi,s43pi_tr)] *}

35 print_translation {* [(S43pi,s43pi_tr')] *}

37 axioms

38 (* Definition of the star operation using a set of Horn clauses *)

39 (* For system S43: gamma * == {[]P | []P : gamma} *)

40 (* delta * == {<>P | <>P : delta} *)

42 lstar0: "|L>"

43 lstar1: "$G |L> $H ==> []P, $G |L> []P, $H"

44 lstar2: "$G |L> $H ==> P, $G |L> $H"

45 rstar0: "|R>"

46 rstar1: "$G |R> $H ==> <>P, $G |R> <>P, $H"

47 rstar2: "$G |R> $H ==> P, $G |R> $H"

49 (* Set of Horn clauses to generate the antecedents for the S43 pi rule *)

50 (* ie *)

51 (* S1...Sk,Sk+1...Sk+m *)

52 (* ---------------------------------- *)

53 (* <>P1...<>Pk, $G |- $H, []Q1...[]Qm *)

54 (* *)

55 (* where Si == <>P1...<>Pi-1,<>Pi+1,..<>Pk,Pi, $G * |- $H *, []Q1...[]Qm *)

56 (* and Sj == <>P1...<>Pk, $G * |- $H *, []Q1...[]Qj-1,[]Qj+1...[]Qm,Qj *)

57 (* and 1<=i<=k and k<j<=k+m *)

59 S43pi0: "S43pi $L;; $R;; $Lbox; $Rdia"

60 S43pi1:

61 "[| (S43pi <>P,$L'; $L;; $R; $Lbox;$Rdia); $L',P,$L,$Lbox |- $R,$Rdia |] ==>

62 S43pi $L'; <>P,$L;; $R; $Lbox;$Rdia"

63 S43pi2:

64 "[| (S43pi $L';; []P,$R'; $R; $Lbox;$Rdia); $L',$Lbox |- $R',P,$R,$Rdia |] ==>

65 S43pi $L';; $R'; []P,$R; $Lbox;$Rdia"

67 (* Rules for [] and <> for S43 *)

69 boxL: "$E, P, $F, []P |- $G ==> $E, []P, $F |- $G"

70 diaR: "$E |- $F, P, $G, <>P ==> $E |- $F, <>P, $G"

71 pi1:

72 "[| $L1,<>P,$L2 |L> $Lbox; $L1,<>P,$L2 |R> $Ldia; $R |L> $Rbox; $R |R> $Rdia;

73 S43pi ; $Ldia;; $Rbox; $Lbox; $Rdia |] ==>

74 $L1, <>P, $L2 |- $R"

75 pi2:

76 "[| $L |L> $Lbox; $L |R> $Ldia; $R1,[]P,$R2 |L> $Rbox; $R1,[]P,$R2 |R> $Rdia;

77 S43pi ; $Ldia;; $Rbox; $Lbox; $Rdia |] ==>

78 $L |- $R1, []P, $R2"

81 ML {*

82 structure S43_Prover = Modal_ProverFun

83 (

84 val rewrite_rls = thms "rewrite_rls"

85 val safe_rls = thms "safe_rls"

86 val unsafe_rls = thms "unsafe_rls" @ [thm "pi1", thm "pi2"]

87 val bound_rls = thms "bound_rls" @ [thm "boxL", thm "diaR"]

88 val aside_rls = [thm "lstar0", thm "lstar1", thm "lstar2", thm "rstar0",

89 thm "rstar1", thm "rstar2", thm "S43pi0", thm "S43pi1", thm "S43pi2"]

90 )

91 *}

94 method_setup S43_solve = {*

95 Scan.succeed (K (SIMPLE_METHOD

96 (S43_Prover.solve_tac 2 ORELSE S43_Prover.solve_tac 3)))

97 *} "S4 solver"

100 (* Theorems of system T from Hughes and Cresswell and Hailpern, LNCS 129 *)

102 lemma "|- []P --> P" by S43_solve

103 lemma "|- [](P-->Q) --> ([]P-->[]Q)" by S43_solve (* normality*)

104 lemma "|- (P--<Q) --> []P --> []Q" by S43_solve

105 lemma "|- P --> <>P" by S43_solve

107 lemma "|- [](P & Q) <-> []P & []Q" by S43_solve

108 lemma "|- <>(P | Q) <-> <>P | <>Q" by S43_solve

109 lemma "|- [](P<->Q) <-> (P>-<Q)" by S43_solve

110 lemma "|- <>(P-->Q) <-> ([]P--><>Q)" by S43_solve

111 lemma "|- []P <-> ~<>(~P)" by S43_solve

112 lemma "|- [](~P) <-> ~<>P" by S43_solve

113 lemma "|- ~[]P <-> <>(~P)" by S43_solve

114 lemma "|- [][]P <-> ~<><>(~P)" by S43_solve

115 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 --> <>(P & Q)" by S43_solve

121 lemma "|- [](P | Q) --> <>P | []Q" by S43_solve

122 lemma "|- <>(P-->(Q & R)) --> ([]P --> <>Q) & ([]P--><>R)" by S43_solve

123 lemma "|- (P--<Q) & (Q--<R) --> (P--<R)" by S43_solve

124 lemma "|- []P --> <>Q --> <>(P & Q)" by S43_solve

127 (* Theorems of system S4 from Hughes and Cresswell, p.46 *)

129 lemma "|- []A --> A" by S43_solve (* refexivity *)

130 lemma "|- []A --> [][]A" by S43_solve (* transitivity *)

131 lemma "|- []A --> <>A" by S43_solve (* seriality *)

132 lemma "|- <>[](<>A --> []<>A)" by S43_solve

133 lemma "|- <>[](<>[]A --> []A)" 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 lemma "|- []<>P <-> []<>[]<>P" by S43_solve

138 lemma "|- <>[]P <-> <>[]<>[]P" by S43_solve

140 (* Theorems for system S4 from Hughes and Cresswell, p.60 *)

142 lemma "|- []P | []Q <-> []([]P | []Q)" by S43_solve

143 lemma "|- ((P>-<Q) --< R) --> ((P>-<Q) --< []R)" by S43_solve

145 (* These are from Hailpern, LNCS 129 *)

147 lemma "|- [](P & Q) <-> []P & []Q" by S43_solve

148 lemma "|- <>(P | Q) <-> <>P | <>Q" by S43_solve

149 lemma "|- <>(P --> Q) <-> ([]P --> <>Q)" by S43_solve

151 lemma "|- [](P --> Q) --> (<>P --> <>Q)" by S43_solve

152 lemma "|- []P --> []<>P" by S43_solve

153 lemma "|- <>[]P --> <>P" 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 lemma "|- <>P & []Q --> <>(P & Q)" by S43_solve

159 lemma "|- [](P | Q) --> <>P | []Q" by S43_solve

162 (* Theorems of system S43 *)

164 lemma "|- <>[]P --> []<>P" by S43_solve

165 lemma "|- <>[]P --> [][]<>P" by S43_solve

166 lemma "|- [](<>P | <>Q) --> []<>P | []<>Q" by S43_solve

167 lemma "|- <>[]P & <>[]Q --> <>([]P & []Q)" 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) | []([]Q --> P)" by S43_solve

171 lemma "|- [](P --> <>Q) | [](Q --> <>P)" by S43_solve

172 lemma "|- [](P --> []Q-->R) | [](P | ([]R --> Q))" by S43_solve

173 lemma "|- [](P | (Q --> <>C)) | [](P --> C --> <>Q)" by S43_solve

174 lemma "|- []([]P | Q) & [](P | []Q) --> []P | []Q" by S43_solve

175 lemma "|- <>P & <>Q --> <>(<>P & Q) | <>(P & <>Q)" by S43_solve

176 lemma "|- [](P | Q) & []([]P | Q) & [](P | []Q) --> []P | []Q" by S43_solve

177 lemma "|- <>P & <>Q --> <>(P & Q) | <>(<>P & Q) | <>(P & <>Q)" by S43_solve

178 lemma "|- <>[]<>P <-> []<>P" by S43_solve

179 lemma "|- []<>[]P <-> <>[]P" by S43_solve

181 (* These are from Hailpern, LNCS 129 *)

183 lemma "|- [](P & Q) <-> []P & []Q" by S43_solve

184 lemma "|- <>(P | Q) <-> <>P | <>Q" by S43_solve

185 lemma "|- <>(P --> Q) <-> []P --> <>Q" by S43_solve

187 lemma "|- [](P --> Q) --> <>P --> <>Q" 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 lemma "|- []<>[]P <-> <>[]P" by S43_solve

194 lemma "|- <>[]<>P <-> []<>P" 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

203 lemma "|- <>[](P & Q) <-> <>[]P & <>[]Q" by S43_solve

204 lemma "|- []<>(P | Q) <-> []<>P | []<>Q" by S43_solve

206 end