author | blanchet |
Tue, 17 Feb 2015 17:22:45 +0100 | |
changeset 59552 | ae50c9b82444 |
parent 54742 | 7a86358a3c0b |
child 60770 | 240563fbf41d |
permissions | -rw-r--r-- |
35762 | 1 |
(* Title: Sequents/S4.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 |
|
17481 | 6 |
theory S4 |
7 |
imports Modal0 |
|
8 |
begin |
|
9 |
||
51309 | 10 |
axiomatization where |
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
11 |
(* 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
|
12 |
(* For system S4: gamma * == {[]P | []P : gamma} *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
13 |
(* delta * == {<>P | <>P : delta} *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
14 |
|
51309 | 15 |
lstar0: "|L>" and |
16 |
lstar1: "$G |L> $H ==> []P, $G |L> []P, $H" and |
|
17 |
lstar2: "$G |L> $H ==> P, $G |L> $H" and |
|
18 |
rstar0: "|R>" and |
|
19 |
rstar1: "$G |R> $H ==> <>P, $G |R> <>P, $H" and |
|
20 |
rstar2: "$G |R> $H ==> P, $G |R> $H" and |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
21 |
|
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
22 |
(* Rules for [] and <> *) |
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
23 |
|
17481 | 24 |
boxR: |
25 |
"[| $E |L> $E'; $F |R> $F'; $G |R> $G'; |
|
51309 | 26 |
$E' |- $F', P, $G'|] ==> $E |- $F, []P, $G" and |
27 |
boxL: "$E,P,$F,[]P |- $G ==> $E, []P, $F |- $G" and |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
28 |
|
51309 | 29 |
diaR: "$E |- $F,P,$G,<>P ==> $E |- $F, <>P, $G" and |
17481 | 30 |
diaL: |
31 |
"[| $E |L> $E'; $F |L> $F'; $G |R> $G'; |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
32 |
$E', P, $F' |- $G'|] ==> $E, <>P, $F |- $G" |
17481 | 33 |
|
21426 | 34 |
ML {* |
35 |
structure S4_Prover = Modal_ProverFun |
|
36 |
( |
|
39159 | 37 |
val rewrite_rls = @{thms rewrite_rls} |
38 |
val safe_rls = @{thms safe_rls} |
|
39 |
val unsafe_rls = @{thms unsafe_rls} @ [@{thm boxR}, @{thm diaL}] |
|
40 |
val bound_rls = @{thms bound_rls} @ [@{thm boxL}, @{thm diaR}] |
|
41 |
val aside_rls = [@{thm lstar0}, @{thm lstar1}, @{thm lstar2}, @{thm rstar0}, |
|
42 |
@{thm rstar1}, @{thm rstar2}] |
|
21426 | 43 |
) |
44 |
*} |
|
45 |
||
54742
7a86358a3c0b
proper context for basic Simplifier operations: rewrite_rule, rewrite_goals_rule, rewrite_goals_tac etc.;
wenzelm
parents:
51309
diff
changeset
|
46 |
method_setup S4_solve = |
7a86358a3c0b
proper context for basic Simplifier operations: rewrite_rule, rewrite_goals_rule, rewrite_goals_tac etc.;
wenzelm
parents:
51309
diff
changeset
|
47 |
{* Scan.succeed (fn ctxt => SIMPLE_METHOD (S4_Prover.solve_tac ctxt 2)) *} |
21426 | 48 |
|
49 |
||
50 |
(* Theorems of system T from Hughes and Cresswell and Hailpern, LNCS 129 *) |
|
51 |
||
52 |
lemma "|- []P --> P" by S4_solve |
|
53 |
lemma "|- [](P-->Q) --> ([]P-->[]Q)" by S4_solve (* normality*) |
|
54 |
lemma "|- (P--<Q) --> []P --> []Q" by S4_solve |
|
55 |
lemma "|- P --> <>P" by S4_solve |
|
56 |
||
57 |
lemma "|- [](P & Q) <-> []P & []Q" by S4_solve |
|
58 |
lemma "|- <>(P | Q) <-> <>P | <>Q" by S4_solve |
|
59 |
lemma "|- [](P<->Q) <-> (P>-<Q)" by S4_solve |
|
60 |
lemma "|- <>(P-->Q) <-> ([]P--><>Q)" by S4_solve |
|
61 |
lemma "|- []P <-> ~<>(~P)" by S4_solve |
|
62 |
lemma "|- [](~P) <-> ~<>P" by S4_solve |
|
63 |
lemma "|- ~[]P <-> <>(~P)" by S4_solve |
|
64 |
lemma "|- [][]P <-> ~<><>(~P)" by S4_solve |
|
65 |
lemma "|- ~<>(P | Q) <-> ~<>P & ~<>Q" by S4_solve |
|
66 |
||
67 |
lemma "|- []P | []Q --> [](P | Q)" by S4_solve |
|
68 |
lemma "|- <>(P & Q) --> <>P & <>Q" by S4_solve |
|
69 |
lemma "|- [](P | Q) --> []P | <>Q" by S4_solve |
|
70 |
lemma "|- <>P & []Q --> <>(P & Q)" by S4_solve |
|
71 |
lemma "|- [](P | Q) --> <>P | []Q" by S4_solve |
|
72 |
lemma "|- <>(P-->(Q & R)) --> ([]P --> <>Q) & ([]P--><>R)" by S4_solve |
|
73 |
lemma "|- (P--<Q) & (Q--<R) --> (P--<R)" by S4_solve |
|
74 |
lemma "|- []P --> <>Q --> <>(P & Q)" by S4_solve |
|
75 |
||
76 |
||
77 |
(* Theorems of system S4 from Hughes and Cresswell, p.46 *) |
|
78 |
||
79 |
lemma "|- []A --> A" by S4_solve (* refexivity *) |
|
80 |
lemma "|- []A --> [][]A" by S4_solve (* transitivity *) |
|
81 |
lemma "|- []A --> <>A" by S4_solve (* seriality *) |
|
82 |
lemma "|- <>[](<>A --> []<>A)" by S4_solve |
|
83 |
lemma "|- <>[](<>[]A --> []A)" by S4_solve |
|
84 |
lemma "|- []P <-> [][]P" by S4_solve |
|
85 |
lemma "|- <>P <-> <><>P" by S4_solve |
|
86 |
lemma "|- <>[]<>P --> <>P" by S4_solve |
|
87 |
lemma "|- []<>P <-> []<>[]<>P" by S4_solve |
|
88 |
lemma "|- <>[]P <-> <>[]<>[]P" by S4_solve |
|
89 |
||
90 |
(* Theorems for system S4 from Hughes and Cresswell, p.60 *) |
|
91 |
||
92 |
lemma "|- []P | []Q <-> []([]P | []Q)" by S4_solve |
|
93 |
lemma "|- ((P>-<Q) --< R) --> ((P>-<Q) --< []R)" by S4_solve |
|
94 |
||
95 |
(* These are from Hailpern, LNCS 129 *) |
|
96 |
||
97 |
lemma "|- [](P & Q) <-> []P & []Q" by S4_solve |
|
98 |
lemma "|- <>(P | Q) <-> <>P | <>Q" by S4_solve |
|
99 |
lemma "|- <>(P --> Q) <-> ([]P --> <>Q)" by S4_solve |
|
100 |
||
101 |
lemma "|- [](P --> Q) --> (<>P --> <>Q)" by S4_solve |
|
102 |
lemma "|- []P --> []<>P" by S4_solve |
|
103 |
lemma "|- <>[]P --> <>P" by S4_solve |
|
104 |
||
105 |
lemma "|- []P | []Q --> [](P | Q)" by S4_solve |
|
106 |
lemma "|- <>(P & Q) --> <>P & <>Q" by S4_solve |
|
107 |
lemma "|- [](P | Q) --> []P | <>Q" by S4_solve |
|
108 |
lemma "|- <>P & []Q --> <>(P & Q)" by S4_solve |
|
109 |
lemma "|- [](P | Q) --> <>P | []Q" by S4_solve |
|
17481 | 110 |
|
2073
fb0655539d05
New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff
changeset
|
111 |
end |