src/FOLP/ex/Prolog.thy
author paulson
Fri, 05 Oct 2007 09:59:03 +0200
changeset 24854 0ebcd575d3c6
parent 1477 4c51ab632cda
child 35762 af3ff2ba4c54
permissions -rw-r--r--
filtering out some package theorems
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1477
4c51ab632cda expanded tabs
clasohm
parents: 1466
diff changeset
     1
(*  Title:      FOLP/ex/Prolog.thy
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1477
4c51ab632cda expanded tabs
clasohm
parents: 1466
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
0
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 +
353
b5030aaca2ab removal of obsolete type-declaration syntax
lcp
parents: 0
diff changeset
    12
types   'a list
0
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