Theory ILL (Isabelle2005: October 2005)

# Theory ILL

Up to index of Isabelle/Sequents

theory ILL
imports Sequents
uses [ILL.ML]
begin

    (*  Title:      Sequents/ILL.thy
        ID:         $Id: ILL.thy,v 1.3 2005/09/18 13:20:08 wenzelm Exp $
        Author:     Sara Kalvala and Valeria de Paiva
        Copyright   1995  University of Cambridge
    *)

    theory ILL
    imports Sequents
    begin

    consts
      Trueprop       :: "two_seqi"

    "><"    ::"[o, o] => o"        (infixr 35)
    "-o"    ::"[o, o] => o"        (infixr 45)
    "o-o"   ::"[o, o] => o"        (infixr 45)
    FShriek ::"o => o"             ("! _" [100] 1000)
    "&&"    ::"[o, o] => o"        (infixr 35)
    "++"    ::"[o, o] => o"        (infixr 35)
    zero    ::"o"                  ("0")
    top     ::"o"                  ("1")
    eye     ::"o"                  ("I")
    aneg    ::"o=>o"               ("~_")

      (* context manipulation *)

     Context      :: "two_seqi"

      (* promotion rule *)

      PromAux :: "three_seqi"

    syntax
      "@Trueprop" :: "single_seqe" ("((_)/ |- (_))" [6,6] 5)
      "@Context"  :: "two_seqe"   ("((_)/ :=: (_))" [6,6] 5)
      "@PromAux"  :: "three_seqe" ("promaux {_||_||_}")

    parse_translation {*
      [("@Trueprop", single_tr "Trueprop"),
       ("@Context", two_seq_tr "Context"),
       ("@PromAux", three_seq_tr "PromAux")] *}

    print_translation {*
      [("Trueprop", single_tr' "@Trueprop"),
       ("Context", two_seq_tr'"@Context"),
       ("PromAux", three_seq_tr'"@PromAux")] *}

    defs

    liff_def:        "P o-o Q == (P -o Q) >< (Q -o P)"

    aneg_def:        "~A == A -o 0"

    axioms

    identity:        "P |- P"

    zerol:           "$G, 0, $H |- A"

      (* RULES THAT DO NOT DIVIDE CONTEXT *)

    derelict:   "$F, A, $G |- C ==> $F, !A, $G |- C"
      (* unfortunately, this one removes !A  *)

    contract:  "$F, !A, !A, $G |- C ==> $F, !A, $G |- C"

    weaken:     "$F, $G |- C ==> $G, !A, $F |- C"
      (* weak form of weakening, in practice just to clean context *)
      (* weaken and contract not needed (CHECK)  *)

    promote2:        "promaux{ || $H || B} ==> $H |- !B"
    promote1:        "promaux{!A, $G || $H || B}
                      ==> promaux {$G || $H, !A || B}"
    promote0:        "$G |- A ==> promaux {$G || || A}"

    tensl:     "$H, A, B, $G |- C ==> $H, A >< B, $G |- C"

    impr:      "A, $F |- B ==> $F |- A -o B"

    conjr:           "[| $F |- A ;
                     $F |- B |]
                    ==> $F |- (A && B)"

    conjll:          "$G, A, $H |- C ==> $G, A && B, $H |- C"

    conjlr:          "$G, B, $H |- C ==> $G, A && B, $H |- C"

    disjrl:          "$G |- A ==> $G |- A ++ B"
    disjrr:          "$G |- B ==> $G |- A ++ B"
    disjl:           "[| $G, A, $H |- C ;
                         $G, B, $H |- C |]
                     ==> $G, A ++ B, $H |- C"

          (* RULES THAT DIVIDE CONTEXT *)

    tensr:           "[| $F, $J :=: $G;
                         $F |- A ;
                         $J |- B     |]
                         ==> $G |- A >< B"

    impl:            "[| $G, $F :=: $J, $H ;
                         B, $F |- C ;
                            $G |- A |]
                         ==> $J, A -o B, $H |- C"

    cut: " [| $J1, $H1, $J2, $H3, $J3, $H2, $J4, $H4 :=: $F ;
              $H1, $H2, $H3, $H4 |- A ;
              $J1, $J2, A, $J3, $J4 |- B |]  ==> $F |- B"

      (* CONTEXT RULES *)

    context1:     "$G :=: $G"
    context2:     "$F, $G :=: $H, !A, $G ==> $F, A, $G :=: $H, !A, $G"
    context3:     "$F, $G :=: $H, $J ==> $F, A, $G :=: $H, A, $J"
    context4a:    "$F :=: $H, $G ==> $F :=: $H, !A, $G"
    context4b:    "$F, $H :=: $G ==> $F, !A, $H :=: $G"
    context5:     "$F, $G :=: $H ==> $G, $F :=: $H"

    ML {* use_legacy_bindings (the_context ()) *}

    end

theorem aux_impl:

      $F, $G |- A ==> $F, ! (A -o B), $G |- B

theorem conj_lemma:

      $F, ! A, ! B, $G |- C ==> $F, ! (A && B), $G |- C

theorem impr_contract:

      ! A, ! A, $G |- B ==> $G |- ! A -o B

theorem impr_contr_der:

      A, ! A, $G |- B ==> $G |- ! A -o B

theorem contrad1:

      $F, ! B -o 0, $G, ! B, $H |- A

theorem contrad2:

      $F, ! B, $G, ! B -o 0, $H |- A

theorem ll_mp:

      A -o B, A |- B

theorem mp_rule1:

      $F, B, $G, $H |- C ==> $F, A, $G, A -o B, $H |- C

theorem mp_rule2:

      $F, B, $G, $H |- C ==> $F, A -o B, $G, A, $H |- C

theorem or_to_and:

      ! (! (A ++ B) -o 0) |- ! (! A -o 0 && ! B -o 0)

theorem o_a_rule:

      $F, ! (! A -o 0 && ! B -o 0), $G |- C ==> $F, ! (! (A ++ B) -o 0), $G |- C

theorem conj_imp:

      ! A -o C ++ ! B -o C |- ! (A && B) -o C

theorem a_not_a:

      ! A -o ! A -o 0 |- ! A -o 0

theorem a_not_a_rule:

      $J1.0, ! A -o 0, $J2.0 |- B ==> $J1.0, ! A -o ! A -o 0, $J2.0 |- B