ex/PropLog.thy
author clasohm
Tue, 24 Oct 1995 14:59:17 +0100
changeset 251 f04b33ce250f
parent 135 a06a2d930a03
permissions -rw-r--r--
added calls of init_html and make_chart
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
135
a06a2d930a03 HOL/ex/PropLog.thy: tidied
lcp
parents: 130
diff changeset
     1
(*  Title: 	HOL/ex/PropLog.thy
130
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
     2
    ID:         $Id$
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
     3
    Author: 	Tobias Nipkow
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
     4
    Copyright   1994  TU Muenchen
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
     5
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
     6
Inductive definition of propositional logic.
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
     7
*)
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
     8
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
     9
PropLog = Finite +
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    10
datatype
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    11
    'a pl = false | var ('a) ("#_" [1000]) | "->" ('a pl,'a pl) (infixr 90)
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    12
consts
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    13
  thms :: "'a pl set => 'a pl set"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    14
  "|-" 	:: "['a pl set, 'a pl] => bool"	(infixl 50)
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    15
  "|="	:: "['a pl set, 'a pl] => bool"	(infixl 50)
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    16
  eval2	:: "['a pl, 'a set] => bool"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    17
  eval	:: "['a set, 'a pl] => bool"	("_[_]" [100,0] 100)
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    18
  hyps	:: "['a pl, 'a set] => 'a pl set"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    19
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    20
translations
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    21
  "H |- p" == "p : thms(H)"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    22
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    23
inductive "thms(H)"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    24
  intrs
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    25
  H   "p:H ==> H |- p"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    26
  K   "H |- p->q->p"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    27
  S   "H |- (p->q->r) -> (p->q) -> p->r"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    28
  DN  "H |- ((p->false) -> false) -> p"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    29
  MP  "[| H |- p->q; H |- p |] ==> H |- q"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    30
135
a06a2d930a03 HOL/ex/PropLog.thy: tidied
lcp
parents: 130
diff changeset
    31
defs
a06a2d930a03 HOL/ex/PropLog.thy: tidied
lcp
parents: 130
diff changeset
    32
  sat_def  "H |= p  ==  (!tt. (!q:H. tt[q]) --> tt[p])"
130
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    33
  eval_def "tt[p] == eval2(p,tt)"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    34
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    35
primrec eval2 pl
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    36
  eval2_false "eval2(false) = (%x.False)"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    37
  eval2_var   "eval2(#v) = (%tt.v:tt)"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    38
  eval2_imp   "eval2(p->q) = (%tt.eval2(p,tt)-->eval2(q,tt))"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    39
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    40
primrec hyps pl
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    41
  hyps_false "hyps(false) = (%tt.{})"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    42
  hyps_var   "hyps(#v) = (%tt.{if(v:tt, #v, #v->false)})"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    43
  hyps_imp   "hyps(p->q) = (%tt.hyps(p,tt) Un hyps(q,tt))"
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    44
e7dcf3c07865 Updated PL to PropLog using Larrys ind. defs.
nipkow
parents:
diff changeset
    45
end