src/FOLP/ex/Prolog.thy
author clasohm
Thu, 16 Sep 1993 12:20:38 +0200
changeset 0 a5a9c433f639
child 353 b5030aaca2ab
permissions -rw-r--r--
Initial revision
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title: 	FOL/ex/prolog.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1992  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
First-Order Logic: PROLOG examples
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
Inherits from FOL the class term, the type o, and the coercion Trueprop
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
Prolog = FOL +
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
types   list 1
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
arities list    :: (term)term
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
consts  Nil     :: "'a list"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
        ":"     :: "['a, 'a list]=> 'a list"            (infixr 60)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
        app     :: "['a list, 'a list, 'a list] => o"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
        rev     :: "['a list, 'a list] => o"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
rules   appNil  "app(Nil,ys,ys)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
        appCons "app(xs,ys,zs) ==> app(x:xs, ys, x:zs)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
        revNil  "rev(Nil,Nil)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
        revCons "[| rev(xs,ys);  app(ys, x:Nil, zs) |] ==> rev(x:xs, zs)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
end