src/HOL/ex/PropLog.thy
author berghofe
Fri, 02 Aug 1996 12:16:11 +0200
changeset 1898 260a9711f507
parent 1476 608483c2122a
permissions -rw-r--r--
Simplified primrec definitions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1376
diff changeset
     1
(*  Title:      HOL/ex/PropLog.thy
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1376
diff changeset
     3
    Author:     Tobias Nipkow
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1994  TU Muenchen
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     5
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     6
Inductive definition of propositional logic.
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     7
*)
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     8
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     9
PropLog = Finite +
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    10
datatype
977
5d57287e5e1e changed syntax of datatype declarations (curried types for constructor
clasohm
parents: 969
diff changeset
    11
    'a pl = false | var 'a ("#_" [1000]) | "->" ('a pl) ('a pl) (infixr 90)
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    12
consts
1376
92f83b9d17e1 removed quotes from consts and syntax sections
clasohm
parents: 977
diff changeset
    13
  thms :: 'a pl set => 'a pl set
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1376
diff changeset
    14
  "|-"  :: ['a pl set, 'a pl] => bool   (infixl 50)
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1376
diff changeset
    15
  "|="  :: ['a pl set, 'a pl] => bool   (infixl 50)
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1376
diff changeset
    16
  eval2 :: ['a pl, 'a set] => bool
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1376
diff changeset
    17
  eval  :: ['a set, 'a pl] => bool      ("_[_]" [100,0] 100)
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1376
diff changeset
    18
  hyps  :: ['a pl, 'a set] => 'a pl set
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    19
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    20
translations
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    21
  "H |- p" == "p : thms(H)"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    22
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    23
inductive "thms(H)"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    24
  intrs
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    25
  H   "p:H ==> H |- p"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    26
  K   "H |- p->q->p"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    27
  S   "H |- (p->q->r) -> (p->q) -> p->r"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    28
  DN  "H |- ((p->false) -> false) -> p"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    29
  MP  "[| H |- p->q; H |- p |] ==> H |- q"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    30
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    31
defs
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    32
  sat_def  "H |= p  ==  (!tt. (!q:H. tt[q]) --> tt[p])"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    33
  eval_def "tt[p] == eval2 p tt"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    34
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    35
primrec eval2 pl
1898
260a9711f507 Simplified primrec definitions.
berghofe
parents: 1476
diff changeset
    36
  "eval2(false) = (%x.False)"
260a9711f507 Simplified primrec definitions.
berghofe
parents: 1476
diff changeset
    37
  "eval2(#v) = (%tt.v:tt)"
260a9711f507 Simplified primrec definitions.
berghofe
parents: 1476
diff changeset
    38
  "eval2(p->q) = (%tt.eval2 p tt-->eval2 q tt)"
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    39
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    40
primrec hyps pl
1898
260a9711f507 Simplified primrec definitions.
berghofe
parents: 1476
diff changeset
    41
  "hyps(false) = (%tt.{})"
260a9711f507 Simplified primrec definitions.
berghofe
parents: 1476
diff changeset
    42
  "hyps(#v) = (%tt.{if v:tt then #v else #v->false})"
260a9711f507 Simplified primrec definitions.
berghofe
parents: 1476
diff changeset
    43
  "hyps(p->q) = (%tt.hyps p tt Un hyps q tt)"
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    44
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    45
end
1898
260a9711f507 Simplified primrec definitions.
berghofe
parents: 1476
diff changeset
    46