src/Modal/ROOT.ML
author clasohm
Fri, 22 Oct 1993 13:39:23 +0100
changeset 73 075db6ac7f2f
parent 72 099d949fe467
child 121 d392174734e9
permissions -rw-r--r--
delete_file now has type string -> unit in both NJ and POLY, use of Pure/Thy/ROOT has been moved to the end of Pure/ROOT again
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title: 	91/Modal/ROOT
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Author: 	Martin Coen
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1991  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
val banner = "Modal Logic (over LK)";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
writeln banner;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
72
099d949fe467 changes for new Readthy
clasohm
parents: 0
diff changeset
    10
set_loadpath [".", "../LK"];
099d949fe467 changes for new Readthy
clasohm
parents: 0
diff changeset
    11
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
use_thy "modal0";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
structure Modal0_rls = 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
struct
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
val rewrite_rls = [Modal0.strimp_def,Modal0.streqv_def];
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
local
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
  val iffR = prove_goal thy 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
      "[| $H,P |- $E,Q,$F;  $H,Q |- $E,P,$F |] ==> $H |- $E, P <-> Q, $F"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
   (fn prems=>
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
    [ (rewrite_goals_tac [iff_def]),
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
      (REPEAT (resolve_tac (prems@[conjR,impR]) 1)) ]);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
  val iffL = prove_goal thy 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
     "[| $H,$G |- $E,P,Q;  $H,Q,P,$G |- $E |] ==> $H, P <-> Q, $G |- $E"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
   (fn prems=>
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
    [ rewrite_goals_tac [iff_def],
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
      (REPEAT (resolve_tac (prems@[conjL,impL,basic]) 1)) ])
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
in
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
val safe_rls   = [basic,conjL,conjR,disjL,disjR,impL,impR,notL,notR,iffL,iffR];
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
val unsafe_rls = [allR,exL];
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
val bound_rls  = [allL,exR];
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
end
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    38
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
use "prover.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
use_thy"T";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
local open Modal0_rls T
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
in structure MP_Rule : MODAL_PROVER_RULE =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
   struct
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
    val rewrite_rls = rewrite_rls
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    47
    val safe_rls    = safe_rls
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
    val unsafe_rls  = unsafe_rls @ [boxR,diaL]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    49
    val bound_rls   = bound_rls @ [boxL,diaR]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    50
    val aside_rls   = [lstar0,lstar1,lstar2,rstar0,rstar1,rstar2]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
   end
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    53
structure T_Prover = Modal_ProverFun(MP_Rule);  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
use_thy"S4";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    56
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
local open Modal0_rls S4
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    58
in structure MP_Rule : MODAL_PROVER_RULE =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    59
   struct
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    60
    val rewrite_rls = rewrite_rls
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
    val safe_rls    = safe_rls
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
    val unsafe_rls  = unsafe_rls @ [boxR,diaL]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    63
    val bound_rls   = bound_rls @ [boxL,diaR]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    64
    val aside_rls   = [lstar0,lstar1,lstar2,rstar0,rstar1,rstar2]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    65
   end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    66
end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    67
structure S4_Prover = Modal_ProverFun(MP_Rule);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    68
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    69
use_thy"S43";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    70
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    71
local open Modal0_rls S43
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    72
in structure MP_Rule : MODAL_PROVER_RULE =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    73
   struct
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    74
    val rewrite_rls = rewrite_rls
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    75
    val safe_rls    = safe_rls
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    76
    val unsafe_rls  = unsafe_rls @ [pi1,pi2]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    77
    val bound_rls   = bound_rls @ [boxL,diaR]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    78
    val aside_rls   = [lstar0,lstar1,lstar2,rstar0,rstar1,rstar2,S43pi0,S43pi1,S43pi2]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    79
   end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    80
end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    81
structure S43_Prover = Modal_ProverFun(MP_Rule);  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    82
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    83
val Modal_build_completed = ();	(*indicate successful build*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    84
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    85
(*printing functions are inherited from LK*)