src/Sequents/S43.thy
author wenzelm
Fri May 21 21:14:18 2004 +0200 (2004-05-21)
changeset 14765 bafb24c150c1
parent 2073 fb0655539d05
child 17481 75166ebb619b
permissions -rw-r--r--
proper use of 'syntax';
     1 (*  Title:      Modal/S43
     2     ID:         $Id$
     3     Author:     Martin Coen
     4     Copyright   1991  University of Cambridge
     5 
     6 This implements Rajeev Gore's sequent calculus for S43.
     7 *)
     8 
     9 S43 = Modal0 +
    10 
    11 consts
    12   S43pi :: "[seq'=>seq', seq'=>seq', seq'=>seq',
    13              seq'=>seq', seq'=>seq', seq'=>seq'] => prop"
    14 syntax
    15   "@S43pi" :: "[seq, seq, seq, seq, seq, seq] => prop"
    16                          ("S43pi((_);(_);(_);(_);(_);(_))" [] 5)
    17 
    18 rules
    19 (* Definition of the star operation using a set of Horn clauses  *)
    20 (* For system S43: gamma * == {[]P | []P : gamma}                *)
    21 (*                 delta * == {<>P | <>P : delta}                *)
    22 
    23   lstar0         "|L>"
    24   lstar1         "$G |L> $H ==> []P, $G |L> []P, $H"
    25   lstar2         "$G |L> $H ==>   P, $G |L>      $H"
    26   rstar0         "|R>"
    27   rstar1         "$G |R> $H ==> <>P, $G |R> <>P, $H"
    28   rstar2         "$G |R> $H ==>   P, $G |R>      $H"
    29 
    30 (* Set of Horn clauses to generate the antecedents for the S43 pi rule       *)
    31 (* ie                                                                        *)
    32 (*           S1...Sk,Sk+1...Sk+m                                             *)
    33 (*     ----------------------------------                                    *)
    34 (*     <>P1...<>Pk, $G |- $H, []Q1...[]Qm                                    *)
    35 (*                                                                           *)
    36 (*  where Si == <>P1...<>Pi-1,<>Pi+1,..<>Pk,Pi, $G * |- $H *, []Q1...[]Qm    *)
    37 (*    and Sj == <>P1...<>Pk, $G * |- $H *, []Q1...[]Qj-1,[]Qj+1...[]Qm,Qj    *)
    38 (*    and 1<=i<=k and k<j<=k+m                                               *)
    39 
    40   S43pi0         "S43pi $L;; $R;; $Lbox; $Rdia"
    41   S43pi1
    42    "[| (S43pi <>P,$L';     $L;; $R; $Lbox;$Rdia);   $L',P,$L,$Lbox |- $R,$Rdia |] ==> 
    43        S43pi     $L'; <>P,$L;; $R; $Lbox;$Rdia"
    44   S43pi2
    45    "[| (S43pi $L';; []P,$R';     $R; $Lbox;$Rdia);  $L',$Lbox |- $R',P,$R,$Rdia |] ==> 
    46        S43pi $L';;     $R'; []P,$R; $Lbox;$Rdia"
    47 
    48 (* Rules for [] and <> for S43 *)
    49 
    50   boxL           "$E, P, $F, []P |- $G ==> $E, []P, $F |- $G"
    51   diaR           "$E |- $F, P, $G, <>P ==> $E |- $F, <>P, $G"
    52   pi1
    53    "[| $L1,<>P,$L2 |L> $Lbox;  $L1,<>P,$L2 |R> $Ldia;  $R |L> $Rbox;  $R |R> $Rdia;  
    54       S43pi ; $Ldia;; $Rbox; $Lbox; $Rdia |] ==> 
    55    $L1, <>P, $L2 |- $R"
    56   pi2
    57    "[| $L |L> $Lbox;  $L |R> $Ldia;  $R1,[]P,$R2 |L> $Rbox;  $R1,[]P,$R2 |R> $Rdia;  
    58       S43pi ; $Ldia;; $Rbox; $Lbox; $Rdia |] ==> 
    59    $L |- $R1, []P, $R2"
    60 end
    61 
    62 ML
    63 
    64 local
    65 
    66   val S43pi  = "S43pi";
    67   val SS43pi = "@S43pi";
    68 
    69   val tr  = Sequents.seq_tr;
    70   val tr' = Sequents.seq_tr';
    71 
    72   fun s43pi_tr[s1,s2,s3,s4,s5,s6]=
    73         Const(S43pi,dummyT)$tr s1$tr s2$tr s3$tr s4$tr s5$tr s6;
    74   fun s43pi_tr'[s1,s2,s3,s4,s5,s6] =
    75         Const(SS43pi,dummyT)$tr' s1$tr' s2$tr' s3$tr' s4$tr' s5$tr' s6;
    76 in
    77 val parse_translation = [(SS43pi,s43pi_tr)];
    78 val print_translation = [(S43pi,s43pi_tr')]
    79 end