src/HOL/Prolog/Func.ML
author oheimb
Tue, 11 Jun 2002 16:43:17 +0200
changeset 13208 965f95a3abd9
parent 12486 0ed8bdd883e0
child 14981 e73f8140af78
permissions -rw-r--r--
added the usual file headers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13208
965f95a3abd9 added the usual file headers
oheimb
parents: 12486
diff changeset
     1
(* Title:    HOL/Prolog/Func.ML
965f95a3abd9 added the usual file headers
oheimb
parents: 12486
diff changeset
     2
    ID:       $Id$
965f95a3abd9 added the usual file headers
oheimb
parents: 12486
diff changeset
     3
    Author:   David von Oheimb (based on a lecture on Lambda Prolog by Nadathur)
965f95a3abd9 added the usual file headers
oheimb
parents: 12486
diff changeset
     4
    License:  GPL (GNU GENERAL PUBLIC LICENSE)
965f95a3abd9 added the usual file headers
oheimb
parents: 12486
diff changeset
     5
*)
965f95a3abd9 added the usual file headers
oheimb
parents: 12486
diff changeset
     6
9015
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
     7
open Func;
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
     8
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
     9
val prog_Func = prog_HOHH @ [eval];
12486
0ed8bdd883e0 isatool expandshort;
wenzelm
parents: 9015
diff changeset
    10
fun pgoal s = (case Goal s of _ => by (prolog_tac prog_Func));
9015
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    11
val p = ptac prog_Func 1;
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    12
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    13
pgoal "eval ((S (S Z)) + (S Z)) ?X";
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    14
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    15
pgoal "eval (app (fix (%fact. abs(%n. cond (n eq Z) (S Z) \
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    16
			\(n * (app fact (n - (S Z))))))) (S (S (S Z)))) ?X";
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    17
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    18