src/Sequents/Modal0.thy
author wenzelm
Mon, 07 Oct 2013 21:24:44 +0200
changeset 54313 da2e6282a4f5
parent 52143 36ffe23b25f8
child 60770 240563fbf41d
permissions -rw-r--r--
native executable even for Linux, to avoid surprises with file managers opening executable script as text file;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
     1
(*  Title:      Sequents/Modal0.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
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
     6
theory Modal0
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
     7
imports LK0
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
     8
begin
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
     9
48891
c0eafbd55de3 prefer ML_file over old uses;
wenzelm
parents: 35113
diff changeset
    10
ML_file "modal.ML"
c0eafbd55de3 prefer ML_file over old uses;
wenzelm
parents: 35113
diff changeset
    11
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    12
consts
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    13
  box           :: "o=>o"       ("[]_" [50] 50)
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    14
  dia           :: "o=>o"       ("<>_" [50] 50)
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    15
  strimp        :: "[o,o]=>o"   (infixr "--<" 25)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    16
  streqv        :: "[o,o]=>o"   (infixr ">-<" 25)
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    17
  Lstar         :: "two_seqi"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    18
  Rstar         :: "two_seqi"
14765
bafb24c150c1 proper use of 'syntax';
wenzelm
parents: 7098
diff changeset
    19
bafb24c150c1 proper use of 'syntax';
wenzelm
parents: 7098
diff changeset
    20
syntax
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    21
  "_Lstar"      :: "two_seqe"   ("(_)|L>(_)" [6,6] 5)
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    22
  "_Rstar"      :: "two_seqe"   ("(_)|R>(_)" [6,6] 5)
2073
fb0655539d05 New unified treatment of sequent calculi by Sara Kalvala
paulson
parents:
diff changeset
    23
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    24
ML {*
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    25
  fun star_tr c [s1, s2] = Const(c, dummyT) $ seq_tr s1 $ seq_tr s2;
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    26
  fun star_tr' c [s1, s2] = Const(c, dummyT) $ seq_tr' s1 $ seq_tr' s2;
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    27
*}
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    28
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    29
parse_translation {*
52143
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 48891
diff changeset
    30
 [(@{syntax_const "_Lstar"}, K (star_tr @{const_syntax Lstar})),
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 48891
diff changeset
    31
  (@{syntax_const "_Rstar"}, K (star_tr @{const_syntax Rstar}))]
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    32
*}
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    33
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    34
print_translation {*
52143
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 48891
diff changeset
    35
 [(@{const_syntax Lstar}, K (star_tr' @{syntax_const "_Lstar"})),
36ffe23b25f8 syntax translations always depend on context;
wenzelm
parents: 48891
diff changeset
    36
  (@{const_syntax Rstar}, K (star_tr' @{syntax_const "_Rstar"}))]
35113
1a0c129bb2e0 modernized translations;
wenzelm
parents: 21426
diff changeset
    37
*}
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    38
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    39
defs
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    40
  strimp_def:    "P --< Q == [](P --> Q)"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    41
  streqv_def:    "P >-< Q == (P --< Q) & (Q --< P)"
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    42
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    43
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    44
lemmas rewrite_rls = strimp_def streqv_def
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    45
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    46
lemma iffR:
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    47
    "[| $H,P |- $E,Q,$F;  $H,Q |- $E,P,$F |] ==> $H |- $E, P <-> Q, $F"
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    48
  apply (unfold iff_def)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    49
  apply (assumption | rule conjR impR)+
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    50
  done
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    51
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    52
lemma iffL:
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    53
    "[| $H,$G |- $E,P,Q;  $H,Q,P,$G |- $E |] ==> $H, P <-> Q, $G |- $E"
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    54
  apply (unfold iff_def)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    55
  apply (assumption | rule conjL impL basic)+
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    56
  done
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    57
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    58
lemmas safe_rls = basic conjL conjR disjL disjR impL impR notL notR iffL iffR
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    59
  and unsafe_rls = allR exL
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents: 17481
diff changeset
    60
  and bound_rls = allL exR
17481
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    61
75166ebb619b converted to Isar theory format;
wenzelm
parents: 14765
diff changeset
    62
end