src/HOL/Prolog/Func.ML
author wenzelm
Wed, 07 Sep 2005 21:07:09 +0200
changeset 17311 5b1d47d920ce
parent 14981 e73f8140af78
permissions -rw-r--r--
converted to Isar theory format;
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
*)
965f95a3abd9 added the usual file headers
oheimb
parents: 12486
diff changeset
     5
9015
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
     6
val prog_Func = prog_HOHH @ [eval];
12486
0ed8bdd883e0 isatool expandshort;
wenzelm
parents: 9015
diff changeset
     7
fun pgoal s = (case Goal s of _ => by (prolog_tac prog_Func));
9015
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
     8
val p = ptac prog_Func 1;
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
     9
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    10
pgoal "eval ((S (S Z)) + (S Z)) ?X";
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    11
8006e9009621 added HOL/Prolog
oheimb
parents:
diff changeset
    12
pgoal "eval (app (fix (%fact. abs(%n. cond (n eq Z) (S Z) \
17311
5b1d47d920ce converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    13
                        \(n * (app fact (n - (S Z))))))) (S (S (S Z)))) ?X";