src/Sequents/S4.thy
author haftmann
Tue, 10 Jul 2007 17:30:50 +0200
changeset 23709 fd31da8f752a
parent 21590 ef7278f553eb
child 30510 4120fc59dd85
permissions -rw-r--r--
moved lfp_induct2 here
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
     1
(*  Title:      Modal/S4.thy
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
     2
    ID:         $Id$
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
     3
    Author:     Martin Coen
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
     4
    Copyright   1991  University of Cambridge
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
     5
*)
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
     6
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
     7
theory S4
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
     8
imports Modal0
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
     9
begin
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    10
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    11
axioms
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    12
(* 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
    13
(* For system S4:  gamma * == {[]P | []P : gamma}               *)
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    14
(*                 delta * == {<>P | <>P : delta}               *)
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    15
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    16
  lstar0:         "|L>"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    17
  lstar1:         "$G |L> $H ==> []P, $G |L> []P, $H"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    18
  lstar2:         "$G |L> $H ==>   P, $G |L>      $H"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    19
  rstar0:         "|R>"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    20
  rstar1:         "$G |R> $H ==> <>P, $G |R> <>P, $H"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    21
  rstar2:         "$G |R> $H ==>   P, $G |R>      $H"
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    22
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    23
(* Rules for [] and <> *)
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    24
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    25
  boxR:
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    26
   "[| $E |L> $E';  $F |R> $F';  $G |R> $G';
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    27
           $E'         |- $F', P, $G'|] ==> $E          |- $F, []P, $G"
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    28
  boxL:     "$E,P,$F,[]P |-         $G    ==> $E, []P, $F |-          $G"
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    29
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    30
  diaR:     "$E          |- $F,P,$G,<>P   ==> $E          |- $F, <>P, $G"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    31
  diaL:
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    32
   "[| $E |L> $E';  $F |L> $F';  $G |R> $G';
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    33
           $E', P, $F' |-         $G'|] ==> $E, <>P, $F |- $G"
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
    34
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    35
ML {*
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    36
structure S4_Prover = Modal_ProverFun
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    37
(
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    38
  val rewrite_rls = thms "rewrite_rls"
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    39
  val safe_rls = thms "safe_rls"
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    40
  val unsafe_rls = thms "unsafe_rls" @ [thm "boxR", thm "diaL"]
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    41
  val bound_rls = thms "bound_rls" @ [thm "boxL", thm "diaR"]
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    42
  val aside_rls = [thm "lstar0", thm "lstar1", thm "lstar2", thm "rstar0",
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    43
    thm "rstar1", thm "rstar2"]
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    44
)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    45
*}
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    46
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    47
method_setup S4_solve =
21590
ef7278f553eb tuned spaces/comments;
wenzelm
parents: 21426
diff changeset
    48
  {* Method.no_args (Method.SIMPLE_METHOD (S4_Prover.solve_tac 2)) *} "S4 solver"
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    49
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    50
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    51
(* Theorems of system T from Hughes and Cresswell and Hailpern, LNCS 129 *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    52
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    53
lemma "|- []P --> P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    54
lemma "|- [](P-->Q) --> ([]P-->[]Q)" by S4_solve   (* normality*)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    55
lemma "|- (P--<Q) --> []P --> []Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    56
lemma "|- P --> <>P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    57
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    58
lemma "|-  [](P & Q) <-> []P & []Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    59
lemma "|-  <>(P | Q) <-> <>P | <>Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    60
lemma "|-  [](P<->Q) <-> (P>-<Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    61
lemma "|-  <>(P-->Q) <-> ([]P--><>Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    62
lemma "|-        []P <-> ~<>(~P)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    63
lemma "|-     [](~P) <-> ~<>P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    64
lemma "|-       ~[]P <-> <>(~P)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    65
lemma "|-      [][]P <-> ~<><>(~P)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    66
lemma "|- ~<>(P | Q) <-> ~<>P & ~<>Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    67
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    68
lemma "|- []P | []Q --> [](P | Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    69
lemma "|- <>(P & Q) --> <>P & <>Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    70
lemma "|- [](P | Q) --> []P | <>Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    71
lemma "|- <>P & []Q --> <>(P & Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    72
lemma "|- [](P | Q) --> <>P | []Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    73
lemma "|- <>(P-->(Q & R)) --> ([]P --> <>Q) & ([]P--><>R)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    74
lemma "|- (P--<Q) & (Q--<R) --> (P--<R)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    75
lemma "|- []P --> <>Q --> <>(P & Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    76
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    77
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    78
(* Theorems of system S4 from Hughes and Cresswell, p.46 *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    79
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    80
lemma "|- []A --> A" by S4_solve             (* refexivity *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    81
lemma "|- []A --> [][]A" by S4_solve         (* transitivity *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    82
lemma "|- []A --> <>A" by S4_solve           (* seriality *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    83
lemma "|- <>[](<>A --> []<>A)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    84
lemma "|- <>[](<>[]A --> []A)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    85
lemma "|- []P <-> [][]P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    86
lemma "|- <>P <-> <><>P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    87
lemma "|- <>[]<>P --> <>P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    88
lemma "|- []<>P <-> []<>[]<>P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    89
lemma "|- <>[]P <-> <>[]<>[]P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    90
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    91
(* Theorems for system S4 from Hughes and Cresswell, p.60 *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    92
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    93
lemma "|- []P | []Q <-> []([]P | []Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    94
lemma "|- ((P>-<Q) --< R) --> ((P>-<Q) --< []R)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    95
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    96
(* These are from Hailpern, LNCS 129 *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    97
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    98
lemma "|- [](P & Q) <-> []P & []Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    99
lemma "|- <>(P | Q) <-> <>P | <>Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   100
lemma "|- <>(P --> Q) <-> ([]P --> <>Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   101
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   102
lemma "|- [](P --> Q) --> (<>P --> <>Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   103
lemma "|- []P --> []<>P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   104
lemma "|- <>[]P --> <>P" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   105
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   106
lemma "|- []P | []Q --> [](P | Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   107
lemma "|- <>(P & Q) --> <>P & <>Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   108
lemma "|- [](P | Q) --> []P | <>Q" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   109
lemma "|- <>P & []Q --> <>(P & Q)" by S4_solve
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
   110
lemma "|- [](P | Q) --> <>P | []Q" by S4_solve
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 2073
diff changeset
   111
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
   112
end