src/FOL/ex/Prolog.thy
author wenzelm
Sat, 01 Jul 2000 19:55:22 +0200
changeset 9230 17ae63f82ad8
parent 1473 e8d4606e6502
child 17245 1c519a3cca59
permissions -rw-r--r--
GPLed;

(*  Title:      FOL/ex/prolog.thy
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1992  University of Cambridge

First-Order Logic: PROLOG examples

Inherits from FOL the class term, the type o, and the coercion Trueprop
*)

Prolog = FOL +
types   'a list
arities list    :: (term)term
consts  Nil     :: 'a list
        ":"     :: ['a, 'a list]=> 'a list              (infixr 60)
        app     :: ['a list, 'a list, 'a list] => o  
        rev     :: ['a list, 'a list] => o  
rules   appNil  "app(Nil,ys,ys)"
        appCons "app(xs,ys,zs) ==> app(x:xs, ys, x:zs)"
        revNil  "rev(Nil,Nil)"
        revCons "[| rev(xs,ys);  app(ys, x:Nil, zs) |] ==> rev(x:xs, zs)"
end