Copyright (C) 2026, Matt Kaufmann and Konrad Slind
Written by Matt Kaufmann and Konrad Slind
License: A 3-clause BSD license.  See the LICENSE file distributed with ACL2.

The following documentation applies to each example in this directory;
just globally replace <EX>: by ex1 for the example in files ex1*.l*sp,
and by eval_poly for the example in files eval_poly.* and
eval-poly-*.l*sp.

Here are the files.

- File <EX>.defhol is a generated file.  It shows the output of the
  translator for example <EX>.  Each defhol form in <EX>.defhol is
  preceded, as a comment, by the corresponding source HOL object.

- The book <EX>-thy.lisp imports that translator output into the
  integration of set-theory with ACL2 (sometimes called ACL2(zfc)).

- The book <EX>-thy-exports.lisp contains the events generated by the
  file <EX>-thy.lisp.  Specifically it shows, in the "ZF" package, the
  encapsulate event generated by the import-theory call in
  <EX>-thy.lisp.

- The book <EX>-proof.lisp proves the main result for example <EX>.

- The book <EX>-top.lisp contains the main result for example <EX>,
  without the supporting events from <EX>-proof.lisp.

You can also see the generated events by evaluating

  (include-book "<EX>-thy")

and then issuing the following command, perhaps while standing in the
"ZF" package (which however will elide some local events):

  :pe hol::<EX>$prop

As noted above, the call (zf::import-theory <EX>) in <EX>-thy.lisp
creates and evaluates ACL2 events based on the file <EX>.defhol.  That
file, in turn, was obtained from the following file in the HOL4
repository:

  examples/acl2/hol-to-acl2/examples/<EX>.defhol

Specifically, it was first obtained on 1/14/2026 from the following
URL.

https://raw.githubusercontent.com/HOL-Theorem-Prover/HOL/refs/heads/develop/examples/acl2/hol-to-acl2/examples/<EX>.defhol

The events in that file are defhol events, where defhol is defined in
../acl2/theories.lisp.

That file (<EX>.defhol) was generated by running the hol-to-acl2
translator on file <EX>Script.sml which, was first obtained on
1/14/2026 from the following URL.

https://raw.githubusercontent.com/HOL-Theorem-Prover/HOL/refs/heads/develop/examples/acl2/hol-to-acl2/examples/<EX>Script.sml

.....

Other notes:

The book eval-poly-acl2.lisp is an ACL2 formalization corresponding to
eval_polyScript.sml.  In the book eval-poly-proof.lisp is a proof of
the HOL4 goal theorem that uses that ACL2 formalization, to support
the result in the top-level book, eval-poly-top.lisp.

The book example-simple.lisp is an early demonstration of the defhol
macro.
