src/HOL/ex/PropLog.thy
author lcp
Tue, 25 Apr 1995 11:14:03 +0200
changeset 1072 0140ff702b23
parent 977 5d57287e5e1e
child 1376 92f83b9d17e1
permissions -rw-r--r--
updated version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     1
(*  Title: 	HOL/ex/PropLog.thy
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     3
    Author: 	Tobias Nipkow
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
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    13
  thms :: "'a pl set => 'a pl set"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    14
  "|-" 	:: "['a pl set, 'a pl] => bool"	(infixl 50)
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    15
  "|="	:: "['a pl set, 'a pl] => bool"	(infixl 50)
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    16
  eval2	:: "['a pl, 'a set] => bool"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    17
  eval	:: "['a set, 'a pl] => bool"	("_[_]" [100,0] 100)
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    18
  hyps	:: "['a pl, 'a set] => 'a pl set"
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
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    36
  eval2_false "eval2(false) = (%x.False)"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    37
  eval2_var   "eval2(#v) = (%tt.v:tt)"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    38
  eval2_imp   "eval2(p->q) = (%tt.eval2 p tt-->eval2 q tt)"
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
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    41
  hyps_false "hyps(false) = (%tt.{})"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    42
  hyps_var   "hyps(#v) = (%tt.{if v:tt then #v else #v->false})"
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    43
  hyps_imp   "hyps(p->q) = (%tt.hyps p tt Un hyps q tt)"
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