emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/proof-general 1b1083e 13/13: Merge pull request #627 from


From: ELPA Syncer
Subject: [nongnu] elpa/proof-general 1b1083e 13/13: Merge pull request #627 from ProofGeneral/scratch-GPLv3
Date: Thu, 25 Nov 2021 10:58:00 -0500 (EST)

branch: elpa/proof-general
commit 1b1083e86e0cddc20ff2f1a6b25c7a7eee2edf02
Merge: 20412f1 6c9c995
Author: Erik Martin-Dorel <erik@martin-dorel.org>
Commit: GitHub <noreply@github.com>

    Merge pull request #627 from ProofGeneral/scratch-GPLv3
    
    Change license to GPLv3+
---
 AUTHORS                                            |   30 +
 BUGS                                               |   22 +-
 CHANGES                                            |    3 +
 COPYING                                            |  912 ++++---
 INSTALL                                            |    6 +-
 Makefile                                           |   48 +-
 Makefile.devel                                     |    2 +-
 README.md                                          |   19 +-
 acl2/README                                        |   22 -
 acl2/acl2.el                                       |  106 -
 acl2/example.acl2                                  |    9 -
 acl2/root2.acl2                                    |  348 ---
 ccc/README                                         |   14 -
 ccc/ccc.el                                         |   85 -
 ci/compile-tests/001-mini-project/Makefile         |    2 +-
 ci/compile-tests/001-mini-project/a.v              |    2 +-
 ci/compile-tests/001-mini-project/b.v              |    2 +-
 ci/compile-tests/001-mini-project/c.v              |    2 +-
 ci/compile-tests/001-mini-project/d.v              |    2 +-
 ci/compile-tests/001-mini-project/e.v              |    2 +-
 ci/compile-tests/001-mini-project/f.v              |    2 +-
 ci/compile-tests/001-mini-project/runtest.el       |    2 +-
 .../002-require-no-dependencies/Makefile           |    2 +-
 ci/compile-tests/002-require-no-dependencies/a.v   |    2 +-
 ci/compile-tests/002-require-no-dependencies/b.v   |    2 +-
 ci/compile-tests/002-require-no-dependencies/c.v   |    2 +-
 .../002-require-no-dependencies/runtest.el         |    2 +-
 ci/compile-tests/003-require-error/Makefile        |    2 +-
 ci/compile-tests/003-require-error/a.v             |    2 +-
 ci/compile-tests/003-require-error/b.v             |    2 +-
 ci/compile-tests/003-require-error/c.v             |    2 +-
 ci/compile-tests/003-require-error/runtest.el      |    2 +-
 ci/compile-tests/004-dependency-cycle/Makefile     |    2 +-
 ci/compile-tests/004-dependency-cycle/a.v          |    2 +-
 ci/compile-tests/004-dependency-cycle/b.v          |    2 +-
 ci/compile-tests/004-dependency-cycle/c.v          |    2 +-
 ci/compile-tests/004-dependency-cycle/d.v          |    2 +-
 ci/compile-tests/004-dependency-cycle/e.v          |    2 +-
 ci/compile-tests/004-dependency-cycle/f.v          |    2 +-
 ci/compile-tests/004-dependency-cycle/runtest.el   |    2 +-
 ci/compile-tests/005-change-recompile/Makefile     |    2 +-
 ci/compile-tests/005-change-recompile/a.v.orig     |    2 +-
 ci/compile-tests/005-change-recompile/b.v.orig     |    2 +-
 ci/compile-tests/005-change-recompile/c.v.orig     |    2 +-
 ci/compile-tests/005-change-recompile/d.v.orig     |    2 +-
 ci/compile-tests/005-change-recompile/e.v.orig     |    2 +-
 ci/compile-tests/005-change-recompile/f.v.orig     |    2 +-
 ci/compile-tests/005-change-recompile/g.v.orig     |    2 +-
 ci/compile-tests/005-change-recompile/h.v.orig     |    2 +-
 ci/compile-tests/005-change-recompile/runtest.el   |    2 +-
 ci/compile-tests/006-ready-dependee/Makefile       |    2 +-
 ci/compile-tests/006-ready-dependee/a.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/b.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/c.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/d.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/e.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/f.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/g.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/h.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/i.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/j.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/k.v.orig       |    2 +-
 ci/compile-tests/006-ready-dependee/runtest.el     |    2 +-
 ci/compile-tests/007-slow-require/Makefile         |    2 +-
 ci/compile-tests/007-slow-require/a1.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/a2.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/a3.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/a4.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/a5.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/a6.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/b1.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/b2.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/b3.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/b4.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/b5.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/b6.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/c1.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/c2.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/c3.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/c4.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/c5.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/c6.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/d1.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/d2.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/d3.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/d4.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/d5.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/d6.v.orig        |    2 +-
 ci/compile-tests/007-slow-require/runtest.el       |    2 +-
 ci/compile-tests/008-default-dir/Makefile          |    2 +-
 ci/compile-tests/008-default-dir/a.v.orig          |    2 +-
 ci/compile-tests/008-default-dir/b.v.orig          |    2 +-
 ci/compile-tests/008-default-dir/c.v.orig          |    2 +-
 ci/compile-tests/008-default-dir/runtest.el        |    2 +-
 ci/compile-tests/009-failure-processing/Makefile   |    2 +-
 ci/compile-tests/009-failure-processing/a1.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/a10.v.orig |    2 +-
 ci/compile-tests/009-failure-processing/a2.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/a3.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/a4.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/a5.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/a6.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/a7.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/a8.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/a9.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b1.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b10.v.orig |    2 +-
 ci/compile-tests/009-failure-processing/b2.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b3.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b4.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b5.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b6.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b7.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b8.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/b9.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c1.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c10.v.orig |    2 +-
 ci/compile-tests/009-failure-processing/c2.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c3.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c4.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c5.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c6.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c7.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c8.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/c9.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d1.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d10.v.orig |    2 +-
 ci/compile-tests/009-failure-processing/d2.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d3.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d4.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d5.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d6.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d7.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d8.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/d9.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e1.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e10.v.orig |    2 +-
 ci/compile-tests/009-failure-processing/e2.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e3.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e4.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e5.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e6.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e7.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e8.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/e9.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f1.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f10.v.orig |    2 +-
 ci/compile-tests/009-failure-processing/f2.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f3.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f4.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f5.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f6.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f7.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f8.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/f9.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g1.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g10.v.orig |    2 +-
 ci/compile-tests/009-failure-processing/g2.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g3.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g4.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g5.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g6.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g7.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g8.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/g9.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h1.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h10.v.orig |    2 +-
 ci/compile-tests/009-failure-processing/h2.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h3.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h4.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h5.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h6.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h7.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h8.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/h9.v.orig  |    2 +-
 ci/compile-tests/009-failure-processing/runtest.el |    2 +-
 ci/compile-tests/Makefile                          |    2 +-
 ci/compile-tests/bin/compile-test-start-delayed    |    2 +-
 ci/compile-tests/cct-lib.el                        |    2 +-
 ci/simple-tests/Makefile                           |    2 +-
 .../test-coq-par-job-needs-compilation-quick.el    |    2 +-
 ci/simple-tests/test-coqtop-unavailable.el         |    2 +-
 ci/simple-tests/test-omit-proofs.el                |    2 +-
 ci/simple-tests/test-prelude-correct.el            |    2 +-
 ci/test-indent/Makefile                            |    2 +-
 coq/coq-abbrev.el                                  |    2 +-
 coq/coq-compile-common.el                          |    2 +-
 coq/coq-db.el                                      |    2 +-
 coq/coq-diffs.el                                   |    2 +-
 coq/coq-mode.el                                    |    2 +-
 coq/coq-par-compile.el                             |    2 +-
 coq/coq-seq-compile.el                             |    2 +-
 coq/coq-smie.el                                    |    2 +-
 coq/coq-syntax.el                                  |    2 +-
 coq/coq-system.el                                  |    2 +-
 coq/coq.el                                         |    2 +-
 doc/PG-adapting.texi                               |   26 +-
 doc/ProofGeneral.texi                              |  527 +---
 doc/proofgeneral.1                                 |    4 +-
 etc/ProofGeneral.spec                              |    4 +-
 etc/README                                         |    3 -
 etc/hol-light/example4.ml                          |   13 -
 etc/isar/AHundredProofs.thy                        | 1009 --------
 etc/isar/AHundredTheorems.thy                      |  117 -
 etc/isar/AThousandComments.thy                     | 1005 --------
 etc/isar/AThousandTheorems.thy                     | 1013 --------
 etc/isar/BackslashInStrings.thy                    |   47 -
 etc/isar/BigErrors.thy                             |   20 -
 etc/isar/BigErrorsNested.thy                       |    6 -
 etc/isar/ChosenLogic.thy                           |    8 -
 etc/isar/ChosenLogic2.thy                          |    8 -
 etc/isar/CommentParsingBug.thy                     |    3 -
 etc/isar/CommentParsingBug2.thy                    |    8 -
 etc/isar/Depends.thy                               |   14 -
 etc/isar/EmptyCommands.thy                         |   10 -
 etc/isar/FaultyErrors.thy                          |   28 -
 etc/isar/Fibonacci.thy                             |  168 --
 etc/isar/HighlightSize.thy                         |   13 -
 etc/isar/IllegalEscape.thy                         |    7 -
 etc/isar/InterruptTest.thy.gz                      |  Bin 3914 -> 0 bytes
 etc/isar/MultipleModes.thy                         |   27 -
 etc/isar/NamesInStrings.thy                        |   34 -
 etc/isar/Parsing.thy                               |   75 -
 etc/isar/ParsingBug1.thy                           |   15 -
 etc/isar/Persistent.thy                            |   40 -
 etc/isar/README                                    |    8 -
 etc/isar/Sendback.thy                              |   23 -
 etc/isar/TextProps.thy                             |   22 -
 etc/isar/TokensAcid.thy                            |  218 --
 etc/isar/Trac189.thy                               |    8 -
 etc/isar/Trac280-subrev.thy                        |   14 -
 etc/isar/Unicode.thy                               |   73 -
 etc/isar/XEmacsSyntacticContextProb.thy            |   20 -
 etc/isar/XSymbolTests.thy                          |  146 --
 etc/isar/bad1.thy                                  |    3 -
 etc/isar/bad2.thy                                  |    1 -
 etc/isar/multiple/A.thy                            |    7 -
 etc/isar/multiple/B.thy                            |    4 -
 etc/isar/multiple/C.thy                            |    4 -
 etc/isar/multiple/D.thy                            |    4 -
 etc/isar/multiple/E.thy                            |    4 -
 etc/isar/multiple/README                           |    3 -
 etc/isar/nesting-too-deep-for-parser.txt           | 1622 ------------
 etc/isar/new-parsing-test.el                       |   38 -
 etc/isar/profiling.txt                             |  322 ---
 etc/isar/trace_simp.thy                            |   20 -
 etc/lego/GoalGoal.l                                |   13 -
 etc/lego/error-eg.l                                |   16 -
 etc/lego/lego-site.el                              |   37 -
 etc/lego/long-line-backslash.l                     |   22 -
 etc/lego/multiple/A.l                              |    1 -
 etc/lego/multiple/B.l                              |    4 -
 etc/lego/multiple/C.l                              |    1 -
 etc/lego/multiple/D.l                              |    1 -
 etc/lego/multiple/README                           |   33 -
 etc/lego/pbp.l                                     |   30 -
 etc/lego/unsaved-goals.l                           |   54 -
 generic/pg-assoc.el                                |    2 +-
 generic/pg-autotest.el                             |    2 +-
 generic/pg-custom.el                               |   12 +-
 generic/pg-goals.el                                |    2 +-
 generic/pg-movie.el                                |    2 +-
 generic/pg-pbrpm.el                                |    2 +-
 generic/pg-pgip.el                                 |    2 +-
 generic/pg-response.el                             |    6 +-
 generic/pg-user.el                                 |    2 +-
 generic/pg-vars.el                                 |    2 +-
 generic/pg-xml.el                                  |    2 +-
 generic/proof-auxmodes.el                          |    2 +-
 generic/proof-config.el                            |   37 +-
 generic/proof-depends.el                           |    4 +-
 generic/proof-easy-config.el                       |    2 +-
 generic/proof-faces.el                             |    2 +-
 generic/proof-indent.el                            |    2 +-
 generic/proof-maths-menu.el                        |    2 +-
 generic/proof-menu.el                              |    2 +-
 generic/proof-script.el                            |   13 +-
 generic/proof-shell.el                             |    8 +-
 generic/proof-site.el                              |   17 +-
 generic/proof-splash.el                            |    2 +-
 generic/proof-syntax.el                            |    2 +-
 generic/proof-toolbar.el                           |    2 +-
 generic/proof-tree.el                              |    2 +-
 generic/proof-unicode-tokens.el                    |    2 +-
 generic/proof-useropts.el                          |    8 +-
 generic/proof-utils.el                             |    2 +-
 generic/proof.el                                   |    2 +-
 hol-light/LICENSE-HOL-LIGHT                        |   29 -
 hol-light/README                                   |   45 -
 hol-light/TODO                                     |   17 -
 hol-light/TacticRecording/INSTRUCTIONS             |   36 -
 hol-light/TacticRecording/LIMITATIONS              |   18 -
 hol-light/TacticRecording/biolayout.ml             |   30 -
 hol-light/TacticRecording/dltree.ml                |  268 --
 hol-light/TacticRecording/dltree.mli               |   22 -
 hol-light/TacticRecording/ex.dot                   |   24 -
 hol-light/TacticRecording/ex2.dot                  |   13 -
 hol-light/TacticRecording/ex3.dot                  |   24 -
 hol-light/TacticRecording/ex3.png                  |  Bin 39644 -> 0 bytes
 hol-light/TacticRecording/ex3b.dot                 |   37 -
 hol-light/TacticRecording/examples1.ml             |   64 -
 hol-light/TacticRecording/examples1_output.txt     |   72 -
 hol-light/TacticRecording/examples2.ml             |   45 -
 hol-light/TacticRecording/examples3.ml             |  236 --
 hol-light/TacticRecording/examples3_LEMMA1.dot     |   24 -
 hol-light/TacticRecording/examples3_output.txt     |   36 -
 hol-light/TacticRecording/examples4.ml             |   13 -
 hol-light/TacticRecording/examples5.ml             |  182 --
 hol-light/TacticRecording/gvexport.ml              |   47 -
 hol-light/TacticRecording/hiproofs.ml              |  417 ---
 hol-light/TacticRecording/lib.ml                   |   91 -
 hol-light/TacticRecording/main.ml                  |   31 -
 hol-light/TacticRecording/mldata.ml                |   33 -
 hol-light/TacticRecording/mlexport.ml              |  186 --
 hol-light/TacticRecording/printutils.ml            |   61 -
 hol-light/TacticRecording/promote.ml               |  327 ---
 hol-light/TacticRecording/prooftree.ml             |  177 --
 hol-light/TacticRecording/tacticrec.ml             |  383 ---
 hol-light/TacticRecording/wrappers.ml              |  359 ---
 hol-light/TacticRecording/xtactics.ml              |  451 ----
 hol-light/TacticRecording/xthm.ml                  |   40 -
 hol-light/example.ml                               |   19 -
 hol-light/hol-light-autotest.el                    |   42 -
 hol-light/hol-light-unicode-tokens.el              |  252 --
 hol-light/hol-light.el                             |  519 ----
 hol-light/pg_prompt.ml                             |   59 -
 hol-light/pg_tactics.ml                            |  349 ---
 hol-light/temp-prooftree-configure.patch           |   25 -
 hol98/README                                       |   53 -
 hol98/example.sml                                  |   30 -
 hol98/hol98.el                                     |  170 --
 hol98/root2.sml                                    |   83 -
 isar/Example-Tokens.thy                            |   37 -
 isar/Example.thy                                   |   33 -
 isar/README                                        |   33 -
 isar/ex/Knaster_Tarski.thy                         |  110 -
 isar/ex/PER.thy                                    |  269 --
 isar/ex/README                                     |    8 -
 isar/ex/Sqrt.thy                                   |   90 -
 isar/ex/Sqrt_Script.thy                            |   70 -
 isar/ex/Tarski.thy                                 |  927 -------
 isar/interface                                     |  205 --
 isar/interface-setup.el                            |   40 -
 isar/isabelle-system.el                            |  375 ---
 isar/isar-autotest.el                              |  117 -
 isar/isar-find-theorems.el                         |  489 ----
 isar/isar-keywords.el                              |  655 -----
 isar/isar-profiling.el                             |   58 -
 isar/isar-syntax.el                                |  612 -----
 isar/isar-unicode-tokens.el                        |  691 -----
 isar/isar.el                                       |  645 -----
 isar/isartags                                      |   86 -
 lego/BUGS                                          |   53 -
 lego/README                                        |   37 -
 lego/example.l                                     |   15 -
 lego/example2.l                                    |    1 -
 lego/lego-syntax.el                                |  131 -
 lego/lego.el                                       |  439 ----
 lego/legotags                                      |   91 -
 lego/root2.l                                       |  368 ---
 lib/bufhist.el                                     |    4 +-
 lib/holes.el                                       |    6 +-
 lib/local-vars-list.el                             |   16 +-
 lib/maths-menu.el                                  |    2 +-
 lib/pg-dev.el                                      |   10 +-
 lib/pg-fontsets.el                                 |    2 +-
 lib/proof-compat.el                                |    2 +-
 lib/scomint.el                                     |    2 +-
 lib/span.el                                        |    2 +-
 lib/texi-docstring-magic.el                        |    4 +-
 lib/unicode-tokens.el                              |    4 +-
 obsolete/demoisa/demoisa.el                        |    2 +-
 obsolete/lclam/README                              |   15 -
 obsolete/lclam/example.lcm                         |   34 -
 obsolete/lclam/lclam.el                            |  209 --
 obsolete/plastic/README                            |   12 -
 obsolete/plastic/plastic-syntax.el                 |  119 -
 obsolete/plastic/plastic.el                        |  665 -----
 obsolete/plastic/test.lf                           |   64 -
 proof-general.el                                   |   19 +-
 twelf/README                                       |   27 -
 twelf/example.elf                                  |   64 -
 twelf/twelf-font.el                                |  444 ----
 twelf/twelf-old.el                                 | 2660 --------------------
 twelf/twelf.el                                     |  209 --
 385 files changed, 1029 insertions(+), 24859 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 58978d2..eac073a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -26,3 +26,33 @@ These are the main "official" authors of Proof General, but 
many more
 people have contributed, some very significantly.  We're grateful to
 everyone who has!  Please see the CREDITS section in the manual for a
 more complete list.
+
+====================================================================
+
+Notes regarding the License change to GPLv3+:
+
+Contributors who are positively known to be OK with relicensing:
+
+    Stefan Monnier
+    Clément Pit-Claudel
+    Paul Steckler
+    Erik Martin-Dorel
+    Pierre Courtieu
+    Jim Fehrle
+    stardiviner <numbchild@gmail.com>
+    Pierre-Yves Strub
+    Hendrik Tews
+    David Aspinall
+    Cyril Anaclet
+    Christophe Raffalli
+    Makarius Wenzel
+
+## New provers compared to PG-async: phox easycrypt pghaskell pgocaml pgshell
+
+Git history:
+
+    git log -- phox easycrypt pghaskell pgocaml pgshell |
+        grep 'Author:' | sort -u
+
+shows that these have only received contributions from people in the
+above list.
diff --git a/BUGS b/BUGS
index 92aef30..4dbb42b 100644
--- a/BUGS
+++ b/BUGS
@@ -79,18 +79,6 @@ assistant.  Files ought to be coloured red while they are 
being
 processed, just as single lines are.  Workaround: be careful not to
 edit a file as it is being read by the proof assistant.
 
-* Problems with Isabelle
-
-** Issues with tracing mode 
-
-Large volumes of output can cause Emacs to hog CPU spending
-all its time processing the output (esp with fontifying and X-symbol
-decoding).   It becomes difficult to use normal editing commands,
-even C-c C-c to interrupt the prover.  Workaround: hitting C-g,
-the Emacs quit key, will interrupt the prover in this state.
-See manual for further description of this.
-
-
 * Problems with Coq
 
 ** Multiple file handling and auto-compilation is incomplete
@@ -100,12 +88,4 @@ See manual for further description of this.
 ** coqtags doesn't find all declarations. 
 
 It cannot handle lists e.g., with "Parameter x,y:nat" it only tags x
-but not y. [The same problem exists for legotags] Workaround: don't
-rely too much on the etags mechanism.
-
-
-* LEGO Proof General Bugs
-
-See lego/BUGS
-
-
+but not y. Workaround: don't rely too much on the etags mechanism.
diff --git a/CHANGES b/CHANGES
index 56f3da1..d8ea1ce 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@ and the PG Trac http://proofgeneral.inf.ed.ac.uk/trac
 * Changes of Proof General 4.5 from Proof General 4.4
 
 ** Generic changes
+*** License changed to GPLv3+
+*** Remove support for the following systems:
+Twelf, CCC, Lego, Hol-Light, ACL2, Plastic, Lambda-Clam, Isabelle, HOL98.
 
 *** require GNU Emacs 25.1 or later
 
diff --git a/COPYING b/COPYING
index d60c31a..f288702 100644
--- a/COPYING
+++ b/COPYING
@@ -1,285 +1,626 @@
-                   GNU GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
 
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-                           Preamble
+                            Preamble
 
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
 your programs, too.
 
   When we speak of free software, we are referring to freedom, not
 price.  Our General Public Licenses are designed to make sure that you
 have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
 
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
 
   For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
 
   The precise terms and conditions for copying, distribution and
 modification follow.
-
-                   GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
 this License.
 
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
 otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
 be similar in spirit to the present version, but may differ in detail to
 address new problems or concerns.
 
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                           NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Programs
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change 
under these terms.
 
   To do so, attach the following notices to the program.  It is safest
 to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
+state the exclusion of warranty; and each file should have at least
 the "copyright" line and a pointer to where the full notice is found.
 
     <one line to give the program's name and a brief idea of what it does.>
     Copyright (C) <year>  <name of author>
 
-    This program is free software; you can redistribute it and/or modify
+    This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
+    the Free Software Foundation, either version 3 of the License, or
     (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
@@ -304,37 +645,30 @@ the "copyright" line and a pointer to where the full 
notice is found.
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
+    along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 Also add information on how to contact you by electronic and paper mail.
 
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
 
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.
 
 The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/INSTALL b/INSTALL
index 3b496bd..8902b82 100644
--- a/INSTALL
+++ b/INSTALL
@@ -32,8 +32,8 @@ Proof General loaded.
 
 The command above will set the Emacs load path and add auto-loads for
 proof assistants, for example, visiting a file ending in .v will start
-Coq Proof General, and a file ending in .thy will start 
-Isabelle Proof General.  See the manual for a full list of file
+Coq Proof General, and a file ending in .ec will start 
+EasyCrypt Proof General.  See the manual for a full list of file
 extensions and proof assistants, and the note below for how to disable
 those you don't need.
 
@@ -148,7 +148,7 @@ Removing support for unwanted provers
 
 You cannot run more than one instance of Proof General at a time in
 the same Emacs process: e.g. if you're using Coq, you won't be able to
-run LEGO scripts.
+run EasyCrypt scripts.
 
 If there are some assistants supported that you never want to use, you
 can remove them from the variable `proof-assistants' to prevent Proof
diff --git a/Makefile b/Makefile
index 4db14a0..1b7f9a8 100644
--- a/Makefile
+++ b/Makefile
@@ -35,13 +35,13 @@ PREFIX=$(DESTDIR)/usr
 DEST_PREFIX=$(DESTDIR)/usr
 
 # subdirectories for provers: to be compiled and installed
-PROVERS=acl2 ccc coq easycrypt hol-light hol98 isar lego pghaskell pgocaml 
pgshell phox twelf
+PROVERS=coq easycrypt pghaskell pgocaml pgshell phox
 
 # generic lisp code: to be compiled and installed
 OTHER_ELISP=generic lib
 
 # additional lisp code: to be compiled but not installed
-ADDITIONAL_ELISP:=ci/compile-tests \
+ADDITIONAL_ELISP:=ci/compile-tests                            \
                $(wildcard ci/compile-tests/[0-9][0-9][0-9]-*) \
                ci/simple-tests
 
@@ -58,17 +58,16 @@ ELISP_EXTRAS=
 EXTRA_DIRS = images
 
 DOC_FILES=AUTHORS BUGS COMPATIBILITY CHANGES COPYING INSTALL README REGISTER 
doc/*.pdf
-DOC_EXAMPLES=acl2/*.acl2 hol98/*.sml isar/*.thy lclam/*.lcm lego/*.l 
pgshell/*.pgsh phox/*.phx plastic/*.lf twelf/*.elf
+DOC_EXAMPLES=pgshell/*.pgsh phox/*.phx
 DOC_SUBDIRS=${DOC_EXAMPLES} */README* */CHANGES */BUGS 
 
 BATCHEMACS=${EMACS} --batch --no-site-file -q 
 
 # Scripts to edit paths to shells
-BASH_SCRIPTS = isar/interface
-PERL_SCRIPTS = lego/legotags coq/coqtags isar/isartags
+PERL_SCRIPTS = coq/coqtags
 
 # Scripts to install to bin directory
-BIN_SCRIPTS = lego/legotags coq/coqtags isar/isartags
+BIN_SCRIPTS = coq/coqtags
 
 # Setting load path might be better in Elisp, but seems tricky to do
 # only during compilation.  Another idea: put a function in proof-site
@@ -274,36 +273,33 @@ scripts: bashscripts perlscripts
 
 .PHONY: bashscripts
 bashscripts:
-       (bash="`which bash`"; \
-        if [ -z "$$bash" ]; then \
+       (bash="`which bash`";                                       \
+        if [ -z "$$bash" ]; then                                   \
           echo "Could not find bash - bash paths not checked" >&2; \
-          exit 0; \
-        fi; \
-        for i in $(BASH_SCRIPTS); do \
-          sed -i.orig "s|^#.*!.*/bin/bash.*$$|#!$$bash|" $$i; \
-        done)
+          exit 0;                                                  \
+        fi)
 
 .PHONY: perlscripts
 perlscripts:
-       (perl="`which perl`"; \
-        if [ -z "$$perl" ]; then \
+       (perl="`which perl`";                                       \
+        if [ -z "$$perl" ]; then                                   \
           echo "Could not find perl - perl paths not checked" >&2; \
-          exit 0; \
-        fi; \
-        for i in $(PERL_SCRIPTS); do \
-          sed -i.orig "s|^#.*!.*/bin/perl.*$$|#!$$perl|" $$i; \
+          exit 0;                                                  \
+        fi;                                                        \
+        for i in $(PERL_SCRIPTS); do                               \
+          sed -i.orig "s|^#.*!.*/bin/perl.*$$|#!$$perl|" $$i;      \
         done)
 
 # Set PGHOME path in scripts back to default location.
 .PHONY: cleanscripts
 cleanscripts:
-       (for i in $(BASH_SCRIPTS) $(PERL_SCRIPTS); do \
-          if [ -f $$i.rm ] ; then \
-            rm -f $$i.rm; \
-          fi; \
-          if [ -f $$i.orig ] ; then \
-             mv -f $$i.orig $$i; \
-           fi; \
+       (for i in $(PERL_SCRIPTS); do \
+          if [ -f $$i.rm ] ; then    \
+            rm -f $$i.rm;            \
+          fi;                        \
+          if [ -f $$i.orig ] ; then  \
+             mv -f $$i.orig $$i;      \
+           fi;                               \
         done)
 
 ##
diff --git a/Makefile.devel b/Makefile.devel
index 8705af3..f244798 100644
--- a/Makefile.devel
+++ b/Makefile.devel
@@ -147,7 +147,7 @@ TAR=tar
 
 # Files not to include the distribution area or tarball
 UNFINISHED_ELISP=
-ETC_FILES=etc/lego etc/coq etc/demoisa etc/isa etc/isar etc/lego etc/patches 
etc/*.txt
+ETC_FILES=etc/coq etc/demoisa etc/patches etc/*.txt
 NONDISTFILES=.gitignore */.gitignore Makefile.devel etc/trac etc/testsuite 
$(UNFINISHED_ELISP) $(ETC_FILES)
 DOCDISTFILES=ProofGeneral.info PG-adapting.info
 
diff --git a/README.md b/README.md
index ab9da9c..753b73e 100644
--- a/README.md
+++ b/README.md
@@ -137,19 +137,10 @@ Supported proof assistants:
 Proof General used to support other proof assistants, but those
 instances are no longer maintained nor available in the MELPA package:
 
-* Legacy support of
-  [Isabelle](https://www.cl.cam.ac.uk/research/hvg/Isabelle/) and
-  [LEGO](http://www.dcs.ed.ac.uk/home/lego)
-* Experimental support of: CCC, ACL2, HOL98, Hol-Light, Lambda-Clam, Shell, 
Twelf
-* Obsolete instances: Demoisa, Lambda-Clam, Plastic
+* Experimental support of: Shell
+* Obsolete instances: Demoisa
+* Removed instances: Twelf, CCC, Hol-Light, ACL2, Plastic, Lambda-Clam, HOL98,
+  [LEGO](http://www.dcs.ed.ac.uk/home/lego),
+  [Isabelle](https://www.cl.cam.ac.uk/research/hvg/Isabelle/)
 
 A few example proofs are included in each prover subdirectory.
-
-## Contributing
-
-Contributions to this repository are placed under the BSD-3 license.
-As BSD-3 is compatible with both GPLv2 and GPLv3+, this means that
-we can merge them in both `master` and `async` branches if need be,
-using the same license as the rest of the codebase, while you keep
-all the rights on your code.
-For more info, see <https://opensource.org/licenses/BSD-3-Clause>.
diff --git a/acl2/README b/acl2/README
deleted file mode 100644
index fbe9344..0000000
--- a/acl2/README
+++ /dev/null
@@ -1,22 +0,0 @@
-ACL2 Proof General, for ACL2.
-
-Written by David Aspinall.
-
-Status:               alpha; unsupported
-Maintainer:    volunteer required
-ACL2 version:  Tested briefly with acl2.5
-ACL2 homepage: http://www.cs.utexas.edu/users/moore/acl2
-
-========================================
-
-This is the absolute bare beginnings of a PG instance for ACL2.
-At the moment, only basic script management is configured.
-
-I have written this in the hope that somebody from the ACL2 community
-will adopt it, maintain and improve it, and thus turn it into a proper
-instantiation of Proof General.
-
-
-
-$Id$
-
diff --git a/acl2/acl2.el b/acl2/acl2.el
deleted file mode 100644
index db3120e..0000000
--- a/acl2/acl2.el
+++ /dev/null
@@ -1,106 +0,0 @@
-;;; acl2.el --- Basic Proof General instance for ACL2
-
-;; This file is part of Proof General.
-
-;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2018  Free Software Foundation, Inc.
-;; Portions © Copyright 2001-2017  Pierre Courtieu
-;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
-;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
-;; Portions © Copyright 2015-2017  Clément Pit-Claudel
-
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
-
-;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
-
-;;; Commentary:
-;;
-;; Needs improvement!
-;;
-;; See the README file in this directory for information.
-
-;;; Code:
-
-(require 'proof-easy-config)            ; easy configure mechanism
-(require 'proof-syntax)                        ; functions for making regexps
-
-(add-to-list 'auto-mode-alist                ; ACL2 uses two file extensions
-                                             ; Only grab .lisp extension after
-             (cons "\\.lisp\\'" 'acl2-mode)) ; an acl2 file has been loaded
-
-(proof-easy-config  'acl2 "ACL2"
- proof-assistant-home-page       "http://www.cs.utexas.edu/users/moore/acl2";
- proof-prog-name                "acl2"
-
- proof-script-sexp-commands     t
- proof-script-comment-start    ";"
-
- proof-shell-annotated-prompt-regexp "ACL2[ !]*>+"
-
- proof-save-command-regexp      "(def\\w+\\s "
- proof-goal-command-regexp       "(def\\w+\\s "
- proof-save-with-hole-regexp     "(def\\w+[ \t\n]+\\(\\w+\\)"
- proof-save-with-hole-result    1
- proof-shell-error-regexp
- "^Error: \\|Error in TOP-LEVEL: \\|\\*\\*\\*\\* FAILED \\*\\*\\*"
- proof-shell-interrupt-regexp    "Correctable error: Console interrupt."
-
- proof-shell-quit-cmd            ":q"   ;; FIXME: followed by C-d.
- proof-shell-restart-cmd        ":q\n:q\n:q\n(lp)\n"    ;; FIXME: maybe not?
- proof-info-command             ":help"
- proof-undo-n-times-cmd                 ":ubt %s"  ;; shouldn't give errors
- proof-forget-id-command        ":ubt %s"  ;; so use ubt not ubt!
- proof-context-command          ":pbt :max"
- ;; proof-showproof-cmd                 ":pbt :here"
-
- proof-shell-truncate-before-error nil
-
- ;;
- ;; Syntax table entries for proof scripts  (FIXME: incomplete)
- ;;
- proof-script-syntax-table-entries
- '(?\[ "(]  "
-   ?\] "([  "
-   ?\( "()  "
-   ?\) ")(  "
-   ?.  "w   "
-   ?_  "w   "
-   ?-  "w   "
-   ?>  "w   " ;; things treated as names can have > in them
-   ?#  "'   "
-   ?\' "'    "
-   ?`  "'    "
-   ?,  "'    "
-   ?\| "."
-   ?\; "<    "
-   ?\n ">    "
-   )
-
- ;; A tiny bit of syntax highlighting
- ;;
- proof-script-font-lock-keywords
- (append
-  (list
-   (proof-ids-to-regexp '("defthm" "defabbrev" "defaxiom" "defchoose"
-                         "defcong" "defconst" "defdoc" "defequiv"
-                         "defevaluator" "defpackage" "deflabel" "deftheory"
-                         "implies" "equal" "and")))
-  (if (boundp 'lisp-font-lock-keywords) ;; wins if font-lock is loaded
-      lisp-font-lock-keywords))
-
-
- ;; End of easy config.
- )
-
-;; Interrupts and errors enter another loop; break out of it
-(add-hook
- 'proof-shell-handle-error-or-interrupt-hook
- (lambda () (if (eq proof-shell-error-or-interrupt-seen 'interrupt)
-               (proof-shell-insert ":q" nil))))
-
-
-
-(warn "ACL2 Proof General is incomplete!  Please help improve it!
-Please add improvements at https://github.com/ProofGeneral/PG";)
-
-(provide 'acl2)
diff --git a/acl2/example.acl2 b/acl2/example.acl2
deleted file mode 100644
index a3a0f21..0000000
--- a/acl2/example.acl2
+++ /dev/null
@@ -1,9 +0,0 @@
-;;  Example proof script for ACL2 Proof General.
-;;
-;;   $Id$
-;;    
-
-(defthm assoc->assoc-equal
-  (equal (assoc x a)
-        (assoc-equal x a)))
-
diff --git a/acl2/root2.acl2 b/acl2/root2.acl2
deleted file mode 100644
index c60d05e..0000000
--- a/acl2/root2.acl2
+++ /dev/null
@@ -1,348 +0,0 @@
-(* Example proof by Ruben Gamboa.  
-   See http://www.cs.kun.nl/~freek/comparison/ *)
-
-
-(in-package "ACL2")
-
-;; This book presents the proof that sqrt(2) is an irrational number.
-;; The proof proceeds by observing that p^2 is even precisely when p
-;; is even.  Thus, if p^2 = 2 q^2, p must be even.  But then, p^2
-;; isn't just even, it's a multiple of 4, so q^2 = p^2 / 2 must also
-;; be even.  But since q^2 is even, so is q.  Now, letting p be the
-;; numerator of 2 and q the denominator of 2, we find that both the
-;; numerator and denominator are even -- but this is an
-;; impossibility.  Hence, we can conclude that 2 is not rational.
-
-;; The proof is completed by observing that sqrt(2) is not complex.
-;; The reason is that if x is complex, x^2 is real only when x is a
-;; pure imaginary number.  But in those cases, x^2 is negative
-
-(include-book "../arithmetic/top"
-             :load-compiled-file nil)
-
-;; Step 1: We begin by proving that p^2 is even precisely when p is
-;; even.
-
-(encapsulate
- ()
-
- ;; Since ACL2 is so strong in induction, it is common to use
- ;; induction to prove simple number theoretic results.  But to induce
- ;; over the even numbers requires that each time through the
- ;; induction we "step" by 2, not the usual 1.  So we start by
- ;; introducing the induction scheme for the even numbers.
-
- (local
-  (defun even-induction (x)
-    "Induct by going two steps at a time"
-    (if (or (zp x) (equal x 1))
-       x
-      (1+ (even-induction (1- (1- x)))))))
-
- ;; Now we can prove that if p^2 is even, so is p.  Because we're
- ;; doing this inductively, we only consider the even naturals to
- ;; begin with.
-
- (local
-  (defthm lemma-1
-    (implies (and (integerp p)
-                 (<= 0 p)
-                 (evenp (* p p)))
-            (evenp p))
-    :hints (("Goal"
-            :induct (even-induction p)))
-    :rule-classes nil))
-
- ;; Technically, we do not need to worry about the negative integers
- ;; in this proof, since both the numerator and denominator of 2 (if
- ;; they existed) are positive.  But it's easy enough to prove this,
- ;; and it gets rid of the "non-negative" hypothesis.  In general, it
- ;; is good to get rid of hypothesis in ACL2 rewrite rules.
-
- (local
-  (defthm lemma-2
-    (implies (and (integerp p)
-                 (<= p 0)
-                 (evenp (* p p)))
-            (evenp p))
-    :hints (("Goal"
-            :use (:instance lemma-1 (p (- p)))))
-    :rule-classes nil))
-
- ;; Now, we can prove that if p^2 is even, so is p.  But the converse
- ;; is trivial, so we could show that p^2 is even iff p is even.
- ;; Because equalities are more powerful rewrite rules than
- ;; implications, we prefer to do so, even though we don't really need
- ;; the stronger equality for this proof.  So we prove the converse
- ;; here: if p is even, so is p^2.
-
- (local
-  (defthm lemma-3
-    (implies (and (integerp p)
-                 (evenp p))
-            (evenp (* p p)))
-    :rule-classes nil))
-    
- ;; Now, we simply collect the results above to find that p^2 is even
- ;; if and only if p is even.  This is the only theorem that is
- ;; exported from this event.
-
- (defthm even-square-implies-even
-   (implies (integerp p)
-           (equal (evenp (* p p)) (evenp p)))
-   :hints (("Goal"
-           :use ((:instance lemma-1)
-                 (:instance lemma-2)
-                 (:instance lemma-3)))))
- )
-
-;; Step 2. Suppose p^2 is even.  Then, p is even, so p^2 is more than
-;; even -- it is a multiple of 4.  We prove this here, since it is the
-;; key fact allowing us to conclude that q^2 is even when we know that
-;; p^2 = 2 * q^2.
-
-(defthm even-square-implies-even-square-multiple-of-4
-  (implies (and (integerp p)
-               (evenp (* p p)))
-          (evenp (* 1/2 p p)))
-  :hints (("Goal"
-          :use ((:instance even-square-implies-even)
-                (:instance (:theorem (implies (integerp x) (integerp (* x x))))
-                           (x (* 1/2 p))))
-          :in-theory (disable even-square-implies-even))))
-
-;; In the proofs below, we disable ACL2's definition of even, but we
-;; need to remember that 2*n is always even.  So we prove that rewrite
-;; rule here.
-
-(defthm evenp-2x
-  (implies (integerp x)
-          (evenp (* 2 x))))
-
-;; Step 3. Suppose p^2 = 2 * q^2.  Then we can conclude that p is
-;; even, since p^2 is even.
-
-(defthm numerator-sqrt-2-is-even
-   (implies (and (integerp p)
-                (integerp q)
-                (equal (* p p)
-                       (* 2 (* q q))))
-           (evenp p))
-   :hints (("Goal"
-           :use ((:instance even-square-implies-even)
-                 (:instance evenp-2x (x (* q q))))
-           :in-theory (disable even-square-implies-even
-                               evenp-2x
-                               evenp))))
-
-;; Step 4. Suppose p^2 = 2 * q^2.  Then we can conclude that q is
-;; even, since p^2 is a multiple of 4, so q^2 is even.
-
-(defthm denominator-sqrt-2-is-even
-   (implies (and (integerp p)
-                (integerp q)
-                (equal (* p p)
-                       (* 2 (* q q))))
-           (evenp q))
-   :hints (("Goal"
-           :use ((:instance even-square-implies-even-square-multiple-of-4)
-                 (:instance even-square-implies-even (p q))
-                 (:instance evenp-2x 
-                            (x (* q q)))
-                 (:instance equal-*-/-1
-                            (x 2)
-                            (y (* p p))
-                            (z (* q q))))
-           :in-theory (disable even-square-implies-even-square-multiple-of-4
-                               even-square-implies-even
-                               evenp-2x
-                               evenp
-                               equal-*-/-1))))
-
-;; Step 5.  Those are all the pieces we need to prove that sqrt(2) is
-;; not rational.  For we observe that if p=numerator(sqrt(2)) and
-;; q=denominator(sqrt(2)), the theorems above show that both p and q
-;; are even, and that's an absurdity.
-
-(encapsulate
- ()
-
- ;; ACL2's algebraic prowess is modest.  In the proof of the main
- ;; theorem below, it builds the expression p^2/q^2 where x=p/q, but
- ;; it does not reduce the expression further to x^2.  We add a
- ;; rewrite rule to take care of that.
-
- (local
-  (defthm lemma-1
-    (implies (rationalp x)
-            (equal (* (/ (denominator x))
-                      (/ (denominator x))
-                      (numerator x)
-                      (numerator x))
-                   (* x x)))
-    :hints (("Goal"
-            :use ((:instance Rational-implies2)
-                  (:instance *-r-denominator-r (r x)))
-            :in-theory (disable Rational-implies2
-                                *-r-denominator-r)))))
-
- ;; Now we can prove that the square root of 2 is not rational.  This
- ;; involves using the theorems defined above, as well as some
- ;; algebraic lemmas to help reduce the terms.  The most important
- ;; hint, however, is the inclusion of the axiom Lowest-Terms, because
- ;; it is not enabled in the ACL2 world.
-
- (defthm sqrt-2-not-rational
-   (implies (equal (* x x) 2)
-           (not (rationalp x)))
-   :hints (("Goal"
-           :use ((:instance numerator-sqrt-2-is-even
-                            (p (numerator x))
-                            (q (denominator x)))
-                 (:instance denominator-sqrt-2-is-even
-                            (p (numerator x))
-                            (q (denominator x)))       
-                 (:instance Lowest-Terms
-                            (n 2)
-                            (r (/ (numerator x) 2))
-                            (q (/ (denominator x) 2)))
-                 (:instance equal-*-/-1
-                            (x (/ (* (denominator x) (denominator x))))
-                            (y 2)
-                            (z (* (numerator x) (numerator x)))))
-           :in-theory (disable equal-*-/-1
-                               numerator-sqrt-2-is-even
-                               denominator-sqrt-2-is-even))))
- )
-
-;; Step 6. Now that the rationals are ruled out, we need to weed out
-;; the remaining sqrt(2) suspects.  One possibility is that sqrt(2) is
-;; a complex number.  We explore that here.  Because ACL2 has very
-;; little knowledge of the complex numbers, we have to start with some
-;; basic facts.  First, we show that (a+bi)^2 = (a^2-b^2)+(ab+ab)i.
-(encapsulate
- ()
-
- ;; We start out with the desired theorem when the complex number is
- ;; written as a+bi instead of (complex a b).  Here, the result
- ;; follows from simple algebra and the fact that i^2=-1.
- (local
-  (defthm lemma-1
-    (equal (* (+ x (* #c(0 1) y))
-             (+ x (* #c(0 1) y)))
-          (+ (- (* x x) (* y y))
-             (* #c(0 1) (+ (* x y) (* x y)))))
-    :rule-classes nil))
-
- ;; Now we rewrite the right-hand side of the rewrite rule into the
- ;; final form of (complex (a^2-b^2) (ab+ab))
- (local
-  (defthm lemma-2
-    (implies (and (realp x)
-                 (realp y))
-            (equal (* (+ x (* #c(0 1) y))
-                      (+ x (* #c(0 1) y)))
-                   (complex (- (* x x) (* y y))
-                            (+ (* x y) (* x y)))))
-    :hints (("Goal"
-            :use ((:instance lemma-1)
-                  (:instance complex-definition
-                             (x (- (* x x) (* y y)))
-                             (y (+ (* x y) (* x y)))))))
-    :rule-classes nil))
-
- ;; And finally we rewrite the left-hand side of the rewrite rule into
- ;; the final form of (complex a b)^2.
- (defthm complex-square-definition
-   (implies (and (realp x)
-                (realp y))
-           (equal (* (complex x y) (complex x y))
-                  (complex (- (* x x) (* y y))
-                           (+ (* x y) (* x y)))))
-   :hints (("Goal"
-           :use ((:instance complex-definition)
-                 (:instance lemma-2))))
-   :rule-classes nil)
- )
-
-;; Step 7.  Since (a+bi)^2 = (a^2-b^2)+(ab+ab)i, it follows that it is
-;; real if and only if a or b is zero, i.e., if and only if the number
-;; is real or pure imaginary.  Since we're interested only in the
-;; non-real complex numbers (the ones for which complexp is true), we
-;; can conlude that only pure imaginaries have real squares.
-(encapsulate
- ()
-
- ;; First we show that (a+bi)^2 = (a^2-b^2)+(ab+ab)i is real if and
- ;; only ab+ab is zero.
- (local
-  (defthm lemma-1
-    (implies (and (complexp x)
-                 (realp (* x x)))
-            (equal (+ (* (realpart x) (imagpart x))
-                      (* (realpart x) (imagpart x)))
-                   0))
-    :hints (("Goal"
-            :use (:instance complex-square-definition
-                            (x (realpart x))
-                            (y (imagpart x)))))
-    :rule-classes nil))
-
- ;; The following rewrite rule allows us to conclude that a real
- ;; number x is zero whenever x+x is zero.
- (local
-  (defthm lemma-2
-    (implies (and (realp x)
-                 (equal (+ x x) 0))
-            (= x 0))))
-
- ;; The two lemmas above conclude that ab is zero whenever (a+bi)^2 is
- ;; zero, and since b is assumed non-zero (because a+bi is complex),
- ;; we have that a must be zero, and a+bi=bi is a pure imaginary
- ;; number.
- (defthm complex-squares-real-iff-imaginary
-   (implies (and (complexp x)
-                (realp (* x x)))
-           (equal (realpart x) 0))
-   :hints (("Goal"
-           :use ((:instance lemma-1)
-                 (:instance lemma-2
-                            (x (* (realpart x) (imagpart x))))))))
- )
-
-;; Step 7.  Trivially, the square of a pure imaginary number bi is a
-;; negative real, since bi^2 = -b^2.
-(defthm imaginary-squares-are-negative
-  (implies (and (complexp x)
-               (equal (realpart x) 0))
-          (< (* x x) 0))
-  :hints (("Goal"
-          :use (:instance complex-square-definition
-                          (x 0)
-                          (y (imagpart x))))))
-
-;; Step 8.  From the theorems above, we can conclude that sqrt(2) is
-;; not a complex number, because the only candidates are the pure
-;; imaginary numbers, and their squares are all negative.
-(defthm sqrt-2-not-complexp
-  (implies (complexp x)
-          (not (equal (* x x) 2)))
-  :hints (("Goal"
-          :use ((:instance complex-squares-real-iff-imaginary)
-                (:instance imaginary-squares-are-negative)))))
-
-;; Step 9.  That means sqrt(2) is not rational, and neither is it a
-;; complex number.  The only remaining candidates (in ACL2's universe)
-;; are the non-rational reals, so we can prove the main result: the
-;; square root of two (if it exists) is irrational.
-(defthm irrational-sqrt-2
-  (implies (equal (* x x) 2)
-          (and (realp x)
-               (not (rationalp x))))
-  :hints (("Goal"
-          :cases ((rationalp x) (complexp x)))))
-
-;; Step 10.  Next, it would be nice to show that sqrt(2) actually
-;; exists!  See the book nonstd/nsa/sqrt.lisp for a proof of that,
-;; using non-standard analysis.
-
diff --git a/ccc/README b/ccc/README
deleted file mode 100644
index 88faf17..0000000
--- a/ccc/README
+++ /dev/null
@@ -1,14 +0,0 @@
-Proof General for the Casl Consistency Checker
-
-Author:        Christoph L�th <cxl@informatik.uni-bremen.de>
-       
-=================================================================
-
-This is a fairly straightforward instantiation of Proof General for
-the Casl Consistency Checker, CCC. 
-
-CASL is the standard algebraic specification language, and CCC is a
-tool to check consistency of CASL specifications.
-
-For more information, hasten thee browser yonder:
-  http://www.informatik.uni-bremen.de/cofi/ccc
diff --git a/ccc/ccc.el b/ccc/ccc.el
deleted file mode 100644
index 44a0d7c..0000000
--- a/ccc/ccc.el
+++ /dev/null
@@ -1,85 +0,0 @@
-;; ccc.el - Proof General for the Casl Consistency Checker
-;;
-;; Author: Christoph L�th <cxl@informatik.uni-bremen.de>
-;;
-;; This is a fairly straightforward instantiation of Proof General for
-;; the Casl Consistency Checker, CCC.
-;;
-;; CASL is the standard algebraic specification language, and CCC is a
-;; tool to check consistency of CASL specifications.
-;;
-;; For more information, hasten thee browser yonder:
-;;   http://www.informatik.uni-bremen.de/cofi/ccc
-
-(require 'proof-easy-config)            ; nice and easy does it
-(require 'proof-syntax)                        ; functions for making regexps
-
-(defvar ccc-keywords nil)
-(defvar ccc-tactics nil)
-(defvar ccc-tacticals nil)
-
-(proof-easy-config  'ccc "CASL Consistency Checker"
- proof-prog-name                "ccc" ;; must be in your path.
- proof-terminal-string             ";"
- proof-script-comment-start      "(*"
- proof-script-comment-end        "*)"
- proof-goal-command-regexp       "\\(ccc\\|holcasl\\) \".*\";"
- proof-save-command-regexp       "^qeccc"
- proof-goal-with-hole-regexp     "\\(ccc\\|holcasl\\) \"\\(\\(.*\\)\\)\""
- proof-save-with-hole-regexp     "qeccc \"\\(\\(.*\\)\\)\""
- proof-non-undoables-regexp      "undo\\|back"
- proof-goal-command              "ccc \"%s\";"
- proof-save-command              "qeccc \"%s\";"
- proof-kill-goal-command         "abort ();"
- proof-showproof-command         "prt()"
- proof-undo-n-times-cmd          "undo_steps %s;"
- proof-auto-multiple-files       nil
- proof-shell-cd-cmd              "cd \"%s\""
- proof-shell-interrupt-regexp    "Interrupt"
- proof-shell-start-goals-regexp  "^No subgoals\\|^[0-9]* subgoals\\|^Wts:"
- proof-shell-end-goals-regexp    "val it"
- proof-shell-quit-cmd            "quit();"
- proof-assistant-home-page       
"http://www.informatik.uni-bremen.de/cofi/tools/ccc";
- proof-shell-annotated-prompt-regexp  "^\\(val it = () : 
unit\n\\)?\\(CCC\\|^HOL-CASL\\)> " ;; "^\\(val it = () : unit\n\\)?ML>? "
- proof-shell-error-regexp        "\\*\\*\\*\\|^.*Error:\\|^uncaught exception 
\\|^Exception- "
- proof-shell-proof-completed-regexp "^Consistency proof successfully finished."
- proof-shell-eager-annotation-start "^\\[opening \\|^###\\|^Reading" ;;; ???
-
- ;;
- ;; Some basic fontlocking and syntax table entries, as taken from the
- ;; hol98 instance (it's all SML anyway :-)
- ;;
- proof-script-syntax-table-entries
- '(?\` "\""
-   ?\$ "."
-   ?\/ "."
-   ?\\ "."
-   ?+  "."
-   ?-  "."
-   ?=  "."
-   ?%  "."
-   ?<  "."
-   ?>  "."
-   ?\& "."
-   ?.  "w"
-   ?_  "w"
-   ?\' "w"
-   ?\| "."
-   ?\[ "(]"
-   ?\] ")["
-   ?\* ". 23"
-   ?\( "()1"
-   ?\) ")(4")
-
- ccc-keywords  '("use" "ap" "holcasl" "ccc" "load_lib" "qeccc")
- ccc-tactics   '("compose" "compose'" "prove" "prove_free_type")
- ccc-tacticals '("Repeat" "Orelse" "Then" "ThenList" "OrelseList")
- proof-script-font-lock-keywords
- (list
-  (cons (proof-ids-to-regexp ccc-keywords) 'font-lock-keyword-face)
-  (cons (proof-ids-to-regexp ccc-tactics) 'font-lock-keyword-face)
-  ; (cons (proof-ids-to-regexp hol98-rules) 'font-lock-keyword-face)
-  (cons (proof-ids-to-regexp ccc-tacticals) 'proof-tacticals-name-face))
-
-
-)
diff --git a/ci/compile-tests/001-mini-project/Makefile 
b/ci/compile-tests/001-mini-project/Makefile
index 95f0501..63bf6d0 100644
--- a/ci/compile-tests/001-mini-project/Makefile
+++ b/ci/compile-tests/001-mini-project/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 .PHONY: test
diff --git a/ci/compile-tests/001-mini-project/a.v 
b/ci/compile-tests/001-mini-project/a.v
index fe3521b..15c2a0e 100644
--- a/ci/compile-tests/001-mini-project/a.v
+++ b/ci/compile-tests/001-mini-project/a.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/001-mini-project/b.v 
b/ci/compile-tests/001-mini-project/b.v
index ed30f61..35de075 100644
--- a/ci/compile-tests/001-mini-project/b.v
+++ b/ci/compile-tests/001-mini-project/b.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/001-mini-project/c.v 
b/ci/compile-tests/001-mini-project/c.v
index a879933..8aae8e9 100644
--- a/ci/compile-tests/001-mini-project/c.v
+++ b/ci/compile-tests/001-mini-project/c.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/001-mini-project/d.v 
b/ci/compile-tests/001-mini-project/d.v
index ca175bf..4099574 100644
--- a/ci/compile-tests/001-mini-project/d.v
+++ b/ci/compile-tests/001-mini-project/d.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/001-mini-project/e.v 
b/ci/compile-tests/001-mini-project/e.v
index 7cd08e9..088390a 100644
--- a/ci/compile-tests/001-mini-project/e.v
+++ b/ci/compile-tests/001-mini-project/e.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/001-mini-project/f.v 
b/ci/compile-tests/001-mini-project/f.v
index f5e47cd..4e190df 100644
--- a/ci/compile-tests/001-mini-project/f.v
+++ b/ci/compile-tests/001-mini-project/f.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/001-mini-project/runtest.el 
b/ci/compile-tests/001-mini-project/runtest.el
index 2048684..6ebd314 100644
--- a/ci/compile-tests/001-mini-project/runtest.el
+++ b/ci/compile-tests/001-mini-project/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;; 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/002-require-no-dependencies/Makefile 
b/ci/compile-tests/002-require-no-dependencies/Makefile
index 95f0501..63bf6d0 100644
--- a/ci/compile-tests/002-require-no-dependencies/Makefile
+++ b/ci/compile-tests/002-require-no-dependencies/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 .PHONY: test
diff --git a/ci/compile-tests/002-require-no-dependencies/a.v 
b/ci/compile-tests/002-require-no-dependencies/a.v
index b44c78f..cbe7525 100644
--- a/ci/compile-tests/002-require-no-dependencies/a.v
+++ b/ci/compile-tests/002-require-no-dependencies/a.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/002-require-no-dependencies/b.v 
b/ci/compile-tests/002-require-no-dependencies/b.v
index d37d48b..411a8c6 100644
--- a/ci/compile-tests/002-require-no-dependencies/b.v
+++ b/ci/compile-tests/002-require-no-dependencies/b.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/002-require-no-dependencies/c.v 
b/ci/compile-tests/002-require-no-dependencies/c.v
index 8619c90..ac8d7d8 100644
--- a/ci/compile-tests/002-require-no-dependencies/c.v
+++ b/ci/compile-tests/002-require-no-dependencies/c.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/002-require-no-dependencies/runtest.el 
b/ci/compile-tests/002-require-no-dependencies/runtest.el
index 07115d6..0ea01fb 100644
--- a/ci/compile-tests/002-require-no-dependencies/runtest.el
+++ b/ci/compile-tests/002-require-no-dependencies/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;; 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/003-require-error/Makefile 
b/ci/compile-tests/003-require-error/Makefile
index 95f0501..63bf6d0 100644
--- a/ci/compile-tests/003-require-error/Makefile
+++ b/ci/compile-tests/003-require-error/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 .PHONY: test
diff --git a/ci/compile-tests/003-require-error/a.v 
b/ci/compile-tests/003-require-error/a.v
index d5716ae..c8bdf62 100644
--- a/ci/compile-tests/003-require-error/a.v
+++ b/ci/compile-tests/003-require-error/a.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/003-require-error/b.v 
b/ci/compile-tests/003-require-error/b.v
index e3f5da5..ff9842d 100644
--- a/ci/compile-tests/003-require-error/b.v
+++ b/ci/compile-tests/003-require-error/b.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/003-require-error/c.v 
b/ci/compile-tests/003-require-error/c.v
index bd60ca0..02b0e0e 100644
--- a/ci/compile-tests/003-require-error/c.v
+++ b/ci/compile-tests/003-require-error/c.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/003-require-error/runtest.el 
b/ci/compile-tests/003-require-error/runtest.el
index a843f6b..4c4d558 100644
--- a/ci/compile-tests/003-require-error/runtest.el
+++ b/ci/compile-tests/003-require-error/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;;
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/004-dependency-cycle/Makefile 
b/ci/compile-tests/004-dependency-cycle/Makefile
index 95f0501..63bf6d0 100644
--- a/ci/compile-tests/004-dependency-cycle/Makefile
+++ b/ci/compile-tests/004-dependency-cycle/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 .PHONY: test
diff --git a/ci/compile-tests/004-dependency-cycle/a.v 
b/ci/compile-tests/004-dependency-cycle/a.v
index d84f5d1..570a91b 100644
--- a/ci/compile-tests/004-dependency-cycle/a.v
+++ b/ci/compile-tests/004-dependency-cycle/a.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/004-dependency-cycle/b.v 
b/ci/compile-tests/004-dependency-cycle/b.v
index c703c3a..48beb41 100644
--- a/ci/compile-tests/004-dependency-cycle/b.v
+++ b/ci/compile-tests/004-dependency-cycle/b.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/004-dependency-cycle/c.v 
b/ci/compile-tests/004-dependency-cycle/c.v
index 53bc67d..f26b7bf 100644
--- a/ci/compile-tests/004-dependency-cycle/c.v
+++ b/ci/compile-tests/004-dependency-cycle/c.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/004-dependency-cycle/d.v 
b/ci/compile-tests/004-dependency-cycle/d.v
index d06e5fe..63ce0cf 100644
--- a/ci/compile-tests/004-dependency-cycle/d.v
+++ b/ci/compile-tests/004-dependency-cycle/d.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/004-dependency-cycle/e.v 
b/ci/compile-tests/004-dependency-cycle/e.v
index 604b44e..80521cd 100644
--- a/ci/compile-tests/004-dependency-cycle/e.v
+++ b/ci/compile-tests/004-dependency-cycle/e.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/004-dependency-cycle/f.v 
b/ci/compile-tests/004-dependency-cycle/f.v
index e3f5da5..ff9842d 100644
--- a/ci/compile-tests/004-dependency-cycle/f.v
+++ b/ci/compile-tests/004-dependency-cycle/f.v
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/004-dependency-cycle/runtest.el 
b/ci/compile-tests/004-dependency-cycle/runtest.el
index f2005bf..143cf7a 100644
--- a/ci/compile-tests/004-dependency-cycle/runtest.el
+++ b/ci/compile-tests/004-dependency-cycle/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;;
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/005-change-recompile/Makefile 
b/ci/compile-tests/005-change-recompile/Makefile
index 4cdc650..8299006 100644
--- a/ci/compile-tests/005-change-recompile/Makefile
+++ b/ci/compile-tests/005-change-recompile/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 # This test modifies some .v files during the test. The original
diff --git a/ci/compile-tests/005-change-recompile/a.v.orig 
b/ci/compile-tests/005-change-recompile/a.v.orig
index f3d28e8..c320a9b 100644
--- a/ci/compile-tests/005-change-recompile/a.v.orig
+++ b/ci/compile-tests/005-change-recompile/a.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/005-change-recompile/b.v.orig 
b/ci/compile-tests/005-change-recompile/b.v.orig
index 0354f63..16b61f1 100644
--- a/ci/compile-tests/005-change-recompile/b.v.orig
+++ b/ci/compile-tests/005-change-recompile/b.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/005-change-recompile/c.v.orig 
b/ci/compile-tests/005-change-recompile/c.v.orig
index 0dd52b4..ad28b37 100644
--- a/ci/compile-tests/005-change-recompile/c.v.orig
+++ b/ci/compile-tests/005-change-recompile/c.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/005-change-recompile/d.v.orig 
b/ci/compile-tests/005-change-recompile/d.v.orig
index 8c984eb..b8800ed 100644
--- a/ci/compile-tests/005-change-recompile/d.v.orig
+++ b/ci/compile-tests/005-change-recompile/d.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/005-change-recompile/e.v.orig 
b/ci/compile-tests/005-change-recompile/e.v.orig
index dcef3a6..75e9a57 100644
--- a/ci/compile-tests/005-change-recompile/e.v.orig
+++ b/ci/compile-tests/005-change-recompile/e.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/005-change-recompile/f.v.orig 
b/ci/compile-tests/005-change-recompile/f.v.orig
index ef17405..09c3bc2 100644
--- a/ci/compile-tests/005-change-recompile/f.v.orig
+++ b/ci/compile-tests/005-change-recompile/f.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/005-change-recompile/g.v.orig 
b/ci/compile-tests/005-change-recompile/g.v.orig
index fbc58fe..84285e5 100644
--- a/ci/compile-tests/005-change-recompile/g.v.orig
+++ b/ci/compile-tests/005-change-recompile/g.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/005-change-recompile/h.v.orig 
b/ci/compile-tests/005-change-recompile/h.v.orig
index 1a0f57f..002abb3 100644
--- a/ci/compile-tests/005-change-recompile/h.v.orig
+++ b/ci/compile-tests/005-change-recompile/h.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/005-change-recompile/runtest.el 
b/ci/compile-tests/005-change-recompile/runtest.el
index e8bc6f7..2110fd5 100644
--- a/ci/compile-tests/005-change-recompile/runtest.el
+++ b/ci/compile-tests/005-change-recompile/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;;
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/006-ready-dependee/Makefile 
b/ci/compile-tests/006-ready-dependee/Makefile
index eb62230..8ef96dc 100644
--- a/ci/compile-tests/006-ready-dependee/Makefile
+++ b/ci/compile-tests/006-ready-dependee/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 # This test modifies some .v files during the test. The original
diff --git a/ci/compile-tests/006-ready-dependee/a.v.orig 
b/ci/compile-tests/006-ready-dependee/a.v.orig
index 8e4300e..7465b89 100644
--- a/ci/compile-tests/006-ready-dependee/a.v.orig
+++ b/ci/compile-tests/006-ready-dependee/a.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/b.v.orig 
b/ci/compile-tests/006-ready-dependee/b.v.orig
index 0354f63..16b61f1 100644
--- a/ci/compile-tests/006-ready-dependee/b.v.orig
+++ b/ci/compile-tests/006-ready-dependee/b.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/c.v.orig 
b/ci/compile-tests/006-ready-dependee/c.v.orig
index 3d2e542..f676810 100644
--- a/ci/compile-tests/006-ready-dependee/c.v.orig
+++ b/ci/compile-tests/006-ready-dependee/c.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/d.v.orig 
b/ci/compile-tests/006-ready-dependee/d.v.orig
index 2f9825c..28ebb5b 100644
--- a/ci/compile-tests/006-ready-dependee/d.v.orig
+++ b/ci/compile-tests/006-ready-dependee/d.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/e.v.orig 
b/ci/compile-tests/006-ready-dependee/e.v.orig
index 0589d31..01fce56 100644
--- a/ci/compile-tests/006-ready-dependee/e.v.orig
+++ b/ci/compile-tests/006-ready-dependee/e.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/f.v.orig 
b/ci/compile-tests/006-ready-dependee/f.v.orig
index 32c9287..aab05c2 100644
--- a/ci/compile-tests/006-ready-dependee/f.v.orig
+++ b/ci/compile-tests/006-ready-dependee/f.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/g.v.orig 
b/ci/compile-tests/006-ready-dependee/g.v.orig
index 73b210c..26ffdd9 100644
--- a/ci/compile-tests/006-ready-dependee/g.v.orig
+++ b/ci/compile-tests/006-ready-dependee/g.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/h.v.orig 
b/ci/compile-tests/006-ready-dependee/h.v.orig
index 5db2c3c..0830c20 100644
--- a/ci/compile-tests/006-ready-dependee/h.v.orig
+++ b/ci/compile-tests/006-ready-dependee/h.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/i.v.orig 
b/ci/compile-tests/006-ready-dependee/i.v.orig
index 09135c3..4e1dd16 100644
--- a/ci/compile-tests/006-ready-dependee/i.v.orig
+++ b/ci/compile-tests/006-ready-dependee/i.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/j.v.orig 
b/ci/compile-tests/006-ready-dependee/j.v.orig
index 62702b4..f39a5c3 100644
--- a/ci/compile-tests/006-ready-dependee/j.v.orig
+++ b/ci/compile-tests/006-ready-dependee/j.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/k.v.orig 
b/ci/compile-tests/006-ready-dependee/k.v.orig
index 7405e2c..dde1805 100644
--- a/ci/compile-tests/006-ready-dependee/k.v.orig
+++ b/ci/compile-tests/006-ready-dependee/k.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/006-ready-dependee/runtest.el 
b/ci/compile-tests/006-ready-dependee/runtest.el
index f64a0f4..7e96bb3 100644
--- a/ci/compile-tests/006-ready-dependee/runtest.el
+++ b/ci/compile-tests/006-ready-dependee/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;;
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/007-slow-require/Makefile 
b/ci/compile-tests/007-slow-require/Makefile
index c23f8d5..33b099a 100644
--- a/ci/compile-tests/007-slow-require/Makefile
+++ b/ci/compile-tests/007-slow-require/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 # This test modifies some .v files during the test. The original
diff --git a/ci/compile-tests/007-slow-require/a1.v.orig 
b/ci/compile-tests/007-slow-require/a1.v.orig
index 6b3e334..2faef83 100644
--- a/ci/compile-tests/007-slow-require/a1.v.orig
+++ b/ci/compile-tests/007-slow-require/a1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/a2.v.orig 
b/ci/compile-tests/007-slow-require/a2.v.orig
index 60ac127..5eeb398 100644
--- a/ci/compile-tests/007-slow-require/a2.v.orig
+++ b/ci/compile-tests/007-slow-require/a2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/a3.v.orig 
b/ci/compile-tests/007-slow-require/a3.v.orig
index 8337b2a..13a3937 100644
--- a/ci/compile-tests/007-slow-require/a3.v.orig
+++ b/ci/compile-tests/007-slow-require/a3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/a4.v.orig 
b/ci/compile-tests/007-slow-require/a4.v.orig
index fd5d4b6..91488d4 100644
--- a/ci/compile-tests/007-slow-require/a4.v.orig
+++ b/ci/compile-tests/007-slow-require/a4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/a5.v.orig 
b/ci/compile-tests/007-slow-require/a5.v.orig
index b6d7edb..e79a3ea 100644
--- a/ci/compile-tests/007-slow-require/a5.v.orig
+++ b/ci/compile-tests/007-slow-require/a5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/a6.v.orig 
b/ci/compile-tests/007-slow-require/a6.v.orig
index a9bb279..b18b427 100644
--- a/ci/compile-tests/007-slow-require/a6.v.orig
+++ b/ci/compile-tests/007-slow-require/a6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/b1.v.orig 
b/ci/compile-tests/007-slow-require/b1.v.orig
index 2f9cf6d..0a0afe5 100644
--- a/ci/compile-tests/007-slow-require/b1.v.orig
+++ b/ci/compile-tests/007-slow-require/b1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/b2.v.orig 
b/ci/compile-tests/007-slow-require/b2.v.orig
index b9cff7e..2f830b9 100644
--- a/ci/compile-tests/007-slow-require/b2.v.orig
+++ b/ci/compile-tests/007-slow-require/b2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/b3.v.orig 
b/ci/compile-tests/007-slow-require/b3.v.orig
index 5b2668c..c44ebb6 100644
--- a/ci/compile-tests/007-slow-require/b3.v.orig
+++ b/ci/compile-tests/007-slow-require/b3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/b4.v.orig 
b/ci/compile-tests/007-slow-require/b4.v.orig
index 5b49fd5..3d000e0 100644
--- a/ci/compile-tests/007-slow-require/b4.v.orig
+++ b/ci/compile-tests/007-slow-require/b4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/b5.v.orig 
b/ci/compile-tests/007-slow-require/b5.v.orig
index cd4a7b7..fbcfb5c 100644
--- a/ci/compile-tests/007-slow-require/b5.v.orig
+++ b/ci/compile-tests/007-slow-require/b5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/b6.v.orig 
b/ci/compile-tests/007-slow-require/b6.v.orig
index 826bdac..1e3e54f 100644
--- a/ci/compile-tests/007-slow-require/b6.v.orig
+++ b/ci/compile-tests/007-slow-require/b6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/c1.v.orig 
b/ci/compile-tests/007-slow-require/c1.v.orig
index 9df47c9..369b419 100644
--- a/ci/compile-tests/007-slow-require/c1.v.orig
+++ b/ci/compile-tests/007-slow-require/c1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/c2.v.orig 
b/ci/compile-tests/007-slow-require/c2.v.orig
index b8db747..4c76c4a 100644
--- a/ci/compile-tests/007-slow-require/c2.v.orig
+++ b/ci/compile-tests/007-slow-require/c2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/c3.v.orig 
b/ci/compile-tests/007-slow-require/c3.v.orig
index 04b225a..e68f940 100644
--- a/ci/compile-tests/007-slow-require/c3.v.orig
+++ b/ci/compile-tests/007-slow-require/c3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/c4.v.orig 
b/ci/compile-tests/007-slow-require/c4.v.orig
index 400a8a6..648b554 100644
--- a/ci/compile-tests/007-slow-require/c4.v.orig
+++ b/ci/compile-tests/007-slow-require/c4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/c5.v.orig 
b/ci/compile-tests/007-slow-require/c5.v.orig
index 2fa5a61..e282c51 100644
--- a/ci/compile-tests/007-slow-require/c5.v.orig
+++ b/ci/compile-tests/007-slow-require/c5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/c6.v.orig 
b/ci/compile-tests/007-slow-require/c6.v.orig
index fd0289b..8cc3998 100644
--- a/ci/compile-tests/007-slow-require/c6.v.orig
+++ b/ci/compile-tests/007-slow-require/c6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/d1.v.orig 
b/ci/compile-tests/007-slow-require/d1.v.orig
index fec9578..312a9db 100644
--- a/ci/compile-tests/007-slow-require/d1.v.orig
+++ b/ci/compile-tests/007-slow-require/d1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/d2.v.orig 
b/ci/compile-tests/007-slow-require/d2.v.orig
index fec9578..312a9db 100644
--- a/ci/compile-tests/007-slow-require/d2.v.orig
+++ b/ci/compile-tests/007-slow-require/d2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/d3.v.orig 
b/ci/compile-tests/007-slow-require/d3.v.orig
index fec9578..312a9db 100644
--- a/ci/compile-tests/007-slow-require/d3.v.orig
+++ b/ci/compile-tests/007-slow-require/d3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/d4.v.orig 
b/ci/compile-tests/007-slow-require/d4.v.orig
index fec9578..312a9db 100644
--- a/ci/compile-tests/007-slow-require/d4.v.orig
+++ b/ci/compile-tests/007-slow-require/d4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/d5.v.orig 
b/ci/compile-tests/007-slow-require/d5.v.orig
index d2fae3f..d6d0e62 100644
--- a/ci/compile-tests/007-slow-require/d5.v.orig
+++ b/ci/compile-tests/007-slow-require/d5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/d6.v.orig 
b/ci/compile-tests/007-slow-require/d6.v.orig
index b60d54a..f1b086a 100644
--- a/ci/compile-tests/007-slow-require/d6.v.orig
+++ b/ci/compile-tests/007-slow-require/d6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/007-slow-require/runtest.el 
b/ci/compile-tests/007-slow-require/runtest.el
index 686fbf1..6696aa1 100644
--- a/ci/compile-tests/007-slow-require/runtest.el
+++ b/ci/compile-tests/007-slow-require/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;; 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/008-default-dir/Makefile 
b/ci/compile-tests/008-default-dir/Makefile
index 5890ddd..f063efa 100644
--- a/ci/compile-tests/008-default-dir/Makefile
+++ b/ci/compile-tests/008-default-dir/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 # This test modifies some .v files during the test. The original
diff --git a/ci/compile-tests/008-default-dir/a.v.orig 
b/ci/compile-tests/008-default-dir/a.v.orig
index 3f019f1..00c5344 100644
--- a/ci/compile-tests/008-default-dir/a.v.orig
+++ b/ci/compile-tests/008-default-dir/a.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/008-default-dir/b.v.orig 
b/ci/compile-tests/008-default-dir/b.v.orig
index 1713dba..37d8c98 100644
--- a/ci/compile-tests/008-default-dir/b.v.orig
+++ b/ci/compile-tests/008-default-dir/b.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/008-default-dir/c.v.orig 
b/ci/compile-tests/008-default-dir/c.v.orig
index dfd8e8f..f3e09eb 100644
--- a/ci/compile-tests/008-default-dir/c.v.orig
+++ b/ci/compile-tests/008-default-dir/c.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/008-default-dir/runtest.el 
b/ci/compile-tests/008-default-dir/runtest.el
index 0a56f09..e4c3f4e 100644
--- a/ci/compile-tests/008-default-dir/runtest.el
+++ b/ci/compile-tests/008-default-dir/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;; 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/009-failure-processing/Makefile 
b/ci/compile-tests/009-failure-processing/Makefile
index 8632198..f7bc08d 100644
--- a/ci/compile-tests/009-failure-processing/Makefile
+++ b/ci/compile-tests/009-failure-processing/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 # This test modifies some .v files during the test. The original
diff --git a/ci/compile-tests/009-failure-processing/a1.v.orig 
b/ci/compile-tests/009-failure-processing/a1.v.orig
index 44324ec..c1409ae 100644
--- a/ci/compile-tests/009-failure-processing/a1.v.orig
+++ b/ci/compile-tests/009-failure-processing/a1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a10.v.orig 
b/ci/compile-tests/009-failure-processing/a10.v.orig
index 24800da..543bc5a 100644
--- a/ci/compile-tests/009-failure-processing/a10.v.orig
+++ b/ci/compile-tests/009-failure-processing/a10.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a2.v.orig 
b/ci/compile-tests/009-failure-processing/a2.v.orig
index 99d1ed6..332934f 100644
--- a/ci/compile-tests/009-failure-processing/a2.v.orig
+++ b/ci/compile-tests/009-failure-processing/a2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a3.v.orig 
b/ci/compile-tests/009-failure-processing/a3.v.orig
index 9e33255..b48788c 100644
--- a/ci/compile-tests/009-failure-processing/a3.v.orig
+++ b/ci/compile-tests/009-failure-processing/a3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a4.v.orig 
b/ci/compile-tests/009-failure-processing/a4.v.orig
index 379134a..3bac801 100644
--- a/ci/compile-tests/009-failure-processing/a4.v.orig
+++ b/ci/compile-tests/009-failure-processing/a4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a5.v.orig 
b/ci/compile-tests/009-failure-processing/a5.v.orig
index 8dedb2f..bfb3a5f 100644
--- a/ci/compile-tests/009-failure-processing/a5.v.orig
+++ b/ci/compile-tests/009-failure-processing/a5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a6.v.orig 
b/ci/compile-tests/009-failure-processing/a6.v.orig
index 4440045..c5832f0 100644
--- a/ci/compile-tests/009-failure-processing/a6.v.orig
+++ b/ci/compile-tests/009-failure-processing/a6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a7.v.orig 
b/ci/compile-tests/009-failure-processing/a7.v.orig
index b9db034..9f0724c 100644
--- a/ci/compile-tests/009-failure-processing/a7.v.orig
+++ b/ci/compile-tests/009-failure-processing/a7.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a8.v.orig 
b/ci/compile-tests/009-failure-processing/a8.v.orig
index 2aea7b0..bc00d9c 100644
--- a/ci/compile-tests/009-failure-processing/a8.v.orig
+++ b/ci/compile-tests/009-failure-processing/a8.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/a9.v.orig 
b/ci/compile-tests/009-failure-processing/a9.v.orig
index 6785664..fe60be5 100644
--- a/ci/compile-tests/009-failure-processing/a9.v.orig
+++ b/ci/compile-tests/009-failure-processing/a9.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b1.v.orig 
b/ci/compile-tests/009-failure-processing/b1.v.orig
index 9cb45bf..8cc99d1 100644
--- a/ci/compile-tests/009-failure-processing/b1.v.orig
+++ b/ci/compile-tests/009-failure-processing/b1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b10.v.orig 
b/ci/compile-tests/009-failure-processing/b10.v.orig
index 61f71d0..6167891 100644
--- a/ci/compile-tests/009-failure-processing/b10.v.orig
+++ b/ci/compile-tests/009-failure-processing/b10.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b2.v.orig 
b/ci/compile-tests/009-failure-processing/b2.v.orig
index 79fc08b..d6ebd0d 100644
--- a/ci/compile-tests/009-failure-processing/b2.v.orig
+++ b/ci/compile-tests/009-failure-processing/b2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b3.v.orig 
b/ci/compile-tests/009-failure-processing/b3.v.orig
index 12c118f..4e1e13d 100644
--- a/ci/compile-tests/009-failure-processing/b3.v.orig
+++ b/ci/compile-tests/009-failure-processing/b3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b4.v.orig 
b/ci/compile-tests/009-failure-processing/b4.v.orig
index 0963e1c..dbd0e3e 100644
--- a/ci/compile-tests/009-failure-processing/b4.v.orig
+++ b/ci/compile-tests/009-failure-processing/b4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b5.v.orig 
b/ci/compile-tests/009-failure-processing/b5.v.orig
index 54136bb..c995f5b 100644
--- a/ci/compile-tests/009-failure-processing/b5.v.orig
+++ b/ci/compile-tests/009-failure-processing/b5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b6.v.orig 
b/ci/compile-tests/009-failure-processing/b6.v.orig
index 2a3d88c..ecaefb0 100644
--- a/ci/compile-tests/009-failure-processing/b6.v.orig
+++ b/ci/compile-tests/009-failure-processing/b6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b7.v.orig 
b/ci/compile-tests/009-failure-processing/b7.v.orig
index 2e756cc..141454c 100644
--- a/ci/compile-tests/009-failure-processing/b7.v.orig
+++ b/ci/compile-tests/009-failure-processing/b7.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b8.v.orig 
b/ci/compile-tests/009-failure-processing/b8.v.orig
index 7b74bd9..1ceea57 100644
--- a/ci/compile-tests/009-failure-processing/b8.v.orig
+++ b/ci/compile-tests/009-failure-processing/b8.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/b9.v.orig 
b/ci/compile-tests/009-failure-processing/b9.v.orig
index b3fcc9a..81493d4 100644
--- a/ci/compile-tests/009-failure-processing/b9.v.orig
+++ b/ci/compile-tests/009-failure-processing/b9.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c1.v.orig 
b/ci/compile-tests/009-failure-processing/c1.v.orig
index e7f5e30..39d9d89 100644
--- a/ci/compile-tests/009-failure-processing/c1.v.orig
+++ b/ci/compile-tests/009-failure-processing/c1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c10.v.orig 
b/ci/compile-tests/009-failure-processing/c10.v.orig
index 285620b..0d69b23 100644
--- a/ci/compile-tests/009-failure-processing/c10.v.orig
+++ b/ci/compile-tests/009-failure-processing/c10.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c2.v.orig 
b/ci/compile-tests/009-failure-processing/c2.v.orig
index d71147c..4dfa395 100644
--- a/ci/compile-tests/009-failure-processing/c2.v.orig
+++ b/ci/compile-tests/009-failure-processing/c2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c3.v.orig 
b/ci/compile-tests/009-failure-processing/c3.v.orig
index 6b46116..af0c937 100644
--- a/ci/compile-tests/009-failure-processing/c3.v.orig
+++ b/ci/compile-tests/009-failure-processing/c3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c4.v.orig 
b/ci/compile-tests/009-failure-processing/c4.v.orig
index 9c323c3..124af3b 100644
--- a/ci/compile-tests/009-failure-processing/c4.v.orig
+++ b/ci/compile-tests/009-failure-processing/c4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c5.v.orig 
b/ci/compile-tests/009-failure-processing/c5.v.orig
index 8b9589a..16af5ca 100644
--- a/ci/compile-tests/009-failure-processing/c5.v.orig
+++ b/ci/compile-tests/009-failure-processing/c5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c6.v.orig 
b/ci/compile-tests/009-failure-processing/c6.v.orig
index 6a4322c..ca6d688 100644
--- a/ci/compile-tests/009-failure-processing/c6.v.orig
+++ b/ci/compile-tests/009-failure-processing/c6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c7.v.orig 
b/ci/compile-tests/009-failure-processing/c7.v.orig
index d67bc50..2f3d66e 100644
--- a/ci/compile-tests/009-failure-processing/c7.v.orig
+++ b/ci/compile-tests/009-failure-processing/c7.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c8.v.orig 
b/ci/compile-tests/009-failure-processing/c8.v.orig
index 9fb660d..e779802 100644
--- a/ci/compile-tests/009-failure-processing/c8.v.orig
+++ b/ci/compile-tests/009-failure-processing/c8.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/c9.v.orig 
b/ci/compile-tests/009-failure-processing/c9.v.orig
index b6da31a..e5b7218 100644
--- a/ci/compile-tests/009-failure-processing/c9.v.orig
+++ b/ci/compile-tests/009-failure-processing/c9.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d1.v.orig 
b/ci/compile-tests/009-failure-processing/d1.v.orig
index ce33709..607de61 100644
--- a/ci/compile-tests/009-failure-processing/d1.v.orig
+++ b/ci/compile-tests/009-failure-processing/d1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d10.v.orig 
b/ci/compile-tests/009-failure-processing/d10.v.orig
index 935dab5..3080e44 100644
--- a/ci/compile-tests/009-failure-processing/d10.v.orig
+++ b/ci/compile-tests/009-failure-processing/d10.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d2.v.orig 
b/ci/compile-tests/009-failure-processing/d2.v.orig
index 23d119f..26df3c8 100644
--- a/ci/compile-tests/009-failure-processing/d2.v.orig
+++ b/ci/compile-tests/009-failure-processing/d2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d3.v.orig 
b/ci/compile-tests/009-failure-processing/d3.v.orig
index decce21..c1cc13d 100644
--- a/ci/compile-tests/009-failure-processing/d3.v.orig
+++ b/ci/compile-tests/009-failure-processing/d3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d4.v.orig 
b/ci/compile-tests/009-failure-processing/d4.v.orig
index 997ee07..fe2f988 100644
--- a/ci/compile-tests/009-failure-processing/d4.v.orig
+++ b/ci/compile-tests/009-failure-processing/d4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d5.v.orig 
b/ci/compile-tests/009-failure-processing/d5.v.orig
index bbdfbc6..b70ae03 100644
--- a/ci/compile-tests/009-failure-processing/d5.v.orig
+++ b/ci/compile-tests/009-failure-processing/d5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d6.v.orig 
b/ci/compile-tests/009-failure-processing/d6.v.orig
index 44e0514..ac55358 100644
--- a/ci/compile-tests/009-failure-processing/d6.v.orig
+++ b/ci/compile-tests/009-failure-processing/d6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d7.v.orig 
b/ci/compile-tests/009-failure-processing/d7.v.orig
index aafbd48..dba452d 100644
--- a/ci/compile-tests/009-failure-processing/d7.v.orig
+++ b/ci/compile-tests/009-failure-processing/d7.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d8.v.orig 
b/ci/compile-tests/009-failure-processing/d8.v.orig
index 3c333e9..4ca53dd 100644
--- a/ci/compile-tests/009-failure-processing/d8.v.orig
+++ b/ci/compile-tests/009-failure-processing/d8.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/d9.v.orig 
b/ci/compile-tests/009-failure-processing/d9.v.orig
index 69260cf..0a2e797 100644
--- a/ci/compile-tests/009-failure-processing/d9.v.orig
+++ b/ci/compile-tests/009-failure-processing/d9.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e1.v.orig 
b/ci/compile-tests/009-failure-processing/e1.v.orig
index 05a88da..72c612b 100644
--- a/ci/compile-tests/009-failure-processing/e1.v.orig
+++ b/ci/compile-tests/009-failure-processing/e1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e10.v.orig 
b/ci/compile-tests/009-failure-processing/e10.v.orig
index 5d41b54..2727555 100644
--- a/ci/compile-tests/009-failure-processing/e10.v.orig
+++ b/ci/compile-tests/009-failure-processing/e10.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e2.v.orig 
b/ci/compile-tests/009-failure-processing/e2.v.orig
index 85d9564..d367fb6 100644
--- a/ci/compile-tests/009-failure-processing/e2.v.orig
+++ b/ci/compile-tests/009-failure-processing/e2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e3.v.orig 
b/ci/compile-tests/009-failure-processing/e3.v.orig
index 5bd8653..3dc245c 100644
--- a/ci/compile-tests/009-failure-processing/e3.v.orig
+++ b/ci/compile-tests/009-failure-processing/e3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e4.v.orig 
b/ci/compile-tests/009-failure-processing/e4.v.orig
index 02be93f..18cac3f 100644
--- a/ci/compile-tests/009-failure-processing/e4.v.orig
+++ b/ci/compile-tests/009-failure-processing/e4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e5.v.orig 
b/ci/compile-tests/009-failure-processing/e5.v.orig
index f13dda3..7a28f2e 100644
--- a/ci/compile-tests/009-failure-processing/e5.v.orig
+++ b/ci/compile-tests/009-failure-processing/e5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e6.v.orig 
b/ci/compile-tests/009-failure-processing/e6.v.orig
index bb1f999..cba4f3b 100644
--- a/ci/compile-tests/009-failure-processing/e6.v.orig
+++ b/ci/compile-tests/009-failure-processing/e6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e7.v.orig 
b/ci/compile-tests/009-failure-processing/e7.v.orig
index d5d8608..9f97729 100644
--- a/ci/compile-tests/009-failure-processing/e7.v.orig
+++ b/ci/compile-tests/009-failure-processing/e7.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e8.v.orig 
b/ci/compile-tests/009-failure-processing/e8.v.orig
index 3c9098c..ccec3b1 100644
--- a/ci/compile-tests/009-failure-processing/e8.v.orig
+++ b/ci/compile-tests/009-failure-processing/e8.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/e9.v.orig 
b/ci/compile-tests/009-failure-processing/e9.v.orig
index 3060cac..95c1b28 100644
--- a/ci/compile-tests/009-failure-processing/e9.v.orig
+++ b/ci/compile-tests/009-failure-processing/e9.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f1.v.orig 
b/ci/compile-tests/009-failure-processing/f1.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f1.v.orig
+++ b/ci/compile-tests/009-failure-processing/f1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f10.v.orig 
b/ci/compile-tests/009-failure-processing/f10.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f10.v.orig
+++ b/ci/compile-tests/009-failure-processing/f10.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f2.v.orig 
b/ci/compile-tests/009-failure-processing/f2.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f2.v.orig
+++ b/ci/compile-tests/009-failure-processing/f2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f3.v.orig 
b/ci/compile-tests/009-failure-processing/f3.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f3.v.orig
+++ b/ci/compile-tests/009-failure-processing/f3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f4.v.orig 
b/ci/compile-tests/009-failure-processing/f4.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f4.v.orig
+++ b/ci/compile-tests/009-failure-processing/f4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f5.v.orig 
b/ci/compile-tests/009-failure-processing/f5.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f5.v.orig
+++ b/ci/compile-tests/009-failure-processing/f5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f6.v.orig 
b/ci/compile-tests/009-failure-processing/f6.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f6.v.orig
+++ b/ci/compile-tests/009-failure-processing/f6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f7.v.orig 
b/ci/compile-tests/009-failure-processing/f7.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f7.v.orig
+++ b/ci/compile-tests/009-failure-processing/f7.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f8.v.orig 
b/ci/compile-tests/009-failure-processing/f8.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f8.v.orig
+++ b/ci/compile-tests/009-failure-processing/f8.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/f9.v.orig 
b/ci/compile-tests/009-failure-processing/f9.v.orig
index 690b745..60923f9 100644
--- a/ci/compile-tests/009-failure-processing/f9.v.orig
+++ b/ci/compile-tests/009-failure-processing/f9.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g1.v.orig 
b/ci/compile-tests/009-failure-processing/g1.v.orig
index cd9aba3..aeaa48f 100644
--- a/ci/compile-tests/009-failure-processing/g1.v.orig
+++ b/ci/compile-tests/009-failure-processing/g1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g10.v.orig 
b/ci/compile-tests/009-failure-processing/g10.v.orig
index e809ebc..5d10131 100644
--- a/ci/compile-tests/009-failure-processing/g10.v.orig
+++ b/ci/compile-tests/009-failure-processing/g10.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g2.v.orig 
b/ci/compile-tests/009-failure-processing/g2.v.orig
index be34de0..a1453e8 100644
--- a/ci/compile-tests/009-failure-processing/g2.v.orig
+++ b/ci/compile-tests/009-failure-processing/g2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g3.v.orig 
b/ci/compile-tests/009-failure-processing/g3.v.orig
index 666e4ce..99a3c0e 100644
--- a/ci/compile-tests/009-failure-processing/g3.v.orig
+++ b/ci/compile-tests/009-failure-processing/g3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g4.v.orig 
b/ci/compile-tests/009-failure-processing/g4.v.orig
index 5b3d6c9..0f2371e 100644
--- a/ci/compile-tests/009-failure-processing/g4.v.orig
+++ b/ci/compile-tests/009-failure-processing/g4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g5.v.orig 
b/ci/compile-tests/009-failure-processing/g5.v.orig
index 6e901f3..5acb2e2 100644
--- a/ci/compile-tests/009-failure-processing/g5.v.orig
+++ b/ci/compile-tests/009-failure-processing/g5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g6.v.orig 
b/ci/compile-tests/009-failure-processing/g6.v.orig
index 20d0375..609a221 100644
--- a/ci/compile-tests/009-failure-processing/g6.v.orig
+++ b/ci/compile-tests/009-failure-processing/g6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g7.v.orig 
b/ci/compile-tests/009-failure-processing/g7.v.orig
index bc56280..54c84dc 100644
--- a/ci/compile-tests/009-failure-processing/g7.v.orig
+++ b/ci/compile-tests/009-failure-processing/g7.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g8.v.orig 
b/ci/compile-tests/009-failure-processing/g8.v.orig
index acd04dc..d254039 100644
--- a/ci/compile-tests/009-failure-processing/g8.v.orig
+++ b/ci/compile-tests/009-failure-processing/g8.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/g9.v.orig 
b/ci/compile-tests/009-failure-processing/g9.v.orig
index f1ed88b..42e8fee 100644
--- a/ci/compile-tests/009-failure-processing/g9.v.orig
+++ b/ci/compile-tests/009-failure-processing/g9.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h1.v.orig 
b/ci/compile-tests/009-failure-processing/h1.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h1.v.orig
+++ b/ci/compile-tests/009-failure-processing/h1.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h10.v.orig 
b/ci/compile-tests/009-failure-processing/h10.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h10.v.orig
+++ b/ci/compile-tests/009-failure-processing/h10.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h2.v.orig 
b/ci/compile-tests/009-failure-processing/h2.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h2.v.orig
+++ b/ci/compile-tests/009-failure-processing/h2.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h3.v.orig 
b/ci/compile-tests/009-failure-processing/h3.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h3.v.orig
+++ b/ci/compile-tests/009-failure-processing/h3.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h4.v.orig 
b/ci/compile-tests/009-failure-processing/h4.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h4.v.orig
+++ b/ci/compile-tests/009-failure-processing/h4.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h5.v.orig 
b/ci/compile-tests/009-failure-processing/h5.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h5.v.orig
+++ b/ci/compile-tests/009-failure-processing/h5.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h6.v.orig 
b/ci/compile-tests/009-failure-processing/h6.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h6.v.orig
+++ b/ci/compile-tests/009-failure-processing/h6.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h7.v.orig 
b/ci/compile-tests/009-failure-processing/h7.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h7.v.orig
+++ b/ci/compile-tests/009-failure-processing/h7.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h8.v.orig 
b/ci/compile-tests/009-failure-processing/h8.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h8.v.orig
+++ b/ci/compile-tests/009-failure-processing/h8.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/h9.v.orig 
b/ci/compile-tests/009-failure-processing/h9.v.orig
index 7df9870..8f0b315 100644
--- a/ci/compile-tests/009-failure-processing/h9.v.orig
+++ b/ci/compile-tests/009-failure-processing/h9.v.orig
@@ -5,7 +5,7 @@
  * Authors: Hendrik Tews
  * Maintainer: Hendrik Tews <hendrik@askra.de>
  *
- * License:     GPL (GNU GENERAL PUBLIC LICENSE)
+ * SPDX-License-Identifier: GPL-3.0-or-later
  *
  *
  * This file is part of an automatic test case for parallel background
diff --git a/ci/compile-tests/009-failure-processing/runtest.el 
b/ci/compile-tests/009-failure-processing/runtest.el
index 28e04c2..1835eeb 100644
--- a/ci/compile-tests/009-failure-processing/runtest.el
+++ b/ci/compile-tests/009-failure-processing/runtest.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;;
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/compile-tests/Makefile b/ci/compile-tests/Makefile
index 32f6561..483322e 100644
--- a/ci/compile-tests/Makefile
+++ b/ci/compile-tests/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 TOPTARGETS := test clean
diff --git a/ci/compile-tests/bin/compile-test-start-delayed 
b/ci/compile-tests/bin/compile-test-start-delayed
index 7cd40de..81bfbcf 100755
--- a/ci/compile-tests/bin/compile-test-start-delayed
+++ b/ci/compile-tests/bin/compile-test-start-delayed
@@ -7,7 +7,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 #
 # See function usage for documentation.
 
diff --git a/ci/compile-tests/cct-lib.el b/ci/compile-tests/cct-lib.el
index 71343c8..7a5a427 100644
--- a/ci/compile-tests/cct-lib.el
+++ b/ci/compile-tests/cct-lib.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;; 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 
 ;;; Commentary:
diff --git a/ci/simple-tests/Makefile b/ci/simple-tests/Makefile
index dc5c8e7..95e13d3 100644
--- a/ci/simple-tests/Makefile
+++ b/ci/simple-tests/Makefile
@@ -5,7 +5,7 @@
 # Authors: Hendrik Tews
 # Maintainer: Hendrik Tews <hendrik@askra.de>
 # 
-# License:     GPL (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 TESTS:=$(wildcard test-*.el)
diff --git a/ci/simple-tests/test-coq-par-job-needs-compilation-quick.el 
b/ci/simple-tests/test-coq-par-job-needs-compilation-quick.el
index e881f12..2301809 100644
--- a/ci/simple-tests/test-coq-par-job-needs-compilation-quick.el
+++ b/ci/simple-tests/test-coq-par-job-needs-compilation-quick.el
@@ -12,7 +12,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/simple-tests/test-coqtop-unavailable.el 
b/ci/simple-tests/test-coqtop-unavailable.el
index 8d16bf4..6628238 100644
--- a/ci/simple-tests/test-coqtop-unavailable.el
+++ b/ci/simple-tests/test-coqtop-unavailable.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;; 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/simple-tests/test-omit-proofs.el 
b/ci/simple-tests/test-omit-proofs.el
index 20170e1..64dcb64 100644
--- a/ci/simple-tests/test-omit-proofs.el
+++ b/ci/simple-tests/test-omit-proofs.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;; 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/simple-tests/test-prelude-correct.el 
b/ci/simple-tests/test-prelude-correct.el
index 84c0625..77676d2 100644
--- a/ci/simple-tests/test-prelude-correct.el
+++ b/ci/simple-tests/test-prelude-correct.el
@@ -5,7 +5,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 ;; 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/ci/test-indent/Makefile b/ci/test-indent/Makefile
index 5aa999a..ff733d4 100644
--- a/ci/test-indent/Makefile
+++ b/ci/test-indent/Makefile
@@ -5,7 +5,7 @@
 # Authors: Pierre Courtieu
 # Maintainer: Pierre Courtieu <Pierre.Courtieu@cnam.fr>
 # 
-# License:     GPL2+ (GNU GENERAL PUBLIC LICENSE)
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 TESTS:=$(wildcard indent-*.v)
 INDENTED:=$(subst indent-,indented_indent-, $(TESTS))
diff --git a/coq/coq-abbrev.el b/coq/coq-abbrev.el
index 4d0aded..14658c5 100644
--- a/coq/coq-abbrev.el
+++ b/coq/coq-abbrev.el
@@ -12,7 +12,7 @@
 ;; Authors: Healfdene Goguen, Pierre Courtieu
 ;; Maintainer: Pierre Courtieu <Pierre.Courtieu@cnam.fr>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/coq/coq-compile-common.el b/coq/coq-compile-common.el
index 8d836b6..1055c74 100644
--- a/coq/coq-compile-common.el
+++ b/coq/coq-compile-common.el
@@ -12,7 +12,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/coq/coq-db.el b/coq/coq-db.el
index 4677387..6e79e95 100644
--- a/coq/coq-db.el
+++ b/coq/coq-db.el
@@ -11,7 +11,7 @@
 
 ;; Author: Pierre Courtieu <courtieu@lri.fr>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/coq/coq-diffs.el b/coq/coq-diffs.el
index f623324..198a09f 100644
--- a/coq/coq-diffs.el
+++ b/coq/coq-diffs.el
@@ -6,7 +6,7 @@
 
 ;; Author:      Jim Fehrle <jim.fehrle@gmail.com>
 
-;; License:  BSD-3 (3-Clause BSD License)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;; 
diff --git a/coq/coq-mode.el b/coq/coq-mode.el
index 9ef7671..16140ca 100644
--- a/coq/coq-mode.el
+++ b/coq/coq-mode.el
@@ -12,7 +12,7 @@
 ;; Authors: Healfdene Goguen, Pierre Courtieu
 ;; Maintainer: Pierre Courtieu <Pierre.Courtieu@cnam.fr>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/coq/coq-par-compile.el b/coq/coq-par-compile.el
index a7a3ae6..ecf7545 100644
--- a/coq/coq-par-compile.el
+++ b/coq/coq-par-compile.el
@@ -12,7 +12,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/coq/coq-seq-compile.el b/coq/coq-seq-compile.el
index d15a87e..af0c133 100644
--- a/coq/coq-seq-compile.el
+++ b/coq/coq-seq-compile.el
@@ -12,7 +12,7 @@
 ;; Authors: Hendrik Tews
 ;; Maintainer: Hendrik Tews <hendrik@askra.de>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/coq/coq-smie.el b/coq/coq-smie.el
index 708c793..00c1fd5 100644
--- a/coq/coq-smie.el
+++ b/coq/coq-smie.el
@@ -13,7 +13,7 @@
 ;;          Stefan Monnier
 ;; Maintainer: Pierre Courtieu <Pierre.Courtieu@cnam.fr>
 
-;; License:     GPLv3+ (GNU GENERAL PUBLIC LICENSE version 3 or later)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 
diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el
index 0ceb46f..5017a6e 100644
--- a/coq/coq-syntax.el
+++ b/coq/coq-syntax.el
@@ -12,7 +12,7 @@
 ;; Authors: Thomas Kleymann, Healfdene Goguen, Pierre Courtieu
 ;; Maintainer: Pierre Courtieu <Pierre.Courtieu@cnam.fr>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/coq/coq-system.el b/coq/coq-system.el
index e7041db..d32629f 100644
--- a/coq/coq-system.el
+++ b/coq/coq-system.el
@@ -12,7 +12,7 @@
 ;; Authors: Hendrik Tews, Pierre Courtieu
 ;; Maintainer: Pierre.Courtieu<Pierre.Courtieu@cnam.fr>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/coq/coq.el b/coq/coq.el
index 99dbac8..93cc934 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -12,7 +12,7 @@
 ;; Authors: Healfdene Goguen, Pierre Courtieu
 ;; Maintainer: Pierre Courtieu <Pierre.Courtieu@cnam.fr>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/doc/PG-adapting.texi b/doc/PG-adapting.texi
index 4e0ec65..1dda289 100644
--- a/doc/PG-adapting.texi
+++ b/doc/PG-adapting.texi
@@ -117,8 +117,8 @@ preserved on all copies.
 This manual documents Proof General, Version @value{version}, for use
 GNU Emacs @value{emacsversion} or (as far as possible) later versions.
 Proof General is distributed under the terms of the GNU General Public
-License (GPL); please check the accompanying file @file{COPYING} for
-more details.
+License (GPL), version 3 or later;
+please check the accompanying file @file{COPYING} for more details.
 
 @sp 1
 
@@ -139,7 +139,7 @@ of @b{Proof General}, a generic Emacs interface for proof 
assistants.
 
 Proof General @value{version} has been tested with GNU Emacs
 @value{emacsversion}.  It is supplied ready customized for the proof
-assistants Coq, Lego, Isabelle, and HOL.
+assistants Coq, EasyCrypt, and PhoX.
 
 This manual contains information for customizing to new proof
 assistants; see the user manual for details about how to use
@@ -1601,7 +1601,7 @@ input, then newlines can be retained in the input.
 
 @c TEXI DOCSTRING MAGIC: proof-shell-insert-hook
 @defvar proof-shell-insert-hook 
-Hooks run by @samp{@code{proof-shell-insert}} before inserting a command.@*
+Hook run by @samp{@code{proof-shell-insert}} before inserting a command.@*
 Can be used to configure the proof assistant to the interface in
 various ways -- for example, to observe or alter the commands sent to
 the prover, or to sneak in extra commands to configure the prover.
@@ -1634,9 +1634,9 @@ prompts than expected, things will break!  Extending the 
variable
 stripped of carriage returns before being sent.
 
 Example uses:
-@var{lego} uses this hook for setting the pretty printer width if
+Lego used this hook for setting the pretty printer width if
 the window width has changed;
-Plastic uses it to remove literate-style markup from @samp{string}.
+Plastic used it to remove literate-style markup from @samp{string}.
 
 See also @samp{@code{proof-script-preprocess}} which can munge text when
 it is added to the queue of commands.
@@ -2012,9 +2012,7 @@ quote characters must be escaped.  The setting
   '(("@var{\\\\}" . "@var{\\\\}")
     ("\"" . "\\\""))
 @end lisp
-achieves this.   This does not apply to @var{lego}, which does not
-need backslash escapes and does not allow filenames with
-quote characters.
+achieves this.
 
 This setting is used inside the function @samp{@code{proof-format-filename}}.
 @end defvar
@@ -3307,7 +3305,7 @@ in the @code{proof-assistants} setting.
 @c TEXI DOCSTRING MAGIC: proof-assistants
 @defvar proof-assistants 
 Choice of proof assistants to use with Proof General.@*
-A list of symbols chosen from: @samp{isar} @samp{coq} @samp{easycrypt} 
@samp{phox} @samp{pgshell} @samp{pgocaml} @samp{pghaskell}.
+A list of symbols chosen from: @samp{coq} @samp{easycrypt} @samp{phox} 
@samp{pgshell} @samp{pgocaml} @samp{pghaskell}.
 If nil, the default will be ALL available proof assistants.
 
 Each proof assistant defines its own instance of Proof General,
@@ -3319,7 +3317,7 @@ only select the proof assistants you (or your site) may 
need.
 You can select which proof assistants you want by setting this
 variable before @samp{proof-site.el} is loaded, or by setting
 the environment variable @samp{PROOFGENERAL_ASSISTANTS} to the
-symbols you want, for example "lego isa".  Or you can
+symbols you want, for example "coq easycrypt".  Or you can
 edit the file @samp{proof-site.el} itself.
 
 Note: to change proof assistant, you must start a new Emacs session.
@@ -3938,7 +3936,7 @@ Choice of syntax tree encoding for terms.
 
 If nil, prover is expected to make no optimisations.
 If non-nil, the pretty printer of the prover only reports local changes.
-For @var{lego} 1.3.1 use nil, for Coq 6.2, use t.
+For Coq 6.2, use t.
 @end defvar
 
 
@@ -4016,7 +4014,7 @@ It is up to the proof assistant how much context is 
cleared: for
 example, theories already loaded may be "cached" in some way,
 so that loading them the next time round only performs a re-linking
 operation, not full re-processing.  (One way of caching is via
-object files, used by Lego and Coq).
+object files, used by Coq).
 @end deffn
 
 @c
@@ -4488,7 +4486,7 @@ This is a note by David Aspinall about proof by pointing 
and similar
 features.
 
 Proof General already supports proof by pointing, and experimental
-support is provided in LEGO.  We would like to extend this support to
+support was provided in LEGO.  We would like to extend this support to
 other proof assistants.  Unfortunately, proof by pointing requires
 rather heavy support from the proof assistant.  There are two aspects to
 the support:
diff --git a/doc/ProofGeneral.texi b/doc/ProofGeneral.texi
index b55b12d..f182454 100644
--- a/doc/ProofGeneral.texi
+++ b/doc/ProofGeneral.texi
@@ -121,7 +121,8 @@ preserved on all copies.
 This manual documents Proof General, Version @value{version}, for use
 with GNU Emacs @value{emacsversion} or
 later versions (subject to Emacs API changes).  Proof General is
-distributed under the terms of the GNU General Public License (GPL);
+distributed under the terms of the GNU General Public License (GPL),
+version 3 or later;
 please check the accompanying file @file{COPYING} for more details.
 
 @sp 1
@@ -158,10 +159,7 @@ assistants Coq, EasyCrypt, and PhoX.
 * Graphical Proof-Tree Visualization::
 * Customizing Proof General::   
 * Hints and Tips::
-* LEGO Proof General::          
 * Coq Proof General::           
-* Isabelle Proof General::    
-* HOL Light Proof General::
 * EasyCrypt Proof General::
 * Shell Proof General::
 @c * PhoX Proof General::
@@ -194,6 +192,7 @@ other documentation, system downloads, etc.
 
 
 @menu
+* News for Version 4.5::
 * News for Version 4.4::
 * News for Version 4.3::
 * News for Version 4.2::
@@ -203,6 +202,16 @@ other documentation, system downloads, etc.
 * Credits::                     
 @end menu
 
+@node News for Version 4.5
+@unnumberedsec News for Version 4.5
+@cindex news
+
+Proof-General is now distributed under the GPLv3+ license.
+
+The old code for the support of the following systems have been
+removed: Twelf, CCC, Lego, Hol-Light, ACL2, Plastic, Lambda-Clam,
+Isabelle, HOL98.
+
 @node News for Version 4.4
 @unnumberedsec News for Version 4.4
 @cindex news
@@ -302,7 +311,6 @@ webpage}.  Help us to help you organize your proofs!
 
 @node Credits
 @unnumberedsec Credits
-@cindex @code{lego-mode}
 @cindex maintenance
 
 The original developers of the basis of Proof General were:
@@ -508,24 +516,15 @@ script file for your proof assistant, for example:
 
 @multitable @columnfractions .35 .3 .35
 @item       @b{Prover}    @tab @b{Extensions} @tab @b{Mode}
-@item       LEGO          @tab @file{.l}      @tab @code{lego-mode}
 @item       Coq           @tab @file{.v}      @tab @code{coq-mode}
-@item       Isabelle      @tab @file{.thy}    @tab @code{isar-mode}
 @item       Phox          @tab @file{.phx}    @tab @code{phox-mode}
-@item       HOL98         @tab @file{.sml}    @tab @code{hol98-mode}
-@item       HOL Light     @tab @file{.ml}     @tab @code{hol-light-mode}
-@item       ACL2          @tab @file{.acl2}   @tab @code{acl2-mode}
-@item       Twelf         @tab @file{.elf}    @tab @code{twelf-mode}
-@item       Plastic       @tab @file{.lf}     @tab @code{plastic-mode}
-@item       Lambda-CLAM   @tab @file{.lcm}    @tab @code{lclam-mode}
-@item       CCC           @tab @file{.ccc}    @tab @code{ccc-mode}
 @item       PG-Shell      @tab @file{.pgsh}   @tab @code{pgshell-mode}
 @item       EasyCrypt     @tab @file{.ec}     @tab @code{easycrypt-mode}
 @end multitable
 (the exact list of Proof Assistants supported may vary according to the
 version of Proof General and its local configuration).  You can also
-invoke the mode command directly, e.g., type @kbd{M-x lego-mode}, to
-turn a buffer into a lego script buffer.
+invoke the mode command directly, e.g., type @kbd{M-x coq-mode}, to
+turn a buffer into a Coq script buffer.
 
 You'll find commands to process the proof script are available from the
 toolbar, menus, and keyboard.  Type @kbd{C-h m} to get a list of the
@@ -660,24 +659,11 @@ proof assistants, including these:
 @c FLAG VERSIONS HERE
 @itemize @bullet
 @item 
-@b{LEGO Proof General} for LEGO Version 1.3.1@*
-@xref{LEGO Proof General}, for more details.
-@item 
 @b{Coq Proof General} for Coq Version 8.2@*
 @xref{Coq Proof General}, for more details.
-@item 
-@b{Isabelle Proof General} for Isabelle2009-2@*
-@xref{Isabelle Proof General}, and documentation supplied with
-Isabelle for more details.
 @c @item
 @c @b{PhoX Proof General} for PhoX 0.8X@*
 @c @xref{PhoX Proof General}, for more details.
-@c @item
-@c @b{HOL Proof General} for HOL98 (HOL4)@*
-@c @xref{HOL Proof General}, for more details.
-@item
-@b{HOL Light Proof General} for HOL Light@*
-@xref{HOL Light Proof General}, for more details.
 @item
 @b{EasyCrypt Proof General} for EasyCrypt@*
 @xref{EasyCrypt Proof General}, for mode details.
@@ -703,7 +689,7 @@ standard instances documented in this manual are listed 
above.
 
 Note that there is some variation between the features supported by
 different instances of Proof General.  The main variation is proof by
-pointing, which is only supported in LEGO at the moment.  For advanced
+pointing, which has been supported only in LEGO so far.  For advanced
 features like this, some extensions to the output routines of the proof
 assistant are required, typically.  If you like Proof General, @b{please
 help us by asking the implementors of your favourite proof assistant to
@@ -798,6 +784,7 @@ then describe the concepts and functions in more detail.
 * Interrupting during trace output::
 @end menu
 
+@c FIXME: Rewrite this to use Coq since Isabelle support was removed.
 @node Walkthrough example in Isabelle
 @section Walkthrough example in Isabelle
 
@@ -1281,9 +1268,9 @@ file and a @code{.thy} theory file which defines its 
theory.
 If you have a partly processed scripting buffer and use @kbd{C-c C-s},
 or you attempt to use script processing in a new buffer, Proof General
 will ask you if you want to retract what has been proved so far,
-@code{Scripting incomplete in buffer myproof.l, retract?}
+@code{Scripting incomplete in buffer myproof.v, retract?}
 or if you want to process the remainder of the active buffer, 
-@code{Completely process buffer myproof.l instead?}
+@code{Completely process buffer myproof.v instead?}
 before you can start scripting in a new buffer.  If you refuse to do
 either, Proof General will give an error message: 
 @code{Cannot have more than one active scripting buffer!}.
@@ -1405,7 +1392,7 @@ Set point to end of command at point.
 
 @vindex proof-terminal-string
 The variable @code{proof-terminal-string} is a prover-specific string
-to terminate proof commands.  LEGO and Isabelle use a semicolon,
+to terminate proof commands.  LEGO and Isabelle used a semicolon,
 @samp{;}. Coq employs a full-stop @samp{.}.
 
 @c TEXI DOCSTRING MAGIC: proof-goto-end-of-locked
@@ -1481,7 +1468,7 @@ design, by allowing successive assertion commands without 
complaining.}
 
 The last command, @code{proof-electric-terminator-toggle}, is triggered
 using the character which terminates proof commands for your proof
-assistant's script language.  For LEGO and Isabelle, use @kbd{C-c ;},
+assistant's script language.  LEGO and Isabelle used @kbd{C-c ;},
 for Coq, use @kbd{C-c .}.  This not really a script processing
 command. Instead, if enabled, it causes subsequent key presses of
 @kbd{;} or @kbd{.} to automatically activate
@@ -1797,7 +1784,7 @@ It is up to the proof assistant how much context is 
cleared: for
 example, theories already loaded may be "cached" in some way,
 so that loading them the next time round only performs a re-linking
 operation, not full re-processing.  (One way of caching is via
-object files, used by Lego and Coq).
+object files, used by Coq).
 @end deffn
 
 
@@ -2119,8 +2106,8 @@ Basic modularity in large proof developments can be 
achieved by
 splitting proof scripts across various files. Let's assume that you are
 in the middle of a proof development. You are working on a soundness
 proof of Hoare Logic in a file called@footnote{The suffix may depend of
-the specific proof assistant you are using e.g, LEGO's proof script
-files have to end with @file{.l}.} @file{HSound.l}. It
+the specific proof assistant you are using e.g, Coq's proof script
+files have to end with @file{.v}.} @file{HSound.v}. It
 depends on a number of other files which develop underlying
 concepts e.g. syntax and semantics of expressions, assertions,
 imperative programs. You notice that the current lemma is too difficult
@@ -2129,11 +2116,11 @@ about determinism of the programming language. Or 
perhaps a previous
 definition is too cumbersome or even wrong.
 
 At this stage, you would like to visit the appropriate file, say
-@file{sos.l} and retract to where changes are required. Then, using
+@file{sos.v} and retract to where changes are required. Then, using
 script management, you want to develop some more basic theory in
-@file{sos.l}. Once this task has been completed (possibly involving
+@file{sos.v}. Once this task has been completed (possibly involving
 retraction across even earlier files) and the new development has been
-asserted, you want to switch back to @file{HSound.l} and replay to the
+asserted, you want to switch back to @file{HSound.v} and replay to the
 point you got stuck previously.
 
 Some hours (or days) later you have completed the soundness proof and
@@ -2154,7 +2141,7 @@ or retract the current script buffer.
 Proof General tries to be aware of all files that the proof assistant
 has processed or is currently processing.  In the best case, it relies
 on the proof assistant explicitly telling it whenever it processes a new
-file which corresponds@footnote{For example, LEGO generates additional
+file which corresponds@footnote{For example, LEGO generated additional
 compiled (optimised) proof script files for efficiency.} to a file
 containing a proof script.
 
@@ -2198,16 +2185,6 @@ you are back on track.
 
 
 
-@c only true for LEGO!
-@c If the proof assistant is not happy with the script and
-@c complains with an error message, the buffer will still be marked as
-@c having been completely processed. Sorry. You need to visit the
-@c troublesome file, retract (which will always retract to the beginning of 
-@c the file) and debug the problem e.g., by asserting all of the buffer
-@c under the supervision of Proof General, see @ref{Script processing
-@c commands}. 
-
-
 @node Retracting across files
 @section Retracting across files
 @cindex Retraction
@@ -2506,6 +2483,7 @@ file @code{@i{PA}-unicode-tokens.el}, or customize the 
main
 variables it contains, for example @code{@i{PA}-token-name-alist} and 
 @code{@i{PA}-shortcut-alist}. 
 
+@c FIXME: Isabelle support was removed.
 E.g., for Isabelle 
 @example
   M-x customize-variable isar-token-name-alist RET
@@ -2828,9 +2806,7 @@ and @code{etags}.
 
 @node Syntax highlighting
 @section Syntax highlighting
-@vindex lego-mode-hooks
 @vindex coq-mode-hooks
-@vindex isa-mode-hooks
 @cindex font lock 
 @cindex colour
 @c Proof General specifics  
@@ -2994,8 +2970,8 @@ through all the files with one command.  Recording the 
function names
 and positions makes possible the @kbd{M-.} command which finds the
 definition of a function by looking up which of the files it is in.
 
-Some instantiations of Proof General (currently LEGO and Coq) are
-supplied with external programs (@file{legotags} and @file{coqtags}) for
+Some instantiations of Proof General (currently Coq) are
+supplied with external programs (@file{coqtags}) for
 making tags tables.  For example, invoking @samp{coqtags *.v} produces a
 file @file{TAGS} for all files @samp{*.v} in the current
 directory. Invoking @samp{coqtags `find . -name \*.v`} produces a file
@@ -3040,7 +3016,7 @@ Add completions from the current tags table.
 This chapter describes what you can do from inside the goals buffer,
 providing support for these features exists for your proof assistant.
 
-As of Proof General 4.0, this support only exists for LEGO and
+As of Proof General 4.4, this support has existed only for LEGO and
 proof-by-pointing functionality has been temporarily removed from the
 interface.  If you would like to see subterm activation support for
 Proof General in another proof assistant, please petition the developers
@@ -3824,8 +3800,8 @@ For example,
 @lisp
    ssh bigjobs
 @end lisp
-Would cause Proof General to issue the command @samp{ssh bigjobs isabelle}
-to start Isabelle remotely on our large compute server called @samp{bigjobs}.
+Would cause Proof General to issue the command @samp{ssh bigjobs coqtop}
+to start Coq remotely on our large compute server called @samp{bigjobs}.
 
 The protocol used should be configured so that no user interaction
 (passwords, or whatever) is required to get going.  For proper
@@ -3993,8 +3969,8 @@ and save these variables, saving them may have no 
practical effect
 because the default settings are mostly hard-wired into the proof
 assistant code.  Ones we expect may need changing appear as proof
 assistant specific configurations.  For example,
-@code{proof-assistant-home-page} is set in the LEGO code from the value
-of the customization setting @code{lego-www-home-page}.  At present
+@code{proof-assistant-home-page} is set in the Coq code from the value
+of the customization setting @code{coq-www-home-page}.  At present
 there is no easy way to save changes to other configuration variables
 across sessions, other than by editing the source code.  (In future
 versions of Proof General, we plan to make all configuration
@@ -4051,8 +4027,8 @@ code like this to your @file{.emacs} file:
 
 This lisp fragment adds bindings for every buffer in proof script
 mode (the Emacs keymap is called @code{proof-mode-map}).  To just
-affect one prover, use a keymap name like @code{isar-mode-map} and
-evaluate after the library @code{isar} has been loaded.
+affect one prover, use a keymap name like @code{coq-mode-map} and
+evaluate after the library @code{coq} has been loaded.
 
 To find the names of the functions you may want to bind, look in this
 manual, or query current bindings interactively with @kbd{C-h k}.  This
@@ -4189,107 +4165,6 @@ mode you can expand an abbreviation by pressing 
@kbd{C-x '}
 
 @c =================================================================
 @c
-@c  CHAPTER: LEGO Proof General
-@c 
-@node LEGO Proof General
-@chapter LEGO Proof General
-@cindex LEGO Proof General
-
-LEGO proof script mode is a mode derived from proof script mode for
-editing LEGO scripts. An important convention is that proof script
-buffers @emph{must} start with a module declaration. If the proof script
-buffer's file name is @file{fermat.l}, then it must commence with a
-declaration of the form
-
-@lisp
-Module fermat;
-@end lisp
-
-If, in the development of the module @samp{fermat}, you require material
-from other module e.g., @samp{lib_nat} and @samp{galois}, you need to
-specify this dependency as part of the module declaration:
-
-@lisp
-Module fermat Import lib_nat galois;
-@end lisp
-
-No need to worry too much about efficiency. When you retract back to a
-module declaration to add a new import item, LEGO does not actually
-retract the previously imported modules. Therefore, reasserting the
-extended module declaration really only processes the newly imported
-modules.
-
-Using the LEGO Proof General, you never ever need to use administrative
-LEGO commands such as @samp{Forget}, @samp{ForgetMark}, @samp{KillRef},
-@samp{Load}, @samp{Make}, @samp{Reload} and @samp{Undo} again
-@footnote{And please, don't even think of including those in your LEGO
-proof script!}. 
-
-@menu
-* LEGO specific commands::      
-* LEGO tags::                   
-* LEGO customizations::         
-@end menu
-
-
-@node LEGO specific commands
-@section LEGO specific commands
-
-In addition to the commands provided by the generic Proof General (as
-discussed in the previous sections) the LEGO Proof General provides a
-few extensions. In proof scripts, there are some abbreviations for
-common commands:
-
-@kindex C-c C-a C-i
-@kindex C-c C-a C-I
-@kindex C-c C-a C-R
-@table @kbd
-@item C-c C-a C-i   
-intros
-@item C-c C-a C-I   
-Intros
-@item C-c C-a C-R   
-Refine
-@end table
-
-@node LEGO tags
-@section LEGO tags
-
-You
-might want to ask your local system administrator to tag the directories
-@file{lib_Prop}, @file{lib_Type} and @file{lib_TYPE} of the LEGO
-library. See @ref{Support for tags}, for further details on tags.
-
-
-
-@node LEGO customizations
-@section LEGO customizations
-
-We refer to chapter @ref{Customizing Proof General}, for an introduction
-to the customisation mechanism. In addition to customizations at the
-generic level, for LEGO you can also customize:
-
-@defopt lego-tags 
-The directory of the @var{tags} table for the @var{lego} library
-
-The default value is @code{"/usr/lib/lego/lib_Type/"}.
-@end defopt
-
-@defvar lego-www-home-page 
-Lego home page URL.
-@end defvar
-
-@c We don't worry about the following for now. These are too obscure.
-@c lego-indent
-@c lego-test-all-name
-
-@c We also don't document any of the internal variables which have been
-@c set to configure the generic Proof General and which the user should
-@c not tamper with
-
-
-@c =================================================================
-@c
 @c  CHAPTER: Coq Proof General
 @c
 @node Coq Proof General
@@ -5449,323 +5324,6 @@ with non-@code{Bg} faces.
 
 @c =================================================================
 @c
-@c  CHAPTER: Isabelle Proof General
-@c
-@node Isabelle Proof General
-@chapter Isabelle Proof General
-@cindex Isabelle Proof General
-
-Isabelle Proof General supports major generic features of Proof General,
-including integration with Isabelle's theory loader for proper automatic
-multiple file handling.  
-@comment Support for tags and proof-by-pointing is missing.
-
-Isabelle provides its own way to invoke Proof General via the
-@code{isabelle} command.  Running @code{isabelle emacs} starts an Emacs
-session with Isabelle Proof General.  The defaults may be changed by
-editing the Isabelle settings, see the Isabelle documentation for
-details.
-
-Proof General for Isabelle manages Isar @file{.thy} files.  Proof
-General provides reliable control over incremental execution of the
-text.
-
-@menu
-* Choosing logic and starting isabelle::
-* Isabelle commands::
-* Isabelle settings::
-* Isabelle customizations::
-@end menu
-
-@node Choosing logic and starting isabelle
-@section Choosing logic and starting isabelle
-@cindex Isabelle logic
-
-When you load an Isabelle theory file into Proof General, you may be
-prompted for the path to the program @code{isabelle} if it is not on the
-system @code{PATH} already.  This is used to generate further
-information for invoking Isabelle, in particular, the list of available
-logics.
-
-The Isabelle menu offers an easy way to select the invoked object logic.
-If you look at the menu:
-@lisp
-        Isabelle -> Logics -> 
-@end lisp 
-you should see the list of logics available to Isabelle.  This menu is
-generated from the output of the command @code{isabelle findlogics}.
-(Similarly, the documentation menu is partly generated from
-@code{isabelle doc}).  Instead of the menu, you can use the
-keyboard command @code{isabelle-chose-logic} to choose from the list.
-
-The logics list is refreshed dynamically so you can select any newly
-built heap images in the same Emacs session.  However, notice that the
-choices are greyed out while Isabelle is actually running --- you can
-only switch to a new logic if you first exit Isabelle (similarly to
-Proof General, Isabelle operates with only one logic at a time).
-
-Another way to set the logic before Isabelle is launched is using an
-Emacs local variable setting inside a comment at the top of the file,
-see the documentation of @code{isabelle-chosen-logic} below.
-
-In case you do not have the @code{isabelle} program available or want to
-override its behaviour, you may set the variable
-@code{isabelle-program-name-override} to define the name of the
-executable used to start Isabelle.  The standard options are and 
-logic name are still appended.  
-@c in fact, we also have ISABELLE_OPTIONS and PROOFGENERAL_LOGIC,
-@c but lets not mention these.
-
-
-@c TEXI DOCSTRING MAGIC: isabelle-program-name-override
-@defopt isabelle-program-name-override 
-Name of executable program to run Isabelle.
-
-You can set customize this in case the automatic settings
-mechanism does not work for you, perhaps because isabelle
-is not on your path, or you are running it remotely.
-
-The logic image name is tagged onto the end.
-
-The default value is @code{nil}.
-@end defopt
-@c TEXI DOCSTRING MAGIC: isabelle-chosen-logic
-@defopt isabelle-chosen-logic 
-Choice of logic to use with Isabelle.@*
-If non-nil, added onto the Isabelle command line for invoking Isabelle.
-
-You can set this as a file local variable, using a special comment
-at the top of your theory file, like this:
-@lisp
-   (* -*- @code{isabelle-chosen-logic}: "ZF" -*- *)
-@end lisp
-
-The default value is @code{nil}.
-@end defopt
-@c TEXI DOCSTRING MAGIC: isabelle-choose-logic
-@deffn Command isabelle-choose-logic logic
-Adjust isabelle-prog-name and @code{proof-prog-name} for running @var{logic}.
-@end deffn
-@node Isabelle commands
-@section Isabelle commands
-@cindex Isabelle commands
-
-
-@kindex C-c C-a r
-@kindex C-c C-a C-q
-@kindex C-c C-a C-d
-@kindex C-c C-a C-p
-@kindex C-c C-a h A
-@kindex C-c C-a h C
-@kindex C-c C-a h I
-@kindex C-c C-a h S
-@kindex C-c C-a h T
-@kindex C-c C-a h a
-@kindex C-c C-a h b
-@kindex C-c C-a h c
-@kindex C-c C-a h f
-@kindex C-c C-a h i
-@kindex C-c C-a h m
-@kindex C-c C-a h o
-@kindex C-c C-a h t
-@kindex C-c C-a C-s
-@kindex C-c C-a C-m
-@kindex C-c C-a C-f
-@kindex C-c C-f
-
-The Isabelle instance of Proof General supplies several specific
-help key bindings; these functions are offered within the prover help
-menu as well.
-
-@table @kbd
-@item C-c C-a r
-Invokes Isar command @code{refute} on the current subgoal.  Only available in 
HOL
-and derived logics.
-@item C-c C-a C-q
-Invokes Isar command @code{quickcheck} on the current subgoal.
-@item C-c C-a C-d
-Displays a draft document of the current theory.
-@item C-c C-a C-p
-Prints a draft document of the current theory.
-@item C-c C-a h A
-Shows available antiquotation commands and options.
-@item C-c C-a h C
-Shows the current Classical Reasoner context.
-@item C-c C-a h I
-Shows the current set of induct/cases rules.
-@item C-c C-a h S
-Shows the current Simplifier context.
-@item C-c C-a h T
-Shows the current set of transitivity rules (for calculational reasoning).
-@item C-c C-a h a
-Shows attributes available in current theory context.
-@item C-c C-a h b
-Shows all local term bindings.
-@item C-c C-a h c
-Shows all named local contexts (cases).
-@item C-c C-a h f
-Shows all local facts.
-@item C-c C-a h i
-Shows inner syntax of the current theory context (for types and terms).
-@item C-c C-a h m
-Shows proof methods available in current theory context.
-@item C-c C-a h o
-Shows all available commands of Isabelle's outer syntax.
-@item C-c C-a h t
-Shows theorems stored in the current theory node.
-@item C-c C-a C-s
-Invoke sledgehammer on first subgoal.
-@item C-c C-a C-m 
-Find theorems containing given arguments (prompt in minibuffer).
-Invokes the @code{thms_containing} command.  Arguments are
-separated by white space as usual in Isar.
-@item C-c C-a C-f 
-Find theorems containing (argument in form)
-@item C-c C-f
-Find theorems: either of the above.  
-@end table
-
-@comment da: this isn't a very good way!!
-@comment it may override settings for other provers, or have no effect, I 
think!
-@comment we should introduce specific Isar setting.
-@c You can customize the default behaviour of the toolbar or
-@c menu item for find theorems by
-@c setting @code{proof-find-theorems-command} 
-@c to 
-@c @code{isar-find-theorems-minibuffer} or
-@c @code{isar-find-theorems-form}.  The setting
-@c can be customized on the menu:
-@c @example
-@c  Proof-General -> Advanced -> Internals -> Prover Config
-@c @end example
-
-
-@kindex C-c C-a b
-@kindex C-c C-a C-b
-@kindex C-c C-a C-u
-@kindex C-c C-a C-l
-@kindex C-c C-a u
-@kindex C-c C-a l
-@kindex C-c C-a C-i
-@kindex C-c C-a C-r
-@kindex C-c C-a C-a
-
-The following shortcuts insert control sequences into the text,
-modifying the appearance of individual symbols (single letters,
-mathematical entities etc.); the Tokens package will provide immediate
-visual feedback.
-
-@table @kbd
-@item C-c C-a C-b
-Inserts "\<^bold>" (bold character)
-@item C-c C-a C-c
-Inserts "\<^loc>" (``local'' control)
-@item C-c C-a C-u
-Inserts "\<^sup>"  (superscript character)
-@item C-c C-a C-l
-Inserts "\<^sub>" (subscript character)
-@item C-c C-a u
-Inserts "\<^bsup> \<^esup>"  (superscript string)
-@item C-c C-a l
-Inserts "\<^bsub> \<^esub>"  (subscript string)
-@item C-c C-a C-i
-Inserts "\<^isub>"  (identifier subscript letter)
-@item C-c C-a C-r
-Inserts "\<^raw:>"  (raw LaTeX text)
-@item C-c C-a C-a
-Inserts "@@@{text ""@}"  (anti-quotation).
-@item C-c C-a C-x
-Inserts "ML @{* *@}"  (inline ML code).
-@end table
-
-Command termination via `@code{;}' is an optional feature of Isar
-syntax.  Neither Isabelle nor Proof General require semicolons to
-do their job.  The following command allows to get rid of command
-terminators in existing texts.
-
-@c TEXI DOCSTRING MAGIC: isar-strip-terminators
-@deffn Command isar-strip-terminators 
-Remove explicit Isabelle/Isar command terminators @samp{;} from the buffer.
-@end deffn
-
-
-@node Isabelle settings
-@section Isabelle settings
-
-The Isabelle menu also contains a @code{Settings} submenu, which
-allows you to configure things such as the behaviour of Isabelle's term
-pretty printer (display of types, sorts, etc).  Note that you won't
-see this sub-menu until Isabelle has been started, because it is
-generated by Isabelle itself.  Proof General, on the other hand, is
-responsible for recording any settings that are configured when you
-select @code{Isabelle -> Settings -> Save Settings}.  They are stored
-along with the other Emacs customization settings.
-
-
-
-@node Isabelle customizations
-@section Isabelle customizations
-@cindex Isabelle customizations
-
-Here are some of the other user options specific to Isabelle.  You can
-set these as usual with the customization mechanism.
-
-@c TEXI DOCSTRING MAGIC: isabelle-web-page
-@defvar isabelle-web-page 
-URL of web page for Isabelle.
-@end defvar
-
-
-
-
-
-@c FIXME todo: theorem dependencies
-
-
-@c =================================================================
-@c
-@c  CHAPTER: HOL Light Proof General
-@c
-@node HOL Light Proof General
-@chapter HOL Light Proof General
-@cindex HOL Light Proof General
-
-HOL Light Proof General is a "technology demonstration" of Proof General
-for HOL Light.  This means that only a basic instantiation has been
-provided, and that it is not yet supported as a maintained instantiation
-of Proof General.
-
-HOL Light Proof General has basic script management support, with a
-little bit of decoration of scripts and output.  It does not rely on a
-modified version of HOL Light, so the pattern matching may be fragile in
-certain cases.  
-
-@c Support for multiple files deduces dependencies
-@c automatically, so there is no interaction with the HOL make system yet.
-
-See the @file{example.ml} file for a demonstration proof script
-which works with Proof General.
-
-Note that HOL Light Proof Script proof scripts often use batch-oriented
-single step tactic proofs, but Proof General does not (yet) offer an
-easy way to edit these kind of proofs.  They will replay simply as a
-single step proof and you will need to convert from the interactive to
-batch form as usual if you wish to obtain batch proofs.  Also note that
-Proof General does not contain an SML parser, so there can be problems
-if you write complex ML in proof scripts.
-@c Old section was helpful on this: @xref{ML files}, for the same issue with 
Isabelle.
-
-HOL Light is the most recently tested version of HOL with Proof General,
-but the Proof General distribution also contains experimental support
-for HOL 4 (aka HOL 98).  To improve this older version, or to support a
-new HOL variant, a few of the settings probably need to be tweaked to
-cope with small differences in output between the systems.  Please let
-us know if you try this out and want help.  We welcome any interested
-collaborators from the HOL communities to help improve Proof General as
-an interface for HOL provers.
-
-@c =================================================================
-@c
 @c  CHAPTER: EasyCrypt Proof General
 @c
 @node EasyCrypt Proof General
@@ -5896,8 +5454,8 @@ The distribution is available in the master branch of the 
repository.
 Tagged versions of the sources may be redistributed by third party
 packagers in other forms.
 
-The sources includes the generic elisp code, and code for Coq, LEGO,
-Isabelle, and other provers.  Also included are installation
+The sources includes the generic elisp code, and code for Coq, EasyCrypt,
+and other provers.  Also included are installation
 instructions (reproduced in brief below) and this documentation.
 
 @node Installing Proof General from sources
@@ -5984,7 +5542,7 @@ providing the variables in @file{proof-site.el} are 
adjusted
 accordingly (see @i{Proof General site configuration} in
 @i{Adapting Proof General} for more details).  Make sure that
 the @file{generic/} and assistant-specific elisp files are kept in
-subdirectories (@file{coq/}, @file{isa/}, @file{lego/}) of
+subdirectories (@file{coq/}, @file{phox/}, @file{easycrypt/}, ...) of
 @code{proof-home-directory} so that the autoload directory calculations
 are correct.
 
@@ -5996,7 +5554,7 @@ details if you don't know where to find this file.
 @unnumberedsubsec Removing support for unwanted provers
 
 You cannot run more than one instance of Proof General at a time: so if
-you're using Coq, visiting an @file{.ML} file will not load Isabelle
+you're using Coq, visiting an @file{.ec} file will not load EasyCrypt
 Proof General, and the buffer remains in fundamental mode.  If there are
 some assistants supported that you never want to use, you can adjust the
 variable @code{proof-assistants} in @file{proof-site.el} to remove the
@@ -6093,7 +5651,6 @@ l'INRIA Sophia Antipolis RR-3286
 @c
 @node History of Proof General
 @unnumbered History of Proof General
-@cindex @code{lego-mode}
 @cindex history
 
 It all started some time in 1994. There was no Emacs interface for LEGO.
diff --git a/doc/proofgeneral.1 b/doc/proofgeneral.1
index 9c7a245..b02091e 100644
--- a/doc/proofgeneral.1
+++ b/doc/proofgeneral.1
@@ -27,8 +27,8 @@ output version information and exit
 Unrecognized options are passed to Emacs, along with file names.
 .SH EXAMPLES
 .TP
-proofgeneral Example.thy
-Load Proof General editing Isar file Example.thy
+proofgeneral Example.ec
+Load Proof General editing EasyCrypt file Example.ec
 .TP
 proofgeneral example.v
 Load Proof General editing Coq file Example.v
diff --git a/etc/ProofGeneral.spec b/etc/ProofGeneral.spec
index f1d006a..0055ef5 100644
--- a/etc/ProofGeneral.spec
+++ b/etc/ProofGeneral.spec
@@ -3,7 +3,7 @@ Name:           ProofGeneral
 Version:       4.5-git
 Release:       1
 Group:         Text Editors/Integrated Development Environments (IDE)
-License:       GPL
+License:       GPLv3+
 Url:           http://proofgeneral.inf.ed.ac.uk/
 Packager:      David Aspinall <David.Aspinall@ed.ac.uk>
 Source:                
http://proofgeneral.inf.ed.ac.uk/ProofGeneral-%{version}.tgz
@@ -16,7 +16,7 @@ BuildArchitectures: noarch
 %description
 Proof General is a generic Emacs interface for proof assistants,
 suitable for use by pacifists and Emacs militants alike.
-It is supplied ready-customized for LEGO, Coq, and Isabelle.
+It is supplied ready-customized for EasyCrypt, Coq, and PhoX.
 You can adapt Proof General to other proof assistants if you know a
 little bit of Emacs Lisp.
 
diff --git a/etc/README b/etc/README
index 1b1b0f3..925e985 100644
--- a/etc/README
+++ b/etc/README
@@ -15,9 +15,6 @@ ProofGeneral.menu      Menu file for some Linux versions.
 ProofGeneral.desktop   Menu file for some Linux versions.  
                       Install in /etc/X11/applnk/Applications/
 
-lego                  Files for testing: LEGO Proof General
-isa                                      Isabelle Proof General
-isar                                     Isar PG
 demoisa                                          Isabelle Demo PG
 coq                                      Coq
 <otherprover>                             .. others, similarly
diff --git a/etc/hol-light/example4.ml b/etc/hol-light/example4.ml
deleted file mode 100644
index 3178f65..0000000
--- a/etc/hol-light/example4.ml
+++ /dev/null
@@ -1,13 +0,0 @@
-pg_mode_on ();;
-get_pg_mode ();;
-
-g `(?x:num. p(x) /\ q(x) /\ r(x)) ==> (?x. r(x) /\ p(x)) /\ (?x. p(x) /\ (q(x) 
<=> r(x)))`;;
-e (STRIP_TAC);;
-e (STRIP_TAC);;
-e (X_META_EXISTS_TAC `n1:num` THEN CONJ_TAC);;
-e (FIRST_X_ASSUM(UNIFY_ACCEPT_TAC [`n1:num`]));;
-e (ASM_REWRITE_TAC[]);;
-e (X_META_EXISTS_TAC `n2:num` THEN CONJ_TAC);;
-e (FIRST_X_ASSUM(UNIFY_ACCEPT_TAC [`n2:num`]));;
-e (ASM_REWRITE_TAC[]);;
-let th = top_thm ();;
diff --git a/etc/isar/AHundredProofs.thy b/etc/isar/AHundredProofs.thy
deleted file mode 100644
index 2687b30..0000000
--- a/etc/isar/AHundredProofs.thy
+++ /dev/null
@@ -1,1009 +0,0 @@
-theory AHundredProofs
-imports Main
-begin
-
-ML {* val start = Timing.start () *}
-
-theorem and_comms1: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms2: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms3: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms4: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms5: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms6: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms7: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms8: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms9: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms10: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms11: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms12: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms13: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms14: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms15: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms16: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms17: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms18: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms19: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms20: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms21: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms22: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms23: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms24: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms25: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms26: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms27: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms28: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms29: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms30: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms31: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms32: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms33: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms34: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms35: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms36: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms37: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms38: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms39: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms40: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms41: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms42: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms43: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms44: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms45: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms46: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms47: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms48: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms49: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms50: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms51: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms52: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms53: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms54: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms55: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms56: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms57: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms58: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms59: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms60: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms61: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms62: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms63: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms64: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms65: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms66: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms67: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms68: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms69: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms70: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms71: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms72: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms73: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms74: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms75: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms76: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms77: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms78: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms79: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms80: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms81: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms82: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms83: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms84: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms85: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms86: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms87: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms88: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms89: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms90: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms91: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms92: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms93: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms94: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms95: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms96: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms97: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms98: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms99: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-theorem and_comms100: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
- qed
-qed
-
-ML {* warning (Timing.message (Timing.result start)) *}
-
-end
diff --git a/etc/isar/AHundredTheorems.thy b/etc/isar/AHundredTheorems.thy
deleted file mode 100644
index ab6ad8f..0000000
--- a/etc/isar/AHundredTheorems.thy
+++ /dev/null
@@ -1,117 +0,0 @@
-theory AHundredTheorems
-imports Main
-begin
-
-(* test this *)
-
-ML {* val start = Timing.start () *}
-(* ELISP: -- (setq start (current-time)) -- *)
-
-lemma foo: "P --> P" by auto
-lemma foo2: "P --> P" by auto
-lemma foo3: "P --> P" by auto
-lemma foo4: "P --> P" by auto
-lemma foo5: "P --> P" by auto
-lemma foo6: "P --> P" by auto
-lemma foo7: "P --> P" by auto
-lemma foo8: "P --> P" by auto
-lemma foo9: "P --> P" by auto
-lemma foo10: "P --> P" by auto
-lemma foo11: "P --> P" by auto
-lemma foo12: "P --> P" by auto
-lemma foo13: "P --> P" by auto
-lemma foo14: "P --> P" by auto
-lemma foo15: "P --> P" by auto
-lemma foo16: "P --> P" by auto
-lemma foo17: "P --> P" by auto
-lemma foo18: "P --> P" by auto
-lemma foo19: "P --> P" by auto
-lemma foo20: "P --> P" by auto
-lemma foo21: "P --> P" by auto
-lemma foo22: "P --> P" by auto
-lemma foo23: "P --> P" by auto
-lemma foo24: "P --> P" by auto
-lemma foo25: "P --> P" by auto
-lemma foo26: "P --> P" by auto
-lemma foo27: "P --> P" by auto
-lemma foo28: "P --> P" by auto
-lemma foo29: "P --> P" by auto
-lemma foo30: "P --> P" by auto
-lemma foo31: "P --> P" by auto
-lemma foo32: "P --> P" by auto
-lemma foo33: "P --> P" by auto
-lemma foo34: "P --> P" by auto
-lemma foo35: "P --> P" by auto
-lemma foo36: "P --> P" by auto
-lemma foo37: "P --> P" by auto
-lemma foo38: "P --> P" by auto
-lemma foo39: "P --> P" by auto
-lemma foo40: "P --> P" by auto
-lemma foo41: "P --> P" by auto
-lemma foo42: "P --> P" by auto
-lemma foo43: "P --> P" by auto
-lemma foo44: "P --> P" by auto
-lemma foo45: "P --> P" by auto
-lemma foo46: "P --> P" by auto
-lemma foo47: "P --> P" by auto
-lemma foo48: "P --> P" by auto
-lemma foo49: "P --> P" by auto
-lemma foo50: "P --> P" by auto
-lemma foo51: "P --> P" by auto
-lemma foo52: "P --> P" by auto
-lemma foo53: "P --> P" by auto
-lemma foo54: "P --> P" by auto
-lemma foo55: "P --> P" by auto
-lemma foo56: "P --> P" by auto
-lemma foo57: "P --> P" by auto
-lemma foo58: "P --> P" by auto
-lemma foo59: "P --> P" by auto
-lemma foo60: "P --> P" by auto
-lemma foo61: "P --> P" by auto
-lemma foo62: "P --> P" by auto
-lemma foo63: "P --> P" by auto
-lemma foo64: "P --> P" by auto
-lemma foo65: "P --> P" by auto
-lemma foo66: "P --> P" by auto
-lemma foo67: "P --> P" by auto
-lemma foo68: "P --> P" by auto
-lemma foo69: "P --> P" by auto
-lemma foo70: "P --> P" by auto
-lemma foo71: "P --> P" by auto
-lemma foo72: "P --> P" by auto
-lemma foo73: "P --> P" by auto
-lemma foo74: "P --> P" by auto
-lemma foo75: "P --> P" by auto
-lemma foo76: "P --> P" by auto
-lemma foo77: "P --> P" by auto
-lemma foo78: "P --> P" by auto
-lemma foo79: "P --> P" by auto
-lemma foo80: "P --> P" by auto
-lemma foo81: "P --> P" by auto
-lemma foo82: "P --> P" by auto
-lemma foo83: "P --> P" by auto
-lemma foo84: "P --> P" by auto
-lemma foo85: "P --> P" by auto
-lemma foo86: "P --> P" by auto
-lemma foo87: "P --> P" by auto
-lemma foo88: "P --> P" by auto
-lemma foo89: "P --> P" by auto
-lemma foo90: "P --> P" by auto
-lemma foo91: "P --> P" by auto
-lemma foo92: "P --> P" by auto
-lemma foo93: "P --> P" by auto
-lemma foo94: "P --> P" by auto
-lemma foo95: "P --> P" by auto
-lemma foo96: "P --> P" by auto
-lemma foo97: "P --> P" by auto
-lemma foo98: "P --> P" by auto
-lemma foo99: "P --> P" by auto
-lemma foo100: "P --> P" by auto
-
-
-(* NB: this doesn't work because of comment aggregation *)
-(* ELISP: -- (message "Time taken: %f seconds" (time-to-seconds (time-since 
start))) -- *)
-ML {* warning (Timing.message (Timing.result start)) *}
-
-end
-
diff --git a/etc/isar/AThousandComments.thy b/etc/isar/AThousandComments.thy
deleted file mode 100644
index a84d601..0000000
--- a/etc/isar/AThousandComments.thy
+++ /dev/null
@@ -1,1005 +0,0 @@
-theory AThousandComments imports Main
-begin
-(* This is comment 1.  Skipped by the interface, not even sent to the prover. 
*)
-
-(* This is comment 2.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 3.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 4.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 5.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 6.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 7.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 8.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 9.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 10.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 11.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 12.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 13.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 14.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 15.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 16.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 17.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 18.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 19.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 20.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 21.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 22.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 23.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 24.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 25.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 26.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 27.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 28.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 29.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 30.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 31.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 32.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 33.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 34.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 35.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 36.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 37.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 38.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 39.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 40.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 41.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 42.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 43.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 44.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 45.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 46.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 47.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 48.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 49.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 50.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 51.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 52.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 53.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 54.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 55.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 56.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 57.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 58.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 59.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 60.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 61.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 62.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 63.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 64.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 65.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 66.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 67.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 68.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 69.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 70.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 71.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 72.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 73.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 74.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 75.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 76.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 77.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 78.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 79.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 80.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 81.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 82.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 83.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 84.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 85.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 86.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 87.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 88.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 89.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 90.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 91.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 92.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 93.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 94.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 95.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 96.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 97.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 98.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 99.  Skipped by the interface, not even sent to the prover. 
*)
-(* This is comment 100.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 101.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 102.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 103.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 104.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 105.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 106.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 107.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 108.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 109.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 110.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 111.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 112.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 113.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 114.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 115.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 116.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 117.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 118.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 119.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 120.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 121.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 122.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 123.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 124.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 125.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 126.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 127.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 128.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 129.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 130.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 131.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 132.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 133.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 134.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 135.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 136.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 137.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 138.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 139.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 140.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 141.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 142.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 143.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 144.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 145.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 146.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 147.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 148.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 149.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 150.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 151.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 152.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 153.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 154.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 155.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 156.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 157.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 158.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 159.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 160.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 161.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 162.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 163.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 164.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 165.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 166.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 167.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 168.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 169.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 170.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 171.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 172.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 173.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 174.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 175.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 176.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 177.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 178.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 179.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 180.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 181.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 182.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 183.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 184.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 185.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 186.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 187.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 188.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 189.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 190.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 191.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 192.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 193.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 194.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 195.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 196.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 197.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 198.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 199.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 200.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 201.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 202.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 203.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 204.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 205.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 206.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 207.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 208.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 209.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 210.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 211.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 212.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 213.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 214.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 215.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 216.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 217.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 218.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 219.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 220.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 221.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 222.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 223.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 224.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 225.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 226.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 227.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 228.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 229.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 230.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 231.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 232.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 233.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 234.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 235.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 236.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 237.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 238.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 239.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 240.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 241.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 242.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 243.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 244.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 245.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 246.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 247.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 248.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 249.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 250.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 251.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 252.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 253.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 254.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 255.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 256.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 257.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 258.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 259.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 260.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 261.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 262.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 263.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 264.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 265.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 266.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 267.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 268.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 269.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 270.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 271.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 272.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 273.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 274.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 275.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 276.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 277.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 278.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 279.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 280.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 281.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 282.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 283.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 284.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 285.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 286.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 287.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 288.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 289.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 290.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 291.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 292.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 293.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 294.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 295.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 296.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 297.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 298.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 299.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 300.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 301.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 302.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 303.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 304.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 305.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 306.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 307.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 308.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 309.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 310.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 311.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 312.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 313.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 314.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 315.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 316.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 317.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 318.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 319.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 320.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 321.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 322.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 323.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 324.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 325.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 326.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 327.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 328.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 329.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 330.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 331.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 332.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 333.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 334.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 335.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 336.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 337.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 338.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 339.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 340.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 341.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 342.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 343.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 344.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 345.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 346.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 347.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 348.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 349.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 350.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 351.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 352.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 353.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 354.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 355.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 356.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 357.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 358.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 359.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 360.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 361.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 362.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 363.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 364.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 365.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 366.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 367.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 368.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 369.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 370.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 371.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 372.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 373.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 374.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 375.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 376.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 377.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 378.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 379.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 380.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 381.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 382.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 383.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 384.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 385.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 386.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 387.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 388.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 389.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 390.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 391.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 392.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 393.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 394.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 395.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 396.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 397.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 398.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 399.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 400.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 401.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 402.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 403.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 404.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 405.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 406.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 407.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 408.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 409.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 410.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 411.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 412.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 413.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 414.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 415.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 416.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 417.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 418.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 419.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 420.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 421.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 422.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 423.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 424.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 425.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 426.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 427.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 428.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 429.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 430.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 431.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 432.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 433.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 434.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 435.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 436.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 437.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 438.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 439.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 440.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 441.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 442.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 443.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 444.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 445.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 446.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 447.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 448.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 449.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 450.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 451.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 452.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 453.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 454.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 455.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 456.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 457.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 458.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 459.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 460.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 461.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 462.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 463.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 464.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 465.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 466.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 467.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 468.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 469.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 470.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 471.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 472.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 473.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 474.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 475.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 476.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 477.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 478.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 479.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 480.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 481.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 482.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 483.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 484.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 485.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 486.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 487.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 488.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 489.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 490.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 491.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 492.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 493.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 494.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 495.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 496.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 497.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 498.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 499.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 500.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 501.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 502.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 503.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 504.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 505.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 506.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 507.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 508.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 509.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 510.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 511.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 512.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 513.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 514.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 515.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 516.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 517.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 518.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 519.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 520.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 521.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 522.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 523.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 524.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 525.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 526.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 527.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 528.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 529.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 530.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 531.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 532.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 533.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 534.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 535.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 536.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 537.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 538.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 539.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 540.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 541.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 542.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 543.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 544.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 545.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 546.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 547.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 548.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 549.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 550.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 551.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 552.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 553.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 554.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 555.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 556.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 557.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 558.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 559.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 560.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 561.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 562.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 563.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 564.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 565.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 566.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 567.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 568.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 569.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 570.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 571.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 572.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 573.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 574.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 575.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 576.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 577.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 578.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 579.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 580.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 581.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 582.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 583.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 584.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 585.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 586.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 587.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 588.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 589.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 590.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 591.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 592.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 593.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 594.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 595.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 596.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 597.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 598.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 599.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 600.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 601.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 602.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 603.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 604.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 605.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 606.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 607.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 608.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 609.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 610.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 611.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 612.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 613.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 614.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 615.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 616.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 617.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 618.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 619.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 620.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 621.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 622.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 623.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 624.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 625.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 626.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 627.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 628.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 629.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 630.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 631.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 632.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 633.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 634.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 635.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 636.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 637.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 638.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 639.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 640.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 641.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 642.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 643.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 644.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 645.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 646.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 647.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 648.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 649.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 650.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 651.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 652.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 653.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 654.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 655.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 656.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 657.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 658.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 659.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 660.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 661.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 662.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 663.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 664.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 665.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 666.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 667.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 668.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 669.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 670.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 671.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 672.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 673.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 674.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 675.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 676.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 677.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 678.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 679.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 680.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 681.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 682.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 683.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 684.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 685.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 686.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 687.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 688.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 689.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 690.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 691.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 692.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 693.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 694.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 695.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 696.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 697.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 698.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 699.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 700.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 701.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 702.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 703.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 704.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 705.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 706.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 707.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 708.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 709.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 710.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 711.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 712.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 713.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 714.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 715.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 716.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 717.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 718.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 719.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 720.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 721.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 722.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 723.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 724.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 725.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 726.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 727.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 728.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 729.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 730.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 731.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 732.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 733.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 734.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 735.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 736.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 737.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 738.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 739.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 740.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 741.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 742.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 743.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 744.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 745.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 746.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 747.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 748.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 749.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 750.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 751.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 752.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 753.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 754.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 755.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 756.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 757.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 758.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 759.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 760.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 761.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 762.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 763.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 764.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 765.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 766.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 767.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 768.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 769.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 770.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 771.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 772.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 773.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 774.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 775.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 776.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 777.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 778.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 779.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 780.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 781.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 782.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 783.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 784.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 785.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 786.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 787.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 788.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 789.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 790.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 791.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 792.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 793.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 794.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 795.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 796.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 797.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 798.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 799.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 800.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 801.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 802.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 803.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 804.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 805.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 806.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 807.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 808.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 809.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 810.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 811.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 812.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 813.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 814.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 815.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 816.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 817.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 818.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 819.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 820.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 821.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 822.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 823.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 824.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 825.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 826.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 827.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 828.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 829.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 830.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 831.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 832.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 833.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 834.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 835.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 836.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 837.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 838.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 839.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 840.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 841.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 842.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 843.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 844.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 845.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 846.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 847.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 848.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 849.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 850.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 851.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 852.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 853.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 854.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 855.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 856.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 857.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 858.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 859.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 860.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 861.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 862.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 863.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 864.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 865.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 866.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 867.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 868.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 869.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 870.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 871.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 872.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 873.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 874.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 875.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 876.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 877.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 878.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 879.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 880.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 881.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 882.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 883.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 884.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 885.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 886.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 887.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 888.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 889.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 890.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 891.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 892.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 893.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 894.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 895.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 896.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 897.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 898.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 899.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 900.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 901.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 902.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 903.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 904.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 905.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 906.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 907.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 908.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 909.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 910.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 911.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 912.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 913.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 914.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 915.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 916.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 917.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 918.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 919.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 920.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 921.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 922.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 923.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 924.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 925.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 926.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 927.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 928.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 929.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 930.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 931.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 932.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 933.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 934.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 935.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 936.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 937.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 938.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 939.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 940.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 941.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 942.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 943.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 944.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 945.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 946.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 947.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 948.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 949.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 950.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 951.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 952.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 953.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 954.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 955.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 956.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 957.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 958.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 959.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 960.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 961.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 962.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 963.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 964.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 965.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 966.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 967.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 968.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 969.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 970.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 971.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 972.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 973.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 974.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 975.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 976.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 977.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 978.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 979.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 980.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 981.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 982.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 983.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 984.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 985.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 986.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 987.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 988.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 989.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 990.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 991.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 992.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 993.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 994.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 995.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 996.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 997.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 998.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 999.  Skipped by the interface, not even sent to the 
prover. *)
-(* This is comment 1000.  Skipped by the interface, not even sent to the 
prover. *)
-
-end
diff --git a/etc/isar/AThousandTheorems.thy b/etc/isar/AThousandTheorems.thy
deleted file mode 100644
index 6e565f9..0000000
--- a/etc/isar/AThousandTheorems.thy
+++ /dev/null
@@ -1,1013 +0,0 @@
-theory AThousandTheorems imports Main
-begin
-
-ML {* val start = Timing.start () *}
-(* ELISP: -- (setq start (current-time)) -- *)
-
-lemma foo: "P --> P" by auto
-lemma foo2: "P --> P" by auto
-lemma foo3: "P --> P" by auto
-lemma foo4: "P --> P" by auto
-lemma foo5: "P --> P" by auto
-lemma foo6: "P --> P" by auto
-lemma foo7: "P --> P" by auto
-lemma foo8: "P --> P" by auto
-lemma foo9: "P --> P" by auto
-lemma foo10: "P --> P" by auto
-lemma foo11: "P --> P" by auto
-lemma foo12: "P --> P" by auto
-lemma foo13: "P --> P" by auto
-lemma foo14: "P --> P" by auto
-lemma foo15: "P --> P" by auto
-lemma foo16: "P --> P" by auto
-lemma foo17: "P --> P" by auto
-lemma foo18: "P --> P" by auto
-lemma foo19: "P --> P" by auto
-lemma foo20: "P --> P" by auto
-lemma foo21: "P --> P" by auto
-lemma foo22: "P --> P" by auto
-lemma foo23: "P --> P" by auto
-lemma foo24: "P --> P" by auto
-lemma foo25: "P --> P" by auto
-lemma foo26: "P --> P" by auto
-lemma foo27: "P --> P" by auto
-lemma foo28: "P --> P" by auto
-lemma foo29: "P --> P" by auto
-lemma foo30: "P --> P" by auto
-lemma foo31: "P --> P" by auto
-lemma foo32: "P --> P" by auto
-lemma foo33: "P --> P" by auto
-lemma foo34: "P --> P" by auto
-lemma foo35: "P --> P" by auto
-lemma foo36: "P --> P" by auto
-lemma foo37: "P --> P" by auto
-lemma foo38: "P --> P" by auto
-lemma foo39: "P --> P" by auto
-lemma foo40: "P --> P" by auto
-lemma foo41: "P --> P" by auto
-lemma foo42: "P --> P" by auto
-lemma foo43: "P --> P" by auto
-lemma foo44: "P --> P" by auto
-lemma foo45: "P --> P" by auto
-lemma foo46: "P --> P" by auto
-lemma foo47: "P --> P" by auto
-lemma foo48: "P --> P" by auto
-lemma foo49: "P --> P" by auto
-lemma foo50: "P --> P" by auto
-lemma foo51: "P --> P" by auto
-lemma foo52: "P --> P" by auto
-lemma foo53: "P --> P" by auto
-lemma foo54: "P --> P" by auto
-lemma foo55: "P --> P" by auto
-lemma foo56: "P --> P" by auto
-lemma foo57: "P --> P" by auto
-lemma foo58: "P --> P" by auto
-lemma foo59: "P --> P" by auto
-lemma foo60: "P --> P" by auto
-lemma foo61: "P --> P" by auto
-lemma foo62: "P --> P" by auto
-lemma foo63: "P --> P" by auto
-lemma foo64: "P --> P" by auto
-lemma foo65: "P --> P" by auto
-lemma foo66: "P --> P" by auto
-lemma foo67: "P --> P" by auto
-lemma foo68: "P --> P" by auto
-lemma foo69: "P --> P" by auto
-lemma foo70: "P --> P" by auto
-lemma foo71: "P --> P" by auto
-lemma foo72: "P --> P" by auto
-lemma foo73: "P --> P" by auto
-lemma foo74: "P --> P" by auto
-lemma foo75: "P --> P" by auto
-lemma foo76: "P --> P" by auto
-lemma foo77: "P --> P" by auto
-lemma foo78: "P --> P" by auto
-lemma foo79: "P --> P" by auto
-lemma foo80: "P --> P" by auto
-lemma foo81: "P --> P" by auto
-lemma foo82: "P --> P" by auto
-lemma foo83: "P --> P" by auto
-lemma foo84: "P --> P" by auto
-lemma foo85: "P --> P" by auto
-lemma foo86: "P --> P" by auto
-lemma foo87: "P --> P" by auto
-lemma foo88: "P --> P" by auto
-lemma foo89: "P --> P" by auto
-lemma foo90: "P --> P" by auto
-lemma foo91: "P --> P" by auto
-lemma foo92: "P --> P" by auto
-lemma foo93: "P --> P" by auto
-lemma foo94: "P --> P" by auto
-lemma foo95: "P --> P" by auto
-lemma foo96: "P --> P" by auto
-lemma foo97: "P --> P" by auto
-lemma foo98: "P --> P" by auto
-lemma foo99: "P --> P" by auto
-lemma foo100: "P --> P" by auto
-lemma foo101: "P --> P" by auto
-lemma foo102: "P --> P" by auto
-lemma foo103: "P --> P" by auto
-lemma foo104: "P --> P" by auto
-lemma foo105: "P --> P" by auto
-lemma foo106: "P --> P" by auto
-lemma foo107: "P --> P" by auto
-lemma foo108: "P --> P" by auto
-lemma foo109: "P --> P" by auto
-lemma foo110: "P --> P" by auto
-lemma foo111: "P --> P" by auto
-lemma foo112: "P --> P" by auto
-lemma foo113: "P --> P" by auto
-lemma foo114: "P --> P" by auto
-lemma foo115: "P --> P" by auto
-lemma foo116: "P --> P" by auto
-lemma foo117: "P --> P" by auto
-lemma foo118: "P --> P" by auto
-lemma foo119: "P --> P" by auto
-lemma foo120: "P --> P" by auto
-lemma foo121: "P --> P" by auto
-lemma foo122: "P --> P" by auto
-lemma foo123: "P --> P" by auto
-lemma foo124: "P --> P" by auto
-lemma foo125: "P --> P" by auto
-lemma foo126: "P --> P" by auto
-lemma foo127: "P --> P" by auto
-lemma foo128: "P --> P" by auto
-lemma foo129: "P --> P" by auto
-lemma foo130: "P --> P" by auto
-lemma foo131: "P --> P" by auto
-lemma foo132: "P --> P" by auto
-lemma foo133: "P --> P" by auto
-lemma foo134: "P --> P" by auto
-lemma foo135: "P --> P" by auto
-lemma foo136: "P --> P" by auto
-lemma foo137: "P --> P" by auto
-lemma foo138: "P --> P" by auto
-lemma foo139: "P --> P" by auto
-lemma foo140: "P --> P" by auto
-lemma foo141: "P --> P" by auto
-lemma foo142: "P --> P" by auto
-lemma foo143: "P --> P" by auto
-lemma foo144: "P --> P" by auto
-lemma foo145: "P --> P" by auto
-lemma foo146: "P --> P" by auto
-lemma foo147: "P --> P" by auto
-lemma foo148: "P --> P" by auto
-lemma foo149: "P --> P" by auto
-lemma foo150: "P --> P" by auto
-lemma foo151: "P --> P" by auto
-lemma foo152: "P --> P" by auto
-lemma foo153: "P --> P" by auto
-lemma foo154: "P --> P" by auto
-lemma foo155: "P --> P" by auto
-lemma foo156: "P --> P" by auto
-lemma foo157: "P --> P" by auto
-lemma foo158: "P --> P" by auto
-lemma foo159: "P --> P" by auto
-lemma foo160: "P --> P" by auto
-lemma foo161: "P --> P" by auto
-lemma foo162: "P --> P" by auto
-lemma foo163: "P --> P" by auto
-lemma foo164: "P --> P" by auto
-lemma foo165: "P --> P" by auto
-lemma foo166: "P --> P" by auto
-lemma foo167: "P --> P" by auto
-lemma foo168: "P --> P" by auto
-lemma foo169: "P --> P" by auto
-lemma foo170: "P --> P" by auto
-lemma foo171: "P --> P" by auto
-lemma foo172: "P --> P" by auto
-lemma foo173: "P --> P" by auto
-lemma foo174: "P --> P" by auto
-lemma foo175: "P --> P" by auto
-lemma foo176: "P --> P" by auto
-lemma foo177: "P --> P" by auto
-lemma foo178: "P --> P" by auto
-lemma foo179: "P --> P" by auto
-lemma foo180: "P --> P" by auto
-lemma foo181: "P --> P" by auto
-lemma foo182: "P --> P" by auto
-lemma foo183: "P --> P" by auto
-lemma foo184: "P --> P" by auto
-lemma foo185: "P --> P" by auto
-lemma foo186: "P --> P" by auto
-lemma foo187: "P --> P" by auto
-lemma foo188: "P --> P" by auto
-lemma foo189: "P --> P" by auto
-lemma foo190: "P --> P" by auto
-lemma foo191: "P --> P" by auto
-lemma foo192: "P --> P" by auto
-lemma foo193: "P --> P" by auto
-lemma foo194: "P --> P" by auto
-lemma foo195: "P --> P" by auto
-lemma foo196: "P --> P" by auto
-lemma foo197: "P --> P" by auto
-lemma foo198: "P --> P" by auto
-lemma foo199: "P --> P" by auto
-lemma foo200: "P --> P" by auto
-lemma foo201: "P --> P" by auto
-lemma foo202: "P --> P" by auto
-lemma foo203: "P --> P" by auto
-lemma foo204: "P --> P" by auto
-lemma foo205: "P --> P" by auto
-lemma foo206: "P --> P" by auto
-lemma foo207: "P --> P" by auto
-lemma foo208: "P --> P" by auto
-lemma foo209: "P --> P" by auto
-lemma foo210: "P --> P" by auto
-lemma foo211: "P --> P" by auto
-lemma foo212: "P --> P" by auto
-lemma foo213: "P --> P" by auto
-lemma foo214: "P --> P" by auto
-lemma foo215: "P --> P" by auto
-lemma foo216: "P --> P" by auto
-lemma foo217: "P --> P" by auto
-lemma foo218: "P --> P" by auto
-lemma foo219: "P --> P" by auto
-lemma foo220: "P --> P" by auto
-lemma foo221: "P --> P" by auto
-lemma foo222: "P --> P" by auto
-lemma foo223: "P --> P" by auto
-lemma foo224: "P --> P" by auto
-lemma foo225: "P --> P" by auto
-lemma foo226: "P --> P" by auto
-lemma foo227: "P --> P" by auto
-lemma foo228: "P --> P" by auto
-lemma foo229: "P --> P" by auto
-lemma foo230: "P --> P" by auto
-lemma foo231: "P --> P" by auto
-lemma foo232: "P --> P" by auto
-lemma foo233: "P --> P" by auto
-lemma foo234: "P --> P" by auto
-lemma foo235: "P --> P" by auto
-lemma foo236: "P --> P" by auto
-lemma foo237: "P --> P" by auto
-lemma foo238: "P --> P" by auto
-lemma foo239: "P --> P" by auto
-lemma foo240: "P --> P" by auto
-lemma foo241: "P --> P" by auto
-lemma foo242: "P --> P" by auto
-lemma foo243: "P --> P" by auto
-lemma foo244: "P --> P" by auto
-lemma foo245: "P --> P" by auto
-lemma foo246: "P --> P" by auto
-lemma foo247: "P --> P" by auto
-lemma foo248: "P --> P" by auto
-lemma foo249: "P --> P" by auto
-lemma foo250: "P --> P" by auto
-lemma foo251: "P --> P" by auto
-lemma foo252: "P --> P" by auto
-lemma foo253: "P --> P" by auto
-lemma foo254: "P --> P" by auto
-lemma foo255: "P --> P" by auto
-lemma foo256: "P --> P" by auto
-lemma foo257: "P --> P" by auto
-lemma foo258: "P --> P" by auto
-lemma foo259: "P --> P" by auto
-lemma foo260: "P --> P" by auto
-lemma foo261: "P --> P" by auto
-lemma foo262: "P --> P" by auto
-lemma foo263: "P --> P" by auto
-lemma foo264: "P --> P" by auto
-lemma foo265: "P --> P" by auto
-lemma foo266: "P --> P" by auto
-lemma foo267: "P --> P" by auto
-lemma foo268: "P --> P" by auto
-lemma foo269: "P --> P" by auto
-lemma foo270: "P --> P" by auto
-lemma foo271: "P --> P" by auto
-lemma foo272: "P --> P" by auto
-lemma foo273: "P --> P" by auto
-lemma foo274: "P --> P" by auto
-lemma foo275: "P --> P" by auto
-lemma foo276: "P --> P" by auto
-lemma foo277: "P --> P" by auto
-lemma foo278: "P --> P" by auto
-lemma foo279: "P --> P" by auto
-lemma foo280: "P --> P" by auto
-lemma foo281: "P --> P" by auto
-lemma foo282: "P --> P" by auto
-lemma foo283: "P --> P" by auto
-lemma foo284: "P --> P" by auto
-lemma foo285: "P --> P" by auto
-lemma foo286: "P --> P" by auto
-lemma foo287: "P --> P" by auto
-lemma foo288: "P --> P" by auto
-lemma foo289: "P --> P" by auto
-lemma foo290: "P --> P" by auto
-lemma foo291: "P --> P" by auto
-lemma foo292: "P --> P" by auto
-lemma foo293: "P --> P" by auto
-lemma foo294: "P --> P" by auto
-lemma foo295: "P --> P" by auto
-lemma foo296: "P --> P" by auto
-lemma foo297: "P --> P" by auto
-lemma foo298: "P --> P" by auto
-lemma foo299: "P --> P" by auto
-lemma foo300: "P --> P" by auto
-lemma foo301: "P --> P" by auto
-lemma foo302: "P --> P" by auto
-lemma foo303: "P --> P" by auto
-lemma foo304: "P --> P" by auto
-lemma foo305: "P --> P" by auto
-lemma foo306: "P --> P" by auto
-lemma foo307: "P --> P" by auto
-lemma foo308: "P --> P" by auto
-lemma foo309: "P --> P" by auto
-lemma foo310: "P --> P" by auto
-lemma foo311: "P --> P" by auto
-lemma foo312: "P --> P" by auto
-lemma foo313: "P --> P" by auto
-lemma foo314: "P --> P" by auto
-lemma foo315: "P --> P" by auto
-lemma foo316: "P --> P" by auto
-lemma foo317: "P --> P" by auto
-lemma foo318: "P --> P" by auto
-lemma foo319: "P --> P" by auto
-lemma foo320: "P --> P" by auto
-lemma foo321: "P --> P" by auto
-lemma foo322: "P --> P" by auto
-lemma foo323: "P --> P" by auto
-lemma foo324: "P --> P" by auto
-lemma foo325: "P --> P" by auto
-lemma foo326: "P --> P" by auto
-lemma foo327: "P --> P" by auto
-lemma foo328: "P --> P" by auto
-lemma foo329: "P --> P" by auto
-lemma foo330: "P --> P" by auto
-lemma foo331: "P --> P" by auto
-lemma foo332: "P --> P" by auto
-lemma foo333: "P --> P" by auto
-lemma foo334: "P --> P" by auto
-lemma foo335: "P --> P" by auto
-lemma foo336: "P --> P" by auto
-lemma foo337: "P --> P" by auto
-lemma foo338: "P --> P" by auto
-lemma foo339: "P --> P" by auto
-lemma foo340: "P --> P" by auto
-lemma foo341: "P --> P" by auto
-lemma foo342: "P --> P" by auto
-lemma foo343: "P --> P" by auto
-lemma foo344: "P --> P" by auto
-lemma foo345: "P --> P" by auto
-lemma foo346: "P --> P" by auto
-lemma foo347: "P --> P" by auto
-lemma foo348: "P --> P" by auto
-lemma foo349: "P --> P" by auto
-lemma foo350: "P --> P" by auto
-lemma foo351: "P --> P" by auto
-lemma foo352: "P --> P" by auto
-lemma foo353: "P --> P" by auto
-lemma foo354: "P --> P" by auto
-lemma foo355: "P --> P" by auto
-lemma foo356: "P --> P" by auto
-lemma foo357: "P --> P" by auto
-lemma foo358: "P --> P" by auto
-lemma foo359: "P --> P" by auto
-lemma foo360: "P --> P" by auto
-lemma foo361: "P --> P" by auto
-lemma foo362: "P --> P" by auto
-lemma foo363: "P --> P" by auto
-lemma foo364: "P --> P" by auto
-lemma foo365: "P --> P" by auto
-lemma foo366: "P --> P" by auto
-lemma foo367: "P --> P" by auto
-lemma foo368: "P --> P" by auto
-lemma foo369: "P --> P" by auto
-lemma foo370: "P --> P" by auto
-lemma foo371: "P --> P" by auto
-lemma foo372: "P --> P" by auto
-lemma foo373: "P --> P" by auto
-lemma foo374: "P --> P" by auto
-lemma foo375: "P --> P" by auto
-lemma foo376: "P --> P" by auto
-lemma foo377: "P --> P" by auto
-lemma foo378: "P --> P" by auto
-lemma foo379: "P --> P" by auto
-lemma foo380: "P --> P" by auto
-lemma foo381: "P --> P" by auto
-lemma foo382: "P --> P" by auto
-lemma foo383: "P --> P" by auto
-lemma foo384: "P --> P" by auto
-lemma foo385: "P --> P" by auto
-lemma foo386: "P --> P" by auto
-lemma foo387: "P --> P" by auto
-lemma foo388: "P --> P" by auto
-lemma foo389: "P --> P" by auto
-lemma foo390: "P --> P" by auto
-lemma foo391: "P --> P" by auto
-lemma foo392: "P --> P" by auto
-lemma foo393: "P --> P" by auto
-lemma foo394: "P --> P" by auto
-lemma foo395: "P --> P" by auto
-lemma foo396: "P --> P" by auto
-lemma foo397: "P --> P" by auto
-lemma foo398: "P --> P" by auto
-lemma foo399: "P --> P" by auto
-lemma foo400: "P --> P" by auto
-lemma foo401: "P --> P" by auto
-lemma foo402: "P --> P" by auto
-lemma foo403: "P --> P" by auto
-lemma foo404: "P --> P" by auto
-lemma foo405: "P --> P" by auto
-lemma foo406: "P --> P" by auto
-lemma foo407: "P --> P" by auto
-lemma foo408: "P --> P" by auto
-lemma foo409: "P --> P" by auto
-lemma foo410: "P --> P" by auto
-lemma foo411: "P --> P" by auto
-lemma foo412: "P --> P" by auto
-lemma foo413: "P --> P" by auto
-lemma foo414: "P --> P" by auto
-lemma foo415: "P --> P" by auto
-lemma foo416: "P --> P" by auto
-lemma foo417: "P --> P" by auto
-lemma foo418: "P --> P" by auto
-lemma foo419: "P --> P" by auto
-lemma foo420: "P --> P" by auto
-lemma foo421: "P --> P" by auto
-lemma foo422: "P --> P" by auto
-lemma foo423: "P --> P" by auto
-lemma foo424: "P --> P" by auto
-lemma foo425: "P --> P" by auto
-lemma foo426: "P --> P" by auto
-lemma foo427: "P --> P" by auto
-lemma foo428: "P --> P" by auto
-lemma foo429: "P --> P" by auto
-lemma foo430: "P --> P" by auto
-lemma foo431: "P --> P" by auto
-lemma foo432: "P --> P" by auto
-lemma foo433: "P --> P" by auto
-lemma foo434: "P --> P" by auto
-lemma foo435: "P --> P" by auto
-lemma foo436: "P --> P" by auto
-lemma foo437: "P --> P" by auto
-lemma foo438: "P --> P" by auto
-lemma foo439: "P --> P" by auto
-lemma foo440: "P --> P" by auto
-lemma foo441: "P --> P" by auto
-lemma foo442: "P --> P" by auto
-lemma foo443: "P --> P" by auto
-lemma foo444: "P --> P" by auto
-lemma foo445: "P --> P" by auto
-lemma foo446: "P --> P" by auto
-lemma foo447: "P --> P" by auto
-lemma foo448: "P --> P" by auto
-lemma foo449: "P --> P" by auto
-lemma foo450: "P --> P" by auto
-lemma foo451: "P --> P" by auto
-lemma foo452: "P --> P" by auto
-lemma foo453: "P --> P" by auto
-lemma foo454: "P --> P" by auto
-lemma foo455: "P --> P" by auto
-lemma foo456: "P --> P" by auto
-lemma foo457: "P --> P" by auto
-lemma foo458: "P --> P" by auto
-lemma foo459: "P --> P" by auto
-lemma foo460: "P --> P" by auto
-lemma foo461: "P --> P" by auto
-lemma foo462: "P --> P" by auto
-lemma foo463: "P --> P" by auto
-lemma foo464: "P --> P" by auto
-lemma foo465: "P --> P" by auto
-lemma foo466: "P --> P" by auto
-lemma foo467: "P --> P" by auto
-lemma foo468: "P --> P" by auto
-lemma foo469: "P --> P" by auto
-lemma foo470: "P --> P" by auto
-lemma foo471: "P --> P" by auto
-lemma foo472: "P --> P" by auto
-lemma foo473: "P --> P" by auto
-lemma foo474: "P --> P" by auto
-lemma foo475: "P --> P" by auto
-lemma foo476: "P --> P" by auto
-lemma foo477: "P --> P" by auto
-lemma foo478: "P --> P" by auto
-lemma foo479: "P --> P" by auto
-lemma foo480: "P --> P" by auto
-lemma foo481: "P --> P" by auto
-lemma foo482: "P --> P" by auto
-lemma foo483: "P --> P" by auto
-lemma foo484: "P --> P" by auto
-lemma foo485: "P --> P" by auto
-lemma foo486: "P --> P" by auto
-lemma foo487: "P --> P" by auto
-lemma foo488: "P --> P" by auto
-lemma foo489: "P --> P" by auto
-lemma foo490: "P --> P" by auto
-lemma foo491: "P --> P" by auto
-lemma foo492: "P --> P" by auto
-lemma foo493: "P --> P" by auto
-lemma foo494: "P --> P" by auto
-lemma foo495: "P --> P" by auto
-lemma foo496: "P --> P" by auto
-lemma foo497: "P --> P" by auto
-lemma foo498: "P --> P" by auto
-lemma foo499: "P --> P" by auto
-lemma foo500: "P --> P" by auto
-(*lemma foo500: "P --> P" by auto *)
-lemma foo501: "P --> P" by auto
-lemma foo502: "P --> P" by auto
-lemma foo503: "P --> P" by auto
-lemma foo504: "P --> P" by auto
-lemma foo505: "P --> P" by auto
-lemma foo506: "P --> P" by auto
-lemma foo507: "P --> P" by auto
-lemma foo508: "P --> P" by auto
-lemma foo509: "P --> P" by auto
-lemma foo510: "P --> P" by auto
-lemma foo511: "P --> P" by auto
-lemma foo512: "P --> P" by auto
-lemma foo513: "P --> P" by auto
-lemma foo514: "P --> P" by auto
-lemma foo515: "P --> P" by auto
-lemma foo516: "P --> P" by auto
-lemma foo517: "P --> P" by auto
-lemma foo518: "P --> P" by auto
-lemma foo519: "P --> P" by auto
-lemma foo520: "P --> P" by auto
-lemma foo521: "P --> P" by auto
-lemma foo522: "P --> P" by auto
-lemma foo523: "P --> P" by auto
-lemma foo524: "P --> P" by auto
-lemma foo525: "P --> P" by auto
-lemma foo526: "P --> P" by auto
-lemma foo527: "P --> P" by auto
-lemma foo528: "P --> P" by auto
-lemma foo529: "P --> P" by auto
-lemma foo530: "P --> P" by auto
-lemma foo531: "P --> P" by auto
-lemma foo532: "P --> P" by auto
-lemma foo533: "P --> P" by auto
-lemma foo534: "P --> P" by auto
-lemma foo535: "P --> P" by auto
-lemma foo536: "P --> P" by auto
-lemma foo537: "P --> P" by auto
-lemma foo538: "P --> P" by auto
-lemma foo539: "P --> P" by auto
-lemma foo540: "P --> P" by auto
-lemma foo541: "P --> P" by auto
-lemma foo542: "P --> P" by auto
-lemma foo543: "P --> P" by auto
-lemma foo544: "P --> P" by auto
-lemma foo545: "P --> P" by auto
-lemma foo546: "P --> P" by auto
-lemma foo547: "P --> P" by auto
-lemma foo548: "P --> P" by auto
-lemma foo549: "P --> P" by auto
-lemma foo550: "P --> P" by auto
-lemma foo551: "P --> P" by auto
-lemma foo552: "P --> P" by auto
-lemma foo553: "P --> P" by auto
-lemma foo554: "P --> P" by auto
-lemma foo555: "P --> P" by auto
-lemma foo556: "P --> P" by auto
-lemma foo557: "P --> P" by auto
-lemma foo558: "P --> P" by auto
-lemma foo559: "P --> P" by auto
-lemma foo560: "P --> P" by auto
-lemma foo561: "P --> P" by auto
-lemma foo562: "P --> P" by auto
-lemma foo563: "P --> P" by auto
-lemma foo564: "P --> P" by auto
-lemma foo565: "P --> P" by auto
-lemma foo566: "P --> P" by auto
-lemma foo567: "P --> P" by auto
-lemma foo568: "P --> P" by auto
-lemma foo569: "P --> P" by auto
-lemma foo570: "P --> P" by auto
-lemma foo571: "P --> P" by auto
-lemma foo572: "P --> P" by auto
-lemma foo573: "P --> P" by auto
-lemma foo574: "P --> P" by auto
-lemma foo575: "P --> P" by auto
-lemma foo576: "P --> P" by auto
-lemma foo577: "P --> P" by auto
-lemma foo578: "P --> P" by auto
-lemma foo579: "P --> P" by auto
-lemma foo580: "P --> P" by auto
-lemma foo581: "P --> P" by auto
-lemma foo582: "P --> P" by auto
-lemma foo583: "P --> P" by auto
-lemma foo584: "P --> P" by auto
-lemma foo585: "P --> P" by auto
-lemma foo586: "P --> P" by auto
-lemma foo587: "P --> P" by auto
-lemma foo588: "P --> P" by auto
-lemma foo589: "P --> P" by auto
-lemma foo590: "P --> P" by auto
-lemma foo591: "P --> P" by auto
-lemma foo592: "P --> P" by auto
-lemma foo593: "P --> P" by auto
-lemma foo594: "P --> P" by auto
-lemma foo595: "P --> P" by auto
-lemma foo596: "P --> P" by auto
-lemma foo597: "P --> P" by auto
-lemma foo598: "P --> P" by auto
-lemma foo599: "P --> P" by auto
-lemma foo600: "P --> P" by auto
-lemma foo601: "P --> P" by auto
-lemma foo602: "P --> P" by auto
-lemma foo603: "P --> P" by auto
-lemma foo604: "P --> P" by auto
-lemma foo605: "P --> P" by auto
-lemma foo606: "P --> P" by auto
-lemma foo607: "P --> P" by auto
-lemma foo608: "P --> P" by auto
-lemma foo609: "P --> P" by auto
-lemma foo610: "P --> P" by auto
-lemma foo611: "P --> P" by auto
-lemma foo612: "P --> P" by auto
-lemma foo613: "P --> P" by auto
-lemma foo614: "P --> P" by auto
-lemma foo615: "P --> P" by auto
-lemma foo616: "P --> P" by auto
-lemma foo617: "P --> P" by auto
-lemma foo618: "P --> P" by auto
-lemma foo619: "P --> P" by auto
-lemma foo620: "P --> P" by auto
-lemma foo621: "P --> P" by auto
-lemma foo622: "P --> P" by auto
-lemma foo623: "P --> P" by auto
-lemma foo624: "P --> P" by auto
-lemma foo625: "P --> P" by auto
-lemma foo626: "P --> P" by auto
-lemma foo627: "P --> P" by auto
-lemma foo628: "P --> P" by auto
-lemma foo629: "P --> P" by auto
-lemma foo630: "P --> P" by auto
-lemma foo631: "P --> P" by auto
-lemma foo632: "P --> P" by auto
-lemma foo633: "P --> P" by auto
-lemma foo634: "P --> P" by auto
-lemma foo635: "P --> P" by auto
-lemma foo636: "P --> P" by auto
-lemma foo637: "P --> P" by auto
-lemma foo638: "P --> P" by auto
-lemma foo639: "P --> P" by auto
-lemma foo640: "P --> P" by auto
-lemma foo641: "P --> P" by auto
-lemma foo642: "P --> P" by auto
-lemma foo643: "P --> P" by auto
-lemma foo644: "P --> P" by auto
-lemma foo645: "P --> P" by auto
-lemma foo646: "P --> P" by auto
-lemma foo647: "P --> P" by auto
-lemma foo648: "P --> P" by auto
-lemma foo649: "P --> P" by auto
-lemma foo650: "P --> P" by auto
-lemma foo651: "P --> P" by auto
-lemma foo652: "P --> P" by auto
-lemma foo653: "P --> P" by auto
-lemma foo654: "P --> P" by auto
-lemma foo655: "P --> P" by auto
-lemma foo656: "P --> P" by auto
-lemma foo657: "P --> P" by auto
-lemma foo658: "P --> P" by auto
-lemma foo659: "P --> P" by auto
-lemma foo660: "P --> P" by auto
-lemma foo661: "P --> P" by auto
-lemma foo662: "P --> P" by auto
-lemma foo663: "P --> P" by auto
-lemma foo664: "P --> P" by auto
-lemma foo665: "P --> P" by auto
-lemma foo666: "P --> P" by auto
-lemma foo667: "P --> P" by auto
-lemma foo668: "P --> P" by auto
-lemma foo669: "P --> P" by auto
-lemma foo670: "P --> P" by auto
-lemma foo671: "P --> P" by auto
-lemma foo672: "P --> P" by auto
-lemma foo673: "P --> P" by auto
-lemma foo674: "P --> P" by auto
-lemma foo675: "P --> P" by auto
-lemma foo676: "P --> P" by auto
-lemma foo677: "P --> P" by auto
-lemma foo678: "P --> P" by auto
-lemma foo679: "P --> P" by auto
-lemma foo680: "P --> P" by auto
-lemma foo681: "P --> P" by auto
-lemma foo682: "P --> P" by auto
-lemma foo683: "P --> P" by auto
-lemma foo684: "P --> P" by auto
-lemma foo685: "P --> P" by auto
-lemma foo686: "P --> P" by auto
-lemma foo687: "P --> P" by auto
-lemma foo688: "P --> P" by auto
-lemma foo689: "P --> P" by auto
-lemma foo690: "P --> P" by auto
-lemma foo691: "P --> P" by auto
-lemma foo692: "P --> P" by auto
-lemma foo693: "P --> P" by auto
-lemma foo694: "P --> P" by auto
-lemma foo695: "P --> P" by auto
-lemma foo696: "P --> P" by auto
-lemma foo697: "P --> P" by auto
-lemma foo698: "P --> P" by auto
-lemma foo699: "P --> P" by auto
-lemma foo700: "P --> P" by auto
-lemma foo701: "P --> P" by auto
-lemma foo702: "P --> P" by auto
-lemma foo703: "P --> P" by auto
-lemma foo704: "P --> P" by auto
-lemma foo705: "P --> P" by auto
-lemma foo706: "P --> P" by auto
-lemma foo707: "P --> P" by auto
-lemma foo708: "P --> P" by auto
-lemma foo709: "P --> P" by auto
-lemma foo710: "P --> P" by auto
-lemma foo711: "P --> P" by auto
-lemma foo712: "P --> P" by auto
-lemma foo713: "P --> P" by auto
-lemma foo714: "P --> P" by auto
-lemma foo715: "P --> P" by auto
-lemma foo716: "P --> P" by auto
-lemma foo717: "P --> P" by auto
-lemma foo718: "P --> P" by auto
-lemma foo719: "P --> P" by auto
-lemma foo720: "P --> P" by auto
-lemma foo721: "P --> P" by auto
-lemma foo722: "P --> P" by auto
-lemma foo723: "P --> P" by auto
-lemma foo724: "P --> P" by auto
-lemma foo725: "P --> P" by auto
-lemma foo726: "P --> P" by auto
-lemma foo727: "P --> P" by auto
-lemma foo728: "P --> P" by auto
-lemma foo729: "P --> P" by auto
-lemma foo730: "P --> P" by auto
-lemma foo731: "P --> P" by auto
-lemma foo732: "P --> P" by auto
-lemma foo733: "P --> P" by auto
-lemma foo734: "P --> P" by auto
-lemma foo735: "P --> P" by auto
-lemma foo736: "P --> P" by auto
-lemma foo737: "P --> P" by auto
-lemma foo738: "P --> P" by auto
-lemma foo739: "P --> P" by auto
-lemma foo740: "P --> P" by auto
-lemma foo741: "P --> P" by auto
-lemma foo742: "P --> P" by auto
-lemma foo743: "P --> P" by auto
-lemma foo744: "P --> P" by auto
-lemma foo745: "P --> P" by auto
-lemma foo746: "P --> P" by auto
-lemma foo747: "P --> P" by auto
-lemma foo748: "P --> P" by auto
-lemma foo749: "P --> P" by auto
-lemma foo750: "P --> P" by auto
-lemma foo751: "P --> P" by auto
-lemma foo752: "P --> P" by auto
-lemma foo753: "P --> P" by auto
-lemma foo754: "P --> P" by auto
-lemma foo755: "P --> P" by auto
-lemma foo756: "P --> P" by auto
-lemma foo757: "P --> P" by auto
-lemma foo758: "P --> P" by auto
-lemma foo759: "P --> P" by auto
-lemma foo760: "P --> P" by auto
-lemma foo761: "P --> P" by auto
-lemma foo762: "P --> P" by auto
-lemma foo763: "P --> P" by auto
-lemma foo764: "P --> P" by auto
-lemma foo765: "P --> P" by auto
-lemma foo766: "P --> P" by auto
-lemma foo767: "P --> P" by auto
-lemma foo768: "P --> P" by auto
-lemma foo769: "P --> P" by auto
-lemma foo770: "P --> P" by auto
-lemma foo771: "P --> P" by auto
-lemma foo772: "P --> P" by auto
-lemma foo773: "P --> P" by auto
-lemma foo774: "P --> P" by auto
-lemma foo775: "P --> P" by auto
-lemma foo776: "P --> P" by auto
-lemma foo777: "P --> P" by auto
-lemma foo778: "P --> P" by auto
-lemma foo779: "P --> P" by auto
-lemma foo780: "P --> P" by auto
-lemma foo781: "P --> P" by auto
-lemma foo782: "P --> P" by auto
-lemma foo783: "P --> P" by auto
-lemma foo784: "P --> P" by auto
-lemma foo785: "P --> P" by auto
-lemma foo786: "P --> P" by auto
-lemma foo787: "P --> P" by auto
-lemma foo788: "P --> P" by auto
-lemma foo789: "P --> P" by auto
-lemma foo790: "P --> P" by auto
-lemma foo791: "P --> P" by auto
-lemma foo792: "P --> P" by auto
-lemma foo793: "P --> P" by auto
-lemma foo794: "P --> P" by auto
-lemma foo795: "P --> P" by auto
-lemma foo796: "P --> P" by auto
-lemma foo797: "P --> P" by auto
-lemma foo798: "P --> P" by auto
-lemma foo799: "P --> P" by auto
-lemma foo800: "P --> P" by auto
-lemma foo801: "P --> P" by auto
-lemma foo802: "P --> P" by auto
-lemma foo803: "P --> P" by auto
-lemma foo804: "P --> P" by auto
-lemma foo805: "P --> P" by auto
-lemma foo806: "P --> P" by auto
-lemma foo807: "P --> P" by auto
-lemma foo808: "P --> P" by auto
-lemma foo809: "P --> P" by auto
-lemma foo810: "P --> P" by auto
-lemma foo811: "P --> P" by auto
-lemma foo812: "P --> P" by auto
-lemma foo813: "P --> P" by auto
-lemma foo814: "P --> P" by auto
-lemma foo815: "P --> P" by auto
-lemma foo816: "P --> P" by auto
-lemma foo817: "P --> P" by auto
-lemma foo818: "P --> P" by auto
-lemma foo819: "P --> P" by auto
-lemma foo820: "P --> P" by auto
-lemma foo821: "P --> P" by auto
-lemma foo822: "P --> P" by auto
-lemma foo823: "P --> P" by auto
-lemma foo824: "P --> P" by auto
-lemma foo825: "P --> P" by auto
-lemma foo826: "P --> P" by auto
-lemma foo827: "P --> P" by auto
-lemma foo828: "P --> P" by auto
-lemma foo829: "P --> P" by auto
-lemma foo830: "P --> P" by auto
-lemma foo831: "P --> P" by auto
-lemma foo832: "P --> P" by auto
-lemma foo833: "P --> P" by auto
-lemma foo834: "P --> P" by auto
-lemma foo835: "P --> P" by auto
-lemma foo836: "P --> P" by auto
-lemma foo837: "P --> P" by auto
-lemma foo838: "P --> P" by auto
-lemma foo839: "P --> P" by auto
-lemma foo840: "P --> P" by auto
-lemma foo841: "P --> P" by auto
-lemma foo842: "P --> P" by auto
-lemma foo843: "P --> P" by auto
-lemma foo844: "P --> P" by auto
-lemma foo845: "P --> P" by auto
-lemma foo846: "P --> P" by auto
-lemma foo847: "P --> P" by auto
-lemma foo848: "P --> P" by auto
-lemma foo849: "P --> P" by auto
-lemma foo850: "P --> P" by auto
-lemma foo851: "P --> P" by auto
-lemma foo852: "P --> P" by auto
-lemma foo853: "P --> P" by auto
-lemma foo854: "P --> P" by auto
-lemma foo855: "P --> P" by auto
-lemma foo856: "P --> P" by auto
-lemma foo857: "P --> P" by auto
-lemma foo858: "P --> P" by auto
-lemma foo859: "P --> P" by auto
-lemma foo860: "P --> P" by auto
-lemma foo861: "P --> P" by auto
-lemma foo862: "P --> P" by auto
-lemma foo863: "P --> P" by auto
-lemma foo864: "P --> P" by auto
-lemma foo865: "P --> P" by auto
-lemma foo866: "P --> P" by auto
-lemma foo867: "P --> P" by auto
-lemma foo868: "P --> P" by auto
-lemma foo869: "P --> P" by auto
-lemma foo870: "P --> P" by auto
-lemma foo871: "P --> P" by auto
-lemma foo872: "P --> P" by auto
-lemma foo873: "P --> P" by auto
-lemma foo874: "P --> P" by auto
-lemma foo875: "P --> P" by auto
-lemma foo876: "P --> P" by auto
-lemma foo877: "P --> P" by auto
-lemma foo878: "P --> P" by auto
-lemma foo879: "P --> P" by auto
-lemma foo880: "P --> P" by auto
-lemma foo881: "P --> P" by auto
-lemma foo882: "P --> P" by auto
-lemma foo883: "P --> P" by auto
-lemma foo884: "P --> P" by auto
-lemma foo885: "P --> P" by auto
-lemma foo886: "P --> P" by auto
-lemma foo887: "P --> P" by auto
-lemma foo888: "P --> P" by auto
-lemma foo889: "P --> P" by auto
-lemma foo890: "P --> P" by auto
-lemma foo891: "P --> P" by auto
-lemma foo892: "P --> P" by auto
-lemma foo893: "P --> P" by auto
-lemma foo894: "P --> P" by auto
-lemma foo895: "P --> P" by auto
-lemma foo896: "P --> P" by auto
-lemma foo897: "P --> P" by auto
-lemma foo898: "P --> P" by auto
-lemma foo899: "P --> P" by auto
-lemma foo900: "P --> P" by auto
-lemma foo901: "P --> P" by auto
-lemma foo902: "P --> P" by auto
-lemma foo903: "P --> P" by auto
-lemma foo904: "P --> P" by auto
-lemma foo905: "P --> P" by auto
-lemma foo906: "P --> P" by auto
-lemma foo907: "P --> P" by auto
-lemma foo908: "P --> P" by auto
-lemma foo909: "P --> P" by auto
-lemma foo910: "P --> P" by auto
-lemma foo911: "P --> P" by auto
-lemma foo912: "P --> P" by auto
-lemma foo913: "P --> P" by auto
-lemma foo914: "P --> P" by auto
-lemma foo915: "P --> P" by auto
-lemma foo916: "P --> P" by auto
-lemma foo917: "P --> P" by auto
-lemma foo918: "P --> P" by auto
-lemma foo919: "P --> P" by auto
-lemma foo920: "P --> P" by auto
-lemma foo921: "P --> P" by auto
-lemma foo922: "P --> P" by auto
-lemma foo923: "P --> P" by auto
-lemma foo924: "P --> P" by auto
-lemma foo925: "P --> P" by auto
-lemma foo926: "P --> P" by auto
-lemma foo927: "P --> P" by auto
-lemma foo928: "P --> P" by auto
-lemma foo929: "P --> P" by auto
-lemma foo930: "P --> P" by auto
-lemma foo931: "P --> P" by auto
-lemma foo932: "P --> P" by auto
-lemma foo933: "P --> P" by auto
-lemma foo934: "P --> P" by auto
-lemma foo935: "P --> P" by auto
-lemma foo936: "P --> P" by auto
-lemma foo937: "P --> P" by auto
-lemma foo938: "P --> P" by auto
-lemma foo939: "P --> P" by auto
-lemma foo940: "P --> P" by auto
-lemma foo941: "P --> P" by auto
-lemma foo942: "P --> P" by auto
-lemma foo943: "P --> P" by auto
-lemma foo944: "P --> P" by auto
-lemma foo945: "P --> P" by auto
-lemma foo946: "P --> P" by auto
-lemma foo947: "P --> P" by auto
-lemma foo948: "P --> P" by auto
-lemma foo949: "P --> P" by auto
-lemma foo950: "P --> P" by auto
-lemma foo951: "P --> P" by auto
-lemma foo952: "P --> P" by auto
-lemma foo953: "P --> P" by auto
-lemma foo954: "P --> P" by auto
-lemma foo955: "P --> P" by auto
-lemma foo956: "P --> P" by auto
-lemma foo957: "P --> P" by auto
-lemma foo958: "P --> P" by auto
-lemma foo959: "P --> P" by auto
-lemma foo960: "P --> P" by auto
-lemma foo961: "P --> P" by auto
-lemma foo962: "P --> P" by auto
-lemma foo963: "P --> P" by auto
-lemma foo964: "P --> P" by auto
-lemma foo965: "P --> P" by auto
-lemma foo966: "P --> P" by auto
-lemma foo967: "P --> P" by auto
-lemma foo968: "P --> P" by auto
-lemma foo969: "P --> P" by auto
-lemma foo970: "P --> P" by auto
-lemma foo971: "P --> P" by auto
-lemma foo972: "P --> P" by auto
-lemma foo973: "P --> P" by auto
-lemma foo974: "P --> P" by auto
-lemma foo975: "P --> P" by auto
-lemma foo976: "P --> P" by auto
-lemma foo977: "P --> P" by auto
-lemma foo978: "P --> P" by auto
-lemma foo979: "P --> P" by auto
-lemma foo980: "P --> P" by auto
-lemma foo981: "P --> P" by auto
-lemma foo982: "P --> P" by auto
-lemma foo983: "P --> P" by auto
-lemma foo984: "P --> P" by auto
-lemma foo985: "P --> P" by auto
-lemma foo986: "P --> P" by auto
-lemma foo987: "P --> P" by auto
-lemma foo988: "P --> P" by auto
-lemma foo989: "P --> P" by auto
-lemma foo990: "P --> P" by auto
-lemma foo991: "P --> P" by auto
-lemma foo992: "P --> P" by auto
-lemma foo993: "P --> P" by auto
-lemma foo994: "P --> P" by auto
-lemma foo995: "P --> P" by auto
-lemma foo996: "P --> P" by auto
-lemma foo997: "P --> P" by auto
-lemma foo998: "P --> P" by auto
-lemma foo999: "P --> P" by auto
-lemma foo1000: "P --> P" by auto
-
-ML {* warning (Timing.message (Timing.result start)) *}
-(* ELISP: -- (message "Time taken: %f seconds" (time-to-seconds (time-since 
start))) -- *)
-
-end
-
diff --git a/etc/isar/BackslashInStrings.thy b/etc/isar/BackslashInStrings.thy
deleted file mode 100644
index 2161ed8..0000000
--- a/etc/isar/BackslashInStrings.thy
+++ /dev/null
@@ -1,47 +0,0 @@
-theory BackslashInStrings imports Main begin
-
-consts test :: string
-
-(*
-
-10.8.04  NB: Isar currently sets \ as word constituent ("w").
-Isabelle sets it as a punctuation element (".").
-
-Experiments:  (modify-syntax-entry ?\\ "w")
-             (modify-syntax-entry ?\\ ".")
-
-(add-hook 'isar-mode-hook
-  (lambda () (modify-syntax-entry ?\\ "\\")))
-*)
-
-defs test_def: "test == ''System.out.println(\"List from here:\")''"
-
-
-end 
-
-
-
-(*
-
-I'd be grateful for a little help in solving a bug/issue that I'm encountering 
in using Proof General with strings. It appears that Isar doesn't correctly 
understand Isabelle strings correctly.
-
-He's an example theory that throws up the observed issues:
-
-theory Test = Main:
-
-consts test :: string
-
-defs test_def: "test == ''System.out.println(\"List from here:\")''"
-
-end
-
-Firstly, anything between escaped double quotes is incorrectly highlighted.
-
-This is benign, unless an Isar keyword occurs between the double quotes (eg. 
from). In this case, Isabelle throws an error when it trys to parse the 
Isabelle term - mainly, it appears, because Isar/Proof General has passed 
Isabelle an incorrect term.
-
-I presume there's some Proof General regular expression that needs modifying 
here?
-
-Any help in fixing the issue is greatly appreciated.
-
-Thanks,
-*)
diff --git a/etc/isar/BigErrors.thy b/etc/isar/BigErrors.thy
deleted file mode 100644
index 0dd41e4..0000000
--- a/etc/isar/BigErrors.thy
+++ /dev/null
@@ -1,20 +0,0 @@
-(* See http://proofgeneral.inf.ed.ac.uk/trac/ticket/274 *)
-
-theory BigErrors imports Pure 
-begin
-
-consts foo :: 'a
-consts bar :: 'a
-
-ML {* warning (cat_lines (replicate 300 "This is a big warning message")); *}
-
-(* Attempt to get a big error with "error" fails, but we can use printing 
function
-   (see FaultyErrors.thy) *)
-
-ML {* Output.error_msg (cat_lines (replicate 10000 "This is a big error 
message")); *}
-
-(* Note about FaultyErrors: the above generates an error
-   interactively but does *not* generate an error when 
-   required by another theory, see, BigErrorsNested *)
-
-end
diff --git a/etc/isar/BigErrorsNested.thy b/etc/isar/BigErrorsNested.thy
deleted file mode 100644
index 69fa714..0000000
--- a/etc/isar/BigErrorsNested.thy
+++ /dev/null
@@ -1,6 +0,0 @@
-(* See http://proofgeneral.inf.ed.ac.uk/trac/ticket/274 *)
-
-theory BigErrorsNested imports BigErrors 
-begin
-
-end
diff --git a/etc/isar/ChosenLogic.thy b/etc/isar/ChosenLogic.thy
deleted file mode 100644
index 67b164d..0000000
--- a/etc/isar/ChosenLogic.thy
+++ /dev/null
@@ -1,8 +0,0 @@
-(* -*- isabelle-chosen-logic: "ZF" -*- *)
-
-theory ChosenLogic imports Main_ZFC
-begin
-
-end
-
-
diff --git a/etc/isar/ChosenLogic2.thy b/etc/isar/ChosenLogic2.thy
deleted file mode 100644
index a7a6c93..0000000
--- a/etc/isar/ChosenLogic2.thy
+++ /dev/null
@@ -1,8 +0,0 @@
-(* -*- isabelle-chosen-logic: "HOL" -*- *)
-
-theory ChosenLogic2 imports HOL
-begin
-
-end
-
-
diff --git a/etc/isar/CommentParsingBug.thy b/etc/isar/CommentParsingBug.thy
deleted file mode 100644
index 0da1575..0000000
--- a/etc/isar/CommentParsingBug.thy
+++ /dev/null
@@ -1,3 +0,0 @@
-(**)(**)
-theory CommentParsingBug imports Main begin
-
diff --git a/etc/isar/CommentParsingBug2.thy b/etc/isar/CommentParsingBug2.thy
deleted file mode 100644
index a7bcba2..0000000
--- a/etc/isar/CommentParsingBug2.thy
+++ /dev/null
@@ -1,8 +0,0 @@
-(* Tobias reported 24.1.03.  Could not repeat prob *)
-theory CommentParsingBug2 imports Main begin
-
-(*
-defs
-*)
-
-end
diff --git a/etc/isar/Depends.thy b/etc/isar/Depends.thy
deleted file mode 100644
index 2d13c0f..0000000
--- a/etc/isar/Depends.thy
+++ /dev/null
@@ -1,14 +0,0 @@
-(* In order to test the latest thm deps setup, consider this example: *)
-
-theory Depends imports Main begin
-
-  lemma I: "A ==> A" and K: "A ==> B ==> A" .
-
-(*
-This reports I, K depending on several things; for your internal
-dependency graph you may interpret this as each member of {I, K} depending
-on all the deps.
-*)
-
-end
-
diff --git a/etc/isar/EmptyCommands.thy b/etc/isar/EmptyCommands.thy
deleted file mode 100644
index f361ecc..0000000
--- a/etc/isar/EmptyCommands.thy
+++ /dev/null
@@ -1,10 +0,0 @@
-(* See Trac #289, http://proofgeneral.inf.ed.ac.uk/trac/ticket/289 *)
-theory EmptyCommands imports Main begin
-
-term x;
-
-term y;
-
-; ;
-
-end
diff --git a/etc/isar/FaultyErrors.thy b/etc/isar/FaultyErrors.thy
deleted file mode 100644
index 5106ce7..0000000
--- a/etc/isar/FaultyErrors.thy
+++ /dev/null
@@ -1,28 +0,0 @@
-theory FaultyErrors imports Main
-begin
-
-lemma foo: "P --> P" by auto
-
-ML {* Output.error_msg "Fake error"; *} (* now *not* an error *)
-ML {* error "Real error" :unit; *}      (* a true error, command fails *)
-
-(* After an error message, the system wrongly thinks the
-   command has succeeded, currently 03.01.07.
-   This means that undo>redo fails.  
-   
-   This happens immediately after processing to the error and undoing
-   all the way back: redoing "theory" in Eclipse fails, because <undostep> is
-   used each time, and it doesn't get far enough.  Repeating theory gives
-   the error "can't use theory in theory mode".
-     
-   The lemma helps exercise the case that <abortheory> is used
-   to undo the theory quickly (as it should be, and as it is in
-   Emacs, by looking at the buffer), which fixes the "theory" redo.  
-   
-    1. Do until error
-    2. Undo to before lemma
-    3. Redo should not give warning message "foo is already defined".
-    
-   Now fixed for Eclipse and Emacs in Isabelle >=03.01.07.
-*)   
-end
diff --git a/etc/isar/Fibonacci.thy b/etc/isar/Fibonacci.thy
deleted file mode 100644
index d26f3af..0000000
--- a/etc/isar/Fibonacci.thy
+++ /dev/null
@@ -1,168 +0,0 @@
-(*  Copied from Isabelle2011-1/src/HOL/Isar_examples/ *)
-
-(*  Title:      HOL/Isar_Examples/Fibonacci.thy
-    Author:     Gertrud Bauer
-    Copyright   1999 Technische Universitaet Muenchen
-
-The Fibonacci function.  Demonstrates the use of recdef.  Original
-tactic script by Lawrence C Paulson.
-
-Fibonacci numbers: proofs of laws taken from
-
-  R. L. Graham, D. E. Knuth, O. Patashnik.
-  Concrete Mathematics.
-  (Addison-Wesley, 1989)
-*)
-
-header {* Fib and Gcd commute *}
-
-theory Fibonacci
-imports "~~/src/HOL/Number_Theory/Primes"
-begin
-
-text_raw {* \footnote{Isar version by Gertrud Bauer.  Original tactic
-  script by Larry Paulson.  A few proofs of laws taken from
-  \cite{Concrete-Math}.} *}
-
-
-declare One_nat_def [simp]
-
-
-subsection {* Fibonacci numbers *}
-
-fun fib :: "nat \<Rightarrow> nat" where
-  "fib 0 = 0"
-| "fib (Suc 0) = 1"
-| "fib (Suc (Suc x)) = fib x + fib (Suc x)"
-
-lemma [simp]: "fib (Suc n) > 0"
-  by (induct n rule: fib.induct) simp_all
-
-
-text {* Alternative induction rule. *}
-
-theorem fib_induct:
-    "P 0 ==> P 1 ==> (!!n. P (n + 1) ==> P n ==> P (n + 2)) ==> P (n::nat)"
-  by (induct rule: fib.induct) simp_all
-
-
-subsection {* Fib and gcd commute *}
-
-text {* A few laws taken from \cite{Concrete-Math}. *}
-
-lemma fib_add:
-  "fib (n + k + 1) = fib (k + 1) * fib (n + 1) + fib k * fib n"
-  (is "?P n")
-  -- {* see \cite[page 280]{Concrete-Math} *}
-proof (induct n rule: fib_induct)
-  show "?P 0" by simp
-  show "?P 1" by simp
-  fix n
-  have "fib (n + 2 + k + 1)
-    = fib (n + k + 1) + fib (n + 1 + k + 1)" by simp
-  also assume "fib (n + k + 1)
-    = fib (k + 1) * fib (n + 1) + fib k * fib n"
-      (is " _ = ?R1")
-  also assume "fib (n + 1 + k + 1)
-    = fib (k + 1) * fib (n + 1 + 1) + fib k * fib (n + 1)"
-      (is " _ = ?R2")
-  also have "?R1 + ?R2
-    = fib (k + 1) * fib (n + 2 + 1) + fib k * fib (n + 2)"
-    by (simp add: add_mult_distrib2)
-  finally show "?P (n + 2)" .
-qed
-
-lemma gcd_fib_Suc_eq_1: "gcd (fib n) (fib (n + 1)) = 1" (is "?P n")
-proof (induct n rule: fib_induct)
-  show "?P 0" by simp
-  show "?P 1" by simp
-  fix n
-  have "fib (n + 2 + 1) = fib (n + 1) + fib (n + 2)"
-    by simp
-  also have "... = fib (n + 2) + fib (n + 1)" by simp
-  also have "gcd (fib (n + 2)) ... = gcd (fib (n + 2)) (fib (n + 1))"
-    by (rule gcd_add2_nat)
-  also have "... = gcd (fib (n + 1)) (fib (n + 1 + 1))"
-    by (simp add: gcd_commute_nat)
-  also assume "... = 1"
-  finally show "?P (n + 2)" .
-qed
-
-lemma gcd_mult_add: "(0::nat) < n ==> gcd (n * k + m) n = gcd m n"
-proof -
-  assume "0 < n"
-  then have "gcd (n * k + m) n = gcd n (m mod n)"
-    by (simp add: gcd_non_0_nat add_commute)
-  also from `0 < n` have "... = gcd m n" by (simp add: gcd_non_0_nat)
-  finally show ?thesis .
-qed
-
-lemma gcd_fib_add: "gcd (fib m) (fib (n + m)) = gcd (fib m) (fib n)"
-proof (cases m)
-  case 0
-  then show ?thesis by simp
-next
-  case (Suc k)
-  then have "gcd (fib m) (fib (n + m)) = gcd (fib (n + k + 1)) (fib (k + 1))"
-    by (simp add: gcd_commute_nat)
-  also have "fib (n + k + 1)
-      = fib (k + 1) * fib (n + 1) + fib k * fib n"
-    by (rule fib_add)
-  also have "gcd ... (fib (k + 1)) = gcd (fib k * fib n) (fib (k + 1))"
-    by (simp add: gcd_mult_add)
-  also have "... = gcd (fib n) (fib (k + 1))"
-    by (simp only: gcd_fib_Suc_eq_1 gcd_mult_cancel_nat)
-  also have "... = gcd (fib m) (fib n)"
-    using Suc by (simp add: gcd_commute_nat)
-  finally show ?thesis .
-qed
-
-lemma gcd_fib_diff:
-  assumes "m <= n"
-  shows "gcd (fib m) (fib (n - m)) = gcd (fib m) (fib n)"
-proof -
-  have "gcd (fib m) (fib (n - m)) = gcd (fib m) (fib (n - m + m))"
-    by (simp add: gcd_fib_add)
-  also from `m <= n` have "n - m + m = n" by simp
-  finally show ?thesis .
-qed
-
-lemma gcd_fib_mod:
-  assumes "0 < m"
-  shows "gcd (fib m) (fib (n mod m)) = gcd (fib m) (fib n)"
-proof (induct n rule: nat_less_induct)
-  case (1 n) note hyp = this
-  show ?case
-  proof -
-    have "n mod m = (if n < m then n else (n - m) mod m)"
-      by (rule mod_if)
-    also have "gcd (fib m) (fib ...) = gcd (fib m) (fib n)"
-    proof (cases "n < m")
-      case True then show ?thesis by simp
-    next
-      case False then have "m <= n" by simp
-      from `0 < m` and False have "n - m < n" by simp
-      with hyp have "gcd (fib m) (fib ((n - m) mod m))
-          = gcd (fib m) (fib (n - m))" by simp
-      also have "... = gcd (fib m) (fib n)"
-        using `m <= n` by (rule gcd_fib_diff)
-      finally have "gcd (fib m) (fib ((n - m) mod m)) =
-          gcd (fib m) (fib n)" .
-      with False show ?thesis by simp
-    qed
-    finally show ?thesis .
-  qed
-qed
-
-theorem fib_gcd: "fib (gcd m n) = gcd (fib m) (fib n)" (is "?P m n")
-proof (induct m n rule: gcd_nat_induct)
-  fix m show "fib (gcd m 0) = gcd (fib m) (fib 0)" by simp
-  fix n :: nat assume n: "0 < n"
-  then have "gcd m n = gcd n (m mod n)" by (simp add: gcd_non_0_nat)
-  also assume hyp: "fib ... = gcd (fib n) (fib (m mod n))"
-  also from n have "... = gcd (fib n) (fib m)" by (rule gcd_fib_mod)
-  also have "... = gcd (fib m) (fib n)" by (rule gcd_commute_nat)
-  finally show "fib (gcd m n) = gcd (fib m) (fib n)" .
-qed
-
-end
diff --git a/etc/isar/HighlightSize.thy b/etc/isar/HighlightSize.thy
deleted file mode 100644
index 7c68b74..0000000
--- a/etc/isar/HighlightSize.thy
+++ /dev/null
@@ -1,13 +0,0 @@
-(* See: http://proofgeneral.inf.ed.ac.uk/trac/ticket/266 *)
-
-theory HighlightSize imports Main
-begin
-
-lemmas rules = sym refl trans sym refl trans sym refl trans sym refl trans sym 
refl trans
-
-ML_command {* Pretty.writeln (Pretty.markup Markup.hilite
-  [Proof_Context.pretty_fact @{context} ("foo", @{thms rules(1-14)})]) *}
-
-end
-
-
diff --git a/etc/isar/IllegalEscape.thy b/etc/isar/IllegalEscape.thy
deleted file mode 100644
index 3478830..0000000
--- a/etc/isar/IllegalEscape.thy
+++ /dev/null
@@ -1,7 +0,0 @@
-(* See http://proofgeneral.inf.ed.ac.uk/trac/ticket/166 *)
-
-theory IllegalEscape imports Main begin
-
-    lemma X: "a=b ==> b=a" by simp -- "Text with \illegal escape sequence"
-      oops
-end 
diff --git a/etc/isar/InterruptTest.thy.gz b/etc/isar/InterruptTest.thy.gz
deleted file mode 100644
index 4f21806..0000000
Binary files a/etc/isar/InterruptTest.thy.gz and /dev/null differ
diff --git a/etc/isar/MultipleModes.thy b/etc/isar/MultipleModes.thy
deleted file mode 100644
index 7e55257..0000000
--- a/etc/isar/MultipleModes.thy
+++ /dev/null
@@ -1,27 +0,0 @@
-header {* Some tests for \textbf{multiple modes!!} *}
-
-theory MultipleModes imports Main begin
-
-text {* Proper proof text -- \textit{naive version}. *}
-
-theorem and_comms: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then
-   show ?thesis ..
- qed
-qed
-
-ML {*
-  fun fact 0 = 1 
-    | fact n = n * (fact (n-1))
-
-  val x = 7; 
-*}
-
-end
-
-
diff --git a/etc/isar/NamesInStrings.thy b/etc/isar/NamesInStrings.thy
deleted file mode 100644
index 366b9a2..0000000
--- a/etc/isar/NamesInStrings.thy
+++ /dev/null
@@ -1,34 +0,0 @@
-theory "Names In Strings" imports Main begin   (* NB: must also check case 
without quotes! *)
-
-lemma foo: "B --> B" by auto
-
-lemma "foo bar": "B --> B" by auto
-
-lemma "foo-wiggle-bar": "B --> B" by auto
-
-theorem "x b": "B --> B" by auto
-
-(* NB: various other regexps and settings based on them are sensitive
-   to grouping in isar-name-regexp: should check function menu, imenu,
-   as well as undo behaviour. *)
-
-end
-
-
-(*
-
-I noticed the following minor problem with Isabelle and 
-ProofGeneral:
-
-
->>   theory "a" = Main:
->>   Proof General -> Use -> Retract:
->>   *** Outer syntax error: end of input expected,
->>   *** but identifier "a" was found
-
-Regards,
-Tjark
-
-*)
-
-
diff --git a/etc/isar/Parsing.thy b/etc/isar/Parsing.thy
deleted file mode 100644
index 98e8819..0000000
--- a/etc/isar/Parsing.thy
+++ /dev/null
@@ -1,75 +0,0 @@
-(* Not really a theory of parsing, but a test of Proof General's
-   parsing for Isabelle/Isar.... *)
-
-(* First, start with successive comments before a real command *)
-
-theory Parsing imports Main begin
-
-(* Then a comment *after* a command.  Also one which mentions
-   the names of commands, such as theory or theorem or proof itself,
-   never mind thus assume end qed. *)
-
-(* At the moment, successive comments are amalgamated, and comments
-   following commands are wrapped into the command (so cannot be
-   hidden). *)
-
-text {* Isar theories can have arbitrary literal text,
-          so the text must be ignored as well; thus. *}
-
-(* Those pieces of literal text are treated as another kind
-   of comment. What gets slight risky is when they're
-   text {* nested one inside the other. *}.
-   If Emacs confuses the two kinds of sequence, then
-   this can go wrong.
-*)
-
-text {* nesting (* may be the other way around *) *}
-
-(* The main type of comment (* may be nested *)
-   just like in SML. GNU Emacs [21.1] supports this now, nicely,
-   but XEmacs [21.4.8] doesn't, so colouration goes wrong.  
-   If there are any command names inside this comment
-   (e.g. theorem), it breaks the parser in XEmacs. 
-   [ To process this in XEmacs, delete "thxxrem" above, C-c C-n, C-x u ]
-*)
-
-(* Let's do my favourite proof. *)
-
-theorem and_comms: "A & B --> B & A"
-proof
-  assume "A & B"  (* it's "important" that we test "strings" I guess *)
-  then show "B & A"
-  proof
-    assume B A (* blah boo bah *)
-    then show ?thesis (* bah boo bah *)
-      ..
-  qed
-qed
-
-(* Another thing: nesting with { and } can be tricky. *)
-
-theorem and_comms_again: "A & B --> B & A"
-proof
-  assume "A & B" 
-  then show "B & A"
-  proof
-    {
-      assume B A
-      then show ?thesis
-       ..
-    }
-  qed
-qed
-
-(* Now the end of file is coming up.  Funny things happen
-   because PG only knows how commands start, not how they end.
-*)
-
-end
-(* That's the final command and it includes any text which follows it.
-   An oddity is that if there is a syntax error - unclosed comment
-   or whatever, after the last end, PG will say that it can't find
-   a complete command! 
-
-   Another oddity with comments at the end: these are left as "commands". *)
-
diff --git a/etc/isar/ParsingBug1.thy b/etc/isar/ParsingBug1.thy
deleted file mode 100644
index e56a5ae..0000000
--- a/etc/isar/ParsingBug1.thy
+++ /dev/null
@@ -1,15 +0,0 @@
-(* 
-  This is a small test case for parsing the { nested proof } phrase.
-
-  This case causes problems with the new parsing mechanism, see
-  comments in isar/isar-syntax.el and generic/proof-script.el
-*)
-  
-
-theory ParsingBug1 imports Main begin
-
-theorem "P"
-proof -
-  assume a: "Q"
-  {fix i have "Q" sorry}
-qed
diff --git a/etc/isar/Persistent.thy b/etc/isar/Persistent.thy
deleted file mode 100644
index 8a04288..0000000
--- a/etc/isar/Persistent.thy
+++ /dev/null
@@ -1,40 +0,0 @@
-(* 
-
-We now support persistent Isabelle sessions with Proof General, preserving
-the state of loaded theories (before I used to have a few explicit
-``bombs'' to prevent this).  When saying ``Exit Isabelle/Isar'' the image
-is committed back.  It's not possible to go continue partially processed
-theory buffer, but users could expect to have a fully processed theory
-stored properly.  The latter requires scripting to be disabled first, in
-order to inform the process to store the finished theory.
-
-To spare users to think about this, the ``Exit Isabelle/Isar''
-operation disables scripting automatically.
-
-Produce a writable Isabelle session like this:
-
-  isabelle -q HOL Foo
-
-Now start PG and start a process with the Foo logic image.
-
-Tests:
-
-  Process this file, exit, start.  
-  Unprocess, exit, start.              [FAILS with Isabelle2002]
-
-*)
-
-
-theory Persistent imports Main begin
-
-theorem and_comms: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume B and A
-    then show ?thesis ..
-  qed
-qed
-
-end
diff --git a/etc/isar/README b/etc/isar/README
deleted file mode 100644
index b2f5ffb..0000000
--- a/etc/isar/README
+++ /dev/null
@@ -1,8 +0,0 @@
-bad1.thy:
-  Bug test case: parser would silently skip bad command "foo".
-  Resolved as of 13.9.00
-
-bad2.thy:
-  Bug test case: synchronization problem on starting Isar process,
-  doesn't catch the first error.
-  Resolved as of 17.9.00
diff --git a/etc/isar/Sendback.thy b/etc/isar/Sendback.thy
deleted file mode 100644
index c77e90b..0000000
--- a/etc/isar/Sendback.thy
+++ /dev/null
@@ -1,23 +0,0 @@
-(* $Id$ *)
-
-header {* Demonstrate the use of literal command markup *}
-
-theory Sendback imports Main begin
-
-ML {*
-fun sendback cmd = ProofGeneral.sendback "Try this:" [Pretty.str cmd]
-fun sendback2 cmd1 cmd2 =
-  writeln ("Try: " ^ (Markup.markup Markup.sendback cmd1) ^ " or " ^
-                    (Markup.markup Markup.sendback cmd2))
-*}
-
-theorem and_comms: "A & B --> B & A"
-proof
-  ML_command {* sendback "assume \"A & B\"" *}
-  ML_command {* sendback "show \"B & A\"" *}
-  ML_command {* sendback2 "proof assume B and A then" 
-                         "proof assume A and B then" *}
-  ML_command {* sendback "show ?thesis .. qed" *}
-  ML_command {* sendback "qed" *}
-qed
-
diff --git a/etc/isar/TextProps.thy b/etc/isar/TextProps.thy
deleted file mode 100644
index 6c5b4b8..0000000
--- a/etc/isar/TextProps.thy
+++ /dev/null
@@ -1,22 +0,0 @@
-theory TextProps imports Main begin
-
-(* Note: nesting regions shows up possible text property 
-   merging problem inside Emacs/font-lock
-
-   \<^bbold>Bold and \<^bitalic>italic\<^eitalic>\<^ebold>
-
-   ;; good, desirable property value for 'face 
-   (append '(:slant italic) '(:weight bold font-lock-string-face))
-   (:slant italic :weight bold font-lock-string-face)
-
-   ;; bad, value obtained with font-lock-{append/prepend}-property:
-   (append '(:slant italic) '((:weight bold font-lock-string-face)))
-   (:slant italic (:weight bold font-lock-string-face))
-
-   For now we work around this in unicode-tokens 
-   (see unicode-tokens-prepend-text-properties)
-*)
-
-term "\<^bbold>Bold and \<^bitalic>italic\<^eitalic>\<^ebold>"
-
-end
diff --git a/etc/isar/TokensAcid.thy b/etc/isar/TokensAcid.thy
deleted file mode 100644
index 1759718..0000000
--- a/etc/isar/TokensAcid.thy
+++ /dev/null
@@ -1,218 +0,0 @@
-(* 
-   Some acid tests for token modes in Isabelle
-   David Aspinall, 2008-9.
-   $Id$
-
-   Note:
-    Unicode Tokens mode works much better in Emacs 23 than 22.
-
-   jEdit properties :tabSize=8:indentSize=8:noTabs=false:
-*)
-
-theory TokensAcid imports Main 
-begin
-
-(* Symbols.
-
-   Here's a table of all the standardly defined tokens for symbols,
-   produced by menu command Tokens -> List Tokens
-
-   You should see glyphs in all positions except the whitespace
-   tokens at positions 208, 262 and 263.
- 
-   I recommend using StixGeneral for symbols.
-   See http://www.stixfonts.org/
-   To install on Ubuntu, try:  
-
-         sudo apt-get install fonts-stix
-
-   Other good choices are: Lucida Grande, Lucida Sans Unicode, 
-   or DejaVuLGC Sans Mono.
-
-   Unfortunately 
-
-
- 1.  \<leftarrow>      \<rightarrow>   \<Leftarrow>    \<Rightarrow>   
\<leftrightarrow>       \<Leftrightarrow>       \<mapsto>       
\<longleftarrow>        \<Longleftarrow>        \<longrightarrow>
- 2.  \<Longrightarrow> \<longleftrightarrow>   \<Longleftrightarrow>   
\<longmapsto>   \<midarrow>     \<Midarrow>     \<hookleftarrow>        
\<hookrightarrow>       \<leftharpoondown>      \<rightharpoondown>
- 3.  \<leftharpoonup>  \<rightharpoonup>       \<rightleftharpoons>    
\<leadsto>      \<downharpoonleft>      \<downharpoonright>     
\<upharpoonleft>        \<upharpoonright>       \<restriction>  \<Colon>
- 4.  \<up>     \<Up>   \<down> \<Down> \<updown>       \<Updown>       
\<langle>       \<rangle>       \<lceil>        \<rceil>
- 5.  \<lfloor> \<rfloor>       \<lparr>        \<rparr>        \<lbrakk>       
\<rbrakk>       \<lbrace>       \<rbrace>       \<guillemotleft>        
\<guillemotright>
- 6.  \<bottom> \<top>  \<and>  \<And>  \<or>   \<Or>   \<forall>       
\<exists>       \<nexists>      \<not>
- 7.  \<box>    \<diamond>      \<turnstile>    \<Turnstile>    \<tturnstile>   
\<TTurnstile>   \<stileturn>    \<surd> \<le>   \<ge>
- 8.  \<lless>  \<ggreater>     \<lesssim>      \<greatersim>   \<lessapprox>   
\<greaterapprox>        \<in>   \<notin>        \<subset>       \<supset>
- 9.  \<subseteq>       \<supseteq>     \<sqsubset>     \<sqsupset>     
\<sqsubseteq>   \<sqsupseteq>   \<inter>        \<Inter>        \<union>        
\<Union>
-10.  \<squnion>        \<Squnion>      \<sqinter>      \<Sqinter>      
\<setminus>     \<propto>       \<uplus>        \<Uplus>        \<noteq>        
\<sim>
-11.  \<doteq>  \<simeq>        \<approx>       \<asymp>        \<cong> 
\<smile>        \<equiv>        \<frown>        \<Join> \<bowtie>
-12.  \<prec>   \<succ> \<preceq>       \<succeq>       \<parallel>     \<bar>  
\<plusminus>    \<minusplus>    \<times>        \<div>
-13.  \<cdot>   \<star> \<bullet>       \<circ> \<dagger>       \<ddagger>      
\<lhd>  \<rhd>  \<unlhd>        \<unrhd>
-14.  \<triangleleft>   \<triangleright>        \<triangle>     \<triangleq>    
\<oplus>        \<Oplus>        \<otimes>       \<Otimes>       \<odot> \<Odot>
-15.  \<ominus> \<oslash>       \<dots> \<cdots>        \<Sum>  \<Prod> 
\<Coprod>       \<infinity>     \<integral>     \<ointegral>
-16.  \<clubsuit>       \<diamondsuit>  \<heartsuit>    \<spadesuit>    
\<aleph>        \<emptyset>     \<nabla>        \<partial>      \<Re>   \<Im>
-17.  \<flat>   \<natural>      \<sharp>        \<angle>        \<copyright>    
\<registered>   \<hyphen>       \<inverse>      \<onesuperior>  \<twosuperior>
-18.  \<threesuperior>  \<onequarter>   \<onehalf>      \<threequarters>        
\<ordmasculine> \<ordfeminine>  \<section>      \<paragraph>    \<exclamdown>   
\<questiondown>
-19.  \<euro>   \<pounds>       \<yen>  \<cent> \<currency>     \<degree>       
\<amalg>        \<mho>  \<lozenge>      \<wp>
-20.  \<wrong>  \<struct>       \<acute>        \<index>        \<dieresis>     
\<cedilla>      \<hungarumlaut> \<spacespace>   \<module>       \<some>
-21.  \<stareq> \<defeq>        \<questioneq>   \<vartheta>     \<varpi>        
\<varrho>       \<varsigma>     \<varphi>       \<hbar> \<ell>
-22.  \<ast>    \<bigcirc>      \<bigtriangleup>        \<bigtriangledown>      
\<ni>   \<mid>  \<notlt>        \<notle>        \<notprec>      \<notpreceq>
-23.  \<notsubset>      \<notsubseteq>  \<notsqsubseteq>        \<notgt>        
\<notge>        \<notsucc>      \<notsucceq>    \<notsupset>    \<notsupseteq>  
\<notsqsupseteq>
-24.  \<notequiv>       \<notsim>       \<notsimeq>     \<notapprox>    
\<notcong>      \<notasymp>     \<nearrow>      \<searrow>      \<swarrow>      
\<nwarrow>
-25.  \<vdots>  \<ddots>        \<closequote>   \<openquote>    \<opendblquote> 
\<closedblquote>        \<emdash>       \<prime>        \<doubleprime>  
\<tripleprime>
-26.  \<quadrupleprime> \<nbspace>      \<thinspace>    \<notni>        
\<colonequals>  \<foursuperior> \<fivesuperior> \<sixsuperior>  
\<sevensuperior>        \<eightsuperior>
-27.  \<ninesuperior>   \<bool> \<complex>      \<nat>  \<rat>  \<real> \<int>  
\<alpha>        \<beta> \<gamma>
-28.  \<delta>  \<epsilon>      \<zeta> \<eta>  \<theta>        \<iota> 
\<kappa>        \<lambda>       \<mu>   \<nu>
-29.  \<xi>     \<pi>   \<rho>  \<sigma>        \<tau>  \<upsilon>      \<phi>  
\<chi>  \<psi>  \<omega>
-30.  \<Gamma>  \<Delta>        \<Theta>        \<Lambda>       \<Xi>   \<Pi>   
\<Sigma>        \<Upsilon>      \<Phi>  \<Psi>
-31.  \<Omega>  \<zero> \<one>  \<two>  \<three>        \<four> \<five> \<six>  
\<seven>        \<eight>
-32.  \<nine>   \<A>    \<B>    \<C>    \<D>    \<E>    \<F>    \<G>    \<H>    
\<I>
-33.  \<J>      \<K>    \<L>    \<M>    \<N>    \<O>    \<P>    \<Q>    \<R>    
\<S>
-34.  \<T>      \<U>    \<V>    \<W>    \<X>    \<Y>    \<Z>    \<a>    \<b>    
\<c>
-35.  \<d>      \<e>    \<f>    \<g>    \<h>    \<i>    \<j>    \<k>    \<l>    
\<m>
-36.  \<n>      \<o>    \<p>    \<q>    \<r>    \<s>    \<t>    \<u>    \<v>    
\<w>
-37.  \<x>      \<y>    \<z>    \<AA>   \<BB>   \<CC>   \<DD>   \<EE>   \<FF>   
\<GG>
-38.  \<HH>     \<II>   \<JJ>   \<KK>   \<LL>   \<MM>   \<NN>   \<OO>   \<PP>   
\<QQ>
-39.  \<RR>     \<SS>   \<TT>   \<UU>   \<VV>   \<WW>   \<XX>   \<YY>   \<ZZ>   
\<aa>
-40.  \<bb>     \<cc>   \<dd>   \<ee>   \<ff>   \<gg>   \<hh>   \<ii>   \<jj>   
\<kk>
-41.  \<ll>     \<mm>   \<nn>   \<oo>   \<pp>   \<qq>   \<rr>   \<ss>   \<tt>   
\<uu>
-42.  \<vv>     \<ww>   \<xx>   \<yy>   \<zz>                                   
 
-*)
-
-(* Tokens controlling layout and fonts: regions.
-
-   Token region convention in Isabelle is \<^bFOO>... \<^eFOO>
-  
-   The \<^bserif>font\<^eserif> and 
\<^bbold>bold\<^ebold>/\<^bitalic>italic\<^eitalic> controls are non-standard 
and
-   may not be supported by other interfaces.
-
-   Convenience functions:
-     Select a region, use Tokens -> Format Region -> Bold, etc
-  
-   Editing can be a bit fiddly, use C-c C-t C-t to show or hide
-   the control tokens to help.
-*)  
-
-(* Introduce uninterpreted term syntax using these features,
-   to check behaviour in locked/unlocked regions. *)
-
-consts longsub :: "['a,'a]\<Rightarrow>'a" ("_\<^bsub>_\<^esub>")
-consts longsup :: "['a,'a]\<Rightarrow>'a" ("_\<^bsup>_\<^esup>")
-
-consts bold    :: "'a\<Rightarrow>'a" ("\<^bbold>_\<^ebold>")
-consts italic  :: "'a\<Rightarrow>'a" ("\<^bitalic>_\<^eitalic>")
-consts sans    :: "'a\<Rightarrow>'a" ("\<^bsans>_\<^esans>")
-consts script  :: "'a\<Rightarrow>'a" ("\<^bscript>_\<^escript>")
-consts frakt   :: "'a\<Rightarrow>'a" ("\<^bfrakt>_\<^efrakt>")
-consts serif   :: "'a\<Rightarrow>'a" ("\<^bserif>_\<^eserif>")
-
-term "a\<^bsub>longsub\<^esub>"   term "b\<^bsup>longsuper\<^esup>"
-
-term "\<^bbold>Bold text\<^ebold>"  term "\<^bitalic>Italic text \<alpha> 
\<beta>\<^eitalic>"  
-term "\<^bsans>Sans \<gamma>\<^esans>"     term "\<^bscript>Script 
text\<^escript>"
-term "\<^bfrakt>Frakt stuff\<^efrakt>"  term "\<^bserif>Roman stuff\<^eserif>"
-   
-lemma "\<lbrakk> \<^bbold>(Bold text)\<^ebold>; Q \<rbrakk> \<Longrightarrow> 
Q"
-by auto
-
-(* Tokens controlling layout and fonts: next character.
-   These are tokens that affect the following character/identifier only.
-   Similar to previous case.
-
-   See Tokens -> Format Char -> ...
-*)
-
-consts shortsub :: "['a,'a]\<Rightarrow>'a" ("_\<^sub>_")
-consts shortsup :: "['a,'a]\<Rightarrow>'a" ("_\<^sup>_")
-
-consts charloc    :: "['a,'a]\<Rightarrow>'a" ("\<^loc>_")
-consts charbold   :: "['a,'a]\<Rightarrow>'a" ("\<^bold>_")
-consts charitalic :: "['a,'a]\<Rightarrow>'a" ("\<^italic>_")
-
-term "a\<^sub>b"
-term "a\<^sup>b"
-term "\<^loc>a"
-term "\<^bold>b"
-term "\<^italic>b"
-
-(* Further examples *)
-
-term "a\<^isub>\<gamma>\<delta>"     (* subscripted gamma  *)
-term "a\<^isub>def"  (* no subscript on ef *)
-
-term "a\<^isub>x\<^isub>y"      (* x and y subscripted individually *)
-term "a\<^isub>xabc\<^isub>y"   (* x and y should be subscripted, but not ab *)
-
-(* 
-   Variants on token names: different token names,
-   same appearance.   Simulated overloading, \<^bitalic>much\<^eitalic> 
simpler to do
-   this in the UI than mess with type classes, etc,
-   in the logical framework!
-
-   Demonstration: let's take back \<And> from the meta-level.
-
-   NB: the token scheme mechanism here is a PG convenience,
-   in other frontends you may have to define \ < AndX> to
-   appear in the same way as \ < And> individually.
-   Similarly for LaTeX output.
-
-   Use C-c C-t C-z to toggle the display of tokens.
-*)
-
-consts 
-   andprops :: "bool set \<Rightarrow> bool"      
-   andpreds :: "('a \<Rightarrow> bool) set \<Rightarrow> bool"   
-
-notation (xsymbols)
-   andprops ("\<And1>") and   (* token <And1>, hover to see this *)
-   andpreds ("\<And2>")       (* token <And2>, hover to see this *)
-
-term "\<And1> {True, False}"             
-term "\<And2> {\<lambda> x. True, \<lambda> y. False}"
-
-(* Note: of course, copy and paste using Unicode to another
-   application (Tokens \<rightarrow> Copy As Unicode) and then re-reading in
-   Isabelle using another interface will probably produce the wrong
-   result.  But copy-pasting within Proof General Emacs is fine since
-   the underlying token text is copied, not the presentation.
-   What happens is that the text properties are "sticky" and
-   copied as well, so you see them even in non-Unicode Tokens buffers.
-   But if you save and revisit, you'll see the real text.
-*)
-
-
-(* More esoteric non-standard stuff: unlikely in other interfaces *)
-
-consts 
-  shout :: "'a \<Rightarrow> 'a"
-  whisper :: "'a \<Rightarrow> 'a"
-  underline :: "'a \<Rightarrow> 'a"
-  overline :: "'a \<Rightarrow> 'a"
-
-notation (xsymbols)
-  shout ("\<^bbig>_\<^ebig>") and
-  whisper ("\<^bsmall>_\<^esmall>") and
-  underline ("\<^bunderline>_\<^eunderline>") and
-  overline ("\<^boverline>_\<^eoverline>")
-
-term "\<^bbig>large text \<alpha> \<beta> \<Sigma> \<integral>\<^ebig>"
-
-term "\<^bsmall>smaller text ((\<alpha> \<and> \<beta>) \<longrightarrow> 
\<gamma>) \<^esmall>"
-
-term "\<^bunderline>underlined\<^eunderline>"
-
-term "\<^boverline>overlined\<^eoverline>"
-
-
-(* Bold and italic combinations for regions *)
-term "\<^bbold>Bold and (\<^bitalic>italic\<^eitalic>)\<^ebold>"
-term "\<^bitalic>Italic and \<^bbold>bold\<^ebold>\<^eitalic>"
-
-(* Font and weight/shape changes for regions *)
-term "\<^bbold>Bold and \<^bscript>script\<^escript>\<^ebold>"
-term "\<^bserif>Roman and \<^bitalic>italic\<^eitalic> and 
\<^bbold>bold\<^ebold> \<^eserif>"
-term "\<^bfrakt>Frakt and \<^bitalic>italic\<^eitalic> and 
\<^bbold>bold\<^ebold> \<^efrakt>"
-
-(* Spanning identifier supers/subs: not included in standard Isabelle 
lexer/latex *)
-
-(* term "a\<^bisup>bcd\<^eisup>"
-   term "a\<^bisub>bcd\<^eisub>"  *)
-
-end
diff --git a/etc/isar/Trac189.thy b/etc/isar/Trac189.thy
deleted file mode 100644
index 43c4bdd..0000000
--- a/etc/isar/Trac189.thy
+++ /dev/null
@@ -1,8 +0,0 @@
-theory Trac189 imports Main begin
-
-
-(* Undoing of a diagnostic: exercises proof-no-command *)
-
-lemma "True"
-  apply (rule TrueI)
-  thm TrueI
diff --git a/etc/isar/Trac280-subrev.thy b/etc/isar/Trac280-subrev.thy
deleted file mode 100644
index ff392ec..0000000
--- a/etc/isar/Trac280-subrev.thy
+++ /dev/null
@@ -1,14 +0,0 @@
-theory "Trac280-subrev" imports Main begin
-
-lemma 
- assumes asm: "P\<^isub>i \<and> Q\<^isub>i"
- shows "Q\<^isub>i \<and> P\<^isub>i"
-proof - 
-  from asm obtain "P\<^isub>i" and "Q\<^isub>i"
-    by blast
-  then show "Q\<^isub>i \<and> P\<^isub>i"
-    by simp
-qed
-
-end
-
diff --git a/etc/isar/Unicode.thy b/etc/isar/Unicode.thy
deleted file mode 100644
index 95140e6..0000000
--- a/etc/isar/Unicode.thy
+++ /dev/null
@@ -1,73 +0,0 @@
-(* -*- coding: utf-8 -*- *)
-
-(*
-  Example theory involving unicode characters (utf-8 encoding) -- both
-  formal and informal ones.
-*)
-
-theory Unicode
-imports Main
-begin
-
-text {* The Hebrew Alef-Bet (א-ב). *}
-
-datatype alef_bet =
-    Alef    ("א")
-  | Bet     ("ב")
-  | Gimel   ("ג")
-  | Dalet   ("ד")
-  | He      ("ה")
-  | Vav     ("ו")
-  | Zayin   ("ז")
-  | Het     ("ח")
-  | Tet     ("ט")
-  | Yod     ("י")
-  | Kaf     ("כ")
-  | Lamed   ("ל")
-  | Mem     ("מ")
-  | Nun     ("נ")
-  | Samekh  ("ס")
-  | Ayin    ("ע")
-  | Pe      ("פ")
-  | Tsadi   ("צ")
-  | Qof     ("ק")
-  | Resh    ("ר")
-  | Shin    ("ש")
-  | Tav     ("ת")
-
-thm alef_bet.induct
-
-
-text {* Interpreting Hebrew letters as numbers. *}
-
-primrec mispar :: "alef_bet => nat"
-where
-  "mispar א = 1"
-| "mispar ב = 2"
-| "mispar ג = 3"
-| "mispar ד = 4"
-| "mispar ה = 5"
-| "mispar ו = 6"
-| "mispar ז = 7"
-| "mispar ח = 8"
-| "mispar ט = 9"
-| "mispar י = 10"
-| "mispar כ = 20"
-| "mispar ל = 30"
-| "mispar מ = 40"
-| "mispar נ = 50"
-| "mispar ס = 60"
-| "mispar ע = 70"
-| "mispar פ = 80"
-| "mispar צ = 90"
-| "mispar ק = 100"
-| "mispar ר = 200"
-| "mispar ש = 300"
-| "mispar ת = 400"
-
-thm mispar.simps
-
-lemma "mispar ק + mispar ל + mispar ה = 135"
-  by simp
-
-end
diff --git a/etc/isar/XEmacsSyntacticContextProb.thy 
b/etc/isar/XEmacsSyntacticContextProb.thy
deleted file mode 100644
index ef295a9..0000000
--- a/etc/isar/XEmacsSyntacticContextProb.thy
+++ /dev/null
@@ -1,20 +0,0 @@
-(* Demonstrates a bug with XEmacs 21.1: after procesing, between
-   two terms, buffer-syntactic-context returns "string".  
-   But _before_ processing, it correctly returns "nil".
-   Even when regions are removed, still get "string" returned
-   after processing started. 
-
-   Bug doesn't occur in GNU Emacs (using imp of buffer-syntactic context
-   provided in proof-compat.el), nor in XEmacs 21.4
-
-   Workaround added Fri Aug 10 13:55:28 BST 2001
-*)
-
-theory XEmacsSyntacticContextProb imports Main begin
-
-term "
-(f x)" 
-
-term "(f x)"
-
-end
diff --git a/etc/isar/XSymbolTests.thy b/etc/isar/XSymbolTests.thy
deleted file mode 100644
index 0425fc3..0000000
--- a/etc/isar/XSymbolTests.thy
+++ /dev/null
@@ -1,146 +0,0 @@
-(* Some checks for Unicode Tokens behaviour.  
-
-   This file should be displayed sensibly, and also the
-   display back from Isabelle ought to match.
-
-   $Id$
-*)
-
-theory XSymbolTests imports Main begin
-
-(* Fri Dec 14 13:20:38 GMT 2007.
-   http://proofgeneral.inf.ed.ac.uk/trac/ticket/161
-   Sub/superscript output not handled properly when enabled using
-   menu.   Fix: add fontification to proof-x-symbol-decode-region,
-   fix in proof-x-symbol.el 8.10.
-*)
-
-(* response output *)
-thm wf_trancl
-
-(* goals output *)
-lemma wf_trancl2 : "wf ?r \<Longrightarrow> wf (?r\<^sup>+)"
-by auto
-
-(* Thu Sep 25 16:26:47 BST 2003.  
-   Problem reported by Norbert Schirmer <norbert.schirmer@web.de>
-   Currently, superscript output highlighting seems broken anyway? *)
-
-consts "\<alpha1>":: "'a => 'a" ("\<alpha1>\<^sup>_")
-consts "\<alpha2>":: "'a => 'a => 'a" ("\<alpha2>\<^sup>_")
-consts "\<alpha3>":: "'a => 'a => 'a => 'a" ("_\<^sup>_\<^sup>_")
-
-consts k:: 'a
-
-term "\<alpha>"
-term "a\<^sup>b" (* b should be a blue variable *)
-term "\<forall>x. a\<^sup>x" (* x should be a green bound variable *)
-term "a\<^sup>k" (* k should be a black constant *)
-term "\<alpha>\<^isub>2" (* alpha should be blue variable with subscripted 
blue 2 *)
-term "\<alpha>\<^isup>x"  (* identifier *)
-
-consts sausage:: "'a => 'a => 'a" ("_\<^bsup>_\<^esup>" [1000,1000] 1000)
-
-term "k\<^bsup>long\<^esup>"  (* k black, long is blue *)
-
-
-(* 28.8.02: bug in pg-remove-specials broke this; now fixed *)
-
-lemma "A ==> A" .  -- OK
-
-consts A :: bool
-lemma "A ==> A" .  -- "xsymbols should be displayed!"
-
-
-(* Test electric token input: writing a token 
-like \ <alpha>  (without space, \<alpha>) should immediately 
-replace it. *)
-
-constdefs
- P1 :: bool   ("P\<^sub>1")    (* subscript *)
- "P\<^sub>1 == True"
- P2 :: bool   ("P\<^sup>2")    (* superscript *)
- "P\<^sup>2 == True"
-
- "P\<^loc>x" (* location escape *)
-
-(* Buglet here: if we enable x-sym during scripting,
-   goals/response flks are not updated, so xsyms
-   do not appear in output windows. Stoping/starting
-   prover fixes.
-*)
-
-thm P1_def P2_def      (* check display from Isabelle *)
-
-constdefs (* long sub/sups, new 29/12/03, added by Gerwin Klein *)
-
-\<^bitalic>test italics\<^eitalic>
-\<^bserif>serif\<^eserif>
-\<^bfrakt>fraktur\<^efrakt>
-\<^bbold>test\<^ebold>
-
-\<^bsub> asda low\<^esub>
- Plow :: bool ("P\<^bsub>low\<^esub>")         (* spanning subscript *)
-  "P\<^bsub>low\<^esub> \<equiv> True"
- Phigh :: bool ("P\<^bsup>high\<^esup>")               (* spanning superscript 
*)
-  "P\<^bsup>high\<^esup> \<equiv> True"
-
-thm Plow_def Phigh_def (* check display from Isabelle *)
-
-theorem "P\<^sub>1 \<and> P\<^sup>2";  (* check fonts in goals window *)
-by (simp add: P1_def P2_def)  (* .. and response window *)
-
-consts
- "P\<^sup>\<alpha>" :: bool   (* superscript of a token char *)
- "\<^bold>P"  :: bool   (* bold character *)
- "\<^italic>i"  :: int 
-
-\<^bitalic>italic?\<^eitalic>
-
-(* test: using a symbol as a subscript *)
-(* 9.3.03: this causes nasty prob with pre-command hook,
-   x-symbol-invisitiblity-spec type error, at least
-   during editing. *)
-consts
- intof :: "nat \<Rightarrow> int"  ("_\<^sub>\<int>" 50)
- mynat :: nat ("\<gamma>")
-\<one> \<two> \<C> \<J>      \<S> \<h> h \<AA> 
-
-\<^bscript>foo\<^escript>
-bar
-
-term "intof 3"
-
-constdefs
- myint :: int
- "myint == \<gamma>\<^sub>\<int>"
- 
-
-(* 
- Another X-Symbol oddity: sometimes the _first_ buffer to
- be visited displays _some_ characters as \2xx, e.g.
- for \<circ>.  But subsequent buffers to be visited work
- fine.  Problem is stable for turning x-symbol on/off.
- Revisting the first buffer cures the problem.
- Update: May be inherent problem with non-Mule version of
- X-Symbol (CW suggests)
-*)
-
-consts
-  iter :: "('a => 'a) => nat => ('a => 'a)"
-primrec
-  "iter f 0 = id"
-  "iter f (Suc n) = f \<circ> (iter f n)"
-
-
-end
-
-\<A>
-\<AA> \<ABC> \<ss> \<pounds> \<yen>
-
-SYMBOL Ideas:
-
- \<0x888>  for unicode character
- \<alpha:foo> for variants, same display
-
- \<color:foo> for colour, no sems (dropped in translation)
\ No newline at end of file
diff --git a/etc/isar/bad1.thy b/etc/isar/bad1.thy
deleted file mode 100644
index a355389..0000000
--- a/etc/isar/bad1.thy
+++ /dev/null
@@ -1,3 +0,0 @@
-(*foo*)
-foo
-end
diff --git a/etc/isar/bad2.thy b/etc/isar/bad2.thy
deleted file mode 100644
index 7a12fdb..0000000
--- a/etc/isar/bad2.thy
+++ /dev/null
@@ -1 +0,0 @@
-theory bad2 imports unknown begin
diff --git a/etc/isar/multiple/A.thy b/etc/isar/multiple/A.thy
deleted file mode 100644
index aac334a..0000000
--- a/etc/isar/multiple/A.thy
+++ /dev/null
@@ -1,7 +0,0 @@
-theory A imports Pure 
-begin
-
-consts foo :: 'a
-consts bar :: 'a
-
-end
diff --git a/etc/isar/multiple/B.thy b/etc/isar/multiple/B.thy
deleted file mode 100644
index efebff8..0000000
--- a/etc/isar/multiple/B.thy
+++ /dev/null
@@ -1,4 +0,0 @@
-theory B imports Pure
-begin
-
-end
diff --git a/etc/isar/multiple/C.thy b/etc/isar/multiple/C.thy
deleted file mode 100644
index 22d8685..0000000
--- a/etc/isar/multiple/C.thy
+++ /dev/null
@@ -1,4 +0,0 @@
-theory C imports A B
-begin
-
-end
diff --git a/etc/isar/multiple/D.thy b/etc/isar/multiple/D.thy
deleted file mode 100644
index 3c78e54..0000000
--- a/etc/isar/multiple/D.thy
+++ /dev/null
@@ -1,4 +0,0 @@
-theory D imports Pure
-begin
-
-end
diff --git a/etc/isar/multiple/E.thy b/etc/isar/multiple/E.thy
deleted file mode 100644
index 02d6202..0000000
--- a/etc/isar/multiple/E.thy
+++ /dev/null
@@ -1,4 +0,0 @@
-theory E imports C D
-begin
-
-end
diff --git a/etc/isar/multiple/README b/etc/isar/multiple/README
deleted file mode 100644
index ad57b44..0000000
--- a/etc/isar/multiple/README
+++ /dev/null
@@ -1,3 +0,0 @@
-
-Test files for multiple file handling with Isabelle/Isar
-(see also isa/multiple/README).
diff --git a/etc/isar/nesting-too-deep-for-parser.txt 
b/etc/isar/nesting-too-deep-for-parser.txt
deleted file mode 100644
index 580c640..0000000
--- a/etc/isar/nesting-too-deep-for-parser.txt
+++ /dev/null
@@ -1,1622 +0,0 @@
-Here is an example of some text which generates the "nesting too deep
-for parser" error message in XEmacs.  [da]
-
-Paste into the response buffer and do
-
- (proof-fontify-region (point-min) (point-max))
-
-Backtrace is this:
-
-  parse-partial-sexp(1 72319 nil nil nil syntax-table)
-  font-lock-fontify-syntactically-region(1 72319 nil)
-  font-lock-default-fontify-region(1 72319 nil)
-  (let ((font-lock-keywords proof-font-lock-keywords)) (if (and 
proof-running-on-XEmacs ... ... ...) (progn ... ...)) (save-restriction 
(narrow-to-region start end) (run-hooks ...) (setq end ...)) 
(font-lock-default-fontify-region start end nil))
-  (progn (proof-font-lock-set-font-lock-vars) (unless proof-running-on-XEmacs 
(font-lock-set-defaults)) (let (...) (if ... ...) (save-restriction ... ... 
...) (font-lock-default-fontify-region start end nil)))
-  (if proof-output-fontify-enable (progn (proof-font-lock-set-font-lock-vars) 
(unless proof-running-on-XEmacs ...) (let ... ... ... ...)))
-  proof-fontify-region(1 72319)
-
-How deep is too deep?
-
-
-  (parse-partial-sexp 1 72319 10)
-  (parse-partial-sexp 1 72319 20)
-  (parse-partial-sexp 1 72319 80)
-  (parse-partial-sexp 1 72319 99)     -- gets to char 51927
-  (parse-partial-sexp 1 72319 100)    -- Gives error on XEmacs 21.4.15 
-                                    -- still on
-    Value: "21.5  (beta17) \"chayote\" (+CVS-20040622) XEmacs Lucid"
-
-  (parse-partial-sexp 1 72319 200)    -- reaches end of this text at
-                                        depth 130 in Emacs 21.3.1
-
-In fact Emacs 21.3.1 isn't bothered by a buffer containing 40,000 left-parens.
-Bug report at bottom [23.6.04].
-
------------------
-
-
-"$ISATOOL" document -c -o 'ps' '/tmp/isabelle-da4586/document' 2>&1
-This is TeXk, Version 3.14159 (Web2C 7.4.5)
- %&-line parsing enabled.
-LaTeX2e <2001/06/01>
-Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
-ohyphenation, loaded.
-
-(./root.tex (/usr/share/texmf/tex/latex/base/article.cls
-Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
-(/usr/share/texmf/tex/latex/base/size10.clo)) (./isabelle.sty)
-(./isabellesym.sty) (/usr/share/texmf/tex/latex/base/inputenc.sty
-(/usr/share/texmf/tex/latex/base/latin1.def)) (./pdfsetup.sty)
-(/usr/local/texmf.da/tex/latex/comisc/url.sty)
-(/usr/share/texmf/tex/latex/base/latexsym.sty)
-No file root.aux.
-(./session.tex (./HeapSortProofVCG.tex
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 6--7
-[][]  \OT1/cmtt/m/sl/9 -- would be desirable to redesign CALLMP rule so that si
-de condition which[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 12--13
-[][]       \OT1/cmtt/m/sl/9 generates (variable number of) subgoals for each fu
-nction that is dominated
-(/usr/share/texmf/tex/latex/base/ulasy.fd)
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 19--20
-[][]       \OT1/cmtt/m/sl/9 need to verify n+1, which leaves indeterminate numb
-er of side-condition
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 31--32
-[][]       \OT1/cmtt/m/sl/9 maybe a good idea to have a method for (each) primi
-tives, and then a
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 32--33
-[][]       \OT1/cmtt/m/sl/9 let which does the composition on-the-fly  --- this
- avoids duplicating
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 35--36
-[][]        \OT1/cmtt/m/sl/9 -- define ML values bound to tactics appearing in 
-bodies of methods[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 47--48
-[][]\OT1/cmtt/m/sl/9 text {*This corresponds to the following specifications, f
-ormalised from the
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 48--49
-[][]       \OT1/cmtt/m/sl/9 method bodies: the contexts (in second parameter of
- @{text DAss}) are
-[1]
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 52--53
-[][]  \OT1/cmtt/m/sl/9 (if M = Insert then (DAss {t_} 1 (emptyfinmap(t_ $\OMS/c
-msy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (TreeET
-
-Overfull \hbox (29.18028pt too wide) in paragraph at lines 53--54
-[][]  \OT1/cmtt/m/sl/9 if M = Removesome then (DAss {t_} 0 (emptyfinmap(t_ $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ResultET
-
-Overfull \hbox (24.45532pt too wide) in paragraph at lines 54--55
-[][]  \OT1/cmtt/m/sl/9 if M = Removetop then (DAss {t_} 0 (emptyfinmap(t_ $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ResultET
-
-Overfull \hbox (15.0054pt too wide) in paragraph at lines 55--56
-[][]  \OT1/cmtt/m/sl/9 if M = Make_heap then (DAss {l_} 0 (emptyfinmap(l_ $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0))) (TreeET
-
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 56--57
-[][]  \OT1/cmtt/m/sl/9 if M = Extract then (DAss {h_} 0 (emptyfinmap(h_ $\OMS/c
-msy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ListET
-
-Overfull \hbox (19.73036pt too wide) in paragraph at lines 57--58
-[][]  \OT1/cmtt/m/sl/9 if M = Siftdown then (DAss {t1_, t2_} 1 (emptyfinmap(t1_
- $\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))(t2_
-
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 58--59
-[][]  \OT1/cmtt/m/sl/9 if M = Sort then (DAss {l_} 0 (emptyfinmap(l_ $\OMS/cmsy
-/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0))) (ListET 0)
-
-Overfull \hbox (20.53447pt too wide) in paragraph at lines 65--66
-[][]\OT1/cmtt/m/sl/9 "sMST == ($\OML/cmm/m/it/9 ^^U$ \OT1/cmtt/m/sl/9 C M args 
-E h hh v p. SPEC M (newframe_env Nullref (fst (methtable
-
-Overfull \hbox (70.79651pt too wide) in paragraph at lines 70--71
-[][]  \OT1/cmtt/m/sl/9 Meth_Insert Fun_fInsert Fun_fzeroInsert Fun_foneInsert F
-un_ftwoInsert Fun_fthreeInsert[] 
-
-Overfull \hbox (61.34659pt too wide) in paragraph at lines 74--75
-[][]  \OT1/cmtt/m/sl/9 Meth_Removetop Fun_fRemovetop Fun_fzeroRemovetop Fun_fon
-eRemovetop Fun_ftwoRemovetop
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 75--76
-[][]  \OT1/cmtt/m/sl/9 Meth_Siftdown Fun_fSiftdown Fun_fzeroSiftdown Fun_foneSi
-ftdown Fun_ftwoSiftdown
-
-Overfull \hbox (89.69635pt too wide) in paragraph at lines 76--77
-[][]  \OT1/cmtt/m/sl/9 Fun_ffourSiftdown Fun_ffiveSiftdown Fun_fsixSiftdown Fun
-_fsevenSiftdown Fun_feightSiftdown[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 77--78
-[][]  \OT1/cmtt/m/sl/9 Fun_fnineSiftdown Fun_ftenSiftdown Fun_felevenSiftdown F
-un_ftwelveSiftdown
-
-Overfull \hbox (70.79651pt too wide) in paragraph at lines 78--79
-[][]  \OT1/cmtt/m/sl/9 Fun_ffourteenSiftdown Fun_ffifteenSiftdown Fun_fsixteenS
-iftdown Fun_fseventeenSiftdown
-
-Overfull \hbox (38.27744pt too wide) in paragraph at lines 81--82
-[][]\OT1/cmtt/m/sl/9 lemma LL2: "$[]$(E, h, U,C,R,m):CS; U = V$[]$ $[][]\OMS/cm
-sy/m/n/9 )$ \OT1/cmtt/m/sl/9 (E, h, V,C,R,m):CS" (*<*)by simp(*>*)[] 
-
-Overfull \hbox (12.18752pt too wide) in paragraph at lines 88--89
-[][]  $[]$ \OT1/cmtt/m/sl/9 {y,z} , 1 , (emptyfinmap(y $\OMS/cmsy/m/n/9 7!$$[][
-]$\OT1/cmtt/m/sl/9 (TreeET 0))(z $\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (Tr
-eeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 (TreeET
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 90--91
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-[2]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 92--93
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 96--97
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (7.43889pt too wide) in paragraph at lines 103--104
-[][] $[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x}, 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0)))  $\OMS/cmsy/m/n/9 ^^]$ \OT1
-/cmtt/m/sl/9 (TreeET 0) , 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 105--106
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 107--108
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 111--112
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 120--121
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 122--123
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 126--127
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.71393pt too wide) in paragraph at lines 133--134
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x}, 0 , (emptyfinmap(x $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0)))  $\OMS/cmsy/m/n/9 ^^]$ \OT1/
-cmtt/m/sl/9 (ListET 0) , 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 135--136
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 137--138
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-[3]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 141--142
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (3.75562pt too wide) in paragraph at lines 148--149
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {y} , 1 , (emptyfinmap(y $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (TreeET 0), 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 150--151
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 152--153
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 156--157
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.55698pt too wide) in paragraph at lines 163--164
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x} , 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (ResultET 0 (TreeET 0)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 165--166
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 167--168
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 171--172
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.55698pt too wide) in paragraph at lines 178--179
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x} , 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (ResultET 0 (TreeET 0)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 180--181
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 182--183
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-[4]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 186--187
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.5181pt too wide) in paragraph at lines 208--209
-[][]\OT1/cmtt/m/sl/9 lemma vcg_rvar: "GETr C x = Some T $[][]\OMS/cmsy/m/n/9 )$
- \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 RVar x : $[]$ {x} , n
- , C $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T
-
-Overfull \hbox (12.12497pt too wide) in paragraph at lines 218--219
-[][]                 $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 
-^^C$  \OT1/cmtt/m/sl/9 RPrimop f x y : $[]$ {x, y} , n , C $\OMS/cmsy/m/n/9 ^^]
-$ \OT1/cmtt/m/sl/9 IntET , n $[]$"
-
-Overfull \hbox (8.07211pt too wide) in paragraph at lines 230--231
-[][]     \OT1/cmtt/m/sl/9 "$[]$GETr C y = Some (TreeET k); GETr C z = Some (Tre
-eET k); y$\OMS/cmsy/m/n/9 6\OT1/cmr/m/n/9 =$\OT1/cmtt/m/sl/9 z; n=(Suc
-
-Overfull \hbox (17.61093pt too wide) in paragraph at lines 231--232
-[][]     $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cm
-tt/m/sl/9 (DIAM$[]$Make_IIDD ([VALarg (IVal 3), INarg v, RNarg y, RNarg z]))
-[5]
-Overfull \hbox (1.16122pt too wide) in paragraph at lines 239--240
-[][]  \OT1/cmtt/m/sl/9 "$\OMS/cmsy/m/n/9 :$ \OT1/cmtt/m/sl/9 isMergePoint f $\O
-MS/cmsy/m/n/9 ^$ \OT1/cmtt/m/sl/9 (dominates f, G, f, $[]$U, n, C $\OMS/cmsy/m/
-n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$) $\OMS/cmsy/m/n/9 2$ \OT1/cmtt/m/sl/9 DOM_Ca
-ll
-
-Overfull \hbox (12.61101pt too wide) in paragraph at lines 241--242
-[][]\OT1/cmtt/m/sl/9 (CALL f, $[]$U, n , restr C (ParList2RnameList (fst (funta
-ble f))) $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T , m $[]$)
-
-Overfull \hbox (1.16122pt too wide) in paragraph at lines 245--246
-[][]  \OT1/cmtt/m/sl/9 "$\OMS/cmsy/m/n/9 :$ \OT1/cmtt/m/sl/9 isMergePoint f $\O
-MS/cmsy/m/n/9 ^$ \OT1/cmtt/m/sl/9 (dominates f, G, f, $[]$U, n, C $\OMS/cmsy/m/
-n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$) $\OMS/cmsy/m/n/9 2$ \OT1/cmtt/m/sl/9 DOM_Ca
-ll
-
-Overfull \hbox (12.61101pt too wide) in paragraph at lines 247--248
-[][]\OT1/cmtt/m/sl/9 (CALL f, $[]$U, n , restr C (ParList2RnameList (fst (funta
-ble f))) $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T , m $[]$)
-
-Overfull \hbox (8.40714pt too wide) in paragraph at lines 256--257
-[][]  \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 e : $[]$ U1 , n 
-, C $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T1 , m $[]$ ; G $\U/lasy/m/n/9 ^^C$
-  \OT1/cmtt/m/sl/9 ee : $[]$ U2 , m , C(x$\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/
-sl/9 T1) $\OMS/cmsy/m/n/9 ^^]$
-
-Overfull \hbox (4.4306pt too wide) in paragraph at lines 257--258
-[][]  \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 (LET rf x =e IN 
-ee END) : $[]$ U1 $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/m/sl/9 (U2 - {x}) , n , C $\OMS
-/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T2 , k $[]$"[] 
-
-Overfull \hbox (5.1584pt too wide) in paragraph at lines 270--271
-[][]  $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/
-m/sl/9 (LET z = RPrimop f x y IN e END) : $[]${x, y} $\OMS/cmsy/m/n/9 [$ \OT1/c
-mtt/m/sl/9 U, n, C $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$"
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 273--274
-[][]\OT1/cmtt/m/sl/9 (* Note: side conditions in match rules cannot be solved u
-ntil later because
-[6]
-Overfull \hbox (28.63316pt too wide) in paragraph at lines 292--293
-[][]$[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m
-/sl/9 (LET cont =t$[]$V0; rf left =t$\OMS/cmsy/m/n/9 }$\OT1/cmtt/m/sl/9 R1; rf 
-right =t$\OMS/cmsy/m/n/9 }$\OT1/cmtt/m/sl/9 R2;  _ =DIAM$[]$Free([RNarg
-
-Overfull \hbox (8.16101pt too wide) in paragraph at lines 300--301
-[][] $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m
-/sl/9 (LET h = GetFi l V0; rf t = GetFr l R1; _ = DIAM$[]$Free ([RNarg l])
-
-Overfull \hbox (8.16101pt too wide) in paragraph at lines 308--309
-[][] $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m
-/sl/9 (LET h = GetFi l V0; rf t = GetFr l R1; _ = DIAM$[]$Free ([RNarg l])
-
-Overfull \hbox (1.11948pt too wide) in paragraph at lines 315--316
-[][]     $\OMS/cmsy/m/n/9 8 $ \OT1/cmtt/m/sl/9 E h hh v p. sMST c M L E h hh v 
-p $[][]\OMS/cmsy/m/n/9 !$ $[]$\OT1/cmtt/m/sl/9 U, n, C $\OMS/cmsy/m/n/9 ^^]$ \O
-T1/cmtt/m/sl/9 T1, m$[]$ E h hh v
-
-Overfull \hbox (4.43343pt too wide) in paragraph at lines 319--320
-[][]   $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmt
-t/m/sl/9 (LET rf x = c$[]$M(L) IN e END) : $[]$U $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/
-m/sl/9 (V-{x}), nk, D $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, l$[]$"
-
-Overfull \hbox (3.34715pt too wide) in paragraph at lines 323--324
-[][]     \OT1/cmtt/m/sl/9 "$[]$GETr C y = Some (TreeET k);GETr C z = Some (Tree
-ET k); y$\OMS/cmsy/m/n/9 6\OT1/cmr/m/n/9 =$\OT1/cmtt/m/sl/9 z; n=(Suc
-[7]
-Overfull \hbox (3.43605pt too wide) in paragraph at lines 326--327
-[][]     $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cm
-tt/m/sl/9 (LET rf x = DIAM$[]$Make_IIDD ([VALarg (IVal 3), INarg v, RNarg
-
-Overfull \hbox (62.34396pt too wide) in paragraph at lines 326--327
-\OT1/cmtt/m/sl/9 y, RNarg z]) IN e END): $[]$({y,z} $\OMS/cmsy/m/n/9 [$ \OT1/cm
-tt/m/sl/9 (U-{x})), n, C $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, l$[]$" by (e
-rule DA_LetrMakeTree,
-
-Overfull \hbox (19.73325pt too wide) in paragraph at lines 335--336
-[][]\OT1/cmtt/m/sl/9 lemma vcg_domcallcons: "$[]$(t,{(Call h, $[]$U, n, C $\OMS
-/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$)} $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/m/sl
-/9 G,f,P):DOM_Call;[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 347--348
-[][]       \OT1/cmtt/m/sl/9 context which contains an one entry for each syntac
-tic method invocation.*}[] 
-
-Overfull \hbox (3.92209pt too wide) in paragraph at lines 350--351
-[][]  \OT1/cmtt/m/sl/9 {(HS$[]$Insert([INarg x_,RNarg r2_]), sMST HS Insert [IN
-arg x_,RNarg r2_]),[] 
-
-Overfull \hbox (8.64705pt too wide) in paragraph at lines 351--352
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Insert([INarg v4_,RNarg r2_]), sMST HS Insert [IN
-arg v4_,RNarg r2_]),[] 
-
-Overfull \hbox (3.92209pt too wide) in paragraph at lines 358--359
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg v2_, RNarg r3_, RNarg r1_]), sMST
- HS Siftdown [INarg
-
-Overfull \hbox (18.09697pt too wide) in paragraph at lines 359--360
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg w_, RNarg r5_, RNarg r4_]), sMST 
-HS Siftdown [INarg w_,
-
-Overfull \hbox (18.09697pt too wide) in paragraph at lines 360--361
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg w_, RNarg r8_, RNarg r7_]), sMST 
-HS Siftdown [INarg w_,
-[8]
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 380--381
-[][]    \OT1/cmtt/m/sl/9 CHANGED (simp_tac ((Simplifier.get_local_simpset ctxt)
- addsimps thms) i)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 382--383
-[][]    \OT1/cmtt/m/sl/9 CHANGED (asm_simp_tac ((Simplifier.get_local_simpset c
-txt) addsimps thms)
-[9] [10]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 510--511
-[][]\OT1/cmtt/m/sl/9 (*            apply method_Let prefer 2 apply (simp add: H
-eapSortContext_def)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 511--512
-[][]                             \OT1/cmtt/m/sl/9 prefer 2 apply (clarsimp, eru
-le Siftdown_Invoke,
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 518--519
-[][]  \OT1/cmtt/m/sl/9 (* for solving premise of vcg_call -- either unfold Dom 
-def, or lookup *)
-[11]
-Overfull \hbox (28.27187pt too wide) in paragraph at lines 557--558
-[][]   \OT1/cmtt/m/sl/9 fun main_tac ctxt (alldefs as (flowdefs,dom_defs,gamma_
-def)) i state = state
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 562--563
-[][]   \OT1/cmtt/m/sl/9 and main_tac_aux ctxt (alldefs as (flowdefs,dom_defs,ga
-mma_def)) i state
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 566--567
-[][]            \OT1/cmtt/m/sl/9 let_tac ctxt (flowdefs @ gamma_def)  (main_tac
-_aux ctxt alldefs)
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 575--576
-[][]\OT1/cmtt/m/sl/9 (* Testing methods for invoking parts of the tactic above 
-[for debug only]
-[12]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 585--586
-[][]\OT1/cmtt/m/sl/9 method_setup method_Let = {* Method.thms_ctxt_args (fn thm
-s => fn ctxt => [] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 589--590
-[][]\OT1/cmtt/m/sl/9 (* apply (rule vcg_call) apply (simp add: dominates_def is
-MergePoint_def) *)[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 594--595
-[][]\OT1/cmtt/m/sl/9 (* apply (simp?, (rule DA_NullResult, simp) | rule DA_Null
-Tree | rule DA_NullList)
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 603--604
-[][]\OT1/cmtt/m/sl/9 (* FIXME: to combine method_Call with method_Dom or mergep
-oint stuff, we need
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 606--607
-[][]\OT1/cmtt/m/sl/9 (* apply ((rule vcg_domcallcons) | (rule vcg_domcallnil))+
- apply simp apply
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 608--609
-[][]  \OT1/cmtt/m/sl/9 fn ctxt => Method.METHOD (fn facts => dom_tac ctxt thms 
-stop stop 1)) *}[] 
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 624--625
-[][]         \OT1/cmtt/m/sl/9 two_subgoal_tacs i THEN vdm_tac (i+1) THEN vdm_ta
-c i,  (* stack: reverse
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 630--631
-[][]\OT1/cmtt/m/sl/9 (* apply ((rule vcg_domcallcons) | (rule vcg_domcallnil))+
- apply simp apply
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 631--632
-[][]\OT1/cmtt/m/sl/9 method_setup method_Weak = {* Method.thms_ctxt_args (fn th
-ms => fn ctxt =>
-[13]
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 636--637
-[][]\OT1/cmtt/m/sl/9 (*methods call and dom are applied together, using CallDom
-: proofs takes 55secs*)[] 
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 642--643
-[][]\OT1/cmtt/m/sl/9 (* apply (method_main dominates_def isMergePoint_def MFS_d
-efs SPEC_def) *)[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 657--658
-[][]\OT1/cmtt/m/sl/9 (* Method main: writing bits of ML code to parse in Isar i
-s a pain, so we hardwire[] 
-
-Overfull \hbox (28.27187pt too wide) in paragraph at lines 666--667
-[][]  \OT1/cmtt/m/sl/9 Method.METHOD (fn facts => main_tac ctxt (thms "flow_def
-s", thms "doms_defs",
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 670--671
-[][]  \OT1/cmtt/m/sl/9 Method.METHOD (fn facts => main_tac_aux ctxt (thms "flow
-_defs", thms "doms_defs",
-
-Overfull \hbox (13.4388pt too wide) in paragraph at lines 674--675
-[][]\OT1/cmtt/m/sl/9 "$[]$G = HeapSortContext$[]$ $[][]\OMS/cmsy/m/n/9 )$ \OT1/
-cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m/sl/9 snd (methtable HS Siftdown) 
-: SPEC Siftdown"[] 
-[14] [15] [16]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 805--806
-[][]                \OT1/cmtt/m/sl/9 apply (method_Dom doms_defs)  (* this the 
-place that cut is
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 830--831
-[][]                                \OT1/cmtt/m/sl/9 (*Call*) (* first call to 
-the merge point ffour*)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 840--841
-[][]                                \OT1/cmtt/m/sl/9 (*Call*) (*This is the sec
-ond call to ffour*)[] 
-[17]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 853--854
-[][]                    \OT1/cmtt/m/sl/9 (*1*) apply simp (*contraint came from
- TreematchD STAR.*)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 855--856
-[][]                     \OT1/cmtt/m/sl/9 (*this is like a top-level verificati
-on, i.e.starts with
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 878--879
-[][]                           \OT1/cmtt/m/sl/9 apply (method_Dom doms_defs)  (
-* this the place
-[18]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 900--901
-[][]                                   \OT1/cmtt/m/sl/9 (*call This is the firs
-t call to feleven*)[] 
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 910--911
-[][]                                   \OT1/cmtt/m/sl/9 (*call This is the seco
-nd call to feleven*)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 920--921
-[][]                                 \OT1/cmtt/m/sl/9 (*call This is the third 
-call to feleven*)[] 
-
-Overfull \hbox (32.99683pt too wide) in paragraph at lines 924--925
-[][]                             \OT1/cmtt/m/sl/9 (*this is like a top-level ve
-rification, i.e.starts
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 938--939
-[][]                                           \OT1/cmtt/m/sl/9 (*of course, de
-fining the adaptaion
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 939--940
-[][]                                           \OT1/cmtt/m/sl/9 apply (method_L
-et HeapSortContext_def)[] 
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 943--944
-[][]                                           \OT1/cmtt/m/sl/9 (*1*) apply sim
-p (*letinvokeconst*)[] 
-[19]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 951--952
-[][]                                     \OT1/cmtt/m/sl/9 apply (method_Let Hea
-pSortContext_def)[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 957--958
-[][]                                           \OT1/cmtt/m/sl/9 (*2*) apply sim
-p (*letrmaketree*)[] 
-
-Overfull \hbox (51.89667pt too wide) in paragraph at lines 959--960
-[][]                             \OT1/cmtt/m/sl/9 (*2*) apply fast (* the weake
-ning from the verification
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 960--961
-[][]                   \OT1/cmtt/m/sl/9 (*2*) apply fast (* the weakening from 
-the verification
-
-Overfull \hbox (240.89508pt too wide) in paragraph at lines 967--968
-[][]\OT1/cmtt/m/sl/9 (* =======================================================
-==================================================================
-)) [20] (./root.aux) )
-(see the transcript file for additional information)
-Output written on root.dvi (20 pages, 43848 bytes).
-Transcript written on root.log.
-This is TeXk, Version 3.14159 (Web2C 7.4.5)
- %&-line parsing enabled.
-LaTeX2e <2001/06/01>
-Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
-ohyphenation, loaded.
-
-(./root.tex (/usr/share/texmf/tex/latex/base/article.cls
-Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
-(/usr/share/texmf/tex/latex/base/size10.clo)) (./isabelle.sty)
-(./isabellesym.sty) (/usr/share/texmf/tex/latex/base/inputenc.sty
-(/usr/share/texmf/tex/latex/base/latin1.def)) (./pdfsetup.sty)
-(/usr/local/texmf.da/tex/latex/comisc/url.sty)
-(/usr/share/texmf/tex/latex/base/latexsym.sty) (./root.aux) (./session.tex
-(./HeapSortProofVCG.tex
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 6--7
-[][]  \OT1/cmtt/m/sl/9 -- would be desirable to redesign CALLMP rule so that si
-de condition which[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 12--13
-[][]       \OT1/cmtt/m/sl/9 generates (variable number of) subgoals for each fu
-nction that is dominated
-(/usr/share/texmf/tex/latex/base/ulasy.fd)
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 19--20
-[][]       \OT1/cmtt/m/sl/9 need to verify n+1, which leaves indeterminate numb
-er of side-condition
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 31--32
-[][]       \OT1/cmtt/m/sl/9 maybe a good idea to have a method for (each) primi
-tives, and then a
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 32--33
-[][]       \OT1/cmtt/m/sl/9 let which does the composition on-the-fly  --- this
- avoids duplicating
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 35--36
-[][]        \OT1/cmtt/m/sl/9 -- define ML values bound to tactics appearing in 
-bodies of methods[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 47--48
-[][]\OT1/cmtt/m/sl/9 text {*This corresponds to the following specifications, f
-ormalised from the
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 48--49
-[][]       \OT1/cmtt/m/sl/9 method bodies: the contexts (in second parameter of
- @{text DAss}) are
-[1]
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 52--53
-[][]  \OT1/cmtt/m/sl/9 (if M = Insert then (DAss {t_} 1 (emptyfinmap(t_ $\OMS/c
-msy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (TreeET
-
-Overfull \hbox (29.18028pt too wide) in paragraph at lines 53--54
-[][]  \OT1/cmtt/m/sl/9 if M = Removesome then (DAss {t_} 0 (emptyfinmap(t_ $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ResultET
-
-Overfull \hbox (24.45532pt too wide) in paragraph at lines 54--55
-[][]  \OT1/cmtt/m/sl/9 if M = Removetop then (DAss {t_} 0 (emptyfinmap(t_ $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ResultET
-
-Overfull \hbox (15.0054pt too wide) in paragraph at lines 55--56
-[][]  \OT1/cmtt/m/sl/9 if M = Make_heap then (DAss {l_} 0 (emptyfinmap(l_ $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0))) (TreeET
-
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 56--57
-[][]  \OT1/cmtt/m/sl/9 if M = Extract then (DAss {h_} 0 (emptyfinmap(h_ $\OMS/c
-msy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ListET
-
-Overfull \hbox (19.73036pt too wide) in paragraph at lines 57--58
-[][]  \OT1/cmtt/m/sl/9 if M = Siftdown then (DAss {t1_, t2_} 1 (emptyfinmap(t1_
- $\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))(t2_
-
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 58--59
-[][]  \OT1/cmtt/m/sl/9 if M = Sort then (DAss {l_} 0 (emptyfinmap(l_ $\OMS/cmsy
-/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0))) (ListET 0)
-
-Overfull \hbox (20.53447pt too wide) in paragraph at lines 65--66
-[][]\OT1/cmtt/m/sl/9 "sMST == ($\OML/cmm/m/it/9 ^^U$ \OT1/cmtt/m/sl/9 C M args 
-E h hh v p. SPEC M (newframe_env Nullref (fst (methtable
-
-Overfull \hbox (70.79651pt too wide) in paragraph at lines 70--71
-[][]  \OT1/cmtt/m/sl/9 Meth_Insert Fun_fInsert Fun_fzeroInsert Fun_foneInsert F
-un_ftwoInsert Fun_fthreeInsert[] 
-
-Overfull \hbox (61.34659pt too wide) in paragraph at lines 74--75
-[][]  \OT1/cmtt/m/sl/9 Meth_Removetop Fun_fRemovetop Fun_fzeroRemovetop Fun_fon
-eRemovetop Fun_ftwoRemovetop
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 75--76
-[][]  \OT1/cmtt/m/sl/9 Meth_Siftdown Fun_fSiftdown Fun_fzeroSiftdown Fun_foneSi
-ftdown Fun_ftwoSiftdown
-
-Overfull \hbox (89.69635pt too wide) in paragraph at lines 76--77
-[][]  \OT1/cmtt/m/sl/9 Fun_ffourSiftdown Fun_ffiveSiftdown Fun_fsixSiftdown Fun
-_fsevenSiftdown Fun_feightSiftdown[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 77--78
-[][]  \OT1/cmtt/m/sl/9 Fun_fnineSiftdown Fun_ftenSiftdown Fun_felevenSiftdown F
-un_ftwelveSiftdown
-
-Overfull \hbox (70.79651pt too wide) in paragraph at lines 78--79
-[][]  \OT1/cmtt/m/sl/9 Fun_ffourteenSiftdown Fun_ffifteenSiftdown Fun_fsixteenS
-iftdown Fun_fseventeenSiftdown
-
-Overfull \hbox (38.27744pt too wide) in paragraph at lines 81--82
-[][]\OT1/cmtt/m/sl/9 lemma LL2: "$[]$(E, h, U,C,R,m):CS; U = V$[]$ $[][]\OMS/cm
-sy/m/n/9 )$ \OT1/cmtt/m/sl/9 (E, h, V,C,R,m):CS" (*<*)by simp(*>*)[] 
-
-Overfull \hbox (12.18752pt too wide) in paragraph at lines 88--89
-[][]  $[]$ \OT1/cmtt/m/sl/9 {y,z} , 1 , (emptyfinmap(y $\OMS/cmsy/m/n/9 7!$$[][
-]$\OT1/cmtt/m/sl/9 (TreeET 0))(z $\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (Tr
-eeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 (TreeET
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 90--91
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-[2]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 92--93
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 96--97
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (7.43889pt too wide) in paragraph at lines 103--104
-[][] $[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x}, 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0)))  $\OMS/cmsy/m/n/9 ^^]$ \OT1
-/cmtt/m/sl/9 (TreeET 0) , 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 105--106
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 107--108
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 111--112
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 120--121
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 122--123
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 126--127
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.71393pt too wide) in paragraph at lines 133--134
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x}, 0 , (emptyfinmap(x $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0)))  $\OMS/cmsy/m/n/9 ^^]$ \OT1/
-cmtt/m/sl/9 (ListET 0) , 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 135--136
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 137--138
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-[3]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 141--142
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (3.75562pt too wide) in paragraph at lines 148--149
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {y} , 1 , (emptyfinmap(y $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (TreeET 0), 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 150--151
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 152--153
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 156--157
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.55698pt too wide) in paragraph at lines 163--164
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x} , 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (ResultET 0 (TreeET 0)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 165--166
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 167--168
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 171--172
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.55698pt too wide) in paragraph at lines 178--179
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x} , 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (ResultET 0 (TreeET 0)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 180--181
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 182--183
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-[4]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 186--187
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.5181pt too wide) in paragraph at lines 208--209
-[][]\OT1/cmtt/m/sl/9 lemma vcg_rvar: "GETr C x = Some T $[][]\OMS/cmsy/m/n/9 )$
- \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 RVar x : $[]$ {x} , n
- , C $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T
-
-Overfull \hbox (12.12497pt too wide) in paragraph at lines 218--219
-[][]                 $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 
-^^C$  \OT1/cmtt/m/sl/9 RPrimop f x y : $[]$ {x, y} , n , C $\OMS/cmsy/m/n/9 ^^]
-$ \OT1/cmtt/m/sl/9 IntET , n $[]$"
-
-Overfull \hbox (8.07211pt too wide) in paragraph at lines 230--231
-[][]     \OT1/cmtt/m/sl/9 "$[]$GETr C y = Some (TreeET k); GETr C z = Some (Tre
-eET k); y$\OMS/cmsy/m/n/9 6\OT1/cmr/m/n/9 =$\OT1/cmtt/m/sl/9 z; n=(Suc
-
-Overfull \hbox (17.61093pt too wide) in paragraph at lines 231--232
-[][]     $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cm
-tt/m/sl/9 (DIAM$[]$Make_IIDD ([VALarg (IVal 3), INarg v, RNarg y, RNarg z]))
-[5]
-Overfull \hbox (1.16122pt too wide) in paragraph at lines 239--240
-[][]  \OT1/cmtt/m/sl/9 "$\OMS/cmsy/m/n/9 :$ \OT1/cmtt/m/sl/9 isMergePoint f $\O
-MS/cmsy/m/n/9 ^$ \OT1/cmtt/m/sl/9 (dominates f, G, f, $[]$U, n, C $\OMS/cmsy/m/
-n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$) $\OMS/cmsy/m/n/9 2$ \OT1/cmtt/m/sl/9 DOM_Ca
-ll
-
-Overfull \hbox (12.61101pt too wide) in paragraph at lines 241--242
-[][]\OT1/cmtt/m/sl/9 (CALL f, $[]$U, n , restr C (ParList2RnameList (fst (funta
-ble f))) $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T , m $[]$)
-
-Overfull \hbox (1.16122pt too wide) in paragraph at lines 245--246
-[][]  \OT1/cmtt/m/sl/9 "$\OMS/cmsy/m/n/9 :$ \OT1/cmtt/m/sl/9 isMergePoint f $\O
-MS/cmsy/m/n/9 ^$ \OT1/cmtt/m/sl/9 (dominates f, G, f, $[]$U, n, C $\OMS/cmsy/m/
-n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$) $\OMS/cmsy/m/n/9 2$ \OT1/cmtt/m/sl/9 DOM_Ca
-ll
-
-Overfull \hbox (12.61101pt too wide) in paragraph at lines 247--248
-[][]\OT1/cmtt/m/sl/9 (CALL f, $[]$U, n , restr C (ParList2RnameList (fst (funta
-ble f))) $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T , m $[]$)
-
-Overfull \hbox (8.40714pt too wide) in paragraph at lines 256--257
-[][]  \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 e : $[]$ U1 , n 
-, C $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T1 , m $[]$ ; G $\U/lasy/m/n/9 ^^C$
-  \OT1/cmtt/m/sl/9 ee : $[]$ U2 , m , C(x$\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/
-sl/9 T1) $\OMS/cmsy/m/n/9 ^^]$
-
-Overfull \hbox (4.4306pt too wide) in paragraph at lines 257--258
-[][]  \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 (LET rf x =e IN 
-ee END) : $[]$ U1 $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/m/sl/9 (U2 - {x}) , n , C $\OMS
-/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T2 , k $[]$"[] 
-
-Overfull \hbox (5.1584pt too wide) in paragraph at lines 270--271
-[][]  $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/
-m/sl/9 (LET z = RPrimop f x y IN e END) : $[]${x, y} $\OMS/cmsy/m/n/9 [$ \OT1/c
-mtt/m/sl/9 U, n, C $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$"
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 273--274
-[][]\OT1/cmtt/m/sl/9 (* Note: side conditions in match rules cannot be solved u
-ntil later because
-[6]
-Overfull \hbox (28.63316pt too wide) in paragraph at lines 292--293
-[][]$[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m
-/sl/9 (LET cont =t$[]$V0; rf left =t$\OMS/cmsy/m/n/9 }$\OT1/cmtt/m/sl/9 R1; rf 
-right =t$\OMS/cmsy/m/n/9 }$\OT1/cmtt/m/sl/9 R2;  _ =DIAM$[]$Free([RNarg
-
-Overfull \hbox (8.16101pt too wide) in paragraph at lines 300--301
-[][] $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m
-/sl/9 (LET h = GetFi l V0; rf t = GetFr l R1; _ = DIAM$[]$Free ([RNarg l])
-
-Overfull \hbox (8.16101pt too wide) in paragraph at lines 308--309
-[][] $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m
-/sl/9 (LET h = GetFi l V0; rf t = GetFr l R1; _ = DIAM$[]$Free ([RNarg l])
-
-Overfull \hbox (1.11948pt too wide) in paragraph at lines 315--316
-[][]     $\OMS/cmsy/m/n/9 8 $ \OT1/cmtt/m/sl/9 E h hh v p. sMST c M L E h hh v 
-p $[][]\OMS/cmsy/m/n/9 !$ $[]$\OT1/cmtt/m/sl/9 U, n, C $\OMS/cmsy/m/n/9 ^^]$ \O
-T1/cmtt/m/sl/9 T1, m$[]$ E h hh v
-
-Overfull \hbox (4.43343pt too wide) in paragraph at lines 319--320
-[][]   $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmt
-t/m/sl/9 (LET rf x = c$[]$M(L) IN e END) : $[]$U $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/
-m/sl/9 (V-{x}), nk, D $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, l$[]$"
-
-Overfull \hbox (3.34715pt too wide) in paragraph at lines 323--324
-[][]     \OT1/cmtt/m/sl/9 "$[]$GETr C y = Some (TreeET k);GETr C z = Some (Tree
-ET k); y$\OMS/cmsy/m/n/9 6\OT1/cmr/m/n/9 =$\OT1/cmtt/m/sl/9 z; n=(Suc
-[7]
-Overfull \hbox (3.43605pt too wide) in paragraph at lines 326--327
-[][]     $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cm
-tt/m/sl/9 (LET rf x = DIAM$[]$Make_IIDD ([VALarg (IVal 3), INarg v, RNarg
-
-Overfull \hbox (62.34396pt too wide) in paragraph at lines 326--327
-\OT1/cmtt/m/sl/9 y, RNarg z]) IN e END): $[]$({y,z} $\OMS/cmsy/m/n/9 [$ \OT1/cm
-tt/m/sl/9 (U-{x})), n, C $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, l$[]$" by (e
-rule DA_LetrMakeTree,
-
-Overfull \hbox (19.73325pt too wide) in paragraph at lines 335--336
-[][]\OT1/cmtt/m/sl/9 lemma vcg_domcallcons: "$[]$(t,{(Call h, $[]$U, n, C $\OMS
-/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$)} $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/m/sl
-/9 G,f,P):DOM_Call;[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 347--348
-[][]       \OT1/cmtt/m/sl/9 context which contains an one entry for each syntac
-tic method invocation.*}[] 
-
-Overfull \hbox (3.92209pt too wide) in paragraph at lines 350--351
-[][]  \OT1/cmtt/m/sl/9 {(HS$[]$Insert([INarg x_,RNarg r2_]), sMST HS Insert [IN
-arg x_,RNarg r2_]),[] 
-
-Overfull \hbox (8.64705pt too wide) in paragraph at lines 351--352
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Insert([INarg v4_,RNarg r2_]), sMST HS Insert [IN
-arg v4_,RNarg r2_]),[] 
-
-Overfull \hbox (3.92209pt too wide) in paragraph at lines 358--359
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg v2_, RNarg r3_, RNarg r1_]), sMST
- HS Siftdown [INarg
-
-Overfull \hbox (18.09697pt too wide) in paragraph at lines 359--360
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg w_, RNarg r5_, RNarg r4_]), sMST 
-HS Siftdown [INarg w_,
-
-Overfull \hbox (18.09697pt too wide) in paragraph at lines 360--361
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg w_, RNarg r8_, RNarg r7_]), sMST 
-HS Siftdown [INarg w_,
-[8]
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 380--381
-[][]    \OT1/cmtt/m/sl/9 CHANGED (simp_tac ((Simplifier.get_local_simpset ctxt)
- addsimps thms) i)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 382--383
-[][]    \OT1/cmtt/m/sl/9 CHANGED (asm_simp_tac ((Simplifier.get_local_simpset c
-txt) addsimps thms)
-[9] [10]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 510--511
-[][]\OT1/cmtt/m/sl/9 (*            apply method_Let prefer 2 apply (simp add: H
-eapSortContext_def)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 511--512
-[][]                             \OT1/cmtt/m/sl/9 prefer 2 apply (clarsimp, eru
-le Siftdown_Invoke,
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 518--519
-[][]  \OT1/cmtt/m/sl/9 (* for solving premise of vcg_call -- either unfold Dom 
-def, or lookup *)
-[11]
-Overfull \hbox (28.27187pt too wide) in paragraph at lines 557--558
-[][]   \OT1/cmtt/m/sl/9 fun main_tac ctxt (alldefs as (flowdefs,dom_defs,gamma_
-def)) i state = state
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 562--563
-[][]   \OT1/cmtt/m/sl/9 and main_tac_aux ctxt (alldefs as (flowdefs,dom_defs,ga
-mma_def)) i state
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 566--567
-[][]            \OT1/cmtt/m/sl/9 let_tac ctxt (flowdefs @ gamma_def)  (main_tac
-_aux ctxt alldefs)
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 575--576
-[][]\OT1/cmtt/m/sl/9 (* Testing methods for invoking parts of the tactic above 
-[for debug only]
-[12]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 585--586
-[][]\OT1/cmtt/m/sl/9 method_setup method_Let = {* Method.thms_ctxt_args (fn thm
-s => fn ctxt => [] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 589--590
-[][]\OT1/cmtt/m/sl/9 (* apply (rule vcg_call) apply (simp add: dominates_def is
-MergePoint_def) *)[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 594--595
-[][]\OT1/cmtt/m/sl/9 (* apply (simp?, (rule DA_NullResult, simp) | rule DA_Null
-Tree | rule DA_NullList)
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 603--604
-[][]\OT1/cmtt/m/sl/9 (* FIXME: to combine method_Call with method_Dom or mergep
-oint stuff, we need
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 606--607
-[][]\OT1/cmtt/m/sl/9 (* apply ((rule vcg_domcallcons) | (rule vcg_domcallnil))+
- apply simp apply
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 608--609
-[][]  \OT1/cmtt/m/sl/9 fn ctxt => Method.METHOD (fn facts => dom_tac ctxt thms 
-stop stop 1)) *}[] 
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 624--625
-[][]         \OT1/cmtt/m/sl/9 two_subgoal_tacs i THEN vdm_tac (i+1) THEN vdm_ta
-c i,  (* stack: reverse
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 630--631
-[][]\OT1/cmtt/m/sl/9 (* apply ((rule vcg_domcallcons) | (rule vcg_domcallnil))+
- apply simp apply
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 631--632
-[][]\OT1/cmtt/m/sl/9 method_setup method_Weak = {* Method.thms_ctxt_args (fn th
-ms => fn ctxt =>
-[13]
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 636--637
-[][]\OT1/cmtt/m/sl/9 (*methods call and dom are applied together, using CallDom
-: proofs takes 55secs*)[] 
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 642--643
-[][]\OT1/cmtt/m/sl/9 (* apply (method_main dominates_def isMergePoint_def MFS_d
-efs SPEC_def) *)[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 657--658
-[][]\OT1/cmtt/m/sl/9 (* Method main: writing bits of ML code to parse in Isar i
-s a pain, so we hardwire[] 
-
-Overfull \hbox (28.27187pt too wide) in paragraph at lines 666--667
-[][]  \OT1/cmtt/m/sl/9 Method.METHOD (fn facts => main_tac ctxt (thms "flow_def
-s", thms "doms_defs",
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 670--671
-[][]  \OT1/cmtt/m/sl/9 Method.METHOD (fn facts => main_tac_aux ctxt (thms "flow
-_defs", thms "doms_defs",
-
-Overfull \hbox (13.4388pt too wide) in paragraph at lines 674--675
-[][]\OT1/cmtt/m/sl/9 "$[]$G = HeapSortContext$[]$ $[][]\OMS/cmsy/m/n/9 )$ \OT1/
-cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m/sl/9 snd (methtable HS Siftdown) 
-: SPEC Siftdown"[] 
-[14] [15] [16]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 805--806
-[][]                \OT1/cmtt/m/sl/9 apply (method_Dom doms_defs)  (* this the 
-place that cut is
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 830--831
-[][]                                \OT1/cmtt/m/sl/9 (*Call*) (* first call to 
-the merge point ffour*)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 840--841
-[][]                                \OT1/cmtt/m/sl/9 (*Call*) (*This is the sec
-ond call to ffour*)[] 
-[17]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 853--854
-[][]                    \OT1/cmtt/m/sl/9 (*1*) apply simp (*contraint came from
- TreematchD STAR.*)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 855--856
-[][]                     \OT1/cmtt/m/sl/9 (*this is like a top-level verificati
-on, i.e.starts with
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 878--879
-[][]                           \OT1/cmtt/m/sl/9 apply (method_Dom doms_defs)  (
-* this the place
-[18]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 900--901
-[][]                                   \OT1/cmtt/m/sl/9 (*call This is the firs
-t call to feleven*)[] 
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 910--911
-[][]                                   \OT1/cmtt/m/sl/9 (*call This is the seco
-nd call to feleven*)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 920--921
-[][]                                 \OT1/cmtt/m/sl/9 (*call This is the third 
-call to feleven*)[] 
-
-Overfull \hbox (32.99683pt too wide) in paragraph at lines 924--925
-[][]                             \OT1/cmtt/m/sl/9 (*this is like a top-level ve
-rification, i.e.starts
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 938--939
-[][]                                           \OT1/cmtt/m/sl/9 (*of course, de
-fining the adaptaion
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 939--940
-[][]                                           \OT1/cmtt/m/sl/9 apply (method_L
-et HeapSortContext_def)[] 
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 943--944
-[][]                                           \OT1/cmtt/m/sl/9 (*1*) apply sim
-p (*letinvokeconst*)[] 
-[19]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 951--952
-[][]                                     \OT1/cmtt/m/sl/9 apply (method_Let Hea
-pSortContext_def)[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 957--958
-[][]                                           \OT1/cmtt/m/sl/9 (*2*) apply sim
-p (*letrmaketree*)[] 
-
-Overfull \hbox (51.89667pt too wide) in paragraph at lines 959--960
-[][]                             \OT1/cmtt/m/sl/9 (*2*) apply fast (* the weake
-ning from the verification
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 960--961
-[][]                   \OT1/cmtt/m/sl/9 (*2*) apply fast (* the weakening from 
-the verification
-
-Overfull \hbox (240.89508pt too wide) in paragraph at lines 967--968
-[][]\OT1/cmtt/m/sl/9 (* =======================================================
-==================================================================
-)) [20] (./root.aux) )
-(see the transcript file for additional information)
-Output written on root.dvi (20 pages, 43848 bytes).
-Transcript written on root.log.
-This is TeXk, Version 3.14159 (Web2C 7.4.5)
- %&-line parsing enabled.
-LaTeX2e <2001/06/01>
-Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
-ohyphenation, loaded.
-
-(./root.tex (/usr/share/texmf/tex/latex/base/article.cls
-Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
-(/usr/share/texmf/tex/latex/base/size10.clo)) (./isabelle.sty)
-(./isabellesym.sty) (/usr/share/texmf/tex/latex/base/inputenc.sty
-(/usr/share/texmf/tex/latex/base/latin1.def)) (./pdfsetup.sty)
-(/usr/local/texmf.da/tex/latex/comisc/url.sty)
-(/usr/share/texmf/tex/latex/base/latexsym.sty) (./root.aux) (./session.tex
-(./HeapSortProofVCG.tex
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 6--7
-[][]  \OT1/cmtt/m/sl/9 -- would be desirable to redesign CALLMP rule so that si
-de condition which[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 12--13
-[][]       \OT1/cmtt/m/sl/9 generates (variable number of) subgoals for each fu
-nction that is dominated
-(/usr/share/texmf/tex/latex/base/ulasy.fd)
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 19--20
-[][]       \OT1/cmtt/m/sl/9 need to verify n+1, which leaves indeterminate numb
-er of side-condition
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 31--32
-[][]       \OT1/cmtt/m/sl/9 maybe a good idea to have a method for (each) primi
-tives, and then a
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 32--33
-[][]       \OT1/cmtt/m/sl/9 let which does the composition on-the-fly  --- this
- avoids duplicating
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 35--36
-[][]        \OT1/cmtt/m/sl/9 -- define ML values bound to tactics appearing in 
-bodies of methods[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 47--48
-[][]\OT1/cmtt/m/sl/9 text {*This corresponds to the following specifications, f
-ormalised from the
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 48--49
-[][]       \OT1/cmtt/m/sl/9 method bodies: the contexts (in second parameter of
- @{text DAss}) are
-[1]
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 52--53
-[][]  \OT1/cmtt/m/sl/9 (if M = Insert then (DAss {t_} 1 (emptyfinmap(t_ $\OMS/c
-msy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (TreeET
-
-Overfull \hbox (29.18028pt too wide) in paragraph at lines 53--54
-[][]  \OT1/cmtt/m/sl/9 if M = Removesome then (DAss {t_} 0 (emptyfinmap(t_ $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ResultET
-
-Overfull \hbox (24.45532pt too wide) in paragraph at lines 54--55
-[][]  \OT1/cmtt/m/sl/9 if M = Removetop then (DAss {t_} 0 (emptyfinmap(t_ $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ResultET
-
-Overfull \hbox (15.0054pt too wide) in paragraph at lines 55--56
-[][]  \OT1/cmtt/m/sl/9 if M = Make_heap then (DAss {l_} 0 (emptyfinmap(l_ $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0))) (TreeET
-
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 56--57
-[][]  \OT1/cmtt/m/sl/9 if M = Extract then (DAss {h_} 0 (emptyfinmap(h_ $\OMS/c
-msy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) (ListET
-
-Overfull \hbox (19.73036pt too wide) in paragraph at lines 57--58
-[][]  \OT1/cmtt/m/sl/9 if M = Siftdown then (DAss {t1_, t2_} 1 (emptyfinmap(t1_
- $\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))(t2_
-
-Overfull \hbox (5.55548pt too wide) in paragraph at lines 58--59
-[][]  \OT1/cmtt/m/sl/9 if M = Sort then (DAss {l_} 0 (emptyfinmap(l_ $\OMS/cmsy
-/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0))) (ListET 0)
-
-Overfull \hbox (20.53447pt too wide) in paragraph at lines 65--66
-[][]\OT1/cmtt/m/sl/9 "sMST == ($\OML/cmm/m/it/9 ^^U$ \OT1/cmtt/m/sl/9 C M args 
-E h hh v p. SPEC M (newframe_env Nullref (fst (methtable
-
-Overfull \hbox (70.79651pt too wide) in paragraph at lines 70--71
-[][]  \OT1/cmtt/m/sl/9 Meth_Insert Fun_fInsert Fun_fzeroInsert Fun_foneInsert F
-un_ftwoInsert Fun_fthreeInsert[] 
-
-Overfull \hbox (61.34659pt too wide) in paragraph at lines 74--75
-[][]  \OT1/cmtt/m/sl/9 Meth_Removetop Fun_fRemovetop Fun_fzeroRemovetop Fun_fon
-eRemovetop Fun_ftwoRemovetop
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 75--76
-[][]  \OT1/cmtt/m/sl/9 Meth_Siftdown Fun_fSiftdown Fun_fzeroSiftdown Fun_foneSi
-ftdown Fun_ftwoSiftdown
-
-Overfull \hbox (89.69635pt too wide) in paragraph at lines 76--77
-[][]  \OT1/cmtt/m/sl/9 Fun_ffourSiftdown Fun_ffiveSiftdown Fun_fsixSiftdown Fun
-_fsevenSiftdown Fun_feightSiftdown[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 77--78
-[][]  \OT1/cmtt/m/sl/9 Fun_fnineSiftdown Fun_ftenSiftdown Fun_felevenSiftdown F
-un_ftwelveSiftdown
-
-Overfull \hbox (70.79651pt too wide) in paragraph at lines 78--79
-[][]  \OT1/cmtt/m/sl/9 Fun_ffourteenSiftdown Fun_ffifteenSiftdown Fun_fsixteenS
-iftdown Fun_fseventeenSiftdown
-
-Overfull \hbox (38.27744pt too wide) in paragraph at lines 81--82
-[][]\OT1/cmtt/m/sl/9 lemma LL2: "$[]$(E, h, U,C,R,m):CS; U = V$[]$ $[][]\OMS/cm
-sy/m/n/9 )$ \OT1/cmtt/m/sl/9 (E, h, V,C,R,m):CS" (*<*)by simp(*>*)[] 
-
-Overfull \hbox (12.18752pt too wide) in paragraph at lines 88--89
-[][]  $[]$ \OT1/cmtt/m/sl/9 {y,z} , 1 , (emptyfinmap(y $\OMS/cmsy/m/n/9 7!$$[][
-]$\OT1/cmtt/m/sl/9 (TreeET 0))(z $\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (Tr
-eeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 (TreeET
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 90--91
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-[2]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 92--93
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 96--97
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (7.43889pt too wide) in paragraph at lines 103--104
-[][] $[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x}, 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (ListET 0)))  $\OMS/cmsy/m/n/9 ^^]$ \OT1
-/cmtt/m/sl/9 (TreeET 0) , 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 105--106
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 107--108
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 111--112
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 120--121
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 122--123
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 126--127
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.71393pt too wide) in paragraph at lines 133--134
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x}, 0 , (emptyfinmap(x $\OMS
-/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0)))  $\OMS/cmsy/m/n/9 ^^]$ \OT1/
-cmtt/m/sl/9 (ListET 0) , 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 135--136
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 137--138
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-[3]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 141--142
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (3.75562pt too wide) in paragraph at lines 148--149
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {y} , 1 , (emptyfinmap(y $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (TreeET 0), 0 $[]$ E h hh
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 150--151
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 152--153
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 156--157
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.55698pt too wide) in paragraph at lines 163--164
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x} , 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (ResultET 0 (TreeET 0)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 165--166
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 167--168
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 171--172
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.55698pt too wide) in paragraph at lines 178--179
-[][]$[][]\OMS/cmsy/m/n/9 )$ $[]$ \OT1/cmtt/m/sl/9 {x} , 0 , (emptyfinmap(x $\OM
-S/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/sl/9 (TreeET 0))) $\OMS/cmsy/m/n/9 ^^]$  \OT1
-/cmtt/m/sl/9 (ResultET 0 (TreeET 0)
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 180--181
-[][]\OT1/cmtt/m/sl/9 apply (simp add: sMST_def SPEC_def MFS_defs newframe_env_d
-ef evalARGS_def self_def)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 182--183
-[][]\OT1/cmtt/m/sl/9 apply (erule_tac x=q in allE, erule_tac x=F in allE, erule
-_tac x=R in allE,
-[4]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 186--187
-[][]        \OT1/cmtt/m/sl/9 ( (rule CS_NIL, fastsimp, simp+) | (rule CS_CONS, 
-fastsimp, simp+)
-
-Overfull \hbox (2.5181pt too wide) in paragraph at lines 208--209
-[][]\OT1/cmtt/m/sl/9 lemma vcg_rvar: "GETr C x = Some T $[][]\OMS/cmsy/m/n/9 )$
- \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 RVar x : $[]$ {x} , n
- , C $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T
-
-Overfull \hbox (12.12497pt too wide) in paragraph at lines 218--219
-[][]                 $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 
-^^C$  \OT1/cmtt/m/sl/9 RPrimop f x y : $[]$ {x, y} , n , C $\OMS/cmsy/m/n/9 ^^]
-$ \OT1/cmtt/m/sl/9 IntET , n $[]$"
-
-Overfull \hbox (8.07211pt too wide) in paragraph at lines 230--231
-[][]     \OT1/cmtt/m/sl/9 "$[]$GETr C y = Some (TreeET k); GETr C z = Some (Tre
-eET k); y$\OMS/cmsy/m/n/9 6\OT1/cmr/m/n/9 =$\OT1/cmtt/m/sl/9 z; n=(Suc
-
-Overfull \hbox (17.61093pt too wide) in paragraph at lines 231--232
-[][]     $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cm
-tt/m/sl/9 (DIAM$[]$Make_IIDD ([VALarg (IVal 3), INarg v, RNarg y, RNarg z]))
-[5]
-Overfull \hbox (1.16122pt too wide) in paragraph at lines 239--240
-[][]  \OT1/cmtt/m/sl/9 "$\OMS/cmsy/m/n/9 :$ \OT1/cmtt/m/sl/9 isMergePoint f $\O
-MS/cmsy/m/n/9 ^$ \OT1/cmtt/m/sl/9 (dominates f, G, f, $[]$U, n, C $\OMS/cmsy/m/
-n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$) $\OMS/cmsy/m/n/9 2$ \OT1/cmtt/m/sl/9 DOM_Ca
-ll
-
-Overfull \hbox (12.61101pt too wide) in paragraph at lines 241--242
-[][]\OT1/cmtt/m/sl/9 (CALL f, $[]$U, n , restr C (ParList2RnameList (fst (funta
-ble f))) $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T , m $[]$)
-
-Overfull \hbox (1.16122pt too wide) in paragraph at lines 245--246
-[][]  \OT1/cmtt/m/sl/9 "$\OMS/cmsy/m/n/9 :$ \OT1/cmtt/m/sl/9 isMergePoint f $\O
-MS/cmsy/m/n/9 ^$ \OT1/cmtt/m/sl/9 (dominates f, G, f, $[]$U, n, C $\OMS/cmsy/m/
-n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$) $\OMS/cmsy/m/n/9 2$ \OT1/cmtt/m/sl/9 DOM_Ca
-ll
-
-Overfull \hbox (12.61101pt too wide) in paragraph at lines 247--248
-[][]\OT1/cmtt/m/sl/9 (CALL f, $[]$U, n , restr C (ParList2RnameList (fst (funta
-ble f))) $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T , m $[]$)
-
-Overfull \hbox (8.40714pt too wide) in paragraph at lines 256--257
-[][]  \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 e : $[]$ U1 , n 
-, C $\OMS/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T1 , m $[]$ ; G $\U/lasy/m/n/9 ^^C$
-  \OT1/cmtt/m/sl/9 ee : $[]$ U2 , m , C(x$\OMS/cmsy/m/n/9 7!$$[][]$\OT1/cmtt/m/
-sl/9 T1) $\OMS/cmsy/m/n/9 ^^]$
-
-Overfull \hbox (4.4306pt too wide) in paragraph at lines 257--258
-[][]  \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m/sl/9 (LET rf x =e IN 
-ee END) : $[]$ U1 $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/m/sl/9 (U2 - {x}) , n , C $\OMS
-/cmsy/m/n/9 ^^]$  \OT1/cmtt/m/sl/9 T2 , k $[]$"[] 
-
-Overfull \hbox (5.1584pt too wide) in paragraph at lines 270--271
-[][]  $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/
-m/sl/9 (LET z = RPrimop f x y IN e END) : $[]${x, y} $\OMS/cmsy/m/n/9 [$ \OT1/c
-mtt/m/sl/9 U, n, C $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$"
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 273--274
-[][]\OT1/cmtt/m/sl/9 (* Note: side conditions in match rules cannot be solved u
-ntil later because
-[6]
-Overfull \hbox (28.63316pt too wide) in paragraph at lines 292--293
-[][]$[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmtt/m
-/sl/9 (LET cont =t$[]$V0; rf left =t$\OMS/cmsy/m/n/9 }$\OT1/cmtt/m/sl/9 R1; rf 
-right =t$\OMS/cmsy/m/n/9 }$\OT1/cmtt/m/sl/9 R2;  _ =DIAM$[]$Free([RNarg
-
-Overfull \hbox (8.16101pt too wide) in paragraph at lines 300--301
-[][] $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m
-/sl/9 (LET h = GetFi l V0; rf t = GetFr l R1; _ = DIAM$[]$Free ([RNarg l])
-
-Overfull \hbox (8.16101pt too wide) in paragraph at lines 308--309
-[][] $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m
-/sl/9 (LET h = GetFi l V0; rf t = GetFr l R1; _ = DIAM$[]$Free ([RNarg l])
-
-Overfull \hbox (1.11948pt too wide) in paragraph at lines 315--316
-[][]     $\OMS/cmsy/m/n/9 8 $ \OT1/cmtt/m/sl/9 E h hh v p. sMST c M L E h hh v 
-p $[][]\OMS/cmsy/m/n/9 !$ $[]$\OT1/cmtt/m/sl/9 U, n, C $\OMS/cmsy/m/n/9 ^^]$ \O
-T1/cmtt/m/sl/9 T1, m$[]$ E h hh v
-
-Overfull \hbox (4.43343pt too wide) in paragraph at lines 319--320
-[][]   $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$  \OT1/cmt
-t/m/sl/9 (LET rf x = c$[]$M(L) IN e END) : $[]$U $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/
-m/sl/9 (V-{x}), nk, D $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, l$[]$"
-
-Overfull \hbox (3.34715pt too wide) in paragraph at lines 323--324
-[][]     \OT1/cmtt/m/sl/9 "$[]$GETr C y = Some (TreeET k);GETr C z = Some (Tree
-ET k); y$\OMS/cmsy/m/n/9 6\OT1/cmr/m/n/9 =$\OT1/cmtt/m/sl/9 z; n=(Suc
-[7]
-Overfull \hbox (3.43605pt too wide) in paragraph at lines 326--327
-[][]     $[][]\OMS/cmsy/m/n/9 )$ \OT1/cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cm
-tt/m/sl/9 (LET rf x = DIAM$[]$Make_IIDD ([VALarg (IVal 3), INarg v, RNarg
-
-Overfull \hbox (62.34396pt too wide) in paragraph at lines 326--327
-\OT1/cmtt/m/sl/9 y, RNarg z]) IN e END): $[]$({y,z} $\OMS/cmsy/m/n/9 [$ \OT1/cm
-tt/m/sl/9 (U-{x})), n, C $\OMS/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, l$[]$" by (e
-rule DA_LetrMakeTree,
-
-Overfull \hbox (19.73325pt too wide) in paragraph at lines 335--336
-[][]\OT1/cmtt/m/sl/9 lemma vcg_domcallcons: "$[]$(t,{(Call h, $[]$U, n, C $\OMS
-/cmsy/m/n/9 ^^]$ \OT1/cmtt/m/sl/9 T, m$[]$)} $\OMS/cmsy/m/n/9 [$ \OT1/cmtt/m/sl
-/9 G,f,P):DOM_Call;[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 347--348
-[][]       \OT1/cmtt/m/sl/9 context which contains an one entry for each syntac
-tic method invocation.*}[] 
-
-Overfull \hbox (3.92209pt too wide) in paragraph at lines 350--351
-[][]  \OT1/cmtt/m/sl/9 {(HS$[]$Insert([INarg x_,RNarg r2_]), sMST HS Insert [IN
-arg x_,RNarg r2_]),[] 
-
-Overfull \hbox (8.64705pt too wide) in paragraph at lines 351--352
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Insert([INarg v4_,RNarg r2_]), sMST HS Insert [IN
-arg v4_,RNarg r2_]),[] 
-
-Overfull \hbox (3.92209pt too wide) in paragraph at lines 358--359
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg v2_, RNarg r3_, RNarg r1_]), sMST
- HS Siftdown [INarg
-
-Overfull \hbox (18.09697pt too wide) in paragraph at lines 359--360
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg w_, RNarg r5_, RNarg r4_]), sMST 
-HS Siftdown [INarg w_,
-
-Overfull \hbox (18.09697pt too wide) in paragraph at lines 360--361
-[][]  \OT1/cmtt/m/sl/9 (HS$[]$Siftdown([INarg w_, RNarg r8_, RNarg r7_]), sMST 
-HS Siftdown [INarg w_,
-[8]
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 380--381
-[][]    \OT1/cmtt/m/sl/9 CHANGED (simp_tac ((Simplifier.get_local_simpset ctxt)
- addsimps thms) i)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 382--383
-[][]    \OT1/cmtt/m/sl/9 CHANGED (asm_simp_tac ((Simplifier.get_local_simpset c
-txt) addsimps thms)
-[9] [10]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 510--511
-[][]\OT1/cmtt/m/sl/9 (*            apply method_Let prefer 2 apply (simp add: H
-eapSortContext_def)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 511--512
-[][]                             \OT1/cmtt/m/sl/9 prefer 2 apply (clarsimp, eru
-le Siftdown_Invoke,
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 518--519
-[][]  \OT1/cmtt/m/sl/9 (* for solving premise of vcg_call -- either unfold Dom 
-def, or lookup *)
-[11]
-Overfull \hbox (28.27187pt too wide) in paragraph at lines 557--558
-[][]   \OT1/cmtt/m/sl/9 fun main_tac ctxt (alldefs as (flowdefs,dom_defs,gamma_
-def)) i state = state
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 562--563
-[][]   \OT1/cmtt/m/sl/9 and main_tac_aux ctxt (alldefs as (flowdefs,dom_defs,ga
-mma_def)) i state
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 566--567
-[][]            \OT1/cmtt/m/sl/9 let_tac ctxt (flowdefs @ gamma_def)  (main_tac
-_aux ctxt alldefs)
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 575--576
-[][]\OT1/cmtt/m/sl/9 (* Testing methods for invoking parts of the tactic above 
-[for debug only]
-[12]
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 585--586
-[][]\OT1/cmtt/m/sl/9 method_setup method_Let = {* Method.thms_ctxt_args (fn thm
-s => fn ctxt => [] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 589--590
-[][]\OT1/cmtt/m/sl/9 (* apply (rule vcg_call) apply (simp add: dominates_def is
-MergePoint_def) *)[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 594--595
-[][]\OT1/cmtt/m/sl/9 (* apply (simp?, (rule DA_NullResult, simp) | rule DA_Null
-Tree | rule DA_NullList)
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 603--604
-[][]\OT1/cmtt/m/sl/9 (* FIXME: to combine method_Call with method_Dom or mergep
-oint stuff, we need
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 606--607
-[][]\OT1/cmtt/m/sl/9 (* apply ((rule vcg_domcallcons) | (rule vcg_domcallnil))+
- apply simp apply
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 608--609
-[][]  \OT1/cmtt/m/sl/9 fn ctxt => Method.METHOD (fn facts => dom_tac ctxt thms 
-stop stop 1)) *}[] 
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 624--625
-[][]         \OT1/cmtt/m/sl/9 two_subgoal_tacs i THEN vdm_tac (i+1) THEN vdm_ta
-c i,  (* stack: reverse
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 630--631
-[][]\OT1/cmtt/m/sl/9 (* apply ((rule vcg_domcallcons) | (rule vcg_domcallnil))+
- apply simp apply
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 631--632
-[][]\OT1/cmtt/m/sl/9 method_setup method_Weak = {* Method.thms_ctxt_args (fn th
-ms => fn ctxt =>
-[13]
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 636--637
-[][]\OT1/cmtt/m/sl/9 (*methods call and dom are applied together, using CallDom
-: proofs takes 55secs*)[] 
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 642--643
-[][]\OT1/cmtt/m/sl/9 (* apply (method_main dominates_def isMergePoint_def MFS_d
-efs SPEC_def) *)[] 
-
-Overfull \hbox (42.44675pt too wide) in paragraph at lines 657--658
-[][]\OT1/cmtt/m/sl/9 (* Method main: writing bits of ML code to parse in Isar i
-s a pain, so we hardwire[] 
-
-Overfull \hbox (28.27187pt too wide) in paragraph at lines 666--667
-[][]  \OT1/cmtt/m/sl/9 Method.METHOD (fn facts => main_tac ctxt (thms "flow_def
-s", thms "doms_defs",
-
-Overfull \hbox (47.1717pt too wide) in paragraph at lines 670--671
-[][]  \OT1/cmtt/m/sl/9 Method.METHOD (fn facts => main_tac_aux ctxt (thms "flow
-_defs", thms "doms_defs",
-
-Overfull \hbox (13.4388pt too wide) in paragraph at lines 674--675
-[][]\OT1/cmtt/m/sl/9 "$[]$G = HeapSortContext$[]$ $[][]\OMS/cmsy/m/n/9 )$ \OT1/
-cmtt/m/sl/9 G $\U/lasy/m/n/9 ^^C$ \OT1/cmtt/m/sl/9 snd (methtable HS Siftdown) 
-: SPEC Siftdown"[] 
-[14] [15] [16]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 805--806
-[][]                \OT1/cmtt/m/sl/9 apply (method_Dom doms_defs)  (* this the 
-place that cut is
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 830--831
-[][]                                \OT1/cmtt/m/sl/9 (*Call*) (* first call to 
-the merge point ffour*)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 840--841
-[][]                                \OT1/cmtt/m/sl/9 (*Call*) (*This is the sec
-ond call to ffour*)[] 
-[17]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 853--854
-[][]                    \OT1/cmtt/m/sl/9 (*1*) apply simp (*contraint came from
- TreematchD STAR.*)[] 
-
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 855--856
-[][]                     \OT1/cmtt/m/sl/9 (*this is like a top-level verificati
-on, i.e.starts with
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 878--879
-[][]                           \OT1/cmtt/m/sl/9 apply (method_Dom doms_defs)  (
-* this the place
-[18]
-Overfull \hbox (18.82195pt too wide) in paragraph at lines 900--901
-[][]                                   \OT1/cmtt/m/sl/9 (*call This is the firs
-t call to feleven*)[] 
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 910--911
-[][]                                   \OT1/cmtt/m/sl/9 (*call This is the seco
-nd call to feleven*)[] 
-
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 920--921
-[][]                                 \OT1/cmtt/m/sl/9 (*call This is the third 
-call to feleven*)[] 
-
-Overfull \hbox (32.99683pt too wide) in paragraph at lines 924--925
-[][]                             \OT1/cmtt/m/sl/9 (*this is like a top-level ve
-rification, i.e.starts
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 938--939
-[][]                                           \OT1/cmtt/m/sl/9 (*of course, de
-fining the adaptaion
-
-Overfull \hbox (37.72179pt too wide) in paragraph at lines 939--940
-[][]                                           \OT1/cmtt/m/sl/9 apply (method_L
-et HeapSortContext_def)[] 
-
-Overfull \hbox (23.5469pt too wide) in paragraph at lines 943--944
-[][]                                           \OT1/cmtt/m/sl/9 (*1*) apply sim
-p (*letinvokeconst*)[] 
-[19]
-Overfull \hbox (9.37202pt too wide) in paragraph at lines 951--952
-[][]                                     \OT1/cmtt/m/sl/9 apply (method_Let Hea
-pSortContext_def)[] 
-
-Overfull \hbox (14.09698pt too wide) in paragraph at lines 957--958
-[][]                                           \OT1/cmtt/m/sl/9 (*2*) apply sim
-p (*letrmaketree*)[] 
-
-Overfull \hbox (51.89667pt too wide) in paragraph at lines 959--960
-[][]                             \OT1/cmtt/m/sl/9 (*2*) apply fast (* the weake
-ning from the verification
-
-Overfull \hbox (4.64706pt too wide) in paragraph at lines 960--961
-[][]                   \OT1/cmtt/m/sl/9 (*2*) apply fast (* the weakening from 
-the verification
-
-Overfull \hbox (240.89508pt too wide) in paragraph at lines 967--968
-[][]\OT1/cmtt/m/sl/9 (* =======================================================
-==================================================================
-)) [20] (./root.aux) )
-(see the transcript file for additional information)
-Output written on root.dvi (20 pages, 43848 bytes).
-Transcript written on root.log.
-request id is kyo-603 (1 file(s))
-
-
-=================================================================
-
-To: XEmacs Beta <xemacs-beta@xemacs.org>
-Subject: [Bug: 21.4.15] parse-partial-sexp gives stack overflow 
---text follows this line--
-================================================================
-Dear Bug Team!
-
-This bug/issue has been bothering me and (users of my Proof General
-package) for some time.  I have just verified that with the current CVS
-version of XEmacs the same problem is still present.
-
-Test case:
-
-1. switch to *scratch*
-2. C-u 100 ( 
-3. Eval expression (parse-partial-sexp 1 (point-max))
-
-The symptom I get is "nesting too deep for parser" error messages.
-(These are triggered e.g. by font-lock-fontify-region on large regions which
-contained ill-balanced parens; I also use parse-partial-sexp
-elsewhere in the PG code because of problems with buffer-syntactic-context.
-
-I notice some old comments in font-lock.el concerning this issue.  It
-might be worth looking at GNU Emacs implementation if these two are
-really supposed to be equivalent functions: on GNU Emacs 21.3.1 I
-tested a *scratch* buffer containing 40000 left parens and
-parse-partial-sexp returned a result without missing a beat 8-).
-[ NB: I didn't confirm whether the syntax tables being used were
-identical, but both cases were in Lisp Interaction mode ]
-
- - David Aspinall.
-
-
-================================================================
diff --git a/etc/isar/new-parsing-test.el b/etc/isar/new-parsing-test.el
deleted file mode 100644
index 147ad47..0000000
--- a/etc/isar/new-parsing-test.el
+++ /dev/null
@@ -1,38 +0,0 @@
-;; 
-;; Temporary test for new code in proof-done-advancing, following
-;; Markus's suggestions in proof-config  
-;; [see doc of proof-really-save-command-p]
-;; 
-;; Not integrated yet for fear of destruction of finely tuned 
-;; PG/Isar instance.
-;; 
-;;  -da  June 02.
-;; 
-;; FIXME: the handling of nesting depth counter doesn't yet work
-;; smoothly in the generic code, especially across undos/forget.
-;; Need to fix when nesting depth is changed, how it is changed,
-;; and choice of kill_proof vs undos for Isar.
-;;
-;; Testing: evaluate this buffer, reload script file 
-;; (to re-execute isar-mode).
-
-(setq proof-nested-goals-p t)
-(setq proof-goal-command-regexp 
-      (concat isar-goal-command-regexp "\\|" isar-local-goal-command-regexp))
-
-(defun isar-goal-command-p (str)
-  "Decide whether argument is a goal or not"
-  (proof-string-match proof-goal-command-regexp str))
-
-;; Reset this to default value
-(setq proof-really-save-command-p (lambda (span cmd) t))
-
-;; Use the new parser, but have to hack the keywords setting
-;; to fix prob with "{"  
-;; [do we??  that was probably buffer-syntactic context/symtab problem]
-(setq proof-script-use-old-parser nil)
-(setq isar-any-command-regexp
-      (isar-ids-to-regexp isar-keywords-major))
-;      (cons "{[^\\*]"  ;; FIXME:
-;          (isar-ids-to-regexp 
-;           (remove "{" isar-keywords-major))))
diff --git a/etc/isar/profiling.txt b/etc/isar/profiling.txt
deleted file mode 100644
index 27c9c8f..0000000
--- a/etc/isar/profiling.txt
+++ /dev/null
@@ -1,322 +0,0 @@
-Wed Aug 18 2010.  See Trac #324.
-
------------------------------------------------------------------
-
-Interactive:  C-c C-n
-
-### 12.461s elapsed time, 0.514s cpu time, 0.108s GC time
-
-scomint-output-filter                                           206         
3.6426039999  0.0176825436
-proof-shell-filter                                              206         
3.629433      0.0176186067
-proof-shell-filter-manage-output                                206         
3.6140779999  0.0175440679
-proof-shell-exec-loop                                           206         
3.5814560000  0.0173857087
-mapc                                                            208         
3.4833689999  0.0167469663
-proof-shell-invoke-callback                                     206         
3.4798549999  0.0168924999
-proof-done-advancing                                            204         
3.4786709999  0.0170523088
-proof-done-advancing-other                                      104         
3.2460199999  0.0312117307
-pg-add-element                                                  204         
3.2301699999  0.0158341666
-proof-debug                                                     99          
3.2140250000  0.0324648989
-pg-autotest-message                                             99          
3.211558      0.0324399797
-redisplay                                                       99          
3.140468      0.0317218989
-proof-done-advancing-save                                       100         
0.107982      0.00107982
-proof-process-buffer                                            1           
0.103025      0.103025
-proof-assert-until-point-interactive                            1           
0.102849      0.102849
-proof-assert-until-point                                        1           
0.102845      0.102845
-proof-make-goalsave                                             100         
0.0734089999  0.0007340899
-proof-assert-semis                                              1           
0.0729        0.0729
-proof-semis-to-vanillas                                         1           
0.069353      0.069353
-span-at-before                                                  200         
0.0607209999  0.0003036049
-proof-shell-insert-action-item                                  206         
0.0561400000  0.0002725242
-proof-shell-insert                                              206         
0.0552149999  0.0002680339
-pg-set-span-helphighlights                                      304         
0.0523910000  0.0001723388
-pg-add-proof-element                                            100         
0.0507439999  0.0005074399
-isar-global-save-command-p                                      100         
0.0403249999  0.0004032499
-isar-command-wrapping                                           204         
0.0389439999  0.0001909019
-isar-positions-of                                               204         
0.0342390000  0.0001678382
-proof-segment-up-to-using-cache                                 1           
0.029667      0.029667
-proof-segment-up-to                                             1           
0.029599      0.029599
-proof-segment-up-to-parser                                      1           
0.02959       0.02959
-proof-script-generic-parse-cmdstart                             204         
0.0265809999  0.0001302990
-span-live-p                                                     408         
0.0245460000  6.016...e-05
-span-property                                                   2226        
0.0242540000  1.089...e-05
-proof-set-locked-end                                            204         
0.0179210000  8.784...e-05
-proof-set-locked-endpoints                                      204         
0.0169129999  8.290...e-05
-goto-char                                                       3401        
0.0159649999  4.694...e-06
-replace-regexp-in-string                                        613         
0.0154579999  2.521...e-05
-pg-processing-complete-hint                                     1           
0.014814      0.014814
-proof-buffer-syntactic-context                                  411         
0.0145479999  3.539...e-05
-pg-last-output-displayform                                      304         
0.0140980000  4.637...e-05
-proof-buffer-syntactic-context-emulate                          411         
0.0135870000  3.305...e-05
-span-set-property                                               4968        
0.0131570000  2.648...e-06
-proof-shell-strip-output-markup                                 202         
0.0121529999  6.016...e-05
-isar-strip-output-markup                                        202         
0.0115120000  5.699...e-05
-proof-set-overlay-arrow                                         204         
0.0110750000  5.428...e-05
-pg-hint                                                         1           
0.010877      0.010877
-scomint-send-input                                              206         
0.0096710000  4.694...e-05
-skip-chars-forward                                              917         
0.0088720000  9.675...e-06
-string-match                                                    3879        
0.0085580000  2.206...e-06
-proof-string-match                                              1114        
0.0083859999  7.527...e-06
-re-search-forward                                               1084        
0.0076900000  7.094...e-06
-proof-shell-process-urgent-messages                             206         
0.0072959999  3.541...e-05
-proof-shell-handle-immediate-output                             206         
0.0069180000  3.358...e-05
-span-set-endpoints                                              409         
0.0060590000  1.481...e-05
-isar-preprocessing                                              206         
0.0057689999  2.800...e-05
-isar-string-wrapping                                            408         
0.0057090000  1.399...e-05
-move-overlay                                                    410         
0.0048900000  1.192...e-05
-insert                                                          718         
0.0043259999  6.025...e-06
-proof-set-queue-start                                           204         
0.0039419999  1.932...e-05
-proof-next-element-id                                           204         
0.0038919999  1.907...e-05
-proof-re-search-forward-safe                                    824         
0.0038370000  4.656...e-06
-proof-script-delete-secondary-spans                             1           
0.003218      0.003218
-span-delete-spans                                               1           
0.003215      0.003215
-span-mapc-spans                                                 1           
0.003214      0.003214
-span-set-start                                                  204         
0.003181      1.559...e-05
-pg-add-to-input-history                                         204         
0.0030040000  1.472...e-05
-isar-goal-command-p                                             204         
0.0029059999  1.424...e-05
-span-make                                                       608         
0.0029059999  4.779...e-06
-span-end                                                        928         
0.0026819999  2.890...e-06
-proof-get-name-from-goal                                        100         
0.0024339999  2.433...e-05
-proof-string-match-safe                                         204         
0.0024330000  1.192...e-05
-overlay-put                                                     4970        
0.0023869999  4.802...e-07
-span-delete                                                     304         
0.002174      7.151...e-06
-pg-span-name                                                    102         
0.00199       1.950...e-05
-proof-element-id                                                204         
0.0019369999  9.495...e-06
-span-start                                                      604         
0.0018080000  2.993...e-06
-replace-match                                                   1009        
0.0016779999  1.663...e-06
-skip-chars-backward                                             207         
0.0015489999  7.483...e-06
-make-overlay                                                    609         
0.0014599999  2.397...e-06
-proof-shell-slurp-comments                                      207         
0.0012420000  6.000...e-06
-delete-overlay                                                  306         
0.0011619999  3.797...e-06
-font-lock-fontify-region                                        2           
0.000982      0.000491
-font-lock-default-fontify-region                                2           
0.0009649999  0.0004824999
-set-marker                                                      1853        
0.0009280000  5.008...e-07
-proof-shell-handle-delayed-output                               1           
0.000917      0.000917
-proof-shell-display-output-as-response                          1           
0.000892      0.000892
-pg-response-display                                             1           
0.000888      0.000888
-font-lock-fontify-keywords-region                               2           
0.000882      0.000441
-proof-display-and-keep-buffer                                   1           
0.00087       0.00087
-kill-buffer                                                     4           
0.000787      0.00019675
-proof-next-element-count                                        204         
0.0006769999  3.318...e-06
-spans-at-region-prop                                            1           
0.000641      0.000641
-overlay-end                                                     1129        
0.0004920000  4.357...e-07
-match-string                                                    308         
0.0004569999  1.483...e-06
-marker-position                                                 1237        
0.0004520000  3.654...e-07
-buffer-live-p                                                   723         
0.0003860000  5.338...e-07
-isar-shell-adjust-line-width                                    206         
0.0003380000  1.640...e-06
-get-buffer-process                                              212         
0.0002819999  1.330...e-06
-proof-extend-queue                                              1           
0.000254      0.000254
-proof-shell-process-urgent-message                              1           
0.00024       0.00024
-overlay-start                                                   605         
0.0002349999  3.884...e-07
-proof-add-to-queue                                              1           
0.000231      0.000231
-proof-only-whitespace-to-locked-region-p                        1           
0.000192      0.000192
-isar-font-lock-fontify-syntactically-region                     2           
0.000184      9.2e-05
-nreverse                                                        209         
0.0001679999  8.038...e-07
-proof-shell-process-urgent-message-default                      1           
0.000163      0.000163
-proof-get-window-for-buffer                                     1           
0.000161      0.000161
-proof-re-search-backward                                        1           
0.000157      0.000157
-re-search-backward                                              1           
8.5e-05       8.5e-05
-pg-response-display-with-face                                   2           
7.999...e-05  3.999...e-05
-proof-queue-or-locked-end                                       6           
7.2e-05       1.2e-05
-pg-response-maybe-erase                                         2           
5.9e-05       2.95e-05
-proof-shell-ready-prover                                        2           
5.3e-05       2.65e-05
-proof-looking-at-safe                                           8           
5.1e-05       6.375e-06
-proof-shell-start                                               2           
4.6e-05       2.3e-05
-proof-unprocessed-begin                                         5           
4.3e-05       8.6e-06
-isar-match-nesting                                              1           
4.3e-05       4.3e-05
-proof-activate-scripting                                        1           
4.2e-05       4.2e-05
-proof-shell-live-buffer                                         2           
3.9e-05       1.95e-05
-proof-looking-at                                                7           
3.6e-05       5.142...e-06
-proof-re-search-forward                                         2           
3.500...e-05  1.750...e-05
-proof-detach-queue                                              1           
3.1e-05       3.1e-05
-scomint-check-proc                                              2           
2.9e-05       1.45e-05
-span-detach                                                     1           
2.8e-05       2.8e-05
-proof-maybe-follow-locked-end                                   1           
2.7e-05       2.7e-05
-proof-locked-region-full-p                                      1           
2.7e-05       2.7e-05
-proof-grab-lock                                                 1           
2.4e-05       2.4e-05
-font-lock-fontify-syntactically-region                          1           
2.3e-05       2.3e-05
-font-lock-mode                                                  1           
2e-05         2e-05
-font-lock-unfontify-region                                      2           
1.7e-05       8.5e-06
-font-lock-extend-jit-lock-region-after-change                   3           
1.1e-05       3.666...e-06
-proof-locked-region-empty-p                                     1           
1e-05         1e-05
-proof-set-queue-endpoints                                       1           
1e-05         1e-05
-proof-shell-strip-eager-annotations                             1           
1e-05         1e-05
-font-lock-default-unfontify-region                              2           
7.000...e-06  3.500...e-06
-proof-associated-windows                                        1           
7e-06         7e-06
-proof-shell-should-be-silent                                    1           
6e-06         6e-06
-font-lock-default-function                                      1           
5e-06         5e-06
-proof-shell-stop-silent-item                                    1           
4e-06         4e-06
-proof-shell-start-silent-item                                   1           
4e-06         4e-06
-proof-script-next-command-advance                               1           
4e-06         4e-06
-proof-shell-action-list-item                                    2           
3e-06         1.5e-06
-font-lock-set-defaults                                          2           
3e-06         1.5e-06
-proof-associated-buffers                                        2           
2e-06         1e-06
-font-lock-extend-region-wholelines                              2           
2e-06         1e-06
-font-lock-extend-region-multiline                               2           
2e-06         1e-06
-proof-minibuffer-message                                        1           
1e-06         1e-06
-proof-shell-set-silent                                          1           
1e-06         1e-06
-proof-shell-clear-silent                                        1           
1e-06         1e-06
-proof-pbp-focus-on-first-goal                                   1           
1e-06         1e-06
-proof-release-lock                                              1           
1e-06         1e-06
-pg-finish-tracing-display                                       1           
1e-06         1e-06
-nconc                                                           1           
1e-06         1e-06
-process-status                                                  2           
0.0           0.0
-
-
------------------------------------------------------------------
-
-Non-interactive:  (progn (proof-process-buffer) (proof-shell-wait))
-
-### 4.368s elapsed time, 0.457s cpu time, 0.094s GC time
-
-proof-shell-wait                                                1           
4.484316      4.484316
-accept-process-output                                           73          
3.8998559999  0.0534226849
-redisplay                                                       172         
3.7155909999  0.0216022732
-scomint-output-filter                                           206         
3.5921849999  0.0174377912
-proof-shell-filter                                              206         
3.5562370000  0.0172632864
-proof-shell-filter-manage-output                                206         
3.5167620000  0.0170716601
-proof-shell-exec-loop                                           206         
3.5079160000  0.0170287184
-mapc                                                            208         
3.4532319999  0.0166020769
-proof-shell-invoke-callback                                     206         
3.4492200000  0.0167437864
-proof-done-advancing                                            204         
3.4481900000  0.0169028921
-proof-done-advancing-other                                      104         
3.2636610000  0.0313813557
-pg-add-element                                                  204         
3.2225049999  0.0157965931
-proof-debug                                                     99          
3.1809079999  0.0321303838
-pg-autotest-message                                             99          
3.1785960000  0.0321070303
-proof-process-buffer                                            1           
0.098653      0.098653
-proof-assert-until-point-interactive                            1           
0.098513      0.098513
-proof-assert-until-point                                        1           
0.098508      0.098508
-proof-done-advancing-save                                       100         
0.0861289999  0.0008612899
-pg-set-span-helphighlights                                      304         
0.0751920000  0.0002473421
-proof-make-goalsave                                             100         
0.074799      0.00074799
-proof-assert-semis                                              1           
0.072791      0.072791
-proof-shell-insert-action-item                                  206         
0.0508700000  0.0002469417
-proof-shell-insert                                              206         
0.0500239999  0.0002428349
-proof-set-locked-end                                            204         
0.0447420000  0.0002193235
-proof-semis-to-vanillas                                         1           
0.043912      0.043912
-proof-set-locked-endpoints                                      204         
0.0438019999  0.0002147156
-proof-set-overlay-arrow                                         204         
0.039986      0.0001960098
-span-set-property                                               4968        
0.0389520000  7.840...e-06
-isar-command-wrapping                                           204         
0.0359119999  0.0001760392
-isar-global-save-command-p                                      100         
0.0357419999  0.0003574199
-span-at-before                                                  200         
0.033411      0.0001670550
-proof-script-delete-secondary-spans                             1           
0.02853       0.02853
-span-delete-spans                                               1           
0.028527      0.028527
-span-mapc-spans                                                 1           
0.028523      0.028523
-pg-add-proof-element                                            100         
0.0274090000  0.0002740900
-proof-segment-up-to-using-cache                                 1           
0.025547      0.025547
-proof-segment-up-to                                             1           
0.025512      0.025512
-proof-segment-up-to-parser                                      1           
0.025509      0.025509
-proof-script-generic-parse-cmdstart                             204         
0.023117      0.0001133186
-replace-regexp-in-string                                        612         
0.0151239999  2.471...e-05
-pg-last-output-displayform                                      304         
0.0137170000  4.512...e-05
-goto-char                                                       3399        
0.0134079999  3.944...e-06
-proof-buffer-syntactic-context                                  411         
0.0133350000  3.244...e-05
-proof-buffer-syntactic-context-emulate                          411         
0.0125479999  3.053...e-05
-proof-shell-strip-output-markup                                 202         
0.0118950000  5.888...e-05
-isar-strip-output-markup                                        202         
0.01126       5.574...e-05
-scomint-send-input                                              206         
0.0089030000  4.321...e-05
-skip-chars-forward                                              917         
0.0077629999  8.465...e-06
-proof-string-match                                              1114        
0.0076579999  6.874...e-06
-string-match                                                    3859        
0.0065880000  1.707...e-06
-isar-positions-of                                               204         
0.0063140000  3.095...e-05
-proof-shell-handle-immediate-output                             206         
0.0061669999  2.993...e-05
-proof-shell-process-urgent-messages                             206         
0.006087      2.954...e-05
-re-search-forward                                               1048        
0.0060810000  5.802...e-06
-isar-string-wrapping                                            408         
0.0055940000  1.371...e-05
-isar-preprocessing                                              206         
0.0048040000  2.332...e-05
-insert                                                          718         
0.0036899999  5.139...e-06
-proof-re-search-forward-safe                                    824         
0.0034060000  4.133...e-06
-proof-next-element-id                                           204         
0.0033579999  1.646...e-05
-span-set-endpoints                                              409         
0.0031649999  7.738...e-06
-proof-set-queue-start                                           204         
0.0029729999  1.457...e-05
-span-delete                                                     304         
0.0027480000  9.039...e-06
-isar-goal-command-p                                             204         
0.0027019999  1.324...e-05
-span-make                                                       608         
0.0026310000  4.327...e-06
-span-end                                                        926         
0.0024999999  2.699...e-06
-overlay-put                                                     4977        
0.0024500000  4.922...e-07
-pg-add-to-input-history                                         204         
0.002432      1.192...e-05
-proof-string-match-safe                                         204         
0.0024030000  1.177...e-05
-proof-get-name-from-goal                                        100         
0.0022690000  2.269...e-05
-span-set-start                                                  204         
0.0022479999  1.101...e-05
-move-overlay                                                    413         
0.0020689999  5.009...e-06
-pg-span-name                                                    102         
0.0019750000  1.936...e-05
-span-start                                                      604         
0.0016740000  2.771...e-06
-replace-match                                                   1008        
0.0015839999  1.571...e-06
-span-live-p                                                     408         
0.0015820000  3.877...e-06
-proof-element-id                                                204         
0.0015369999  7.534...e-06
-span-property                                                   2226        
0.0014979999  6.729...e-07
-make-overlay                                                    609         
0.0012819999  2.105...e-06
-delete-overlay                                                  309         
0.0012420000  4.019...e-06
-skip-chars-backward                                             206         
0.0011609999  5.635...e-06
-proof-shell-slurp-comments                                      207         
0.0011250000  5.434...e-06
-set-marker                                                      1853        
0.0009220000  4.975...e-07
-pg-processing-complete-hint                                     1           
0.000625      0.000625
-proof-next-element-count                                        204         
0.0005830000  2.857...e-06
-spans-at-region-prop                                            1           
0.000573      0.000573
-proof-shell-handle-delayed-output                               1           
0.000495      0.000495
-proof-shell-display-output-as-response                          1           
0.000478      0.000478
-pg-response-display                                             1           
0.000474      0.000474
-proof-display-and-keep-buffer                                   1           
0.000463      0.000463
-overlay-end                                                     1126        
0.0004170000  3.703...e-07
-marker-position                                                 1236        
0.0004100000  3.317...e-07
-match-string                                                    308         
0.0003959999  1.285...e-06
-buffer-live-p                                                   725         
0.0003580000  4.937...e-07
-isar-shell-adjust-line-width                                    206         
0.0003170000  1.538...e-06
-proof-extend-queue                                              1           
0.000293      0.000293
-proof-add-to-queue                                              1           
0.000266      0.000266
-get-buffer-process                                              209         
0.0002369999  1.133...e-06
-overlay-start                                                   604         
0.0002369999  3.923...e-07
-proof-shell-process-urgent-message                              1           
0.000232      0.000232
-proof-shell-process-urgent-message-default                      1           
0.000169      0.000169
-font-lock-fontify-region                                        1           
0.000167      0.000167
-font-lock-default-fontify-region                                1           
0.00016       0.00016
-nreverse                                                        209         
0.0001489999  7.129...e-07
-proof-get-window-for-buffer                                     1           
0.000124      0.000124
-font-lock-fontify-keywords-region                               1           
0.000117      0.000117
-proof-only-whitespace-to-locked-region-p                        1           
0.000108      0.000108
-proof-re-search-backward                                        1           
8.2e-05       8.2e-05
-pg-response-display-with-face                                   2           
8.2e-05       4.1e-05
-re-search-backward                                              1           
6.7e-05       6.7e-05
-pg-response-maybe-erase                                         2           
5.900...e-05  2.950...e-05
-font-lock-mode                                                  3           
5.8e-05       1.933...e-05
-proof-queue-or-locked-end                                       6           
5.600...e-05  9.333...e-06
-proof-shell-ready-prover                                        2           
4.6e-05       2.3e-05
-proof-looking-at-safe                                           8           
4.2e-05       5.25e-06
-proof-shell-start                                               2           
3.700...e-05  1.850...e-05
-proof-maybe-follow-locked-end                                   1           
3.5e-05       3.5e-05
-proof-shell-live-buffer                                         2           
3.1e-05       1.55e-05
-proof-activate-scripting                                        1           
2.8e-05       2.8e-05
-proof-looking-at                                                7           
2.8e-05       4e-06
-proof-grab-lock                                                 1           
2.7e-05       2.7e-05
-proof-unprocessed-begin                                         3           
2.399...e-05  8e-06
-proof-shell-should-be-silent                                    1           
2.2e-05       2.2e-05
-proof-detach-queue                                              1           
1.8e-05       1.8e-05
-scomint-check-proc                                              2           
1.7e-05       8.5e-06
-font-lock-fontify-syntactically-region                          1           
1.7e-05       1.7e-05
-isar-font-lock-fontify-syntactically-region                     1           
1.6e-05       1.6e-05
-span-detach                                                     1           
1.5e-05       1.5e-05
-font-lock-default-function                                      3           
1.400...e-05  4.666...e-06
-proof-shell-strip-eager-annotations                             1           
1.1e-05       1.1e-05
-font-lock-extend-jit-lock-region-after-change                   3           
1e-05         3.333...e-06
-proof-set-queue-endpoints                                       1           
8e-06         8e-06
-font-lock-unfontify-region                                      1           
7e-06         7e-06
-proof-re-search-forward                                         1           
6e-06         6e-06
-proof-associated-windows                                        1           
6e-06         6e-06
-proof-script-next-command-advance                               1           
6e-06         6e-06
-proof-shell-stop-silent-item                                    1           
4e-06         4e-06
-proof-shell-start-silent-item                                   1           
4e-06         4e-06
-proof-shell-action-list-item                                    2           
3e-06         1.5e-06
-proof-shell-clear-silent                                        1           
3e-06         3e-06
-process-status                                                  2           
2e-06         1e-06
-font-lock-set-defaults                                          1           
2e-06         2e-06
-proof-associated-buffers                                        2           
1e-06         5e-07
-proof-minibuffer-message                                        1           
1e-06         1e-06
-proof-shell-set-silent                                          1           
1e-06         1e-06
-proof-release-lock                                              1           
1e-06         1e-06
-pg-finish-tracing-display                                       1           
1e-06         1e-06
-nconc                                                           1           
1e-06         1e-06
-font-lock-extend-region-wholelines                              1           
1e-06         1e-06
-font-lock-default-unfontify-region                              1           
1e-06         1e-06
-proof-pbp-focus-on-first-goal                                   1           
0.0           0.0
-font-lock-extend-region-multiline                               1           
0.0           0.0
-
diff --git a/etc/isar/trace_simp.thy b/etc/isar/trace_simp.thy
deleted file mode 100644
index de651e5..0000000
--- a/etc/isar/trace_simp.thy
+++ /dev/null
@@ -1,20 +0,0 @@
-(* This is a test of tracing output for Isabelle. *)
-
-theory trace_simp imports Main begin
-
-text {*
-  this produces massive amount of simplifier trace, but terminates
-  eventually: *}
-
-declare [[simp_trace]]
-ML {* quick_and_dirty := false *}
-
-datatype ord = Zero | Succ ord | Limit "nat => ord"
-
-(* testing comment here *)
-
-text {* this one loops forever *}
-
-lemma "ALL x. f x = g(f(g(x))) ==> f [] = f [] @ []"
-  apply simp
-
diff --git a/etc/lego/GoalGoal.l b/etc/lego/GoalGoal.l
deleted file mode 100644
index c4826e0..0000000
--- a/etc/lego/GoalGoal.l
+++ /dev/null
@@ -1,13 +0,0 @@
-Module GoalGoal;
-
-Goal first : {A:Prop}A->A;
-intros; Immed;
-(* no Save *)
-
-Goal second : {A:Prop}A->A;
-intros; Immed;
-Save second;
-(* asserting until here caused Proof General to swap first and second.
-This is a bug for LEGO. Thanks to Martin Hofmann for pointing this
-out. An obvious bug fix would be to make the function
-proof-lift-global Coq specific. *)
\ No newline at end of file
diff --git a/etc/lego/error-eg.l b/etc/lego/error-eg.l
deleted file mode 100644
index f6872c9..0000000
--- a/etc/lego/error-eg.l
+++ /dev/null
@@ -1,16 +0,0 @@
-Init LF;
-
-[prop:Type];
-[prf:prop->Type];
-[type:Type];
-[el:type->Type];
-
-[FA : {A:type}((el A) -> prop) -> prop];
-[LL : {A:type}{P:(el A) -> prop}
-          ({x:el A}prf(P(x)))->
-   (********************************)
-         prf(FA A P)];
-
-[P_FA : {A:type}{P:(el A) -> prop}{C_FA:prf(FA A P) -> prop}
-         ((g:{x:el A}prf(P(x)))prf(C_FA(LL A P g))) -> 
-                         {z:prf(FA A P)}prf(C_FA(z))];
\ No newline at end of file
diff --git a/etc/lego/lego-site.el b/etc/lego/lego-site.el
deleted file mode 100644
index 1a31f35..0000000
--- a/etc/lego/lego-site.el
+++ /dev/null
@@ -1,37 +0,0 @@
-;;; lego-site.el --- Site-specific Emacs support for LEGO
-
-;; This file is part of Proof General.
-
-;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014  Free Software Foundation, Inc.
-;; Portions © Copyright 2001-2017  Pierre Courtieu
-;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
-;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
-;; Portions © Copyright 2015-2017  Clément Pit-Claudel
-
-;;; Author: Thomas Kleymann <T.Kleymann@ed.ac.uk>
-;;; Maintainer: lego@dcs.ed.ac.uk
-
-;;; Commentary:
-;;
-
-;;; Code:
-
-(let ((version (getenv "PROOFGENERAL")))
-  (cond ((not version)         ;default
-        (setq load-path
-              (cons "/usr/local/share/elisp/script-management" load-path))
-        (setq load-path
-              (cons "/usr/local/share/elisp/script-management/lego" load-path))
-        (setq auto-mode-alist (cons '("\\.l$" . lego-mode) auto-mode-alist))
-        (autoload 'lego-mode "lego" "Major mode for editing Lego proof 
scripts." t))
-       ((string= version "ancient") 
-        (setq load-path (cons "/usr/local/share/elisp/lego" load-path))
-        (setq auto-mode-alist (cons '("\\.l$" . lego-mode) auto-mode-alist))
-        (autoload 'lego-mode "lego" "Major mode for editing Lego proof 
scripts." t)
-        (autoload 'lego-shell "lego" "Inferior shell invoking lego." t))
-       ((string= version "latest")
-        (load-file 
"/usr/local/share/elisp/ProofGeneral/generic/proof-site.el"))))
-        
-
-        
diff --git a/etc/lego/long-line-backslash.l b/etc/lego/long-line-backslash.l
deleted file mode 100644
index c85dcdc..0000000
--- a/etc/lego/long-line-backslash.l
+++ /dev/null
@@ -1,22 +0,0 @@
-(* 
-
-  long-line-backslash.l
-
-  Test for long lines with backslashes in them.
-  Cause problem with pty communication where line length
-  is limited to 256 characters sometimes (e.g. on Solaris).
-
-*)
-
-echo 
"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 [...]
-
-(* Test subsequent commands can be processed *)
-
-[one = Prop];
-[two = Prop -> Prop];
-[three = Prop -> two];
-
-(* Test something with eager annotations *)
-
-Make "/usr/local/share/lego/lib-alpha/lib_Type/lib_logic";
-
diff --git a/etc/lego/multiple/A.l b/etc/lego/multiple/A.l
deleted file mode 100644
index d45f8db..0000000
--- a/etc/lego/multiple/A.l
+++ /dev/null
@@ -1 +0,0 @@
-Module A;
\ No newline at end of file
diff --git a/etc/lego/multiple/B.l b/etc/lego/multiple/B.l
deleted file mode 100644
index 3a8df7b..0000000
--- a/etc/lego/multiple/B.l
+++ /dev/null
@@ -1,4 +0,0 @@
-(* B.l Module with a comment *)
-Module B;
-
-[prop = Prop];
\ No newline at end of file
diff --git a/etc/lego/multiple/C.l b/etc/lego/multiple/C.l
deleted file mode 100644
index 5a3afdd..0000000
--- a/etc/lego/multiple/C.l
+++ /dev/null
@@ -1 +0,0 @@
-Module C Import A B;
\ No newline at end of file
diff --git a/etc/lego/multiple/D.l b/etc/lego/multiple/D.l
deleted file mode 100644
index b794253..0000000
--- a/etc/lego/multiple/D.l
+++ /dev/null
@@ -1 +0,0 @@
-Module D;
\ No newline at end of file
diff --git a/etc/lego/multiple/README b/etc/lego/multiple/README
deleted file mode 100644
index 11f2152..0000000
--- a/etc/lego/multiple/README
+++ /dev/null
@@ -1,33 +0,0 @@
-Handling of Multiple Files
-==========================
-
-[C depends on A and B]
-
-Notation: A  means that buffer A.l is unlocked
-          A+ means that buffer A.l is partly locked
-          A* means that buffer A.l is locked
-         ? means that behaviour might be different for proof systems
-           with non-linear contexts
-
-
-Test Protocol
--------------
-
- 1) visit A.l                 EFFECTS A
- 2) visit C.l                 EFFECTS A     C
- 3) assert C                  EFFECTS A*    C*
- 4) visit B.l                 EFFECTS A* B* C*
- 5) visit D.l                 EFFECTS A* B* C* D
- 6) retract to middle of B    EFFECTS A* B  C  D
- 7) assert first command of B EFFECTS A* B+ C  D
- 8) assert C                  EFFECTS A* B+ C  D [error message]
- 9) assert B                  EFFECTS A* B* C  D
-10) assert D                  EFFECTS A* B* C  D*
-11) retract B                 EFFECTS A* B  C  D?
-12) assert C                  EFFECTS A* B* C* D?
-13) retract B                 EFFECTS A* B  C  D?
-14) assert B                  EFFECTS A* B* C  D?
-15) assert C                  EFFECTS A* B* C* D?
-16) retract to middle of B    EFFECTS A* B+ C  D?
-14) M-x proof-shell-restart   EFFECTS A  B  C  D
-
diff --git a/etc/lego/pbp.l b/etc/lego/pbp.l
deleted file mode 100644
index 66a6df7..0000000
--- a/etc/lego/pbp.l
+++ /dev/null
@@ -1,30 +0,0 @@
-(* How to prove a sample theorem by PBP. *)
-
-(* All using middle-clicks.
-  
-   1. Click on  ->          (Pbp 0 3 1: Intros A B)
-   2. Click on left (A/\B)  (Pbp 1 2 1: Intros H; Try Refine H)
-   3. Click on A            (Pbp 4 2 1: Intros H1; Try Refine H1)
-   4. Click on B            (Pbp 5 2 1: Intros H2; Try Refine H2)
-   5. Click on A in A/\B    (Pbp 6 2 1: Refine pair; Try Assumption)
-   6. Click on final B      (Pbp 10:    Try Assumption)
-      OR:
-      Click on assumption B (PbpHyp H2: Try Refine H2)
-   QED!!
-*)
-
-Module pbp Import lib_logic;
-
-Goal {A,B:Prop}(A /\ B) -> (B /\ A);
-Intros A B; 
-Intros H; Try Refine H; 
-Intros H1; Try Refine H1; 
-Intros H2; Try Refine H2; 
-Refine pair; Try Assumption; 
-Try Assumption; 
-Save and_comms;
-
-
-
-
-
diff --git a/etc/lego/unsaved-goals.l b/etc/lego/unsaved-goals.l
deleted file mode 100644
index dd9c964..0000000
--- a/etc/lego/unsaved-goals.l
+++ /dev/null
@@ -1,54 +0,0 @@
-(* 
-  Some test cases for closing off unsaved goals, 
-  and the setting proof-completed-proof-behaviour.
-
-  David Aspinall, November 1999.
-
-  Things work fairly well in lego with 
-
-       proof-completed-proof-behaviour='closeany
-
-  In that case, undoing/redoing later declarations 
-  (E and F) following the completed proof works okay, and
-  in the absence of declarations, things work fine.
-    
-  Declarations in LEGO are global, and forgetting a
-  declaration when a proof is still open (even if complete)
-  aborts the proof!  So a proper handling would need to
-  trigger a *further* retraction when the "Forget D" is
-  issued undoing the definition of D.  Never mind.
-
-  With proof-completed-proof-behaviour='closegoal or 'extend,
-  undoing the first goal doesn't forget the declarations.
-
-  This file even causes internal errors in LEGO!
-
-     Warning: forgetting a finished proof
-
-     LEGO detects unexpected exception named "InfixInternal"
-
-  Test with undoing and redoing, and various settings
-  for proof-completed-proof-behaviour
-*)
-   
-
-
-Module unsaved Import lib_logic;
-
-Goal {A,B:Prop}(and A B) -> (and B A);
-intros;
-Refine H;
-intros;
-andI;
-Immed;
-[D = Type];
-[E = Type];
-[F = Type];
-
-Goal {A,B:Prop}(and A B) -> (and B A);
-intros;
-Refine H;
-intros;
-andI;
-Immed;
-
diff --git a/generic/pg-assoc.el b/generic/pg-assoc.el
index 59593ad..d671773 100644
--- a/generic/pg-assoc.el
+++ b/generic/pg-assoc.el
@@ -12,7 +12,7 @@
 ;; Authors:   David Aspinall, Yves Bertot, Healfdene Goguen,
 ;;            Thomas Kleymann and Dilip Sequeira
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/pg-autotest.el b/generic/pg-autotest.el
index 54fa8ab..2bb1d05 100644
--- a/generic/pg-autotest.el
+++ b/generic/pg-autotest.el
@@ -11,7 +11,7 @@
 
 ;; Authors:   David Aspinall
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/pg-custom.el b/generic/pg-custom.el
index 0c67c7a..acbc124 100644
--- a/generic/pg-custom.el
+++ b/generic/pg-custom.el
@@ -3,7 +3,7 @@
 ;; This file is part of Proof General.
 
 ;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014  Free Software Foundation, Inc.
+;; Portions © Copyright 2003, 2012, 2014, 2021  Free Software Foundation, Inc.
 ;; Portions © Copyright 2001-2017  Pierre Courtieu
 ;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
 ;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
@@ -11,14 +11,14 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
 ;; Prover specific settings and user options.
 ;;
 ;; The settings defined here automatically use the current proof
-;; assistant symbol as a prefix, i.e.  isar-favourites, coq-favourites,
+;; assistant symbol as a prefix, i.e.  coq-favourites,
 ;; or whatever will be defined on evaluation.
 ;;
 ;; This file is loaded only by mode stubs defined in `proof-site.el',
@@ -117,7 +117,7 @@ For example for coq on Windows you might need something 
like:
 
 (defpgcustom quit-timeout
   (cond
-   ((eq proof-assistant-symbol 'isar)    45)
+   ;; ((eq proof-assistant-symbol 'isar)    45)
    (t                                   5))
   "The number of seconds to wait after sending `proof-shell-quit-cmd'.
 After this timeout, the proof shell will be killed off more rudely.
@@ -180,7 +180,7 @@ Currently this setting is UNIMPLEMENTED, changes have no 
effect."
 
 (defpgcustom one-command-per-line
   (cond
-   ((eq proof-assistant-symbol 'isar)  nil)
+   ;; ((eq proof-assistant-symbol 'isar)  nil)
    (t t))
   "*If non-nil, format for newlines after each command in a script."
   :type 'boolean
@@ -195,7 +195,7 @@ Currently this setting is UNIMPLEMENTED, changes have no 
effect."
   :set 'proof-set-value
   :group 'proof-user-options)
 
-(defpgcustom unicode-tokens-enable (eq proof-assistant-symbol 'isar)
+(defpgcustom unicode-tokens-enable nil ;; (eq proof-assistant-symbol 'isar)
   "*Non-nil for using Unicode token input mode in Proof General."
   :type 'boolean
   :set 'proof-set-value
diff --git a/generic/pg-goals.el b/generic/pg-goals.el
index d0897fb..f7cb9b3 100755
--- a/generic/pg-goals.el
+++ b/generic/pg-goals.el
@@ -12,7 +12,7 @@
 ;; Authors:   David Aspinall, Yves Bertot, Healfdene Goguen,
 ;;            Thomas Kleymann and Dilip Sequeira
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 
diff --git a/generic/pg-movie.el b/generic/pg-movie.el
index 2b2454d..69de716 100644
--- a/generic/pg-movie.el
+++ b/generic/pg-movie.el
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/pg-pbrpm.el b/generic/pg-pbrpm.el
index 2041800..dd34965 100644
--- a/generic/pg-pbrpm.el
+++ b/generic/pg-pbrpm.el
@@ -2,7 +2,7 @@
 ;;
 ;; Copyright (C) 2004 - Universite de Savoie, France.
 ;; Authors:   Jean-Roch SOTTY, Christophe Raffalli
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
 ;; $Id$
 ;;
diff --git a/generic/pg-pgip.el b/generic/pg-pgip.el
index e7c7e34..fbcb444 100644
--- a/generic/pg-pgip.el
+++ b/generic/pg-pgip.el
@@ -11,7 +11,7 @@
 
 ;; Author:   David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:  GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/pg-response.el b/generic/pg-response.el
index 37f629a..cd611ad 100644
--- a/generic/pg-response.el
+++ b/generic/pg-response.el
@@ -3,7 +3,7 @@
 ;; This file is part of Proof General.
 
 ;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2019  Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2021  Free Software Foundation, Inc.
 ;; Portions © Copyright 2001-2017  Pierre Courtieu
 ;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
 ;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
@@ -12,7 +12,7 @@
 ;; Authors:   David Aspinall, Healfdene Goguen,
 ;;             Thomas Kleymann and Dilip Sequeira
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
@@ -377,7 +377,7 @@ Returns non-nil if response buffer was cleared."
   ;; NB: this displays an empty buffer sometimes when it's not
   ;; so useful.  It _is_ useful if the user has requested to
   ;; see the proof state and there is none
-  ;; (Isabelle/Isar displays nothing: might be better if it did).
+  ;; (Isabelle/Isar displayed nothing: might be better if it did).
   (proof-display-and-keep-buffer proof-response-buffer))
 
 ;;
diff --git a/generic/pg-user.el b/generic/pg-user.el
index 005d919..c87309a 100644
--- a/generic/pg-user.el
+++ b/generic/pg-user.el
@@ -11,7 +11,7 @@
 
 ;; Author:     David Aspinall and others
 
-;; License:    GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/pg-vars.el b/generic/pg-vars.el
index d1e5dfa..be696b2 100644
--- a/generic/pg-vars.el
+++ b/generic/pg-vars.el
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/pg-xml.el b/generic/pg-xml.el
index 4e5ea38..ca2bfd8 100644
--- a/generic/pg-xml.el
+++ b/generic/pg-xml.el
@@ -11,7 +11,7 @@
 
 ;; Author:     David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:    GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-auxmodes.el b/generic/proof-auxmodes.el
index d3ccf41..a774912 100644
--- a/generic/proof-auxmodes.el
+++ b/generic/proof-auxmodes.el
@@ -11,7 +11,7 @@
 
 ;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-config.el b/generic/proof-config.el
index 951aade..506a0e1 100644
--- a/generic/proof-config.el
+++ b/generic/proof-config.el
@@ -3,7 +3,7 @@
 ;; This file is part of Proof General.
 
 ;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014  Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2021  Free Software Foundation, Inc.
 ;; Portions © Copyright 2001-2017  Pierre Courtieu
 ;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
 ;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
@@ -1449,8 +1449,7 @@ This is an experimental feature, currently 
work-in-progress."
   "Splits strings which match `proof-shell-theorem-dependency-list-regexp'.
 Used as an argument to `split-string'; nil defaults to whitespace.
 \(This setting is necessary for provers which allow whitespace in
-the names of theorems/definitions/constants), see setting for
-Isabelle in isa/isa.el and isar/isar.el."
+the names of theorems/definitions/constants)."
   :type '(choice (const nil) regexp)
   :group 'proof-shell)
 
@@ -1581,9 +1580,7 @@ they appear inside ML strings and the backslash character 
and
 quote characters must be escaped.  The setting
   '((\"\\\\\\\\\" . \"\\\\\\\\\")
     (\"\\\"\" . \"\\\\\\\"\"))
-achieves this.   This does not apply to LEGO, which does not
-need backslash escapes and does not allow filenames with
-quote characters.
+achieves this.
 
 This setting is used inside the function `proof-format-filename'."
   :type '(list (cons string string))
@@ -1629,7 +1626,7 @@ bound to `queueitems'."
   :group 'proof-shell)
 
 (defcustom proof-shell-insert-hook nil
-  "Hooks run by `proof-shell-insert' before inserting a command.
+  "Hook run by `proof-shell-insert' before inserting a command.
 Can be used to configure the proof assistant to the interface in
 various ways -- for example, to observe or alter the commands sent to
 the prover, or to sneak in extra commands to configure the prover.
@@ -1662,12 +1659,15 @@ prompts than expected, things will break!  Extending 
the variable
 stripped of carriage returns before being sent.
 
 Example uses:
-LEGO uses this hook for setting the pretty printer width if
+Lego used this hook for setting the pretty printer width if
 the window width has changed;
-Plastic uses it to remove literate-style markup from `string'.
+Plastic used it to remove literate-style markup from `string'.
 
 See also `proof-script-preprocess' which can munge text when
 it is added to the queue of commands."
+  ;; FIXME: The docstring suggests this is used by the backend code (e.g. LEGO
+  ;; support) rather than by the end user, so maybe it shouldn't be
+  ;; a `defcustom'?
   :type '(repeat function)
   :group 'proof-shell)
 
@@ -1679,10 +1679,9 @@ by the user.  It is run by `proof-assert-until-point'.
 WARNING: don't call `proof-assert-until-point' in this hook, you
 would loop forever.
 
-Example of use: Insert a command to adapt printing width.  Note
-that `proof-shell-insert-hook' may be use instead (see lego mode)
-if no more prompt will be displayed (see
-`proof-shell-insert-hook' for details)."
+Example of use: Insert a command to adapt printing width.
+Note that `proof-shell-insert-hook' (which see) may be use instead
+if no more prompt will be displayed."
   :type '(repeat function)
   :group 'proof-shell)
 
@@ -1694,10 +1693,9 @@ Can be used to insert commands.  It is run by
 WARNING: don't call `proof-retract-until-point' in this hook, you
 would loop forever.
 
-Example of use: Insert a command to adapt printing width.  Note
-that `proof-shell-insert-hook' may be use instead (see lego mode)
-if no more prompt will be displayed (see
-`proof-shell-insert-hook' for details)."
+Example of use: Insert a command to adapt printing width.
+Note that `proof-shell-insert-hook' (which see) may be use instead
+if no more prompt will be displayed."
   :type '(repeat function)
   :group 'proof-shell)
 
@@ -1855,11 +1853,12 @@ Leave unset if no special characters are being used."
   :group 'proof-goals)
 
 (defcustom pg-subterm-anns-use-stack nil
+  ;; FIXME: The docstring suggest we should use t!?
   "Choice of syntax tree encoding for terms.
 
 If nil, prover is expected to make no optimisations.
 If non-nil, the pretty printer of the prover only reports local changes.
-For LEGO 1.3.1 use nil, for Coq 6.2, use t."
+For Coq 6.2, use t."
   :type 'boolean
   :group 'proof-goals)
 
diff --git a/generic/proof-depends.el b/generic/proof-depends.el
index 2d3a095..dd22442 100644
--- a/generic/proof-depends.el
+++ b/generic/proof-depends.el
@@ -12,7 +12,7 @@
 ;; Authors:      David Aspinall <David.Aspinall@ed.ac.uk>
 ;;              Earlier version by Fiona McNeil.
 
-;; License:      GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
@@ -89,7 +89,7 @@ Called from `proof-done-advancing' when a save is processed 
and
   (span-set-property gspan 'dependencies
                     ;; Ancestors of NAME are in the second component.
                     ;; FIXME: for now we ignore the first component:
-                    ;; NAME may not be enough [Isar allows proof regions
+                    ;; NAME may not be enough [e.g. Isar allowed proof regions
                     ;; with multiple names, which are reported in dep'c'y
                     ;; output].
                     (cdr proof-last-theorem-dependencies))
diff --git a/generic/proof-easy-config.el b/generic/proof-easy-config.el
index 4dc2e1d..6639e9b 100644
--- a/generic/proof-easy-config.el
+++ b/generic/proof-easy-config.el
@@ -11,7 +11,7 @@
 
 ;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-faces.el b/generic/proof-faces.el
index b06a64f..322fdd1 100644
--- a/generic/proof-faces.el
+++ b/generic/proof-faces.el
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-indent.el b/generic/proof-indent.el
index 24da205..d8062cc 100644
--- a/generic/proof-indent.el
+++ b/generic/proof-indent.el
@@ -11,7 +11,7 @@
 
 ;; Authors:       Markus Wenzel, David Aspinall
 
-;; License:        GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;; 
diff --git a/generic/proof-maths-menu.el b/generic/proof-maths-menu.el
index 6ff81c9..1c91c00 100644
--- a/generic/proof-maths-menu.el
+++ b/generic/proof-maths-menu.el
@@ -11,7 +11,7 @@
 
 ;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-menu.el b/generic/proof-menu.el
index e15ce4d..77bc05a 100644
--- a/generic/proof-menu.el
+++ b/generic/proof-menu.el
@@ -11,7 +11,7 @@
 
 ;; Authors:   David Aspinall
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-script.el b/generic/proof-script.el
index 4855813..654b979 100644
--- a/generic/proof-script.el
+++ b/generic/proof-script.el
@@ -12,7 +12,7 @@
 ;; Authors:   David Aspinall, Yves Bertot, Healfdene Goguen,
 ;;            Thomas Kleymann and Dilip Sequeira
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
@@ -749,7 +749,7 @@ Each span has a 'type property, one of:
 (defun pg-last-output-displayform ()
   "Return displayable form of `proof-shell-last-output'.
 This is used to annotate the buffer with the result of proof steps."
-  ;; NOTE: Isabelle/Isar uses urgent messages (sigh) in its ordinary output.
+  ;; NOTE: Isabelle/Isar used urgent messages (sigh) in its ordinary output.
   ;; ("Successful attempt...").  This loses here.
   (if (string= proof-shell-last-output "") ""
     (let* ((text (proof-shell-strip-output-markup
@@ -1409,7 +1409,7 @@ that is not yet documented here, this function
               ;; don't amalgamate unless the nesting depth is 0,
               ;; i.e. we're in a top-level proof.
               ;; This assumes prover keeps history for nested proofs.
-              ;; (True for Isabelle/Isar).
+              ;; (was true for Isabelle/Isar).
               (eq proof-nesting-depth 0)
             t))
       (proof-done-advancing-save span))
@@ -1487,9 +1487,10 @@ Besides stuff that is not yet documented here, this 
function
 - enters some commands and their spans in some database (with for
   me unknown purpose)"
   (unless (or (eq proof-shell-proof-completed 1)
-             (eq proof-assistant-symbol 'isar))
+             ;; (eq proof-assistant-symbol 'isar)
+             )
     ;; We expect saves to succeed only for recently completed top-level proofs.
-    ;; NB: not true in Isar, because save commands can perform proof.
+    ;; NB: Wasn't true in Isar, because save commands could perform proof.
     ;; Note: not true in Coq either, if there is a command (eg. a Check)
     ;; between the tactic that finished the proof and the Qed.
     (proof-debug
@@ -2258,7 +2259,7 @@ No effect if prover is busy."
 ;;
 
 ;; Most of the hard work (computing the commands to do the retraction)
-;; is implemented in the customisation module (lego.el or coq.el), so
+;; is implemented in the customisation module (e.g. coq.el), so
 ;; code here is fairly straightforward.
 
 
diff --git a/generic/proof-shell.el b/generic/proof-shell.el
index 8222fb3..3407a0f 100644
--- a/generic/proof-shell.el
+++ b/generic/proof-shell.el
@@ -3,7 +3,7 @@
 ;; This file is part of Proof General.
 
 ;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2018  Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2021  Free Software Foundation, Inc.
 ;; Portions © Copyright 2001-2017  Pierre Courtieu
 ;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
 ;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
@@ -12,7 +12,7 @@
 ;; Authors:   David Aspinall, Yves Bertot, Healfdene Goguen,
 ;;            Thomas Kleymann and Dilip Sequeira
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
@@ -376,7 +376,7 @@ process command."
              proof-shell-process-connection-type)
 
             ;; Trac #324, Trac #284: default with Emacs 23 variants
-            ;; is t.  nil gives marginally better results with "make
+            ;; is t.  nil gave marginally better results with "make
             ;; profile.isar" on homogenous test input.  Top-level
             ;; Emacs loop causes slow down on Mac and Windows ports.
             (process-adaptive-read-buffering nil)
@@ -627,7 +627,7 @@ It is up to the proof assistant how much context is 
cleared: for
 example, theories already loaded may be \"cached\" in some way,
 so that loading them the next time round only performs a re-linking
 operation, not full re-processing.  (One way of caching is via
-object files, used by Lego and Coq)."
+object files, used by Coq)."
   (interactive)
   (when proof-shell-busy
     (proof-interrupt-process)
diff --git a/generic/proof-site.el b/generic/proof-site.el
index 74bdaea..cfaa721 100644
--- a/generic/proof-site.el
+++ b/generic/proof-site.el
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
@@ -44,18 +44,10 @@
     '(
       ;; Main instances of PG.
 
-      (isar "Isabelle" "thy")
       (coq "Coq" "v" nil (".vo" ".glob"))
       (easycrypt "EasyCrypt" "ec" "\\.eca?\\'")
       (phox "PhoX" "phx" nil (".phi" ".pho"))
 
-      ;; Obscure instances or conflict with other Emacs modes.
-
-      ;; (lego "LEGO" "l")
-      ;; (ccc    "CASL Consistency Checker" "ccc")
-
-      ;; (hol-light "HOL Light" "ml") ; [for testing]
-
       ;; Cut-and-paste management only
 
       (pgshell  "PG-Shell" "pgsh")
@@ -64,11 +56,6 @@
 
       ;; Incomplete/obsolete:
 
-      ;; (hol98        "HOL" "sml")
-      ;; (acl2 "ACL2" "acl2")
-      ;; (twelf        "Twelf" "elf")
-      ;; (plastic "Plastic" "lf")        ; obsolete
-      ;; (lclam "Lambda-CLAM" "lcm")     ; obsolete
       ;; (demoisa "Isabelle Demo" "ML")  ; obsolete
       )
     "Default value for `proof-assistant-table', which see.")
@@ -237,7 +224,7 @@ only select the proof assistants you (or your site) may 
need.
 You can select which proof assistants you want by setting this
 variable before `proof-site.el' is loaded, or by setting
 the environment variable `PROOFGENERAL_ASSISTANTS' to the
-symbols you want, for example \"lego isa\".  Or you can
+symbols you want, for example \"coq easycrypt\".  Or you can
 edit the file `proof-site.el' itself.
 
 Note: to change proof assistant, you must start a new Emacs session.")
diff --git a/generic/proof-splash.el b/generic/proof-splash.el
index da5402a..c44de00 100644
--- a/generic/proof-splash.el
+++ b/generic/proof-splash.el
@@ -11,7 +11,7 @@
 
 ;; Author:    David Aspinall
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;; 
diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el
index 6fbe8eb..5160171 100644
--- a/generic/proof-syntax.el
+++ b/generic/proof-syntax.el
@@ -12,7 +12,7 @@
 ;; Authors:   David Aspinall, Healfdene Goguen,
 ;;           Thomas Kleymann, Dilip Sequiera
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;; 
diff --git a/generic/proof-toolbar.el b/generic/proof-toolbar.el
index 8855247..7bffbad 100644
--- a/generic/proof-toolbar.el
+++ b/generic/proof-toolbar.el
@@ -11,7 +11,7 @@
 
 ;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-tree.el b/generic/proof-tree.el
index 8ea26cc..6ddefea 100644
--- a/generic/proof-tree.el
+++ b/generic/proof-tree.el
@@ -11,7 +11,7 @@
 
 ;; Authors:   Hendrik Tews
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-unicode-tokens.el b/generic/proof-unicode-tokens.el
index e030d4b..967265f 100644
--- a/generic/proof-unicode-tokens.el
+++ b/generic/proof-unicode-tokens.el
@@ -11,7 +11,7 @@
 
 ;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof-useropts.el b/generic/proof-useropts.el
index 1432776..9edeec4 100644
--- a/generic/proof-useropts.el
+++ b/generic/proof-useropts.el
@@ -3,7 +3,7 @@
 ;; This file is part of Proof General.
 
 ;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2018  Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2021  Free Software Foundation, Inc.
 ;; Portions © Copyright 2001-2017  Pierre Courtieu
 ;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
 ;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
@@ -392,8 +392,8 @@ For example,
 
    ssh bigjobs
 
-Would cause Proof General to issue the command `ssh bigjobs isabelle'
-to start Isabelle remotely on our large compute server called `bigjobs'.
+Would cause Proof General to issue the command `ssh bigjobs coqtop'
+to start Coq remotely on our large compute server called `bigjobs'.
 
 The protocol used should be configured so that no user interaction
 \(passwords, or whatever) is required to get going.  For proper
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index 673b269..1e0f407 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/generic/proof.el b/generic/proof.el
index 769459d..6db3cc4 100644
--- a/generic/proof.el
+++ b/generic/proof.el
@@ -12,7 +12,7 @@
 ;; Authors:   David Aspinall, Yves Bertot, Healfdene Goguen,
 ;;            Thomas Kleymann and Dilip Sequeira
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;; Keywords: languages
 
diff --git a/hol-light/LICENSE-HOL-LIGHT b/hol-light/LICENSE-HOL-LIGHT
deleted file mode 100644
index f192eff..0000000
--- a/hol-light/LICENSE-HOL-LIGHT
+++ /dev/null
@@ -1,29 +0,0 @@
-            HOL Light copyright notice, licence and disclaimer
-
-                     (c) University of Cambridge 1998
-                  (c) Copyright, John Harrison 1998-2008
-
-HOL Light version 2.20, hereinafter referred to as "the software", is a
-computer theorem proving system written by John Harrison. Much of the
-software was developed at the University of Cambridge Computer Laboratory,
-New Museums Site, Pembroke Street, Cambridge, CB2 3QG, England. The
-software is copyright, University of Cambridge 1998 and John Harrison
-1998-2007.
-
-Permission to use, copy, modify, and distribute the software and its
-documentation for any purpose and without fee is hereby granted. In the
-case of further distribution of the software the present text, including
-copyright notice, licence and disclaimer of warranty, must be included in
-full and unmodified form in any release. Distribution of derivative
-software obtained by modifying the software, or incorporating it into
-other software, is permitted, provided the inclusion of the software is
-acknowledged and that any changes made to the software are clearly
-documented.
-
-John Harrison and the University of Cambridge disclaim all warranties
-with regard to the software, including all implied warranties of
-merchantability and fitness. In no event shall John Harrison or the
-University of Cambridge be liable for any special, indirect,
-incidental or consequential damages or any damages whatsoever,
-including, but not limited to, those arising from computer failure or
-malfunction, work stoppage, loss of profit or loss of contracts.
diff --git a/hol-light/README b/hol-light/README
deleted file mode 100644
index 238586c..0000000
--- a/hol-light/README
+++ /dev/null
@@ -1,45 +0,0 @@
-HOL Light in Proof General.
-
-Written by David Aspinall and Mark Adams.
-
-Status:                   not officially supported yet
-Maintainer:        volunteer required
-HOL-Light version: SVN trunk (a moving target 8-) - tested on 118)
-HOL homepage:      https://www.cl.cam.ac.uk/~jrh13/hol-light/
-
-========================================
-
-
-This is a "technology demonstration" of Proof General for HOL-Light.
-
-We have written this in the hope that somebody from the HOL-Light
-community will adopt it, maintain and improve it, and thus turn it
-into a proper instantiation of Proof General.
-
-
-------------
-
-Notes:
-
-There are some problems at the moment.  HOL proof scripts often use
-batch-oriented single step tactic proofs, but Proof General does not
-offer an easy way to edit these kind of proofs.  The "Boomburg-HOL"
-Emacs interface by Koichi Takahashi and Masima Hagiya addressed this a
-long time ago, and to some extent so perhaps does the Emacs interface
-supplied with HOL.  Perhaps one of these could be
-embedded/reimplemented inside Proof General.  Implemented in a generic
-way, managing batch vs interactive proofs might also be useful for
-other provers.
-
-Another problem is that HOL scripts sometimes use OCaml modules, which
-will cause confusion because Proof General does not really parse OCaml,
-it just looks for semicolons.  This could be improved by taking a
-better parser (perhaps from the OCaml mode for Emacs).
-
-These improvements would be worthwhile contributions to Proof General
-and also provide the HOL community with a nice front end.  
-Please have a go!
-
-
-$Id$
-
diff --git a/hol-light/TODO b/hol-light/TODO
deleted file mode 100644
index 61efb54..0000000
--- a/hol-light/TODO
+++ /dev/null
@@ -1,17 +0,0 @@
-* Prooftree support: fix problem with successive proofs
-  (try example.ml with tree turned on, gives exn in Prooftree)
-  [da to investigate]
-
-* Prooftree: fix evar support so it works
-  Need patch for proof tree program and (maybe) modification of 
-  output
-  [ma to do]
-
-* PG: add patch for background startup (needs testing)
-  [da to do]
-
-* Integrate Tactic recording/proof refactoring (e.g. menu commands,
-  also load point: if it is to work from Proof General, make it
-  work from here, otherwise distribute it separately)
-  [ma to do]
-
diff --git a/hol-light/TacticRecording/INSTRUCTIONS 
b/hol-light/TacticRecording/INSTRUCTIONS
deleted file mode 100644
index 86380b9..0000000
--- a/hol-light/TacticRecording/INSTRUCTIONS
+++ /dev/null
@@ -1,36 +0,0 @@
-To use this:
-1. first compile HOL Light and any extra files up to the particular proof you 
want to record;
-     #use "hol.ml";;
-     #use ....
-
-2. Then process the 'main.ml' file
-     #use "TacticRecording/main.ml";;
-
-3. Then perform the tactic proof you want to record, using g/e's or prove:
-     g `...`;;
-     e (...);;
-     e (...);;
-  OR
-     prove (`...`, ... THEN ... THENL [...]);;
-
-4. Use the ML export commands to output the proof in the form you want:
-
-     print_executed_proof ();;
-         - Tries to reproduce the inputted proof verbatim, with steps
-          corresponding one-to-one to original.
-
-     print_flat_proof ();;
-         - Prints the proof as a flatten series single-tactic steps, with no
-          tacticals.
-
-     print_thenl_proof ();;
-         - Prints the proof as a single-step tactic, connected by THEN for
-          single goals and THENL for multiple goals.  This structure directly
-          reflects the tree structure of the proof as it was executed.
-
-     print_optimal_proof ();;
-         - Like 'print_thenl_proof', but prints a more concise proof, not
-          necessarily reflecting the original tree structure.  Currently this
-          only performs one improvement: seeing where THENL can be replaced
-          with THEN.
-
diff --git a/hol-light/TacticRecording/LIMITATIONS 
b/hol-light/TacticRecording/LIMITATIONS
deleted file mode 100644
index 56537d4..0000000
--- a/hol-light/TacticRecording/LIMITATIONS
+++ /dev/null
@@ -1,18 +0,0 @@
-ML objects that get recorded need to be promoted
-- and the promoted subgoal package commands don't work for unpromoted ML 
objects
-- implementor needs to write promotion functions for each type shape
-- implementor needs to apply these promotion functions to lots of tactics/thms
-- user needs to promote their own stuff, e.g. their own rules/thms
-
-Tactic proofs with embedded arbitrary ML are problematic
-- sometimes this can still get recorded, and if so then exported ML will work
-- but exported ML is unlikely to faithfully reproduce original ML text
-
-Limitations in HOL Light's pretty printer for HOL terms
-- it outputs ambiguous expressions without type annotations
-- this is used by my ML exporter
-
-However, in practice the appraoch works well
-- the same old pool of 100 tactics, 100 rules, 1000 theorems get used
-- and any promotion that needs doing is easy anyway
-- hand tweaks are occasionally required for aribitrary ML and type annotations
diff --git a/hol-light/TacticRecording/biolayout.ml 
b/hol-light/TacticRecording/biolayout.ml
deleted file mode 100644
index 0de3119..0000000
--- a/hol-light/TacticRecording/biolayout.ml
+++ /dev/null
@@ -1,30 +0,0 @@
-(* ========================================================================== 
*)
-(* BIOLAYOUT EXPORT (HOL LIGHT)                                               
*)
-(* - Support for BioLayout graph display of recorded tactics                  
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Univeristy of Edinburgh, 2012                                
*)
-(* ========================================================================== 
*)
-
-
-(* biolayout_nodename *)
-
-let biolayout_nodename n =
-  "Node" ^ string_of_int n;;
-
-
-(* biolayout_export *)
-
-let biolayout_export path name =
-  let nns = gtree_graph () in
-  let suffix = ".layout" in
-  let fullname = Filename.concat path (name ^ suffix) in
-  let ch = open_out fullname in
-  let export_line ch (n1,n2) =
-     (output_string ch (biolayout_nodename n1);
-      output_string ch "\t";
-      output_string ch (biolayout_nodename n2);
-      output_string ch "\n") in
-  (print_string ("Exporting to file \"" ^ fullname ^ "\"\n");
-   do_list (export_line ch) nns;
-   close_out ch);;
diff --git a/hol-light/TacticRecording/dltree.ml 
b/hol-light/TacticRecording/dltree.ml
deleted file mode 100644
index e97ecd0..0000000
--- a/hol-light/TacticRecording/dltree.ml
+++ /dev/null
@@ -1,268 +0,0 @@
-(* ========================================================================== 
*)
-(* DYNAMIC LOOKUP TREES (HOL Zero)                                            
*)
-(* - Library support for data storage in dynamic indexed binary trees         
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Proof Technologies Ltd, 2008-2011                            
*)
-(* ========================================================================== 
*)
-
-
-module Dltree : Dltree_sig = struct
-
-
-(* This module provides library support for operations on dynamic lookup      
*)
-(* trees - self-balancing binary trees that store information on nodes        
*)
-(* ordered according to an index under '(<)'-comparison.                      
*)
-
-(* This is implemented as Andersson trees (also called AA trees), that stay   
*)
-(* balanced within a factor of 2 - i.e. the maximum distance from root to     
*)
-(* leaf is no more than twice the minimum distance.  This has a fairly simple 
*)
-(* implementation and yet is one of the most efficient forms of self-         
*)
-(* balancing trees.                                                           
*)
-
-
-(* dltree datatype *)
-
-(* The 'dltree' datatype is a binary lookup tree datatype, where an index and 
*)
-(* item are held at each node, and leaves hold no information.  Comparison    
*)
-(* between indexes is done using the polymorphic '(<)' total order relation.  
*)
-
-(* An integer is also held at each node and is used to keep the tree balanced 
*)
-(* as items are inserted/removed.  This integer represents the distance from  
*)
-(* the node to the left-most leaf descendant of the node.  Thus every left-   
*)
-(* branch node holds a value 1 less than its parent, and a node with a leaf   
*)
-(* as its left branch holds value 1.  Every right-branch holds an integer     
*)
-(* either equal to its parent's or 1 less, and must be strictly less than its 
*)
-(* grandparent's.  Thus the integer at a node also represents an upper bound  
*)
-(* of half the distance from the node to its rightmost leaf descendant, and   
*)
-(* thus an upper bound of half the distance from the node to any descendant.  
*)
-
-(* The tree is kept balanced by adjusting nodes' integers and left and right  
*)
-(* branches as the tree is updated.  This is done by the 'skew' and 'split'   
*)
-(* operations.  The number of nodes that need to be considered in this        
*)
-(* process is at most O(log n).  Note that reference types are used for a     
*)
-(* node's branches, to save on unnecessary garbage collection that would      
*)
-(* otherwise result in rebuilding all ancestor nodes of all adjusted nodes    
*)
-(* each time a tree is updated.                                               
*)
-
-type ('a,'b) dltree0 =
-   Node of (int * ('a * 'b) * ('a,'b) dltree * ('a,'b) dltree)
- | Leaf
-
-and ('a,'b) dltree = ('a,'b) dltree0 ref;;
-
-
-(* dltree_empty : unit -> ('a,'b) dltree                                      
*)
-(*                                                                            
*)
-(* Returns a fresh empty dltree.                                              
*)
-
-let dltree_empty () = ref Leaf;;
-
-
-(* dltree_reempty : ('a,'b) dltree -> unit                                    
*)
-(*                                                                            
*)
-(* Empties a given dltree.                                                    
*)
-
-let dltree_reempty tr = (tr := Leaf);;
-
-
-(* dltree_elems : ('a,'b) dltree -> ('a * 'b) list                            
*)
-(*                                                                            
*)
-(* This converts the information held in a given lookup tree into an index-   
*)
-(* ordered association list.                                                  
*)
-
-let rec dltree_elems0 tr0 xys0 =
-  match !tr0 with
-    Node (_,xy0,tr1,tr2) -> dltree_elems0 tr1 (xy0::(dltree_elems0 tr2 xys0))
-  | Leaf                 -> xys0;;
-
-let dltree_elems tr = dltree_elems0 tr [];;
-
-
-(* Node destructors *)
-
-let dest_node tr0 =
-  match !tr0 with
-    Node info -> info
-  | Leaf      -> failwith "dest_node: ?";;
-
-let level tr0 =
-  match !tr0 with
-    Node (l,_,_,_) -> l
-  | Leaf           -> 0;;
-
-let left_branch tr0 =
-  match !tr0 with
-    Node (_,_,tr1,_) -> tr1
-  | Leaf             -> failwith "left_branch: No left branch";;
-
-let right_branch tr0 =
-  match !tr0 with
-    Node (_,_,_,tr2) -> tr2
-  | Leaf             -> failwith "right_branch: No right branch";;
-
-let rec leftmost_elem x tr0 =
-  match !tr0 with
-    Node (_,x0,tr1,_) -> leftmost_elem x0 tr1
-  | Leaf              -> x;;
-
-let rec rightmost_elem x tr0 =
-  match !tr0 with
-    Node (_,x0,_,tr2) -> rightmost_elem x0 tr2
-  | Leaf              -> x;;
-
-
-(* Tests *)
-
-let is_leaf tr0 =
-  match !tr0 with
-    Leaf -> true
-  | _    -> false;;
-
-let is_node tr0 =
-  match !tr0 with
-    Node _ -> true
-  | _      -> false;;
-
-
-(* skew *)
-
-let skew tr0 =
-  if (is_leaf tr0) or (is_leaf (left_branch tr0))
-    then ()
-  else if (level (left_branch tr0) = level tr0)
-    then let (l0,xy0,tr1,tr2) = dest_node tr0 in
-         let (l1,xy1,tr11,tr12) = dest_node tr1 in
-         (tr0 := Node (l1, xy1, tr11, ref (Node (l0,xy0,tr12,tr2))))
-    else ();;
-
-
-(* split *)
-
-let split tr0 =
-  if (is_leaf tr0) or (is_leaf (right_branch tr0))
-    then ()
-  else if (level (right_branch (right_branch tr0)) = level tr0)
-    then let (l0,xy0,tr1,tr2) = dest_node tr0 in
-         let (l2,xy2,tr21,tr22) = dest_node tr2 in
-         (tr0 := Node (l2 + 1, xy2, ref (Node (l0,xy0,tr1,tr21)), tr22))
-    else ();;
-
-
-(* dltree_insert : 'a * 'b -> ('a,'b) dltree -> unit                          
*)
-(*                                                                            
*)
-(* This inserts the supplied single indexed item into a given lookup tree.    
*)
-(* Fails if the tree already contains an entry for the supplied index.        
*)
-
-let rec dltree_insert ((x,_) as xy) tr0 =
-  match !tr0 with
-    Node (_,(x0,_),tr1,tr2)
-       -> ((if (x < x0)
-              then (* Put into left branch *)
-                   dltree_insert xy tr1
-            else if (x0 < x)
-              then (* Put into right branch *)
-                   dltree_insert xy tr2
-              else (* Element already in tree *)
-                   failwith "dltree_insert: Already in tree");
-           (* Rebalance from the node *)
-           skew tr0;
-           split tr0)
-  | Leaf
-       -> (* Put element here *)
-          (tr0 := Node (1, xy, ref Leaf, ref Leaf));;
-
-
-(* dltree_remove : 'a -> ('a,'b) dltree -> unit                               
*)
-(*                                                                            
*)
-(* This removes the entry at the supplied index in a given lookup tree.       
*)
-(* Fails if the tree does not contain an entry for the supplied index.        
*)
-
-let decrease_level tr0 =
-  let (l0,xy0,tr1,tr2) = dest_node tr0 in
-  let n = 1 + min (level tr1) (level tr2) in
-  if (n < l0) && (is_node tr2)
-    then (tr0 := Node (n,xy0,tr1,tr2);
-          if (is_node tr2)
-            then let (l2,xy2,tr21,tr22) = dest_node tr2 in
-                 if (n < level tr2)
-                   then (tr2 := Node (n,xy2,tr21,tr22))
-                   else ()
-            else ())
-    else ();;
-
-let rec dltree_remove x tr0 =
-  match !tr0 with
-    Node (l0,((x0,_) as xy0),tr1,tr2)
-       -> ((if (x < x0)
-              then (* Element should be in left branch *)
-                   dltree_remove x tr1
-            else if (x0 < x)
-              then (* Element should be in right branch *)
-                   dltree_remove x tr2
-              else (* Node holds element to be removed *)
-                   if (is_leaf tr1) && (is_leaf tr2)
-                     then (tr0 := Leaf)
-                   else if (is_leaf tr1)
-                     then let (x2,_) as xy2 = leftmost_elem xy0 tr2 in
-                          (dltree_remove x2 tr2;
-                           tr0 := Node (l0,xy2,tr1,tr2))
-                     else let (x1,_) as xy1 = rightmost_elem xy0 tr1 in
-                          (dltree_remove x1 tr1;
-                           tr0 := Node (l0,xy1,tr1,tr2)));
-           (if (is_node tr0)
-              then (decrease_level tr0;
-                    skew tr0;
-                    skew tr2;
-                    (if (is_node tr2) then skew (right_branch tr2)
-                                      else ());
-                    split tr0;
-                    split tr2)
-              else ()))
-  | Leaf
-       -> (* Element not in tree *)
-          failwith "dltree_remove: Not in tree";;
-
-
-(* dltree_elem : 'a -> ('a,'b) dltree -> 'a * 'b                              
*)
-(*                                                                            
*)
-(* This returns the index and item held at the supplied index in a given      
*)
-(* lookup tree.  Fails if the tree has no entry for the supplied index.       
*)
-
-let rec dltree_elem x0 tr =
-  match !tr with
-    Node (_, ((x,_) as xy), tr1, tr2)
-         -> if (x0 < x)
-              then dltree_elem x0 tr1
-            else if (x < x0)
-              then dltree_elem x0 tr2
-              else xy
-  | Leaf -> failwith "dltree_elem: Not in tree";;
-
-
-(* dltree_lookup : 'a -> ('a,'b) dltree -> 'b                                 
*)
-(*                                                                            
*)
-(* This returns the item held at the supplied index in a given lookup tree.   
*)
-
-let rec dltree_lookup x0 tr =
-  let (_,y) = try  dltree_elem x0 tr
-              with Failure _ -> failwith "dltree_lookup: Not in tree" in
-  y;;
-
-
-(* dltree_mem : 'a -> ('a,'b) dltree -> bool                                  
*)
-(*                                                                            
*)
-(* This returns "true" iff the supplied index occurs in a given lookup tree.  
*)
-
-let rec dltree_mem x0 tr =
-  match !tr with
-    Node (_,(x,_),tr1,tr2)
-         -> if (x0 < x)
-              then dltree_mem x0 tr1
-            else if (x < x0)
-              then dltree_mem x0 tr2
-              else true
-  | Leaf -> false;;
-
-
-end;;
diff --git a/hol-light/TacticRecording/dltree.mli 
b/hol-light/TacticRecording/dltree.mli
deleted file mode 100644
index 2f57049..0000000
--- a/hol-light/TacticRecording/dltree.mli
+++ /dev/null
@@ -1,22 +0,0 @@
-(* ========================================================================== 
*)
-(* DYNAMIC LOOKUP TREES (HOL Zero)                                            
*)
-(* - Library support for data storage in dynamic indexed binary trees         
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Proof Technologies Ltd, 2008-2011                            
*)
-(* ========================================================================== 
*)
-
-
-module type Dltree_sig = sig
-
-  type ('a,'b) dltree
-  val dltree_empty : unit -> ('a,'b) dltree
-  val dltree_reempty : ('a,'b) dltree -> unit
-  val dltree_mem : 'a -> ('a,'b) dltree -> bool
-  val dltree_lookup : 'a -> ('a,'b) dltree -> 'b
-  val dltree_elem : 'a -> ('a,'b) dltree -> 'a * 'b
-  val dltree_elems : ('a,'b) dltree -> ('a * 'b) list
-  val dltree_insert : ('a * 'b) -> ('a,'b) dltree -> unit
-  val dltree_remove : 'a -> ('a,'b) dltree -> unit
-
-end;;
diff --git a/hol-light/TacticRecording/ex.dot b/hol-light/TacticRecording/ex.dot
deleted file mode 100644
index e96142f..0000000
--- a/hol-light/TacticRecording/ex.dot
+++ /dev/null
@@ -1,24 +0,0 @@
-digraph G {
-  subgraph cluster1 {
-    label = "induction";
-    517 -> 518;
-    517 -> 519;
-  }
-  subgraph cluster2 {
-    label = "base case";
-    528;
-  }
-  subgraph cluster3 {
-    label = "step case";
-    537 -> 538;
-    538 -> 540;
-    540 -> 542;
-    542 -> 544;
-    544 -> 546;
-    546 -> 548;
-  }
-  512 -> 513;
-  513 -> 517;
-  518 -> 528;
-  519 -> 537;
-}
\ No newline at end of file
diff --git a/hol-light/TacticRecording/ex2.dot 
b/hol-light/TacticRecording/ex2.dot
deleted file mode 100644
index fbe961b..0000000
--- a/hol-light/TacticRecording/ex2.dot
+++ /dev/null
@@ -1,13 +0,0 @@
-digraph G {
-  subgraph cluster0 {
-    label = "process #1"
-    a0->a1->a2->a3
-  }
-  subgraph cluster1 {
-    label = "process #2"
-    b0->b1->b2->b3
-  }
-  b3->23
-  b2->a3
-  a3->23
-}
\ No newline at end of file
diff --git a/hol-light/TacticRecording/ex3.dot 
b/hol-light/TacticRecording/ex3.dot
deleted file mode 100644
index 1704533..0000000
--- a/hol-light/TacticRecording/ex3.dot
+++ /dev/null
@@ -1,24 +0,0 @@
-digraph G {
-  subgraph cluster1 {
-    label = "induction";
-    351 -> 352;
-    351 -> 353;
-    352 -> 358;
-    subgraph cluster2 {
-      label = "base case";
-      358;
-    }
-    353 -> 367;
-    subgraph cluster3 {
-      label = "step case";
-      367 -> 368;
-      368 -> 370;
-      370 -> 372;
-      372 -> 374;
-      374 -> 376;
-      376 -> 378;
-    }
-  }
-  344 -> 345;
-  345 -> 351;
-}
diff --git a/hol-light/TacticRecording/ex3.png 
b/hol-light/TacticRecording/ex3.png
deleted file mode 100644
index f2edfbd..0000000
Binary files a/hol-light/TacticRecording/ex3.png and /dev/null differ
diff --git a/hol-light/TacticRecording/ex3b.dot 
b/hol-light/TacticRecording/ex3b.dot
deleted file mode 100644
index 5b951b9..0000000
--- a/hol-light/TacticRecording/ex3b.dot
+++ /dev/null
@@ -1,37 +0,0 @@
-digraph G {
-  344 [label = "CONV_TAC"];
-  345 [label = "GEN_TAC"];
-  351 [label = "INDUCT_TAC"];
-  352 [label = "REWRITE_TAC"];
-  358 [label = "REAL_ARITH_TAC"];
-  353 [label = "REWRITE_TAC"];
-  367 [label = "REWRITE_TAC"];
-  368 [label = "SIMP_TAC"];
-  370 [label = "REWRITE_TAC"];
-  372 [label = "REWRITE_TAC"];
-  374 [label = "ASM_REWRITE_TAC"];
-  376 [label = "REWRITE_TAC"];
-  378 [label = "REAL_ARITH_TAC"];
-  344 -> 345;
-  345 -> 351;
-  subgraph cluster1 {
-    label = "induction";
-    351 -> 352;
-    351 -> 353;
-    352 -> 358;
-    subgraph cluster2 {
-      label = "base case";
-      358;
-    }
-    353 -> 367;
-    subgraph cluster3 {
-      label = "step case";
-      367 -> 368;
-      368 -> 370;
-      370 -> 372;
-      372 -> 374;
-      374 -> 376;
-      376 -> 378;
-    }
-  }
-}
\ No newline at end of file
diff --git a/hol-light/TacticRecording/examples1.ml 
b/hol-light/TacticRecording/examples1.ml
deleted file mode 100644
index 4e67ca1..0000000
--- a/hol-light/TacticRecording/examples1.ml
+++ /dev/null
@@ -1,64 +0,0 @@
-#use"TacticRecording/main.ml";;
-#use "TacticRecording/biolayout.ml";;
-
-pg_mode_off ();;
-
-g `x = x /\ y = y /\ z = z`;;
-e (CONJ_TAC);;
-e (REFL_TAC);;
-e (CONJ_TAC);;
-e (REFL_TAC);;
-e (REFL_TAC);;
-let th = top_thm ();;
-
-g `(!x. x = x) /\ (!y.y = y) /\ (!z.z = z)`;;
-e (REPEAT CONJ_TAC THEN GEN_TAC);;
-e (REFL_TAC);;
-e (REFL_TAC);;
-e (REFL_TAC);;
-let th = top_thm ();;
-
-g `(!x. x = x) /\ (!y.y = y) /\ (!z.z = z)`;;
-e (CONJ_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-e (CONJ_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-let th = top_thm ();;
-
-g `(!x. x = x) /\ (!y.y = y) /\ (!z.z = z)`;;
-e (REPEAT CONJ_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-let th = top_thm ();;
-
-g `(!x. x = x) /\ (!y.y = y) /\ (!z.z = z)`;;
-e (REPEAT CONJ_TAC THEN GEN_TAC THEN REFL_TAC);;
-let th = top_thm ();;
-
-print_executed_proof true;;
-print_flat_proof true;;
-print_thenl_proof ();;
-print_packaged_proof ();;
-print_gv_proof ();;
-
-g `(y:A) = z ==> (x:A) = x /\ y = y /\ z = z`;;
-e (STRIP_TAC);;
-e (UNDISCH_TAC `(y:A) = z`);;
-e (DISCH_TAC);;
-e (CONJ_TAC);;
-e (REFL_TAC);;
-e (CONJ_TAC);;
-e (REFL_TAC);;
-e (REFL_TAC);;
-
-
-
-
diff --git a/hol-light/TacticRecording/examples1_output.txt 
b/hol-light/TacticRecording/examples1_output.txt
deleted file mode 100644
index 85f58ad..0000000
--- a/hol-light/TacticRecording/examples1_output.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-# g `(!x. x = x) /\ (!y.y = y) /\ (!z.z = z)`;;
-Warning: inventing type variables
-val it : xgoalstack = 1 subgoal (1 total)
-
-`(!x. x = x) /\ (!y. y = y) /\ (!z. z = z)`
-
-# e (REPEAT CONJ_TAC);;
-val it : xgoalstack = 3 subgoals (3 total)
-
-`!z. z = z`
-
-`!y. y = y`
-
-`!x. x = x`
-
-# e (GEN_TAC);;
-val it : xgoalstack = 1 subgoal (3 total)
-
-`x = x`
-
-# e (REFL_TAC);;
-val it : xgoalstack = 1 subgoal (2 total)
-
-`!y. y = y`
-
-# e (GEN_TAC);;
-val it : xgoalstack = 1 subgoal (2 total)
-
-`y = y`
-
-# e (REFL_TAC);;
-val it : xgoalstack = 1 subgoal (1 total)
-
-`!z. z = z`
-
-# e (GEN_TAC);;
-val it : xgoalstack = 1 subgoal (1 total)
-
-`z = z`
-
-# e (REFL_TAC);;
-val it : xgoalstack = No subgoals
-
-# print_executed_proof ();;
-e (REPEAT CONJ_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-
-val it : unit = ()
-# print_flat_proof ();;
-e (CONJ_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-e (CONJ_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-e (GEN_TAC);;
-e (REFL_TAC);;
-
-val it : unit = ()
-# print_thenl_proof ();;
-e (CONJ_TAC THENL [GEN_TAC THEN REFL_TAC; CONJ_TAC THENL [GEN_TAC THEN 
REFL_TAC; GEN_TAC THEN REFL_TAC]]);;
-
-val it : unit = ()
-# print_optimal_proof ();;
-e (REPEAT CONJ_TAC THEN GEN_TAC THEN REFL_TAC);;
-val it : unit = ()
-# 
\ No newline at end of file
diff --git a/hol-light/TacticRecording/examples2.ml 
b/hol-light/TacticRecording/examples2.ml
deleted file mode 100644
index a53baa4..0000000
--- a/hol-light/TacticRecording/examples2.ml
+++ /dev/null
@@ -1,45 +0,0 @@
-#use "hol.ml";;
-needs "Examples/prime.ml";;
-
-#use "TacticRecording/main.ml";;
-
-
-let egcd = define
- `egcd(m,n) = if m = 0 then n 
-              else if n = 0 then m
-              else if m <= n then egcd(m,n - m)
-              else egcd(m - n,n)`;;
-
-let egcd = theorem_wrap "egcd" egcd;;
-let DIVIDES_0 =  theorem_wrap "DIVIDES_0" DIVIDES_0;;
-let WF_INDUCT_TAC = term_tactic_wrap "WF_INDUCT_TAC" WF_INDUCT_TAC;;
-
-g `!m n d. d divides egcd(m,n) <=> d divides m /\ d divides n`;;
-e (GEN_TAC THEN GEN_TAC THEN WF_INDUCT_TAC `m + n` THEN
-   GEN_TAC THEN ONCE_REWRITE_TAC[egcd] THEN
-   ASM_CASES_TAC `m = 0` THEN ASM_REWRITE_TAC[DIVIDES_0] THEN
-   ASM_CASES_TAC `n = 0` THEN ASM_REWRITE_TAC[DIVIDES_0] THEN 
-   COND_CASES_TAC);;
-top_goal ();;
-
-print_executed_proof ();;
-print_flat_proof ();;
-print_thenl_proof ();;
-print_optimal_proof ();;
-is_empty [23];;
-not true or not true;;
-
-let EGCD_INVARIANT = prove
- (`!m n d. d divides egcd(m,n) <=> d divides m /\ d divides n`,
-  GEN_TAC THEN GEN_TAC THEN WF_INDUCT_TAC `m + n` THEN
-  GEN_TAC THEN ONCE_REWRITE_TAC[egcd] THEN
-  ASM_CASES_TAC `m = 0` THEN ASM_REWRITE_TAC[DIVIDES_0] THEN
-  ASM_CASES_TAC `n = 0` THEN ASM_REWRITE_TAC[DIVIDES_0] THEN 
-  COND_CASES_TAC THEN
-  (W(fun (asl,w) -> FIRST_X_ASSUM(fun th ->
-    MP_TAC(PART_MATCH (lhs o snd o dest_forall o rand) th (lhand w)))) THEN
-   ANTS_TAC THENL [REPEAT(POP_ASSUM MP_TAC) THEN ARITH_TAC; ALL_TAC]) THEN
-  ASM_MESON_TAC[DIVIDES_SUB; DIVIDES_ADD; SUB_ADD; LE_CASES]);;
-  
-
-
diff --git a/hol-light/TacticRecording/examples3.ml 
b/hol-light/TacticRecording/examples3.ml
deleted file mode 100644
index f78ace3..0000000
--- a/hol-light/TacticRecording/examples3.ml
+++ /dev/null
@@ -1,236 +0,0 @@
-#use"hol.ml";;
-needs "Library/products.ml";;
-
-#use "TacticRecording/main.ml";;
-
-prioritize_real();;
-
-AIM: CONT_COMPOSE (Library/analysis.ml)
-- used by John in his Proof Style paper
-
-
-(* ** LEMMA1 from HOL Light's 100/arithmetic_geometric_mean.ml ** *)
-
-let LEMMA_1 = prove
- (`!x n. x pow (n + 1) - (&n + &1) * x + &n =
-         (x - &1) pow 2 * sum(1..n) (\k. &k * x pow (n - k))`,
-  CONV_TAC(ONCE_DEPTH_CONV SYM_CONV) THEN GEN_TAC THEN INDUCT_TAC THEN
-  REWRITE_TAC[SUM_CLAUSES_NUMSEG; ARITH_EQ; ADD_CLAUSES] THENL
-   [REAL_ARITH_TAC; REWRITE_TAC[ARITH_RULE `1 <= SUC n`]] THEN
-  SIMP_TAC[ARITH_RULE `k <= n ==> SUC n - k = SUC(n - k)`; SUB_REFL] THEN
-  REWRITE_TAC[real_pow; REAL_MUL_RID] THEN
-  REWRITE_TAC[REAL_ARITH `k * x * x pow n = (k * x pow n) * x`] THEN
-  ASM_REWRITE_TAC[SUM_RMUL; REAL_MUL_ASSOC; REAL_ADD_LDISTRIB] THEN
-  REWRITE_TAC[GSYM REAL_OF_NUM_SUC; REAL_POW_ADD] THEN REAL_ARITH_TAC);;
-
-let LEMMA_1 = prove
- (`!x n. x pow (n + 1) - (&n + &1) * x + &n =
-         (x - &1) pow 2 * sum(1..n) (\k. &k * x pow (n - k))`,
-  CONV_TAC(ONCE_DEPTH_CONV SYM_CONV) THEN GEN_TAC THEN
-  HILABEL "induction"
-         (INDUCT_TAC THEN
-          REWRITE_TAC[SUM_CLAUSES_NUMSEG; ARITH_EQ; ADD_CLAUSES] THENL
-   [HILABEL "base case" REAL_ARITH_TAC; ALL_TAC] THEN
-  HILABEL "step case" (REWRITE_TAC[ARITH_RULE `1 <= SUC n`] THEN
-  SIMP_TAC[ARITH_RULE `k <= n ==> SUC n - k = SUC(n - k)`; SUB_REFL] THEN
-  REWRITE_TAC[real_pow; REAL_MUL_RID] THEN
-  REWRITE_TAC[REAL_ARITH `k * x * x pow n = (k * x pow n) * x`] THEN
-  ASM_REWRITE_TAC[SUM_RMUL; REAL_MUL_ASSOC; REAL_ADD_LDISTRIB] THEN
-  REWRITE_TAC[GSYM REAL_OF_NUM_SUC; REAL_POW_ADD] THEN REAL_ARITH_TAC)));;
-
-let LEMMA_1 = theorem_wrap "LEMMA_1" LEMMA_1;;
-
-top_thm ();;
-print_executed_proof true;;
-print_flat_proof true;;
-print_packaged_proof ();;
-print_thenl_proof ();;
-print_gv_proof ();;
-
-let gtr = !the_goal_tree;;
-let h = gtree_to_hiproof gtr;;
-let h' = (trivsimp_hiproof o dethen_hiproof) h;;
-
-g `!x n. x pow (n + 1) - (&n + &1) * x + &n =
-         (x - &1) pow 2 * sum(1..n) (\k. &k * x pow (n - k))`;;
-e (CONV_TAC (ONCE_DEPTH_CONV SYM_CONV));;
-e (GEN_TAC);;
-e (INDUCT_TAC);;
-(* *** Subgoal 1 *** *)
-e (REWRITE_TAC [SUM_CLAUSES_NUMSEG;ARITH_EQ;ADD_CLAUSES]);;
-e (REAL_ARITH_TAC);;
-(* *** Subgoal 2 *** *)
-e (REWRITE_TAC [SUM_CLAUSES_NUMSEG;ARITH_EQ;ADD_CLAUSES]);;
-e (REWRITE_TAC [ARITH_RULE `1 <= SUC n`]);;
-e (SIMP_TAC [ARITH_RULE `k <= n ==> SUC n - k = SUC (n - k)`; SUB_REFL]);;
-e (REWRITE_TAC [real_pow;REAL_MUL_RID]);;
-e (REWRITE_TAC [REAL_ARITH `k * x * x pow n = (k * x pow n) * x`]);;
-e (ASM_REWRITE_TAC [SUM_RMUL;REAL_MUL_ASSOC;REAL_ADD_LDISTRIB]);;
-e (REWRITE_TAC [GSYM REAL_OF_NUM_SUC; REAL_POW_ADD]);;
-e (REAL_ARITH_TAC);;
-
-print_executed_proof true;;
-print_packaged_proof ();;
-print_thenl_proof ();;
-
-(* LEMMA 2 *)
-
-let LEMMA_2 = prove
- (`!n x. &0 <= x ==> &0 <= x pow (n + 1) - (&n + &1) * x + &n`,
-  REPEAT STRIP_TAC THEN REWRITE_TAC[LEMMA_1] THEN
-  MATCH_MP_TAC REAL_LE_MUL THEN REWRITE_TAC[REAL_POW_2; REAL_LE_SQUARE] THEN
-  MATCH_MP_TAC SUM_POS_LE_NUMSEG THEN
-  ASM_SIMP_TAC[REAL_LE_MUL; REAL_POS; REAL_POW_LE]);;
-
-let LEMMA_2 = theorem_wrap "LEMMA_2" LEMMA_2;;
-
-print_executed_proof true;;
-print_flat_proof true;;
-print_packaged_proof ();;
-print_gv_proof ();;
-
-g `!n x. &0 <= x ==> &0 <= x pow (n + 1) - (&n + &1) * x + &n`;;
-
-(* LEMMA 3 *)
-
-let LEMMA_3 = prove
- (`!n x. 1 <= n /\ (!i. 1 <= i /\ i <= n + 1 ==> &0 <= x i)
-         ==> x(n + 1) * (sum(1..n) x / &n) pow n
-                <= (sum(1..n+1) x / (&n + &1)) pow (n + 1)`,
-  REPEAT STRIP_TAC THEN
-  ABBREV_TAC `a = sum(1..n+1) x / (&n + &1)` THEN
-  ABBREV_TAC `b = sum(1..n) x / &n` THEN
-  SUBGOAL_THEN `x(n + 1) = (&n + &1) * a - &n * b` SUBST1_TAC THENL
-   [MAP_EVERY EXPAND_TAC ["a"; "b"] THEN
-    ASM_SIMP_TAC[REAL_DIV_LMUL; REAL_OF_NUM_EQ; LE_1;
-                 REAL_ARITH `~(&n + &1 = &0)`] THEN
-    SIMP_TAC[SUM_ADD_SPLIT; ARITH_RULE `1 <= n + 1`; SUM_SING_NUMSEG] THEN
-    REAL_ARITH_TAC;
-    ALL_TAC] THEN
-  SUBGOAL_THEN `&0 <= a /\ &0 <= b` STRIP_ASSUME_TAC THENL
-   [MAP_EVERY EXPAND_TAC ["a"; "b"] THEN CONJ_TAC THEN
-    MATCH_MP_TAC REAL_LE_DIV THEN
-    (CONJ_TAC THENL [MATCH_MP_TAC SUM_POS_LE_NUMSEG; REAL_ARITH_TAC]) THEN
-    ASM_SIMP_TAC[ARITH_RULE `p <= n ==> p <= n + 1`];
-    ALL_TAC] THEN
-  ASM_CASES_TAC `b = &0` THEN
-  ASM_SIMP_TAC[REAL_POW_ZERO; LE_1; REAL_MUL_RZERO; REAL_POW_LE] THEN
-  MP_TAC(ISPECL [`n:num`; `a / b`] LEMMA_2) THEN ASM_SIMP_TAC[REAL_LE_DIV] THEN
-  REWRITE_TAC[REAL_ARITH `&0 <= x - a + b <=> a - b <= x`; REAL_POW_DIV] THEN
-  SUBGOAL_THEN `&0 < b` ASSUME_TAC THENL [ASM_REAL_ARITH_TAC; ALL_TAC] THEN
-  ASM_SIMP_TAC[REAL_LE_RDIV_EQ; REAL_POW_LT] THEN
-  MATCH_MP_TAC EQ_IMP THEN AP_THM_TAC THEN AP_TERM_TAC THEN
-  REWRITE_TAC[REAL_POW_ADD] THEN UNDISCH_TAC `~(b = &0)` THEN
-  CONV_TAC REAL_FIELD);;
-
-let LEMMA_3 = theorem_wrap "LEMMA_3" LEMMA_3;;
-
-print_executed_proof true;;
-print_flat_proof true;;
-print_thenl_proof ();;
-print_packaged_proof ();;
-print_gv_proof ();;
-
-g `!n x. 1 <= n /\ (!i. 1 <= i /\ i <= n + 1 ==> &0 <= x i)
-         ==> x(n + 1) * (sum(1..n) x / &n) pow n
-                <= (sum(1..n+1) x / (&n + &1)) pow (n + 1)`;;
-
-print_flat_proof true;;
-e (STRIP_TAC);;
-e (STRIP_TAC);;
-e (STRIP_TAC);;
-e (ABBREV_TAC `a = sum (1..n + 1) x / (&n + &1)`);;
-e (ABBREV_TAC `b = sum (1..n) x / &n`);;
-e (SUBGOAL_THEN `x (n + 1) = (&n + &1) * a - &n * b` SUBST1_TAC);;
-(* *** Subgoal 1 *** *)
-e (EXPAND_TAC "a");;
-e (EXPAND_TAC "b");;
-e (ASM_SIMP_TAC [REAL_DIV_LMUL; REAL_OF_NUM_EQ; LE_1; REAL_ARITH `~(&n + &1 = 
&0)`]);;
-e (SIMP_TAC [SUM_ADD_SPLIT; ARITH_RULE `1 <= n + 1`; SUM_SING_NUMSEG]);;
-e (REAL_ARITH_TAC);;
-(* *** Subgoal 2 *** *)
-e (SUBGOAL_THEN `&0 <= a /\ &0 <= b` STRIP_ASSUME_TAC);;
-(* *** Subgoal 2.1 *** *)
-e (EXPAND_TAC "a");;
-e (EXPAND_TAC "b");;
-e (CONJ_TAC);;
-(* *** Subgoal 2.1.1 *** *)
-e (MATCH_MP_TAC REAL_LE_DIV);;
-e (CONJ_TAC);;
-(* *** Subgoal 2.1.1.1 *** *)
-e (MATCH_MP_TAC SUM_POS_LE_NUMSEG);;
-e (ASM_SIMP_TAC [ARITH_RULE `p <= n ==> p <= n + 1`]);;
-(* *** Subgoal 2.1.1.2 *** *)
-e (REAL_ARITH_TAC);;
-(* *** Subgoal 2.1.2 *** *)
-e (MATCH_MP_TAC REAL_LE_DIV);;
-e (CONJ_TAC);;
-(* *** Subgoal 2.1.2.1 *** *)
-e (MATCH_MP_TAC SUM_POS_LE_NUMSEG);;
-e (ASM_SIMP_TAC [ARITH_RULE `p <= n ==> p <= n + 1`]);;
-(* *** Subgoal 2.1.2.2 *** *)
-e (REAL_ARITH_TAC);;
-(* *** Subgoal 2.2 *** *)
-e (ASM_CASES_TAC `b = &0`);;
-(* *** Subgoal 2.2.1 *** *)
-e (ASM_SIMP_TAC [REAL_POW_ZERO;LE_1;REAL_MUL_RZERO;REAL_POW_LE]);;
-(* *** Subgoal 2.2.2 *** *)
-e (ASM_SIMP_TAC [REAL_POW_ZERO;LE_1;REAL_MUL_RZERO;REAL_POW_LE]);;
-e (MP_TAC (ISPECL [`n`;`a / b`] LEMMA_2));;
-e (ASM_SIMP_TAC [REAL_LE_DIV]);;
-e (REWRITE_TAC [REAL_ARITH `&0 <= x - a + b <=> a - b <= x`; REAL_POW_DIV]);;
-e (SUBGOAL_THEN `&0 < b` ASSUME_TAC);;
-(* *** Subgoal 2.2.2.1 *** *)
-e (ASM_REAL_ARITH_TAC);;
-(* *** Subgoal 2.2.2.2 *** *)
-e (ASM_SIMP_TAC [REAL_LE_RDIV_EQ;REAL_POW_LT]);;
-e (MATCH_MP_TAC EQ_IMP);;
-e (AP_THM_TAC);;
-e (AP_TERM_TAC);;
-e (REWRITE_TAC [REAL_POW_ADD]);;
-e (UNDISCH_TAC `~(b = &0)`);;
-e (CONV_TAC REAL_FIELD);;
-
-(* AGM *)
-
-let AGM = prove
- (`!n a. 1 <= n /\ (!i. 1 <= i /\ i <= n ==> &0 <= a(i))
-         ==> product(1..n) a <= (sum(1..n) a / &n) pow n`,
-  INDUCT_TAC THEN REWRITE_TAC[ARITH; PRODUCT_CLAUSES_NUMSEG] THEN
-  REWRITE_TAC[ARITH_RULE `1 <= SUC n`] THEN X_GEN_TAC `x:num->real` THEN
-  ASM_CASES_TAC `n = 0` THENL
-   [ASM_REWRITE_TAC[PRODUCT_CLAUSES_NUMSEG; ARITH; SUM_SING_NUMSEG] THEN
-    REAL_ARITH_TAC;
-    REWRITE_TAC[ADD1] THEN STRIP_TAC THEN MATCH_MP_TAC REAL_LE_TRANS THEN     
-    EXISTS_TAC `x(n + 1) * (sum(1..n) x / &n) pow n` THEN
-    ASM_SIMP_TAC[LEMMA_3; GSYM REAL_OF_NUM_ADD; LE_1;
-                 ARITH_RULE `i <= n ==> i <= n + 1`] THEN
-    GEN_REWRITE_TAC RAND_CONV [REAL_MUL_SYM] THEN MATCH_MP_TAC REAL_LE_RMUL 
THEN
-    ASM_SIMP_TAC[LE_REFL; LE_1; ARITH_RULE `i <= n ==> i <= n + 1`]]);;
-
-g `!n a. 1 <= n /\ (!i. 1 <= i /\ i <= n ==> &0 <= a(i))
-         ==> product(1..n) a <= (sum(1..n) a / &n) pow n`;;
-e (INDUCT_TAC);;
-(* *** Subgoal 1 *** *)
-e (REWRITE_TAC [ARITH;PRODUCT_CLAUSES_NUMSEG]);;
-(* *** Subgoal 2 *** *)
-e (REWRITE_TAC [ARITH;PRODUCT_CLAUSES_NUMSEG]);;
-e (REWRITE_TAC [ARITH_RULE `1 <= SUC n`]);;
-e (X_GEN_TAC `x:num->real`);;
-e (ASM_CASES_TAC `n = 0`);;
-(* *** Subgoal 2.1 *** *)
-e (ASM_REWRITE_TAC [PRODUCT_CLAUSES_NUMSEG;ARITH;SUM_SING_NUMSEG]);;
-e (REAL_ARITH_TAC);;
-(* *** Subgoal 2.2 *** *)
-e (REWRITE_TAC [ADD1]);;
-e (STRIP_TAC);;
-e (MATCH_MP_TAC REAL_LE_TRANS);;
-e (EXISTS_TAC `x (n + 1) * (sum (1..n) x / &n) pow n`);;
-e (ASM_SIMP_TAC [LEMMA_3; GSYM REAL_OF_NUM_ADD; LE_1; ARITH_RULE `i <= n ==> i 
<= n + 1`]);;
-e (GEN_REWRITE_TAC RAND_CONV [REAL_MUL_SYM]);;
-e (MATCH_MP_TAC REAL_LE_RMUL);;
-e (ASM_SIMP_TAC [LE_REFL; LE_1; ARITH_RULE `i <= n ==> i <= n + 1`]);;
-
-g `!n a. 1 <= n /\ (!i. 1 <= i /\ i <= n ==> &0 <= a(i))
-         ==> product(1..n) a <= (sum(1..n) a / &n) pow n`;;
-e (INDUCT_TAC THEN REWRITE_TAC [ARITH;PRODUCT_CLAUSES_NUMSEG] THEN REWRITE_TAC 
[ARITH_RULE `1 <= SUC n`] THEN X_GEN_TAC `x:num->real` THEN ASM_CASES_TAC `n = 
0` THENL [ASM_REWRITE_TAC [PRODUCT_CLAUSES_NUMSEG;ARITH;SUM_SING_NUMSEG] THEN 
REAL_ARITH_TAC; REWRITE_TAC [ADD1] THEN STRIP_TAC THEN MATCH_MP_TAC 
REAL_LE_TRANS THEN EXISTS_TAC `x (n + 1) * (sum (1..n) x / &n) pow n` THEN 
ASM_SIMP_TAC [LEMMA_3; GSYM REAL_OF_NUM_ADD; LE_1; ARITH_RULE `i <= n ==> i <= 
n + 1`] THEN GEN_REWRITE_TAC RAND_ [...]
diff --git a/hol-light/TacticRecording/examples3_LEMMA1.dot 
b/hol-light/TacticRecording/examples3_LEMMA1.dot
deleted file mode 100644
index 69bc7c4..0000000
--- a/hol-light/TacticRecording/examples3_LEMMA1.dot
+++ /dev/null
@@ -1,24 +0,0 @@
-digraph G {
-  subgraph cluster0 {
-    label = "induction";
-    517->518;
-    517->519;
-  }
-  subgraph cluster1 {
-    label = "base case";
-    528->528
-  }
-  subgraph cluster2 {
-    label = "step case";
-    537->538;
-    538->540;
-    540->542;
-    542->544;
-    544->546;
-    546->548;
-  }
-  512->513;
-  513->517;
-  518->528;
-  519->537;
-}
\ No newline at end of file
diff --git a/hol-light/TacticRecording/examples3_output.txt 
b/hol-light/TacticRecording/examples3_output.txt
deleted file mode 100644
index 18d4901..0000000
--- a/hol-light/TacticRecording/examples3_output.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# let LEMMA_1 = prove
- (`!x n. x pow (n + 1) - (&n + &1) * x + &n =
-         (x - &1) pow 2 * sum(1..n) (\k. &k * x pow (n - k))`,
-  CONV_TAC(ONCE_DEPTH_CONV SYM_CONV) THEN GEN_TAC THEN INDUCT_TAC THEN
-  REWRITE_TAC[SUM_CLAUSES_NUMSEG; ARITH_EQ; ADD_CLAUSES] THENL
-   [REAL_ARITH_TAC; REWRITE_TAC[ARITH_RULE `1 <= SUC n`]] THEN
-  SIMP_TAC[ARITH_RULE `k <= n ==> SUC n - k = SUC(n - k)`; SUB_REFL] THEN
-  REWRITE_TAC[real_pow; REAL_MUL_RID] THEN
-  REWRITE_TAC[REAL_ARITH `k * x * x pow n = (k * x pow n) * x`] THEN
-  ASM_REWRITE_TAC[SUM_RMUL; REAL_MUL_ASSOC; REAL_ADD_LDISTRIB] THEN
-  REWRITE_TAC[GSYM REAL_OF_NUM_SUC; REAL_POW_ADD] THEN REAL_ARITH_TAC);;
-val ( LEMMA_1 ) : thm =
-  |- !x n.
-         x pow (n + 1) - (&n + &1) * x + &n =
-         (x - &1) pow 2 * sum (1..n) (\k. &k * x pow (n - k))
-
-# print_executed_proof ();;
-e ((CONV_TAC (ONCE_DEPTH_CONV SYM_CONV)) THEN GEN_TAC THEN INDUCT_TAC THEN 
(REWRITE_TAC [SUM_CLAUSES_NUMSEG;ARITH_EQ;ADD_CLAUSES]) THENL [REAL_ARITH_TAC; 
REWRITE_TAC [ARITH_RULE `1 <= SUC n`]] THEN (SIMP_TAC [ARITH_RULE `k <= n ==> 
SUC n - k = SUC (n - k)`; SUB_REFL]) THEN (REWRITE_TAC [real_pow;REAL_MUL_RID]) 
THEN (REWRITE_TAC [REAL_ARITH `k * x * x pow n = (k * x pow n) * x`]) THEN 
(ASM_REWRITE_TAC [SUM_RMUL;REAL_MUL_ASSOC;REAL_ADD_LDISTRIB]) THEN (REWRITE_TAC 
[GSYM REAL_OF_NUM_SUC; RE [...]
-
-val it : unit = () 
-# print_flat_proof ();;
-e (CONV_TAC (ONCE_DEPTH_CONV SYM_CONV));;
-e (GEN_TAC);;
-e (INDUCT_TAC);;
-e (REWRITE_TAC [SUM_CLAUSES_NUMSEG;ARITH_EQ;ADD_CLAUSES]);;
-e (REAL_ARITH_TAC);;
-e (REWRITE_TAC [SUM_CLAUSES_NUMSEG;ARITH_EQ;ADD_CLAUSES]);;
-e (REWRITE_TAC [ARITH_RULE `1 <= SUC n`]);;
-e (SIMP_TAC [ARITH_RULE `k <= n ==> SUC n - k = SUC (n - k)`; SUB_REFL]);;
-e (REWRITE_TAC [real_pow;REAL_MUL_RID]);;
-e (REWRITE_TAC [REAL_ARITH `k * x * x pow n = (k * x pow n) * x`]);;
-e (ASM_REWRITE_TAC [SUM_RMUL;REAL_MUL_ASSOC;REAL_ADD_LDISTRIB]);;
-e (REWRITE_TAC [GSYM REAL_OF_NUM_SUC; REAL_POW_ADD]);;
-e (REAL_ARITH_TAC);;
-
-
diff --git a/hol-light/TacticRecording/examples4.ml 
b/hol-light/TacticRecording/examples4.ml
deleted file mode 100644
index 3178f65..0000000
--- a/hol-light/TacticRecording/examples4.ml
+++ /dev/null
@@ -1,13 +0,0 @@
-pg_mode_on ();;
-get_pg_mode ();;
-
-g `(?x:num. p(x) /\ q(x) /\ r(x)) ==> (?x. r(x) /\ p(x)) /\ (?x. p(x) /\ (q(x) 
<=> r(x)))`;;
-e (STRIP_TAC);;
-e (STRIP_TAC);;
-e (X_META_EXISTS_TAC `n1:num` THEN CONJ_TAC);;
-e (FIRST_X_ASSUM(UNIFY_ACCEPT_TAC [`n1:num`]));;
-e (ASM_REWRITE_TAC[]);;
-e (X_META_EXISTS_TAC `n2:num` THEN CONJ_TAC);;
-e (FIRST_X_ASSUM(UNIFY_ACCEPT_TAC [`n2:num`]));;
-e (ASM_REWRITE_TAC[]);;
-let th = top_thm ();;
diff --git a/hol-light/TacticRecording/examples5.ml 
b/hol-light/TacticRecording/examples5.ml
deleted file mode 100644
index 1ded99c..0000000
--- a/hol-light/TacticRecording/examples5.ml
+++ /dev/null
@@ -1,182 +0,0 @@
-(* Taken from Library/prime.ml   *)
-
-prioritize_num();;
-
-(* ------------------------------------------------------------------------- *)
-(* HOL88 compatibility (since all this is a port of old HOL88 stuff).        *)
-(* ------------------------------------------------------------------------- *)
-
-let MULT_MONO_EQ = prove
- (`!m i n. ((SUC n) * m = (SUC n) * i) <=> (m = i)`,
-  REWRITE_TAC[EQ_MULT_LCANCEL; NOT_SUC]);;
-
-let LESS_ADD_1 = prove
- (`!m n. n < m ==> (?p. m = n + (p + 1))`,
-  REWRITE_TAC[LT_EXISTS; ADD1; ADD_ASSOC]);;
-
-let LESS_ADD_SUC = ARITH_RULE `!m n. m < (m + (SUC n))`;;
-
-let LESS_0_CASES = ARITH_RULE `!m. (0 = m) \/ 0 < m`;;
-
-let LESS_MONO_ADD = ARITH_RULE `!m n p. m < n ==> (m + p) < (n + p)`;;
-
-let LESS_EQ_0 = prove
- (`!n. n <= 0 <=> (n = 0)`,
-  REWRITE_TAC[LE]);;
-
-let LESS_LESS_CASES = ARITH_RULE `!m n. (m = n) \/ m < n \/ n < m`;;
-
-let LESS_ADD_NONZERO = ARITH_RULE `!m n. ~(n = 0) ==> m < (m + n)`;;
-
-let NOT_EXP_0 = prove
- (`!m n. ~((SUC n) EXP m = 0)`,
-  REWRITE_TAC[EXP_EQ_0; NOT_SUC]);;
-
-let LESS_THM = ARITH_RULE `!m n. m < (SUC n) <=> (m = n) \/ m < n`;;
-
-let NOT_LESS_0 = ARITH_RULE `!n. ~(n < 0)`;;
-
-let ZERO_LESS_EXP = prove
- (`!m n. 0 < ((SUC n) EXP m)`,
-  REWRITE_TAC[LT_NZ; NOT_EXP_0]);;
-
-(* ------------------------------------------------------------------------- *)
-(* General arithmetic lemmas.                                                *)
-(* ------------------------------------------------------------------------- *)
-
-let MULT_FIX = prove(
-  `!x y. (x * y = x) <=> (x = 0) \/ (y = 1)`,
-  REPEAT GEN_TAC THEN
-  STRUCT_CASES_TAC(SPEC `x:num` num_CASES) THEN
-  REWRITE_TAC[MULT_CLAUSES; NOT_SUC] THEN
-  REWRITE_TAC[GSYM(el 4 (CONJUNCTS (SPEC_ALL MULT_CLAUSES)))] THEN
-  GEN_REWRITE_TAC (LAND_CONV o RAND_CONV)     (* MMA: this is a problem !!!!)
-   [GSYM(el 3 (CONJUNCTS(SPEC_ALL MULT_CLAUSES)))] THEN
-  MATCH_ACCEPT_TAC MULT_MONO_EQ);;
-
-let LESS_EQ_MULT = prove(
-  `!m n p q. m <= n /\ p <= q ==> (m * p) <= (n * q)`,
-  REPEAT GEN_TAC THEN
-  DISCH_THEN(STRIP_ASSUME_TAC o REWRITE_RULE[LE_EXISTS]) THEN
-  ASM_REWRITE_TAC[LEFT_ADD_DISTRIB; RIGHT_ADD_DISTRIB;
-    GSYM ADD_ASSOC; LE_ADD]);;
-
-let LESS_MULT = prove(
-  `!m n p q. m < n /\ p < q ==> (m * p) < (n * q)`,
-  REPEAT GEN_TAC THEN DISCH_THEN(CONJUNCTS_THEN
-   ((CHOOSE_THEN SUBST_ALL_TAC) o MATCH_MP LESS_ADD_1)) THEN
-  REWRITE_TAC[LEFT_ADD_DISTRIB; RIGHT_ADD_DISTRIB] THEN
-  REWRITE_TAC[GSYM ADD1; MULT_CLAUSES; ADD_CLAUSES; GSYM ADD_ASSOC] THEN
-  ONCE_REWRITE_TAC[GSYM (el 3 (CONJUNCTS ADD_CLAUSES))] THEN
-  MATCH_ACCEPT_TAC LESS_ADD_SUC);;
-
-let MULT_LCANCEL = prove(
-  `!a b c. ~(a = 0) /\ (a * b = a * c) ==> (b = c)`,
-  REPEAT GEN_TAC THEN STRUCT_CASES_TAC(SPEC `a:num` num_CASES) THEN
-  REWRITE_TAC[NOT_SUC; MULT_MONO_EQ]);;
-
-let LT_POW2_REFL = prove
- (`!n. n < 2 EXP n`,
-  INDUCT_TAC THEN REWRITE_TAC[EXP] THEN TRY(POP_ASSUM MP_TAC) THEN ARITH_TAC);;
-
-(* ------------------------------------------------------------------------- *)
-(* Properties of the exponential function.                                   *)
-(* ------------------------------------------------------------------------- *)
-
-let EXP_0 = prove
- (`!n. 0 EXP (SUC n) = 0`,
-  REWRITE_TAC[EXP; MULT_CLAUSES]);;
-
-let EXP_MONO_LT_SUC = prove
- (`!n x y. (x EXP (SUC n)) < (y EXP (SUC n)) <=> (x < y)`,
-  REWRITE_TAC[EXP_MONO_LT; NOT_SUC]);;
-
-let EXP_MONO_LE_SUC = prove
- (`!x y n. (x EXP (SUC n)) <= (y EXP (SUC n)) <=> x <= y`,
-  REWRITE_TAC[EXP_MONO_LE; NOT_SUC]);;
-
-let EXP_MONO_EQ_SUC = prove
- (`!x y n. (x EXP (SUC n) = y EXP (SUC n)) <=> (x = y)`,
-  REWRITE_TAC[EXP_MONO_EQ; NOT_SUC]);;
-
-let EXP_EXP = prove
- (`!x m n. (x EXP m) EXP n = x EXP (m * n)`,
-  REWRITE_TAC[EXP_MULT]);;
-
-(* ------------------------------------------------------------------------- *)
-(* More ad-hoc arithmetic lemmas unlikely to be useful elsewhere.            *)
-(* ------------------------------------------------------------------------- *)
-
-let DIFF_LEMMA = prove(
-  `!a b. a < b ==> (a = 0) \/ (a + (b - a)) < (a + b)`,
-  REPEAT GEN_TAC THEN
-  DISJ_CASES_TAC(SPEC `a:num` LESS_0_CASES) THEN ASM_REWRITE_TAC[] THEN
-  DISCH_THEN(CHOOSE_THEN SUBST1_TAC o MATCH_MP LESS_ADD_1) THEN
-  DISJ2_TAC THEN REWRITE_TAC[ONCE_REWRITE_RULE[ADD_SYM] ADD_SUB] THEN
-  GEN_REWRITE_TAC LAND_CONV [GSYM (CONJUNCT1 ADD_CLAUSES)] THEN
-  REWRITE_TAC[ADD_ASSOC] THEN
-  REPEAT(MATCH_MP_TAC LESS_MONO_ADD) THEN POP_ASSUM ACCEPT_TAC);;
-
-let NOT_EVEN_EQ_ODD = prove(
-  `!m n. ~(2 * m = SUC(2 * n))`,
-  REPEAT GEN_TAC THEN DISCH_THEN(MP_TAC o AP_TERM `EVEN`) THEN
-  REWRITE_TAC[EVEN; EVEN_MULT; ARITH]);;
-
-let CANCEL_TIMES2 = prove(
-  `!x y. (2 * x = 2 * y) <=> (x = y)`,
-  REWRITE_TAC[num_CONV `2`; MULT_MONO_EQ]);;
-
-let EVEN_SQUARE = prove(
-  `!n. EVEN(n) ==> ?x. n EXP 2 = 4 * x`,
-  GEN_TAC THEN REWRITE_TAC[EVEN_EXISTS] THEN
-  DISCH_THEN(X_CHOOSE_THEN `m:num` SUBST1_TAC) THEN
-  EXISTS_TAC `m * m` THEN REWRITE_TAC[EXP_2] THEN
-  REWRITE_TAC[SYM(REWRITE_CONV[ARITH] `2 * 2`)] THEN
-  REWRITE_TAC[MULT_AC]);;
-
-let ODD_SQUARE = prove(
-  `!n. ODD(n) ==> ?x. n EXP 2 = (4 * x) + 1`,
-  GEN_TAC THEN REWRITE_TAC[ODD_EXISTS] THEN
-  DISCH_THEN(X_CHOOSE_THEN `m:num` SUBST1_TAC) THEN
-  ASM_REWRITE_TAC[EXP_2; MULT_CLAUSES; ADD_CLAUSES] THEN
-  REWRITE_TAC[GSYM ADD1; SUC_INJ] THEN
-  EXISTS_TAC `(m * m) + m` THEN
-  REWRITE_TAC(map num_CONV [`4`; `3`; `2`; `1`]) THEN
-  REWRITE_TAC[ADD_CLAUSES; MULT_CLAUSES] THEN
-  REWRITE_TAC[LEFT_ADD_DISTRIB; RIGHT_ADD_DISTRIB] THEN
-  REWRITE_TAC[ADD_AC]);;
-
-let DIFF_SQUARE = prove(
-  `!x y. (x EXP 2) - (y EXP 2) = (x + y) * (x - y)`,
-  REPEAT GEN_TAC THEN
-  DISJ_CASES_TAC(SPECL [`x:num`; `y:num`] LE_CASES) THENL
-   [SUBGOAL_THEN `(x * x) <= (y * y)` MP_TAC THENL
-     [MATCH_MP_TAC LESS_EQ_MULT THEN ASM_REWRITE_TAC[];
-      POP_ASSUM MP_TAC THEN REWRITE_TAC[GSYM SUB_EQ_0] THEN
-      REPEAT DISCH_TAC THEN ASM_REWRITE_TAC[EXP_2; MULT_CLAUSES]];
-    POP_ASSUM(CHOOSE_THEN SUBST1_TAC o REWRITE_RULE[LE_EXISTS]) THEN
-    REWRITE_TAC[ONCE_REWRITE_RULE[ADD_SYM] ADD_SUB] THEN
-    REWRITE_TAC[EXP_2; LEFT_ADD_DISTRIB; RIGHT_ADD_DISTRIB] THEN
-    REWRITE_TAC[GSYM ADD_ASSOC; ONCE_REWRITE_RULE[ADD_SYM] ADD_SUB] THEN
-    AP_TERM_TAC THEN GEN_REWRITE_TAC LAND_CONV [ADD_SYM] THEN
-    AP_TERM_TAC THEN MATCH_ACCEPT_TAC MULT_SYM]);;
-
-let ADD_IMP_SUB = prove(
-  `!x y z. (x + y = z) ==> (x = z - y)`,
-  REPEAT GEN_TAC THEN DISCH_THEN(SUBST1_TAC o SYM) THEN
-  REWRITE_TAC[ADD_SUB]);;
-
-let ADD_SUM_DIFF = prove(
-  `!v w. v <= w ==> ((w + v) - (w - v) = 2 * v) /\
-                    ((w + v) + (w - v) = 2 * w)`,
-  REPEAT GEN_TAC THEN REWRITE_TAC[LE_EXISTS] THEN
-  DISCH_THEN(CHOOSE_THEN SUBST1_TAC) THEN
-  REWRITE_TAC[ONCE_REWRITE_RULE[ADD_SYM] ADD_SUB] THEN
-  REWRITE_TAC[MULT_2; GSYM ADD_ASSOC] THEN
-  ONCE_REWRITE_TAC[ADD_SYM] THEN
-  REWRITE_TAC[ONCE_REWRITE_RULE[ADD_SYM] ADD_SUB; GSYM ADD_ASSOC]);;
-
-let EXP_4 = prove(
-  `!n. n EXP 4 = (n EXP 2) EXP 2`,
-  GEN_TAC THEN REWRITE_TAC[EXP_EXP] THEN
-  REWRITE_TAC[ARITH]);;
diff --git a/hol-light/TacticRecording/gvexport.ml 
b/hol-light/TacticRecording/gvexport.ml
deleted file mode 100644
index 952b3ad..0000000
--- a/hol-light/TacticRecording/gvexport.ml
+++ /dev/null
@@ -1,47 +0,0 @@
-(* ========================================================================== 
*)
-(* GRAPHVIZ EXPORT (HOL LIGHT)                                                
*)
-(* - Exporting recorded tactics into a Dot file for GraphViz                  
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Univeristy of Edinburgh, 2012                                
*)
-(* ========================================================================== 
*)
-
-
-let cluster_count = ref 0;;
-
-let rec print_gv_graphelem d ge =
-  match ge with
-    Box (l,ges)
-       -> let () = (cluster_count := !cluster_count + 1) in
-          (print_indent d; print_string "subgraph cluster";
-             print_int !cluster_count; print_string " "; print_string "{\n";
-           print_indent (d+2); print_string "label = "; print_label l;
-             print_string ";\n";
-           do_list (print_gv_graphelem (d+2)) ges;
-           print_indent d; print_string "}\n")
-  | Line (id1,id2)
-       -> (print_indent d; print_goalid id1; print_string " -> ";
-             print_goalid id2; print_string ";\n")
-  | Single id
-       -> (print_indent d; print_goalid id; print_string ";\n")
-  | Name (id,x)
-       -> (print_indent d; print_goalid id;
-             print_string " [label = "; print_fstring x; print_string "];\n");;
-
-let print_gv_graph ges =
-  let () = (cluster_count := 0) in
-  (print_string "digraph G {\n";
-   do_list (print_gv_graphelem 2) ges;
-   print_string "}\n");;
-
-let print_hiproof_gv_graph h =
-  let h' = (trivsimp_hiproof o rightgroup_hiproof o
-            trivsimp_hiproof o dethen_hiproof) h in
-  let ges = hiproof_graph h' in
-  print_gv_graph ges;;
-
-let print_gtree_gv_proof gtr =
-  let h = gtree_to_hiproof gtr in
-  print_hiproof_gv_graph h;;
-
-let print_gv_proof () = print_gtree_gv_proof !the_goal_tree;;
diff --git a/hol-light/TacticRecording/hiproofs.ml 
b/hol-light/TacticRecording/hiproofs.ml
deleted file mode 100644
index 310ba67..0000000
--- a/hol-light/TacticRecording/hiproofs.ml
+++ /dev/null
@@ -1,417 +0,0 @@
-(* ========================================================================== 
*)
-(* HIPROOFS (HOL LIGHT)                                                       
*)
-(* - Hiproofs and refactoring operations                                      
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Univeristy of Edinburgh, 2012                                
*)
-(* ========================================================================== 
*)
-
-
-(* This file defines a hiproof [1] datatype and various operations on it.     
*)
-(* The datatype closely resembles that proposed in [2], with the notable      
*)
-(* difference that atomic steps carry their arity.                            
*)
-
-(* [1] "Hiproofs: A Hierarchical Notion of Proof Tree", Denney, Power &       
*)
-(*    Tourlas, 2006.                                                          
*)
-(* [2] "A Tactic Language for Hiproofs", Aspinall, Denney & Luth, 2008.       
*)
-
-
-
-(* ** DATATYPE ** *)
-
-
-(* Hiproof datatype *)
-
-(* Note that atomic tactics are labelled with their arity, corresponding to   
*)
-(* how many subgoals they result in.  An arity of -1 indicates unknown, and 0 
*)
-(* indicates a tactic that completes its goal.                                
*)
-
-type hiproof =
-    Hactive of goalid                   (* Active subgoal *)
-  | Hatomic of (goalid * int)           (* Atomic tactic + arity *)
-  | Hidentity of goalid                 (* Null, for wiring *)
-  | Hlabelled of (label * hiproof)      (* Box *)
-  | Hsequence of (hiproof * hiproof)    (* Serial application *)
-  | Htensor of hiproof list             (* Parallel application *)
-  | Hempty;;                            (* Completed goal *)
-
-
-(* Constructors and destructors *)
-
-let hsequence (h1,h2) = Hsequence (h1,h2);;
-
-let dest_hsequence h =
-  match h with
-    Hsequence hh -> hh
-  | _   -> failwith "Not a sequence hiproof";;
-
-let is_hsequence h = can dest_hsequence h;;
-
-let is_hidentity h = match h with Hidentity _ -> true | _ -> false;;
-
-let hiproof_id h =
-  match h with
-    Hactive id | Hatomic (id,_) | Hidentity id -> id
-  | _  -> failwith "hiproof_id: Not a unit hiproof";;
-
-
-(* Arity *)
-
-let rec hiproof_arity h =
-  match h with
-    Hactive _         -> 1
-  | Hatomic (_,n)     -> n
-  | Hidentity _       -> 1
-  | Hlabelled (_,h0)  -> hiproof_arity h0
-  | Hsequence (h1,h2) -> hiproof_arity h2
-  | Htensor hs        -> sum (map hiproof_arity hs)
-  | Hempty            -> 0;;
-
-
-(* Hitrace *)
-
-type hitrace =
-   Hicomment of int list
- | Hiproof of hiproof;;
-
-
-
-(* ** TRANSLATION OF GOAL TREE TO HIPROOF ** *)
-
-
-let rec gtree_to_hiproof gtr =
-  let id = gtree_id gtr in
-  let (_,gtrm) = gtr in
-  match !gtrm with
-    Gactive
-       -> Hactive id
-  | Gexit _
-       -> Hidentity id
-  | Gexecuted (gstp,gtrs)
-       -> let h1 =
-             match gstp with
-               Gatom _ | Gbox (_,_,true)
-                  -> Hatomic (id, length gtrs)
-             | Gbox (l,gtr,false)
-                  -> Hlabelled (l, gtree_to_hiproof gtr) in
-          let h2 = Htensor (map gtree_to_hiproof gtrs) in
-          Hsequence (h1,h2);;
-
-
-
-(* ** REFACTORING OPERATIONS ** *)
-
-
-(* Generic refactoring operation *)
-
-(* Applies a refactoring function 'foo' at every level of hiproof 'h', from   
*)
-(* bottom up.  If the 'r' flag is set then refactoring is repeated bottom up  
*)
-(* whenever 'foo' makes a change.  Note that if 'foo' makes no change then it 
*)
-(* should just return its input hiproof (rather than raise an exception).     
*)
-
-let rec refactor_hiproof r foo h =
-  let h' =
-     match h with
-       Hlabelled (l,h0)
-          -> let h0' = refactor_hiproof r foo h0 in
-             Hlabelled (l,h0')
-     | Hsequence (h1,h2)
-          -> let h1' = refactor_hiproof r foo h1 in
-             let h2' = refactor_hiproof r foo h2 in
-             Hsequence (h1',h2')
-     | Htensor hs
-          -> let hs' = map (refactor_hiproof r foo) hs in 
-             Htensor hs'
-     | _  -> h in
-  let h'' = if (h' = h) then h else h' in
-  let h''' = foo h'' in
-  if r & not (h''' = h'')
-    then refactor_hiproof r foo h'''
-    else h''';;
-
-
-(* Trivial simplification *)
-
-(* Removes basic algebraic identities/zeros.                                  
*)
-
-let collapse_tensor h hs =
-  match h with
-    Hempty      -> hs
-  | Htensor hs0 -> hs0 @ hs
-  | _           -> h :: hs;;
-
-let trivsimp_hiproof h =
-  let trivsimp h =
-     match h with
-       Hatomic (id,_) when (gtree_tactic (get_gtree id) = ("ALL_TAC",[]))
-                                   -> Hidentity id
-     | Hsequence (h1, Hempty)      -> h1
-     | Hsequence (h1, Hidentity _) -> h1
-     | Hsequence (h1, Htensor hs2) -> if (forall is_hidentity hs2)
-                                        then h1
-                                        else h
-     | Hsequence (Hidentity _, h2) -> h2
-     | Hsequence (Htensor hs1, h2) -> if (forall is_hidentity hs1)
-                                        then h2
-                                        else h
-     | Htensor []                  -> Hempty
-     | Htensor [h0]                -> h0
-     | Htensor hs0                 -> Htensor (foldr collapse_tensor hs0 [])
-     | _  -> h in
-  refactor_hiproof true trivsimp h;;
-
-
-(* Matching up two tensored lists to create single tensored list *)
-
-let rec matchup_hiproofs0 hs1 hs2 =
-  match hs1 with
-    [] -> []
-  | h1::hs01
-       -> let n1 = hiproof_arity h1 in
-          let (hs2a,hs2b) = try chop_list n1 hs2
-                with Failure _ ->
-                     if (n1 = -1)
-                       then failwith "matchup_hiproofs: unknown arity"
-                       else failwith "matchup_hiproofs: Internal error - \
-                                                      inconsistent arities" in
-          (h1,hs2a) :: (matchup_hiproofs0 hs01 hs2b);;
-
-let matchup_hiproofs hs1 hs2 =
-  let hhs = matchup_hiproofs0 hs1 hs2 in
-  map (fun (h1,hs2) -> Hsequence (h1, Htensor hs2)) hhs;;
-
-
-(* Separating out tensored list into head tensor and tail tensor  *)
-
-let separate_hiproofs0 h (hs01,hs02) =
-  match h with
-    Hsequence (h1,h2)
-       -> (h1::hs01, h2::hs02)
-  | _  -> let n = hiproof_arity h in
-          let h2 = Htensor (copy n (Hidentity (-1))) in
-          (h::hs01, h2::hs02);;
-
-let separate_hiproofs hs = foldr separate_hiproofs0 hs ([],[]);;
-
-
-(* Delabelling *)
-
-(* Strips out any boxes from the proof.  Note that some boxes, such as        
*)
-(* 'SUBGOAL_THEN', cannot be stripped out without spoiling the proof, and so  
*)
-(* are left alone.                                                            
*)
-
-let delabel_hiproof h =
-  let delabel h =
-     match h with
-       Hlabelled (Tactical ("SUBGOAL_THEN",_), h0)
-          -> h
-     | Hlabelled (_,h0)
-          -> h0
-     | _  -> h in
-  refactor_hiproof true delabel h;;
-
-let dethen_hiproof h =
-  let dethen h =
-     match h with
-       Hlabelled (Tactical (("THEN" | "THENL"),_), h0)
-          -> h0
-     | _  -> h in
-  refactor_hiproof true dethen h;;
-
-
-(* Right-grouping *)
-
-(* Expands the proof into a right-associative sequence, with tensor           
*)
-(* compounding on the right.  Leaves all boxes unchanged.                     
*)
-
-let rightgroup_hiproof h =
-  let rightgroup h =
-     match h with
-       Hsequence (Hsequence (h1, Htensor hs2), Htensor hs3)
-          -> Hsequence (h1, Htensor (matchup_hiproofs hs2 hs3))
-     | Hsequence (Hsequence (h1, Htensor hs2), h3)
-          -> Hsequence (h1, Htensor (matchup_hiproofs hs2 [h3]))
-     | Hsequence (Hsequence (h1,h2), h3)
-          -> Hsequence (h1, Hsequence (h2,h3))
-     | _  -> h in
-  refactor_hiproof true rightgroup h;;
-
-
-(* Left-grouping *)
-
-(* Expands the proof into a left-associative sequence.                        
*)
-
-let leftgroup_hiproof h =
-  let leftgroup h =
-     match h with
-       Hsequence (h1, Hsequence (h2, h3))
-          -> Hsequence (Hsequence (h1,h2), h3)
-     | _  -> h in
-  refactor_hiproof true leftgroup h;;
-
-
-(* THEN insertion *)
-
-(* Looks for opportunities to use 'THEN' tacticals.  Note that assumes a      
*)
-(* normal form where trivsimp has taken place.                                
*)
-
-let rec head_hiproof_equiv h1 h2 =
-  match (h1,h2) with
-    (Hatomic (id1,_), Hatomic (id2,_))
-       -> (gtree_tactic o get_gtree) id1 = (gtree_tactic o get_gtree) id2
-  | (Hidentity _, Hidentity _)
-       -> true
-  | (Hsequence (h1a,h1b), h2)
-       -> head_hiproof_equiv h1a h2
-  | (h1, Hsequence (h2a,h2b))
-       -> head_hiproof_equiv h1 h2a
-  | (Hempty, Hempty)
-       -> true
-  | _  -> false;;
-
-let thenise_hiproof h =
-  let rec thenise h =
-     match h with
-       Hsequence (h1, Htensor (h2::h2s))
-          -> if not (is_hidentity h2) & (forall (head_hiproof_equiv h2) h2s) 
-               then let (hs2a,hs2b) = separate_hiproofs (h2::h2s) in
-                    let h' = Hsequence
-                               (Hlabelled (Tactical ("THEN",[]),
-                                           Hsequence (h1, Htensor hs2a)),
-                                Htensor hs2b) in
-                    thenise h'
-               else h
-     | _  -> h in
-  refactor_hiproof false thenise h;;
-
-
-
-(* ** HIPROOF GRAPH ** *)
-
-
-(* Graph element datatype *)
-
-type graph_elem =
-    Box of (label * graph_elem list)
-  | Line of (goalid * goalid)
-  | Single of goalid
-  | Name of (goalid * string);;
-
-let is_box ge =
-  match ge with Box _ -> true | _ -> false;;
-
-let mk_line id1 id2 = Line (id1,id2);;
-
-let rec graph_elem_nodes ge =
-  match ge with
-    Box (_,ges)    -> graph_nodes ges
-  | Line (id1,id2) -> [id1;id2]
-  | Single id      -> [id]
-  | Name (id,x)    -> [id]
-
-and graph_nodes ges =
-  foldr (fun ge ids -> union (graph_elem_nodes ge) ids) ges [];;
-
-
-(* Utils *)
-
-let rec hiproof_ins h =
-  match h with
-    Hactive id        -> [id]
-  | Hatomic (id,n)    -> [id]
-  | Hidentity id      -> [-1]
-  | Hlabelled (l,h0)  -> hiproof_ins h0
-  | Hsequence (h1,h2) -> hiproof_ins h1
-  | Htensor hs        -> flat (map hiproof_ins hs)
-  | Hempty            -> [];;
-
-let rec hiproof_outs (h:hiproof) : goalid list =
-  match h with
-    Hactive id        -> [id]
-  | Hatomic (id,n)    -> copy n id
-  | Hidentity id      -> [id]
-  | Hlabelled (l,h0)  -> hiproof_outs h0
-  | Hsequence (h1, Htensor hs2)
-       -> let nhs2 = enumerate hs2 in
-          let ids1 = hiproof_outs h1 in
-          let foo (n2,h2) =
-             if (is_hidentity h2) then [el (n2-1) ids1]
-                                  else hiproof_outs h2 in
-          flat (map foo nhs2)
-  | Hsequence (h1,h2) -> hiproof_outs h2
-  | Htensor hs        -> flat (map hiproof_outs hs)
-  | Hempty            -> [];;
-
-
-(* Graph production *)
-
-let rec hiproof_graph0 h =
-  match h with
-    Hactive _      -> []
-  | Hatomic _      -> []
-  | Hidentity _    -> []
-  | Hlabelled (l,Hatomic (id,_))
-       -> [Box (l, [Single id])]
-  | Hlabelled (l,h0)
-       -> [Box (l, hiproof_graph0 h0)]
-  | Hsequence (h1,h2)
-       -> let idids = zip (hiproof_outs h1) (hiproof_ins h2) in
-          let idids' = filter (fun (_,id2) -> (id2 > 0)) idids in
-          (hiproof_graph0 h1) @
-          (map (fun idid -> Line idid) idids') @
-          (hiproof_graph0 h2)
-  | Htensor hs     -> flat (map hiproof_graph0 hs)
-  | Hempty         -> [];;
-
-let hiproof_graph h =
-  let ges = hiproof_graph0 h in
-  let ids = graph_nodes ges in
-  let tacname_of_id id = (fst o gtree_tactic1 o get_gtree) id in
-  let ges' = map (fun id -> Name (id, tacname_of_id id)) ids in
-  ges' @ ges;;
-
-
-
-(* ** OTHER OPERATIONS ** *)
-
-
-(* Tactic trace *)
-
-(* Gives a linear trace of the basic tactics used in the proof, ignoring how  
*)
-(* they were combined by tacticals.                                           
*)
-
-let rec hiproof_tactic_trace0 h =
-  match h with
-    Hactive _
-       -> [active_info]
-  | Hatomic (id, _)
-       -> [gtree_tactic (get_gtree id)]
-  | Hidentity _
-       -> []
-  | Hlabelled (_,h0)
-       -> hiproof_tactic_trace0 h0
-  | Hsequence (h1,h2)
-       -> (hiproof_tactic_trace0 h1) @ (hiproof_tactic_trace0 h2)
-  | Htensor hs
-       -> flat (map hiproof_tactic_trace0 hs)
-  | Hempty
-       -> [];;
-
-let hiproof_tactic_trace h = (hiproof_tactic_trace0 o delabel_hiproof) h;;
-
-
-(* Block trace *)
-
-(* Gives a linear trace of the hiproofs used in the proof, stopping at boxes. 
*)
-
-let rec hiproof_block_trace0 ns0 h =
-  match h with
-  | Hsequence (h1,h2)
-       -> (hiproof_block_trace0 ns0 h1) @ (hiproof_block_trace0 ns0 h2)
-  | Htensor hs
-       -> let nss = map (fun n -> ns0 @ [n]) (1 -- length hs) in
-          flat (map (fun (ns,h) -> (Hicomment ns) :: hiproof_block_trace0 ns h)
-                    (zip nss hs))
-  | _  -> [Hiproof h];;
-
-let hiproof_block_trace h = hiproof_block_trace0 [] h;;
diff --git a/hol-light/TacticRecording/lib.ml b/hol-light/TacticRecording/lib.ml
deleted file mode 100644
index 5de2833..0000000
--- a/hol-light/TacticRecording/lib.ml
+++ /dev/null
@@ -1,91 +0,0 @@
-
-let rec copy n x =
-  if (n > 0) then x::(copy (n-1) x)
-             else [];;
-
-
-let rec enumerate0 n xs =
-  match xs with
-    []     -> []
-  | x::xs0 -> (n,x)::enumerate0 (n+1) xs0;;
-let enumerate xs = enumerate0 1 xs;;
-
-
-(* foldr : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b                            
*)
-
-let rec foldr f xs a =
-  match xs with
-    x1::xs2 -> f x1 (foldr f xs2 a)
-  | []      -> a;;
-
-
-(* foldr1 : ('a -> 'a -> 'a) -> 'a list -> 'a                                 
*)
-
-let rec foldr1 f xs =
-  match xs with
-    x::[]   -> x
-  | x1::xs2 -> f x1 (foldr1 f xs2)
-  | []      -> failwith "foldr1: Empty list";;
-
-
-(* foldl : ('b -> 'a -> 'b) -> 'b -> 'a list -> 'b                            
*)
-
-let rec foldl f a xs =
-  match xs with
-    x1::xs2 -> foldl f (f a x1) xs2
-  | []      -> a;;
-
-
-(* is_empty *)
-
-let is_empty xs =
-  match xs with
-    [] -> true
-  | _  -> false;;
-
-
-(* front *)
-
-let rec front xs =
-  match xs with
-    _::[]   -> []
-  | x0::xs0 -> x0::(front xs0)
-  | []      -> failwith "front: Empty list";;
-
-
-(* string_option *)
-
-let string_option x0 x_ =
-  match x_ with
-    Some x -> x
-  | None   -> x0;;
-
-
-(* print_option *)
-
-let print_option x0 x_ =
-  match x_ with
-    Some x -> print_string x
-  | None   -> print_string x0;;
-
-
-(* seplists *)
-
-let print_seplist p sep xs =
-  if (xs = [])
-    then ()
-    else (p (hd xs);
-          do_list (fun x -> print_string sep; p x) (tl xs));;
-
-let print_string_seplist sep xs =
-  print_seplist print_string sep xs;;
-
-
-(* sum *)
-
-let sum ns = foldl (+) 0 ns;;
-
-
-(* snd_map *)
-
-let snd_map f xys = map (fun (x,y) -> (x, f y)) xys;;
diff --git a/hol-light/TacticRecording/main.ml 
b/hol-light/TacticRecording/main.ml
deleted file mode 100644
index 57c8254..0000000
--- a/hol-light/TacticRecording/main.ml
+++ /dev/null
@@ -1,31 +0,0 @@
-(* Library stuff *)
-
-#use "TacticRecording/lib.ml";;
-#use "TacticRecording/dltree.mli";;
-#use "TacticRecording/dltree.ml";;
-
-(* Datatypes and recording mechanism *)
-
-#use "TacticRecording/mldata.ml";;
-#use "TacticRecording/xthm.ml";;
-#use "TacticRecording/xtactics.ml";;
-#use "TacticRecording/tacticrec.ml";;
-#use "TacticRecording/wrappers.ml";;
-
-(* Prooftree support *)
-
-#use "TacticRecording/prooftree.ml";;
-
-(* Hiproofs & refactoring *)
-
-#use "TacticRecording/hiproofs.ml";;
-
-(* Export *)
-
-#use "TacticRecording/printutils.ml";;
-#use "TacticRecording/gvexport.ml";;
-#use "TacticRecording/mlexport.ml";;
-
-(* Overwriting the existing HOL Light objects *)
-
-#use "TacticRecording/promote.ml";;
diff --git a/hol-light/TacticRecording/mldata.ml 
b/hol-light/TacticRecording/mldata.ml
deleted file mode 100644
index b547a89..0000000
--- a/hol-light/TacticRecording/mldata.ml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-type mlarg =
-   Mlint of int
- | Mlstring of string
- | Mlterm of term
- | Mltype of hol_type
- | Mlthm of mldata
- | Mlpair of mlarg * mlarg
- | Mllist of mlarg list
- | Mlfn of mldata
-
-and mldata = string * mlarg list;;          (* ML object name and args *)
-
-
-type label =
-   Tactical of mldata
- | Label of string;;
-
-
-(* Atomic tests *)
-
-let is_atomic_mlarg arg =
-  match arg with
-    Mlthm (_,(_::_)) | Mlpair _ | Mlfn (_, _::_) -> false
-  | _ -> true;;
-
-let is_atomic_mldata ((x,args):mldata) = (is_empty args);;
-
-
-(* active_info *)
-
-let active_info = ("...",[]);;
diff --git a/hol-light/TacticRecording/mlexport.ml 
b/hol-light/TacticRecording/mlexport.ml
deleted file mode 100644
index 9a9207d..0000000
--- a/hol-light/TacticRecording/mlexport.ml
+++ /dev/null
@@ -1,186 +0,0 @@
-(* ========================================================================== 
*)
-(* ML EXPORT (HOL LIGHT)                                                      
*)
-(* - Exporting recorded tactics into a proof script                           
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Univeristy of Edinburgh, 2012                                
*)
-(* ========================================================================== 
*)
-
-
-(* Routines for exporting an ML tactic proof script from the recorded tactic  
*)
-(* proof tree, via a hiproof representation.                                  
*)
-
-
-
-(* ** UTILS ** *)
-
-
-(* Printer for tactic is just the ML data printer *)
-
-let print_tactic br obj = print_mldata br obj;;
-
-
-(* Printer for subgoal comments *)
-
-let print_hicomment_line ns =
-  (print_string "(* *** Subgoal ";
-   print_int (hd ns);
-   do_list (fun n -> print_string "."; print_int n) (tl ns);
-   print_string " *** *)\n");;
-
-
-(* print_tactic_line *)
-
-let print_tactic_line_with pr arg =
-  (print_string "e ("; pr false arg; print_string ");;\n");;
-
-let print_tactic_line obj =
-  (print_tactic_line_with print_tactic obj);;
-
-let print_hitrace_line_with fl pr htr =
-  match htr with
-    Hicomment ns -> if fl then print_hicomment_line ns
-  | Hiproof h    -> print_tactic_line_with pr h;;
-
-
-(* print_hiproof0 *)
-
-(* This is a utility used in exporters, for basic cases not explicitly dealt  
*)
-(* with in the exporter's special cases.  Does not print tacticals, other     
*)
-(* than 'THEN' (for single arity) and 'THENL' (for multi-arity).  Argument    
*)
-(* 'pr' is the printer to be used on subcases.                                
*)
-
-let print_hiproof0 pr br h =
-  match h with
-    Hactive _
-       -> print_string "..."
-  | Hatomic (id,_)
-       -> print_tactic br (gtree_tactic (get_gtree id))
-  | Hidentity _
-       -> print_string "ALL_TAC"
-  | Hlabelled (_,h0)
-       -> pr br h0
-  | Hsequence (h1, Htensor h2s)
-       -> (print_string_if br "(";
-           pr false h1;
-           print_string " THENL [";
-           print_seplist (pr false) "; " h2s;
-           print_string "]";
-           print_string_if br ")")
-  | Hsequence (h1,Hempty)
-       -> (pr br h1)
-  | Hsequence (h1,h2)
-       -> (print_string_if br "(";
-           pr false h1;
-           print_string " THEN ";
-           pr true h2;
-           print_string_if br ")")
-  | Htensor _
-       -> failwith "print_hiproof: Unexpected tensor"
-  | Hempty
-       -> failwith "print_hiproof: Unexpected empty";;
-
-
-(* A basic hiproof printer that just uses 'print_hiproof0'.                   
*)
-
-let rec print_hiproof1 br h = print_hiproof0 print_hiproof1 br h;;
-
-
-(* print_hiproof2 *)
-
-let rec print_hiproof2 br h =
-  match h with
-    Hlabelled (Tactical ("REPEAT", _), Hsequence (h1,h2)) (* if repeated *)
-       -> (print_string_if br "(";
-           print_string "REPEAT ";
-           print_hiproof2 true h1;
-           print_string_if br ")")
-  | Hlabelled (Tactical ("THEN", _),                     (* if tac2 used *)
-               Hsequence (h1, Htensor (h2::h2s)))
-       -> (print_string_if br "(";
-           print_hiproof2 false h1;
-           print_string " THEN ";
-           print_hiproof2 true h2;
-           print_string_if br ")")
-  | Hlabelled (Tactical (("SUBGOAL_THEN",                (* special case *)
-                         (Mlterm tm)::[_]) as obj),
-               _)
-       -> (print_tactic br obj)
-  | Hlabelled (Label x, h)
-       -> (print_string_if br "(";
-           print_string "HILABEL ";
-           print_fstring x; print_string " ";
-           print_hiproof2 true h;
-           print_string_if br ")")
-  | _  -> (print_hiproof0 print_hiproof2 br h);;
-
-
-
-(* ** PRINTERS ** *)
-
-
-(* Executed proof *)
-
-(* Prints proof according to how it was executed, i.e. using the original e-  
*)
-(* steps and according to any user-supplied 'REPEAT' and 'THEN' tacticals,    
*)
-(* but only those parts that actually execute and not according to any other  
*)
-(* tacticals.                                                                 
*)
-
-let print_hiproof_executed_proof fl h =
-  let h' = trivsimp_hiproof h in
-  let htrs' = hiproof_block_trace h' in
-  do_list (print_hitrace_line_with fl print_hiproof2) htrs';;
-
-let print_gtree_executed_proof fl gtr =
-  (print_hiproof_executed_proof fl o gtree_to_hiproof) gtr;;
-
-let print_executed_proof fl = print_gtree_executed_proof fl !the_goal_tree;;
-
-
-(* Packaged proof *)
-
-(* Prints proof as a monolithic step, spotting opportunities for 'REPEAT' and 
*)
-(* multi-arity 'THEN' tacticals in addition to those already in proof.        
*)
-(* ! 'REPEAT' not currently catered for.                                      
*)
-
-let print_hiproof_packaged_proof h =
-  let h' = (trivsimp_hiproof o thenise_hiproof o
-            trivsimp_hiproof o leftgroup_hiproof) h in
-  print_tactic_line_with print_hiproof2 h';;
-
-let print_gtree_packaged_proof gtr =
-  (print_hiproof_packaged_proof o gtree_to_hiproof) gtr;;
-
-let print_packaged_proof () = print_gtree_packaged_proof !the_goal_tree;;
-
-
-(* THENL proof *)
-
-(* Prints proof as a naive monolithic step, using 'THEN' for single arity,    
*)
-(* and 'THENL' for multi-arity (even if each subgoal has the same proof).     
*)
-(* This gives the full structure of each tactic execution.                    
*)
-
-let print_hiproof_thenl_proof h =
-  let h' = (trivsimp_hiproof o delabel_hiproof) h in
-  print_tactic_line_with print_hiproof1 h';;
-
-let print_gtree_thenl_proof gtr =
-  (print_hiproof_thenl_proof o gtree_to_hiproof) gtr;;
-
-let print_thenl_proof () = print_gtree_thenl_proof !the_goal_tree;;
-
-
-(* Flat proof *)
-
-(* This exports a proof as a flat series of e-steps, with no tacticals.       
*)
-
-let print_hiproof_flat_proof fl h =
-  let h' = (trivsimp_hiproof o rightgroup_hiproof o trivsimp_hiproof o
-            delabel_hiproof) h in
-  let htrs' = hiproof_block_trace h' in
-  do_list (print_hitrace_line_with fl print_hiproof2) htrs';;
-
-let print_gtree_flat_proof fl gtr =
-  (print_hiproof_flat_proof fl o gtree_to_hiproof) gtr;;
-
-let print_flat_proof fl = print_gtree_flat_proof fl !the_goal_tree;;
diff --git a/hol-light/TacticRecording/printutils.ml 
b/hol-light/TacticRecording/printutils.ml
deleted file mode 100644
index aa74ee2..0000000
--- a/hol-light/TacticRecording/printutils.ml
+++ /dev/null
@@ -1,61 +0,0 @@
-(* ========================================================================== 
*)
-(* PRINTER UTILITIES (HOL LIGHT)                                              
*)
-(* - Various basic utilities used in writing the exporters                    
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Univeristy of Edinburgh, 2012                                
*)
-(* ========================================================================== 
*)
-
-
-(* Basics *)
-
-let print_string_if b x = if b then print_string x;;
-
-let print_fstring x = print_string ("\"" ^ String.escaped x ^ "\"");;
-
-let print_fterm tm = print_string ("`" ^ string_of_term tm ^ "`");;
-
-let print_ftype ty = print_string ("`" ^ string_of_type ty ^ "`");;
-
-let print_goalid id = print_int id;;
-
-let print_indent d = print_string (String.make d ' ');;
-
-
-(* Printer for 'mldata' *)
-
-let rec print_mlarg br arg =
-  match arg with
-    Mlint n       -> print_int n
-  | Mlstring x    -> print_fstring x
-  | Mlterm tm     -> print_fterm tm
-  | Mltype ty     -> print_ftype ty
-  | Mlthm prf     -> print_mldata br prf
-  | Mlpair (arg1,arg2)
-       -> let sep =
-             if (forall is_atomic_mlarg [arg1;arg2]) then "," else ", " in
-          (print_string_if br "(";
-           print_mlarg false arg1;
-           print_string sep;
-           print_mlarg false arg2;
-           print_string_if br ")")
-  | Mllist args 
-       -> let sep = if (forall is_atomic_mlarg args) then ";" else "; " in
-          (print_string "[";
-           print_seplist (print_mlarg false) sep args;
-           print_string "]")
-  | Mlfn f
-       -> (print_mldata br f)
-
-and print_mldata br ((x,args):mldata) =
-  (print_string_if (br & not (is_empty args)) "(";
-   print_string x;
-   do_list (fun arg -> print_string " "; print_mlarg true arg) args;
-   print_string_if (br & not (is_empty args)) ")");;
-
-
-(* Printer for labels *)
-
-let print_label l =
-  match l with
-    Tactical (x,_) | Label x  -> print_fstring x;;
diff --git a/hol-light/TacticRecording/promote.ml 
b/hol-light/TacticRecording/promote.ml
deleted file mode 100644
index c19abb8..0000000
--- a/hol-light/TacticRecording/promote.ml
+++ /dev/null
@@ -1,327 +0,0 @@
-(* ========================================================================== 
*)
-(* PROMOTTION (HOL LIGHT)                                                     
*)
-(* - Overwrites original HOL Light tactics/etc with xgoal/xthm versions       
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Univeristy of Edinburgh, 2012                                
*)
-(* ========================================================================== 
*)
-
-
-
-(* ** TACTICS.ML ** *)
-
-
-(* Tactics *)
-
-(* Atomic tactics can be automatically promoted to deal with xgoals and       
*)
-(* recording.                                                                 
*)
-
-let NO_TAC = tactic_wrap "NO_TAC" NO_TAC;;
-let ALL_TAC = tactic_wrap "ALL_TAC" ALL_TAC;;
-
-let LABEL_TAC = stringthm_tactic_wrap "LABEL_TAC" LABEL_TAC;;
-let ASSUME_TAC = thm_tactic_wrap "ASSUME_TAC" ASSUME_TAC;;
-
-let ACCEPT_TAC = thm_tactic_wrap "ACCEPT_TAC" ACCEPT_TAC;;
-
-let CONV_TAC = conv_tactic_wrap "CONV_TAC" CONV_TAC;;
-
-let REFL_TAC = tactic_wrap "REFL_TAC" REFL_TAC;;
-let ABS_TAC = tactic_wrap "ABS_TAC" ABS_TAC;;
-let MK_COMB_TAC = tactic_wrap "MK_COMB_TAC" MK_COMB_TAC;;
-let AP_TERM_TAC = tactic_wrap "AP_TERM_TAC" AP_TERM_TAC;;
-let AP_THM_TAC = tactic_wrap "AP_THM_TAC" AP_THM_TAC;;
-let BINOP_TAC = tactic_wrap "BINOP_TAC" BINOP_TAC;;
-let SUBST1_TAC = thm_tactic_wrap "SUBST1_TAC" SUBST1_TAC;;
-let SUBST_ALL_TAC = thm_tactic_wrap "SUBST_ALL_TAC" SUBST_ALL_TAC;;
-let BETA_TAC = tactic_wrap "BETA_TAC" BETA_TAC;;
-
-let SUBST_VAR_TAC = thm_tactic_wrap "SUBST_VAR_TAC" SUBST_VAR_TAC;;
-
-let DISCH_TAC = tactic_wrap "DISCH_TAC" DISCH_TAC;;
-let MP_TAC = thm_tactic_wrap "MP_TAC" MP_TAC;;
-let EQ_TAC = tactic_wrap "EQ_TAC" EQ_TAC;;
-let UNDISCH_TAC = term_tactic_wrap "UNDISCH_TAC" UNDISCH_TAC;;
-let SPEC_TAC = termpair_tactic_wrap "SPEC_TAC" SPEC_TAC;;
-let X_GEN_TAC = term_tactic_wrap "X_GEN_TAC" X_GEN_TAC;;
-let GEN_TAC = tactic_wrap "GEN_TAC" GEN_TAC;;
-let EXISTS_TAC = term_tactic_wrap "EXISTS_TAC" EXISTS_TAC;;
-let CHOOSE_TAC = thm_tactic_wrap "CHOOSE_TAC" CHOOSE_TAC;;
-let CONJ_TAC = tactic_wrap "CONJ_TAC" CONJ_TAC;;
-let DISJ1_TAC = tactic_wrap "DISJ1_TAC" DISJ1_TAC;;
-let DISJ2_TAC = tactic_wrap "DISJ2_TAC" DISJ2_TAC;;
-let DISJ_CASES_TAC = thm_tactic_wrap "DISJ_CASES_TAC" DISJ_CASES_TAC;;
-let CONTR_TAC = thm_tactic_wrap "CONTR_TAC" CONTR_TAC;;
-let MATCH_ACCEPT_TAC = thm_tactic_wrap "MATCH_ACCEPT_TAC" MATCH_ACCEPT_TAC;;
-let MATCH_MP_TAC = thm_tactic_wrap "MATCH_MP_TAC" MATCH_MP_TAC;;
-
-let STRIP_ASSUME_TAC = thm_tactic_wrap "STRIP_ASSUME_TAC" STRIP_ASSUME_TAC;;
-let STRUCT_CASES_TAC = thm_tactic_wrap "STRUCT_CASES_TAC" STRUCT_CASES_TAC;;
-let STRIP_TAC = tactic_wrap "STRIP_TAC" STRIP_TAC;;
-
-let X_META_EXISTS_TAC = term_tactic_wrap "X_META_EXISTS_TAC" 
X_META_EXISTS_TAC;;
-let META_EXISTS_TAC = tactic_wrap "META_EXISTS_TAC" META_EXISTS_TAC;;
-
-let ANTS_TAC = tactic_wrap "ANTS_TAC" ANTS_TAC;;
-
-
-(* Special cases, already fully hand-promoted *)
-
-let SUBGOAL_THEN = xSUBGOAL_THEN;;
-
-
-(* Tacticals *)
-
-(* Tacticals need to be hand-promoted to deal with xgoals, but this is        
*)
-(* trivial and is done in 'xtactics.ml'.  They are further promoted here to   
*)
-(* get recorded as boxes, using the tactical-wrap functions.                  
*)
-
-let (THEN) = btactical_wrap "THEN" (xTHEN);;
-let (THENL) = btactical_wrap "THENL" (xTHENL);;
-let (ORELSE) = btactical_wrap "ORELSE" (xORELSE);;
-let TRY = tactical_wrap "TRY" xTRY;;
-let REPEAT = tactical_wrap "REPEAT" xREPEAT;;
-let EVERY = tactical_wrap "EVERY" xEVERY;;
-let FIRST = tactical_wrap "FIRST" xFIRST;;
-let MAP_EVERY = list_tactical_wrap "MAP_EVERY" xMAP_EVERY;;
-let MAP_FIRST = list_tactical_wrap "MAP_FIRST" xMAP_FIRST;;
-let CHANGED_TAC = tactical_wrap "CHANGED_TAC" xCHANGED_TAC;;
-let REPLICATE_TAC = int_tactical_wrap "REPLICATE_TAC" xREPLICATE_TAC;;
-
-
-(* Subgoal commands *)
-
-let e = xe;;
-let r = xr;;
-let set_goal = xset_goal;;
-let g = xg;;
-let b = xb;;
-let p = xp;;
-let top_goal = xtop_goal;;
-let top_thm = xtop_thm;;
-
-let prove = xprove;;
-
-
-
-(* ** COMMON HOL API ** *)
-
-
-(* Rules *)
-
-let ADD_ASSUM = term_rule_wrap "ADD_ASSUM" ADD_ASSUM;;
-let ASSUME = conv_wrap "ASSUME" ASSUME;;
-let BETA_CONV = conv_wrap "BETA_CONV" BETA_CONV;;
-let CCONTR = term_rule_wrap "CCONTR" CCONTR;;
-let CHOOSE = termthmpair_rule_wrap "CHOOSE" CHOOSE;;
-let CONJ = drule_wrap "CONJ" CONJ;;
-let CONJUNCT1 = rule_wrap "CONJUNCT1" CONJUNCT1;;
-let CONJUNCT2 = rule_wrap "CONJUNCT2" CONJUNCT2;;
-let CONTR = term_rule_wrap "CONTR" CONTR;;
-let DEDUCT_ANTISYM_RULE = drule_wrap "DEDUCT_ANTISYM_RULE" 
DEDUCT_ANTISYM_RULE;;
-let DISCH = term_rule_wrap "DISCH" DISCH;;
-let DISJ1 = thm_conv_wrap "DISJ1" DISJ1;;
-let DISJ2 = term_rule_wrap "DISJ2" DISJ2;;
-let DISJ_CASES = trule_wrap "DISJ_CASES" DISJ_CASES;;
-let EQ_MP = drule_wrap "EQ_MP" EQ_MP;;
-let EQF_INTRO = rule_wrap "EQF_INTRO" EQF_INTRO;;
-let EQF_ELIM = rule_wrap "EQF_ELIM" EQF_ELIM;;
-let EQT_INTRO = rule_wrap "EQT_INTRO" EQT_INTRO;;
-let EQT_ELIM = rule_wrap "EQT_ELIM" EQT_ELIM;;
-let ETA_CONV = conv_wrap "ETA_CONV" ETA_CONV;;
-let EXISTS = termpair_rule_wrap "EXISTS" EXISTS;;
-let GEN = term_rule_wrap "GEN" GEN;;
-let GENL = termlist_rule_wrap "GENL" GENL;;
-let IMP_ANTISYM_RULE = drule_wrap "IMP_ANTISYM_RULE" IMP_ANTISYM_RULE;;
-let IMP_TRANS = drule_wrap "IMP_TRANS" IMP_TRANS;;
-let INST = terminst_rule_wrap "INST" INST;;
-let INST_TYPE = typeinst_rule_wrap "INST_TYPE" INST_TYPE;;
-let MP = drule_wrap "MP" MP;;
-let NOT_ELIM = rule_wrap "NOT_ELIM" NOT_ELIM;;
-let NOT_INTRO = rule_wrap "NOT_INTRO" NOT_INTRO;;
-let PROVE_HYP = drule_wrap "PROVE_HYP" PROVE_HYP;;
-let REFL = conv_wrap "REFL" REFL;;
-let SELECT_RULE = rule_wrap "SELECT_RULE" SELECT_RULE;;
-let SPEC = term_rule_wrap "SPEC" SPEC;;
-let SPECL = termlist_rule_wrap "SPECL" SPECL;;
-let SUBS = thmlist_rule_wrap "SUBS" SUBS;;
-let SUBS_CONV = thmlist_conv_wrap "SUBS_CONV" SUBS_CONV;;
-let SYM = rule_wrap "SYM" SYM;;
-let SYM_CONV = conv_wrap "SYM_CONV" SYM_CONV;;
-let TRANS = drule_wrap "TRANS" TRANS;;
-let UNDISCH = rule_wrap "UNDISCH" UNDISCH;;
-
-let ABS = term_rule_wrap "ABS" ABS;;
-let MK_COMB = prule_wrap "MK_COMB" MK_COMB;;
-let AP_THM = thm_conv_wrap "AP_THM" AP_THM;;
-let AP_TERM = term_rule_wrap "AP_TERM" AP_TERM;;
-
-let NUM_SUC_CONV = conv_wrap "NUM_SUC_CONV" NUM_SUC_CONV;;
-let NUM_PRE_CONV = conv_wrap "NUM_PRE_CONV" NUM_PRE_CONV;;
-let NUM_ADD_CONV = conv_wrap "NUM_ADD_CONV" NUM_ADD_CONV;;
-let NUM_SUB_CONV = conv_wrap "NUM_SUB_CONV" NUM_SUB_CONV;;
-let NUM_MULT_CONV = conv_wrap "NUM_MULT_CONV" NUM_MULT_CONV;;
-let NUM_EXP_CONV = conv_wrap "NUM_EXP_CONV" NUM_EXP_CONV;;
-let NUM_EQ_CONV = conv_wrap "NUM_EQ_CONV" NUM_EQ_CONV;;
-let NUM_LT_CONV = conv_wrap "NUM_LT_CONV" NUM_LT_CONV;;
-let NUM_LE_CONV = conv_wrap "NUM_LE_CONV" NUM_LE_CONV;;
-let NUM_GT_CONV = conv_wrap "NUM_GT_CONV" NUM_GT_CONV;;
-let NUM_EVEN_CONV = conv_wrap "NUM_EVEN_CONV" NUM_EVEN_CONV;;
-let NUM_ODD_CONV = conv_wrap "NUM_ODD_CONV" NUM_ODD_CONV;;
-
-
-(* Theorems *)
-
-let ETA_AX = theorem_wrap "ETA_AX" ETA_AX;;
-let INFINITY_AX = theorem_wrap "INFINITY_AX" INFINITY_AX;;
-let BOOL_CASES_AX = theorem_wrap "BOOL_CASES_AX" BOOL_CASES_AX;;
-let SELECT_AX = theorem_wrap "SELECT_AX" SELECT_AX;;
-let TRUTH = theorem_wrap "TRUTH" TRUTH;;
-let EXCLUDED_MIDDLE = theorem_wrap "EXCLUDED_MIDDLE" EXCLUDED_MIDDLE;;
-
-let PAIR_EQ = theorem_wrap "PAIR_EQ" PAIR_EQ;;
-let PAIR_SURJECTIVE = theorem_wrap "PAIR_SURJECTIVE" PAIR_SURJECTIVE;;
-let FST = theorem_wrap "FST" FST;;
-let SND = theorem_wrap "SND" SND;;
-
-let IND_SUC_0 = theorem_wrap "IND_SUC_0" IND_SUC_0;;
-let IND_SUC_INJ = theorem_wrap "IND_SUC_INJ" IND_SUC_INJ;;
-
-let NOT_SUC = theorem_wrap "NOT_SUC" NOT_SUC;;
-let SUC_INJ = theorem_wrap "SUC_INJ" SUC_INJ;;
-let num_INDUCTION = theorem_wrap "num_INDUCTION" num_INDUCTION;;
-let num_CASES = theorem_wrap "num_CASES" num_CASES;;
-let num_RECURSION = theorem_wrap "num_RECURSION" num_RECURSION;;
-let PRE = theorem_wrap "PRE" PRE;;
-let ADD = theorem_wrap "ADD" ADD;;
-let SUB = theorem_wrap "SUB" SUB;;
-let MULT = theorem_wrap "MULT" MULT;;
-let EXP = theorem_wrap "EXP" EXP;;
-let LT = theorem_wrap "LT" LT;;
-let LE = theorem_wrap "LE" LE;;
-let GT = theorem_wrap "GT" GT;;
-let GE = theorem_wrap "GE" GE;;
-let EVEN = theorem_wrap "EVEN" EVEN;;
-let ODD = theorem_wrap "ODD" ODD;;
-
-
-
-(* ** OTHER HOL LIGHT ** *)
-
-
-(* More tactics *)
-
-let REWRITE_TAC = thmlist_tactic_wrap "REWRITE_TAC" REWRITE_TAC;;
-let PURE_REWRITE_TAC = thmlist_tactic_wrap "PURE_REWRITE_TAC" 
PURE_REWRITE_TAC;;
-let ONCE_REWRITE_TAC = thmlist_tactic_wrap "ONCE_REWRITE_TAC" 
ONCE_REWRITE_TAC;;
-let ASM_REWRITE_TAC = thmlist_tactic_wrap "ASM_REWRITE_TAC" ASM_REWRITE_TAC;;
-let PURE_ASM_REWRITE_TAC =
-        thmlist_tactic_wrap "PURE_ASM_REWRITE_TAC" PURE_ASM_REWRITE_TAC;;
-let ONCE_ASM_REWRITE_TAC =
-        thmlist_tactic_wrap "ONCE_ASM_REWRITE_TAC" ONCE_ASM_REWRITE_TAC;;
-let GEN_REWRITE_TAC =
-        convconvthmlist_tactic_wrap "GEN_REWRITE_TAC" GEN_REWRITE_TAC;;
-let SIMP_TAC = thmlist_tactic_wrap "SIMP_TAC" SIMP_TAC;;
-let PURE_SIMP_TAC = thmlist_tactic_wrap "PURE_SIMP_TAC" PURE_SIMP_TAC;;
-let ONCE_SIMP_TAC = thmlist_tactic_wrap "ONCE_SIMP_TAC" ONCE_SIMP_TAC;;
-let ASM_SIMP_TAC = thmlist_tactic_wrap "ASM_SIMP_TAC" ASM_SIMP_TAC;;
-let PURE_ASM_SIMP_TAC =
-        thmlist_tactic_wrap "PURE_ASM_SIMP_TAC" PURE_ASM_SIMP_TAC;;
-let ONCE_ASM_SIMP_TAC =
-        thmlist_tactic_wrap "ONCE_ASM_SIMP_TAC" ONCE_ASM_SIMP_TAC;;
-let ABBREV_TAC = term_tactic_wrap "ABBREV_TAC" ABBREV_TAC;;
-let EXPAND_TAC = string_tactic_wrap "EXPAND_TAC" EXPAND_TAC;;
-
-let ASM_CASES_TAC = term_tactic_wrap "ASM_CASES_TAC" ASM_CASES_TAC;;
-let COND_CASES_TAC = tactic_wrap "COND_CASES_TAC" COND_CASES_TAC;;
-
-let ARITH_TAC = tactic_wrap "ARITH_TAC" ARITH_TAC;;
-let INDUCT_TAC = tactic_wrap "INDUCT_TAC" INDUCT_TAC;;
-
-let REAL_ARITH_TAC = tactic_wrap "REAL_ARITH_TAC" REAL_ARITH_TAC;;
-let ASM_REAL_ARITH_TAC = tactic_wrap "ASM_REAL_ARITH_TAC" ASM_REAL_ARITH_TAC;;
-
-
-(* More rules *)
-
-let RATOR_CONV = conv_conv_wrap "RATOR_CONV" RATOR_CONV;;
-let RAND_CONV = conv_conv_wrap "RAND_CONV" RAND_CONV;;
-let LAND_CONV = conv_conv_wrap "LAND_CONV" LAND_CONV;;
-let ABS_CONV = conv_conv_wrap "ABS_CONV" ABS_CONV;;
-let BINDER_CONV = conv_conv_wrap "BINDER_CONV" BINDER_CONV;;
-let SUB_CONV = conv_conv_wrap "SUB_CONV" SUB_CONV;;
-let BINOP_CONV = conv_conv_wrap "BINOP_CONV" BINOP_CONV;;
-let GSYM = rule_wrap "GSYM" GSYM;;
-let CONJUNCTS = multirule_wrap "CONJUNCTS" CONJUNCTS;;
-let SPEC_ALL = rule_wrap "SPEC_ALL" SPEC_ALL;;
-let ISPECL = termlist_rule_wrap "ISPECL" ISPECL;;
-let ALL_CONV = conv_wrap "ALL_CONV" ALL_CONV;;
-let (REPEATC) = conv_conv_wrap "REPEATC" REPEATC;;
-let ONCE_DEPTH_CONV = conv_conv_wrap "ONCE_DEPTH_CONV" ONCE_DEPTH_CONV;;
-
-let REWRITE_RULE = thmlist_rule_wrap "REWRITE_RULE" REWRITE_RULE;;
-
-let num_CONV = conv_wrap "num_CONV" num_CONV;;
-let ARITH_RULE = conv_wrap "ARITH_RULE" ARITH_RULE;;
-
-let REAL_ARITH = conv_wrap "REAL_ARITH" REAL_ARITH;;
-let REAL_FIELD = conv_wrap "REAL_FIELD" REAL_FIELD;;
-
-
-(* More theorems *)
-
-let CONJ_ASSOC = theorem_wrap "CONJ_ASSOC" CONJ_ASSOC;;
-let IMP_IMP = theorem_wrap "IMP_IMP" IMP_IMP;;
-let EQ_IMP = theorem_wrap "EQ_IMP" EQ_IMP;;
-
-let ARITH = theorem_wrap "ARITH" ARITH;;
-let ARITH_EQ = theorem_wrap "ARITH_EQ" ARITH_EQ;;
-let ADD_ASSOC = theorem_wrap "ADD_ASSOC" ADD_ASSOC;;
-let ADD_CLAUSES = theorem_wrap "ADD_CLAUSES" ADD_CLAUSES;;
-let LEFT_ADD_DISTRIB = theorem_wrap "LEFT_ADD_DISTRIB" LEFT_ADD_DISTRIB;;
-let RIGHT_ADD_DISTRIB = theorem_wrap "RIGHT_ADD_DISTRIB" RIGHT_ADD_DISTRIB;;
-let MULT_CLAUSES =theorem_wrap "MULT_CLAUSES" MULT_CLAUSES;;
-let SUB_REFL = theorem_wrap "SUB_REFL" SUB_REFL;;
-let ADD1 =  theorem_wrap "ADD1" ADD1;;
-let EQ_MULT_LCANCEL = theorem_wrap "EQ_MULT_LCANCEL" EQ_MULT_LCANCEL;;
-let LE_EXISTS = theorem_wrap "LE_EXISTS" LE_EXISTS;;
-let LE_ADD = theorem_wrap "LE_ADD" LE_ADD;;
-let LE_1 = theorem_wrap "LE_1" LE_1;;
-let LE_REFL = theorem_wrap "LE_REFL" LE_REFL;;
-let LT_SUC = theorem_wrap "LT_SUC" LT_SUC;;
-let LT_EXISTS = theorem_wrap "LT_EXISTS" LT_EXISTS;;
-let LT_NZ = theorem_wrap "LT_NZ" LT_NZ;;
-let EXP_EQ_0 = theorem_wrap "EXP_EQ_0" EXP_EQ_0;;
-let FACT = theorem_wrap "FACT" FACT;;
-let  = theorem_wrap "" ;;
-
-let REAL_ADD_LDISTRIB = theorem_wrap "REAL_ADD_LDISTRIB" REAL_ADD_LDISTRIB;;
-let REAL_OF_NUM_ADD = theorem_wrap "REAL_OF_NUM_ADD" REAL_OF_NUM_ADD;;
-let REAL_OF_NUM_EQ = theorem_wrap "REAL_OF_NUM_EQ" REAL_OF_NUM_EQ;;
-let REAL_OF_NUM_SUC = theorem_wrap "REAL_OF_NUM_SUC" REAL_OF_NUM_SUC;;
-let REAL_MUL_ASSOC = theorem_wrap "REAL_MUL_ASSOC" REAL_MUL_ASSOC;;
-let REAL_MUL_SYM = theorem_wrap "REAL_MUL_SYM" REAL_MUL_SYM;;
-let REAL_MUL_RID = theorem_wrap "REAL_MUL_RID" REAL_MUL_RID;;
-let REAL_MUL_RZERO = theorem_wrap "REAL_MUL_RZERO" REAL_MUL_RZERO;;
-let REAL_DIV_LMUL = theorem_wrap "REAL_DIV_LMUL" REAL_DIV_LMUL;;
-let REAL_POS = theorem_wrap "REAL_POS" REAL_POS;;
-let REAL_LE_TRANS = theorem_wrap "REAL_LE_TRANS" REAL_LE_TRANS;;
-let REAL_LE_MUL = theorem_wrap "REAL_LE_MUL" REAL_LE_MUL;;
-let REAL_LE_RMUL = theorem_wrap "REAL_LE_RMUL" REAL_LE_RMUL;;
-let REAL_LE_DIV = theorem_wrap "REAL_LE_DIV" REAL_LE_DIV;;
-let REAL_LE_SQUARE = theorem_wrap "REAL_LE_SQUARE" REAL_LE_SQUARE;;
-let REAL_LE_RDIV_EQ = theorem_wrap "REAL_LE_RDIV_EQ" REAL_LE_RDIV_EQ;;
-let real_pow = theorem_wrap "real_pow" real_pow;;
-let REAL_POW_2 = theorem_wrap "REAL_POW_2" REAL_POW_2;;
-let REAL_POW_ZERO = theorem_wrap "REAL_POW_ZERO" REAL_POW_ZERO;;
-let REAL_POW_ADD = theorem_wrap "REAL_POW_ADD" REAL_POW_ADD;;
-let REAL_POW_DIV = theorem_wrap "REAL_POW_DIV" REAL_POW_DIV;;
-let REAL_POW_LE = theorem_wrap "REAL_POW_LE" REAL_POW_LE;;
-let REAL_POW_LT = theorem_wrap "REAL_POW_LT" REAL_POW_LT;;
-let SUM_RMUL = theorem_wrap "SUM_RMUL" SUM_RMUL;;
-let SUM_ADD_SPLIT = theorem_wrap "SUM_ADD_SPLIT" SUM_ADD_SPLIT;;
-let SUM_POS_LE_NUMSEG = theorem_wrap "SUM_POS_LE_NUMSEG" SUM_POS_LE_NUMSEG;;
-let SUM_CLAUSES_NUMSEG = theorem_wrap "SUM_CLAUSES_NUMSEG" SUM_CLAUSES_NUMSEG;;
-let SUM_SING_NUMSEG = theorem_wrap "SUM_SING_NUMSEG" SUM_SING_NUMSEG;;
-let PRODUCT_CLAUSES_NUMSEG =
-   theorem_wrap "PRODUCT_CLAUSES_NUMSEG" PRODUCT_CLAUSES_NUMSEG;;
\ No newline at end of file
diff --git a/hol-light/TacticRecording/prooftree.ml 
b/hol-light/TacticRecording/prooftree.ml
deleted file mode 100644
index 877e738..0000000
--- a/hol-light/TacticRecording/prooftree.ml
+++ /dev/null
@@ -1,177 +0,0 @@
-(* ========================================================================= *)
-(* HOL Light subgoal package amended for Proof General's Prooftree.          *)
-(*                                                                           *)
-(*       Mark Adams, School of Informatics, University of Edinburgh          *)
-(*                                                                           *)
-(* (c) Copyright, University of Edinburgh, 2012                              *)
-(* ========================================================================= *)
-
-(* This file provides alternatives to HOL Light's subgoal package commands   *)
-(* that output additional annotations specifically for Prooftree.  These     *)
-(* annotations get intercepted by Proof General, which removes them from the *)
-(* output displayed to the Proof General user.  Annotation can be switched   *)
-(* off completely with the 'pg_mode_off' command.                            *)
-
-(* Note that this assumes the existence of xgoals (see 'xtactics.ml').       *)
-
-(* ------------------------------------------------------------------------- *)
-(* Proof General mode, for providing extra annotations for Prooftree.        *)
-(* ------------------------------------------------------------------------- *)
-
-let pg_mode = ref (false : bool);;
-
-let pg_mode_on () = (pg_mode := true);;
-let pg_mode_off () = (pg_mode := false);;
-
-let get_pg_mode () = !pg_mode;;
-
-(* ------------------------------------------------------------------------- *)
-(* The Prooftree global state is an ever increasing counter.                 *)
-(* ------------------------------------------------------------------------- *)
-
-let the_pt_global_state = ref 1;;
-
-let inc_pt_global_state () =
-  (the_pt_global_state := !the_pt_global_state + 1);;
-
-let pt_global_state () = !the_pt_global_state;;
-
-(* ------------------------------------------------------------------------- *)
-(* The Prooftree proof state is the length of the goal stack.                *)
-(* ------------------------------------------------------------------------- *)
-
-let pt_proof_state () = length !current_xgoalstack;;
-
-let pt_back_to_proof_state n : xgoalstack =
-  let pst = pt_proof_state () in
-  if (0 <= n) & (n <= pst)
-    then (current_xgoalstack :=
-               snd (chop_list (pst-n) !current_xgoalstack);
-          !current_xgoalstack)
-    else failwith "Not a valid Prooftree state number";;
-
-(* ------------------------------------------------------------------------- *)
-(* Subgoal package commands adjusted to update Prooftree global state.       *)
-(* ------------------------------------------------------------------------- *)
-
-let the_tactic_flag = ref false;;
-
-let xe tac =
-  let result = xe tac in
-  (inc_pt_global_state ();
-   the_tactic_flag := true;      (* So that special info gets displayed *)
-   result);;
-
-let xr n =
-  let result = xr n in
-  (inc_pt_global_state ();
-   result);;
-
-let xset_goal (asl,w) =
-  let result = xset_goal (asl,w) in
-  (inc_pt_global_state ();
-   result);;
-
-let xg t =
-  let fvs = sort (<) (map (fst o dest_var) (frees t)) in
-  (if fvs <> [] then
-     let errmsg = end_itlist (fun s t -> s^", "^t) fvs in
-     warn true ("Free variables in goal: "^errmsg)
-   else ());
-   xset_goal([],t);;
-
-let xb () =
-  let result = xb () in
-  (inc_pt_global_state ();
-   result);;
-
-(* ------------------------------------------------------------------------- *)
-(* Special Prooftree printers for xgoals and xgoalstacks.                    *)
-(* ------------------------------------------------------------------------- *)
-
-let the_new_goal_ids = ref ([] : goalid list);;
-
-let print_prooftree_xgoal ((g,id) : xgoal) : unit =
-  ((if (!pg_mode)
-      then (print_string ("[Goal ID " ^ string_of_goal_id id ^ "]");
-            print_newline ()));
-   print_goal g);;
-
-let (print_prooftree_xgoalstack:xgoalstack->unit) =
-  let print_prooftree_xgoalstate k gs =
-    let (_,gl,_) = gs in
-    let n = length gl in
-    let s = if n = 0 then "No subgoals" else
-              (string_of_int k)^" subgoal"^(if k > 1 then "s" else "")
-           ^" ("^(string_of_int n)^" total)" in
-    print_string s; print_newline();
-    if gl = [] then () else
-    (do_list (print_prooftree_xgoal o C el gl) (rev(1--(k-1)));
-     (if (!pg_mode) then print_string "[*]");
-     print_prooftree_xgoal (el 0 gl)) in
-  fun l ->
-   ((if (!pg_mode) & (!the_tactic_flag)
-       then let xs = map string_of_int (!the_new_goal_ids) in
-            (the_tactic_flag := false;
-             print_string  "[New Goal IDs: ";
-             print_string_seplist " " xs;
-             print_string "]";
-             print_newline ()));
-    (if l = [] then print_string "Empty goalstack"
-     else if tl l = [] then
-       let (_,gl,_ as gs) = hd l in
-       print_prooftree_xgoalstate 1 gs
-     else
-       let (_,gl,_ as gs) = hd l
-       and (_,gl0,_) = hd(tl l) in
-       let p = length gl - length gl0 in
-       let p' = if p < 1 then 1 else p + 1 in
-       print_prooftree_xgoalstate p' gs);
-    (if (!pg_mode) then
-     let (vs,theta) =
-        if (l = []) then ([],[])
-                    else let ((vs,(_,theta,_)),_,_) = hd l in
-                         (vs,theta) in
-     let foo v =
-        let (x,_) = dest_var v in
-        x ^ if (can (rev_assoc v) theta) then " using" else " open" in
-     let xs = map foo vs in
-     (print_newline();
-      print_string "(dependent evars: ";
-      print_string_seplist ", " xs;
-      print_string ")";
-      print_newline ())));;
-
-(* ------------------------------------------------------------------------- *)
-(* Adjust the OCaml prompt to carry information for Prooftree.               *)
-(* ------------------------------------------------------------------------- *)
-
-let original_prompt_fn = !Toploop.read_interactive_input in
-Toploop.read_interactive_input :=
-   fun prompt buffer len ->
-      let basic_prompt = "<" in        (* 'prompt' arg is ignored  *)
-      let prompt' =
-         if (!pg_mode)
-           then let pst = pt_proof_state () and gst = pt_global_state () in
-                "<prompt> " ^ basic_prompt ^ " " ^
-                string_of_int gst ^ " || " ^ string_of_int pst ^
-                " " ^ basic_prompt ^ " </prompt>"
-           else prompt in
-      original_prompt_fn prompt' buffer len;;
-
-(* ------------------------------------------------------------------------- *)
-(* Printing the goal of a given Prooftree goal id.                           *)
-(* ------------------------------------------------------------------------- *)
-
-let xgoal_of_id (id:goalid) : xgoal =
-  let gsts = !current_xgoalstack in
-  let find_goal (_,xgs,_) = find (fun (g,id0) -> id0 = id) xgs in
-  let xg = tryfind find_goal gsts in
-  xg;;
-
-(* ------------------------------------------------------------------------- *)
-(* Install the new goal-related printers.                                    *)
-(* ------------------------------------------------------------------------- *)
-
-#install_printer print_prooftree_xgoal;;
-#install_printer print_prooftree_xgoalstack;;
diff --git a/hol-light/TacticRecording/tacticrec.ml 
b/hol-light/TacticRecording/tacticrec.ml
deleted file mode 100644
index c65ee71..0000000
--- a/hol-light/TacticRecording/tacticrec.ml
+++ /dev/null
@@ -1,383 +0,0 @@
-(* ========================================================================== 
*)
-(* TACTIC RECORDING (HOL LIGHT)                                               
*)
-(* - Mechanism to record tactic proofs at the user level                      
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Univeristy of Edinburgh, 2011-2012                           
*)
-(* ========================================================================== 
*)
-
-
-(* This file implements a mechanism for recording tactic proofs at the level  
*)
-(* of interactive proof steps.  A recorded proof takes the form of a tree of  
*)
-(* goals, and is capable of capturing both complete and incomplete proofs, as 
*)
-(* well as hierarchy correspoding to tacticals.                               
*)
-
-(* The crucial mechanism by which goals in the subgoal package state are      
*)
-(* linked to parts of the stored goal tree is based on unique goal id         
*)
-(* numbers.  Each goal in the subgoal package state is annotated with such an 
*)
-(* id, and this is also stored at each level of the goal tree.  As a tactic   
*)
-(* is executed, the id from the goal in the subgoal package state that it     
*)
-(* executes on is used to locate the corresponding part of the goal tree, and 
*)
-(* the ids of the resulting subgoals are used to label the corresponding      
*)
-(* subparts of the goal tree.                                                 
*)
-
-
-open Dltree;;
-
-
-
-(* ** MODES ** *)
-
-
-(* Store goal sequent flag *)
-
-(* Intermediate goal results are only stored if this flag is set.  This can   
*)
-(* be used to cut down on memory usage.                                       
*)
-
-let store_goalsequent_flag = ref true;;
-
-
-
-(* ** GOAL TREE DATATYPES & STATE ** *)
-
-
-(* Goal tree datatype *)
-
-(* This is the datatype for recording tactic proofs as a tree of goals, with  
*)
-(* structure corresponding to interactive proof steps.  The structural aspect 
*)
-(* is captured by 'gtree0':                                                   
*)
-(*  Gactive   - Leaf for an active goal in the proof;                         
*)
-(*  Gexecuted - Node for a goal that has had a tactic successfully executed   
*)
-(*             on it.  Carries a list of subtrees, one for each of the        
*)
-(*             resulting subgoals, where the list is empty for a tactic that  
*)
-(*             completes its goal;                                            
*)
-(*  Gexit     - Wiring exiting a box, indicating destination goal.            
*)
-
-type ginfo =
-   (goalid * goalid)                 (* Goal id & Parent id *)
- * string option                     (* Goal name (optional) *)
- * goal option                       (* Goal sequent (optional) *)
- * unit option ref;;                 (* Formal proof (optional) *)
-
-type gstep =
-   Gatom of mldata                   (* Atomic tactic *)
- | Gbox of (label * gtree * bool)    (* Box for a tactical; flag for special *)
-
-and gtree0 =
-   Gactive                                                (* Active goal *)
- | Gexecuted of (gstep *       (* Tactic structure *)     (* Executed tactic *)
-                 gtree list)   (* Resulting subgoals *)
- | Gexit of goalid                                        (* Exit the box *)
-
-and gtree =
-   ginfo                             (* Various info about goal *)
- * gtree0 ref;;                      (* Goal plumbing *)
-
-
-(* Example *)
-
-(* Figure 1(b) in Denny et al would be represented by the following:          
*)
-(*                                                                            
*)
-(*  (_, ref                                                                   
*)
-(*   Gexecuted                                                                
*)
-(*     (Gbox (Tactical ("T1",[])                                              
*)
-(*        (_, ref                                                             
*)
-(*         Gexecuted                                                          
*)
-(*           (Gatom ("T2",[]),                                                
*)
-(*            [ (_, ref Gexecuted (Gatom ("WF",[]), []));                     
*)
-(*              (_, ref Gexit _) ])),                                         
*)
-(*      [ (_, ref                                                             
*)
-(*         Gexecuted                                                          
*)
-(*           (Gbox (Tactical ("DP",[]))                                       
*)
-(*              (_, ref                                                       
*)
-(*               Gexecuted                                                    
*)
-(*                 (Gatom ("Normalise",[]),                                   
*)
-(*                  [ (_, ref Gexecuted (Gatom ("Taut",[]), [])) ])),         
*)
-(*            [])) ]))                                                        
*)
-
-
-(* Destructors *)
-
-let ginfo_id (((id,_),_,_,_):ginfo) : goalid = id;;
-
-let ginfo_pid (((_,pid),_,_,_):ginfo) : goalid = pid;;
-
-let ginfo_name ((_,x_,_,_):ginfo) : string =
-  match x_ with
-    Some x -> x
-  | None   -> failwith "Goal not named";;
-
-let ginfo_sqt ((_,_,sqt_,_):ginfo) : goal =
-  match sqt_ with
-    Some sqt -> sqt
-  | None     -> failwith "Goal sequent not stored";;
-
-let ginfo_fproof ((_,_,_,prf_):ginfo) : unit =
-  match !prf_ with
-    Some prf -> prf
-  | None     -> failwith "Goal's formal proof not stored";;
-
-let gtree_id ((info,_):gtree) = ginfo_id info;;
-let gtree_pid ((info,_):gtree) = ginfo_pid info;;
-let gtree_name ((info,_):gtree) = ginfo_name info;;
-let gtree_sqt ((info,_):gtree) = ginfo_sqt info;;
-let gtree_fproof ((info,_):gtree) = ginfo_fproof info;;
-
-let gstep_tactic (gstp:gstep) =
-  match gstp with
-    Gatom obj | Gbox (Tactical obj, _, true) -> obj
-  | Gbox _ -> failwith "gstep_tactic: Not an atomic tactic";;
-
-let gtree_proof ((_,gtrm):gtree) =
-  match (!gtrm) with
-    Gexecuted (gstp,_) -> gstp
-  | _                  -> failwith "gtree_proof: Not executed";;
-
-let gtree_tactic gtr =
-  (gstep_tactic o gtree_proof) gtr;;
-
-let gtree_tactic1 ((_,gtrm) as gtr :gtree) =
-  match !gtrm with
-    Gactive -> active_info
-  | _       -> gtree_tactic gtr;;
-
-
-(* Tests *)
-
-let is_active_gtree ((_,gtrm):gtree) =
-  match !gtrm with
-    Gactive -> true
-  | _       -> false;;
-
-
-(* Dummy values *)
-
-let dummy_goal_info : ginfo = ((0,0), None, None, ref None);;
-
-let dummy_goal_tree : gtree = (dummy_goal_info, ref Gactive);;
-
-
-(* Goal tree database *)
-
-let the_goal_tree = ref dummy_goal_tree;;
-
-
-(* Location database *)
-
-(* This database is maintained in parallel with the goal tree, to enable fast 
*)
-(* location of the subtree corresponding to a goal (as opposed to laboriously 
*)
-(* traversing the tree to find the branch with the right id).                 
*)
-
-let the_gtree_locations = (dltree_empty () : (goalid, gtree ref) dltree);;
-
-let get_gtree id = !(dltree_lookup id the_gtree_locations);;
-
-let deregister_gtree gtr =
-  (dltree_remove (gtree_id gtr) the_gtree_locations);;
-
-let register_gtree gtr =
-  (dltree_insert (gtree_id gtr, ref gtr) the_gtree_locations);;
-
-
-(* Initialisation of the goal tree state *)
-
-let init_goal_tree g =
-  let g_ = if (!store_goalsequent_flag) then Some g else None in
-  let ginfo = ((!the_goal_id_counter,0), None, g_, ref None) in
-  let gtr = (ginfo, ref Gactive) in
-  (the_goal_tree := gtr;
-   dltree_reempty the_gtree_locations;
-   register_gtree gtr);;
-
-
-
-(* ** GTREE UTILITIES ** *)
-
-
-(* All children *)
-
-let rec gtree_all_children gtr =
-  let (_,gtrm) = gtr in
-  match (!gtrm) with
-    Gexecuted (gstp,gtrs)
-       -> (gstep_all_children gstp) @
-          gtrs @
-          flat (map gtree_all_children gtrs)
-  | _  -> []
-
-and gstep_all_children gstp =
-  match gstp with
-    Gatom _ | Gbox (_,_,true) -> []
-  | Gbox (_,gtr,false)        -> gtr::(gtree_all_children gtr);;
-
-
-
-(* ** PLUMBING ** *)
-
-(* These utilities do the plumbing for tactic applications and tactical       
*)
-(* applications, promoting operations from goals to xgoals and incorporating  
*)
-(* the results into gtrees.                                                   
*)
-
-
-(* Creating a sub gtree *)
-
-(* This creates a new xgoal for a goal, giving it a fresh id and registering  
*)
-(* it in the locations database.  Used on all new subgoals.                   
*)
-
-let new_active_subgtree pid (g:goal) : goalid * gtree =
-  let id = (inc_goal_id_counter (); !the_goal_id_counter) in
-  let g_ = if (!store_goalsequent_flag) then Some g else None in
-  let info = ((id,pid), None, g_, ref None) in
-  let gtr = (info, ref Gactive) in
-  (register_gtree gtr;
-   (id,gtr));;
-
-
-(* Extension *)
-
-(* This extends a gtree with the subgoals resulting from applying a tactic.   
*)
-
-let extend_gtree (pid:goalid) (gstp:gstep) (gs':goal list) : xgoal list =
-  let gtr = get_gtree pid in
-  let (_,gtrm) = gtr in
-  let () = try assert (!gtrm = Gactive)
-           with Assert_failure _ ->
-                   failwith "extend_gtree: Internal error - Not active" in
-  let (ids',gtrs) = unzip (map (new_active_subgtree pid) gs') in
-  let xgs' = zip gs' ids' in
-  (gtrm := Gexecuted (gstp,gtrs);
-   xgs');;
-
-
-(* Deletion *)
-
-(* This deletes from a gtree the result of applying a tactic to a given goal, 
*)
-(* also deleting the resulting subgoals from the locations database.          
*)
-
-let delete_step (id:goalid) =
-  let gtr = get_gtree id in
-  let (_,gtrm) = gtr in
-  let () = match (!gtrm) with
-             Gexecuted _ -> ()
-           | _ -> failwith "delete_step: Internal error - Not executed" in
-  let gtrs = gtree_all_children gtr in
-  (gtrm := Gactive;
-   do_list deregister_gtree gtrs);;
-
-
-(* Externalising *)
-
-(* This is used for turning a box's active subgoal to exit wiring.            
*)
-
-let externalise_gtree ((id0,id):goalid*goalid) : unit =
-  let (_,gtrm) = get_gtree id0 in
-  match (!gtrm) with
-    Gactive -> (gtrm := Gexit id)
-  | _ -> failwith "externalise_gtree: Internal error - Not active";;
-
-
-
-(* ** SUBGOAL PACKAGE OPERATIONS FOR XGOALS ** *)
-
-(* A few of the xtactic subgoal package commands are adjusted here.           
*)
-
-
-(* Starting/finishing a tactic proof *)
-
-(* For commands that start a tactic proof, 'mk_xgoalstate' is adjusted to     
*)
-(* initialise the goal tree.  Commands that return a tactic proof's resulting 
*)
-(* theorem, the theorem is adjusted to be an 'xthm' that carries a reference  
*)
-(* to the goal tree.                                                          
*)
-
-let mk_xgoalstate (g:goal) : xgoalstate =
-  let result = mk_xgoalstate g in
-  (init_goal_tree g;
-   result);;
-
-let (xTAC_PROOF : goal * xtactic -> thm) =
-  fun (g,tac) ->
-    let gstate = mk_xgoalstate g in
-    let _,sgs,just = xby tac gstate in
-    if sgs = [] then just null_inst []
-    else failwith "TAC_PROOF: Unsolved goals";;
-
-let xprove(t,tac) =
-  let th = xTAC_PROOF(([],t),tac) in
-  let t' = concl th in
-  let th' =
-    if t' = t then th else
-    try EQ_MP (ALPHA t' t) th
-    with Failure _ -> failwith "prove: justification generated wrong theorem" 
in
-  mk_xthm (th', ("<tactic-proof>",[]))
-
-let xset_goal(asl,w) =
-  current_xgoalstack :=
-    [mk_xgoalstate(map (fun t -> "",ASSUME t) asl,w)];
-  !current_xgoalstack;;
-
-let xg t =
-  let fvs = sort (<) (map (fst o dest_var) (frees t)) in
-  (if fvs <> [] then
-     let errmsg = end_itlist (fun s t -> s^", "^t) fvs in
-     warn true ("Free variables in goal: "^errmsg)
-   else ());
-   xset_goal([],t);;
-
-
-(* Undoing a tactic proof step *)
-
-(* 'xb' needs to be adjusted to delete the undone step in the goal tree.      
*)
-
-let xb () =
-  let result = xb () in
-  let (_,xgs,_) = hd result in
-  let (_,id) = hd xgs in
-  (delete_step id;
-   result);;
-
-
-
-(* ** GTREE OPERATIONS ** *)
-
-
-(* Goal id graph *)
-
-let rec gtree_graph0 gtr graph0 =
-  let (info,gtrm) = gtr in
-  let ((id,pid),_,g_,_) = info in
-  match !gtrm with
-    Gactive
-       -> (pid,id)::graph0
-  | Gexit id
-       -> failwith "???"
-  | Gexecuted (_,gtrs)
-       -> (pid,id)::(foldr gtree_graph0 gtrs graph0);;
-
-let gtree_graph () =
-  let nns = gtree_graph0 (!the_goal_tree) [] in
-  tl nns;;                (* remove (0,0) at head of dumped list *)
-
-
-(* Goal id trace *)
-
-let rec gtree_id_trace gtr =
-  let (_,gtrm) = gtr in
-  match !gtrm with
-    Gactive
-       -> [gtree_id gtr]
-  | Gexit id
-       -> let gtr1 = get_gtree id in
-          gtree_id_trace gtr1
-  | Gexecuted (gstp,gtrs1)
-       -> (match gstp with
-             Gatom _ | Gbox (_,_,true)
-                -> (gtree_id gtr) :: flat (map gtree_id_trace gtrs1)
-           | Gbox (_,gtr1,false)
-                -> gtree_id_trace gtr1);;
-
-
-(* Tactic trace *)
-
-let rec gtree_tactic_trace gtr =
-  map (gtree_tactic1 o get_gtree) (gtree_id_trace gtr);;
-
diff --git a/hol-light/TacticRecording/wrappers.ml 
b/hol-light/TacticRecording/wrappers.ml
deleted file mode 100644
index 115163d..0000000
--- a/hol-light/TacticRecording/wrappers.ml
+++ /dev/null
@@ -1,359 +0,0 @@
-(* ========================================================================== 
*)
-(* WRAPPER FUNCTIONS (HOL LIGHT)                                              
*)
-(* - Functions for promoting thm/goal-related ML objects for xthm/xgoal       
*)
-(*                                                                            
*)
-(* By Mark Adams                                                              
*)
-(* Copyright (c) Univeristy of Edinburgh, 2011-2012                           
*)
-(* ========================================================================== 
*)
-
-
-
-(* ** THEOREM-RELATED WRAPPER FUNCTIONS ** *)
-
-
-(* mldata_as_meta_arg *)
-
-let mldata_as_meta_arg (obj:mldata) =
-  match obj with
-    (x, ((_::_) as args))
-       -> Mlfn (x, front args)
-  | _  -> failwith "mldata_as_meta_arg: Unexpected empty rule arg list";;
-
-let mldata_as_meta2_arg (obj:mldata) =
-  match obj with
-    (x, ((_::_) as args))
-       -> Mlfn (x, (front o front) args)
-  | _  -> failwith "mldata_as_meta_arg: Unexpected empty rule arg list";;
-
-
-(* detect_rule_app *)
-
-(* Based on the assumption that the given meta function actually executes its 
*)
-(* rule argument at some point, this utility detects such an execution during 
*)
-(* the demotion of a given xrule argument to a rule.  The meta function's     
*)
-(* result is returned along with an 'farg' that captures the rule.            
*)
-
-let detect_rule_app (mfunc:('a->thm)->'b) (xr:'a->xthm) : 'c =
-  let temp = ref (Mlfn ("<rule>", []) : mlarg) in
-  let r arg = let xth = xr arg in
-              let (th,obj) = dest_xthm xth in
-              (temp := mldata_as_meta_arg obj;
-               th) in
-  let th = mfunc r in
-  (th,!temp);;
-
-let detect_metarule_app (mfunc:(('a->thm)->'b->thm)->'c)
-                        (xmr:('a->xthm)->'b->xthm) : 'd =
-  let temp = ref (Mlfn ("<meta-rule>",[]) : mlarg) in
-  let mr marg arg = let xmarg arg0 =
-                       let th = marg arg0 in
-                       let obj = ("<rule>", [Mlfn ("<arg>",[])]) in
-                       mk_xthm (th,obj) in
-                    let xth = xmr xmarg arg in
-                    let (th,obj) = dest_xthm xth in
-                    (temp := mldata_as_meta2_arg obj;
-                     th) in
-  let th = mfunc mr in
-  (th,!temp);;
-
-
-(* Theorem wrapper *)
-
-let theorem_wrap (x:string) (th:thm) : xthm =
-  (th, (x,[]));;
-
-
-(* Rule wrappers *)
-
-(* Lots of rule wrappers are required because there are many different type   
*)
-(* shapes for rules.                                                          
*)
-
-let rule_wrap0 obj (r:'a->thm) (arg:'a) : xthm =
-  let th' = r arg in
-  mk_xthm (th',obj);;
-
-let conv_wrap x (r:term->thm) (tm:term) : xthm =
-  rule_wrap0 (x, [Mlterm tm]) r tm;;
-
-let thm_conv_wrap x (r:thm->term->thm) (xth:xthm) tm : xthm =
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x, [Mlthm prf; Mlterm tm]) (r th) tm;;
-
-let thmlist_conv_wrap x (r:thm list->term->thm) xths (tm:term) : xthm =
-  let (ths,prfs) = unzip (map dest_xthm xths) in
-  rule_wrap0 (x, [Mllist (map (fun prf -> Mlthm prf) prfs); Mlterm tm])
-             (r ths) tm;;
-
-let rule_wrap x (r:thm->thm) (xth:xthm) : xthm =
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x, [Mlthm prf]) r th;;
-
-let drule_wrap x (r:thm->thm->thm) (xth1:xthm) (xth2:xthm) : xthm =
-  let (th1,prf1) = dest_xthm xth1 in
-  let (th2,prf2) = dest_xthm xth2 in
-  rule_wrap0 (x, [Mlthm prf1; Mlthm prf2]) (r th1) th2;;
-
-let prule_wrap x (r:thm*thm->thm) ((xth1:xthm),(xth2:xthm)) : xthm =
-  let (th1,prf1) = dest_xthm xth1 in
-  let (th2,prf2) = dest_xthm xth2 in
-  rule_wrap0 (x, [Mlpair(Mlthm prf1, Mlthm prf2)]) r (th1,th2);;
-
-let trule_wrap x (r:thm->thm->thm->thm)
-                 (xth1:xthm) (xth2:xthm) (xth3:xthm) : xthm =
-  let (th1,prf1) = dest_xthm xth1 in
-  let (th2,prf2) = dest_xthm xth2 in
-  let (th3,prf3) = dest_xthm xth3 in
-  rule_wrap0 (x, [Mlthm prf1; Mlthm prf2; Mlthm prf3]) (r th1 th2) th3;;
-
-let term_rule_wrap x (r:term->thm->thm) tm (xth:xthm) : xthm =
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x, [Mlterm tm; Mlthm prf]) (r tm) th;;
-
-let termpair_rule_wrap x (r:term*term->thm->thm) (tm1,tm2) (xth:xthm) : xthm =
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x, [Mlpair(Mlterm tm1,Mlterm tm2); Mlthm prf]) (r (tm1,tm2)) th;;
-
-let termthmpair_rule_wrap x (r:term*thm->thm->thm) (tm,xth0) (xth:xthm) : xthm 
=
-  let (th0,prf0) = dest_xthm xth0 in
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x, [Mlpair(Mlterm tm, Mlthm prf0); Mlthm prf]) (r (tm,th0)) th;;
-
-let termlist_rule_wrap x (r:term list->thm->thm) tms (xth:xthm) : xthm =
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x, [Mllist (map (fun tm -> Mlterm tm) tms); Mlthm prf])
-             (r tms) th;;
-
-let terminst_rule_wrap x (r:(term*term)list->thm->thm) theta (xth:xthm) : xthm 
=
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x,
-              [Mllist (map (fun (tm1,tm2) -> Mlpair(Mlterm tm1, Mlterm tm2))
-                           theta);
-               Mlthm prf])
-             (r theta) th;;
-
-let typeinst_rule_wrap x (r:(hol_type*hol_type)list->thm->thm)
-                         theta (xth:xthm) : xthm =
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x,
-              [Mllist (map (fun (tm1,tm2) -> Mlpair(Mltype tm1, Mltype tm2))
-                           theta);
-               Mlthm prf])
-             (r theta) th;;
-
-let thmlist_rule_wrap x (r:thm list->thm->thm) xths (xth:xthm) : xthm =
-  let (ths,prfs) = unzip (map dest_xthm xths) in
-  let (th,prf) = dest_xthm xth in
-  rule_wrap0 (x, [Mllist (map (fun prf -> Mlthm prf) prfs); Mlthm prf])
-             (r ths) th;;
-
-
-(* Multi-rule wrappers *)
-
-let multirule_wrap0 obj (r:'a->thm list) (arg:'a) : xthm list =
-  let ths' = r arg in
-  let n = length ths' in
-  let infos' = map (fun i -> ("el", [Mlint i; Mlfn obj])) (0 -- (n-1)) in
-  map mk_xthm (zip ths' infos');; 
-
-let multirule_wrap x (r:thm->thm list) (xth:xthm) : xthm list =
-  let (th,prf) = dest_xthm xth in
-  multirule_wrap0 (x, [Mlthm prf]) r th;;
-
-
-(* Meta rule wrappers *)
-
-let meta_rule_wrap0 info0 (mr:('a->thm)->'b->thm)
-                          (xr:'a->xthm) (arg:'b) : xthm =
-  let (th',f) = detect_rule_app (fun r -> mr r arg) xr in
-  let (x,args0) = info0 in
-  let obj' = (x, f::args0) in
-  (th',obj');;
-
-let conv_conv_wrap x (mc:conv->conv) (xc:term->xthm) (tm:term) : xthm =
-  meta_rule_wrap0 (x, [Mlterm tm]) mc xc tm;;
-
-
-
-(* ** TACTIC-RELATED WRAPPER FUNCTIONS ** *)
-
-(* These functions are for promoting existing tactics and tacticals.          
*)
-
-
-(* Generic basic wrapper util *)
-
-(* Applies a tactic and incorproates the results into the goal tree.  Takes   
*)
-(* an "infotactic", i.e. like a normal tactic that works on 'goal' and        
*)
-(* returns 'goalstate', but that also returns a 'gstep' summary of the        
*)
-(* operation.  This is used to promote every basic tactic-based function.     
*)
-
-let infotactic_wrap (infotac:goal->goalstate*mldata) (xg:xgoal) : xgoalstate =
-  let (g,id) = dest_xgoal xg in
-  let ((meta,gs,just),obj) = infotac g in
-  let xgs = extend_gtree id (Gatom obj) gs in
-  (meta,xgs,just);;
-
-
-(* Generic box wrapper util *)
-
-(* Sets up a box to apply an xtactic within, applies the xtactic (which       
*)
-(* incorporates itself into the goal tree) and wires up the resulting         
*)
-(* subgoals to external subgoals of the box.  Note that this is not quite     
*)
-(* generic enough for 'SUBGOAL_THEN' (because there is not a total surjection 
*)
-(* between internal and external goals).                                      
*)
-
-let infobox_wrap (xinfotac:xgoal->xgoalstate*label) (xg:xgoal) : xgoalstate =
-  let (g,id) = dest_xgoal xg in
-  let (id0,gtr0) = new_active_subgtree id g in
-  let xg0 = mk_xgoal (g,id0) in
-  let ((meta,xgs0,just),l) = xinfotac xg0 in
-  let (gs0,ids0) = unzip (map dest_xgoal xgs0) in
-  let xgs = extend_gtree id (Gbox (l,gtr0,false)) gs0 in
-  let ids = map xgoal_id xgs in
-  (do_list externalise_gtree (zip ids0 ids);
-   (meta,xgs,just));;
-
-
-(* Tactic wrapper *)
-
-(* This is for wrapping around a tactic, to promote it to work on xgoals and  
*)
-(* incorporate the results into an existing gtree.                            
*)
-
-let tactic_wrap0 obj (tac:tactic) : xtactic =
-  let infotac g = (tac g, obj) in
-  infotactic_wrap infotac;;
-
-let tactic_wrap x tac =
-  tactic_wrap0 (x, []) tac;;
-
-let string_tactic_wrap x (tac:string->tactic) (s:string) : xtactic =
-  tactic_wrap0 (x, [Mlstring s]) (tac s);;
-
-let term_tactic_wrap x (tac:term->tactic) (tm:term) : xtactic =
-  tactic_wrap0 (x, [Mlterm tm]) (tac tm);;
-
-let termpair_tactic_wrap x (tac:term*term->tactic) (tm1,tm2) : xtactic =
-  tactic_wrap0 (x, [Mlpair (Mlterm tm1, Mlterm tm2)]) (tac (tm1,tm2));;
-
-let termlist_tactic_wrap x (tac:term list->tactic) tms : xtactic =
-  tactic_wrap0 (x, [Mllist (map (fun tm -> Mlterm tm) tms)]) (tac tms);;
-
-let thm_tactic_wrap x (tac:thm->tactic) (xth:xthm) : xtactic =
-  let (th,prf) = dest_xthm xth in
-  tactic_wrap0 (x, [Mlthm prf]) (tac th);;
-
-let thmlist_tactic_wrap x (tac:thm list->tactic) (xths:xthm list) : xtactic =
-  let (ths,prfs) = unzip (map dest_xthm xths) in
-  tactic_wrap0 (x, [Mllist (map (fun prf -> Mlthm prf) prfs)]) (tac ths);;
-
-let stringthm_tactic_wrap x (tac:string->thm->tactic) s (xth:xthm) : xtactic =
-  let (th,prf) = dest_xthm xth in
-  tactic_wrap0 (x, [Mlstring s; Mlthm prf]) (tac s th);;
-
-
-(* Meta-tactic wrapper *)
-
-(* For tactics that take rule arguments.                                      
*)
-
-let meta_tactic_wrap0 info0 (mtac:('a->thm)->tactic)
-                            (xr:'a->xthm) : xtactic =
-  let infotac g =
-     let (gst,f) = detect_rule_app (fun r -> mtac r g) xr in
-     let (x,args0) = info0 in
-     let obj = (x, f::args0) in
-     (gst,obj) in
-  infotactic_wrap infotac;;
-
-let conv_tactic_wrap x (mtac:conv->tactic) (xc:xconv) : xtactic =
-  meta_tactic_wrap0 (x, []) mtac xc;;
-
-let metameta_tactic_wrap info0 (mmtac:(('a->thm)->'b->thm)->tactic)
-                               (xmr:('a->xthm)->'b->xthm) : xtactic =
-  let infotac g =
-     let (gst,f) = detect_metarule_app (fun mr -> mmtac mr g) xmr in
-     let (x,args0) = info0 in
-     let obj = (x, f::args0) in
-     (gst,obj) in
-  infotactic_wrap infotac;;
-
-let convconvthmlist_tactic_wrap x (mmtac:(conv->conv)->thm list->tactic)
-                                 (xmc:xconv->xconv) (xths:xthm list) : xtactic 
=
-  let (ths,prfs) = unzip (map dest_xthm xths) in
-  metameta_tactic_wrap (x, [Mllist (map (fun prf -> Mlthm prf) prfs)])
-                       (fun mc -> mmtac mc ths)
-                       xmc;;
-
-
-(* Tactical wrapper *)
-
-(* This is for wrapping around a tactical, to incorporate the results into a  
*)
-(* box in an existing gtree, where the execution of the tactical's tactics is 
*)
-(* captured inside the box, so that they can be stepped through and/or        
*)
-(* refactored.  Thus we cannot take the tactical as a black box; it must      
*)
-(* already be promoted to work with xtactics and xgoals.  This must done by   
*)
-(* hand for each tactical by trivially adjusting its original source code.    
*)
-
-let tactical_wrap0 obj (xttcl:'a->xtactic) (arg:'a) : xtactic =
-  let xinfotac xg = (xttcl arg xg, Tactical obj) in
-  infobox_wrap xinfotac;;
-
-let tactical_wrap x (xttcl:'a->xtactic) (xtac:'a) : xtactic =
-  tactical_wrap0 (x,[]) xttcl xtac;;
-
-let btactical_wrap x (xttcl:'a->'b->xtactic) (xtac1:'a) (xtac2:'b) : xtactic =
-  tactical_wrap0 (x,[]) (xttcl xtac1) xtac2;;
-
-let int_tactical_wrap x (xttcl:int->'a->xtactic) (n:int) (xtac:'a) : xtactic =
-  tactical_wrap0 (x, [Mlint n]) (xttcl n) xtac;;
-
-let list_tactical_wrap x (xttcl:('a->xtactic)->'a list->xtactic)
-                         (xtac:'a->xtactic) (l:'a list) : xtactic =
-  tactical_wrap0 (x,[]) (xttcl xtac) l;;
-
-
-(* HILABEL *)
-
-(* Command for putting the result of a tactic into a box and giving the box a 
*)
-(* label (distinct from a tactical label).                                    
*)
-
-let HILABEL x (xtac:xtactic) : xtactic =
-  let xinfotac xg = (xtac xg, Label x) in
-  infobox_wrap xinfotac;;
-
-
-(* xSUBGOAL_THEN - seems to be a special case *)
-
-let xASSUME = conv_wrap "ASSUME" ASSUME;;
-
-let xSUBGOAL_THEN (tm:term) (ttac:xthm_tactic) (xg:xgoal) : xgoalstate =
-  let arg = xASSUME tm in
-
-  let (g,id) = dest_xgoal xg in
-  let (id0,gtr0) = new_active_subgtree id g in
-  let xg0 = mk_xgoal (g,id0) in
-  let (meta,xgs0,just) = ttac arg xg0 in
-
-  let (asl,_) = g in
-  let g2 = (asl,tm) in
-  let obj = ("SUBGOAL_THEN",
-               [Mlterm tm; (mldata_as_meta_arg o gtree_tactic) gtr0]) in
-
-  let (gs0,ids0) = unzip (map dest_xgoal xgs0) in
-  let xgs = extend_gtree id (Gbox (Tactical obj, gtr0, true)) (g2::gs0) in
-  let ids1 = map xgoal_id (tl xgs) in
-  let just' = fun i l -> PROVE_HYP (hd l) (just i (tl l)) in
-  (do_list externalise_gtree (zip ids0 ids1);
-   (meta,xgs,just'));;
-
-
-(*
-let SUBGOAL_TAC s tm prfs =
-  match prfs with
-   p::ps -> (warn (ps <> []) "SUBGOAL_TAC: additional subproofs ignored";
-             SUBGOAL_THEN tm (LABEL_TAC s) THENL [p; ALL_TAC])
-  | [] -> failwith "SUBGOAL_TAC: no subproof given";;
-
-let (FREEZE_THEN :thm_tactical) =
-  fun ttac th (asl,w) ->
-    let meta,gl,just = ttac (ASSUME(concl th)) (asl,w) in
-    meta,gl,fun i l -> PROVE_HYP th (just i l);;
-*)
diff --git a/hol-light/TacticRecording/xtactics.ml 
b/hol-light/TacticRecording/xtactics.ml
deleted file mode 100644
index fb7028c..0000000
--- a/hol-light/TacticRecording/xtactics.ml
+++ /dev/null
@@ -1,451 +0,0 @@
-(* ========================================================================= *)
-(* HOL Light subgoal package amended for id-carrying goals.                  *)
-(*                                                                           *)
-(*       Mark Adams, School of Informatics, University of Edinburgh          *)
-(*                                                                           *)
-(* (c) Copyright, University of Edinburgh, 2012                              *)
-(* ========================================================================= *)
-
-(* The 'xgoal' variant of the 'goal' datatype is defined here, to label      *)
-(* goals with a unique goal id.  This gives a basis for recording tactic     *)
-(* proofs.  Variants of all the datatypes depending on 'goal', such as       *)
-(* 'xgoalstate' and 'xtactic', are also defined, along with a variant        *)
-(* subgoal package.  ML names are given an "x" prefix to keep them distinct  *)
-(* from the originals for now (but originals are overwritten later, in       *)
-(* 'install.ml').                                                            *)
-
-(* The goal id counter is only adjusted in this file by being incremented in *)
-(* 'mk_xgoalstate', used when starting a new subgoal package proof.          *)
-(* Xtactics are assumed to give their resulting xgoals id labels based on an *)
-(* appropriately updated goal id counter.                                    *)
-
-(* After the implementation of xgoals themselves at the start of this file,  *)
-(* the rest of the file is more-or-less copied verbatim from HOL Light's     *)
-(* original 'tactics.ml', with just a few changes required.  This enables an *)
-(* easy diff operation with the original if required to check that the       *)
-(* changes are valid.                                                        *)
-
-(* ------------------------------------------------------------------------- *)
-(* Goal counter for providing goal ids.                                      *)
-(* ------------------------------------------------------------------------- *)
-
-type goalid = int;;
-
-let string_of_goal_id (id:goalid) = string_of_int id;;
-
-let the_goal_id_counter = ref (0 : goalid);;
-
-let inc_goal_id_counter () =
-  (the_goal_id_counter := !the_goal_id_counter + 1);;
-
-(* ------------------------------------------------------------------------- *)
-(* An xgoal extends a goal with an identity.                                 *)
-(* ------------------------------------------------------------------------- *)
-
-type xgoal = goal * goalid;;
-
-let equals_xgoal (((a,w),_):xgoal) (((a',w'),_):xgoal) =
-  forall2 (fun (s,th) (s',th') -> s = s' & equals_thm th th') a a' & w = w';;
-
-let mk_xgoal (gn:goal*goalid) : xgoal = gn;;
-
-let dest_xgoal (gn:xgoal) : goal*goalid = gn;;
-
-let xgoal_goal ((g,id):xgoal) : goal  = g;;
-
-let xgoal_id ((g,id):xgoal) : goalid  = id;;
-
-(* ------------------------------------------------------------------------- *)
-(* The xgoalstate is like goalstate but for xgoals instead of goals.         *)
-(* ------------------------------------------------------------------------- *)
-
-type xgoalstate = (term list * instantiation) * xgoal list * justification;;
-
-(* ------------------------------------------------------------------------- *)
-(* A goalstack but for xgoals.                                               *)
-(* ------------------------------------------------------------------------- *)
-
-type xgoalstack = xgoalstate list;;
-
-(* ------------------------------------------------------------------------- *)
-(* Refinements for xgoals.                                                   *)
-(* ------------------------------------------------------------------------- *)
-
-type xrefinement = xgoalstate -> xgoalstate;;
-
-(* ------------------------------------------------------------------------- *)
-(* Tactics for xgoals.                                                       *)
-(* ------------------------------------------------------------------------- *)
-
-type xtactic = xgoal -> xgoalstate;;
-
-type xthm_tactic = xthm -> xtactic;;
-
-type xthm_tactical = xthm_tactic -> xthm_tactic;;
-
-(* ------------------------------------------------------------------------- *)
-(* Instantiation of xgoals.                                                  *)
-(* ------------------------------------------------------------------------- *)
-
-let (inst_xgoal:instantiation->xgoal->xgoal) =
-  fun p ((thms,w),id) ->
-    (map (I F_F INSTANTIATE_ALL p) thms,instantiate p w),id;;
-
-(* ------------------------------------------------------------------------- *)
-(* Validity check for xtactics.                                              *)
-(* ------------------------------------------------------------------------- *)
-
-let (xVALID:xtactic->xtactic) =
-  let fake_thm ((asl,w),id) =
-    let asms = itlist (union o hyp o snd) asl [] in
-    mk_fthm(asms,w)
-  and false_tm = `_FALSITY_` in
-  fun tac ((asl,w),id) ->
-    let ((mvs,i),gls,just as res) = tac ((asl,w),id) in
-    let ths = map fake_thm gls in
-    let asl',w' = dest_thm(just null_inst ths) in
-    let asl'',w'' = inst_goal i (asl,w) in
-    let maxasms =
-      itlist (fun (_,th) -> union (insert (concl th) (hyp th))) asl'' [] in
-    if aconv w' w'' & forall (C mem maxasms) (subtract asl' [false_tm])
-    then res else failwith "VALID: Invalid tactic";;
-
-(* ------------------------------------------------------------------------- *)
-(* Various simple combinators for tactics, identity tactic etc.              *)
-(* ------------------------------------------------------------------------- *)
-
-let (xTHEN),(xTHENL) =
-  let propagate_empty i [] = []
-  and propagate_thm th i [] = INSTANTIATE_ALL i th in
-  let compose_justs n just1 just2 i ths =
-    let ths1,ths2 = chop_list n ths in
-    (just1 i ths1)::(just2 i ths2) in
-  let rec seqapply l1 l2 = match (l1,l2) with
-     ([],[]) -> null_meta,[],propagate_empty
-   | ((tac:xtactic)::tacs),((goal:xgoal)::goals) ->
-            let ((mvs1,insts1),gls1,just1 as gstate1) = tac goal in
-            let goals' = map (inst_xgoal insts1) goals in
-            let ((mvs2,insts2),gls2,just2 as gstate2) = seqapply tacs goals' in
-            ((union mvs1 mvs2,compose_insts insts1 insts2),
-             gls1@gls2,compose_justs (length gls1) just1 just2)
-   | _,_ -> failwith "seqapply: Length mismatch" in
-  let justsequence just1 just2 insts2 i ths =
-    just1 (compose_insts insts2 i) (just2 i ths) in
-  let tacsequence ((mvs1,insts1),gls1,just1 as gstate1) tacl =
-    let ((mvs2,insts2),gls2,just2 as gstate2) = seqapply tacl gls1 in
-    let jst = justsequence just1 just2 insts2 in
-    let just = if gls2 = [] then propagate_thm (jst null_inst []) else jst in
-    ((union mvs1 mvs2,compose_insts insts1 insts2),gls2,just) in
-  let (then_: xtactic -> xtactic -> xtactic) =
-    fun tac1 tac2 g ->
-      let _,gls,_ as gstate = tac1 g in
-      tacsequence gstate (replicate tac2 (length gls))
-  and (thenl_: xtactic -> xtactic list -> xtactic) =
-    fun tac1 tac2l g ->
-      let _,gls,_ as gstate = tac1 g in
-      if gls = [] then tacsequence gstate []
-      else tacsequence gstate tac2l in
-  then_,thenl_;;
-
-let ((xORELSE): xtactic -> xtactic -> xtactic) =
-  fun tac1 tac2 g ->
-    try tac1 g with Failure _ -> tac2 g;;
-
-let (xFAIL_TAC: string -> xtactic) =
-  fun tok g -> failwith tok;;
-
-let (xALL_TAC:xtactic) =
-  fun g -> null_meta,[g],fun _ [th] -> th;;
-
-let xTRY tac =
-  xORELSE tac xALL_TAC;;
-
-let rec xREPEAT tac g =
-  (xORELSE (xTHEN tac (xREPEAT tac)) xALL_TAC) g;;
-
-let xEVERY tacl =
-  itlist (fun t1 t2 -> xTHEN t1 t2) tacl xALL_TAC;;
-
-let (xFIRST: xtactic list -> xtactic) =
-  fun tacl g -> end_itlist (fun t1 t2 -> xORELSE t1 t2) tacl g;;
-
-let xMAP_EVERY tacf lst =
-  xEVERY (map tacf lst);;
-
-let xMAP_FIRST tacf lst =
-  xFIRST (map tacf lst);;
-
-let (xCHANGED_TAC: xtactic -> xtactic) =
-  fun tac g ->
-    let (meta,gl,_ as gstate) = tac g in
-    if meta = null_meta & length gl = 1 & equals_xgoal (hd gl) g
-    then failwith "CHANGED_TAC" else gstate;;
-
-let rec xREPLICATE_TAC n tac =
-  if n <= 0 then xALL_TAC else xTHEN tac (xREPLICATE_TAC (n - 1) tac);;
-
-(* ------------------------------------------------------------------------- *)
-(* Combinators for theorem continuations adjusted for xthms and xtactics.    *)
-(* ------------------------------------------------------------------------- *)
-
-let ((xTHEN_TCL): xthm_tactical -> xthm_tactical -> xthm_tactical) =
-  fun ttcl1 ttcl2 ttac -> ttcl1 (ttcl2 ttac);;
-
-let ((xORELSE_TCL): xthm_tactical -> xthm_tactical -> xthm_tactical) =
-  fun ttcl1 ttcl2 ttac th ->
-    try ttcl1 ttac th with Failure _ -> ttcl2 ttac th;;
-
-let rec xREPEAT_TCL ttcl ttac th =
-  (xORELSE_TCL (xTHEN_TCL ttcl (xREPEAT_TCL ttcl)) I) ttac th;;
-
-let (xREPEAT_GTCL: xthm_tactical -> xthm_tactical) =
-  let rec xREPEAT_GTCL ttcl ttac th g =
-    try ttcl (xREPEAT_GTCL ttcl ttac) th g with Failure _ -> ttac th g in
-  xREPEAT_GTCL;;
-
-let (xALL_THEN: xthm_tactical) =
-  I;;
-
-let (xNO_THEN: xthm_tactical) =
-  fun ttac th -> failwith "NO_THEN";;
-
-let xEVERY_TCL ttcll =
-  itlist (fun t1 t2 -> xTHEN_TCL t1 t2) ttcll xALL_THEN;;
-
-let xFIRST_TCL ttcll =
-  end_itlist (fun t1 t2 -> xORELSE_TCL t1 t2) ttcll;;
-
-(* ------------------------------------------------------------------------- *)
-(* Tactics to augment assumption list. Note that to allow "ASSUME p" for     *)
-(* any assumption "p", these add a PROVE_HYP in the justification function,  *)
-(* just in case.                                                             *)
-(* ------------------------------------------------------------------------- *)
-
-let (xLABEL_TAC: string -> xthm_tactic) =
-  fun s thm ((asl,w),id) ->
-    let thm' = xthm_thm thm in
-    null_meta,[(((s,thm')::asl,w),id)],
-    fun i [th] -> PROVE_HYP (INSTANTIATE_ALL i thm') th;;
-
-(* ------------------------------------------------------------------------- *)
-(* Manipulation of assumption list.                                          *)
-(* ------------------------------------------------------------------------- *)
-
-let mk_asm_xthm th = mk_xthm0 "<asm>" th;;
-
-let (xFIND_ASSUM: xthm_tactic -> term -> xtactic) =
-  fun ttac t (((asl,w),id) as g) ->
-    ttac (mk_asm_xthm (snd(find (fun (_,th) -> concl th = t) asl))) g;;
-
-let (xPOP_ASSUM: xthm_tactic -> xtactic) =
-  fun ttac ->
-   function ((((_,th)::asl),w),id) -> ttac (mk_asm_xthm th) ((asl,w),id)
-    | _ -> failwith "POP_ASSUM: No assumption to pop";;
-
-let (xASSUM_LIST: (xthm list -> xtactic) -> xtactic) =
-    fun aslfun ((asl,w),id) -> aslfun (map (mk_asm_xthm o snd) asl)
-               ((asl,w),id);;
-
-let (xPOP_ASSUM_LIST: (xthm list -> xtactic) -> xtactic) =
-  fun asltac ((asl,w),id) -> asltac (map (mk_asm_xthm o snd) asl) (([],w),id);;
-
-let (xEVERY_ASSUM: xthm_tactic -> xtactic) =
-  fun ttac -> xASSUM_LIST (xMAP_EVERY ttac);;
-
-let (xFIRST_ASSUM: xthm_tactic -> xtactic) =
-  fun ttac (((asl,w),id) as g) ->
-                    tryfind (fun (_,th) -> ttac (mk_asm_xthm th) g) asl;;
-
-let (xRULE_ASSUM_TAC :(xthm->xthm)->xtactic) =
-  fun rule ((asl,w),id) ->
-              (xTHEN (xPOP_ASSUM_LIST(K xALL_TAC))
-                     (xMAP_EVERY
-                        (fun (s,th) -> xLABEL_TAC s (rule (mk_asm_xthm th)))
-                        (rev asl)))
-              ((asl,w),id);;
-
-(* ------------------------------------------------------------------------- *)
-(* Operate on assumption identified by a label.                              *)
-(* ------------------------------------------------------------------------- *)
-
-let (xUSE_THEN:string->xthm_tactic->xtactic) =
-  fun s ttac (((asl,w),id) as gl) ->
-    let th = try assoc s asl with Failure _ ->
-             failwith("USE_TAC: didn't find assumption "^s) in
-    ttac (mk_asm_xthm th) gl;;
-
-let (xREMOVE_THEN:string->xthm_tactic->xtactic) =
-  fun s ttac ((asl,w),id) ->
-    let th = try assoc s asl with Failure _ ->
-             failwith("USE_TAC: didn't find assumption "^s) in
-    let asl1,asl2 = chop_list(index s (map fst asl)) asl in
-    let asl' = asl1 @ tl asl2 in
-    ttac (mk_asm_xthm th) ((asl',w),id);;
-
-(* ------------------------------------------------------------------------- *)
-(* General tool to augment a required set of theorems with assumptions.      *)
-(* ------------------------------------------------------------------------- *)
-
-let (xASM :(xthm list -> xtactic)->(xthm list -> xtactic)) =
-  fun tltac ths
-         (((asl,w),id) as g) -> tltac (map (mk_asm_xthm o snd) asl @ ths) g;;
-
-(* ------------------------------------------------------------------------- *)
-(* A printer for xgoals etc.                                                 *)
-(* ------------------------------------------------------------------------- *)
-
-let print_xgoal ((g,x):xgoal) : unit =
-  print_goal g;;
-
-let (print_xgoalstack:xgoalstack->unit) =
-  let print_xgoalstate k gs =
-    let (_,gl,_) = gs in
-    let n = length gl in
-    let s = if n = 0 then "No subgoals" else
-              (string_of_int k)^" subgoal"^(if k > 1 then "s" else "")
-           ^" ("^(string_of_int n)^" total)" in
-    print_string s; print_newline();
-    if gl = [] then () else
-    do_list (print_xgoal o C el gl) (rev(0--(k-1))) in
-  fun l ->
-    if l = [] then print_string "Empty goalstack"
-    else if tl l = [] then
-      let (_,gl,_ as gs) = hd l in
-      print_xgoalstate 1 gs
-    else
-      let (_,gl,_ as gs) = hd l
-      and (_,gl0,_) = hd(tl l) in
-      let p = length gl - length gl0 in
-      let p' = if p < 1 then 1 else p + 1 in
-      print_xgoalstate p' gs;;
-
-(* ------------------------------------------------------------------------- *)
-(* Convert an xtactic into an xrefinement.                                   *)
-(* ------------------------------------------------------------------------- *)
-
-let (xby:xtactic->xrefinement) =
-  fun tac ((mvs,inst),gls,just) ->
-    let g = hd gls
-    and ogls = tl gls in
-    let ((newmvs,newinst),subgls,subjust) = tac g in
-    let n = length subgls in
-    let mvs' = union newmvs mvs
-    and inst' = compose_insts inst newinst
-    and gls' = subgls @ map (inst_xgoal newinst) ogls in
-    let just' i ths =
-      let i' = compose_insts inst' i in
-      let cths,oths = chop_list n ths in
-      let sths = (subjust i cths) :: oths in
-      just i' sths in
-    (mvs',inst'),gls',just';;
-
-(* ------------------------------------------------------------------------- *)
-(* Rotate for xgoalstate.                                                    *)
-(* ------------------------------------------------------------------------- *)
-
-let (xrotate:int->xrefinement) =
-  let rotate_p (meta,sgs,just) =
-    let sgs' = (tl sgs)@[hd sgs] in
-    let just' i ths =
-      let ths' = (last ths)::(butlast ths) in
-      just i ths' in
-    (meta,sgs',just')
-  and rotate_n (meta,sgs,just) =
-    let sgs' = (last sgs)::(butlast sgs) in
-    let just' i ths =
-      let ths' = (tl ths)@[hd ths] in
-      just i ths' in
-    (meta,sgs',just') in
-  fun n -> if n > 0 then funpow n rotate_p
-           else funpow (-n) rotate_n;;
-
-(* ------------------------------------------------------------------------- *)
-(* Refinement proof, tactic proof etc for xgoals/xtactics.                   *)
-(* ------------------------------------------------------------------------- *)
-
-let (mk_xgoalstate:goal->xgoalstate) =
-  fun (asl,w) ->
-    if type_of w = bool_ty then
-      let id = (inc_goal_id_counter (); !the_goal_id_counter) in
-      null_meta,[((asl,w),id)],
-      (fun inst [th] -> INSTANTIATE_ALL inst th)
-    else failwith "mk_goalstate: Non-boolean goal";;
-
-let (xTAC_PROOF : goal * xtactic -> thm) =
-  fun (g,tac) ->
-    let gstate = mk_xgoalstate g in
-    let _,sgs,just = xby tac gstate in
-    if sgs = [] then just null_inst []
-    else failwith "TAC_PROOF: Unsolved goals";;
-
-let xprove(t,tac) =
-  let th = xTAC_PROOF(([],t),tac) in
-  let t' = concl th in
-  let th' =
-    if t' = t then th else
-    try EQ_MP (ALPHA t' t) th
-    with Failure _ -> failwith "prove: justification generated wrong theorem" 
in
-  mk_xthm (th', ("<tactic-proof>",[]))
-
-(* ------------------------------------------------------------------------- *)
-(* Subgoal package for xgoals.                                               *)
-(* ------------------------------------------------------------------------- *)
-
-let current_xgoalstack = ref ([] :xgoalstack);;
-
-let (xrefine:xrefinement->xgoalstack) =
-  fun r ->
-    let l = !current_xgoalstack in
-    let h = hd l in
-    let res = r h :: l in
-    current_xgoalstack := res;
-    !current_xgoalstack;;
-
-let flush_xgoalstack() =
-  let l = !current_xgoalstack in
-  current_xgoalstack := [hd l];;
-
-let xe tac = xrefine(xby(xVALID tac));;
-
-let xr n = xrefine(xrotate n);;
-
-let xset_goal(asl,w) =
-  current_xgoalstack :=
-    [mk_xgoalstate(map (fun t -> "",ASSUME t) asl,w)];
-  !current_xgoalstack;;
-
-let xg t =
-  let fvs = sort (<) (map (fst o dest_var) (frees t)) in
-  (if fvs <> [] then
-     let errmsg = end_itlist (fun s t -> s^", "^t) fvs in
-     warn true ("Free variables in goal: "^errmsg)
-   else ());
-   xset_goal([],t);;
-
-let xb() =
-  let l = !current_xgoalstack in
-  if length l = 1 then failwith "Can't back up any more" else
-  current_xgoalstack := tl l;
-  !current_xgoalstack;;
-
-let xp() =
-  !current_xgoalstack;;
-
-let xtop_realgoal() =
-  let (_,(((asl,w),_)::_),_)::_ = !current_xgoalstack in
-  asl,w;;
-
-let xtop_goal() =
-  let asl,w = xtop_realgoal() in
-  map (concl o snd) asl,w;;
-
-let xtop_thm() =
-  let (_,[],f)::_ = !current_xgoalstack in
-  mk_xthm (f null_inst [], ("<tactic-proof>",[]));;
-
-(* ------------------------------------------------------------------------- *)
-(* Install the goal-related printers.                                        *)
-(* ------------------------------------------------------------------------- *)
-
-#install_printer print_xgoal;;
-#install_printer print_xgoalstack;;
diff --git a/hol-light/TacticRecording/xthm.ml 
b/hol-light/TacticRecording/xthm.ml
deleted file mode 100644
index 97fcec5..0000000
--- a/hol-light/TacticRecording/xthm.ml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-(* ** DATATYPE ** *)
-
-
-(* The 'xthm' datatype *)
-
-(* This couples a theorem with an 'mldata' representation of its proof.  For  
*)
-(* named ML objects, this 'mldata' will simply be the ML name of the theorem. 
*)
-(* For rule applications, it will capture the rule and its arguments.         
*)
-
-type xthm = thm * mldata;;
-
-type xconv = term -> xthm;;
-
-
-(* Constructors and destructors *)
-
-let mk_xthm (xth:thm*mldata) : xthm = xth;;
-
-let mk_xthm0 x th = mk_xthm (th, (x,[]));;
-
-let dest_xthm ((th,prf):xthm) : thm * mldata = (th,prf);;
-
-let xthm_thm ((th,_):xthm) = th;;
-
-let xthm_proof ((_,prf):xthm) = prf;;
-
-let name_xthm x ((th,_):xthm) : xthm = (th, (x,[]));;
-
-
-
-(* ** INSTALL PRINTERS ** *)
-
-
-let print_xthm ((th,_):xthm) = print_thm th;;
-
-#install_printer print_xthm;;
-
diff --git a/hol-light/example.ml b/hol-light/example.ml
deleted file mode 100644
index 7010fbc..0000000
--- a/hol-light/example.ml
+++ /dev/null
@@ -1,19 +0,0 @@
-(*
-    Example proof script for HOL Proof General.
-
-    $Id$
-*)    
-
-g `A /\ B ==> B /\ A`;;
-e DISCH_TAC;;
-e CONJ_TAC;;
-e (ASM_SIMP_TAC[]);;
-e (ASM_SIMP_TAC[]);;
-let and_comms = top_thm();;
-
-g `A /\ B ==> B /\ A`;;
-e DISCH_TAC;;
-e CONJ_TAC;;
-e (ASM_SIMP_TAC[]);;
-e (ASM_SIMP_TAC[]);;
-let and_comms2 = top_thm();;
diff --git a/hol-light/hol-light-autotest.el b/hol-light/hol-light-autotest.el
deleted file mode 100644
index dab2c4c..0000000
--- a/hol-light/hol-light-autotest.el
+++ /dev/null
@@ -1,42 +0,0 @@
-;;; hol-light-autotest.el --- tests of HOL Light Proof General.
-
-;; This file is part of Proof General.
-
-;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014, 2018  Free Software Foundation, Inc.
-;; Portions © Copyright 2001-2017  Pierre Courtieu
-;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
-;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
-;; Portions © Copyright 2015-2017  Clément Pit-Claudel
-
-;;; Commentary:
-;;
-;; You can run these by issuing "make test.hol-light" in PG home dir.
-;;
-
-;;; Code:
-
-(require 'proof-site)
-(proof-ready-for-assistant 'hol-light)
-
-(require 'pg-autotest)
-
-(unless (bound-and-true-p byte-compile-current-file)
-  
-  (pg-autotest start 'debug)
-  (pg-autotest log ".autotest.log")  ; convention
-
-  (pg-autotest timestart 'total)
-
-  (pg-autotest remark "Testing standard examples...")
-
-  (pg-autotest script-wholefile "hol-light/example.ml")
-
-  (proof-shell-wait)
-
-
-  (pg-autotest remark "Complete.")
-
-  (pg-autotest timetaken 'total)
-
-  (pg-autotest exit))
diff --git a/hol-light/hol-light-unicode-tokens.el 
b/hol-light/hol-light-unicode-tokens.el
deleted file mode 100644
index 7e24e4b..0000000
--- a/hol-light/hol-light-unicode-tokens.el
+++ /dev/null
@@ -1,252 +0,0 @@
-;;; coq-unicode-tokens.el --- (No) Tokens for Unicode Tokens package -*- 
coding: utf-8; -*-
-
-;; This file is part of Proof General.
-
-;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014  Free Software Foundation, Inc.
-;; Portions © Copyright 2001-2017  Pierre Courtieu
-;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
-;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
-;; Portions © Copyright 2015-2017  Clément Pit-Claudel
-
-;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
-
-;;; Commentary:
-;;
-;; This file is loaded by `proof-unicode-tokens.el'.
-;;
-;; It sets the variables defined at the top of unicode-tokens.el,
-;; unicode-tokens-<foo> is set from hol-light-<foo>.  See the corresponding
-;; variable for documentation.
-;;
-;; For HOL Light, there is no dedicated token syntax, we simply
-;; define replacements for common ASCII sequences.
-;; 
-;; FIXME TODO: 
-;;  - only do it for quoted text
-;;  - fix unicode tokens sorting so longs tokens handled first (broken?)
-;;      <=> not <= >
-
-;;; Code:
-
-(require 'proof-unicode-tokens)
-
-(defconst hol-light-token-format "%s") ; plain tokens
-(defconst hol-light-token-match nil)
-(defconst hol-light-hexcode-match nil)
-
-(defun hol-light-unicode-tokens-set (sym val)
-  "Change a Unicode Tokens configuration variable and restart."
-  (set-default sym val)
-  (when (featurep 'hol-light-unicode-tokens) ; not during loading
-    (proof-unicode-tokens-configure)))
-
-(defcustom hol-light-token-symbol-map
-  '(;; Greek letters
-    ("alpha" "α")
-    ("beta" "β")
-    ("gamma" "γ")
-    ("delta" "δ")
-    ("epsilon" "ε")
-    ("zeta" "ζ")
-    ("eta" "η")
-    ("theta" "θ")
-    ("iota" "ι")
-    ("kappa" "κ")
-    ("lambda" "λ")
-    ("mu" "μ")
-    ("nu" "ν")
-    ("xi" "ξ")
-    ("pi" "π")
-    ("rho" "ρ")
-    ("sigma" "σ")
-    ("tau" "τ")
-    ("upsilon" "υ")
-    ("phi" "ϕ")
-    ("chi" "χ")
-    ("psi" "ψ")
-    ("omega" "ω")
-    ("Gamma" "Γ")
-    ("Delta" "Δ")
-    ("Theta" "Θ")
-    ("Lambda" "Λ")
-    ("Xi" "Ξ")
-    ("Pi" "Π")
-    ("Sigma" "Σ")
-    ("Upsilon" "Υ")
-    ("Phi" "Φ")
-    ("Psi" "Ψ")
-    ("Omega" "Ω")
-    ;; logic
-    ("forall" "∀")
-    ("exists" "∃")
-    ("num" "ℕ" type) ;; ?
-    ("complex" "ℂ" type)
-    ("real" "ℝ" type)
-    ("int" "ℤ" type)
-    ("rat" "ℚ" type)
-    ("bool" "B" underline type)
-    ("false" "false" bold sans)
-    ("true" "true" bold sans)
-
-    ("lhd" "⊲")
-    ("rhd" "⊳")
-    ("<=" "≤")
-    (">=" "≥")
-    ("=>" "⇒")
-    ("->" "→")  ; or ⟶ or ⟹ if you prefer
-    ("<-" "←")  ; or ⟵ or ⟸ 
-    ("<->" "↔") ; or ⟷ ...
-    ("++" "⧺")
-    ("<<" "《")
-    (">>" "》")
-
-    ;; Equivalence
-    ("===" "≡") ; equiv
-    ("=/=" "≢")  ; complement equiv
-    ("=~=" "≅") ; pequiv
-    ("==b" "≡") ; NB: same presentation
-    ("<>b" "≢") ; NB: same presentation
-    
-    ("-->" "⟹-") ; Morphisms
-    ("++>" "⟹+") ; 
-    ("==>" "⟹") ; 
-
-    (":=" "≔")
-    ("|-" "⊢")
-    ("<>" "≠")
-    ("-|" "⊣")
-    ("\\/" "∨")
-    ("/\\" "∧")
-    ("~"  "¬")
-    )
-  ;; an alist of token name, unicode char sequence
-  "Table mapping Coq tokens to Unicode strings.
-
-You can adjust this table to add entries, or to change entries for
-glyphs that not are available in your Emacs or chosen font.
-
-When a file is visited, tokens are replaced by the strings
-in this table.  When the file is saved, the reverse is done.
-The string mapping can be anything, but should be such that
-tokens can be uniquely recovered from a decoded text; otherwise
-results will be undefined when files are saved."
-  :type 'unicode-tokens-token-symbol-map
-  :set 'hol-light-unicode-tokens-set
-  :group 'coq
-  :tag "Coq Unicode Token Mapping")
-
-(defcustom hol-light-shortcut-alist
-  '(; short cut, REAL unicode string
-    ("<>" . "⋄")
-    ("|>" . "⊳")
-    ("\\/" . "∨")
-    ("/\\" . "∧")
-    ("+O" . "⊕")
-    ("-O" . "⊖")
-    ("xO" . "⊗")
-    ("/O" . "⊘")
-    (".O" . "⊙")
-    ("|+" . "†")
-    ("|++" . "‡")
-    ("<=" . "≤")
-    ("|-" . "⊢")
-    (">=" . "≥")
-    ("-|" . "⊣")
-    ("||" . "∥")
-    ("==" . "≡")
-    ("~=" . "≃")
-    ("~~~" . "≍")
-    ("~~" . "≈")
-    ("~==" . "≅")
-    ("|<>|" . "⋈")
-    ("|=" . "⊨")
-    ("=." . "≐")
-    ("_|_" . "⊥")
-    ("</" . "≮")
-    (">=/" . "≱")
-    ("=/" . "≠")
-    ("==/" . "≢")
-    ("~/" . "≁")
-    ("~=/" . "≄")
-    ("~~/" . "≉")
-    ("~==/" . "≇")
-    ("<-" . "←")
-    ("<=" . "⇐")
-    ("->" . "→")
-    ("=>" . "⇒")
-    ("<->" . "↔")
-    ("<=>" . "⇔")
-    ("|->" . "↦")
-    ("<--" . "⟵")
-    ("<==" . "⟸")
-    ("-->" . "⟶")
-    ("==>" . "⟹")
-    ("<==>" . "⟷")
-    ("|-->" . "⟼")
-    ("<--" . "←⎯")
-    ("<-->" . "⟷")
-    ("<<" . "⟪")
-    ("[|" . "⟦")
-    (">>" . "⟫")
-    ("|]" . "⟧")
-    ("``" . "”")
-    ("''" . "“")
-    ("--" . "–")
-    ("---" . "—")
-    ("''" . "″")
-    ("'''" . "‴")
-    ("''''" . "⁗")
-    (":=" . "≔")
-    ;; some word shortcuts, started with backslash otherwise
-    ;; too annoying, perhaps.
-    ("\\int" . "ℤ")
-    ("\\rat" . "ℚ")
-    ("\\complex" . "ℂ")
-    ("\\euro" . "€")
-    ("\\yen" . "¥")
-    ("\\cent" . "¢"))
-  "Shortcut key sequence table for Unicode strings.
-
-You can adjust this table to add more entries, or to change entries for
-glyphs that not are available in your Emacs or chosen font.
-
-These shortcuts are only used for input; no reverse conversion is
-performed.  This means that the target strings need to have a defined
-meaning to be useful."
-  :type '(repeat (cons (string :tag "Shortcut sequence")
-                      (string :tag "Unicode string")))
-  :set 'hol-light-unicode-tokens-set
-  :group 'coq
-  :tag "Coq Unicode Input Shortcuts")
-
-
-;;
-;; Controls
-;;
-
-(defconst hol-light-control-char-format-regexp
-  ;; FIXME: fix Coq identifier syntax below
-  "\\(\s*%s\s*\\)\\([a-zA-Z0-9']+\\)")
-
-(defconst hol-light-control-char-format " %s ")
-
-(defconst hol-light-control-characters
-  '(("Subscript" "__" sub)
-    ("Superscript" "^^" sup)))
-
-(defconst hol-light-control-region-format-regexp 
"\\(\s*%s\{\\)\\([^}]*\\)\\(\}\s*\\)")
-
-(defconst hol-light-control-regions
-  '(("Subscript" "," "" sub)
-    ("Superscript" "^" "" sup)
-    ("Bold" "BOLD" "" bold)
-    ("Italic" "ITALIC" "" italic)
-    ("Script" "SCRIPT" "" script)
-    ("Frakt"  "FRACT" "" frakt)
-    ("Roman"  "ROMAN" "" serif)))
-
-
-(provide 'hol-light-unicode-tokens)
-
-;;; hol-light-unicode-tokens.el ends here
diff --git a/hol-light/hol-light.el b/hol-light/hol-light.el
deleted file mode 100644
index 808e04a..0000000
--- a/hol-light/hol-light.el
+++ /dev/null
@@ -1,519 +0,0 @@
-;;; hol-light.el --- Basic Proof General instance for HOL Light
-
-;; This file is part of Proof General.
-
-;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2018  Free Software Foundation, Inc.
-;; Portions © Copyright 2001-2017  Pierre Courtieu
-;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
-;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
-;; Portions © Copyright 2015-2017  Clément Pit-Claudel
-
-;; Author: David Aspinall <David.Aspinall@ed.ac.uk>
-;;         Mark Adams <mark@proof-technologies.com>
-
-;;; Commentary:
-;;
-;; See the README file in this directory for information.
-;;
-
-;;; Code:
-
-(require 'proof-easy-config)            ; easy configure mechanism
-(require 'proof-syntax)                        ; functions for making regexps
-
-(proof-try-require 'caml-font)            ; use OCaml Emacs mode syntax 
-
-(eval-when-compile
-  (require 'proof-tree))
-
-(defcustom hol-light-home 
-  (or (getenv "HOLLIGHT_HOME")
-      (concat (getenv "HOME") "/hol_light"))
-  "*Directory holding the local installation of HOL Light."
-  :type 'string
-  :group 'hol-light)
-
-(defcustom hol-light-prog-name 
-  (or (getenv "HOLLIGHT_OCMAL")
-      (getenv "OCAML")
-      "ocaml")
-  "*Name of the OCaml interpreter to launch HOL Light."
-  :type 'string
-  :group 'hol-light)
-
-(defcustom hol-light-use-custom-toplevel t
-  "*If non-nil, we use a custom toplevel for Proof General.
-This configures extra annotations inside HOL Light to help
-recognise portions of output from the proof assistant.
-
-If this is incompatible with your usage of HOL Light for
-some reason, you can change this setting to run in a
-degraded (less robust) way which interfaces with the
-standard top level.
-
-You need to restart Emacs if you change this setting."
-  :type 'boolean
-  :group 'hol-light)
-
-(defconst hol-light-pre-sync-cmd
-  (format "#use \"%shol-light/pg_prompt.ml\";; " proof-home-directory)
-  "Command used to configure prompt annotations for Proof General.")
-
-(defcustom hol-light-init-cmd 
-  (append
-   (list (format "#cd \"%s\"" hol-light-home)
-        "#use \"hol.ml\"")
-   (if hol-light-use-custom-toplevel
-       (list (format "#use \"%shol-light/pg_tactics.ml\""
-                    proof-home-directory))
-     (list
-  "let rec pg_repeat f n = match n with 0 -> () | _ -> (f(); pg_repeat f 
(n-1));;"
-  "let pg_undo n = (pg_repeat n (fun ()->let _ = b() in ()); p());;"
-  "let pg_kill() = current_goalstack:=[];;"
-  "let pg_forget id = ();;"
-  "let pg_restart() = print_string \"*** Session restarted.\";;")))
-  "*Commands used to start up a running HOL Light session."
-  :type '(list string)
-  :group 'hol-light)
-
-;;
-;; Regular expressions for matching output with  
-;; standard or custom top levels
-;;
-
-(defconst hol-light-plain-start-goals-regexp
-  (concat
-  "^\\(val it : x?goalstack = \\)"
-  "\\(?:.+\n\\)*"
-  "\\(?:[0-9]*[0-9] subgoals? ([0-9]+ total)\\|No subgoals\\)")
-  "Value for `proof-shell-start-goals-regexp' with standard top level.")
-
-(defconst hol-light-annotated-start-goals-regexp 
-  hol-light-plain-start-goals-regexp
-  "Value for `proof-shell-start-goals-regexp' with custom top level.")
-
-(defconst hol-light-plain-interrupt-regexp
-  "Interrupted"
-  "Value for `proof-shell-interrupt-regexp' with standard top level.")
-
-(defconst hol-light-annotated-interrupt-regexp
-  hol-light-plain-interrupt-regexp ;; TODO
-  "Value for `proof-shell-interrupt-regexp' with custom top level.")  
-
-(defconst hol-light-plain-prompt-regexp
-  "\\(val it : unit = ()\n\\)?^# "
-  "Value for `proof-shell-annotated-prompt-regexp' with standard top level.")
-
-(defconst hol-light-annotated-prompt-regexp
-  "\\(val it : unit = ()\n\\)?<prompt>.*</prompt>"
-  "Value for `proof-shell-annotated-prompt-regexp' with custom top level.")
-
-(defconst hol-light-plain-error-regexp
-  (proof-regexp-alt "Characters [0-9]+-[0-9]+:" 
-                   "^Exception: Failure"
-                   "^Parse error: "
-                   "^Cannot find file"
-                   "^Error: Unbound value"
-                   "^Error: Syntax error"
-                   ;; TODO: more here
-                   )
-  "Value for `proof-shell-error-regexp' with standard top level.")
-
-(defconst hol-light-annotated-error-regexp 
-  ;; "<error>.+</error>" ;; unfortunately not enough, this is only for failwith
-  hol-light-plain-error-regexp
-  "Value for `proof-shell-error-regexp' with custom top level.")
-
-(defconst hol-light-plain-proof-completed-regexp
-   "Initial goal proved"
-   "Value for `proof-shell-proof-completed-regexp' with standard top level.")
-
-(defconst hol-light-annotated-proof-completed-regexp
-  hol-light-plain-proof-completed-regexp ;; TODO
-   "Value for `proof-shell-proof-completed-regexp' with standard top level.")
-
-(defconst hol-light-plain-message-start 
-  "^Warning \\|\\*\*\\*"
-  "Value for `proof-shell-eager-annotation-start' with standard top level.")
-
-(defconst hol-light-annotated-message-start
-  "^Warning \\|\\*\\*\\*" ;; TODO
-  "Value for `proof-shell-eager-annotation-start' with custom top level.")
-
-(defconst hol-light-plain-message-end
-  "\n" ;; TODO
-  "Value for `proof-shell-eager-annotation-start' with standard top level.")
-
-(defconst hol-light-annotated-message-end
-  "\n" ;; TODO
-  "Value for `proof-shell-eager-annotation-start' with custom top level.")
-  
-
-;;;
-;;; State 
-;;;
-
-(defvar hol-light-keywords nil)
-(defvar hol-light-rules nil)
-(defvar hol-light-tactics nil)
-(defvar hol-light-tacticals nil)
-
-
-;;;
-;;; Main configuration
-;;;
-
-(proof-easy-config  'hol-light "HOL Light"
- proof-assistant-home-page       "https://www.cl.cam.ac.uk/~jrh13/hol-light/";
- proof-prog-name                hol-light-prog-name
- proof-terminal-string           ";;"
- proof-shell-pre-sync-init-cmd   hol-light-pre-sync-cmd
- proof-shell-init-cmd            hol-light-init-cmd
-
- ;; Regexps for matching tactic script inputs: all approximations, of course.
- proof-goal-command-regexp             "^g[ `]"
- proof-save-command-regexp             "top_thm()"
- proof-goal-with-hole-regexp           "let \\(\\([^ \t=]*\\)\\)[ \t]*=[ 
\t]*prove"
- proof-save-with-hole-regexp           "let \\(\\([^ \t=]*\\)\\)[ \t]*=[ 
\t]*top_thm()"
- proof-non-undoables-regexp            "b()" ; and others..
- proof-goal-command                    "g `%s`;;"
- proof-save-command                    "val %s = top_thm();;"
- proof-kill-goal-command               "pg_kill();;"
- proof-undo-n-times-cmd                "pg_undo %s;;"
- proof-forget-id-command       "pg_forget \"%s\";;"
- proof-shell-restart-cmd        "pg_restart();;"
- proof-showproof-command               "p();;"
- proof-auto-multiple-files             t
- proof-shell-cd-cmd                    "#cd \"%s\";;"
- proof-shell-filename-escapes          '(("\\\\" . "\\\\") ("\""   . "\\\""))
-
- proof-shell-annotated-prompt-regexp (if hol-light-use-custom-toplevel
-                                        hol-light-annotated-prompt-regexp
-                                      hol-light-plain-prompt-regexp)
-
- proof-shell-interrupt-regexp        (if hol-light-use-custom-toplevel
-                                        hol-light-annotated-interrupt-regexp
-                                      hol-light-plain-interrupt-regexp)
-
- proof-shell-start-goals-regexp      (if hol-light-use-custom-toplevel
-                                        hol-light-annotated-start-goals-regexp
-                                      hol-light-plain-start-goals-regexp)
-
- proof-shell-error-regexp           (if hol-light-use-custom-toplevel
-                                        hol-light-annotated-error-regexp
-                                      hol-light-plain-error-regexp)
-
- proof-shell-proof-completed-regexp  (if hol-light-use-custom-toplevel
-                                        
hol-light-annotated-proof-completed-regexp
-                                      hol-light-plain-proof-completed-regexp)
-
- proof-shell-eager-annotation-start  (if hol-light-use-custom-toplevel
-                                        hol-light-annotated-message-start
-                                      hol-light-plain-message-start)
-
- proof-shell-eager-annotation-end    (if hol-light-use-custom-toplevel
-                                        hol-light-annotated-message-end
-                                      hol-light-plain-message-end)
-
- 
- ;; FIXME: add optional help topic parameter to help command.
- proof-info-command                "help \"hol\""
-
- ;; FIXME: next one needs setting so that "urgent" messages are displayed
- ;; eagerly from HOL.
- ;; proof-shell-eager-annotation-start
- proof-find-theorems-command   "DB.match [] (%s);;"
-
- ;;
- ;; Syntax and syntax table entries for proof scripts
- ;;
- proof-script-comment-start      "(*"
- proof-script-comment-end        "*)"
- proof-script-syntax-table-entries
- '(?\` "\""
-   ?\$ "."
-   ?\/ "."
-   ?\\ "."
-   ?+  "."
-   ?-  "."
-   ?=  "."
-   ?%  "."
-   ?<  "."
-   ?>  "."
-   ?\& "."
-   ?.  "w"
-   ?_  "w"
-   ?\' "w"
-   ?\| "."
-   ?\* ". 23n"
-   ?\( "()1"
-   ?\) ")(4")
-
- ;;
- ;; A few of the vast variety of keywords, tactics, tacticals,
- ;; for decorating proof scripts.
- ;;
- ;; In the future, PG will use a mechanism for passing identifier
- ;; lists like this from the proof assistant, we don't really
- ;; want to duplicate all this information here!
- ;;
- hol-light-keywords  '("g" "expand" "e" "store_thm" "top_thm" "by"
-                      "Define" "xDefine" "Hol_defn"
-                      "Induct" "Cases" "Cases_on" "Induct_on"
-                      "std_ss" "arith_ss" "list_ss"
-                      "define_type")
-
- hol-light-rules        
- '("REFL" "TRANS" "MK_COMB" "ABS" "BETA" "BETA_CONV"
-   "ASSUME" "EQ_MP" "DEDUCT_ANTISYM_RULE" "INST_TYPE" "INST"
-   "TRUTH" "CONJ" "CONJUNCT1" "CONJUNCT2" "PINST" "PROVE_HYP"
-   "T_DEF" "TRUTH" "EQT_ELIM" "EQT_INTRO" "AND_DEF" "CONJ"
-   "CONJUNCT1" "CONJUNCT2" "CONJ_PAIR" "CONJUNCTS" "IMP_DEF" "MP"
-   "DISCH" "DISCH_ALL" "UNDISCH" "UNDISCH_ALL" "IMP_ANTISYM_RULE" "ADD_ASSUM"
-   "EQ_IMP_RULE" "IMP_TRANS" "FORALL_DEF" "SPEC" "SPECL" "SPEC_VAR"
-   "SPEC_ALL" "ISPEC" "ISPECL" "GEN" "GENL" "GEN_ALL"
-   "EXISTS_DEF" "EXISTS" "SIMPLE_EXISTS" "CHOOSE" "SIMPLE_CHOOSE" "OR_DEF"
-   "DISJ1" "DISJ2" "DISJ_CASES" "SIMPLE_DISJ_CASES" "F_DEF" "NOT_DEF"
-   "NOT_ELIM" "NOT_INTRO" "EQF_INTRO" "EQF_ELIM" "CONTR" "EXISTS_UNIQUE_DEF"
-   "EXISTENCE"
-   "EQ_REFL" "REFL_CLAUSE" "EQ_SYM" "EQ_SYM_EQ" "EQ_TRANS"
-   "AC" "BETA_THM" "ABS_SIMP" "CONJ_ASSOC" "CONJ_SYM"
-   "CONJ_ACI" "DISJ_ASSOC" "DISJ_SYM" "DISJ_ACI" "IMP_CONJ"
-   "IMP_IMP" "IMP_CONJ_ALT" "LEFT_OR_DISTRIB" "RIGHT_OR_DISTRIB" "FORALL_SIMP"
-   "EXISTS_SIMP" "EQ_IMP" "EQ_CLAUSES" "NOT_CLAUSES_WEAK" "AND_CLAUSES"
-   "OR_CLAUSES" "IMP_CLAUSES" "IMP_EQ_CLAUSE" "EXISTS_UNIQUE_THM" "EXISTS_REFL"
-   "EXISTS_UNIQUE_REFL" "UNWIND_THM1" "UNWIND_THM2" "FORALL_UNWIND_THM2" 
"FORALL_UNWIND_THM1"
-   "SWAP_FORALL_THM" "SWAP_EXISTS_THM" "FORALL_AND_THM" "AND_FORALL_THM" 
"LEFT_AND_FORALL_THM"
-   "RIGHT_AND_FORALL_THM" "EXISTS_OR_THM" "OR_EXISTS_THM" "LEFT_OR_EXISTS_THM" 
"RIGHT_OR_EXISTS_THM"
-   "LEFT_EXISTS_AND_THM" "RIGHT_EXISTS_AND_THM" "TRIV_EXISTS_AND_THM" 
-   "LEFT_AND_EXISTS_THM" "RIGHT_AND_EXISTS_THM"
-   "TRIV_AND_EXISTS_THM" "TRIV_FORALL_OR_THM" 
-   "TRIV_OR_FORALL_THM" "RIGHT_IMP_FORALL_THM" "RIGHT_FORALL_IMP_THM"
-   "LEFT_IMP_EXISTS_THM" "LEFT_FORALL_IMP_THM" "TRIV_FORALL_IMP_THM" 
-   "TRIV_EXISTS_IMP_THM" "EXISTS_UNIQUE_ALT" "EXISTS_UNIQUE")
-
- hol-light-tactics   
- '("ABS_TAC" "ACCEPT_TAC" "ALL_TAC" "ANTS_TAC" "AP_TERM_TAC"
-   "AP_THM_TAC" "ASSUME_TAC" "BETA_TAC" "BINOP_TAC" "CHANGED_TAC"
-   "CHEAT_TAC" "CHOOSE_TAC" "CONJ_TAC" "CONTR_TAC" "CONV_TAC"
-   "DISCARD_TAC" "DISCH_TAC" "DISJ1_TAC" "DISJ2_TAC" "DISJ_CASES_TAC"
-   "EQ_TAC" "EXISTS_TAC" "FAIL_TAC" "GEN_TAC" "LABEL_TAC"
-   "MATCH_ACCEPT_TAC" "MATCH_MP_TAC " "META_EXISTS_TAC" "META_SPEC_TAC" 
"MK_COMB_TAC"
-   "MP_TAC" "NO_TAC" "RECALL_ACCEPT_TAC" "REFL_TAC" "REPLICATE_TAC"
-   "RULE_ASSUM_TAC " "SPEC_TAC" "STRIP_ASSUME_TAC" "STRIP_GOAL_THEN" 
"STRIP_TAC"
-   "STRUCT_CASES_TAC" "SUBGOAL_TAC" "SUBST1_TAC" "SUBST_ALL_TAC" 
"SUBST_VAR_TAC"
-   "UNDISCH_TAC" "X_CHOOSE_TAC" "X_GEN_TAC" "X_META_EXISTS_TAC")
-
- hol-light-tacticals 
- '("ORELSE" "FIRST" "CHANGED_TAC" "THEN" "THENL" 
-   "EVERY" "REPEAT" "MAP_EVERY"
-   "IMP_RES_THEN"
-   "FIND_ASSUM" "POP_ASSUM" "ASSUM_LIST" "EVERY_ASSUM" "FIRST_ASSUM"
-   "CONJUCTS_THEN" "DISJ_CASES_THEN" "DISCH_THEN" "X_CHOOSE_THEN" "MAP_EVERY"
-   "CHOOSE_THEN" "STRIP_THM_THEN" "SUBGOAL_THEN" "FREEZE_THEN")
-
- proof-script-font-lock-keywords
- (append
-  (bound-and-true-p caml-font-lock-keywords)
-  (list
-   (cons (proof-ids-to-regexp hol-light-keywords) 'font-lock-keyword-face)
-   (cons (proof-ids-to-regexp hol-light-tactics) 'proof-tactics-name-face)
-   (cons (proof-ids-to-regexp hol-light-rules) 'font-lock-keyword-face)
-   (cons (proof-ids-to-regexp hol-light-tacticals) 
'proof-tacticals-name-face)))
-
- ;;
- ;; Some decoration of the goals output [FIXME: not yet HOL Light]
- ;;
- proof-goals-font-lock-keywords
- (list
-  (cons (proof-ids-to-regexp '("Proof manager status"
-                              "proof" "Incomplete"
-                              "Initial goal proved"
-                              "Initial goal"
-                              "There are currently no proofs"
-                              "OK"))
-       'font-lock-keyword-face)
-  (cons (regexp-quote "------------------------------------")
-       'font-lock-comment-face)
-  (cons ": GoalstackPure.goalstack" 'proof-boring-face)
-  (cons ": GoalstackPure.proofs"    'proof-boring-face)
-  (cons ": Thm.thm"                'proof-boring-face)
-  (cons "val it ="                 'proof-boring-face))
-
- ;;
- ;; Some decoration of the response output
- ;;
- proof-goals-font-lock-keywords
- (setq 
-  proof-goals-font-lock-keywords
-  (list
-   ;; Help system output
-   (cons (proof-ids-to-regexp 
-         '("^----------[-]+$"
-           "SYNOPSIS" "DESCRIPTION" "FAILURE CONDITIONS"
-           "EXAMPLES" "SEE ALSO"))
-        'font-lock-keyword-face)
-   (cons ": GoalstackPure.goalstack" 'proof-boring-face)
-   (cons ": GoalstackPure.proofs"    'proof-boring-face)
-   (cons ": Thm.thm"               'proof-boring-face)
-   (cons "val it ="                'proof-boring-face)))
-
- ;; End of easy config.
- )
-
-
-;;;
-;;; Prooftree configuration  (experimental, ongoing)
-;;;
-
-;; regexps for recognising additional markup in output
-
-(defvar hol-light-update-goal-regexp 
-  (concat "\\[Goal ID \\([0-9]+\\)\\]"
-         "\\s-*\n\\(\\(?:.+\n\\)*\\)\\(?:\n\\|$\\)"))
-
-(defconst hol-light-current-goal-regexp
-  ;; match final (focused) subgoal.  
-  (concat (regexp-quote "[*]") 
-         "\\[Goal ID \\([0-9]+\\)\\]"
-         "\\s-*\n\\(\\(?:.+\n\\)*\\)\\(?:\n\\|$\\)"))
-         
-(defconst hol-light-additional-subgoal-regexp 
-  "\\[New Goal IDs: \\([0-9 ]+\\)\\]"
-  "HOL Light instance of `proof-tree-additional-subgoal-ID-regexp'.")
-
-(defconst hol-light-statenumber-regexp 
-  "<prompt>\\([0-9]+\\)|\\([0-9]+\\)</prompt>"
-  "Regular expression to match prompt with state numbers.
-The first number is a global state counter which increases with
-processed steps.  The second number is the number of steps within
-the currently open proof.")
-
-(defconst hol-light-existential-regexp "\\(\\?[0-9]+\\)"
-  "Regexp for `proof-tree-existential-regexp'.")
-
-(defconst hol-light-existentials-state-start-regexp "^(dependent evars:"
-  "HOL Light instance of `proof-tree-existentials-state-start-regexp'.")
-
-(defconst hol-light-existentials-state-end-regexp ")\n"
-  "HOL Light instance of `proof-tree-existentials-state-end-regexp'.")
-
-
-(setq 
- ;; These ones belong in script mode config
- proof-tree-configured t
- proof-tree-get-proof-info 'hol-light-get-proof-info
- proof-tree-find-begin-of-unfinished-proof 
-           'hol-light-find-begin-of-unfinished-proof
- ;; These ones belong in shell mode
- proof-tree-branch-finished-regexp "No subgoals"         
- proof-tree-show-sequent-command 
- (lambda (id) (format "print_xgoal_of_id \"%s\";;" id))
-
- proof-tree-current-goal-regexp hol-light-current-goal-regexp
- proof-tree-additional-subgoal-ID-regexp hol-light-additional-subgoal-regexp
- proof-tree-update-goal-regexp hol-light-update-goal-regexp
- proof-tree-cheating-regexp "CHEAT_TAC" ;; others...
-
- proof-tree-existential-regexp hol-light-existential-regexp
- proof-tree-existentials-state-start-regexp 
hol-light-existentials-state-start-regexp
- proof-tree-existentials-state-end-regexp 
hol-light-existentials-state-end-regexp
- ) ;; end setq proof tree stuff
-
-
-
-;;; get proof info: uses last goals output
-;;; FIXME problem here: this is called BEFORE last goals output 
-;;; is set.  Can we move order without harming Coq?
-
-;; TEMP to fix compile.  Will use Coq-stype annotated prompt for proof tree 
now.
-(defvar proof-shell-delayed-output-start nil)
-(defvar proof-shell-delayed-output-end nil)
-(defvar proof-info nil)
-(defvar proof-action-list nil)
-(defun proof-shell-action-list-item (&rest args))
-
-(defconst hol-light-show-sequent-command "print_xgoal_of_id %s;;")
-
-(defun hol-light-get-proof-info ()
-  "Return proof info for Prooftree for HOL Light.
-See `proof-tree-get-proof-info'."
-  (let ((proof-state-number 0)
-       (proof-name         "Goal")) ; no named goals
-
-    (when (and t ; (> proof-nesting-depth 0) ; inside a proof
-              (string-match hol-light-statenumber-regexp 
-               proof-shell-last-prompt))
-      (setq proof-state-number 
-           (string-to-number 
-            (match-string 1 proof-shell-last-prompt))))
-    (list 
-     proof-state-number
-     proof-name)))
-
-(defun hol-light-find-begin-of-unfinished-proof ()
-  ;; Quick hack, we should use some internal proof script stuff here
-  (save-excursion
-    (re-search-backward "^g" nil t)))
-
-
-;;; FIXME: this is duplicated from coq.el.  It might be kind of generic.
-;;; However, for HOL Light the default behaviour is actually to print out
-;;; exactly the new subgoals arising from a previous tactic allocation,
-;;; or the currently focused goal (top of stack).
-
-(defun hol-light-proof-tree-get-new-subgoals ()
-  "Check for new subgoals and issue appropriate Show commands.
-This is a hook function for `proof-tree-urgent-action-hook'. This
-function examines the current goal output and searches for new
-unknown subgoals. Those subgoals have been generated by the last
-proof command and we must send their complete sequent text
-eventually to prooftree. Because subgoals may change with
-the next proof command, we must execute the additionally needed
-Show commands before the next real proof command.
-
-The ID's of the open goals are checked with
-`proof-tree-sequent-hash' in order to find out if they are new.
-For any new goal an appropriate Show Goal command with a
-'proof-tree-show-subgoal flag is inserted into
-`proof-action-list'. Then, in the normal delayed output
-processing, the sequent text is send to prooftree as a sequent
-update (see `proof-tree-update-sequent') and the ID of the
-sequent is registered as known in `proof-tree-sequent-hash'.
-
-The not yet delayed output is in the region
-\[proof-shell-delayed-output-start, proof-shell-delayed-output-end]."
-  ;; (message "CPTGNS start %s end %s"
-  ;;          proof-shell-delayed-output-start
-  ;;          proof-shell-delayed-output-end)
-  (with-current-buffer proof-shell-buffer
-    (let ((start proof-shell-delayed-output-start)
-          (end proof-shell-delayed-output-end))
-      (goto-char start)
-      (while (proof-re-search-forward
-              hol-light-update-goal-regexp end t)
-        (let ((subgoal-id (match-string-no-properties 1)))
-          (unless (gethash subgoal-id proof-tree-sequent-hash)
-            (setq proof-action-list
-                  (cons (proof-shell-action-list-item
-                         (format hol-light-show-sequent-command subgoal-id)
-                         (proof-tree-make-show-goal-callback (car proof-info))
-                         '(no-goals-display
-                           no-response-display
-                           proof-tree-show-subgoal))
-                        proof-action-list))))))))
-  
-(add-hook 'proof-tree-urgent-action-hook 
'hol-light-proof-tree-get-new-subgoals)
-
-
-;;;
-;;; Menu commands
-;;;
-
-(proof-definvisible hol-light-dump-proof "dump_proof();;")
-
-(defpgdefault menu-entries
-  '(["Dump refactored proof" hol-light-dump-proof t]))
-
-(provide 'hol-light)
diff --git a/hol-light/pg_prompt.ml b/hol-light/pg_prompt.ml
deleted file mode 100644
index b14c01c..0000000
--- a/hol-light/pg_prompt.ml
+++ /dev/null
@@ -1,59 +0,0 @@
-(* ========================================================================= *)
-(* HOL Light tweaks for Proof General.                                      *)
-(*                                                                           *)
-(* Mark Adams, David Aspinall.                                              *)
-(* LFCS, School of Informatics, University of Edinburgh                        
     *)
-(*                                                                           *)
-(* (c) Copyright University of Edinburgh and authors, 2012.                  *)
-(*                                                                          *)
-(* This file adjust the OCaml prompt to help Proof General synchronization.  *)
-(* It is loaded before HOL Light.                                           *)
-(* ========================================================================= *)
-
-
-(* ------------------------------------------------------------------------- *)
-(* Proof General mode, providing extra annotations in output                *)
-(* ------------------------------------------------------------------------- *)
-
-let pg_mode = ref (true : bool);;
-
-let pg_mode_on () = (pg_mode := true);;
-let pg_mode_off () = (pg_mode := false);;
-
-let pg_prompt_info = ref (fun () -> "");;
-
-
-(* ------------------------------------------------------------------------- *)
-(* Adjust the OCaml prompt to carry information for Proof General            *)
-(* ------------------------------------------------------------------------- *)
-
-let original_prompt_fn = !Toploop.read_interactive_input in
-(Toploop.read_interactive_input :=
-   fun prompt buffer len ->
-      let prompt' =
-         if (!pg_mode)
-           then "<prompt>" ^
-               (!pg_prompt_info()) ^
-                "</prompt>"
-           else prompt in
-      original_prompt_fn prompt' buffer len);;
-
-
-(* ------------------------------------------------------------------------- *)
-(* Adjust error printing to markup error messages                           *)
-(* ------------------------------------------------------------------------- *)
-
-(* Doesn't really work, as many errors are from OCaml top level and
-   not printed in this way.
-
-let print_exn e =
-    match e with
-      Failure x -> Format.print_string 
-                    (if (!pg_mode) then 
-                        "<error>" ^ x ^ "</error>"
-                     else x)
-    | _  -> Format.print_string (Printexc.to_string e);;
-
-#install_printer print_exn;;
-
-*) 
diff --git a/hol-light/pg_tactics.ml b/hol-light/pg_tactics.ml
deleted file mode 100644
index 2943f46..0000000
--- a/hol-light/pg_tactics.ml
+++ /dev/null
@@ -1,349 +0,0 @@
-(* ========================================================================= *)
-(* HOL Light subgoal package amended for Proof General and Prooftree.        *)
-(*                                                                           *)
-(* Mark Adams, David Aspinall.                                              *)
-(* LFCS, School of Informatics, University of Edinburgh                        
     *)
-(*                                                                           *)
-(* (c) Copyright University of Edinburgh and authors, 2012.                  *)
-(*                                                                          *)
-(* This file contains some functions that are modified from the                
     *)
-(* original HOL Light code, and is therefore subject to the HOL Light       *)
-(* copyright, see the file LICENSE-HOL-LIGHT in this directory.                
     *)
-(*                                                                          *)
-(* ========================================================================= *)
-(*                                                                          *)
-(* This file overwrites HOL Light's subgoal package commands with variants   *)
-(* that output additional annotations specifically for Prooftree.  These get *)
-(* intercepted by Proof General, which removes them from the output          *)
-(* displayed to the Proof General user.                                        
     *)
-
-(* TODO: 
-   1. add urgent message annotations for errors and strings output during
-      long-running tactics
-   2. fix on/off: don't turn off prompt annotation, support Prooftree on/off.
-*)
-
-(* ------------------------------------------------------------------------- *)
-(* Goal counter for providing goal ids.                                      *)
-(* ------------------------------------------------------------------------- *)
-
-type goal_id = int;;
-
-let string_of_goal_id id = string_of_int id;;
-
-let the_goal_counter = ref (0 : goal_id);;
-
-let inc_goal_counter () =
-  (the_goal_counter := !the_goal_counter + 1);;
-
-let reset_goal_counter () =
-  (the_goal_counter := 0;
-   !the_goal_counter);;
-
-(* ------------------------------------------------------------------------- *)
-(* An xgoal extends a goal with an identity.                                 *)
-(* ------------------------------------------------------------------------- *)
-
-type xgoal = goal * goal_id;;
-
-let dest_xgoal (gx : xgoal) = gx;;
-
-(* ------------------------------------------------------------------------- *)
-(* The xgoalstate is like goalstate but for xgoals instead of goals.         *)
-(* ------------------------------------------------------------------------- *)
-
-type xgoalstate = (term list * instantiation) * xgoal list * justification;;
-
-(* ------------------------------------------------------------------------- *)
-(* A goalstack but for xgoals.  Overwrites original HL datatype.             *)
-(* ------------------------------------------------------------------------- *)
-
-type goalstack = xgoalstate list;;
-
-(* ------------------------------------------------------------------------- *)
-(* A refinement but for xgoals.                                              *)
-(* ------------------------------------------------------------------------- *)
-
-type xrefinement = xgoalstate -> xgoalstate;;
-
-(* ------------------------------------------------------------------------- *)
-(* Instantiation of xgoals.                                                  *)
-(* ------------------------------------------------------------------------- *)
-
-let (inst_xgoal:instantiation->xgoal->xgoal) =
-  fun p ((thms,w),id) ->
-    (map (I F_F INSTANTIATE_ALL p) thms,instantiate p w),id;;
-
-(* ------------------------------------------------------------------------- *)
-(* A printer for xgoals and xgoalstacks.                                     *)
-(* ------------------------------------------------------------------------- *)
-
-let the_new_goal_ids = ref ([] : goal_id list);;
-
-let the_tactic_flag = ref false;;
-
-let print_string_seplist sep xs =
-  if (xs = [])
-    then ()
-    else (print_string (hd xs);
-          do_list (fun x -> print_string sep; print_string x) (tl xs));;
-
-let print_xgoal ((g,id) : xgoal) : unit =
-  ((if (!pg_mode)
-      then (print_string ("[Goal ID " ^ string_of_goal_id id ^ "]");
-            print_newline ()));
-   print_goal g);;
-
-let (print_xgoalstack:goalstack->unit) =
-  let print_xgoalstate k gs =
-    let (_,gl,_) = gs in
-    let n = length gl in
-    let s = if n = 0 then "No subgoals" else
-              (string_of_int k)^" subgoal"^(if k > 1 then "s" else "")
-           ^" ("^(string_of_int n)^" total)" in
-    print_string s; print_newline();
-    if gl = [] then () else
-    (do_list (print_xgoal o C el gl) (rev(1--(k-1)));
-     (if (!pg_mode) then print_string "[*]");
-     print_xgoal (el 0 gl)) in
-  fun l ->
-   ((if (!pg_mode) & (!the_tactic_flag)
-       then let xs = map string_of_int (!the_new_goal_ids) in
-            (the_tactic_flag := false;
-             print_string  "[New Goal IDs: ";
-             print_string_seplist " " xs;
-             print_string "]";
-             print_newline ()));
-    (if l = [] then print_string "Empty goalstack"
-     else if tl l = [] then
-       let (_,gl,_ as gs) = hd l in
-       print_xgoalstate 1 gs
-     else
-       let (_,gl,_ as gs) = hd l
-       and (_,gl0,_) = hd(tl l) in
-       let p = length gl - length gl0 in
-       let p' = if p < 1 then 1 else p + 1 in
-       print_xgoalstate p' gs);
-    (if (!pg_mode) then
-     let (vs,theta) =
-        if (l = []) then ([],[])
-                    else let ((vs,(_,theta,_)),_,_) = hd l in
-                         (vs,theta) in
-     let foo v =
-        let (x,_) = dest_var v in
-        "?" (* FIXME: Coq syntax for meta vars is expected by Prooftree *)
-        ^ x ^ if (can (rev_assoc v) theta) then " using" else " open" in
-     let xs = map foo vs in
-     (print_newline();
-      print_string "(dependent evars:";
-      if xs != [] then 
-       (print_string " ";
-       print_string_seplist ", " xs;
-       print_string ",");
-      print_string ")";
-      print_newline ())));;
-
-(* ------------------------------------------------------------------------- *)
-(* Goal labelling, for fresh xgoals.                                         *)
-(* ------------------------------------------------------------------------- *)
-
-let label_goals (gs : goal list) : xgoal list =
-  let gxs = map (fun g -> inc_goal_counter (); (g, !the_goal_counter))
-                gs in
-  (the_new_goal_ids := map snd gxs;
-   gxs);;
-
-(* ------------------------------------------------------------------------- *)
-(* Version of 'by' for xrefinements.                                         *)
-(* ------------------------------------------------------------------------- *)
-
-let (xby:tactic->xrefinement) =
-  fun tac ((mvs,inst),glsx,just) ->
-    let gx = hd glsx
-    and oglsx = tl glsx in
-    let (g,id) = dest_xgoal gx in
-    let ((newmvs,newinst),subgls,subjust) = tac g in
-    let subglsx = label_goals subgls in
-    let n = length subglsx in
-    let mvs' = union newmvs mvs
-    and inst' = compose_insts inst newinst
-    and glsx' = subglsx @ map (inst_xgoal newinst) oglsx in
-    let just' i ths =
-      let i' = compose_insts inst' i in
-      let cths,oths = chop_list n ths in
-      let sths = (subjust i cths) :: oths in
-      just i' sths in
-    (mvs',inst'),glsx',just';;
-
-(* ------------------------------------------------------------------------- *)
-(* Rotate but for xgoalstate.  Only change is different ML datatype.         *)
-(* ------------------------------------------------------------------------- *)
-
-let (xrotate:int->xrefinement) =
-  let rotate_p (meta,sgs,just) =
-    let sgs' = (tl sgs)@[hd sgs] in
-    let just' i ths =
-      let ths' = (last ths)::(butlast ths) in
-      just i ths' in
-    (meta,sgs',just')
-  and rotate_n (meta,sgs,just) =
-    let sgs' = (last sgs)::(butlast sgs) in
-    let just' i ths =
-      let ths' = (tl ths)@[hd ths] in
-      just i ths' in
-    (meta,sgs',just') in
-  fun n -> if n > 0 then funpow n rotate_p
-           else funpow (-n) rotate_n;;
-
-(* ------------------------------------------------------------------------- *)
-(* Perform refinement proof, tactic proof etc.                               *)
-(* ------------------------------------------------------------------------- *)
-
-let (mk_xgoalstate:goal->xgoalstate) =
-  fun (asl,w) ->
-    if type_of w = bool_ty then
-      null_meta,[((asl,w), reset_goal_counter ())],
-      (fun inst [th] -> INSTANTIATE_ALL inst th)
-    else failwith "mk_goalstate: Non-boolean goal";;
-
-(* ------------------------------------------------------------------------- *)
-(* The global state counts the total number of proof steps taken.            *)
-(* ------------------------------------------------------------------------- *)
-
-let the_pg_global_state = ref 1;;
-
-let inc_pg_global_state () =
-  (the_pg_global_state := !the_pg_global_state + 1);;
-
-let dec_pg_global_state n =
-  (the_pg_global_state := !the_pg_global_state - n);;
-
-let pg_global_state () = !the_pg_global_state;;
-
-(* ------------------------------------------------------------------------- *)
-(* The proof state number is the length of the current goal stack.           *)
-(* ------------------------------------------------------------------------- *)
-
-let the_current_xgoalstack = ref ([] : goalstack);;
-
-let pg_proof_state () = length !the_current_xgoalstack;;
-
-(* ------------------------------------------------------------------------- *)
-(* Subgoal package for xgoals and with a constrained undo protocol for       *)
-(* interacting with Proof General to track the state.  These overwrite the   *)
-(* existing commands and may cause breakage of interactive proofs.           *)
-(*                                                                          *)
-(* The restrictions are:                                                    *)
-(*  - top_thm may only be called once and closes the currently open proof.   *)
-(*  - the back command b() is not allowed to appear in a file.              *)
-(*                                                                          *)
-(* ------------------------------------------------------------------------- *)
-
-let (xrefine:xrefinement->goalstack) =
-  fun r ->
-    let l = !the_current_xgoalstack in
-    let h = hd l in
-    let res = r h :: l in
-    the_current_xgoalstack := res;
-    !the_current_xgoalstack;;
-
-let flush_goalstack() =
-  let l = !the_current_xgoalstack in
-  the_current_xgoalstack := [hd l];;
-
-let e tac =
-  let result = xrefine(xby(VALID tac)) in
-  (inc_pg_global_state ();
-   the_tactic_flag := true;
-   result);;
-
-let r n =
-  (inc_pg_global_state ();
-   xrefine(xrotate n));;
-
-let set_goal(asl,w) =
-  let aths = map ASSUME asl in
-  (inc_pg_global_state ();
-   the_current_xgoalstack :=
-     [mk_xgoalstate(map (fun th -> "",th) aths,w)];
-   !the_current_xgoalstack);;
-
-let g t =
-  let fvs = sort (<) (map (fst o dest_var) (frees t)) in
-  (if fvs <> [] then
-     let errmsg = end_itlist (fun s t -> s^", "^t) fvs in
-     warn true ("Free variables in goal: "^errmsg)
-   else ());
-  set_goal([],t);;
-
-let p() = !the_current_xgoalstack;;
-
-let b() =
-  failwith "Undo with b() is not available in Proof General top level";;
-
-let top_realgoal() =
-  let (_,(((asl,w),id)::_),_)::_ = !the_current_xgoalstack in
-  asl,w;;
-
-let top_goal() =
-  let asl,w = top_realgoal() in
-  map (concl o snd) asl,w;;
-
-let plain_top_thm() =
-  let (_,[],f)::_ = !the_current_xgoalstack in
-   f null_inst [];;
-
-let top_thm() = 
-  let t = plain_top_thm() in
-  (inc_pg_global_state();
-   the_current_xgoalstack := [];
-   t);;
-
-(* ------------------------------------------------------------------------- *)
-(* Undo handling functions for Proof General                                *)
-(* ------------------------------------------------------------------------- *)
-
-let pg_undo n =
-  let l = !the_current_xgoalstack in
-   if length l < n then failwith "pg_undo: called with too many steps"
-   else (dec_pg_global_state n;
-         the_current_xgoalstack := snd (chop_list n l);
-         p());;
-
-let pg_kill() = 
-  let n = length (!the_current_xgoalstack) in
-  (dec_pg_global_state n;
-   the_current_xgoalstack := [];
-   print_string "*** Proof aborted.\n");;
-
-let pg_forget s = 
-   print_string ("*** Remove theorem "^s^"\n");;
-
-let pg_restart() = 
-   print_string "*** Session restarted.\n";;
-
-(* ------------------------------------------------------------------------- *)
-(* Configure the annotated prompt.                                          *)
-(* ------------------------------------------------------------------------- *)
-
-pg_prompt_info := 
-   fun () -> 
-   let pst = pg_proof_state () and gst = pg_global_state () in
-   string_of_int gst ^ "|" ^ string_of_int pst;;
-
-(* ------------------------------------------------------------------------- *)
-(* Printing the goal of a given Prooftree goal id.                           *)
-(* ------------------------------------------------------------------------- *)
-
-let print_xgoal_of_id (id:goal_id) : unit =
-  let gsts = !the_current_xgoalstack in
-  let find_goal (_,xgs,_) = find (fun (g,id0) -> id0 = id) xgs in
-  let xg = tryfind find_goal gsts in
-  print_xgoal xg;;
-
-(* ------------------------------------------------------------------------- *)
-(* Install the new goal-related printers.                                    *)
-(* ------------------------------------------------------------------------- *)
-
-#install_printer print_xgoal;;
-#install_printer print_xgoalstack;;
diff --git a/hol-light/temp-prooftree-configure.patch 
b/hol-light/temp-prooftree-configure.patch
deleted file mode 100644
index 8716610..0000000
--- a/hol-light/temp-prooftree-configure.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: generic/proof-tree.el
-===================================================================
-RCS file: /disk/cvs/proofgen/ProofGeneral/generic/proof-tree.el,v
-retrieving revision 12.3
-diff -c -r12.3 proof-tree.el
-*** generic/proof-tree.el      19 Jan 2012 13:23:56 -0000      12.3
---- generic/proof-tree.el      19 Jan 2012 13:25:30 -0000
-***************
-*** 492,498 ****
-    "Send the configure message."
-    (proof-tree-send-message
-     (format "configure for \"%s\" and protocol version %02d"
-!         proof-assistant
-          proof-tree-protocol-version)
-     ()))
-  
---- 492,499 ----
-    "Send the configure message."
-    (proof-tree-send-message
-     (format "configure for \"%s\" and protocol version %02d"
-!         ;; temporarily pretend every proof assistant is Coq
-!         "Coq" ;; was proof-assistant
-          proof-tree-protocol-version)
-     ()))
-  
diff --git a/hol98/README b/hol98/README
deleted file mode 100644
index 8462763..0000000
--- a/hol98/README
+++ /dev/null
@@ -1,53 +0,0 @@
-HOL Proof General, for HOL98.
-
-Written by David Aspinall.
-
-Status:              not officially supported yet
-Maintainer:   volunteer required
-HOL version:  HOL4/HOL98, tested with HOL 4 Kananaskis 2
-HOL homepage: http://hol.sourceforge.net
-
-========================================
-
-
-This is a "technology demonstration" of Proof General for HOL4.
-
-It may work with other versions of HOL, but is untested (please let me
-know if you try).  Probably just a few settings need changing to
-configure for different output formats.
-
-It has basic script management support, with a little bit of
-decoration of scripts and output.
-
-There is support for X Symbol, but not using a proper token language.
-
-I have written this in the hope that somebody from the HOL community
-will adopt it, maintain and improve it, and thus turn it into a proper
-instantiation of Proof General.
-
-
-------------
-
-Notes:
-
-There are some problems at the moment.  HOL proof scripts often use
-batch-oriented single step tactic proofs, but Proof General does not
-offer an easy way to edit these kind of proofs.  The "Boomburg-HOL"
-Emacs interface by Koichi Takahashi and Masima Hagiya addressed this,
-and to some extent so perhaps does the Emacs interface supplied with
-HOL.  Perhaps one of these could be embedded/reimplemented inside
-Proof General.  Implemented in a generic way, managing batch vs
-interactive proofs might also be useful for other provers.
-
-Another problem is that HOL scripts sometimes use SML structures,
-which can cause confusion because Proof General does not really parse
-SML, it just looks for semicolons.  This could be improved by taking a
-better parser (e.g. from sml mode).
-
-These improvements would be worthwhile contributions to Proof General
-and also provide the HOL community with a nice front end.  
-Please have a go!
-
-
-$Id$
-
diff --git a/hol98/example.sml b/hol98/example.sml
deleted file mode 100644
index 7e008eb..0000000
--- a/hol98/example.sml
+++ /dev/null
@@ -1,30 +0,0 @@
-(*
-    Example proof script for HOL Proof General.
-
-    $Id$
-*)    
-
-g `A /\ B ==> B /\ A`;
-e DISCH_TAC;
-e CONJ_TAC;
-e (IMP_RES_TAC AND_INTRO_THM);
-e (IMP_RES_TAC AND_INTRO_THM);
-val and_comms = pg_top_thm_and_drop();
-
-(* Hints about HOL Proof General:
- 
-   Proof General needs to work with top-level declarations throughout,
-   and with "interactive" rather than "batch" versions of proofs.
-
-   For best results, theorems should be saved in the way that they are
-   saved above, with pg_top_thm_and_drop.  The function isn't
-   mysterious, it is defined as:
-
-    fun pg_top_thm_and_drop () = let val t = top_thm(); in (drop(); t) end;
-*)
-
-(* this simple proof is not quite like proofs in the other systems,
-   can anyone tell me a more similar proof in HOL? I want to split 
-   the IMP_RES_TAC into two steps.  
-*)
-
diff --git a/hol98/hol98.el b/hol98/hol98.el
deleted file mode 100644
index 6f89707..0000000
--- a/hol98/hol98.el
+++ /dev/null
@@ -1,170 +0,0 @@
-;;; hol98.el --- Basic Proof General instance for HOL 98
-
-;; This file is part of Proof General.
-
-;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014  Free Software Foundation, Inc.
-;; Portions © Copyright 2001-2017  Pierre Courtieu
-;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
-;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
-;; Portions © Copyright 2015-2017  Clément Pit-Claudel
-
-;; Author: David Aspinall <David.Aspinall@ed.ac.uk>
-
-;;; Commentary:
-;; Needs improvement!
-;;
-;; See the README file in this directory for information.
-
-;;; Code:
-
-(require 'proof-easy-config)            ; easy configure mechanism
-(require 'proof-syntax)                        ; functions for making regexps
-
-(defvar hol98-keywords nil)
-(defvar hol98-rules nil)
-(defvar hol98-tactics nil)
-(defvar hol98-tacticals nil)
-
-(proof-easy-config  'hol98 "HOL"
- proof-prog-name                "hol.unquote"
- proof-terminal-string             ";"
- proof-script-comment-start             "(*"
- proof-script-comment-end               "*)"
- ;; These are all approximations, of course.
- proof-goal-command-regexp     "^g[ `]"
- proof-save-command-regexp     "pg_top_thm_and_drop"
- proof-goal-with-hole-regexp   "val \\(\\([^ \t=]*\\)\\)[ \t]*=[ \t]*prove"
- proof-save-with-hole-regexp   "val \\(\\([^ \t=]*\\)\\)[ \t]*=[ \t]*top_thm()"
- proof-non-undoables-regexp      "b()" ; and others..
- proof-goal-command              "g `%s`;"
- proof-save-command              "val %s = pg_top_thm_and_drop();"
- proof-kill-goal-command         "drop();"
- proof-showproof-command         "p()"
- proof-undo-n-times-cmd          "(pg_repeat backup %s; p());"
- proof-auto-multiple-files       t
- proof-shell-cd-cmd              "FileSys.chDir \"%s\""
- proof-shell-filename-escapes    '(("\\\\" . "\\\\") ("\""   . "\\\""))
- proof-shell-interrupt-regexp    "Interrupted"
- proof-shell-start-goals-regexp
- (proof-regexp-alt "Proof manager status"
-                  "OK.."
-                  "val it =\n")
- proof-shell-end-goals-regexp
- (proof-regexp-alt "^[ \t]*: GoalstackPure.goalstack"
-                  "^[ \t]*: GoalstackPure.proofs")
- proof-shell-quit-cmd            "quit();"
- proof-assistant-home-page
- "http://www.cl.cam.ac.uk/Research/HVG/HOL/HOL.html";
- proof-shell-annotated-prompt-regexp
- "^- "
- ;; This one is nice but less reliable, I think.
- ;; "\\(> val it = () : unit\n\\)?- "
- proof-shell-error-regexp "^! "
- proof-shell-init-cmd
- "Help.displayLines:=3000;
-  fun pg_repeat f 0 = () | pg_repeat f n = (f(); pg_repeat f (n-1));
-  fun pg_top_thm_and_drop () = let val t = top_thm(); in (drop(); t) end;"
- ;; FIXME: add optional help topic parameter to help command.
- proof-info-command                "help \"hol\""
- proof-shell-proof-completed-regexp "Initial goal proved"
- ;; FIXME: next one needs setting so that "urgent" messages are displayed
- ;; eagerly from HOL.
- ;; proof-shell-eager-annotation-start
- proof-find-theorems-command   "DB.match [] (%s);"
-
- proof-forget-id-command       ";" ;; vacuous: but empty string doesn't give
-                                   ;; new prompt
- ;; We must force this to use ptys since mosml doesn't flush its output
- ;; (on Linux, presumably on Solaris too).
- proof-shell-process-connection-type t
-
- ;;
- ;; Syntax table entries for proof scripts
- ;;
- proof-script-syntax-table-entries
- '(?\` "\""
-   ?\$ "."
-   ?\/ "."
-   ?\\ "."
-   ?+  "."
-   ?-  "."
-   ?=  "."
-   ?%  "."
-   ?<  "."
-   ?>  "."
-   ?\& "."
-   ?.  "w"
-   ?_  "w"
-   ?\' "w"
-   ?\| "."
-   ?\* ". 23"
-   ?\( "()1"
-   ?\) ")(4")
-
- ;;
- ;; A few of the vast variety of keywords, tactics, tacticals,
- ;; for decorating proof scripts.
- ;;
- ;; In the future, PG will use a mechanism for passing identifier
- ;; lists like this from the proof assistant, we don't really
- ;; want to duplicate the information here!
- ;;
- hol98-keywords  '("g" "expand" "e" "val" "store_thm" "top_thm" "by"
-                  "pg_top_thm_and_drop"
-                  "Define" "xDefine" "Hol_defn"
-                  "Induct" "Cases" "Cases_on" "Induct_on"
-                  "std_ss" "arith_ss" "list_ss"
-                  "define_type")
- hol98-rules    '("ASSUME" "REFL" "BETA_CONV" "SUBST"
-                  "ABS" "INST_TYPE" "DISCH" "MP"
-                  "T_DEF" "FORALL_DEF" "AND_DEF" "OR_DEF" "F_DEF"
-                  "NOT_DEF" "EXISTS_UNIQUE_DEF" "BOOL_CASES_AX"
-                  "IMP_ANTISYM_AX" "ETA_AX" "SELECT_AX" "ONE_ONE_DEF"
-                  "ONTO_DEF" "INFINITY_AX" "LET_DEF" "COND_DEF" "ARB_DEF")
- hol98-tactics   '("ACCEPT_TAC" "ASSUME_TAC" "GEN_TAC"
-                  "CONJ_TAC" "DISCH_TAC" "STRIP_TAC"
-                  "SUBST_TAC" "ASM_CASES_TAC" "DISJ_CASES_TAC"
-                  "REWRITE_TAC" "IMP_RES_TAC" "ALL_TAC" "NO_TAC"
-                  "EQ_TAC" "EXISTS_TAC" "INDUCT_TAC"
-                  "POP_ASM" "SUBST1_TAC" "ASSUM_LIST"
-                  "PROVE" "PROVE_TAC" "DECIDE" "DECIDE_TAC" "RW_TAC"
-                  "STP_TAC" "ZAP_TAC"
-                  "EXISTS_TAC")
- hol98-tacticals '("ORELSE" "FIRST" "CHANGED_TAC" "THEN"
-                  "THENL" "EVERY" "REPEAT"
-                  "MAP_EVERY")
- proof-script-font-lock-keywords
- (list
-  (cons (proof-ids-to-regexp hol98-keywords) 'font-lock-keyword-face)
-  (cons (proof-ids-to-regexp hol98-tactics) 'font-lock-keyword-face)
-  ; (cons (proof-ids-to-regexp hol98-rules) 'font-lock-keyword-face)
-  (cons (proof-ids-to-regexp hol98-tacticals) 'proof-tacticals-name-face))
-
- ;;
- ;; Some decoration of the goals output
- ;;
- proof-goals-font-lock-keywords
- (list
-  (cons (proof-ids-to-regexp '("Proof manager status"
-                              "proof" "Incomplete"
-                              "Initial goal proved"
-                              "Initial goal"
-                              "There are currently no proofs"
-                              "OK"))
-       'font-lock-keyword-face)
-  (cons (regexp-quote "------------------------------------")
-       'font-lock-comment-face)
-  (cons ": GoalstackPure.goalstack" 'proof-boring-face)
-  (cons ": GoalstackPure.proofs"    'proof-boring-face)
-  (cons ": Thm.thm"                'proof-boring-face)
-  (cons "val it ="                 'proof-boring-face))
-
- ;; End of easy config.
- )
-
-
-(warn "Hol Proof General is incomplete!  Please help improve it!
-Read the manual, make improvements and send them to 
da+pg-feedback@inf.ed.ac.uk")
-
-(provide 'hol98)
diff --git a/hol98/root2.sml b/hol98/root2.sml
deleted file mode 100644
index 0644fc3..0000000
--- a/hol98/root2.sml
+++ /dev/null
@@ -1,83 +0,0 @@
-(* Example proof by Konrad Slind.  See http://www.cs.kun.nl/~freek/comparison/ 
-   Taken from HOL4 distribution hol98/examples/root2.sml *)
-
-(*---------------------------------------------------------------------------*)
-(* Challenge from Freek Wiedijk: the square root of two is not rational.     *)
-(* I've adapted a proof in HOL Light by John Harrison.                       *)
-(*---------------------------------------------------------------------------*)
- 
-load "transcTheory";   open arithmeticTheory BasicProvers;
-
-(*---------------------------------------------------------------------------*)
-(* Need a predicate on reals that picks out the rational ones                *)
-(*---------------------------------------------------------------------------*)
-
-val Rational_def = Define `Rational r = ?p q. ~(q=0) /\ (abs(r) = &p / &q)`;
-
-(*---------------------------------------------------------------------------*)
-(* Trivial lemmas                                                            *)
-(*---------------------------------------------------------------------------*)
-
-val EXP_2 = Q.prove(`!n:num. n**2 = n*n`,
-  REWRITE_TAC [TWO,ONE,EXP] THEN RW_TAC arith_ss []);
-
-val EXP2_LEM = Q.prove(`!x y:num. ((2*x)**2 = 2*(y**2)) = (2*(x**2) = y**2)`,
- REWRITE_TAC [TWO,EXP_2]
- THEN PROVE_TAC [MULT_MONO_EQ,MULT_ASSOC,MULT_SYM]);
-
-(*---------------------------------------------------------------------------*)
-(* Lemma: squares are not doublings of squares, except trivially.            *)
-(*---------------------------------------------------------------------------*)
-
-val lemma = Q.prove
-(`!m n. (m**2 = 2 * n**2) ==> (m=0) /\ (n=0)`,
- completeInduct_on `m` THEN NTAC 2 STRIP_TAC THEN
-  `?k. m = 2*k`      by PROVE_TAC[EVEN_DOUBLE,EXP_2,EVEN_MULT,EVEN_EXISTS] 
-                     THEN VAR_EQ_TAC THEN
-  `?p. n = 2*p`      by PROVE_TAC[EVEN_DOUBLE,EXP_2,EVEN_MULT,
-                                  EVEN_EXISTS,EXP2_LEM] 
-                     THEN VAR_EQ_TAC THEN
-  `k**2 = 2*(p**2)`  by PROVE_TAC [EXP2_LEM] THEN
-  `(k=0) \/ k < 2*k` by numLib.ARITH_TAC
- THENL [FULL_SIMP_TAC arith_ss [EXP_2],
-        PROVE_TAC [MULT_EQ_0, DECIDE (Term `~(2 = 0n)`)]]);
-
-(*---------------------------------------------------------------------------*)
-(* The proof moves the problem from R to N, then uses lemma                  *)
-(*---------------------------------------------------------------------------*)
-
-local open realTheory transcTheory
-in
-val SQRT_2_IRRATIONAL = Q.prove
-(`~Rational (sqrt 2r)`,
- RW_TAC std_ss [Rational_def,abs,SQRT_POS_LE,REAL_POS]
-  THEN Cases_on `q = 0` THEN ASM_REWRITE_TAC []
-  THEN SPOSE_NOT_THEN (MP_TAC o Q.AP_TERM `\x. x pow 2`)
-  THEN RW_TAC arith_ss [SQRT_POW_2, REAL_POS, REAL_POW_DIV,
-                        REAL_EQ_RDIV_EQ,REAL_LT, REAL_POW_LT]
-  THEN REWRITE_TAC [REAL_OF_NUM_POW, REAL_MUL, REAL_INJ]
-  THEN PROVE_TAC [lemma])
-end;
-
-(*---------------------------------------------------------------------------*)
-(* The following is a bit more declarative                                   *)
-(*---------------------------------------------------------------------------*)
-
-infix THEN1;
-fun ie q tac = Q_TAC SUFF_TAC q THEN1 tac;
-
-local open realTheory transcTheory
-in
-val SQRT_2_IRRATIONAL = Q.prove
-(`~Rational (sqrt 2r)`,
- ie `!p q. ~(q=0) ==> ~(sqrt 2 = & p / & q)` 
-             (RW_TAC std_ss [Rational_def,abs,SQRT_POS_LE,REAL_POS] 
-               THEN PROVE_TAC[]) THEN RW_TAC std_ss [] THEN
- ie `~(sqrt 2 = & p / & q)` (PROVE_TAC []) THEN 
- ie `~(2 * q**2 = p**2)` 
-             (DISCH_TAC THEN SPOSE_NOT_THEN (MP_TAC o Q.AP_TERM `\x. x pow 2`) 
-              THEN RW_TAC arith_ss [SQRT_POW_2,REAL_POS,
-                          REAL_POW_DIV,REAL_EQ_RDIV_EQ,REAL_LT, REAL_POW_LT] 
-              THEN ASM_REWRITE_TAC [REAL_OF_NUM_POW, REAL_MUL,REAL_INJ])
-  THEN PROVE_TAC [lemma])
-end;
diff --git a/isar/Example-Tokens.thy b/isar/Example-Tokens.thy
deleted file mode 100644
index 46c9a2c..0000000
--- a/isar/Example-Tokens.thy
+++ /dev/null
@@ -1,37 +0,0 @@
-(*
-      Example proof document for Isabelle/Isar Proof General,
-      using symbols.  
-      View and process this document with Unicode Tokens engaged.
-   
-      For a more exhaustive test of token display, visit the test
-      file etc/isar/TokensAcid.thy.  Check the FAQ for more advice.
-
-      $Id$
-*)
-
-theory "Example-Tokens" imports Main begin
-
-text {* Proper proof text -- \<^bitalic>naive version\<^eitalic>. *}
-
-theorem and_comms: "\<phi> \<and> \<psi> \<longrightarrow> \<psi> \<and> 
\<phi>"
-proof
-  assume "\<phi> \<and> \<psi>"
-  then show "\<psi> \<and> \<phi>"
-  proof
-    assume "\<psi>" and "\<phi>"
-    then show ?thesis ..
- qed
-qed
-
-text {* \<^bbold>Unstructured\<^ebold> proof script. *}
-
-theorem "\<phi>\<^isub>\<alpha> \<and> \<phi>\<^isub>\<beta> \<longrightarrow> 
\<phi>\<^isub>\<beta> \<and> \<phi>\<^isub>\<alpha>"
-  apply (rule impI)
-  apply (erule conjE)
-  apply (rule conjI)
-  apply assumption
-  apply assumption
-done
-
-end
-
diff --git a/isar/Example.thy b/isar/Example.thy
deleted file mode 100644
index 01b755d..0000000
--- a/isar/Example.thy
+++ /dev/null
@@ -1,33 +0,0 @@
-(*
-      Example proof document for Isabelle/Isar Proof General.
-   
-      $Id$
-*)
-
-
-theory Example imports Main begin
-
-text {* Proper proof text -- \textit{naive version}. *}
-
-theorem and_comms: "A & B --> B & A"
-proof
-  assume "A & B"
-  then show "B & A"
-  proof
-    assume "B" and "A"
-    then show ?thesis ..
- qed
-qed
-
-text {* Unstructured proof script. *}
-
-theorem  "A & B --> B & A"
-  apply (rule impI)
-  apply (erule conjE)
-  apply (rule conjI)
-  apply assumption
-  apply assumption
-done
-
-
-end
diff --git a/isar/README b/isar/README
deleted file mode 100644
index bd1e377..0000000
--- a/isar/README
+++ /dev/null
@@ -1,33 +0,0 @@
-Isabelle/Isar Proof General
-
-Written by Markus Wenzel and David Aspinall.
-
-Contributions from David von Oheimb, Stefan Berghofer, 
- Sebastian Skalberg, Gerwin Klein, Tjark Weber.
-
-Status:                    supported
-Maintainers:       David Aspinall, Makarius Wenzel
-Isabelle versions:  Isabelle2011 (earlier versions not guaranteed)
-Isabelle homepage:  http://www.cl.cam.ac.uk/Research/HVG/Isabelle/
-
-===========================================================================
-
-Isabelle/Isar Proof General has full support for multiple file
-scripting, with dependencies between theories communicated between
-Isabelle and Proof General.  
-
-There is full support for Unicode Tokens, using the Isabelle print
-mode for X Symbol tokens.  Many Isabelle theories have X Symbol syntax
-already defined and it's easy to add to your own theories.
-
-The script `interface' and file 'interface-setup.el' are used
-internally to start Isabelle Proof General via the 'isabelle' shell
-command.  This is the default way to invoke Proof General from the
-Isabelle perspective; it enables Isabelle to provide a consistent
-process and file-system environment, including the all-important
-isar-keywords.el file.
-
-========================================
-
-$Id$
-
diff --git a/isar/ex/Knaster_Tarski.thy b/isar/ex/Knaster_Tarski.thy
deleted file mode 100644
index ff7e77f..0000000
--- a/isar/ex/Knaster_Tarski.thy
+++ /dev/null
@@ -1,110 +0,0 @@
-(********** 
-  This file is copied from Isabelle2011.
- **********)
-
-(*  Title:      HOL/Isar_Examples/Knaster_Tarski.thy
-    Author:     Markus Wenzel, TU Muenchen
-
-Typical textbook proof example.
-*)
-
-header {* Textbook-style reasoning: the Knaster-Tarski Theorem *}
-
-theory Knaster_Tarski
-imports Main "~~/src/HOL/Library/Lattice_Syntax"
-begin
-
-
-subsection {* Prose version *}
-
-text {* According to the textbook \cite[pages
-  93--94]{davey-priestley}, the Knaster-Tarski fixpoint theorem is as
-  follows.\footnote{We have dualized the argument, and tuned the
-  notation a little bit.}
-
-  \textbf{The Knaster-Tarski Fixpoint Theorem.}  Let @{text L} be a
-  complete lattice and @{text "f: L \<rightarrow> L"} an order-preserving map.
-  Then @{text "\<Sqinter>{x \<in> L | f(x) \<le> x}"} is a fixpoint of @{text 
f}.
-
-  \textbf{Proof.} Let @{text "H = {x \<in> L | f(x) \<le> x}"} and @{text "a =
-  \<Sqinter>H"}.  For all @{text "x \<in> H"} we have @{text "a \<le> x"}, so 
@{text
-  "f(a) \<le> f(x) \<le> x"}.  Thus @{text "f(a)"} is a lower bound of @{text
-  H}, whence @{text "f(a) \<le> a"}.  We now use this inequality to prove
-  the reverse one (!) and thereby complete the proof that @{text a} is
-  a fixpoint.  Since @{text f} is order-preserving, @{text "f(f(a)) \<le>
-  f(a)"}.  This says @{text "f(a) \<in> H"}, so @{text "a \<le> f(a)"}. *}
-
-
-subsection {* Formal versions *}
-
-text {* The Isar proof below closely follows the original
-  presentation.  Virtually all of the prose narration has been
-  rephrased in terms of formal Isar language elements.  Just as many
-  textbook-style proofs, there is a strong bias towards forward proof,
-  and several bends in the course of reasoning. *}
-
-theorem Knaster_Tarski:
-  fixes f :: "'a::complete_lattice \<Rightarrow> 'a"
-  assumes "mono f"
-  shows "\<exists>a. f a = a"
-proof
-  let ?H = "{u. f u \<le> u}"
-  let ?a = "\<Sqinter>?H"
-  show "f ?a = ?a"
-  proof -
-    {
-      fix x
-      assume "x \<in> ?H"
-      then have "?a \<le> x" by (rule Inf_lower)
-      with `mono f` have "f ?a \<le> f x" ..
-      also from `x \<in> ?H` have "\<dots> \<le> x" ..
-      finally have "f ?a \<le> x" .
-    }
-    then have "f ?a \<le> ?a" by (rule Inf_greatest)
-    {
-      also presume "\<dots> \<le> f ?a"
-      finally (order_antisym) show ?thesis .
-    }
-    from `mono f` and `f ?a \<le> ?a` have "f (f ?a) \<le> f ?a" ..
-    then have "f ?a \<in> ?H" ..
-    then show "?a \<le> f ?a" by (rule Inf_lower)
-  qed
-qed
-
-text {* Above we have used several advanced Isar language elements,
-  such as explicit block structure and weak assumptions.  Thus we have
-  mimicked the particular way of reasoning of the original text.
-
-  In the subsequent version the order of reasoning is changed to
-  achieve structured top-down decomposition of the problem at the
-  outer level, while only the inner steps of reasoning are done in a
-  forward manner.  We are certainly more at ease here, requiring only
-  the most basic features of the Isar language. *}
-
-theorem Knaster_Tarski':
-  fixes f :: "'a::complete_lattice \<Rightarrow> 'a"
-  assumes "mono f"
-  shows "\<exists>a. f a = a"
-proof
-  let ?H = "{u. f u \<le> u}"
-  let ?a = "\<Sqinter>?H"
-  show "f ?a = ?a"
-  proof (rule order_antisym)
-    show "f ?a \<le> ?a"
-    proof (rule Inf_greatest)
-      fix x
-      assume "x \<in> ?H"
-      then have "?a \<le> x" by (rule Inf_lower)
-      with `mono f` have "f ?a \<le> f x" ..
-      also from `x \<in> ?H` have "\<dots> \<le> x" ..
-      finally show "f ?a \<le> x" .
-    qed
-    show "?a \<le> f ?a"
-    proof (rule Inf_lower)
-      from `mono f` and `f ?a \<le> ?a` have "f (f ?a) \<le> f ?a" ..
-      then show "f ?a \<in> ?H" ..
-    qed
-  qed
-qed
-
-end
diff --git a/isar/ex/PER.thy b/isar/ex/PER.thy
deleted file mode 100644
index 068885b..0000000
--- a/isar/ex/PER.thy
+++ /dev/null
@@ -1,269 +0,0 @@
-(********** 
-  This file is copied from Isabelle2011. 
-  It has been beautified with Tokens \<rightarrow> Replace Shortcuts
- **********)
-
-(*  Title:      HOL/ex/PER.thy
-    Author:     Oscar Slotosch and Markus Wenzel, TU Muenchen
-*)
-
-header {* Partial equivalence relations *}
-
-theory PER imports Main begin
-
-text {*
-  Higher-order quotients are defined over partial equivalence
-  relations (PERs) instead of total ones.  We provide axiomatic type
-  classes @{text "equiv < partial_equiv"} and a type constructor
-  @{text "'a quot"} with basic operations.  This development is based
-  on:
-
-  Oscar Slotosch: \emph{Higher Order Quotients and their
-  Implementation in Isabelle HOL.}  Elsa L. Gunter and Amy Felty,
-  editors, Theorem Proving in Higher Order Logics: TPHOLs '97,
-  Springer LNCS 1275, 1997.
-*}
-
-
-subsection {* Partial equivalence *}
-
-text {*
-  Type class @{text partial_equiv} models partial equivalence
-  relations (PERs) using the polymorphic @{text "\<sim> :: 'a \<Rightarrow> 'a 
\<Rightarrow>
-  bool"} relation, which is required to be symmetric and transitive,
-  but not necessarily reflexive.
-*}
-
-class partial_equiv =
-  fixes eqv :: "'a \<Rightarrow> 'a \<Rightarrow> bool"    (infixl "\<sim>" 50)
-  assumes partial_equiv_sym [elim?]: "x \<sim> y \<Longrightarrow> y \<sim> x"
-  assumes partial_equiv_trans [trans]: "x \<sim> y \<Longrightarrow> y \<sim> 
z \<Longrightarrow> x \<sim> z"
-
-text {*
-  \medskip The domain of a partial equivalence relation is the set of
-  reflexive elements.  Due to symmetry and transitivity this
-  characterizes exactly those elements that are connected with
-  \emph{any} other one.
-*}
-
-definition
-  "domain" :: "'a::partial_equiv set" where
-  "domain = {x. x \<sim> x}"
-
-lemma domainI [intro]: "x \<sim> x \<Longrightarrow> x \<in> domain"
-  unfolding domain_def by blast
-
-lemma domainD [dest]: "x \<in> domain \<Longrightarrow> x \<sim> x"
-  unfolding domain_def by blast
-
-theorem domainI' [elim?]: "x \<sim> y \<Longrightarrow> x \<in> domain"
-proof
-  assume xy: "x \<sim> y"
-  also from xy have "y \<sim> x" ..
-  finally show "x \<sim> x" .
-qed
-
-
-subsection {* Equivalence on function spaces *}
-
-text {*
-  The @{text \<sim>} relation is lifted to function spaces.  It is
-  important to note that this is \emph{not} the direct product, but a
-  structural one corresponding to the congruence property.
-*}
-
-instantiation "fun" :: (partial_equiv, partial_equiv) partial_equiv
-begin
-
-definition
-  eqv_fun_def: "f \<sim> g \<equiv> \<forall>x \<in> domain. \<forall>y \<in> 
domain. x \<sim> y \<longrightarrow> f x \<sim> g y"
-
-lemma partial_equiv_funI [intro?]:
-    "(\<And>x y. x \<in> domain \<Longrightarrow> y \<in> domain 
\<Longrightarrow> x \<sim> y \<Longrightarrow> f x \<sim> g y) 
\<Longrightarrow> f \<sim> g"
-  unfolding eqv_fun_def by blast
-
-lemma partial_equiv_funD [dest?]:
-    "f \<sim> g \<Longrightarrow> x \<in> domain \<Longrightarrow> y \<in> 
domain \<Longrightarrow> x \<sim> y \<Longrightarrow> f x \<sim> g y"
-  unfolding eqv_fun_def by blast
-
-text {*
-  The class of partial equivalence relations is closed under function
-  spaces (in \emph{both} argument positions).
-*}
-
-instance proof
-  fix f g h :: "'a::partial_equiv \<Rightarrow> 'b::partial_equiv"
-  assume fg: "f \<sim> g"
-  show "g \<sim> f"
-  proof
-    fix x y :: 'a
-    assume x: "x \<in> domain" and y: "y \<in> domain"
-    assume "x \<sim> y" then have "y \<sim> x" ..
-    with fg y x have "f y \<sim> g x" ..
-    then show "g x \<sim> f y" ..
-  qed
-  assume gh: "g \<sim> h"
-  show "f \<sim> h"
-  proof
-    fix x y :: 'a
-    assume x: "x \<in> domain" and y: "y \<in> domain" and "x \<sim> y"
-    with fg have "f x \<sim> g y" ..
-    also from y have "y \<sim> y" ..
-    with gh y y have "g y \<sim> h y" ..
-    finally show "f x \<sim> h y" .
-  qed
-qed
-
-end
-
-
-subsection {* Total equivalence *}
-
-text {*
-  The class of total equivalence relations on top of PERs.  It
-  coincides with the standard notion of equivalence, i.e.\ @{text "\<sim>
-  :: 'a \<Rightarrow> 'a \<Rightarrow> bool"} is required to be reflexive, 
transitive and
-  symmetric.
-*}
-
-class equiv =
-  assumes eqv_refl [intro]: "x \<sim> x"
-
-text {*
-  On total equivalences all elements are reflexive, and congruence
-  holds unconditionally.
-*}
-
-theorem equiv_domain [intro]: "(x::'a::equiv) \<in> domain"
-proof
-  show "x \<sim> x" ..
-qed
-
-theorem equiv_cong [dest?]: "f \<sim> g \<Longrightarrow> x \<sim> y 
\<Longrightarrow> f x \<sim> g (y::'a::equiv)"
-proof -
-  assume "f \<sim> g"
-  moreover have "x \<in> domain" ..
-  moreover have "y \<in> domain" ..
-  moreover assume "x \<sim> y"
-  ultimately show ?thesis ..
-qed
-
-
-subsection {* Quotient types *}
-
-text {*
-  The quotient type @{text "'a quot"} consists of all
-  \emph{equivalence classes} over elements of the base type @{typ 'a}.
-*}
-
-typedef 'a quot = "{{x. a \<sim> x}| a::'a::partial_equiv. True}"
-  by blast
-
-lemma quotI [intro]: "{x. a \<sim> x} \<in> quot"
-  unfolding quot_def by blast
-
-lemma quotE [elim]: "R \<in> quot \<Longrightarrow> (\<And>a. R = {x. a \<sim> 
x} \<Longrightarrow> C) \<Longrightarrow> C"
-  unfolding quot_def by blast
-
-text {*
-  \medskip Abstracted equivalence classes are the canonical
-  representation of elements of a quotient type.
-*}
-
-definition
-  eqv_class :: "('a::partial_equiv) \<Rightarrow> 'a quot"    
("\<lfloor>_\<rfloor>") where
-  "\<lfloor>a\<rfloor> = Abs_quot {x. a \<sim> x}"
-
-theorem quot_rep: "\<exists>a. A = \<lfloor>a\<rfloor>"
-proof (cases A)
-  fix R assume R: "A = Abs_quot R"
-  assume "R \<in> quot" then have "\<exists>a. R = {x. a \<sim> x}" by blast
-  with R have "\<exists>a. A = Abs_quot {x. a \<sim> x}" by blast
-  then show ?thesis by (unfold eqv_class_def)
-qed
-
-lemma quot_cases [cases type: quot]:
-  obtains (rep) a where "A = \<lfloor>a\<rfloor>"
-  using quot_rep by blast
-
-
-subsection {* Equality on quotients *}
-
-text {*
-  Equality of canonical quotient elements corresponds to the original
-  relation as follows.
-*}
-
-theorem eqv_class_eqI [intro]: "a \<sim> b \<Longrightarrow> 
\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor>"
-proof -
-  assume ab: "a \<sim> b"
-  have "{x. a \<sim> x} = {x. b \<sim> x}"
-  proof (rule Collect_cong)
-    fix x show "(a \<sim> x) = (b \<sim> x)"
-    proof
-      from ab have "b \<sim> a" ..
-      also assume "a \<sim> x"
-      finally show "b \<sim> x" .
-    next
-      note ab
-      also assume "b \<sim> x"
-      finally show "a \<sim> x" .
-    qed
-  qed
-  then show ?thesis by (simp only: eqv_class_def)
-qed
-
-theorem eqv_class_eqD' [dest?]: "\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor> 
\<Longrightarrow> a \<in> domain \<Longrightarrow> a \<sim> b"
-proof (unfold eqv_class_def)
-  assume "Abs_quot {x. a \<sim> x} = Abs_quot {x. b \<sim> x}"
-  then have "{x. a \<sim> x} = {x. b \<sim> x}" by (simp only: Abs_quot_inject 
quotI)
-  moreover assume "a \<in> domain" then have "a \<sim> a" ..
-  ultimately have "a \<in> {x. b \<sim> x}" by blast
-  then have "b \<sim> a" by blast
-  then show "a \<sim> b" ..
-qed
-
-theorem eqv_class_eqD [dest?]: "\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor> 
\<Longrightarrow> a \<sim> (b::'a::equiv)"
-proof (rule eqv_class_eqD')
-  show "a \<in> domain" ..
-qed
-
-lemma eqv_class_eq' [simp]: "a \<in> domain \<Longrightarrow> 
(\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor>) = (a \<sim> b)"
-  using eqv_class_eqI eqv_class_eqD' by (blast del: eqv_refl)
-
-lemma eqv_class_eq [simp]: "(\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor>) = (a 
\<sim> (b::'a::equiv))"
-  using eqv_class_eqI eqv_class_eqD by blast
-
-
-subsection {* Picking representing elements *}
-
-definition
-  pick :: "'a::partial_equiv quot \<Rightarrow> 'a" where
-  "pick A = (SOME a. A = \<lfloor>a\<rfloor>)"
-
-theorem pick_eqv' [intro?, simp]: "a \<in> domain \<Longrightarrow> pick 
\<lfloor>a\<rfloor> \<sim> a"
-proof (unfold pick_def)
-  assume a: "a \<in> domain"
-  show "(SOME x. \<lfloor>a\<rfloor> = \<lfloor>x\<rfloor>) \<sim> a"
-  proof (rule someI2)
-    show "\<lfloor>a\<rfloor> = \<lfloor>a\<rfloor>" ..
-    fix x assume "\<lfloor>a\<rfloor> = \<lfloor>x\<rfloor>"
-    from this and a have "a \<sim> x" ..
-    then show "x \<sim> a" ..
-  qed
-qed
-
-theorem pick_eqv [intro, simp]: "pick \<lfloor>a\<rfloor> \<sim> 
(a::'a::equiv)"
-proof (rule pick_eqv')
-  show "a \<in> domain" ..
-qed
-
-theorem pick_inverse: "\<lfloor>pick A\<rfloor> = (A::'a::equiv quot)"
-proof (cases A)
-  fix a assume a: "A = \<lfloor>a\<rfloor>"
-  then have "pick A \<sim> a" by simp
-  then have "\<lfloor>pick A\<rfloor> = \<lfloor>a\<rfloor>" by simp
-  with a show ?thesis by simp
-qed
-
-end
diff --git a/isar/ex/README b/isar/ex/README
deleted file mode 100644
index c70f02f..0000000
--- a/isar/ex/README
+++ /dev/null
@@ -1,8 +0,0 @@
-This directory contains some example files copied from the Isabelle
-distribution.
-
-These are re-distributed with Proof General for convenience of trying
-out PG without needing a local installation of Isabelle.
-
-They can also be used as test cases.
-
diff --git a/isar/ex/Sqrt.thy b/isar/ex/Sqrt.thy
deleted file mode 100644
index 96164f9..0000000
--- a/isar/ex/Sqrt.thy
+++ /dev/null
@@ -1,90 +0,0 @@
-(*  Title:      HOL/ex/Sqrt.thy
-    Author:     Markus Wenzel, TU Muenchen
-*)
-
-header {*  Square roots of primes are irrational *}
-
-theory Sqrt
-imports Complex_Main "~~/src/HOL/Number_Theory/Primes"
-begin
-
-text {*
-  The square root of any prime number (including @{text 2}) is
-  irrational.
-*}
-
-theorem sqrt_prime_irrational:
-  assumes "prime (p::nat)"
-  shows "sqrt (real p) \<notin> \<rat>"
-proof
-  from `prime p` have p: "1 < p" by (simp add: prime_nat_def)
-  assume "sqrt (real p) \<in> \<rat>"
-  then obtain m n :: nat where
-      n: "n \<noteq> 0" and sqrt_rat: "\<bar>sqrt (real p)\<bar> = real m / 
real n"
-    and gcd: "gcd m n = 1" by (rule Rats_abs_nat_div_natE)
-  have eq: "m\<twosuperior> = p * n\<twosuperior>"
-  proof -
-    from n and sqrt_rat have "real m = \<bar>sqrt (real p)\<bar> * real n" by 
simp
-    then have "real (m\<twosuperior>) = (sqrt (real p))\<twosuperior> * real 
(n\<twosuperior>)"
-      by (auto simp add: power2_eq_square)
-    also have "(sqrt (real p))\<twosuperior> = real p" by simp
-    also have "\<dots> * real (n\<twosuperior>) = real (p * n\<twosuperior>)" 
by simp
-    finally show ?thesis ..
-  qed
-  have "p dvd m \<and> p dvd n"
-  proof
-    from eq have "p dvd m\<twosuperior>" ..
-    with `prime p` pos2 show "p dvd m" by (rule prime_dvd_power_nat)
-    then obtain k where "m = p * k" ..
-    with eq have "p * n\<twosuperior> = p\<twosuperior> * k\<twosuperior>" by 
(auto simp add: power2_eq_square mult_ac)
-    with p have "n\<twosuperior> = p * k\<twosuperior>" by (simp add: 
power2_eq_square)
-    then have "p dvd n\<twosuperior>" ..
-    with `prime p` pos2 show "p dvd n" by (rule prime_dvd_power_nat)
-  qed
-  then have "p dvd gcd m n" ..
-  with gcd have "p dvd 1" by simp
-  then have "p \<le> 1" by (simp add: dvd_imp_le)
-  with p show False by simp
-qed
-
-corollary "sqrt (real (2::nat)) \<notin> \<rat>"
-  by (rule sqrt_prime_irrational) (rule two_is_prime_nat)
-
-
-subsection {* Variations *}
-
-text {*
-  Here is an alternative version of the main proof, using mostly
-  linear forward-reasoning.  While this results in less top-down
-  structure, it is probably closer to proofs seen in mathematics.
-*}
-
-theorem
-  assumes "prime (p::nat)"
-  shows "sqrt (real p) \<notin> \<rat>"
-proof
-  from `prime p` have p: "1 < p" by (simp add: prime_nat_def)
-  assume "sqrt (real p) \<in> \<rat>"
-  then obtain m n :: nat where
-      n: "n \<noteq> 0" and sqrt_rat: "\<bar>sqrt (real p)\<bar> = real m / 
real n"
-    and gcd: "gcd m n = 1" by (rule Rats_abs_nat_div_natE)
-  from n and sqrt_rat have "real m = \<bar>sqrt (real p)\<bar> * real n" by 
simp
-  then have "real (m\<twosuperior>) = (sqrt (real p))\<twosuperior> * real 
(n\<twosuperior>)"
-    by (auto simp add: power2_eq_square)
-  also have "(sqrt (real p))\<twosuperior> = real p" by simp
-  also have "\<dots> * real (n\<twosuperior>) = real (p * n\<twosuperior>)" by 
simp
-  finally have eq: "m\<twosuperior> = p * n\<twosuperior>" ..
-  then have "p dvd m\<twosuperior>" ..
-  with `prime p` pos2 have dvd_m: "p dvd m" by (rule prime_dvd_power_nat)
-  then obtain k where "m = p * k" ..
-  with eq have "p * n\<twosuperior> = p\<twosuperior> * k\<twosuperior>" by 
(auto simp add: power2_eq_square mult_ac)
-  with p have "n\<twosuperior> = p * k\<twosuperior>" by (simp add: 
power2_eq_square)
-  then have "p dvd n\<twosuperior>" ..
-  with `prime p` pos2 have "p dvd n" by (rule prime_dvd_power_nat)
-  with dvd_m have "p dvd gcd m n" by (rule gcd_greatest_nat)
-  with gcd have "p dvd 1" by simp
-  then have "p \<le> 1" by (simp add: dvd_imp_le)
-  with p show False by simp
-qed
-
-end
diff --git a/isar/ex/Sqrt_Script.thy b/isar/ex/Sqrt_Script.thy
deleted file mode 100644
index 08634ea..0000000
--- a/isar/ex/Sqrt_Script.thy
+++ /dev/null
@@ -1,70 +0,0 @@
-(*  Title:      HOL/ex/Sqrt_Script.thy
-    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
-    Copyright   2001  University of Cambridge
-*)
-
-header {* Square roots of primes are irrational (script version) *}
-
-theory Sqrt_Script
-imports Complex_Main "~~/src/HOL/Number_Theory/Primes"
-begin
-
-text {*
-  \medskip Contrast this linear Isabelle/Isar script with Markus
-  Wenzel's more mathematical version.
-*}
-
-subsection {* Preliminaries *}
-
-lemma prime_nonzero:  "prime (p::nat) \<Longrightarrow> p \<noteq> 0"
-  by (force simp add: prime_nat_def)
-
-lemma prime_dvd_other_side:
-    "(n::nat) * n = p * (k * k) \<Longrightarrow> prime p \<Longrightarrow> p 
dvd n"
-  apply (subgoal_tac "p dvd n * n", blast dest: prime_dvd_mult_nat)
-  apply auto
-  done
-
-lemma reduction: "prime (p::nat) \<Longrightarrow>
-    0 < k \<Longrightarrow> k * k = p * (j * j) \<Longrightarrow> k < p * j 
\<and> 0 < j"
-  apply (rule ccontr)
-  apply (simp add: linorder_not_less)
-  apply (erule disjE)
-   apply (frule mult_le_mono, assumption)
-   apply auto
-  apply (force simp add: prime_nat_def)
-  done
-
-lemma rearrange: "(j::nat) * (p * j) = k * k \<Longrightarrow> k * k = p * (j 
* j)"
-  by (simp add: mult_ac)
-
-lemma prime_not_square:
-    "prime (p::nat) \<Longrightarrow> (\<And>k. 0 < k \<Longrightarrow> m * m 
\<noteq> p * (k * k))"
-  apply (induct m rule: nat_less_induct)
-  apply clarify
-  apply (frule prime_dvd_other_side, assumption)
-  apply (erule dvdE)
-  apply (simp add: nat_mult_eq_cancel_disj prime_nonzero)
-  apply (blast dest: rearrange reduction)
-  done
-
-
-subsection {* Main theorem *}
-
-text {*
-  The square root of any prime number (including @{text 2}) is
-  irrational.
-*}
-
-theorem prime_sqrt_irrational:
-    "prime (p::nat) \<Longrightarrow> x * x = real p \<Longrightarrow> 0 \<le> 
x \<Longrightarrow> x \<notin> \<rat>"
-  apply (rule notI)
-  apply (erule Rats_abs_nat_div_natE)
-  apply (simp del: real_of_nat_mult
-              add: abs_if divide_eq_eq prime_not_square real_of_nat_mult 
[symmetric])
-  done
-
-lemmas two_sqrt_irrational =
-  prime_sqrt_irrational [OF two_is_prime_nat]
-
-end
diff --git a/isar/ex/Tarski.thy b/isar/ex/Tarski.thy
deleted file mode 100644
index ec1247a..0000000
--- a/isar/ex/Tarski.thy
+++ /dev/null
@@ -1,927 +0,0 @@
-(********** 
-  This file is copied from Isabelle2011. 
-  It has been beautified with Tokens -> Replace Shortcuts
- **********)
-
-(*  Title:      HOL/ex/Tarski.thy
-    Author:     Florian Kammüller, Cambridge University Computer Laboratory
-*)
-
-header {* The Full Theorem of Tarski *}
-
-theory Tarski
-imports Main "~~/src/HOL/Library/FuncSet"
-begin
-
-text {*
-  Minimal version of lattice theory plus the full theorem of Tarski:
-  The fixedpoints of a complete lattice themselves form a complete
-  lattice.
-
-  Illustrates first-class theories, using the Sigma representation of
-  structures.  Tidied and converted to Isar by lcp.
-*}
-
-record 'a potype =
-  pset  :: "'a set"
-  order :: "('a * 'a) set"
-
-definition
-  monotone :: "['a \<Rightarrow> 'a, 'a set, ('a *'a)set] \<Rightarrow> bool" 
where
-  "monotone f A r = (\<forall>x\<in>A. \<forall>y\<in>A. (x, y): r 
\<longrightarrow> ((f x), (f y)) : r)"
-
-definition
-  least :: "['a \<Rightarrow> bool, 'a potype] \<Rightarrow> 'a" where
-  "least P po = (SOME x. x: pset po & P x &
-                       (\<forall>y \<in> pset po. P y \<longrightarrow> (x,y): 
order po))"
-
-definition
-  greatest :: "['a \<Rightarrow> bool, 'a potype] \<Rightarrow> 'a" where
-  "greatest P po = (SOME x. x: pset po & P x &
-                          (\<forall>y \<in> pset po. P y \<longrightarrow> 
(y,x): order po))"
-
-definition
-  lub  :: "['a set, 'a potype] \<Rightarrow> 'a" where
-  "lub S po = least (%x. \<forall>y\<in>S. (y,x): order po) po"
-
-definition
-  glb  :: "['a set, 'a potype] \<Rightarrow> 'a" where
-  "glb S po = greatest (%x. \<forall>y\<in>S. (x,y): order po) po"
-
-definition
-  isLub :: "['a set, 'a potype, 'a] \<Rightarrow> bool" where
-  "isLub S po = (%L. (L: pset po & (\<forall>y\<in>S. (y,L): order po) &
-                   (\<forall>z\<in>pset po. (\<forall>y\<in>S. (y,z): order 
po) \<longrightarrow> (L,z): order po)))"
-
-definition
-  isGlb :: "['a set, 'a potype, 'a] \<Rightarrow> bool" where
-  "isGlb S po = (%G. (G: pset po & (\<forall>y\<in>S. (G,y): order po) &
-                 (\<forall>z \<in> pset po. (\<forall>y\<in>S. (z,y): order 
po) \<longrightarrow> (z,G): order po)))"
-
-definition
-  "fix"    :: "[('a \<Rightarrow> 'a), 'a set] \<Rightarrow> 'a set" where
-  "fix f A  = {x. x: A & f x = x}"
-
-definition
-  interval :: "[('a*'a) set,'a, 'a ] \<Rightarrow> 'a set" where
-  "interval r a b = {x. (a,x): r & (x,b): r}"
-
-
-definition
-  Bot :: "'a potype \<Rightarrow> 'a" where
-  "Bot po = least (%x. True) po"
-
-definition
-  Top :: "'a potype \<Rightarrow> 'a" where
-  "Top po = greatest (%x. True) po"
-
-definition
-  PartialOrder :: "('a potype) set" where
-  "PartialOrder = {P. refl_on (pset P) (order P) & antisym (order P) &
-                       trans (order P)}"
-
-definition
-  CompleteLattice :: "('a potype) set" where
-  "CompleteLattice = {cl. cl: PartialOrder &
-                        (\<forall>S. S \<subseteq> pset cl \<longrightarrow> 
(\<exists>L. isLub S cl L)) &
-                        (\<forall>S. S \<subseteq> pset cl \<longrightarrow> 
(\<exists>G. isGlb S cl G))}"
-
-definition
-  CLF_set :: "('a potype * ('a \<Rightarrow> 'a)) set" where
-  "CLF_set = (SIGMA cl: CompleteLattice.
-            {f. f: pset cl \<rightarrow> pset cl & monotone f (pset cl) (order 
cl)})"
-
-definition
-  induced :: "['a set, ('a * 'a) set] \<Rightarrow> ('a *'a)set" where
-  "induced A r = {(a,b). a : A & b: A & (a,b): r}"
-
-
-definition
-  sublattice :: "('a potype * 'a set)set" where
-  "sublattice =
-      (SIGMA cl: CompleteLattice.
-          {S. S \<subseteq> pset cl &
-           \<lparr> pset = S, order = induced S (order cl) \<rparr>: 
CompleteLattice})"
-
-abbreviation
-  sublat :: "['a set, 'a potype] \<Rightarrow> bool"  ("_ \<guillemotleft>= _" 
[51,50]50) where
-  "S \<guillemotleft>= cl \<equiv> S : sublattice `` {cl}"
-
-definition
-  dual :: "'a potype \<Rightarrow> 'a potype" where
-  "dual po = \<lparr> pset = pset po, order = converse (order po) \<rparr>"
-
-locale S =
-  fixes cl :: "'a potype"
-    and A  :: "'a set"
-    and r  :: "('a * 'a) set"
-  defines A_def: "A \<equiv> pset cl"
-     and  r_def: "r \<equiv> order cl"
-
-locale PO = S +
-  assumes cl_po:  "cl : PartialOrder"
-
-locale CL = S +
-  assumes cl_co:  "cl : CompleteLattice"
-
-sublocale CL < PO
-apply (simp_all add: A_def r_def)
-apply unfold_locales
-using cl_co unfolding CompleteLattice_def by auto
-
-locale CLF = S +
-  fixes f :: "'a \<Rightarrow> 'a"
-    and P :: "'a set"
-  assumes f_cl:  "(cl,f) : CLF_set" (*was the equivalent "f : CLF_set``{cl}"*)
-  defines P_def: "P \<equiv> fix f A"
-
-sublocale CLF < CL
-apply (simp_all add: A_def r_def)
-apply unfold_locales
-using f_cl unfolding CLF_set_def by auto
-
-locale Tarski = CLF +
-  fixes Y     :: "'a set"
-    and intY1 :: "'a set"
-    and v     :: "'a"
-  assumes
-    Y_ss: "Y \<subseteq> P"
-  defines
-    intY1_def: "intY1 \<equiv> interval r (lub Y cl) (Top cl)"
-    and v_def: "v \<equiv> glb {x. ((%x: intY1. f x) x, x): induced intY1 r &
-                             x: intY1}
-                      \<lparr> pset=intY1, order=induced intY1 r\<rparr>"
-
-
-subsection {* Partial Order *}
-
-lemma (in PO) dual:
-  "PO (dual cl)"
-apply unfold_locales
-using cl_po
-unfolding PartialOrder_def dual_def
-by auto
-
-lemma (in PO) PO_imp_refl_on [simp]: "refl_on A r"
-apply (insert cl_po)
-apply (simp add: PartialOrder_def A_def r_def)
-done
-
-lemma (in PO) PO_imp_sym [simp]: "antisym r"
-apply (insert cl_po)
-apply (simp add: PartialOrder_def r_def)
-done
-
-lemma (in PO) PO_imp_trans [simp]: "trans r"
-apply (insert cl_po)
-apply (simp add: PartialOrder_def r_def)
-done
-
-lemma (in PO) reflE: "x \<in> A \<Longrightarrow> (x, x) \<in> r"
-apply (insert cl_po)
-apply (simp add: PartialOrder_def refl_on_def A_def r_def)
-done
-
-lemma (in PO) antisymE: "\<lbrakk> (a, b) \<in> r; (b, a) \<in> r \<rbrakk> 
\<Longrightarrow> a = b"
-apply (insert cl_po)
-apply (simp add: PartialOrder_def antisym_def r_def)
-done
-
-lemma (in PO) transE: "\<lbrakk> (a, b) \<in> r; (b, c) \<in> r\<rbrakk> 
\<Longrightarrow> (a,c) \<in> r"
-apply (insert cl_po)
-apply (simp add: PartialOrder_def r_def)
-apply (unfold trans_def, fast)
-done
-
-lemma (in PO) monotoneE:
-     "\<lbrakk> monotone f A r;  x \<in> A; y \<in> A; (x, y) \<in> r 
\<rbrakk> \<Longrightarrow> (f x, f y) \<in> r"
-by (simp add: monotone_def)
-
-lemma (in PO) po_subset_po:
-     "S \<subseteq> A \<Longrightarrow> \<lparr> pset = S, order = induced S r 
\<rparr> \<in> PartialOrder"
-apply (simp (no_asm) add: PartialOrder_def)
-apply auto
--- {* refl *}
-apply (simp add: refl_on_def induced_def)
-apply (blast intro: reflE)
--- {* antisym *}
-apply (simp add: antisym_def induced_def)
-apply (blast intro: antisymE)
--- {* trans *}
-apply (simp add: trans_def induced_def)
-apply (blast intro: transE)
-done
-
-lemma (in PO) indE: "\<lbrakk> (x, y) \<in> induced S r; S \<subseteq> A 
\<rbrakk> \<Longrightarrow> (x, y) \<in> r"
-by (simp add: add: induced_def)
-
-lemma (in PO) indI: "\<lbrakk> (x, y) \<in> r; x \<in> S; y \<in> S \<rbrakk> 
\<Longrightarrow> (x, y) \<in> induced S r"
-by (simp add: add: induced_def)
-
-lemma (in CL) CL_imp_ex_isLub: "S \<subseteq> A \<Longrightarrow> \<exists>L. 
isLub S cl L"
-apply (insert cl_co)
-apply (simp add: CompleteLattice_def A_def)
-done
-
-declare (in CL) cl_co [simp]
-
-lemma isLub_lub: "(\<exists>L. isLub S cl L) = isLub S cl (lub S cl)"
-by (simp add: lub_def least_def isLub_def some_eq_ex [symmetric])
-
-lemma isGlb_glb: "(\<exists>G. isGlb S cl G) = isGlb S cl (glb S cl)"
-by (simp add: glb_def greatest_def isGlb_def some_eq_ex [symmetric])
-
-lemma isGlb_dual_isLub: "isGlb S cl = isLub S (dual cl)"
-by (simp add: isLub_def isGlb_def dual_def converse_def)
-
-lemma isLub_dual_isGlb: "isLub S cl = isGlb S (dual cl)"
-by (simp add: isLub_def isGlb_def dual_def converse_def)
-
-lemma (in PO) dualPO: "dual cl \<in> PartialOrder"
-apply (insert cl_po)
-apply (simp add: PartialOrder_def dual_def refl_on_converse
-                 trans_converse antisym_converse)
-done
-
-lemma Rdual:
-     "\<forall>S. (S \<subseteq> A \<longrightarrow>( \<exists>L. isLub S 
\<lparr> pset = A, order = r\<rparr> L))
-      \<Longrightarrow> \<forall>S. (S \<subseteq> A \<longrightarrow> 
(\<exists>G. isGlb S \<lparr> pset = A, order = r\<rparr> G))"
-apply safe
-apply (rule_tac x = "lub {y. y \<in> A & (\<forall>k \<in> S. (y, k) \<in> r)}
-                      \<lparr>pset = A, order = r\<rparr> " in exI)
-apply (drule_tac x = "{y. y \<in> A & (\<forall>k \<in> S. (y,k) \<in> r) }" 
in spec)
-apply (drule mp, fast)
-apply (simp add: isLub_lub isGlb_def)
-apply (simp add: isLub_def, blast)
-done
-
-lemma lub_dual_glb: "lub S cl = glb S (dual cl)"
-by (simp add: lub_def glb_def least_def greatest_def dual_def converse_def)
-
-lemma glb_dual_lub: "glb S cl = lub S (dual cl)"
-by (simp add: lub_def glb_def least_def greatest_def dual_def converse_def)
-
-lemma CL_subset_PO: "CompleteLattice \<subseteq> PartialOrder"
-by (simp add: PartialOrder_def CompleteLattice_def, fast)
-
-lemmas CL_imp_PO = CL_subset_PO [THEN subsetD]
-
-(*declare CL_imp_PO [THEN PO.PO_imp_refl, simp]
-declare CL_imp_PO [THEN PO.PO_imp_sym, simp]
-declare CL_imp_PO [THEN PO.PO_imp_trans, simp]*)
-
-lemma (in CL) CO_refl_on: "refl_on A r"
-by (rule PO_imp_refl_on)
-
-lemma (in CL) CO_antisym: "antisym r"
-by (rule PO_imp_sym)
-
-lemma (in CL) CO_trans: "trans r"
-by (rule PO_imp_trans)
-
-lemma CompleteLatticeI:
-     "\<lbrakk> po \<in> PartialOrder; (\<forall>S. S \<subseteq> pset po 
\<longrightarrow> (\<exists>L. isLub S po L));
-         (\<forall>S. S \<subseteq> pset po \<longrightarrow> (\<exists>G. 
isGlb S po G))\<rbrakk>
-      \<Longrightarrow> po \<in> CompleteLattice"
-apply (unfold CompleteLattice_def, blast)
-done
-
-lemma (in CL) CL_dualCL: "dual cl \<in> CompleteLattice"
-apply (insert cl_co)
-apply (simp add: CompleteLattice_def dual_def)
-apply (fold dual_def)
-apply (simp add: isLub_dual_isGlb [symmetric] isGlb_dual_isLub [symmetric]
-                 dualPO)
-done
-
-lemma (in PO) dualA_iff: "pset (dual cl) = pset cl"
-by (simp add: dual_def)
-
-lemma (in PO) dualr_iff: "((x, y) \<in> (order(dual cl))) = ((y, x) \<in> 
order cl)"
-by (simp add: dual_def)
-
-lemma (in PO) monotone_dual:
-     "monotone f (pset cl) (order cl) 
-     \<Longrightarrow> monotone f (pset (dual cl)) (order(dual cl))"
-by (simp add: monotone_def dualA_iff dualr_iff)
-
-lemma (in PO) interval_dual:
-     "\<lbrakk> x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> interval r x y 
= interval (order(dual cl)) y x"
-apply (simp add: interval_def dualr_iff)
-apply (fold r_def, fast)
-done
-
-lemma (in PO) trans:
-  "(x, y) \<in> r \<Longrightarrow> (y, z) \<in> r \<Longrightarrow> (x, z) 
\<in> r"
-using cl_po apply (auto simp add: PartialOrder_def r_def)
-unfolding trans_def by blast 
-
-lemma (in PO) interval_not_empty:
-  "interval r a b \<noteq> {} \<Longrightarrow> (a, b) \<in> r"
-apply (simp add: interval_def)
-using trans by blast
-
-lemma (in PO) interval_imp_mem: "x \<in> interval r a b \<Longrightarrow> (a, 
x) \<in> r"
-by (simp add: interval_def)
-
-lemma (in PO) left_in_interval:
-     "\<lbrakk> a \<in> A; b \<in> A; interval r a b \<noteq> {} \<rbrakk> 
\<Longrightarrow> a \<in> interval r a b"
-apply (simp (no_asm_simp) add: interval_def)
-apply (simp add: PO_imp_trans interval_not_empty)
-apply (simp add: reflE)
-done
-
-lemma (in PO) right_in_interval:
-     "\<lbrakk> a \<in> A; b \<in> A; interval r a b \<noteq> {} \<rbrakk> 
\<Longrightarrow> b \<in> interval r a b"
-apply (simp (no_asm_simp) add: interval_def)
-apply (simp add: PO_imp_trans interval_not_empty)
-apply (simp add: reflE)
-done
-
-
-subsection {* sublattice *}
-
-lemma (in PO) sublattice_imp_CL:
-     "S \<guillemotleft>= cl  \<Longrightarrow> \<lparr> pset = S, order = 
induced S r \<rparr> \<in> CompleteLattice"
-by (simp add: sublattice_def CompleteLattice_def r_def)
-
-lemma (in CL) sublatticeI:
-     "\<lbrakk> S \<subseteq> A; \<lparr> pset = S, order = induced S r 
\<rparr> \<in> CompleteLattice \<rbrakk>
-      \<Longrightarrow> S \<guillemotleft>= cl"
-by (simp add: sublattice_def A_def r_def)
-
-lemma (in CL) dual:
-  "CL (dual cl)"
-apply unfold_locales
-using cl_co unfolding CompleteLattice_def
-apply (simp add: dualPO isGlb_dual_isLub [symmetric] isLub_dual_isGlb 
[symmetric] dualA_iff)
-done
-
-
-subsection {* lub *}
-
-lemma (in CL) lub_unique: "\<lbrakk> S \<subseteq> A; isLub S cl x; isLub S cl 
L\<rbrakk> \<Longrightarrow> x = L"
-apply (rule antisymE)
-apply (auto simp add: isLub_def r_def)
-done
-
-lemma (in CL) lub_upper: "\<lbrakk>S \<subseteq> A; x \<in> S\<rbrakk> 
\<Longrightarrow> (x, lub S cl) \<in> r"
-apply (rule CL_imp_ex_isLub [THEN exE], assumption)
-apply (unfold lub_def least_def)
-apply (rule some_equality [THEN ssubst])
-  apply (simp add: isLub_def)
- apply (simp add: lub_unique A_def isLub_def)
-apply (simp add: isLub_def r_def)
-done
-
-lemma (in CL) lub_least:
-     "\<lbrakk> S \<subseteq> A; L \<in> A; \<forall>x \<in> S. (x,L) \<in> r 
\<rbrakk> \<Longrightarrow> (lub S cl, L) \<in> r"
-apply (rule CL_imp_ex_isLub [THEN exE], assumption)
-apply (unfold lub_def least_def)
-apply (rule_tac s=x in some_equality [THEN ssubst])
-  apply (simp add: isLub_def)
- apply (simp add: lub_unique A_def isLub_def)
-apply (simp add: isLub_def r_def A_def)
-done
-
-lemma (in CL) lub_in_lattice: "S \<subseteq> A \<Longrightarrow> lub S cl 
\<in> A"
-apply (rule CL_imp_ex_isLub [THEN exE], assumption)
-apply (unfold lub_def least_def)
-apply (subst some_equality)
-apply (simp add: isLub_def)
-prefer 2 apply (simp add: isLub_def A_def)
-apply (simp add: lub_unique A_def isLub_def)
-done
-
-lemma (in CL) lubI:
-     "\<lbrakk> S \<subseteq> A; L \<in> A; \<forall>x \<in> S. (x,L) \<in> r;
-         \<forall>z \<in> A. (\<forall>y \<in> S. (y,z) \<in> r) 
\<longrightarrow> (L,z) \<in> r \<rbrakk> \<Longrightarrow> L = lub S cl"
-apply (rule lub_unique, assumption)
-apply (simp add: isLub_def A_def r_def)
-apply (unfold isLub_def)
-apply (rule conjI)
-apply (fold A_def r_def)
-apply (rule lub_in_lattice, assumption)
-apply (simp add: lub_upper lub_least)
-done
-
-lemma (in CL) lubIa: "\<lbrakk> S \<subseteq> A; isLub S cl L \<rbrakk> 
\<Longrightarrow> L = lub S cl"
-by (simp add: lubI isLub_def A_def r_def)
-
-lemma (in CL) isLub_in_lattice: "isLub S cl L \<Longrightarrow> L \<in> A"
-by (simp add: isLub_def  A_def)
-
-lemma (in CL) isLub_upper: "\<lbrakk>isLub S cl L; y \<in> S\<rbrakk> 
\<Longrightarrow> (y, L) \<in> r"
-by (simp add: isLub_def r_def)
-
-lemma (in CL) isLub_least:
-     "\<lbrakk> isLub S cl L; z \<in> A; \<forall>y \<in> S. (y, z) \<in> 
r\<rbrakk> \<Longrightarrow> (L, z) \<in> r"
-by (simp add: isLub_def A_def r_def)
-
-lemma (in CL) isLubI:
-     "\<lbrakk> L \<in> A; \<forall>y \<in> S. (y, L) \<in> r;
-         (\<forall>z \<in> A. (\<forall>y \<in> S. (y, z):r) \<longrightarrow> 
(L, z) \<in> r)\<rbrakk> \<Longrightarrow> isLub S cl L"
-by (simp add: isLub_def A_def r_def)
-
-
-subsection {* glb *}
-
-lemma (in CL) glb_in_lattice: "S \<subseteq> A \<Longrightarrow> glb S cl 
\<in> A"
-apply (subst glb_dual_lub)
-apply (simp add: A_def)
-apply (rule dualA_iff [THEN subst])
-apply (rule CL.lub_in_lattice)
-apply (rule dual)
-apply (simp add: dualA_iff)
-done
-
-lemma (in CL) glb_lower: "\<lbrakk>S \<subseteq> A; x \<in> S\<rbrakk> 
\<Longrightarrow> (glb S cl, x) \<in> r"
-apply (subst glb_dual_lub)
-apply (simp add: r_def)
-apply (rule dualr_iff [THEN subst])
-apply (rule CL.lub_upper)
-apply (rule dual)
-apply (simp add: dualA_iff A_def, assumption)
-done
-
-text {*
-  Reduce the sublattice property by using substructural properties;
-  abandoned see @{text "Tarski_4.ML"}.
-*}
-
-lemma (in CLF) [simp]:
-    "f: pset cl \<rightarrow> pset cl & monotone f (pset cl) (order cl)"
-apply (insert f_cl)
-apply (simp add: CLF_set_def)
-done
-
-declare (in CLF) f_cl [simp]
-
-
-lemma (in CLF) f_in_funcset: "f \<in> A \<rightarrow> A"
-by (simp add: A_def)
-
-lemma (in CLF) monotone_f: "monotone f A r"
-by (simp add: A_def r_def)
-
-lemma (in CLF) CLF_dual: "(dual cl, f) \<in> CLF_set"
-apply (simp add: CLF_set_def  CL_dualCL monotone_dual)
-apply (simp add: dualA_iff)
-done
-
-lemma (in CLF) dual:
-  "CLF (dual cl) f"
-apply (rule CLF.intro)
-apply (rule CLF_dual)
-done
-
-
-subsection {* fixed points *}
-
-lemma fix_subset: "fix f A \<subseteq> A"
-by (simp add: fix_def, fast)
-
-lemma fix_imp_eq: "x \<in> fix f A \<Longrightarrow> f x = x"
-by (simp add: fix_def)
-
-lemma fixf_subset:
-     "\<lbrakk> A \<subseteq> B; x \<in> fix (%y: A. f y) A \<rbrakk> 
\<Longrightarrow> x \<in> fix f B"
-by (simp add: fix_def, auto)
-
-
-subsection {* lemmas for Tarski, lub *}
-lemma (in CLF) lubH_le_flubH:
-     "H = {x. (x, f x) \<in> r & x \<in> A} \<Longrightarrow> (lub H cl, f 
(lub H cl)) \<in> r"
-apply (rule lub_least, fast)
-apply (rule f_in_funcset [THEN funcset_mem])
-apply (rule lub_in_lattice, fast)
--- {* @{text "\<forall>x:H. (x, f (lub H r)) \<in> r"} *}
-apply (rule ballI)
-apply (rule transE)
--- {* instantiates @{text "(x, ???z) \<in> order cl to (x, f x)"}, *}
--- {* because of the def of @{text H} *}
-apply fast
--- {* so it remains to show @{text "(f x, f (lub H cl)) \<in> r"} *}
-apply (rule_tac f = "f" in monotoneE)
-apply (rule monotone_f, fast)
-apply (rule lub_in_lattice, fast)
-apply (rule lub_upper, fast)
-apply assumption
-done
-
-lemma (in CLF) flubH_le_lubH:
-     "\<lbrakk>  H = {x. (x, f x) \<in> r & x \<in> A} \<rbrakk> 
\<Longrightarrow> (f (lub H cl), lub H cl) \<in> r"
-apply (rule lub_upper, fast)
-apply (rule_tac t = "H" in ssubst, assumption)
-apply (rule CollectI)
-apply (rule conjI)
-apply (rule_tac [2] f_in_funcset [THEN funcset_mem])
-apply (rule_tac [2] lub_in_lattice)
-prefer 2 apply fast
-apply (rule_tac f = "f" in monotoneE)
-apply (rule monotone_f)
-  apply (blast intro: lub_in_lattice)
- apply (blast intro: lub_in_lattice f_in_funcset [THEN funcset_mem])
-apply (simp add: lubH_le_flubH)
-done
-
-lemma (in CLF) lubH_is_fixp:
-     "H = {x. (x, f x) \<in> r & x \<in> A} \<Longrightarrow> lub H cl \<in> 
fix f A"
-apply (simp add: fix_def)
-apply (rule conjI)
-apply (rule lub_in_lattice, fast)
-apply (rule antisymE)
-apply (simp add: flubH_le_lubH)
-apply (simp add: lubH_le_flubH)
-done
-
-lemma (in CLF) fix_in_H:
-     "\<lbrakk> H = {x. (x, f x) \<in> r & x \<in> A};  x \<in> P \<rbrakk> 
\<Longrightarrow> x \<in> H"
-by (simp add: P_def fix_imp_eq [of _ f A] reflE CO_refl_on
-                    fix_subset [of f A, THEN subsetD])
-
-lemma (in CLF) fixf_le_lubH:
-     "H = {x. (x, f x) \<in> r & x \<in> A} \<Longrightarrow> \<forall>x \<in> 
fix f A. (x, lub H cl) \<in> r"
-apply (rule ballI)
-apply (rule lub_upper, fast)
-apply (rule fix_in_H)
-apply (simp_all add: P_def)
-done
-
-lemma (in CLF) lubH_least_fixf:
-     "H = {x. (x, f x) \<in> r & x \<in> A}
-      \<Longrightarrow> \<forall>L. (\<forall>y \<in> fix f A. (y,L) \<in> r) 
\<longrightarrow> (lub H cl, L) \<in> r"
-apply (rule allI)
-apply (rule impI)
-apply (erule bspec)
-apply (rule lubH_is_fixp, assumption)
-done
-
-subsection {* Tarski fixpoint theorem 1, first part *}
-lemma (in CLF) T_thm_1_lub: "lub P cl = lub {x. (x, f x) \<in> r & x \<in> A} 
cl"
-apply (rule sym)
-apply (simp add: P_def)
-apply (rule lubI)
-apply (rule fix_subset)
-apply (rule lub_in_lattice, fast)
-apply (simp add: fixf_le_lubH)
-apply (simp add: lubH_least_fixf)
-done
-
-lemma (in CLF) glbH_is_fixp: "H = {x. (f x, x) \<in> r & x \<in> A} 
\<Longrightarrow> glb H cl \<in> P"
-  -- {* Tarski for glb *}
-apply (simp add: glb_dual_lub P_def A_def r_def)
-apply (rule dualA_iff [THEN subst])
-apply (rule CLF.lubH_is_fixp)
-apply (rule dual)
-apply (simp add: dualr_iff dualA_iff)
-done
-
-lemma (in CLF) T_thm_1_glb: "glb P cl = glb {x. (f x, x) \<in> r & x \<in> A} 
cl"
-apply (simp add: glb_dual_lub P_def A_def r_def)
-apply (rule dualA_iff [THEN subst])
-apply (simp add: CLF.T_thm_1_lub [of _ f, OF dual]
-                 dualPO CL_dualCL CLF_dual dualr_iff)
-done
-
-subsection {* interval *}
-
-lemma (in CLF) rel_imp_elem: "(x, y) \<in> r \<Longrightarrow> x \<in> A"
-apply (insert CO_refl_on)
-apply (simp add: refl_on_def, blast)
-done
-
-lemma (in CLF) interval_subset: "\<lbrakk> a \<in> A; b \<in> A \<rbrakk> 
\<Longrightarrow> interval r a b \<subseteq> A"
-apply (simp add: interval_def)
-apply (blast intro: rel_imp_elem)
-done
-
-lemma (in CLF) intervalI:
-     "\<lbrakk> (a, x) \<in> r; (x, b) \<in> r \<rbrakk> \<Longrightarrow> x 
\<in> interval r a b"
-by (simp add: interval_def)
-
-lemma (in CLF) interval_lemma1:
-     "\<lbrakk> S \<subseteq> interval r a b; x \<in> S \<rbrakk> 
\<Longrightarrow> (a, x) \<in> r"
-by (unfold interval_def, fast)
-
-lemma (in CLF) interval_lemma2:
-     "\<lbrakk> S \<subseteq> interval r a b; x \<in> S \<rbrakk> 
\<Longrightarrow> (x, b) \<in> r"
-by (unfold interval_def, fast)
-
-lemma (in CLF) a_less_lub:
-     "\<lbrakk> S \<subseteq> A; S \<noteq> {};
-         \<forall>x \<in> S. (a,x) \<in> r; \<forall>y \<in> S. (y, L) \<in> r 
\<rbrakk> \<Longrightarrow> (a,L) \<in> r"
-by (blast intro: transE)
-
-lemma (in CLF) glb_less_b:
-     "\<lbrakk> S \<subseteq> A; S \<noteq> {};
-         \<forall>x \<in> S. (x,b) \<in> r; \<forall>y \<in> S. (G, y) \<in> r 
\<rbrakk> \<Longrightarrow> (G,b) \<in> r"
-by (blast intro: transE)
-
-lemma (in CLF) S_intv_cl:
-     "\<lbrakk> a \<in> A; b \<in> A; S \<subseteq> interval r a b 
\<rbrakk>\<Longrightarrow> S \<subseteq> A"
-by (simp add: subset_trans [OF _ interval_subset])
-
-lemma (in CLF) L_in_interval:
-     "\<lbrakk> a \<in> A; b \<in> A; S \<subseteq> interval r a b;
-         S \<noteq> {}; isLub S cl L; interval r a b \<noteq> {} \<rbrakk> 
\<Longrightarrow> L \<in> interval r a b"
-apply (rule intervalI)
-apply (rule a_less_lub)
-prefer 2 apply assumption
-apply (simp add: S_intv_cl)
-apply (rule ballI)
-apply (simp add: interval_lemma1)
-apply (simp add: isLub_upper)
--- {* @{text "(L, b) \<in> r"} *}
-apply (simp add: isLub_least interval_lemma2)
-done
-
-lemma (in CLF) G_in_interval:
-     "\<lbrakk> a \<in> A; b \<in> A; interval r a b \<noteq> {}; S 
\<subseteq> interval r a b; isGlb S cl G;
-         S \<noteq> {} \<rbrakk> \<Longrightarrow> G \<in> interval r a b"
-apply (simp add: interval_dual)
-apply (simp add: CLF.L_in_interval [of _ f, OF dual]
-                 dualA_iff A_def isGlb_dual_isLub)
-done
-
-lemma (in CLF) intervalPO:
-     "\<lbrakk> a \<in> A; b \<in> A; interval r a b \<noteq> {} \<rbrakk>
-      \<Longrightarrow> \<lparr> pset = interval r a b, order = induced 
(interval r a b) r \<rparr>
-          \<in> PartialOrder"
-apply (rule po_subset_po)
-apply (simp add: interval_subset)
-done
-
-lemma (in CLF) intv_CL_lub:
- "\<lbrakk> a \<in> A; b \<in> A; interval r a b \<noteq> {} \<rbrakk>
-  \<Longrightarrow> \<forall>S. S \<subseteq> interval r a b \<longrightarrow>
-          (\<exists>L. isLub S \<lparr> pset = interval r a b,
-                          order = induced (interval r a b) r \<rparr>  L)"
-apply (intro strip)
-apply (frule S_intv_cl [THEN CL_imp_ex_isLub])
-prefer 2 apply assumption
-apply assumption
-apply (erule exE)
--- {* define the lub for the interval as *}
-apply (rule_tac x = "if S = {} then a else L" in exI)
-apply (simp (no_asm_simp) add: isLub_def split del: split_if)
-apply (intro impI conjI)
--- {* @{text "(if S = {} then a else L) \<in> interval r a b"} *}
-apply (simp add: CL_imp_PO L_in_interval)
-apply (simp add: left_in_interval)
--- {* lub prop 1 *}
-apply (case_tac "S = {}")
--- {* @{text "S = {}, y \<in> S = False \<Rightarrow> everything"} *}
-apply fast
--- {* @{text "S \<noteq> {}"} *}
-apply simp
--- {* @{text "\<forall>y:S. (y, L) \<in> induced (interval r a b) r"} *}
-apply (rule ballI)
-apply (simp add: induced_def  L_in_interval)
-apply (rule conjI)
-apply (rule subsetD)
-apply (simp add: S_intv_cl, assumption)
-apply (simp add: isLub_upper)
--- {* @{text "\<forall>z:interval r a b. (\<forall>y:S. (y, z) \<in> induced 
(interval r a b) r \<longrightarrow> (if S = {} then a else L, z) \<in> induced 
(interval r a b) r"} *}
-apply (rule ballI)
-apply (rule impI)
-apply (case_tac "S = {}")
--- {* @{text "S = {}"} *}
-apply simp
-apply (simp add: induced_def  interval_def)
-apply (rule conjI)
-apply (rule reflE, assumption)
-apply (rule interval_not_empty)
-apply (simp add: interval_def)
--- {* @{text "S \<noteq> {}"} *}
-apply simp
-apply (simp add: induced_def  L_in_interval)
-apply (rule isLub_least, assumption)
-apply (rule subsetD)
-prefer 2 apply assumption
-apply (simp add: S_intv_cl, fast)
-done
-
-lemmas (in CLF) intv_CL_glb = intv_CL_lub [THEN Rdual]
-
-lemma (in CLF) interval_is_sublattice:
-     "\<lbrakk> a \<in> A; b \<in> A; interval r a b \<noteq> {} \<rbrakk>
-        \<Longrightarrow> interval r a b \<guillemotleft>= cl"
-apply (rule sublatticeI)
-apply (simp add: interval_subset)
-apply (rule CompleteLatticeI)
-apply (simp add: intervalPO)
- apply (simp add: intv_CL_lub)
-apply (simp add: intv_CL_glb)
-done
-
-lemmas (in CLF) interv_is_compl_latt =
-    interval_is_sublattice [THEN sublattice_imp_CL]
-
-
-subsection {* Top and Bottom *}
-lemma (in CLF) Top_dual_Bot: "Top cl = Bot (dual cl)"
-by (simp add: Top_def Bot_def least_def greatest_def dualA_iff dualr_iff)
-
-lemma (in CLF) Bot_dual_Top: "Bot cl = Top (dual cl)"
-by (simp add: Top_def Bot_def least_def greatest_def dualA_iff dualr_iff)
-
-lemma (in CLF) Bot_in_lattice: "Bot cl \<in> A"
-apply (simp add: Bot_def least_def)
-apply (rule_tac a="glb A cl" in someI2)
-apply (simp_all add: glb_in_lattice glb_lower 
-                     r_def [symmetric] A_def [symmetric])
-done
-
-lemma (in CLF) Top_in_lattice: "Top cl \<in> A"
-apply (simp add: Top_dual_Bot A_def)
-apply (rule dualA_iff [THEN subst])
-apply (rule CLF.Bot_in_lattice [OF dual])
-done
-
-lemma (in CLF) Top_prop: "x \<in> A \<Longrightarrow> (x, Top cl) \<in> r"
-apply (simp add: Top_def greatest_def)
-apply (rule_tac a="lub A cl" in someI2)
-apply (rule someI2)
-apply (simp_all add: lub_in_lattice lub_upper 
-                     r_def [symmetric] A_def [symmetric])
-done
-
-lemma (in CLF) Bot_prop: "x \<in> A \<Longrightarrow> (Bot cl, x) \<in> r"
-apply (simp add: Bot_dual_Top r_def)
-apply (rule dualr_iff [THEN subst])
-apply (rule CLF.Top_prop [OF dual])
-apply (simp add: dualA_iff A_def)
-done
-
-lemma (in CLF) Top_intv_not_empty: "x \<in> A  \<Longrightarrow> interval r x 
(Top cl) \<noteq> {}"
-apply (rule notI)
-apply (drule_tac a = "Top cl" in equals0D)
-apply (simp add: interval_def)
-apply (simp add: refl_on_def Top_in_lattice Top_prop)
-done
-
-lemma (in CLF) Bot_intv_not_empty: "x \<in> A \<Longrightarrow> interval r 
(Bot cl) x \<noteq> {}"
-apply (simp add: Bot_dual_Top)
-apply (subst interval_dual)
-prefer 2 apply assumption
-apply (simp add: A_def)
-apply (rule dualA_iff [THEN subst])
-apply (rule CLF.Top_in_lattice [OF dual])
-apply (rule CLF.Top_intv_not_empty [OF dual])
-apply (simp add: dualA_iff A_def)
-done
-
-subsection {* fixed points form a partial order *}
-
-lemma (in CLF) fixf_po: "\<lparr> pset = P, order = induced P r\<rparr> \<in> 
PartialOrder"
-by (simp add: P_def fix_subset po_subset_po)
-
-lemma (in Tarski) Y_subset_A: "Y \<subseteq> A"
-apply (rule subset_trans [OF _ fix_subset])
-apply (rule Y_ss [simplified P_def])
-done
-
-lemma (in Tarski) lubY_in_A: "lub Y cl \<in> A"
-  by (rule Y_subset_A [THEN lub_in_lattice])
-
-lemma (in Tarski) lubY_le_flubY: "(lub Y cl, f (lub Y cl)) \<in> r"
-apply (rule lub_least)
-apply (rule Y_subset_A)
-apply (rule f_in_funcset [THEN funcset_mem])
-apply (rule lubY_in_A)
--- {* @{text "Y \<subseteq> P \<Longrightarrow> f x = x"} *}
-apply (rule ballI)
-apply (rule_tac t = "x" in fix_imp_eq [THEN subst])
-apply (erule Y_ss [simplified P_def, THEN subsetD])
--- {* @{text "reduce (f x, f (lub Y cl)) \<in> r to (x, lub Y cl) \<in> r"} by 
monotonicity *}
-apply (rule_tac f = "f" in monotoneE)
-apply (rule monotone_f)
-apply (simp add: Y_subset_A [THEN subsetD])
-apply (rule lubY_in_A)
-apply (simp add: lub_upper Y_subset_A)
-done
-
-lemma (in Tarski) intY1_subset: "intY1 \<subseteq> A"
-apply (unfold intY1_def)
-apply (rule interval_subset)
-apply (rule lubY_in_A)
-apply (rule Top_in_lattice)
-done
-
-lemmas (in Tarski) intY1_elem = intY1_subset [THEN subsetD]
-
-lemma (in Tarski) intY1_f_closed: "x \<in> intY1 \<Longrightarrow> f x \<in> 
intY1"
-apply (simp add: intY1_def  interval_def)
-apply (rule conjI)
-apply (rule transE)
-apply (rule lubY_le_flubY)
--- {* @{text "(f (lub Y cl), f x) \<in> r"} *}
-apply (rule_tac f=f in monotoneE)
-apply (rule monotone_f)
-apply (rule lubY_in_A)
-apply (simp add: intY1_def interval_def  intY1_elem)
-apply (simp add: intY1_def  interval_def)
--- {* @{text "(f x, Top cl) \<in> r"} *}
-apply (rule Top_prop)
-apply (rule f_in_funcset [THEN funcset_mem])
-apply (simp add: intY1_def interval_def  intY1_elem)
-done
-
-lemma (in Tarski) intY1_mono:
-     "monotone (%x: intY1. f x) intY1 (induced intY1 r)"
-apply (auto simp add: monotone_def induced_def intY1_f_closed)
-apply (blast intro: intY1_elem monotone_f [THEN monotoneE])
-done
-
-lemma (in Tarski) intY1_is_cl:
-    "\<lparr> pset = intY1, order = induced intY1 r \<rparr> \<in> 
CompleteLattice"
-apply (unfold intY1_def)
-apply (rule interv_is_compl_latt)
-apply (rule lubY_in_A)
-apply (rule Top_in_lattice)
-apply (rule Top_intv_not_empty)
-apply (rule lubY_in_A)
-done
-
-lemma (in Tarski) v_in_P: "v \<in> P"
-apply (unfold P_def)
-apply (rule_tac A = "intY1" in fixf_subset)
-apply (rule intY1_subset)
-unfolding v_def
-apply (rule CLF.glbH_is_fixp [OF CLF.intro, unfolded CLF_set_def, of 
"\<lparr>pset = intY1, order = induced intY1 r\<rparr>", simplified])
-apply auto
-apply (rule intY1_is_cl)
-apply (erule intY1_f_closed)
-apply (rule intY1_mono)
-done
-
-lemma (in Tarski) z_in_interval:
-     "\<lbrakk> z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r 
\<rbrakk> \<Longrightarrow> z \<in> intY1"
-apply (unfold intY1_def P_def)
-apply (rule intervalI)
-prefer 2
- apply (erule fix_subset [THEN subsetD, THEN Top_prop])
-apply (rule lub_least)
-apply (rule Y_subset_A)
-apply (fast elim!: fix_subset [THEN subsetD])
-apply (simp add: induced_def)
-done
-
-lemma (in Tarski) f'z_in_int_rel: "\<lbrakk> z \<in> P; \<forall>y\<in>Y. (y, 
z) \<in> induced P r \<rbrakk>
-      \<Longrightarrow> ((%x: intY1. f x) z, z) \<in> induced intY1 r"
-apply (simp add: induced_def  intY1_f_closed z_in_interval P_def)
-apply (simp add: fix_imp_eq [of _ f A] fix_subset [of f A, THEN subsetD]
-                 reflE)
-done
-
-lemma (in Tarski) tarski_full_lemma:
-     "\<exists>L. isLub Y \<lparr> pset = P, order = induced P r \<rparr> L"
-apply (rule_tac x = "v" in exI)
-apply (simp add: isLub_def)
--- {* @{text "v \<in> P"} *}
-apply (simp add: v_in_P)
-apply (rule conjI)
--- {* @{text v} is lub *}
--- {* @{text "1. \<forall>y:Y. (y, v) \<in> induced P r"} *}
-apply (rule ballI)
-apply (simp add: induced_def subsetD v_in_P)
-apply (rule conjI)
-apply (erule Y_ss [THEN subsetD])
-apply (rule_tac b = "lub Y cl" in transE)
-apply (rule lub_upper)
-apply (rule Y_subset_A, assumption)
-apply (rule_tac b = "Top cl" in interval_imp_mem)
-apply (simp add: v_def)
-apply (fold intY1_def)
-apply (rule CL.glb_in_lattice [OF CL.intro [OF intY1_is_cl], simplified])
-apply auto
-apply (rule indI)
-  prefer 3 apply assumption
- prefer 2 apply (simp add: v_in_P)
-apply (unfold v_def)
-apply (rule indE)
-apply (rule_tac [2] intY1_subset)
-apply (rule CL.glb_lower [OF CL.intro [OF intY1_is_cl], simplified])
-  apply (simp add: CL_imp_PO intY1_is_cl)
- apply force
-apply (simp add: induced_def intY1_f_closed z_in_interval)
-apply (simp add: P_def fix_imp_eq [of _ f A] reflE
-                 fix_subset [of f A, THEN subsetD])
-done
-
-lemma CompleteLatticeI_simp:
-     "\<lbrakk> \<lparr> pset = A, order = r \<rparr> \<in> PartialOrder;
-         \<forall>S. S \<subseteq> A \<longrightarrow> (\<exists>L. isLub S 
\<lparr> pset = A, order = r \<rparr>  L) \<rbrakk>
-    \<Longrightarrow> \<lparr> pset = A, order = r \<rparr> \<in> 
CompleteLattice"
-by (simp add: CompleteLatticeI Rdual)
-
-theorem (in CLF) Tarski_full:
-     "\<lparr> pset = P, order = induced P r\<rparr> \<in> CompleteLattice"
-apply (rule CompleteLatticeI_simp)
-apply (rule fixf_po, clarify)
-apply (simp add: P_def A_def r_def)
-apply (rule Tarski.tarski_full_lemma [OF Tarski.intro [OF _ 
Tarski_axioms.intro]])
-proof - show "CLF cl f" .. qed
-
-end
diff --git a/isar/interface b/isar/interface
deleted file mode 100755
index 16d7d56..0000000
--- a/isar/interface
+++ /dev/null
@@ -1,205 +0,0 @@
-#!/usr/bin/env bash
-#
-# $Id$
-#
-# Proof General interface wrapper for Isabelle.
-
-
-## self references
-
-THIS="$(cd "$(dirname "$0")"; pwd)"
-SUPER="$(cd "$THIS/.."; pwd)"
-
-
-## diagnostics
-
-usage()
-{
-  echo
-  echo "Usage: isabelle emacs [OPTIONS] [FILES ...]"
-  echo
-  echo "  Options are:"
-  echo "    -L NAME      abbreviates -l NAME -k NAME"
-  echo "    -U BOOL      enable UTF-8 communication (default true)"
-  echo "    -f FONT      specify Emacs font"
-  echo "    -g GEOMETRY  specify Emacs geometry"
-  echo "    -k NAME      use specific isar-keywords for named logic"
-  echo "    -l NAME      logic image name (default 
\$ISABELLE_LOGIC=$ISABELLE_LOGIC)"
-  echo "    -m MODE      add print mode for output"
-  echo "    -p NAME      Emacs program name (default emacs)"
-  echo "    -u BOOL      use personal .emacs file (default true)"
-  echo "    -w BOOL      use window system (default true)"
-  echo "    -x BOOL      render Isabelle symbols via Unicode (default false)"
-  echo
-  echo "Starts Proof General for Isabelle with theory and proof FILES"
-  echo "(default Scratch.thy)."
-  echo
-  echo "  PROOFGENERAL_OPTIONS=$PROOFGENERAL_OPTIONS"
-  echo
-  exit 1
-}
-
-fail()
-{
-  echo "$1" >&2
-  exit 2
-}
-
-
-## process command line
-
-# options
-
-ISABELLE_OPTIONS=""
-
-KEYWORDS=""
-LOGIC="$ISABELLE_LOGIC"
-UNICODE=""
-FONT=""
-GEOMETRY=""
-PROGNAME="emacs"
-INITFILE="true"
-WINDOWSYSTEM="true"
-UNICODE_SYMBOLS=""
-
-getoptions()
-{
-  OPTIND=1
-  while getopts "L:U:f:g:k:l:m:p:u:w:x:" OPT
-  do
-    case "$OPT" in
-      L)
-        KEYWORDS="$OPTARG"
-        LOGIC="$OPTARG"
-        ;;
-      U)
-        UNICODE="$OPTARG"
-        ;;
-      f)
-        FONT="$OPTARG"
-        ;;
-      g)
-        GEOMETRY="$OPTARG"
-        ;;
-      k)
-        KEYWORDS="$OPTARG"
-        ;;
-      l)
-        LOGIC="$OPTARG"
-        ;;
-      m)
-        if [ -z "$ISABELLE_OPTIONS" ]; then
-          ISABELLE_OPTIONS="-m $OPTARG"
-        else
-          ISABELLE_OPTIONS="$ISABELLE_OPTIONS -m $OPTARG"
-        fi
-        ;;
-      p)
-        PROGNAME="$OPTARG"
-        ;;
-      u)
-        INITFILE="$OPTARG"
-        ;;
-      w)
-        WINDOWSYSTEM="$OPTARG"
-        ;;
-      x)
-        UNICODE_SYMBOLS="$OPTARG"
-        ;;
-      \?)
-        usage
-        ;;
-    esac
-  done
-}
-
-eval "OPTIONS=($PROOFGENERAL_OPTIONS)"
-getoptions "${OPTIONS[@]}"
-
-getoptions "$@"
-shift $(($OPTIND - 1))
-
-
-# args
-
-declare -a FILES=()
-
-if [ "$#" -eq 0 ]; then
-  FILES["${#FILES[@]}"]="Scratch.thy"
-else
-  while [ "$#" -gt 0 ]; do
-    FILES["${#FILES[@]}"]="$1"
-    shift
-  done
-fi
-
-
-## main
-
-declare -a ARGS=()
-
-if [ -n "$FONT" ]; then
-  ARGS["${#ARGS[@]}"]="-fn"
-  ARGS["${#ARGS[@]}"]="$FONT"
-fi
-
-if [ -n "$GEOMETRY" ]; then
-  ARGS["${#ARGS[@]}"]="-geometry"
-  ARGS["${#ARGS[@]}"]="$GEOMETRY"
-fi
-
-[ "$INITFILE" = false ] && ARGS["${#ARGS[@]}"]="-q"
-[ "$WINDOWSYSTEM" = false ] && ARGS["${#ARGS[@]}"]="-nw"
-
-ARGS["${#ARGS[@]}"]="-l"
-ARGS["${#ARGS[@]}"]="$SUPER/isar/interface-setup.el"
-
-if [ -n "$KEYWORDS" ]; then
-  if [ -f "$ISABELLE_HOME_USER/etc/isar-keywords-$KEYWORDS.el" ]; then
-    ARGS["${#ARGS[@]}"]="-l"
-    ARGS["${#ARGS[@]}"]="$ISABELLE_HOME_USER/etc/isar-keywords-$KEYWORDS.el"
-  elif [ -f "$ISABELLE_HOME/etc/isar-keywords-$KEYWORDS.el" ]; then
-    ARGS["${#ARGS[@]}"]="-l"
-    ARGS["${#ARGS[@]}"]="$ISABELLE_HOME/etc/isar-keywords-$KEYWORDS.el"
-  else
-    fail "No isar-keywords file for '$KEYWORDS'"
-  fi
-elif [ -f "$ISABELLE_HOME_USER/etc/isar-keywords.el" ]; then
-  ARGS["${#ARGS[@]}"]="-l"
-  ARGS["${#ARGS[@]}"]="$ISABELLE_HOME_USER/etc/isar-keywords.el"
-elif [ -f "$ISABELLE_HOME/etc/isar-keywords.el" ]; then
-  ARGS["${#ARGS[@]}"]="-l"
-  ARGS["${#ARGS[@]}"]="$ISABELLE_HOME/etc/isar-keywords.el"
-fi
-
-for FILE in "$ISABELLE_HOME/etc/proofgeneral-settings.el" \
-    "$ISABELLE_HOME_USER/etc/proofgeneral-settings.el"
-do
-  if [ -f "$FILE" ]; then
-    ARGS["${#ARGS[@]}"]="-l"
-    ARGS["${#ARGS[@]}"]="$FILE"
-  fi
-done
-
-case "$LOGIC" in
-  /*)
-    ;;
-  */*)
-    LOGIC="$(pwd -P)/$LOGIC"
-    ;;
-esac
-
-export PROOFGENERAL_HOME="$SUPER"
-export PROOFGENERAL_ASSISTANTS="isar"
-export PROOFGENERAL_LOGIC="$LOGIC"
-export PROOFGENERAL_UNICODE="$UNICODE"
-export PROOFGENERAL_UNICODE_SYMBOLS="$UNICODE_SYMBOLS"
-
-export ISABELLE_OPTIONS
-
-# Isabelle2008 compatibility
-[ -z "$ISABELLE_PROCESS" ] && export ISABELLE_PROCESS="$ISABELLE"
-[ -z "$ISABELLE_TOOL" ] && export ISABELLE_TOOL="$ISATOOL"
-
-exec "$PROGNAME" "${ARGS[@]}" "${FILES[@]}"
-
diff --git a/isar/interface-setup.el b/isar/interface-setup.el
deleted file mode 100644
index 4cf12aa..0000000
--- a/isar/interface-setup.el
+++ /dev/null
@@ -1,40 +0,0 @@
-;; interface-setup.el Interface wrapper for Isabelle Proof General
-;;
-;; This file is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; Author: Markus Wenzel <wenzelm@in.tum.de>
-;;
-;; interface-setup.el,v 7.0 2002/08/29 09:14:03 da Exp
-;;
-
-;;
-;; Tool bar
-;;
-
-(if (and window-system (fboundp 'tool-bar-mode)) (tool-bar-mode t))
-
-;;
-;; Unicode
-;;
-
-(let ((unicode (getenv "PROOFGENERAL_UNICODE")))
-  (if (and unicode (not (equal unicode "")))
-      (customize-set-variable 'proof-shell-unicode (equal unicode "true"))))
-
-;;
-;; Unicode symbols
-;;
-
-(let ((symbols (getenv "PROOFGENERAL_UNICODE_SYMBOLS")))
-  (if (and symbols (not (equal symbols "")))
-      (customize-set-variable 'isar-unicode-tokens-enable (equal symbols 
"true"))))
-
-;;
-;; Proof General startup
-;;
-
-(if (not (featurep 'proof-site))
-    (load (concat (getenv "PROOFGENERAL_HOME") "/generic/proof-site.el")))
diff --git a/isar/isabelle-system.el b/isar/isabelle-system.el
deleted file mode 100644
index 4fb2bcd..0000000
--- a/isar/isabelle-system.el
+++ /dev/null
@@ -1,375 +0,0 @@
-;; isabelle-system.el --- Interface with Isabelle system
-;;
-;; Copyright (C) 2000 LFCS Edinburgh, David Aspinall.
-;; Copyright (C) 2018  Free Software Foundation, Inc.
-;;
-;; Author:      David Aspinall <da@dcs.ed.ac.uk>
-;; Maintainer:  Proof General maintainer <proofgen@dcs.ed.ac.uk>
-;;
-;; $Id$
-;;
-;; Most of this code is taken from the final version of Isamode.
-;; --------------------------------------------------------------
-;;
-
-;;; Code:
-
-(require 'cl-lib)                       ;cl-mapcan
-(eval-when-compile
-  (require 'span)
-  (require 'scomint)
-  (require 'proof-site)
-  (require 'proof-menu)
-  (require 'proof-syntax))
-(defvar proof-assistant-menu)
-
-(declare-function mapcan "cl-extra")   ; spurious bytecomp warning
-
-
-;; The isabelle custom group won't have been defined yet.
-(defgroup isabelle nil
-  "Customization of user options for Isabelle and Isabelle/Isar Proof General"
-  :group 'proof-general)
-
-(defcustom isabelle-web-page
-  "http://www.cl.cam.ac.uk/Research/HVG/Isabelle/";
-  "URL of web page for Isabelle."
-  :type 'string
-  :group 'isabelle)
-
-
-;;; ================ Extract Isabelle settings ================
-
-(defcustom isa-isabelle-command
-  (or (if proof-rsh-command
-         ;; not much hope to locate executable remotely
-         (concat proof-rsh-command " isabelle"))
-      (getenv "ISABELLE_TOOL")
-      (proof-locate-executable "isabelle" nil
-                              (list
-                               ;; support default unpack in home dir situation
-                               (concat (getenv "HOME") "/Isabelle/bin/")
-                               ;; or Mac Package for Isabelle2014
-                               "/Applications/Isabelle2014.app/Isabelle/bin/"
-                               ))
-      "path_to_isabelle_is_unknown")
-  "Command to invoke the main Isabelle wrapper 'isabelle'.
-Emacs should be able to find `isabelle' if it is on the PATH when
-started.  Then several standard locations are attempted.
-Otherwise you should set this, using a full path name here for reliable
-working."
-  :type 'file
-  :group 'isabelle)
-
-(defvar isabelle-not-found nil
-  "Non-nil if user has been prompted for `isabelle' already and it wasn't 
found.")
-
-(defun isa-set-isabelle-command (&optional force)
-  "Make sure `isa-isabelle-command' points to a valid executable.
-If it does not, or if prefix arg supplied, prompt the user for
-the proper setting.  If `proof-rsh-command' is set, leave this
-unverified.  Otherwise, returns non-nil if isa-isabelle-command
-is surely an executable with full path."
-  (interactive "p")
-  (when (and (not noninteractive)
-             (not (bound-and-true-p byte-compile-current-file))
-            (not proof-rsh-command)
-            (or force
-                isabelle-not-found
-                (not (file-executable-p isa-isabelle-command))))
-    (setq isa-isabelle-command
-         (read-file-name
-          "Full path to `isabelle' command (anything non-executable if you 
don't have it): "
-          nil nil nil))
-    (unless (file-executable-p isa-isabelle-command)
-      (setq isabelle-not-found t)
-      (beep)
-      (warn "Proof General: isabelle command not found; some menus will be 
incomplete and Isabelle may not run correctly.  Please check your Isabelle 
installation.")))
-  (or proof-rsh-command
-      (file-executable-p isa-isabelle-command)))
-
-(defun isa-shell-command-to-string (command)
-  "Like shell-command-to-string except the last character is stripped."
-  (let ((s (shell-command-to-string command)))
-    (if (equal (length s) 0) s
-      (substring s 0 -1))))
-
-(defun isa-getenv (envvar &optional default)
-  "Extract environment variable ENVVAR setting using the `isabelle' program.
-If the isabelle command is not available, try using elisp's getenv
-to extract the value from Emacs' environment.
-If there is no setting for the variable, DEFAULT will be returned"
-  (isa-set-isabelle-command)
-  (if (or proof-rsh-command
-         (file-executable-p isa-isabelle-command))
-      (let ((setting (isa-shell-command-to-string
-                     (concat "\"" isa-isabelle-command
-                             "\" getenv -b " envvar))))
-       (if (string-equal setting "")
-           default
-         setting))
-    (or (getenv envvar) default)))
-
-;;;
-;;; ======= Interaction with System using Isabelle tools =======
-;;;
-
-(defcustom isabelle-program-name-override nil
-  "*Name of executable program to run Isabelle.
-
-You can set customize this in case the automatic settings
-mechanism does not work for you, perhaps because isabelle
-is not on your path, or you are running it remotely.
-
-The logic image name is tagged onto the end."
-  :type 'file
-  :group 'isabelle)
-
-(defun isa-tool-list-logics ()
-  "Generate a list of available object logics."
-  (if (isa-set-isabelle-command)
-      (delete "" (split-string
-                 (isa-shell-command-to-string
-                  (concat "\"" isa-isabelle-command "\" findlogics")) "[ 
\t]"))))
-
-(defcustom isabelle-logics-available nil
-  "*List of logics available to use with Isabelle.
-If the `isabelle' program is available, this is automatically
-generated with the Lisp form `(isa-tool-list-logics)'."
-  :type (list 'string)
-  :group 'isabelle)
-
-(unless (or noninteractive (bound-and-true-p byte-compile-current-file))
-  (setq isabelle-logics-available (isa-tool-list-logics)))
-
-(defcustom isabelle-chosen-logic nil
-  "*Choice of logic to use with Isabelle.
-If non-nil, added onto the Isabelle command line for invoking Isabelle.
-
-You can set this as a file local variable, using a special comment
-at the top of your theory file, like this:
-
-   (* -*- isabelle-chosen-logic: \"ZF\" -*- *)"
-  :type (append
-        (list 'choice)
-        (mapcar (lambda (str) (list 'const str)) isabelle-logics-available)
-        (list '(string :tag "Choose another")
-              '(const :tag "Unset (use default)" nil)))
-  :group 'isabelle)
-(put 'isabelle-chosen-logic 'safe-local-variable 'stringp)
-
-(defvar isabelle-chosen-logic-prev nil
-  "Value of `isabelle-chosen-logic' on last call of `isabelle-set-prog-name'.")
-
-(defun isabelle-hack-local-variables-function ()
-  "Hook function for `hack-local-variables-hook'."
-  (if (and isabelle-chosen-logic
-          (not (equal isabelle-chosen-logic
-                      isabelle-chosen-logic-prev))
-          (proof-shell-live-buffer))
-      (message "Warning: chosen logic %s does not match running Isabelle 
instance"
-              isabelle-chosen-logic)))
-
-(add-hook 'hack-local-variables-hook
-         'isabelle-hack-local-variables-function)
-
-(defun isabelle-set-prog-name (&optional filename)
-  "Make proper command line for running Isabelle.
-This function sets `proof-prog-name' and `isar-prog-args'."
-  (let*
-      ;; The ISABELLE_PROCESS and PROOFGENERAL_LOGIC values (set when
-      ;; run under the interface wrapper script) indicate command line
-      ;; is set in current Isabelle settings environment.
-      ((isabelle (or
-                 isabelle-program-name-override  ; override in Emacs
-                 (getenv "ISABELLE_PROCESS")     ; command line override
-                 (isa-getenv "ISABELLE_PROCESS") ; choose to match isabelle
-                 "isabelle-process"))            ; to
-       (isabelle-opts (split-string (or (getenv "ISABELLE_OPTIONS") "")))
-       (opts (append (list "-PI")  ;; Proof General + Isar
-                    (if proof-shell-unicode (list "-m" "PGASCII") nil)
-                    isabelle-opts))
-       (logic (or isabelle-chosen-logic
-                 (getenv "PROOFGENERAL_LOGIC")))
-       (logicarg (if (and logic (not (equal logic "")))
-                    (list logic) nil)))
-    (setq isabelle-chosen-logic-prev isabelle-chosen-logic)
-    (setq isar-prog-args (append opts logicarg))
-    (setq proof-prog-name isabelle)))
-
-(defun isabelle-choose-logic (logic)
-  "Adjust isabelle-prog-name and proof-prog-name for running LOGIC."
-  (interactive
-   (list (completing-read
-         "Use logic: "
-         (mapcar 'list (cons "Default"
-                             isabelle-logics-available)))))
-  (if (proof-shell-live-buffer)
-      (error "Can't change logic while Isabelle is running, please exit 
process first!"))
-  (customize-set-variable 'isabelle-chosen-logic
-                         (unless (string-equal logic "Default") logic))
-  (isabelle-set-prog-name)
-  ;; Settings are potentially different between logics, and
-  ;; so are Isar keywords.  Set these to nil so they get
-  ;; automatically re-initialised.
-  ;; FIXME: Isar keywords change not handled yet.
-  (setq proof-assistant-settings nil)
-  (setq proof-menu-settings nil))
-
-(defun isa-view-doc (docname)
-  "View Isabelle document DOCNAME, using Isabelle tools."
-  (if (isa-set-isabelle-command)
-      (apply 'start-process
-            "isa-view-doc" nil
-            (list isa-isabelle-command "doc" docname))))
-
-(defun isa-tool-list-docs ()
-  "Generate a list of documentation files available, with descriptions.
-This function returns a list of lists of the form
- ((DOCNAME DESCRIPTION) ....)
-of Isabelle document names and descriptions.  When DOCNAME is
-passed to isa-tool-doc-command, DOCNAME will be viewed."
-  (if (isa-set-isabelle-command)
-      (let ((docs (isa-shell-command-to-string
-                  (concat "\"" isa-isabelle-command "\" doc"))))
-       (unless (string-equal docs "")
-         (cl-mapcan
-          (function (lambda (docdes)
-                      (if (proof-string-match "^[ \t]+\\(\\S-+\\)[ \t]+" 
docdes)
-                          (list (list
-                                 (substring docdes (match-beginning 1) 
(match-end 1))
-                                 (substring docdes (match-end 0)))))))
-          (split-string docs "\n"))))))
-
-(defconst isabelle-verbatim-regexp "\\`\^VERBATIM: \\(\\(.\\|\n\\)*\\)\\'"
-  "Regexp matching internal marker for verbatim command output.")
-
-(defun isabelle-verbatim (str)
-  "Mark internal command STR for verbatim output."
-  (concat "\^VERBATIM: " str))
-
-
-;;; ==========  Utility functions ==========
-
-(defcustom isabelle-refresh-logics t
-  "*Whether to refresh the list of logics during an interactive session.
-If non-nil, then `isabelle findlogics' will be used to regenerate
-the `isabelle-logics-available' setting.  If this tool does not work
-for you, you should disable this behaviour."
-  :type 'boolean
-  :group 'isabelle)
-
-(defvar isabelle-docs-menu
-  (let ((vc (lambda (docdes)
-              (vector (car (cdr docdes))
-                      (list 'isa-view-doc (car docdes)) t))))
-    (list (cons "Isabelle Documentation" (mapcar vc (isa-tool-list-docs)))))
-  "Isabelle documentation menu.  Constructed when PG is loaded.")
-
-(defvar isabelle-logics-menu-entries nil
-  "Menu of logics available.")
-
-(defun isabelle-logics-menu-calculate ()
-  (setq isabelle-logics-menu-entries
-       (cons "Logics"
-             (append
-              '(["Default"
-                 (isabelle-choose-logic nil)
-                 :active (not (proof-shell-live-buffer))
-                 :style radio
-                 :selected (not isabelle-chosen-logic)
-                 :help "Switch to default logic"])
-              (mapcar (lambda (l)
-                        (vector l (list 'isabelle-choose-logic l)
-                                :active '(not (proof-shell-live-buffer))
-                                :style 'radio
-                                :selected (list 'equal 'isabelle-chosen-logic 
l)
-                                :help (format "Switch to %s logic" l)))
-                      isabelle-logics-available)))))
-
-(unless (or noninteractive (bound-and-true-p byte-compile-current-file))
-  (isabelle-logics-menu-calculate))
-
-(defvar isabelle-time-to-refresh-logics t
-  "Non-nil if we should refresh the logics list.")
-
-
-(defun isabelle-logics-menu-refresh ()
-  "Refresh isabelle-logics-menu-entries, returning new entries."
-  (interactive)
-  (if (and isabelle-refresh-logics
-          (or isabelle-time-to-refresh-logics (called-interactively-p 'any)))
-      (progn
-       (setq isabelle-logics-available (isa-tool-list-logics))
-       (isabelle-logics-menu-calculate)
-       ;; update the menu manually
-       (easy-menu-add-item proof-assistant-menu nil
-                           isabelle-logics-menu-entries)
-       (setq isabelle-time-to-refresh-logics nil) ;; just done it, don't 
repeat!
-       (run-with-timer 4 nil ;; short delay to avoid doing this too often
-                       (lambda () (setq isabelle-time-to-refresh-logics t))))))
-
-(defun isabelle-menu-bar-update-logics ()
-  "Update logics menu."
-  (and (current-local-map)
-       (keymapp (lookup-key (current-local-map)
-                           (vector 'menu-bar (intern proof-assistant))))
-       (isabelle-logics-menu-refresh)))
-
-(add-hook 'menu-bar-update-hook 'isabelle-menu-bar-update-logics)
-
-
-;; Added in PG 3.4: load isar-keywords file.
-;; This roughly follows the method given in the interface script.
-;; It could be used to add an elisp command at the bottom of
-;; a theory file, if we sorted out the load order a bit, or
-;; added a facility to reconfigure.
-;; TODO: also add something to spill out a keywords file?
-(defun isabelle-load-isar-keywords (&optional kw)
-  (interactive "sLoad isar keywords: ")
-  (let ((userhome  (isa-getenv "ISABELLE_HOME_USER"))
-       (isahome   (isa-getenv "ISABELLE_HOME"))
-       (isarkwel  "%s/etc/isar-keywords-%s.el")
-       (isarel    "%s/etc/isar-keywords.el")
-       (ifrdble   (lambda (f) (if (file-readable-p f) f))))
-    (load-file
-     (or
-      (and kw (funcall ifrdble (format isarkwel userhome kw)))
-      (and kw (funcall ifrdble (format isarkwel isahome kw)))
-      (funcall ifrdble (format isarel userhome))
-      (funcall ifrdble (format isarel isahome))
-      (locate-library "isar-keywords")))))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Context-senstive in-span menu additions
-;;
-
-(defun isabelle-create-span-menu (span idiom name)
-  (if (eq idiom 'proof)
-      (let ((thm (span-property span 'name)))
-       (list (vector
-              "Visualise dependencies"
-              `(proof-shell-invisible-command
-                ,(format "thm_deps %s;" thm))
-              (not (string-equal thm proof-unnamed-theorem-name)))))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; XML as an SML string: add escapes for quotes
-;;
-
-(defun isabelle-xml-sml-escapes (xmlstring)
-  (replace-regexp-in-string "\"" "\\\"" xmlstring t t))
-
-(defun isabelle-process-pgip (xmlstring)
-  "Return an Isabelle or Isabelle/Isar command to process PGIP in XMLSTRING."
-  (format "ProofGeneral.process_pgip \"%s\";"
-         (isabelle-xml-sml-escapes xmlstring)))
-
-
-(provide 'isabelle-system)
-;;; isabelle-system.el ends here
diff --git a/isar/isar-autotest.el b/isar/isar-autotest.el
deleted file mode 100644
index 8e098a2..0000000
--- a/isar/isar-autotest.el
+++ /dev/null
@@ -1,117 +0,0 @@
-;; isar-autotest.el: tests of Isar Proof General.
-;;
-;; You can run these by issuing "make test.isar" in PG home dir.
-;;
-;; $Id$
-;;
-
-(defvar isar-long-tests nil
-  "Whether or not to perform lengthy tests")
-
-(require 'pg-autotest)
-
-(require 'proof-site)
-(proof-ready-for-assistant 'isar)
-
-(declare-function isar-tracing:auto-quickcheck-toggle "isar.el")
-(declare-function isar-tracing:auto-solve-direct-toggle "isar.el")
-(declare-function isar-proof:parallel-proofs-toggle "isar.el")
-
-(unless (bound-and-true-p byte-compile-current-file)
-
-  (pg-autotest start) ; can add 'debug flag for debug-on-error
-
-  (pg-autotest log ".autotest.log")  ; convention
-
-  (pg-autotest timestart 'total)
-
-  (pg-autotest remark "Testing standard Example.thy, Example-Xsym.thy")
-  (pg-autotest script-wholefile "isar/Example.thy")
-
-  ;; Test Trac#344 (nested spans bug with old-style undo)
-  ;; TODO: should test with both undo styles
-  (pg-autotest eval (proof-retract-buffer))
-  (proof-shell-wait)
-  (goto-char 135) ; first line
-  (pg-autotest eval (proof-goto-point))
-  (proof-shell-wait)
-  (pg-autotest eval (proof-retract-buffer))
-  (proof-shell-wait)
-  (goto-char 135) ; first line
-  (pg-autotest eval (proof-goto-point))
-  (proof-shell-wait)
-  (pg-autotest eval (proof-process-buffer))
-  (pg-autotest assert-full)
-  
-
-  ;; Speed up prover
-  (pg-autotest eval (isar-tracing:auto-quickcheck-toggle 0))
-  (pg-autotest eval (isar-tracing:auto-solve-direct-toggle 0)) ; autosolve 
hammers this!
-  (pg-autotest eval (proof-full-annotation-toggle 0))
-  (pg-autotest eval (isar-proof:parallel-proofs-toggle 0))
-  (proof-shell-wait)
-
-  (pg-autotest script-wholefile "isar/Example-Tokens.thy")
-
-  (pg-autotest remark "Testing prove-as-you-go (not replay)")
-  (find-file ".autotest.thy")
-  (erase-buffer) ; just in case exists
-  (setq buffer-file-name nil)
-  (pg-autotest eval (proof-electric-terminator-toggle 1))
-  (pg-autotest eval (insert "theory Example imports Main begin ")) ; no \n
-  (proof-electric-terminator)
-  (pg-autotest eval (insert "theorem and_comms: \"A & B --> B & A\"\n"))
-  (proof-electric-terminator)
-  (pg-autotest eval (insert "apply auto done\n"))
-  (pg-autotest eval (insert "end"))
-  (proof-electric-terminator)
-  (pg-autotest assert-full)
-  ;; Test Trac#138
-  (pg-autotest eval (proof-undo-last-successful-command))
-  (proof-shell-wait)
-  (pg-autotest eval (proof-goto-end-of-locked))
-  (pg-autotest eval (insert "(* this is a comment *)"))
-  (pg-autotest eval (proof-goto-point))
-  (proof-shell-wait)
-  (pg-autotest eval (skip-chars-backward " \n\t"))
-  (pg-autotest eval (insert " ")) ;; shouldn't give read-only error!
-  (set-buffer-modified-p nil)
-  (kill-buffer ".autotest.thy")
-
-  (pg-autotest remark "Now in tokens mode")
-  (pg-autotest eval (proof-unicode-tokens-toggle))
-  (pg-autotest script-wholefile "isar/Example-Tokens.thy")
-
-  (pg-autotest remark "Testing random jumps and edits")
-  (pg-autotest script-randomjumps "isar/Example.thy" 8)
-
-  (when isar-long-tests
-    (pg-autotest remark "Larger files...")
-    (pg-autotest script-wholefile "etc/isar/AHundredTheorems.thy")
-    (pg-autotest script-wholefile "isar/ex/Tarski.thy")
-    (pg-autotest script-randomjumps "isar/ex/Tarski.thy" 10)) ; better test?
-
-
-  (pg-autotest remark "Testing restarting the prover")
-  (pg-autotest quit-prover)
-
-
-  (pg-autotest remark           "Simple test of multiple file behaviour:")
-  (pg-autotest script-wholefile  "etc/isar/multiple/C.thy")
-  (pg-autotest assert-processed   "etc/isar/multiple/C.thy")
-  (pg-autotest assert-processed   "etc/isar/multiple/A.thy")
-  (pg-autotest assert-processed   "etc/isar/multiple/B.thy")
-  (pg-autotest retract-file       "etc/isar/multiple/B.thy")
-  (pg-autotest assert-unprocessed "etc/isar/multiple/B.thy")
-  (pg-autotest assert-unprocessed "etc/isar/multiple/C.thy")
-  (pg-autotest assert-processed   "etc/isar/multiple/A.thy")
-
-
-  (pg-autotest quit-prover)
-  
-  (pg-autotest remark  "Complete")
-  (pg-autotest timetaken 'total)
-
-  (pg-autotest exit)
-
-  )
diff --git a/isar/isar-find-theorems.el b/isar/isar-find-theorems.el
deleted file mode 100644
index 15da9f6..0000000
--- a/isar/isar-find-theorems.el
+++ /dev/null
@@ -1,489 +0,0 @@
-;; isar-find-theorems.el    A search form for Isabelle's find_theorems command.
-;;
-;; Copyright (C) 2007 Tjark Weber <tjark.weber@gmx.de>
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; $Id$
-;;
-
-(require 'pg-vars)
-(declare-function proof-find-theorems "pg-user")
-
-
-;; search form field values
-
-(defvar isar-find-theorems-data (list
-  ""      ;; num
-  ""      ;; pattern
-  "none"  ;; intro
-  "none"  ;; elim
-  "none"  ;; dest
-  ""      ;; name
-  ""      ;; simp
-  )
-  "Values of the Find Theorems search form's fields.")
-
-;; make the original (minibuffer based) "Find theorems" command (from
-;; ../generic/pg-user.el) available as isar-find-theorems-minibuffer;
-;; return '(nil) so that isar-find-theorems-minibuffer works as a
-;; value for isar-find-theorems-command
-
-(defun isar-find-theorems-minibuffer ()
-  "Search for items containing given constants (using the minibuffer)."
-  (interactive)
-  (let ((proof-find-theorems-command "find_theorems %s"))
-    (call-interactively 'proof-find-theorems))
-  '(nil))
-
-;; isar-find-theorems-form (just like isar-find-theorems-minibuffer) can be
-;; called interactively, and can be used as a value for
-;; proof-find-theorems-command (returning '(nil) means that the actual
-;; "find_theorems" command will NOT be issued to Isabelle by
-;; proof-find-theorems in this case, but only later on by a handler function
-;; for the form's "Find" button)
-
-(defun isar-find-theorems-form ()
-  "Search for items containing given constants (using a search form)."
-  (interactive)
-  (apply 'isar-find-theorems-create-searchform isar-find-theorems-data)
-  '(nil))
-
-;; update the universal key bindings (see ../generic/pg-vars.el)
-;;
-;; C-c C-a C-m is bound to isar-find-theorems-minibuffer
-;; C-c C-a C-f is bound to isar-find-theorems-form
-;;
-;; Note that C-c C-a C-f, although C-c C-a usually invokes the prover
-;; assistant specific keymap, is defined as a universal key binding here.
-;; This way it will be available in the same buffers as C-c C-f.
-
-(setq proof-universal-keys
-  (cons
-    '([(control c) (control a) (control m)] . isar-find-theorems-minibuffer)
-    (cons
-      '([(control c) (control a) (control f)] . isar-find-theorems-form)
-      proof-universal-keys)))
-
-;; Documentation, taken from isabelle/NEWS:
-;;
-;; * Command 'find_theorems' searches for a list of criteria instead of a
-;; list of constants. Known criteria are: intro, elim, dest, name:string,
-;; simp:term, and any term. Criteria can be preceded by '-' to select
-;; theorems that do not match. Intro, elim, dest select theorems that
-;; match the current goal, name:s selects theorems whose fully qualified
-;; name contain s, and simp:term selects all simplification rules whose
-;; lhs match term.  Any other term is interpreted as pattern and selects
-;; all theorems matching the pattern. Available in ProofGeneral under
-;; 'ProofGeneral -> Find Theorems' or C-c C-f.  Example:
-;;
-;;   C-c C-f (100) "(_::nat) + _ + _" intro -name: "HOL."
-;;
-;; prints the last 100 theorems matching the pattern "(_::nat) + _ + _",
-;; matching the current goal as introduction rule and not having "HOL."
-;; in their name (i.e. not being defined in theory HOL).
-
-;; search form widgets (set in isar-find-theorems-create-searchform
-;; and accessed in the "Find" handler)
-
-(defvar isar-find-theorems-widget-number nil
-  "Search form widget for the number of theorems.")
-
-(defvar isar-find-theorems-widget-pattern nil
-  "Search form widget for search patterns.")
-
-(defvar isar-find-theorems-widget-intro nil
-  "Search form widget for intro rules.")
-
-(defvar isar-find-theorems-widget-elim nil
-  "Search form widget for elim rules.")
-
-(defvar isar-find-theorems-widget-dest nil
-  "Search form widget for dest rules.")
-
-(defvar isar-find-theorems-widget-name nil
-  "Search form widget for theorem names.")
-
-(defvar isar-find-theorems-widget-simp nil
-  "Search form widget for simplification rules.")
-
-;; creates (or switches to) the search form buffer
-
-(defun isar-find-theorems-create-searchform
-    (num pattern intro elim dest name simp &optional errmsg)
-  "Create (or switch to) the Find Theorems search form buffer."
-
-  (if (get-buffer "*Find Theorems*")
-    (switch-to-buffer "*Find Theorems*")
-
-  ;; create a new search form
-
-  (switch-to-buffer "*Find Theorems*")
-
-  (widget-insert
-    (concat "\n  "
-      (if (fboundp 'propertize)
-       (propertize "Find Theorems" 'face 'bold)
-      "Find Theorems")
-      "\n\n"))
-
-  ;; pattern
-  (widget-insert "  Search pattern: ")
-  (setq isar-find-theorems-widget-pattern (widget-create 'editable-field
-    :size 50
-    :help-echo "A pattern to match in the theorem."
-    pattern))
-  (widget-insert " ")
-  (widget-create 'push-button
-    :help-echo "Click <mouse-2> for help."
-    :notify (lambda (&rest ignore) (isar-find-theorems-create-help))
-    "?")
-
-  ;; name
-  (widget-insert "\n\n  Theorem name:   ")
-  (setq isar-find-theorems-widget-name (widget-create 'editable-field
-    :size 50
-    :help-echo "Part of the theorem's name."
-    name))
-  (widget-insert " ")
-  (widget-create 'push-button
-    :help-echo "Click <mouse-2> for help."
-    :notify (lambda (&rest ignore) (isar-find-theorems-create-help))
-    "?")
-
-  ;; intro
-  (widget-insert "\n\n  Rules matching the current goal: ")
-  (widget-create 'push-button
-    :help-echo "Click <mouse-2> for help."
-    :notify (lambda (&rest ignore) (isar-find-theorems-create-help))
-    "?")
-  (widget-insert "\n\n    INTRO:\n      ")
-    (setq isar-find-theorems-widget-intro (widget-create 'radio-button-choice
-    :value intro
-    :indent 6
-    :button-args (list :help-echo "Click <mouse-2> to select one option.")
-    '(item "none") '(item "intro") '(item "-intro")))
-
-  ;; elim
-  (widget-insert "\n    ELIM:\n      ")
-  (setq isar-find-theorems-widget-elim (widget-create 'radio-button-choice
-    :value elim
-    :indent 6
-    :button-args (list :help-echo "Click <mouse-2> to select one option.")
-    '(item "none") '(item "elim") '(item "-elim")))
-
-  ;; dest
-  (widget-insert "\n    DEST:\n      ")
-  (setq isar-find-theorems-widget-dest (widget-create 'radio-button-choice
-    :value dest
-    :indent 6
-    :button-args (list :help-echo "Click <mouse-2> to select one option.")
-    '(item "none") '(item "dest") '(item "-dest")))
-
-  ;; simp
-  (widget-insert "\n  Simplification pattern: ")
-  (setq isar-find-theorems-widget-simp (widget-create 'editable-field
-    :size 42
-    :help-echo
-      "A pattern to match in the left-hand side of a simplification rule."
-    simp))
-  (widget-insert " ")
-  (widget-create 'push-button
-    :help-echo "Click <mouse-2> for help."
-    :notify (lambda (&rest ignore) (isar-find-theorems-create-help))
-    "?")
-
-  ;; num
-  (widget-insert "\n\n  Number of results:      ")
-  (setq isar-find-theorems-widget-number (widget-create 'editable-field
-    :size 10
-    :help-echo "Maximum number of results to be displayed."
-    num))
-  (widget-insert " ")
-  (widget-create 'push-button
-    :help-echo "Click <mouse-2> for help."
-    :notify (lambda (&rest ignore) (isar-find-theorems-create-help))
-    "?")
-
-  ;; Find
-  (widget-insert "\n\n  ")
-    (widget-create 'push-button
-    :help-echo "Click <mouse-2> to submit this form."
-    :notify (lambda (&rest ignore)
-      (let ((num     (widget-value isar-find-theorems-widget-number))
-           (pattern (widget-value isar-find-theorems-widget-pattern))
-           (intro   (widget-value isar-find-theorems-widget-intro))
-           (elim    (widget-value isar-find-theorems-widget-elim))
-           (dest    (widget-value isar-find-theorems-widget-dest))
-           (name    (widget-value isar-find-theorems-widget-name))
-           (simp    (widget-value isar-find-theorems-widget-simp)))
-      (kill-buffer "*Find Theorems*")
-      (isar-find-theorems-submit-searchform
-       num pattern intro elim dest name simp)))
-    "Find")
-
-  ;; Reset form
-    (widget-insert "    ")
-    (widget-create 'push-button
-    :help-echo "Click <mouse-2> to reset this form."
-    :notify (lambda (&rest ignore)
-      (kill-buffer "*Find Theorems*")
-      (isar-find-theorems-create-searchform
-       "" "" "none" "none" "none" "" ""))
-    "Reset Form")
-    (widget-insert "\n")
-
-  ;; errmsg
-  (if errmsg
-    (widget-insert (concat "\n    "
-      (if (fboundp 'propertize)
-       (propertize (concat errmsg "\n    See help for details.") 'face 'bold)
-      (concat errmsg "\n    See help for details."))
-      "\n")))
-
-  (use-local-map widget-keymap)
-  (widget-setup)
-
-  (goto-char 37))  ;; beginning of the "Search pattern" text field
-)
-
-;; creates the search form help buffer
-
-(defun isar-find-theorems-create-help ()
-  "Create a help text buffer for the Find Theorems search form."
-
-  (with-output-to-temp-buffer "*Find Theorems - Help*"
-    (princ (concat
-      "\n"
-      "*** Find Theorems - Help ***\n"
-      "\n"
-      "Command \"Find Theorems\" (C-c C-f) searches for theorems that satisfy 
a list of\n"
-      "user-supplied criteria. Known criteria are:\n"
-      "\n"
-      "* Search pattern: a pattern that occurs in the theorem, e.g. \"(_::nat) 
+ _\".\n"
-      "\n"
-      "* Theorem name: a substring of the theorem's fully qualified name. 
(Treats \"*\"\n"
-      "                as a wildcard character.)\n"
-      "\n"
-      "* Intro, Elim, Dest: select theorems that match the current goal as\n"
-      "                     introduction/elimination/destruction rule.\n"
-      "\n"
-      "* Simplification pattern: selects simplification rules whose left-hand 
side\n"
-      "                          matches the given pattern.\n"
-      "\n"
-      "* Number of results: an upper bound on the number of theorems that 
are\n"
-      "                     displayed. (Leave empty to use Isabelle's default 
value.)\n"
-      "\n"
-      "Multiple search patterns, theorem names and simplification patterns can 
be\n"
-      "given, separated by spaces. (Patterns containing a space must be 
enclosed in\n"
-      "double-quotes.) Criteria can be preceded by \"-\" to select theorems 
that do not.\n"
-      "match. (Patterns that begin with a \"-\" must be enclosed in 
double-quotes.)\n"
-      "\n"
-      "A minibuffer based \"Find Theorems\" command is available via (C-c C-a 
C-m). See\n"
-      "the Isabelle NEWS file for up-to-date documentation. A search form is 
available\n"
-      "via (C-c C-a C-f). Variable proof-find-theorems-command (customizable 
via\n"
-      "Proof-General > Advanced > Internals > Prover Config) controls the 
default\n"
-      "behavior of the \"Find Theorems\" command: set to 
isar-find-theorems-form or\n"
-      "isar-find-theorems-minibuffer.\n"
-  )))
-)
-
-;; parses the search form's data and calls isar-find-theorems
-;; with an appropriate argument string, or displays the search
-;; form again, but with an error message
-
-(defun isar-find-theorems-submit-searchform
-    (num pattern intro elim dest name simp)
-  "Parse the Find Theorems search form's data."
-
-  (let (num_ pattern_ intro_ elim_ dest_ name_ simp_ searchstring)
-
-  ;; pattern
-  (setq pattern_ (isar-find-theorems-parse-criteria "" pattern))
-
-  (if (not (pop pattern_))
-    (isar-find-theorems-create-searchform
-      num pattern intro elim dest name simp
-      (concat "Invalid search pattern: " (car pattern_)))
-
-  (setq pattern_ (car pattern_))
-
-  ;; name
-  (setq name_ (isar-find-theorems-parse-criteria "name: " name))
-
-  (if (not (pop name_))
-    (isar-find-theorems-create-searchform
-      num pattern intro elim dest name simp
-      (concat "Invalid theorem name: " (car name_)))
-
-  (setq name_ (car name_))
-
-  ;; simp
-  (setq simp_ (isar-find-theorems-parse-criteria "simp: " simp))
-
-  (if (not (pop simp_))
-    (isar-find-theorems-create-searchform
-      num pattern intro elim dest name simp
-      (concat "Invalid simplification pattern: " (car simp_)))
-
-  (setq simp_ (car simp_))
-
-  ;; num
-  (setq num_ (isar-find-theorems-parse-number num))
-
-  (if (not num_)
-    (isar-find-theorems-create-searchform
-      num pattern intro elim dest name simp
-      "Number of results must be a positive integer.")
-
-  ;; intro
-  (setq intro_ (if (equal intro "none") "" intro))
-
-  ;; elim
-  (setq elim_ (if (equal elim "none") "" elim))
-
-  ;; dest
-  (setq dest_ (if (equal dest "none") "" dest))
-
-  ;; success: save data, call isar-find-theorems
-  (setq isar-find-theorems-data
-    (list num pattern intro elim dest name simp))
-
-  (setq searchstring (format "find_theorems %s"
-    (mapconcat 'identity
-      (isar-find-theorems-filter-empty
-       (list num_ pattern_ intro_ elim_ dest_ name_ simp_))
-      " ")))
-
-  ;; note that proof-find-theorems with an argument provided
-  ;; will merely pass this on to Isabelle, and NOT display
-  ;; the search form again
-  (proof-find-theorems searchstring))))))
-)
-
-;; "Multiple search patterns, theorem names and simplification terms can be
-;; given, separated by spaces. (Patterns containing a space must be enclosed
-;; in double-quotes.) Criteria can be preceded by "-" to select theorems that
-;; do not match. (Patterns that begin with a "-" must be enclosed in double-
-;; quotes.)"
-;;
-;; returns (t parsed-string) (where parsed-string may be empty) or
-;; (nil errmsg) in case of an error
-
-(defun isar-find-theorems-parse-criteria (option-string criteria-string)
-  "Parse search patterns/theorem names/simplification terms,
-separated by \" \", possibly preceded by \"-\", and possibly
-escaped by double-quotes."
-
-  ;; This code might benefit greatly from the use of regexps.
-
-  (let ((tokens nil) (errmsg nil))
-
-  ;; turn criteria-string into a list of (string) tokens
-  (while (and (not (equal criteria-string "")) (not errmsg))
-
-    ;; ignore space
-    (if (equal (elt criteria-string 0) ?\ )
-      (setq criteria-string (substring criteria-string 1))
-
-    ;; - is a token
-    ;; Note: This is still a bit weird, as it treats a - following a -
-    ;;       just like the first -, i.e. not as part of a pattern. Oh
-    ;;       well.
-    (if (equal (elt criteria-string 0) ?-)
-      (progn
-       (setq tokens (cons "-" tokens))
-       (setq criteria-string (substring criteria-string 1)))
-
-    ;; " starts a token: search for the next ", regard as one token
-    ;; Note: This is still a bit weird, as it does not require the
-    ;;       closing double-quotes to be followed by a space. Oh well.
-    (if (equal (elt criteria-string 0) ?\")
-      (let ((i 1))
-       (while (and (< i (length criteria-string))
-                   (not (equal (elt criteria-string i) ?\")))
-         (setq i (1+ i)))
-       (if (equal i (length criteria-string))
-         (setq errmsg "missing closing double-quotes.")
-       (setq i (1+ i))
-       (setq tokens (cons (substring criteria-string 0 i) tokens))
-       (setq criteria-string (substring criteria-string i))))
-
-    ;; everything else: search for the next space, regard as one token
-    ;; Note: This is still a bit weird, as it scans over double-quotes.
-    ;;       Oh well.
-    (let ((i 1))
-      (while (and (< i (length criteria-string))
-                 (not (equal (elt criteria-string i) ?\ )))
-       (setq i (1+ i)))
-      (setq tokens (cons (substring criteria-string 0 i) tokens))
-      (setq criteria-string (substring criteria-string i)))
-    )))
-  )
-
-  (if errmsg
-    (list nil errmsg)
-
-  (setq tokens (nreverse tokens))
-
-  ;; convert the tokens into argument strings; make sure every "-" is
-  ;; followed by a pattern/name (i.e. not by another "-")
-  (let ((strings nil) (negated nil))
-
-  (while (and tokens (not errmsg))
-    (let ((token (car tokens)))
-    (if (equal token "-")
-      (if negated
-       (setq errmsg "- may not be followed by another -.")
-      (setq negated t)
-      (setq tokens (cdr tokens)))
-    (setq strings (cons
-      (concat (if negated "-" "") option-string
-       ;; wrap token in double-quotes if necessary
-       (if (equal (elt token 0) ?\") token (concat "\"" token "\"")))
-      strings))
-    (setq negated nil)
-    (setq tokens (cdr tokens))))
-  )
-
-  (if errmsg
-    (list nil errmsg)
-
-  (if negated
-    (list nil "- must be followed by a search criterion.")
-
-  (setq strings (nreverse strings))
-
-  (list t (mapconcat 'identity strings " "))
-  )))))
-)
-
-;; auxiliary functions
-
-;; returns "" if num is "", "(num)" if num is a string encoding a positive
-;; integer, and nil otherwise
-
-(defun isar-find-theorems-parse-number (num)
-  "Parse the number of theorems to be displayed."
-  (if (equal num "")
-    ""
-  (let ((numval (string-to-number num)))
-  (if (and (wholenump numval) (not (equal numval 0)))
-    (concat "(" (number-to-string numval) ")")
-  nil)))
-)
-
-(defun isar-find-theorems-filter-empty (strings)
-  "Build a new list by removing empty strings from a (non-circular) list."
-  (if (not strings)
-    nil
-  (if (equal (car strings) "")
-    (isar-find-theorems-filter-empty (cdr strings))
-  (cons (car strings)
-    (isar-find-theorems-filter-empty (cdr strings)))))
-)
-
-(provide 'isar-find-theorems)
diff --git a/isar/isar-keywords.el b/isar/isar-keywords.el
deleted file mode 100644
index 07f9861..0000000
--- a/isar/isar-keywords.el
+++ /dev/null
@@ -1,655 +0,0 @@
-;;
-;; Keyword classification tables for Isabelle/Isar.
-;; Generated from Pure + Pure-ProofGeneral + HOL + HOLCF + IOA + HOL-Boogie + 
HOL-Nominal + HOL-Statespace.
-;; *** DO NOT EDIT *** DO NOT EDIT *** DO NOT EDIT ***
-;;
-
-(defconst isar-keywords-major
-  '("\\."
-    "\\.\\."
-    "Isabelle\\.command"
-    "Isar\\.begin_document"
-    "Isar\\.define_command"
-    "Isar\\.edit_document"
-    "Isar\\.end_document"
-    "ML"
-    "ML_command"
-    "ML_prf"
-    "ML_val"
-    "ProofGeneral\\.inform_file_processed"
-    "ProofGeneral\\.inform_file_retracted"
-    "ProofGeneral\\.kill_proof"
-    "ProofGeneral\\.pr"
-    "ProofGeneral\\.process_pgip"
-    "ProofGeneral\\.restart"
-    "ProofGeneral\\.undo"
-    "abbreviation"
-    "also"
-    "apply"
-    "apply_end"
-    "arities"
-    "assume"
-    "atom_decl"
-    "attribute_setup"
-    "automaton"
-    "ax_specification"
-    "axiomatization"
-    "axioms"
-    "back"
-    "boogie_end"
-    "boogie_open"
-    "boogie_status"
-    "boogie_vc"
-    "by"
-    "cannot_undo"
-    "case"
-    "cd"
-    "chapter"
-    "class"
-    "class_deps"
-    "classes"
-    "classrel"
-    "code_abort"
-    "code_class"
-    "code_const"
-    "code_datatype"
-    "code_deps"
-    "code_include"
-    "code_instance"
-    "code_library"
-    "code_module"
-    "code_modulename"
-    "code_monad"
-    "code_pred"
-    "code_reflect"
-    "code_reserved"
-    "code_thms"
-    "code_type"
-    "coinductive"
-    "coinductive_set"
-    "commit"
-    "constdefs"
-    "consts"
-    "consts_code"
-    "context"
-    "corollary"
-    "cpodef"
-    "datatype"
-    "declaration"
-    "declare"
-    "def"
-    "default_sort"
-    "defer"
-    "defer_recdef"
-    "definition"
-    "defs"
-    "disable_pr"
-    "display_drafts"
-    "domain"
-    "domain_isomorphism"
-    "done"
-    "enable_pr"
-    "end"
-    "equivariance"
-    "example_proof"
-    "exit"
-    "export_code"
-    "extract"
-    "extract_type"
-    "finalconsts"
-    "finally"
-    "find_consts"
-    "find_theorems"
-    "fix"
-    "fixpat"
-    "fixrec"
-    "from"
-    "full_prf"
-    "fun"
-    "function"
-    "global"
-    "guess"
-    "have"
-    "header"
-    "help"
-    "hence"
-    "hide_class"
-    "hide_const"
-    "hide_fact"
-    "hide_type"
-    "inductive"
-    "inductive_cases"
-    "inductive_set"
-    "init_toplevel"
-    "instance"
-    "instantiation"
-    "interpret"
-    "interpretation"
-    "judgment"
-    "kill"
-    "kill_thy"
-    "lemma"
-    "lemmas"
-    "let"
-    "linear_undo"
-    "local"
-    "local_setup"
-    "locale"
-    "method_setup"
-    "moreover"
-    "new_domain"
-    "next"
-    "nitpick"
-    "nitpick_params"
-    "no_notation"
-    "no_syntax"
-    "no_translations"
-    "no_type_notation"
-    "nominal_datatype"
-    "nominal_inductive"
-    "nominal_inductive2"
-    "nominal_primrec"
-    "nonterminals"
-    "normal_form"
-    "notation"
-    "note"
-    "obtain"
-    "oops"
-    "oracle"
-    "overloading"
-    "parse_ast_translation"
-    "parse_translation"
-    "pcpodef"
-    "pr"
-    "prefer"
-    "presume"
-    "pretty_setmargin"
-    "prf"
-    "primrec"
-    "print_abbrevs"
-    "print_antiquotations"
-    "print_ast_translation"
-    "print_attributes"
-    "print_binds"
-    "print_cases"
-    "print_claset"
-    "print_classes"
-    "print_codeproc"
-    "print_codesetup"
-    "print_commands"
-    "print_configs"
-    "print_context"
-    "print_drafts"
-    "print_facts"
-    "print_induct_rules"
-    "print_interps"
-    "print_locale"
-    "print_locales"
-    "print_methods"
-    "print_orders"
-    "print_quotconsts"
-    "print_quotients"
-    "print_quotmaps"
-    "print_rules"
-    "print_simpset"
-    "print_statement"
-    "print_syntax"
-    "print_theorems"
-    "print_theory"
-    "print_trans_rules"
-    "print_translation"
-    "proof"
-    "prop"
-    "pwd"
-    "qed"
-    "quickcheck"
-    "quickcheck_params"
-    "quit"
-    "quotient_definition"
-    "quotient_type"
-    "realizability"
-    "realizers"
-    "recdef"
-    "recdef_tc"
-    "record"
-    "refute"
-    "refute_params"
-    "remove_thy"
-    "rep_datatype"
-    "repdef"
-    "schematic_corollary"
-    "schematic_lemma"
-    "schematic_theorem"
-    "sect"
-    "section"
-    "setup"
-    "show"
-    "simproc_setup"
-    "sledgehammer"
-    "sledgehammer_params"
-    "smt_status"
-    "sorry"
-    "specification"
-    "statespace"
-    "subclass"
-    "sublocale"
-    "subsect"
-    "subsection"
-    "subsubsect"
-    "subsubsection"
-    "syntax"
-    "term"
-    "termination"
-    "text"
-    "text_raw"
-    "then"
-    "theorem"
-    "theorems"
-    "theory"
-    "thm"
-    "thm_deps"
-    "thus"
-    "thy_deps"
-    "touch_thy"
-    "translations"
-    "txt"
-    "txt_raw"
-    "typ"
-    "type_notation"
-    "typed_print_translation"
-    "typedecl"
-    "typedef"
-    "types"
-    "types_code"
-    "ultimately"
-    "undo"
-    "undos_proof"
-    "unfolding"
-    "unused_thms"
-    "use"
-    "use_thy"
-    "using"
-    "value"
-    "values"
-    "welcome"
-    "with"
-    "write"
-    "{"
-    "}"))
-
-(defconst isar-keywords-minor
-  '("actions"
-    "advanced"
-    "and"
-    "assumes"
-    "attach"
-    "avoids"
-    "begin"
-    "binder"
-    "compose"
-    "congs"
-    "constrains"
-    "contains"
-    "datatypes"
-    "defines"
-    "file"
-    "fixes"
-    "for"
-    "functions"
-    "hide_action"
-    "hints"
-    "identifier"
-    "if"
-    "imports"
-    "in"
-    "infix"
-    "infixl"
-    "infixr"
-    "initially"
-    "inputs"
-    "internals"
-    "is"
-    "lazy"
-    "module_name"
-    "monos"
-    "morphisms"
-    "notes"
-    "obtains"
-    "open"
-    "output"
-    "outputs"
-    "overloaded"
-    "permissive"
-    "pervasive"
-    "post"
-    "pre"
-    "rename"
-    "restrict"
-    "shows"
-    "signature"
-    "states"
-    "structure"
-    "to"
-    "transitions"
-    "transrel"
-    "unchecked"
-    "uses"
-    "where"))
-
-(defconst isar-keywords-control
-  '("Isabelle\\.command"
-    "Isar\\.begin_document"
-    "Isar\\.define_command"
-    "Isar\\.edit_document"
-    "Isar\\.end_document"
-    "ProofGeneral\\.inform_file_processed"
-    "ProofGeneral\\.inform_file_retracted"
-    "ProofGeneral\\.kill_proof"
-    "ProofGeneral\\.process_pgip"
-    "ProofGeneral\\.restart"
-    "ProofGeneral\\.undo"
-    "cannot_undo"
-    "exit"
-    "init_toplevel"
-    "kill"
-    "linear_undo"
-    "quit"
-    "undo"
-    "undos_proof"))
-
-(defconst isar-keywords-diag
-  '("ML_command"
-    "ML_val"
-    "ProofGeneral\\.pr"
-    "boogie_status"
-    "cd"
-    "class_deps"
-    "code_deps"
-    "code_thms"
-    "commit"
-    "disable_pr"
-    "display_drafts"
-    "enable_pr"
-    "export_code"
-    "find_consts"
-    "find_theorems"
-    "full_prf"
-    "header"
-    "help"
-    "kill_thy"
-    "nitpick"
-    "normal_form"
-    "pr"
-    "pretty_setmargin"
-    "prf"
-    "print_abbrevs"
-    "print_antiquotations"
-    "print_attributes"
-    "print_binds"
-    "print_cases"
-    "print_claset"
-    "print_classes"
-    "print_codeproc"
-    "print_codesetup"
-    "print_commands"
-    "print_configs"
-    "print_context"
-    "print_drafts"
-    "print_facts"
-    "print_induct_rules"
-    "print_interps"
-    "print_locale"
-    "print_locales"
-    "print_methods"
-    "print_orders"
-    "print_quotconsts"
-    "print_quotients"
-    "print_quotmaps"
-    "print_rules"
-    "print_simpset"
-    "print_statement"
-    "print_syntax"
-    "print_theorems"
-    "print_theory"
-    "print_trans_rules"
-    "prop"
-    "pwd"
-    "quickcheck"
-    "refute"
-    "remove_thy"
-    "sledgehammer"
-    "smt_status"
-    "term"
-    "thm"
-    "thm_deps"
-    "thy_deps"
-    "touch_thy"
-    "typ"
-    "unused_thms"
-    "use_thy"
-    "value"
-    "values"
-    "welcome"))
-
-(defconst isar-keywords-theory-begin
-  '("theory"))
-
-(defconst isar-keywords-theory-switch
-  '())
-
-(defconst isar-keywords-theory-end
-  '("end"))
-
-(defconst isar-keywords-theory-heading
-  '("chapter"
-    "section"
-    "subsection"
-    "subsubsection"))
-
-(defconst isar-keywords-theory-decl
-  '("ML"
-    "abbreviation"
-    "arities"
-    "atom_decl"
-    "attribute_setup"
-    "automaton"
-    "axiomatization"
-    "axioms"
-    "boogie_end"
-    "boogie_open"
-    "class"
-    "classes"
-    "classrel"
-    "code_abort"
-    "code_class"
-    "code_const"
-    "code_datatype"
-    "code_include"
-    "code_instance"
-    "code_library"
-    "code_module"
-    "code_modulename"
-    "code_monad"
-    "code_reflect"
-    "code_reserved"
-    "code_type"
-    "coinductive"
-    "coinductive_set"
-    "constdefs"
-    "consts"
-    "consts_code"
-    "context"
-    "datatype"
-    "declaration"
-    "declare"
-    "default_sort"
-    "defer_recdef"
-    "definition"
-    "defs"
-    "domain"
-    "domain_isomorphism"
-    "equivariance"
-    "extract"
-    "extract_type"
-    "finalconsts"
-    "fixpat"
-    "fixrec"
-    "fun"
-    "global"
-    "hide_class"
-    "hide_const"
-    "hide_fact"
-    "hide_type"
-    "inductive"
-    "inductive_set"
-    "instantiation"
-    "judgment"
-    "lemmas"
-    "local"
-    "local_setup"
-    "locale"
-    "method_setup"
-    "new_domain"
-    "nitpick_params"
-    "no_notation"
-    "no_syntax"
-    "no_translations"
-    "no_type_notation"
-    "nominal_datatype"
-    "nonterminals"
-    "notation"
-    "oracle"
-    "overloading"
-    "parse_ast_translation"
-    "parse_translation"
-    "primrec"
-    "print_ast_translation"
-    "print_translation"
-    "quickcheck_params"
-    "quotient_definition"
-    "realizability"
-    "realizers"
-    "recdef"
-    "record"
-    "refute_params"
-    "repdef"
-    "setup"
-    "simproc_setup"
-    "sledgehammer_params"
-    "statespace"
-    "syntax"
-    "text"
-    "text_raw"
-    "theorems"
-    "translations"
-    "type_notation"
-    "typed_print_translation"
-    "typedecl"
-    "types"
-    "types_code"
-    "use"))
-
-(defconst isar-keywords-theory-script
-  '("inductive_cases"))
-
-(defconst isar-keywords-theory-goal
-  '("ax_specification"
-    "boogie_vc"
-    "code_pred"
-    "corollary"
-    "cpodef"
-    "example_proof"
-    "function"
-    "instance"
-    "interpretation"
-    "lemma"
-    "nominal_inductive"
-    "nominal_inductive2"
-    "nominal_primrec"
-    "pcpodef"
-    "quotient_type"
-    "recdef_tc"
-    "rep_datatype"
-    "schematic_corollary"
-    "schematic_lemma"
-    "schematic_theorem"
-    "specification"
-    "subclass"
-    "sublocale"
-    "termination"
-    "theorem"
-    "typedef"))
-
-(defconst isar-keywords-qed
-  '("\\."
-    "\\.\\."
-    "by"
-    "done"
-    "sorry"))
-
-(defconst isar-keywords-qed-block
-  '("qed"))
-
-(defconst isar-keywords-qed-global
-  '("oops"))
-
-(defconst isar-keywords-proof-heading
-  '("sect"
-    "subsect"
-    "subsubsect"))
-
-(defconst isar-keywords-proof-goal
-  '("have"
-    "hence"
-    "interpret"))
-
-(defconst isar-keywords-proof-block
-  '("next"
-    "proof"))
-
-(defconst isar-keywords-proof-open
-  '("{"))
-
-(defconst isar-keywords-proof-close
-  '("}"))
-
-(defconst isar-keywords-proof-chain
-  '("finally"
-    "from"
-    "then"
-    "ultimately"
-    "with"))
-
-(defconst isar-keywords-proof-decl
-  '("ML_prf"
-    "also"
-    "let"
-    "moreover"
-    "note"
-    "txt"
-    "txt_raw"
-    "unfolding"
-    "using"
-    "write"))
-
-(defconst isar-keywords-proof-asm
-  '("assume"
-    "case"
-    "def"
-    "fix"
-    "presume"))
-
-(defconst isar-keywords-proof-asm-goal
-  '("guess"
-    "obtain"
-    "show"
-    "thus"))
-
-(defconst isar-keywords-proof-script
-  '("apply"
-    "apply_end"
-    "back"
-    "defer"
-    "prefer"))
-
-(provide 'isar-keywords)
diff --git a/isar/isar-profiling.el b/isar/isar-profiling.el
deleted file mode 100644
index ae8a8f8..0000000
--- a/isar/isar-profiling.el
+++ /dev/null
@@ -1,58 +0,0 @@
-;; isar-profiling.el: simple profiling Isar Proof General.
-;;
-;; You can run these tests by issuing "make profile.isar" in PG home dir.
-;;
-;; $Id$
-;;
-
-(require 'proof-site)
-(proof-ready-for-assistant 'isar)
-
-(declare-function isar-tracing:auto-solve-toggle "isar.el")
-(declare-function isar-tracing:auto-quickcheck-toggle "isar.el")
-(declare-function isar-proof:parallel-proofs-toggle "isar.el")
-
-(require 'pg-autotest)
-(require 'pg-dev)
-
-(unless (bound-and-true-p byte-compile-current-file)
-
-  (pg-autotest log ".profile.log")  ; convention
-
-  (pg-autotest timestart 'total)
-
-  (pg-autotest-find-file "etc/isar/AHundredTheorems.thy")
-  (pg-autotest eval (proof-shell-ready-prover))
-  (pg-autotest eval (isar-tracing:auto-solve-toggle 0)) ; autosolve hammers 
this!
-  (pg-autotest eval (isar-tracing:auto-quickcheck-toggle 0))
-  (pg-autotest eval (isar-proof:parallel-proofs-toggle 0))
-  (pg-autotest eval (proof-full-annotation-toggle 0))
-  (proof-shell-wait)
-
-  ;; Simple profiling test.  Cf TRAC #324
-  (pg-autotest timestart)
-  (pg-autotest process-wholefile "etc/isar/AHundredTheorems.thy")
-  (pg-autotest timetaken)
-
-  ;; Same again with profiling
-  (profile-pg)
-  (pg-autotest timestart)
-  (pg-autotest process-wholefile "etc/isar/AHundredTheorems.thy")
-  (pg-autotest timetaken)
-  (pg-autotest timestart)
-  (pg-autotest process-wholefile "etc/isar/AHundredTheorems.thy")
-  (pg-autotest timetaken)
-  (pg-autotest timestart)
-  (pg-autotest process-wholefile "etc/isar/AHundredProofs.thy")
-  (pg-autotest timetaken)
-  (elp-results)
-  (let ((results 
-        (with-current-buffer "*ELP Profiling Results*"
-          (buffer-string))))
-    (with-current-buffer pg-autotest-log
-      (goto-char (point-min))
-      (insert "ELP Profiling Results: \n" results "\n\n")))
-
-  (pg-autotest exit)
-
-  )
diff --git a/isar/isar-syntax.el b/isar/isar-syntax.el
deleted file mode 100644
index 4b5f2e4..0000000
--- a/isar/isar-syntax.el
+++ /dev/null
@@ -1,612 +0,0 @@
-;; isar-syntax.el Syntax expressions for Isabelle/Isar  -*- lexical-binding:t 
-*-
-;; Copyright (C) 1994-2004, 2009, 2010 LFCS Edinburgh.
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
-;;
-;; Authors:     David Aspinall <David.Aspinall@ed.ac.uk>
-;;              Markus Wenzel
-;;
-;; $Id$
-;;
-
-(eval-when-compile (require 'cl-lib))
-
-(require 'proof-syntax)
-(require 'isar-keywords)               ; NB: we want to load isar-keywords at 
runtime
-
-;; ----- character syntax
-
-(defconst isar-script-syntax-table-entries
-  '(?\$ "."
-    ?\/ "."
-    ?\\ "\\"
-    ?+  "."
-    ?-  "."
-    ?=  "."
-    ?%  "."
-    ?<  "w"
-    ?>  "w"
-    ?\& "."
-    ?.  "w"
-    ?_  "w"
-    ?\' "w"
-    ??  "w"
-    ?`  "\""
-    ?\( "()1"
-    ?\) ")(4"
-    ?\{ "(}1b"
-    ?\} "){4b"
-    ?\* ". 23n")
-   "Syntax table entries for Isar scripts.
-This list is in the right format for proof-easy-config.")
-
-(defconst isar-script-syntax-table-alist
-  ;; NB: this is used for imenu.  Probably only need word syntax
-  (let ((syn isar-script-syntax-table-entries)
-       al)
-    (while syn
-      (setq al (cons (cons (char-to-string (car syn)) (cadr syn)) al))
-      (setq syn (cddr syn)))
-    al))
-
-(defun isar-init-syntax-table ()
-  "Set appropriate values for syntax table in current buffer."
-  (let ((syn isar-script-syntax-table-entries))
-    (while syn
-      (modify-syntax-entry
-       (car syn) (cadr syn))
-      (setq syn (cddr syn)))))
-
-(defun isar-init-output-syntax-table ()
-  "Set appropriate values for syntax table for Isabelle output."
-  (isar-init-syntax-table)
-  ;; ignore strings so font-locking works inside them
-  (modify-syntax-entry ?\" " ")
-  (modify-syntax-entry ?`  " ")
-  (modify-syntax-entry ?\* ".")
-  (modify-syntax-entry ?\( "()")
-  (modify-syntax-entry ?\) ")(")
-  (modify-syntax-entry ?\{ "(}")
-  (modify-syntax-entry ?\} "){"))
-
-
-;; ----- keyword groups
-
-(defconst isar-keyword-begin "begin")
-(defconst isar-keyword-end "end")
-
-(defconst isar-keywords-theory-enclose
-  (append isar-keywords-theory-begin
-         isar-keywords-theory-switch
-         isar-keywords-theory-end))
-
-(defconst isar-keywords-theory
-  (append isar-keywords-theory-heading
-         isar-keywords-theory-decl
-         isar-keywords-theory-goal))
-
-(defconst isar-keywords-save
-  (append isar-keywords-qed
-         isar-keywords-qed-block
-         isar-keywords-qed-global))
-
-(defconst isar-keywords-proof-enclose
-  (append isar-keywords-proof-block
-         isar-keywords-proof-open
-         isar-keywords-proof-close
-         isar-keywords-qed-block))
-
-(defconst isar-keywords-proof
-  (append isar-keywords-proof-heading
-         isar-keywords-proof-goal
-         isar-keywords-proof-chain
-         isar-keywords-proof-decl
-         isar-keywords-qed))
-
-(defconst isar-keywords-proof-context
-  (append isar-keywords-proof-asm
-         isar-keywords-proof-asm-goal))
-
-(defconst isar-keywords-local-goal
-  (append isar-keywords-proof-goal
-         isar-keywords-proof-asm-goal))
-
-(defconst isar-keywords-proper
-  (append isar-keywords-theory
-         isar-keywords-proof-enclose
-         isar-keywords-proof))
-
-(defconst isar-keywords-improper
-  (append isar-keywords-theory-script
-         isar-keywords-proof-script
-         isar-keywords-qed-global))
-
-(defconst isar-keyword-level-alist
-  (append 
-   (mapcar (lambda (w) (cons w 1))
-          (append isar-keywords-theory-heading
-                  isar-keywords-theory-begin
-                  isar-keywords-theory-end))
-   (mapcar (lambda (w) (cons w 2))
-          (append isar-keywords-theory-script
-                  isar-keywords-theory-goal))
-   (mapcar (lambda (w) (cons w 3))
-          (append isar-keywords-proof-heading
-                  isar-keywords-theory-goal))
-   (mapcar (lambda (w) (cons w 4))
-          isar-keywords-proof-block)))
-
-(defconst isar-keywords-outline 
-  (mapcar 'car isar-keyword-level-alist))
-
-(defconst isar-keywords-indent-open
-  (append isar-keywords-theory-goal
-         isar-keywords-proof-goal
-         isar-keywords-proof-asm-goal
-         isar-keywords-proof-open
-          '("notepad")))
-
-(defconst isar-keywords-indent-close
-  (append isar-keywords-save
-         isar-keywords-proof-close
-          isar-keywords-theory-end))
-
-(defconst isar-keywords-indent-enclose
-  (append isar-keywords-proof-block
-         isar-keywords-proof-close
-         isar-keywords-qed-block
-          isar-keywords-theory-end
-         (list isar-keyword-begin)))
-
-
-;; ----- regular expressions
-
-(defconst isar-ext-first "\\(?:\\\\<\\^?[A-Za-z]+>\\|[A-Za-z]\\)")
-(defconst isar-ext-rest "\\(?:\\\\<\\^?[A-Za-z]+>\\|[A-Za-z0-9'_]\\)")
-
-(defconst isar-text "[^\^A- ]*")
-(defconst isar-long-id-stuff (concat "\\(?:" isar-ext-rest "\\|\\.\\)+"))
-(defconst isar-id (concat "\\(" isar-ext-first isar-ext-rest "*\\)"))
-(defconst isar-idx (concat isar-id "\\(?:\\.[0-9]+\\)?"))
-
-(defconst isar-string "\"\\(\\(?:[^\"]\\|\\\\\"\\)*\\)\"")
-
-(defun isar-ids-to-regexp (ids)
-  "Hack list IDS of keywords IDS to make a regexp matching any of them.
-Note: IDS may have full-stops already regexp quoted." ; a nuisance!
-  (let* ((unquoted     (mapcar (lambda (s)
-                        (replace-regexp-in-string (regexp-quote "\\.") "." s))
-                              ids))
-        (cleaned      (remove "{" (remove "}" unquoted)))
-        (words        (if cleaned (list (regexp-opt cleaned 'words))))
-        ;; } is not a word constituent, so \_<}\_> fails
-        (rbrace       (if (member "}" ids) '("}")))
-        ;; { similarly, must also prevent {* matching
-        (lbrace       (if (member "{" ids)
-                          '("\\(?:{\\(?:\\b\\|[^\\*]\\)\\)"))))
-    (mapconcat 'identity (append words lbrace rbrace) "\\|")))
-
-;; tests
-; (isar-ids-to-regexp '("bla" "blubber"))
-; (isar-ids-to-regexp '("bla" "\\." "blubber"))
-; (isar-ids-to-regexp '("bla" "\\." "blubber" "{"))
-; NB: string-match not entirely accurate, syntax table affects \_< \_> 
behaviour
-; (string-match (isar-ids-to-regexp '("bla" "}" "blubber" "{")) "}")  ; 0
-; (string-match (isar-ids-to-regexp '("bla" "}" "blubber" "{")) "*}") ; 1 [OK]
-; (string-match (isar-ids-to-regexp '("bla" "}" "blubber" "{")) "*}bla") ; 1 
[OK]
-; (string-match (isar-ids-to-regexp '("bla" "}" "blubber" "{")) "ug{*") ; nil
-; (string-match (isar-ids-to-regexp '("bla" "}" "blubber" "{")) "ug{") ; 2
-; (string-match (isar-ids-to-regexp '("bla" "}" "blubber" "{")) "}ug") ; 0
-; (string-match (isar-ids-to-regexp '("bla" "}" "blubber" "{")) "}\n ug") ; 0
-; (string-match (isar-ids-to-regexp '("foo" "\\." "Foo\\.bar")) "boo.foo") ; 
nil/4
-; (string-match (isar-ids-to-regexp '("foo" "\\." "Foo\\.bar")) "Foo.bar") ; 0
-; (string-match (isar-ids-to-regexp '("foo" "\\." "Foo\\.bar")) "bar.foo") ; 4
-; (string-match (isar-ids-to-regexp '("foo" "\\." "Foo\\.bar")) "bar. foo") ; 5
-
-(defconst isar-any-command-regexp
-  ;; allow terminator to be considered as command start: 
-  ;; FIXME: really needs change in generic function to take account of this,
-  ;; since the end character of a command is not the start 
-  (concat ";\\|" (isar-ids-to-regexp isar-keywords-major))
-  "Regexp matching any Isabelle/Isar command keyword or the terminator 
character.")
-
-(defconst isar-name-regexp
-  (concat "\\s-*\\(" isar-string "\\|" isar-id "\\)\\s-*")
-  "Regexp matching Isabelle/Isar names; surrounding space and contents grouped.
-Group number 1 matches the identifier possibly with quotes; group number 2
-matches contents of quotes for quoted identifiers.")
-
-(defconst isar-improper-regexp
-  "\\(\\<[A-Za-z][A-Za-z0-9'_]*_tac\\>\\|\\<goal[0-9]+\\>\\)"
-  "Regexp matching low-level features")
-
-(defconst isar-save-command-regexp
-  (proof-anchor-regexp (isar-ids-to-regexp isar-keywords-save)))
-
-(defconst isar-global-save-command-regexp
-  (proof-anchor-regexp (isar-ids-to-regexp isar-keywords-qed-global)))
-
-(defconst isar-goal-command-regexp
-  (proof-anchor-regexp (isar-ids-to-regexp isar-keywords-theory-goal)))
-
-(defconst isar-local-goal-command-regexp
-  (proof-anchor-regexp (isar-ids-to-regexp isar-keywords-local-goal)))
-
-(defconst isar-comment-start "(*")
-(defconst isar-comment-end "*)")
-(defconst isar-comment-start-regexp (regexp-quote isar-comment-start))
-(defconst isar-comment-end-regexp (regexp-quote isar-comment-end))
-
-(defconst isar-string-start-regexp "\"\\|`\\|{\\*")
-(defconst isar-string-end-regexp "\"\\|`\\|\\*}")
-
-(defun isar-syntactic-context ()
-  (let ((sc (proof-looking-at-syntactic-context-default)))
-    (or (if (eq sc 'string)
-           (save-excursion
-             (save-match-data
-               (and (or (looking-at isar-string-start-regexp)
-                        (re-search-backward isar-string-start-regexp nil t))
-                    (skip-chars-backward " \t\n-")
-                    (looking-at "[ \t\n]*--")
-                    'comment))))
-      sc)))
-
-
-;; antiquotations
-
-(defconst isar-antiq-regexp
-  (concat "@{\\(?:[^\"{}]\\|" isar-string "\\)*}")
-  "Regexp matching Isabelle/Isar antiquotations.")
-
-;; keyword nesting
-
-(defconst isar-nesting-regexp
-  (isar-ids-to-regexp (list isar-keyword-begin isar-keyword-end)))
-
-(defun isar-nesting ()
-  "Determine keyword nesting"
-  (let ((nesting 0) (limit (point)))
-    (save-excursion
-      (goto-char (point-min))
-      (while (proof-re-search-forward isar-nesting-regexp limit t)
-       (cond
-        ((proof-buffer-syntactic-context))
-        ((equal (match-string 0) isar-keyword-begin) (cl-incf nesting))
-        ((equal (match-string 0) isar-keyword-end) (cl-decf nesting)))))
-    nesting))
-
-(defun isar-match-nesting (limit)
-  (cl-block nil
-    (while (proof-re-search-forward isar-nesting-regexp limit t)
-      (and (not (proof-buffer-syntactic-context))
-          (if (equal (match-string 0) isar-keyword-begin)
-              (> (isar-nesting) 1)
-            (> (isar-nesting) 0))
-          (cl-return t)))))
-
-
-;; ----- Isabelle inner syntax highlight
-
-(defface isabelle-string-face 
-  (proof-face-specs
-   (:foreground "springgreen4")
-   (:foreground "springgreen1")
-   ())
-  "*Face for fontifying string contents in Isabelle."
-  :group 'proof-faces)
-
-(defface isabelle-quote-face 
-  (proof-face-specs
-   (:foreground "Gray80")
-   (:foreground "Gray30")
-   (:italic t))
-  "*Face for quotes (string delimiters) in Isabelle."
-  :group 'proof-faces)
-
-(defface isabelle-class-name-face
-  (proof-face-specs
-   (:foreground "red")
-   (:foreground "red3")
-   (:bold t))
-  "*Face for Isabelle term / type highlighting"
-  :group 'proof-faces)
-
-(defface isabelle-tfree-name-face
-  (proof-face-specs
-   (:foreground "purple")
-   (:foreground "purple3")
-   (:bold t))
-  "*Face for Isabelle term / type highlighting"
-  :group 'proof-faces)
-
-(defface isabelle-tvar-name-face
-  (proof-face-specs
-   (:foreground "purple")
-   (:foreground "purple3")
-   (:bold t))
-  "*Face for Isabelle term / type highlighting"
-  :group 'proof-faces)
-
-(defface isabelle-free-name-face
-  (proof-face-specs
-   (:foreground "blue")
-   (:foreground "lightblue")
-   (:bold t))
-  "*Face for Isabelle term / type highlighting"
-  :group 'proof-faces)
-
-(defface isabelle-bound-name-face
-  (proof-face-specs
-   (:foreground "green4")
-   (:foreground "green")
-   (:bold t))
-  "*Face for Isabelle term / type highlighting"
-  :group 'proof-faces)
-
-(defface isabelle-var-name-face
-  (proof-face-specs
-   (:foreground "darkblue")
-   (:foreground "blue3")
-   (:bold t))
-  "*Face for Isabelle term / type highlighting"
-  :group 'proof-faces)
-
-(defconst isabelle-string-face 'isabelle-string-face)
-(defconst isabelle-quote-face  'isabelle-quote-face)
-(defconst isabelle-class-name-face 'isabelle-class-name-face)
-(defconst isabelle-tfree-name-face 'isabelle-tfree-name-face)
-(defconst isabelle-tvar-name-face  'isabelle-tvar-name-face)
-(defconst isabelle-free-name-face  'isabelle-free-name-face)
-(defconst isabelle-bound-name-face 'isabelle-bound-name-face)
-(defconst isabelle-var-name-face   'isabelle-var-name-face)
-
-
-;; font-lock syntactic fontification
-
-;; adapted from font-lock.el in GNU Emacs 23.1.1
-;; FIXME: Why not use the built-in syntactic fontification?
-(defun isar-font-lock-fontify-syntactically-region
-  (end) ;; (start end &optional loudly ppss)
-  "Put proper face on each string and comment between point and END."
-  (let (;; (comment-end-regexp
-       ;;  (replace-regexp-in-string "^ *" "" comment-end))
-        (start (point))
-        ;; Find the start state.
-        (state (syntax-ppss))
-        beg)
-    (if font-lock-verbose ;; loudly
-        (message "Fontifying %s... (syntactically...)" (buffer-name)))
-    ;;
-    ;; Find each interesting place between here and `end'.
-    (while
-       (let ((instring     (nth 3 state))
-             (incomment    (nth 4 state)))
-         (when (or instring incomment)
-           (setq beg (max (nth 8 state) start))
-           (setq state (parse-partial-sexp (point) end nil nil state
-                                           'syntax-table))
-           (cond
-            (instring
-             (put-text-property (1+ beg)
-                                (1- (point)) 'face isabelle-string-face)
-             (put-text-property beg (1+ beg) 'face isabelle-quote-face)
-             (put-text-property (1- (point)) (point) 'face 
isabelle-quote-face))
-            (t
-             (put-text-property beg (point) 'face font-lock-comment-face))))
-         (< (point) end))
-      (setq state (parse-partial-sexp (point) end nil nil state
-                                     'syntax-table))))
-  ;; Job is done, return to font-lock-keywords that there's no match.
-  nil)
-
-;; font-lock keywords fontification
-
-(defvar isar-font-lock-keywords-1
-  (list
-   (list #'isar-font-lock-fontify-syntactically-region)
-   (cons #'isar-match-nesting                               
'font-lock-preprocessor-face)
-   (cons (isar-ids-to-regexp isar-keywords-minor)          
'font-lock-type-face)
-   (cons (isar-ids-to-regexp isar-keywords-control)        'proof-error-face)
-   (cons (isar-ids-to-regexp isar-keywords-diag)           
'proof-tacticals-name-face)
-   (cons (isar-ids-to-regexp isar-keywords-theory-enclose) 
'font-lock-type-face)
-   (cons (isar-ids-to-regexp isar-keywords-proper)         
'font-lock-keyword-face)
-   (cons (isar-ids-to-regexp isar-keywords-proof-context)  
'proof-declaration-name-face)
-   (cons (isar-ids-to-regexp isar-keywords-improper)       
'font-lock-reference-face)
-   (cons isar-improper-regexp 'font-lock-reference-face)
-   (cons isar-antiq-regexp '(0 'font-lock-variable-name-face t))))
-
-(put 'isar-goals-mode
-     'font-lock-extra-managed-props '(invisible sendback))
-(put 'isar-response-mode
-     'font-lock-extra-managed-props '(invisible sendback))
-
-(defun isar-output-flkprops (start regexp end props)
-  `(,(concat "\\(" start "\\)\\(" regexp "\\)\\(" end "\\)")
-    (1 '(face nil invisible t) prepend)
-    (2 ',props prepend)
-    (,(+ 3 (regexp-opt-depth regexp)) '(face nil invisible t) prepend)))
-
-(defun isar-output-flk (start regexp end face)
-  (isar-output-flkprops start regexp end (list 'face face)))
-
-(defvar isar-output-font-lock-keywords-1
-  (list
-   '("\^A[IJKLMNOPV]" (0 '(face nil invisible t) t))
-   (isar-output-flkprops
-    "\^AW" "\\(?:[^\^A]\\|\^A[^X]\\)*" "\^AX"
-    '(face (:underline t) mouse-face 'highlight sendback t))
-
-   (isar-output-flk "\^A0"
-                   "\\(?:[^\^A]\\|\^A[^1]\\)*" "\^A1"
-                   'proof-warning-face)
-
-;; done generically at the moment:
-;; (isar-output-flk "\^AM" "\\(?:[^\^A]\\|\^A[^N]\\)*" "\^AN" 
'proof-error-face)
-
-   (isar-output-flk "\^AB" isar-text "\^AA" 'isabelle-class-name-face)
-   (isar-output-flk "\^AC" isar-text "\^AA" 'isabelle-tfree-name-face)
-   (isar-output-flk "\^AD" isar-text "\^AA" 'isabelle-tvar-name-face)
-   (isar-output-flk "\^AE" isar-text "\^AA" 'isabelle-free-name-face)
-   (isar-output-flk "\^AF" isar-text "\^AA" 'isabelle-bound-name-face)
-   (isar-output-flk "\^AG" isar-text "\^AA" 'isabelle-var-name-face)
-   (isar-output-flk "\^AH" isar-text "\^AA" 'proof-declaration-name-face)
-   )
-  "*Font-lock table for Isabelle output terms.")
-
-(defun isar-strip-output-markup (string)
-  "Remove invisible output markup from STRING"
-  (replace-regexp-in-string "\^A." "" string))
-
-(defconst isar-shell-font-lock-keywords
-  '(("\^A." (0 '(face nil invisible t)))))
-
-(defvar isar-goals-font-lock-keywords
-  (append
-   (list
-    "^theory:"
-    "^proof (prove):"
-    "^proof (state):"
-    "^proof (chain):"
-    "^goal.*:"
-    "^picking.*:"
-    "^using.*:"
-    "^calculation:"
-    "^this:"
-    "^abbreviations:"
-    "^term bindings:"
-    "^facts:"
-    "^cases:"
-    "^prems:"
-    "^fixed variables:"
-    "^structures:"
-    "^abbreviations:"
-    "^type constraints:"
-    "^default sorts:"
-    "^used type variable names:"
-    "^flex-flex pairs:"
-    "^constants:"
-    "^variables:"
-    "^type variables:"
-    "^\\s-*[0-9][0-9]?\\. ")
-   isar-output-font-lock-keywords-1)
-  "*Font-lock table for Isabelle/Isar output.")
-
-
-;; ----- variations on undo
-
-(defconst isar-linear-undo "linear_undo")
-
-(defconst isar-undo "ProofGeneral.undo;")
-
-(defconst isar-pr
-  (if (member "ProofGeneral\\.pr" 
-             isar-keywords-major)
-      "ProofGeneral.pr" ; does right thing
-    "pr" ; See Trac #292 
-    ))
-
-(defun isar-remove (name)
-  (concat "init_toplevel; kill_thy " name ";"))
-
-(defun isar-undos (linearp i)
-  (if (> i 0) (concat (if linearp "linear_undo " "undos_proof ")
-                     (int-to-string i) ";"
-                     (if linearp 
-                         (concat " "
-                                 isar-pr
-                                 ";"))
-                     )
-    nil))  ; was proof-no-command
-
-(defun isar-cannot-undo (cmd)
-  (concat "cannot_undo \"" cmd "\";"))
-
-(defconst isar-undo-commands
-  (list
-   isar-linear-undo
-   isar-undo
-   "init_toplevel" "kill_thy"
-   "undos_proof"
-   "cannot_undo"))
-
-(defconst isar-theory-start-regexp
-  (proof-anchor-regexp
-   (isar-ids-to-regexp
-    (append isar-keywords-theory-begin
-           isar-keywords-theory-switch))))
-
-(defconst isar-end-regexp
-  (proof-anchor-regexp
-   (isar-ids-to-regexp isar-keywords-theory-end)))
-
-(defconst isar-undo-fail-regexp
-  (proof-anchor-regexp
-   (isar-ids-to-regexp isar-keywords-control)))
-
-(defconst isar-undo-skip-regexp
-  (proof-anchor-regexp (proof-regexp-alt (isar-ids-to-regexp 
isar-keywords-diag) ";")))
-
-(defconst isar-undo-ignore-regexp
-  (proof-anchor-regexp "--"))
-
-(defconst isar-undo-remove-regexp
-  (concat
-   (proof-anchor-regexp (isar-ids-to-regexp isar-keywords-theory-begin))
-   isar-name-regexp))
-
-
-;; ----- imenu
-
-(defconst isar-keywords-imenu
-  (append isar-keywords-theory-begin
-         isar-keywords-theory-heading
-         isar-keywords-theory-decl
-         isar-keywords-theory-script
-         isar-keywords-theory-goal))
-
-(defconst isar-entity-regexp 
-  (concat "\\(" (isar-ids-to-regexp isar-keywords-imenu) "\\)"))
-
-(defconst isar-named-entity-regexp
-  (concat isar-entity-regexp
-         "\\(?:\\s-*(\\s-*in[^)]+)\\)?"
-         isar-name-regexp "[[:=]" ))
-
-(defconst isar-named-entity-name-match-number
-          (1+ (regexp-opt-depth isar-entity-regexp)))
-
-(defconst isar-generic-expression
-  (mapcar (lambda (kw)
-           (list (capitalize kw)
-                 (concat "\\<" kw "\\>"
-                         "\\(?:\\s-*(\\s-*in[^)]+)\\)?"
-                         isar-name-regexp "[[:=]")
-                 1))
-         isar-keywords-imenu))
-
-;; ----- indentation
-
-(defconst isar-indent-any-regexp
-  (proof-regexp-alt isar-any-command-regexp "\\s(" "\\s)"))
-(defconst isar-indent-inner-regexp
-  (proof-regexp-alt "[[]()]"))
-(defconst isar-indent-enclose-regexp
-  (proof-regexp-alt (isar-ids-to-regexp isar-keywords-indent-enclose) "\\s)"))
-(defconst isar-indent-open-regexp
-  (proof-regexp-alt (isar-ids-to-regexp isar-keywords-indent-open) "\\s("))
-(defconst isar-indent-close-regexp
-  (proof-regexp-alt (isar-ids-to-regexp isar-keywords-indent-close) "\\s)"))
-
-
-;; ----- outline mode
-
-(defconst isar-outline-regexp
-  (concat "[ \t]*\\(?:" (isar-ids-to-regexp isar-keywords-outline) "\\)")
-  "Outline regexp for Isabelle/Isar documents")
-
-(defconst isar-outline-heading-end-regexp "\n")
-
-(defconst isar-outline-heading-alist isar-keyword-level-alist)
-
-
-(provide 'isar-syntax)
diff --git a/isar/isar-unicode-tokens.el b/isar/isar-unicode-tokens.el
deleted file mode 100644
index 725bc54..0000000
--- a/isar/isar-unicode-tokens.el
+++ /dev/null
@@ -1,691 +0,0 @@
-;;; -*- coding: utf-8; -*-
-;; isar-unicode-tokens.el --- Tokens for Unicode Tokens package
-;;
-;; Copyright(C) 2008, 2009 David Aspinall / LFCS Edinburgh
-;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
-;;
-;; This file is loaded by proof-auxmodes.el for proof-unicode-tokens.el.
-;;
-;; It sets the variables defined at the top of unicode-tokens.el,
-;; unicode-tokens-<foo> is set from isar-<foo>.  See the corresponding
-;; variable for documentation.
-;;
-
-
-(eval-when-compile (require 'cl-lib))   ; cl-loop
-
-(eval-when-compile
-  (require 'unicode-tokens)        ; it's loaded dynamically at runtime
-  (require 'proof-unicode-tokens))  ; that file loads us at runtime
-
-(declare-function isar-markup-ml "isar")
-
-;;
-;; Customization
-;;
-
-(defgroup isabelle-tokens nil
-  "Variables which configure Isabelle tokens for Unicode Tokens mode."
-  :group 'isabelle
-  :prefix "isar-")
-
-(defun isar-set-and-restart-tokens (sym val)
-  "Function to restart Unicode Tokens when a token value is adjusted."
-  (set-default sym val)
-  (when (featurep 'isar-unicode-tokens) ; not during loading
-    (isar-init-token-symbol-map)
-    (isar-init-shortcut-alists)
-    (if (featurep 'unicode-tokens)
-       (unicode-tokens-initialise))))
-
-;;
-;; Controls
-;;
-
-(defconst isar-control-region-format-regexp
-  "\\(\\\\<\\^%s>\\)\\(.*?\\)\\(\\\\<\\^%s>\\)")
-
-(defconst isar-control-char-format-regexp
-  (concat
-   "\\(\\\\<\\^%s>\\)\\("
-   "\\(?:\\\\<[A-Za-z]+>\\|[^\\]\\)" ; cf isar-ext-first
-   "\\)"))
-
-(defconst isar-control-char-format        "\\<^%s>")
-(defconst isar-control-region-format-start "\\<^%s>")
-(defconst isar-control-region-format-end   "\\<^%s>")
-
-
-(defcustom isar-control-characters
-  '(("Subscript" "sub" sub)
-    ("Id subscript" "isub" sub)
-    ("Superscript" "sup" sup)
-    ("Id superscript" "isup" sup)
-    ("Loc" "loc" keyword)
-    ("Constant" "const" keyword)
-    ("Bold" "bold" bold)
-    ;; unofficial/unsupported:
-    ("Italic" "italic" italic))
-  "Control character tokens for Isabelle."
-  :group 'isabelle-tokens
-  :set 'isar-set-and-restart-tokens)
-
-(defcustom isar-control-regions
-  '(("Subscript" "bsub" "esub" sub)
-    ("Superscript" "bsup" "esup" sup)
-    ;; unofficial/unsupported:
-    ("Id subscript" "bisub" "eisub" sub)
-    ("Id superscript" "bisup" "eisup" sup)
-    ("Bold" "bbold" "ebold" bold)
-    ("Italic" "bitalic" "eitalic" italic)
-    ("Script" "bscript" "escript" script)
-    ("Frakt" "bfrakt" "efrakt" frakt)
-    ("Roman" "bserif" "eserif" serif)
-    ("Sans" "bsans" "esans" sans)
-    ("Overline" "boverline" "eoverline" overline)
-    ("Underline" "bunderline" "eunderline" underline)
-    ("Big"   "bbig" "ebig" big)
-    ("Small" "bsmall" "esmall" small)
-;    ("Large symbols" "bbigsyms" "ebigsyms" large-symbols)
-    )
-  "Control sequence tokens for Isabelle."
-  :group 'isabelle-tokens
-  :set 'isar-set-and-restart-tokens)
-
-;;
-;; Symbols
-;;
-
-(defconst isar-token-format "\\<%s>")
-
-;(defconst isar-token-variant-format-regexp
-;  "\\\\<\\(%s\\)\\([:][a-zA-Z0-9]+\\)?>") ; syntax change required
-(defconst isar-token-variant-format-regexp
-  "\\\\<\\(%s\\)[0-9]*>") ; unofficial interpretation of usual syntax
-
-(defcustom isar-greek-letters-tokens
-  '(("alpha" "α")
-    ("beta" "β")
-    ("gamma" "γ")
-    ("delta" "δ")
-    ("epsilon" "ε") ; varepsilon (some is epsilon), although PG can use dups
-    ("zeta" "ζ")
-    ("eta" "η")
-    ("theta" "θ")
-    ("iota" "ι")
-    ("kappa" "κ")
-    ("lambda" "λ")
-    ("mu" "μ")
-    ("nu" "ν")
-    ("xi" "ξ")
-    ("pi" "π")
-    ("rho" "ρ")
-    ("sigma" "σ")
-    ("tau" "τ")
-    ("upsilon" "υ")
-    ("phi" "φ")
-    ("chi" "χ")
-    ("psi" "ψ")
-    ("omega" "ω")
-    ("Gamma" "Γ")
-    ("Delta" "Δ")
-    ("Theta" "Θ")
-    ("Lambda" "Λ")
-    ("Xi" "Ξ")
-    ("Pi" "Π")
-    ("Sigma" "Σ")
-    ("Upsilon" "Υ")
-    ("Phi" "Φ")
-    ("Psi" "Ψ")
-    ("Omega" "Ω"))
-  "Greek letter token map for Isabelle."
-  :type 'unicode-tokens-token-symbol-map
-  :group 'isabelle-tokens
-  :set 'isar-set-and-restart-tokens)
-
-(defcustom isar-misc-letters-tokens
-  '(("bool" "B" bold underline)
-    ("complex" "ℂ")
-    ("nat" "ℕ")
-    ("rat" "ℚ")
-    ("real" "ℝ")
-    ("int" "ℤ"))
-  "Miscellaneous letter token map for Isabelle."
-  :type 'unicode-tokens-token-symbol-map
-  :group 'isabelle-tokens
-  :set 'isar-set-and-restart-tokens)
-
-(defcustom isar-symbols-tokens
-  '(("leftarrow" "←")
-    ("rightarrow" "→")
-    ("Leftarrow" "⇐")
-    ("Rightarrow" "⇒")
-    ("leftrightarrow" "↔")
-    ("Leftrightarrow" "⇔")
-    ("mapsto" "↦")
-    ("longleftarrow" "⟵")
-    ("Longleftarrow" "⟸")
-    ("longrightarrow" "⟶")
-    ("Longrightarrow" "⟹")
-    ("longleftrightarrow" "⟷")
-    ("Longleftrightarrow" "⟺")
-    ("longmapsto" "⟼")
-    ("midarrow" "–") ; #x002013 en dash
-    ("Midarrow" "‗") ; #x002017 double low line (not mid)
-    ("hookleftarrow" "↩")
-    ("hookrightarrow" "↪")
-    ("leftharpoondown" "↽")
-    ("rightharpoondown" "⇁")
-    ("leftharpoonup" "↼")
-    ("rightharpoonup" "⇀")
-    ("rightleftharpoons" "⇌")
-    ("leadsto" "↝")
-    ("downharpoonleft" "⇃")
-    ("downharpoonright" "⇂")
-    ("upharpoonleft" "↿")  ;;
-    ("upharpoonright" "↾") ;; overlaps restriction
-    ("restriction" "↾")    ;; same as above
-    ("Colon" "∷")
-    ("up" "↑")
-    ("Up" "⇑")
-    ("down" "↓")
-    ("Down" "⇓")
-    ("updown" "↕")
-    ("Updown" "⇕")
-    ("langle" "⟨")
-    ("rangle" "⟩")
-    ("lceil" "⌈")
-    ("rceil" "⌉")
-    ("lfloor" "⌊")
-    ("rfloor" "⌋")
-    ("lparr" "⦇")
-    ("rparr" "⦈")
-    ("lbrakk" "⟦")
-    ("rbrakk" "⟧")
-    ("lbrace" "⦃")
-    ("rbrace" "⦄")
-    ("guillemotleft" "«")
-    ("guillemotright" "»")
-    ("bottom" "⊥")
-    ("top" "⊤")
-    ("and" "∧")
-    ("And" "⋀")
-    ("or" "∨")
-    ("Or" "⋁")
-    ("forall" "∀")
-    ("exists" "∃")
-    ("nexists" "∄")
-    ("not" "¬")
-    ("box" "□")
-    ("diamond" "◇")
-    ("turnstile" "⊢")
-    ("Turnstile" "⊨")
-    ("tturnstile" "⊩")
-    ("TTurnstile" "⊫")
-    ("stileturn" "⊣")
-    ("surd" "√")
-    ("le" "≤")
-    ("ge" "≥")
-    ("lless" "≪")
-    ("ggreater" "≫")
-    ("lesssim" "⪍")
-    ("greatersim" "⪎")
-    ("lessapprox" "⪅")
-    ("greaterapprox" "⪆")
-    ("in" "∈")
-    ("notin" "∉")
-    ("subset" "⊂")
-    ("supset" "⊃")
-    ("subseteq" "⊆")
-    ("supseteq" "⊇")
-    ("sqsubset" "⊏")
-    ("sqsupset" "⊐")
-    ("sqsubseteq" "⊑")
-    ("sqsupseteq" "⊒")
-    ("inter" "∩")
-    ("Inter" "⋂")
-    ("union" "∪")
-    ("Union" "⋃")
-    ("squnion" "⊔")
-    ("Squnion" "⨆")
-    ("sqinter" "⊓")
-    ("Sqinter" "⨅")
-    ("setminus" "∖")
-    ("propto" "∝")
-    ("uplus" "⊎")
-    ("Uplus" "⨄")
-    ("noteq" "≠")
-    ("sim" "∼")
-    ("doteq" "≐")
-    ("simeq" "≃")
-    ("approx" "≈")
-    ("asymp" "≍")
-    ("cong" "≅")
-    ("smile" "⌣")
-    ("equiv" "≡")
-    ("frown" "⌢")
-    ("Join" "⨝")
-    ("bowtie" "⋈")
-    ("prec" "≺")
-    ("succ" "≻")
-    ("preceq" "≼")
-    ("succeq" "≽")
-    ("parallel" "∥")
-    ("bar" "¦")
-    ("plusminus" "±")
-    ("minusplus" "∓")
-    ("times" "×")
-    ("div" "÷")
-    ("cdot" "⋅")
-    ("star" "⋆")
-    ("bullet" "∙")
-    ("circ" "∘")
-    ("dagger" "†")
-    ("ddagger" "‡")
-    ("lhd" "⊲")
-    ("rhd" "⊳")
-    ("unlhd" "⊴")
-    ("unrhd" "⊵")
-    ("triangleleft" "◁")
-    ("triangleright" "▷")
-    ("triangle" "▵") ; or △
-    ("triangleq" "≜")
-    ("oplus" "⊕")
-    ("Oplus" "⨁")
-    ("otimes" "⊗")
-    ("Otimes" "⨂")
-    ("odot" "⊙")
-    ("Odot" "⨀")
-    ("ominus" "⊖")
-    ("oslash" "⊘")
-    ("dots" "…")
-    ("cdots" "⋯")
-    ("Sum" "∑")
-    ("Prod" "∏")
-    ("Coprod" "∐")
-    ("infinity" "∞")
-    ("integral" "∫")
-    ("ointegral" "∮")
-    ("clubsuit" "♣")
-    ("diamondsuit" "♢")
-    ("heartsuit" "♡")
-    ("spadesuit" "♠")
-    ("aleph" "ℵ")
-    ("emptyset" "∅")
-    ("nabla" "∇")
-    ("partial" "∂")
-    ("Re" "ℜ")
-    ("Im" "ℑ")
-    ("flat" "♭")
-    ("natural" "♮")
-    ("sharp" "♯")
-    ("angle" "∠")
-    ("copyright" "©")
-    ("registered" "®")
-    ("hyphen" "‐")
-    ("inverse" "¯¹") ; X-Symb: just "¯"
-    ("onesuperior" "¹")
-    ("twosuperior" "²")
-    ("threesuperior" "³")
-    ("onequarter" "¼")
-    ("onehalf" "½")
-    ("threequarters" "¾")
-    ("ordmasculine" "º")
-    ("ordfeminine" "ª")
-    ("section" "§")
-    ("paragraph" "¶")
-    ("exclamdown" "¡")
-    ("questiondown" "¿")
-    ("euro" "€")
-    ("pounds" "£")
-    ("yen" "¥")
-    ("cent" "¢")
-    ("currency" "¤")
-    ("degree" "°")
-    ("amalg" "⨿")
-    ("mho" "℧")
-    ("lozenge" "◊")
-    ("wp" "℘")
-    ("wrong" "≀")  ;; #x002307
-    ("struct" "⋄") ;; #x0022c4
-    ("acute" "´")
-    ("index" "ı")
-    ("dieresis" "¨")
-    ("cedilla" "¸")
-    ("hungarumlaut" "ʺ")
-    ("spacespace" " ")  ;; #x002001
-    ("module" "⟨module⟩" bold)
-    ("some" "ϵ")
-    ("open" "‹")
-    ("close" "›")
-    ("newline" "⏎"))
-  "Symbol token map for Isabelle.  The standard set of Isabelle symbols."
-  :type 'unicode-tokens-token-symbol-map
-  :group 'isabelle-tokens
-  :set 'isar-set-and-restart-tokens)
-
-(defcustom isar-extended-symbols-tokens
-  '(("stareq" "≛")
-    ("defeq" "≝")
-    ("questioneq" "≟")
-    ("vartheta" "ϑ")
-    ; ("o" "ø")
-    ("varpi" "ϖ")
-    ("varrho" "ϱ")
-    ("varsigma" "ς")
-    ("varphi" "ϕ")
-    ("hbar" "ℏ")
-    ("ell" "ℓ")
-    ("ast" "∗")
-
-    ("bigcirc" "◯")
-    ("bigtriangleup" "△")
-    ("bigtriangledown" "▽")
-    ("ni" "∋")
-    ("mid" "∣")
-    ("notlt" "≮")
-    ("notle" "≰")
-    ("notprec" "⊀")
-    ("notpreceq" "⋠")
-    ("notsubset" "⊄")
-    ("notsubseteq" "⊈")
-    ("notsqsubseteq" "⋢")
-    ("notgt" "≯")
-    ("notge" "≱")
-    ("notsucc" "⊁")
-    ("notsucceq" "⋡")
-    ("notsupset" "⊅")
-    ("notsupseteq" "⊉")
-    ("notsqsupseteq" "⋣")
-    ("notequiv" "≢")
-    ("notsim" "≁")
-    ("notsimeq" "≄")
-    ("notapprox" "≉")
-    ("notcong" "≇")
-    ("notasymp" "≭")
-    ("nearrow" "↗")
-    ("searrow" "↘")
-    ("swarrow" "↙")
-    ("nwarrow" "↖")
-    ("vdots" "⋮")
-    ("ddots" "⋱")
-    ("closequote" "’")
-    ("openquote" "‘")
-    ("opendblquote" "”")
-    ("closedblquote" "“")
-    ("emdash" "—")
-    ("prime" "′")
-    ("doubleprime" "″")
-    ("tripleprime" "‴")
-    ("quadrupleprime" "⁗")
-    ("nbspace" " ")
-    ("thinspace" " ")
-    ("notni" "∌")
-    ("colonequals" "≔")
-    ("foursuperior" "⁴")
-    ("fivesuperior" "⁵")
-    ("sixsuperior" "⁶")
-    ("sevensuperior" "⁷")
-    ("eightsuperior" "⁸")
-    ("ninesuperior" "⁹"))
-  "Extended symbols token map for Isabelle.  These are not defined standardly."
-  :type 'unicode-tokens-token-symbol-map
-  :group 'isabelle-tokens
-  :set 'isar-set-and-restart-tokens)
-
-(defun isar-try-char (charset code1 code2)
-  (and (charsetp charset) ; prevent error
-       (char-to-string (make-char charset code1 code2))))
-
-(defcustom isar-symbols-tokens-fallbacks
-  `(;; Faked long symbols
-    ("longleftarrow" "←-")
-    ("Longleftarrow" "⇐–")
-    ("longrightarrow" "–→")
-    ("Longrightarrow" "–⇒")
-    ("longleftrightarrow" "←→")
-    ("Longleftrightarrow" "⇐⇒")
-    ("longmapsto" "❘→")
-    ;; bracket composition alternatives
-    ("lparr" "(|")
-    ("rparr" "|)")
-    ;; an example of using characters from another charset.
-    ;; to expand this table, see output of M-x list-charset-chars
-    ("lbrakk" ,(isar-try-char 'japanese-jisx0208 #x22 #x5A))
-    ("rbrakk" ,(isar-try-char 'japanese-jisx0208 #x22 #x5A))
-    ("lbrakk" "[|")
-    ("rbrakk" "|]")
-    ("lbrace" "{|")
-    ("rbrace" "|}"))
-  "Fallback alternatives to `isar-symbols-tokens'.
-The first displayable composition will be displayed to replace the
-tokens."
-  :type 'unicode-tokens-token-symbol-map
-  :group 'isabelle-tokens
-  :set 'isar-set-and-restart-tokens)
-
-(defcustom isar-bold-nums-tokens
-  '(("zero" "0" bold)
-    ("one" "1" bold)
-    ("two" "2" bold)
-    ("three" "3" bold)
-    ("four" "4" bold)
-    ("five" "5" bold)
-    ("six" "6" bold)
-    ("seven" "7" bold)
-    ("eight" "8" bold)
-    ("nine" "9" bold))
-  "Tokens for bold numerals."
-  :type 'unicode-tokens-token-symbol-map
-  :group 'isabelle-tokens
-  :set 'isar-set-and-restart-tokens)
-
-(defun isar-map-letters (f1 f2 &rest symbs)
-  (cl-loop for x below 26
-          for c = (+ 65 x)
-          collect
-          (cons (funcall f1 c) (cons (funcall f2 c) symbs))))
-
-(defconst isar-script-letters-tokens ; \<A> \<B> ...
-  (isar-map-letters (lambda (x) (format "%c" x))
-                   (lambda (x) (format "%c" x))
-                   'script))
-
-(defconst isar-roman-letters-tokens ; \<a> \<b> ...
-  (isar-map-letters (lambda (x) (downcase (format "%c" x)))
-                   (lambda (x) (downcase (format "%c" x)))
-                   'serif))
-
-(defconst isar-fraktur-uppercase-letters-tokens ; \<AA> \<BB> ..
-  (isar-map-letters (lambda (x) (format "%c%c" x x))
-                   (lambda (x) (format "%c" x))
-                   'frakt))
-
-(defconst isar-fraktur-lowercase-letters-tokens ; \<AA> \<BB> ..
-  (isar-map-letters (lambda (x) (downcase (format "%c%c" x x)))
-                   (lambda (x) (downcase (format "%c" x)))
-                   'frakt))
-
-(defcustom isar-token-symbol-map nil
-  "Table mapping Isabelle symbol token names to Unicode strings.
-See `unicode-tokens-token-symbol-map'.
-
-You can adjust this table to change the default entries.
-
-Each element is a list
-
-  (TOKNAME COMPOSITION FONTSYMB ...)
-
-COMPOSITION is usually a string, perhaps containing Unicode characters.
-For Isabelle, the token TOKNAME is made into the token \\<TOKNAME>."
-  :type 'unicode-tokens-token-symbol-map
-  :group 'isabelle
-  :set 'isar-set-and-restart-tokens
-  :tag "Isabelle Unicode Token Mapping")
-
-(defcustom isar-user-tokens nil
-  "User-defined additions to `isar-token-symbol-map'.
-
-Each element is a list
-
-  (TOKNAME COMPOSITION FONTSYMB ...)
-
-COMPOSITION is usually a string, perhaps containing Unicode characters.
-For Isabelle, the token TOKNAME is made into the token \\<TOKNAME>."
-  :type 'unicode-tokens-token-symbol-map
-  :group 'isabelle
-  :set 'isar-set-and-restart-tokens
-  :tag "User extensions for Isabelle Token Mapping")
-
-(defun isar-init-token-symbol-map ()
-  "Initialise the default value for `unicode-tokens-token-symbol-map'."
-  (custom-set-default 'isar-token-symbol-map
-                     (append
-                      isar-symbols-tokens
-                      isar-extended-symbols-tokens
-                      isar-user-tokens
-                      isar-misc-letters-tokens
-                      isar-greek-letters-tokens
-                      isar-bold-nums-tokens
-                      isar-script-letters-tokens
-                      isar-roman-letters-tokens
-                      isar-fraktur-uppercase-letters-tokens
-                      isar-fraktur-lowercase-letters-tokens
-                      isar-user-tokens
-                      isar-symbols-tokens-fallbacks)))
-
-(isar-init-token-symbol-map)
-
-
-
-;;
-;; Shortcuts
-;;
-
-(defcustom isar-symbol-shortcuts
-  '(("\\/" . "\\<or>")
-    ("/\\" . "\\<and>")
-    ("+O" . "\\<oplus>")
-    ("-O" . "\\<ominus>")
-    ("xO" . "\\<otimes>")
-    ("/O" . "\\<oslash>")
-    (".O" . "\\<odot>")
-    ("|+" . "\\<dagger>")
-    ("|++" . "\\<ddagger>")
-    ("<=" . "\\<le>")
-    ("|-" . "\\<turnstile>")
-    (">=" . "\\<ge>")
-    ("-|" . "\\<stileturn>")
-    ("||" . "\\<parallel>")
-    ("==" . "\\<equiv>")
-    ("~=" . "\\<noteq>")
-    ("~:" . "\\<notin>")
-    ("~~~" . "\\<notapprox>")
-    ("~~" . "\\<approx>")
-    ("~==" . "\\<cong>")
-    ("|<>|" . "\\<bowtie>")
-    ("|=" . "\\<Turnstile>")
-    ("=." . "\\<doteq>")
-    ("_|_" . "\\<bottom>")
-    ("</" . "\\<notle>")
-    ("~>=" . "\\<notge>")
-    ("==/" . "\\<notequiv>")
-    ("~/" . "\\<notsim>")
-    ("~=/" . "\\<notsimeq>")
-    ("~~/" . "\\<notsimeq>")
-    ("<-" . "\\<leftarrow>")
-    ("<=" . "\\<Leftarrow>")
-    ("->" . "\\<rightarrow>")
-    ("=>" . "\\<Rightarrow>")
-    ("<->" . "\\<leftrightarrow>")
-    ("<=>" . "\\<Leftrightarrow>")
-    ("|->" . "\\<mapsto>")
-    ("<--" . "\\<longleftarrow>")
-    ("<==" . "\\<Longleftarrow>")
-    ("-->" . "\\<longrightarrow>")
-    ("==>" . "\\<Longrightarrow>")
-    ("<==>" . "\\<Longleftrightarrow>")
-    ("|-->" . "\\<longmapsto>")
-    ("<->" . "\\<longleftrightarrow>")
-    ("<<" . "\\<guillemotleft>")
-    (">>" . "\\<guillemotright>")
-    ("<>" . "\\<diamond>")
-    ("[|" . "\\<lbrakk>")
-    ("|]" . "\\<rbrakk>")
-    ("{|" . "\\<lbrace>")
-    ("|}" . "\\<rbrace>")
-    ("(|" . "\\<lparr>")
-    ("|)" . "\\<rparr>")
-    ;; useful for unicode-tokens-replace-shortcuts
-    ("ALL" . "\\<forall>")
-    ("EX"  . "\\<exists>")
-    ("!!"  . "\\<And>")
-    ;; TODO: put these into replacement shortcuts, perhaps
-    ;; ("~"  . "\\<not>")
-    ;; ("!"  . "\\<forall>")
-    ;; ("?"  . "\\<exists>")
-    ;; extra misc, switch them off if you don't like them
-    ;("|>" . "\\<triangleright>") ; clashes with ML parsing combinator
-    ("<|" . "\\<triangleleft>"))
-  "Shortcut key sequence table for symbol tokens input.
-See `unicode-tokens-shortcut-alist'."
-    :type 'unicode-tokens-shortcut-alist
-    :set 'isar-set-and-restart-tokens
-    :group 'isabelle
-    :tag "Isabelle symbol shortcuts")
-
-(defcustom isar-shortcut-alist nil
-  "Shortcut key sequence table for token input.
-See `unicode-tokens-shortcut-alist'."
-  :type 'unicode-tokens-shortcut-alist
-  :set 'isar-set-and-restart-tokens
-  :group 'isabelle
-  :tag "Isabelle Unicode Input Shortcuts")
-
-(defun isar-init-shortcut-alists ()
-  "Set defaults for `isar-shortcut-alist' and 
`isar-shortcut-replacement-alist'."
-  (custom-set-default 'isar-shortcut-alist
-                     (append
-                      isar-symbol-shortcuts
-                      ;; LaTeX-like syntax for symbol names, easier to type
-                      (mapcar
-                       (lambda (tokentry)
-                         (cons (concat "\\" (car tokentry))
-                               (format isar-token-format (car tokentry))))
-                       (append isar-greek-letters-tokens
-                               isar-symbols-tokens)))))
-  ;; todo: allow shortcuts for replacements to be a different list
-  ;; (setq unicode-tokens-shortcut-replacement-alist nil))
-
-(isar-init-shortcut-alists)
-
-;;
-;; To generate special menu entries
-;;
-
-(defconst isar-tokens-customizable-variables
-  '(("Symbols" isar-symbols-tokens)
-    ("Extended Symbols" isar-extended-symbols-tokens)
-    ("User Tokens" isar-user-tokens)
-    ("Misc Letters" isar-misc-letters-tokens)
-    ("Greek Letters" isar-greek-letters-tokens)
-    ("Fallbacks" isar-symbols-tokens-fallbacks)
-    ("Shortcuts" isar-symbol-shortcuts)))
-
-
-;;
-;; prover symbol support
-;;
-
-(eval-after-load "isar"
-  '(setq
-    proof-tokens-activate-command
-    (isar-markup-ml "change print_mode (insert (op =) \"xsymbols\")")
-    proof-tokens-deactivate-command
-    (isar-markup-ml "change print_mode (remove (op =) \"xsymbols\")")))
-
-
-
-(provide 'isar-unicode-tokens)
-
-;;; isar-unicode-tokens.el ends here
diff --git a/isar/isar.el b/isar/isar.el
deleted file mode 100644
index 9deed7c..0000000
--- a/isar/isar.el
+++ /dev/null
@@ -1,645 +0,0 @@
-;; isar.el --- Major mode for Isabelle/Isar proof assistant
-;;
-;; Copyright (C) 1994-2010 LFCS Edinburgh.
-;; Copyright (C) 2018  Free Software Foundation, Inc.
-;;
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
-;;
-;; Maintainers:   David Aspinall, Makarius, Stefan Berghofer
-;;
-;; Authors:       David Aspinall <David.Aspinall@ed.ac.uk>
-;;               Markus Wenzel <wenzelm@in.tum.de>
-;;
-;; Contributors:  David von Oheimb, Sebastian Skalberg
-;;
-;; $Id$
-;;
-
-;;; Code:
-
-(eval-when-compile
-  (require 'span)
-  (require 'proof-syntax)
-  (require 'pg-goals)
-  (require 'pg-vars)
-  (require 'outline))
-(defvar comment-quote-nested)
-(defvar isar-use-find-theorems-form)
-(defvar isar-use-linear-undo)
-
-(require 'proof)
-(require 'isabelle-system)             ; system code
-(require 'isar-find-theorems)          ; "Find Theorems" search form
-
-;;
-;; Load syntax
-;;
-
-(defcustom isar-keywords-name nil
-  "Specifies a theory-specific keywords setting to use with Isar.
-See -k option for Isabelle interface script."
-  :type 'string
-  :group 'isabelle)
-
-(or (featurep 'isar-keywords)
-    ;; Pickup isar-keywords file from somewhere appropriate, giving
-    ;; user chance to set name of file, or based on name of logic.
-    (isabelle-load-isar-keywords
-     (or isar-keywords-name
-        isabelle-chosen-logic)))
-(require 'isar-syntax)
-
-
-;; Completion table for Isabelle/Isar identifiers
-(defpgdefault completion-table isar-keywords-major)
-
-(defcustom isar-web-page
-  "http://isabelle.in.tum.de/";
-  "URL of web page for Isabelle/Isar."
-  :type 'string
-  :group 'isabelle-isar)
-
-
-;; Adjust toolbar entries (must be done before proof-toolbar is loaded).
-
-(eval-after-load "pg-custom"
-  '(setq isar-toolbar-entries
-        (assq-delete-all 'qed (assq-delete-all 'goal isar-toolbar-entries))))
-
-
-(defun isar-strip-terminators ()
-  "Remove explicit Isabelle/Isar command terminators `;' from the buffer."
-  (interactive)
-  (save-excursion
-    (goto-char (point-min))
-    (while (proof-search-forward ";" (point-max) t)
-      (while (not (proof-buffer-syntactic-context))
-       (delete-char -1)
-       (or (proof-looking-at ";\\|\\s-\\|$")
-           (insert " "))))))
-
-
-(defun isar-markup-ml (string)
-  "Return marked up version of ML command STRING for Isar."
-  (format "ML_command {* %s *};" string))
-
-
-(defun isar-mode-config-set-variables ()
-  "Configure generic proof scripting mode variables for Isabelle/Isar."
-  (set (make-local-variable 'indent-tabs-mode) nil)
-  (setq
-   proof-assistant-home-page    isar-web-page
-   proof-guess-command-line     'isabelle-set-prog-name
-   proof-prog-name-guess       t
-
-   ;; proof script syntax
-   proof-terminal-string          ";"          ; forcibly ends a command
-   proof-electric-terminator-noterminator t  ; don't insert it
-   proof-script-command-start-regexp  isar-any-command-regexp 
-
-   proof-script-integral-proofs t
-   proof-script-comment-start          isar-comment-start
-   proof-script-comment-end            isar-comment-end
-   proof-script-comment-start-regexp   isar-comment-start-regexp
-   proof-script-comment-end-regexp     isar-comment-end-regexp
-   proof-string-start-regexp    isar-string-start-regexp
-   proof-string-end-regexp      isar-string-end-regexp
-
-   ;; For func-menu and finding goal..save regions
-   proof-save-command-regexp    isar-save-command-regexp
-   proof-goal-command-regexp    isar-goal-command-regexp
-   proof-goal-with-hole-regexp  isar-named-entity-regexp
-   proof-goal-with-hole-result isar-named-entity-name-match-number
-   proof-save-with-hole-regexp  nil
-   proof-script-imenu-generic-expression isar-generic-expression
-   imenu-syntax-alist isar-script-syntax-table-alist
-
-   proof-indent-enclose-offset  (- proof-indent)
-   proof-indent-open-offset     0
-   proof-indent-close-offset    0
-   proof-indent-any-regexp      isar-indent-any-regexp
-;   proof-indent-inner-regexp    isar-indent-inner-regexp
-   proof-indent-enclose-regexp  isar-indent-enclose-regexp
-   proof-indent-open-regexp     isar-indent-open-regexp
-   proof-indent-close-regexp    isar-indent-close-regexp
-
-   ;; proof engine
-   proof-showproof-command      "pr"
-   proof-goal-command           "lemma \"%s\""
-   proof-save-command           "qed"
-   proof-context-command        "print_context"
-   proof-info-command           "welcome"
-   proof-query-identifier-command
-   '((nil     "thm %s;")
-     (string  "term \"%s\";")
-     (comment "term \"%s\";"))
-   proof-shell-start-silent-cmd "disable_pr"
-   proof-shell-stop-silent-cmd  "enable_pr"
-   proof-shell-trace-output-regexp  "\^AI\^AV"
-   proof-script-preprocess      'isar-command-wrapping
-   ;; command hooks
-   proof-goal-command-p         'isar-goal-command-p
-   proof-really-save-command-p  'isar-global-save-command-p
-   proof-state-preserving-p     'isar-state-preserving-p
-   proof-shell-compute-new-files-list 'isar-shell-compute-new-files-list
-   ;; span menu
-   proof-script-span-context-menu-extensions 'isabelle-create-span-menu)
-  ;; proof assistant settings
-  (setq proof-use-pgip-askprefs        t)
-  ;; others: find theorems, undo config
-  (isar-configure-from-settings))
-
-(defun isar-shell-mode-config-set-variables ()
-  "Configure generic proof shell mode variables for Isabelle/Isar."
-  (setq
-
-   proof-shell-annotated-prompt-regexp  "^\\w*[>#] \^AS"
-
-   ;; for issuing command, not used to track cwd in any way.
-   proof-shell-cd-cmd          (isar-markup-ml "ThyLoad.add_path \"%s\"")
-
-   ;; Escapes for filenames inside ML strings.
-   ;; We also make a hack for a bug in Isabelle, by switching from
-   ;; backslashes to forward slashes if it looks like we're running
-   ;; on Windows.
-   proof-shell-filename-escapes
-   (if (fboundp 'win32-long-filename)   ; rough test for XEmacs on win32
-       ;; Patterns to unixfy names.
-       ;; Jacques Fleuriot's patch in ML does this too: ("^[a-zA-Z]:" . "")
-       ;; But I'll risk leaving drive names in, not sure how to replace them.
-       '(("\\\\" . "/") ("\"" . "\\\""))
-     ;; Normal case: quotation for backslash, quote mark.
-     '(("\\\\" . "\\\\") ("\""   . "\\\"")))
-
-   proof-shell-interrupt-regexp         "\^AM\\*\\*\\* Interrupt"
-   proof-shell-error-regexp             "\^AM\\*\\*\\*"
-   proof-shell-proof-completed-regexp   nil     ; n.a.
-
-   pg-next-error-regexp          "\\((line \\([0-9]+\\) of \"[^\"]+\")\\)"
-   pg-next-error-filename-regexp "\\((line [0-9]+ of \"\\([^\"]+\\)\")\\)"
-
-   ;; matches names of assumptions
-   proof-shell-assumption-regexp        isar-id
-
-   proof-shell-start-goals-regexp       "\^AO"
-   proof-shell-end-goals-regexp         "\^AP"
-
-   proof-shell-init-cmd                        nil
-   proof-shell-restart-cmd              "ProofGeneral.restart"
-
-   proof-shell-eager-annotation-start-length 2
-   proof-shell-eager-annotation-start   "\^AI\\|\^AK"
-   proof-shell-eager-annotation-end     "\^AJ\\|\^AL"
-   proof-shell-strip-output-markup     'isar-strip-output-markup
-
-   pg-special-char-regexp               "\^A[0-9A-Z]"
-   pg-subterm-help-cmd                 "term %s"
-   proof-cannot-reopen-processed-files  t
-
-   ;; Urgent messages delimited by eager annotations
-   proof-shell-clear-response-regexp    
-   "\^AIProof General, please clear the response buffer."
-   proof-shell-clear-goals-regexp       
-   "\^AIProof General, please clear the goals buffer."
-   proof-shell-theorem-dependency-list-regexp 
-   "\^AIProof General, theorem dependencies of \"\\(.*\\)\" are 
\"\\(.*\\)\"\\(\^AJ\\)"
-   proof-shell-retract-files-regexp
-   "\^AIProof General, you can unlock the file \"\\(.*\\)\"\^AJ"
-   proof-shell-process-file
-   (cons
-    "\^AIProof General, this file is loaded: \"\\(.*\\)\"\^AJ"
-    (lambda () (match-string 1)))
-
-   proof-shell-match-pgip-cmd          "\^AI<pgip"
-   proof-shell-issue-pgip-cmd          'isabelle-process-pgip
-
-   proof-shell-theorem-dependency-list-split "\" \""
-   proof-shell-show-dependency-cmd     "thm %s;"
-
-   proof-shell-compute-new-files-list 'isar-shell-compute-new-files-list
-   proof-shell-inform-file-processed-cmd 
-   "ProofGeneral.inform_file_processed \"%s\""
-   proof-shell-inform-file-retracted-cmd 
-   "ProofGeneral.inform_file_retracted \"%s\""))
-
-
-;;
-;; Settings for the interface
-;;
-;; Note: settings for Isabelle are configured automatically via PGIP messages,
-;; see `pg-pgip-process-hasprefs' in pg-pgip.el and 
-;; `proof-assistant-settings-cmds' in proof-menu.el.
-;;
-
-(defun isar-set-proof-find-theorems-command ()
-  (setq proof-find-theorems-command
-       (if isar-use-find-theorems-form
-           'isar-find-theorems-form
-         'isar-find-theorems-minibuffer)))
-
-(defpacustom use-find-theorems-form nil
-  "Use a form-style input for the find theorems operation."
-  :type 'boolean
-  :eval (isar-set-proof-find-theorems-command))
-
-(defun isar-set-undo-commands (&optional initp)
-  (unless initp
-    (proof-deactivate-scripting)
-    (when proof-script-buffer
-      (message "Warning: switching undo mechanism will break undo in current 
buffer")))
-  (setq proof-count-undos-fn 'isar-count-undos)
-  (when isar-use-linear-undo
-    (setq proof-kill-goal-command nil)
-    (setq proof-find-and-forget-fn 'isar-count-undos)
-    (setq proof-arbitrary-undo-positions t))
-  (when (not isar-use-linear-undo)
-    (setq proof-kill-goal-command "ProofGeneral.kill_proof")
-    (setq proof-find-and-forget-fn 'isar-find-and-forget)
-    (setq proof-arbitrary-undo-positions nil)))
-
-(defpacustom use-linear-undo t
-  "Whether to allow undo to re-enter completed proofs (requires restart)."
-  :type 'boolean
-  :eval (isar-set-undo-commands))
-
-(defun isar-configure-from-settings ()
-  (isar-set-proof-find-theorems-command)
-  (isar-set-undo-commands 'init))
-
-;;
-;; Theory loader operations
-;;
-
-(defun isar-remove-file (name files cmp-base)
-  (let (result)
-    (while files
-      (let*
-         ((file (car files))
-          (same (if cmp-base (string= name (file-name-nondirectory file))
-                  (string= name file))))
-       (unless same 
-         (setq result (cons file result)))
-       (setq files (cdr files))))
-    result))
-
-(defun isar-shell-compute-new-files-list ()
-  "Compute the new list of files read by the proof assistant.
-This is called when Proof General spots output matching
-`proof-shell-retract-files-regexp'."
-  (let*
-      ((name (match-string 1))
-       (base-name (file-name-nondirectory name)))
-    (if (string= name base-name)
-       (isar-remove-file name proof-included-files-list t)
-      (isar-remove-file 
-       (file-truename name) proof-included-files-list nil))))
-
-
-;;
-;; Define the derived modes
-;;
-;; use eval-and-compile to define vars for byte comp.
-
-(define-derived-mode isar-shell-mode proof-shell-mode
-   "Isabelle Shell" nil
-   (isar-shell-mode-config))
-
-(define-derived-mode isar-response-mode proof-response-mode
-  "Isar Messages" nil
-  (isar-response-mode-config))
-
-(define-derived-mode isar-goals-mode proof-goals-mode
-  "Isar Proofstate" nil
-  (isar-goals-mode-config))
-
-(define-derived-mode isar-mode proof-mode
-  "Isar"
-  "Major mode for editing Isar proof scripts.
-
-\\{isar-mode-map}"
-  (isar-mode-config))
-
-
-
-;;
-;; Help menu
-;;
-;; NB: definvisible must be after derived modes (uses isar-mode-map)
-
-(proof-definvisible isar-help-antiquotations "print_antiquotations" "hA")
-(proof-definvisible isar-help-attributes "print_attributes" "ha")
-(proof-definvisible isar-help-cases "print_cases" "hc")
-(proof-definvisible isar-help-claset "print_claset" "hC")
-(proof-definvisible isar-help-commands "print_commands" "ho")
-(proof-definvisible isar-help-facts "print_facts" "hf")
-(proof-definvisible isar-help-syntax "print_syntax" "hi")
-(proof-definvisible isar-help-induct-rules "print_induct_rules" "hI")
-(proof-definvisible isar-help-methods "print_methods" "hm")
-(proof-definvisible isar-help-simpset "print_simpset" "hS")
-(proof-definvisible isar-help-binds "print_binds" "hb")
-(proof-definvisible isar-help-theorems "print_theorems" "ht")
-(proof-definvisible isar-help-trans-rules "print_trans_rules" "hT")
-
-;;
-;; Command menu
-;;
-
-(proof-definvisible isar-cmd-display-draft
- '(progn
-    (proof-save-this-buffer)
-    (format "display_drafts \"%s\"" buffer-file-name))
- [(control d)])
-
-(proof-definvisible isar-cmd-print-draft
-  '(if (y-or-n-p
-       (format "Print draft of file %s? " buffer-file-name))
-       (progn
-        (proof-save-this-buffer)
-        (format "print_drafts \"%s\"" buffer-file-name))
-     (error "Aborted"))
-  [(control p)])
-
-(proof-definvisible isar-cmd-quickcheck "quickcheck" [(control q)])
-(proof-definvisible isar-cmd-nitpick "nitpick" [(control n)])
-(proof-definvisible isar-cmd-refute "refute" "r")
-(proof-definvisible isar-cmd-sledgehammer "sledgehammer" [(control s)])
-
-(defpgdefault menu-entries
-  (append
-   (list isabelle-logics-menu-entries)
-   (list
-    (cons "Commands"
-         (list
-          ["Quickcheck"         isar-cmd-quickcheck     t]
-          ["Nitpick"            isar-cmd-nitpick        t]
-          ["Refute"             isar-cmd-refute         t]
-          ["Sledgehammer"       isar-cmd-sledgehammer   t]
-          ["Display Draft"      isar-cmd-display-draft  t]
-          ["Print Draft"        isar-cmd-print-draft    t])))
-   (list
-    (cons "Show Me"
-         (list
-          ["Cases"              isar-help-cases          t]
-          ["Facts"              isar-help-facts          t]
-          ["Term Bindings"      isar-help-binds          t]
-          "----"
-          ["Classical Rules"    isar-help-claset         t]
-          ["Induct/Cases Rules" isar-help-induct-rules   t]
-          ["Simplifier Rules"   isar-help-simpset        t]
-          ["Theorems"           isar-help-theorems       t]
-          ["Transitivity Rules" isar-help-trans-rules    t]
-          "----"
-          ["Antiquotations"     isar-help-antiquotations t]
-          ["Attributes"         isar-help-attributes     t]
-          ["Commands"           isar-help-commands       t]
-          ["Inner Syntax"       isar-help-syntax         t]
-          ["Methods"            isar-help-methods        t])))))
-
-(defun isar-set-command ()
-  "Query the user to set the command to run Isabelle"
-  (interactive)
-  (isa-set-isabelle-command t))
-
-(defpgdefault help-menu-entries isabelle-docs-menu)
-
-;; undo proof commands
-(defun isar-count-undos (span)
-  "Return commands to be used to forget SPAN."
-  (let ((ct 0) str i)
-    (while span
-      (setq str (or (span-property span 'cmd) ""))
-      (cond ((or (eq (span-property span 'type) 'vanilla)
-                (eq (span-property span 'type) 'goalsave))
-            (or (proof-string-match isar-undo-skip-regexp str)
-                (proof-string-match isar-undo-ignore-regexp str)
-                (setq ct (+ 1 ct))))
-           ((eq (span-property span 'type) 'pbp)
-            ;; this case for automatically inserted text (e.g. sledgehammer)
-            (cond ((not (proof-string-match isar-undo-skip-regexp str))
-                   (setq ct 1)
-                   (setq i 0)
-                   ;; If we find a semicolon, assume several commands,
-                   ;; and increment the undo count.
-                   (while (< i (length str))
-                     (if (= (aref str i) ?\;)
-                         (setq ct (+ 1 ct)))
-                     (setq i (+ 1 i))))
-                  (t nil))))
-      (setq span (next-span span 'type)))
-    (list (isar-undos isar-use-linear-undo ct))))
-
-;; undo theory commands
-(defun isar-find-and-forget (span)
-  "Return commands to be used to forget SPAN."
-  (let (str ans answers)
-    (while span
-      (setq str (span-property span 'cmd))
-      (setq ans nil)
-      (cond
-       ;; comment, diagnostic, nested proof command: skip
-       ;; FIXME: should adjust proof-nesting-depth here.
-       ((or (eq (span-property span 'type) 'comment)
-           (eq (span-property span 'type) 'proverproc)
-           (eq (span-property span 'type) 'proof)
-           (and str (proof-string-match isar-undo-skip-regexp str))
-           (and str (proof-string-match isar-undo-ignore-regexp str))))
-       ;; finished goal: undo
-       ((eq (span-property span 'type) 'goalsave)
-       (setq ans isar-undo))
-       ;; open goal: skip and exit
-       ((and str (proof-string-match isar-goal-command-regexp str))
-       (setq span nil))
-       ;; control command: cannot undo
-       ((and str (proof-string-match isar-undo-fail-regexp str))
-       (setq ans (isar-cannot-undo (match-string 1 str)))
-       (setq answers nil)
-       (setq span nil))
-       ;; theory: remove and exit
-       ((and str (proof-string-match isar-undo-remove-regexp str))
-       (setq ans (isar-remove (match-string 3 str)))
-       (setq span nil))
-       ;; else: undo
-       (t
-       (setq ans isar-undo)))
-      (if ans (setq answers (cons ans answers)))
-      (if span (setq span (next-span span 'type))))
-    answers))
-
-(defun isar-goal-command-p (span)
-  "Decide whether argument SPAN is a goal or not."
-  (proof-string-match isar-goal-command-regexp
-                     (or (span-property span 'cmd) "")))
-
-(defun isar-global-save-command-p (span str)
-  "Decide whether argument SPAN with command STR is a global save command."
-  (or
-   (proof-string-match isar-global-save-command-regexp str)
-   (let ((ans nil) (lev 0) cmd)
-     (while (and (not ans) span (setq span (prev-span span 'type)))
-       (setq cmd (or (span-property span 'cmd) ""))
-       (cond
-       ;; comment: skip
-       ((eq (span-property span 'type) 'comment))
-       ;; local qed: enter block
-       ((proof-string-match isar-save-command-regexp cmd)
-        (setq lev (+ lev 1)))
-       ;; local goal: leave block, or done
-       ((proof-string-match isar-local-goal-command-regexp cmd)
-        (if (> lev 0) (setq lev (- lev 1)) (setq ans 'no)))
-       ;; global goal: done
-       ((proof-string-match isar-goal-command-regexp cmd)
-        (setq ans 'yes))))
-     (eq ans 'yes))))
-
-(defvar isar-current-goal 1
-  "Last goal that Emacs looked at.")
-
-(defun isar-state-preserving-p (cmd)
-  "Non-nil if command CMD preserves the proofstate."
-  (proof-string-match isar-undo-skip-regexp cmd))
-
-
-;;
-;; Commands specific to isar
-;;
-
-(proof-defshortcut isar-bold      "\\<^bold>%p" [(control b)])
-(proof-defshortcut isar-local     "\\<^loc>%p" [(control c)])
-(proof-defshortcut isar-super     "\\<^sup>%p" [(control u)])
-(proof-defshortcut isar-sub       "\\<^sub>%p" [(control l)])
-(proof-defshortcut isar-longsuper "\\<^bsup>%p\\<^esup>" [?u])
-(proof-defshortcut isar-longsub   "\\<^bsub>%p\\<^esub>" [?l])
-(proof-defshortcut isar-idsub     "\\<^isub>%p" [(control i)])
-(proof-defshortcut isar-raw       "\\<^raw:%p>" [(control r)])
-(proof-defshortcut isar-antiquote "@{text \"%p\"}" [(control a)])
-(proof-defshortcut isar-ml       "ML {* %p *}" [(control x)])
-
-
-;;
-;; Isar shell startup and exit hooks
-;;
-
-(defvar isar-shell-current-line-width nil
-  "Current line width of the Isabelle process's pretty printing module.
-Its value will be updated whenever the corresponding screen gets
-selected.")
-
-(defun isar-shell-adjust-line-width ()
-  "Use Isabelle's pretty printing facilities to adjust output line width.
-Checks the width in the `proof-goals-buffer'"
-  (let ((ans ""))
-    (and (not proof-shell-silent)
-        (proof-with-current-buffer-if-exists proof-goals-buffer
-          (let ((current-width
-                 ;; Actually, one might want the width of the
-                 ;; proof-response-buffer instead. Never mind.
-                 (max 20 (window-width
-                          (get-buffer-window proof-goals-buffer t)))))
-
-            (if (equal current-width isar-shell-current-line-width) ()
-              (setq isar-shell-current-line-width current-width)
-              (set-buffer proof-shell-buffer)
-              (setq ans (format "pretty_setmargin %d;"
-                                (- current-width 4)))))))
-    ans))
-
-;;
-;; Shell mode command adjusting
-;;
-
-(defsubst isar-string-wrapping (string)
-  (concat
-   "\""
-   (replace-regexp-in-string
-    "[\000-\037\"\\\\]"
-    (lambda (str) (format "\\\\%03d" (string-to-char str)))
-    string)
-   "\""))
-
-(defsubst isar-positions-of (filename start end)
-  (let ((line (line-number-at-pos start)))
-    (format "(\"file\"=%s, \"line\"=\"%d\") "
-            (isar-string-wrapping filename) ; cache this?
-            line)))
-
-(defcustom isar-wrap-commands-singly t
-  "Non-nil to use command wrapping around commands sent to Isabelle.
-This slows down interactive processing slightly."
-  :type 'boolean
-  :group 'isabelle)
-
-(defun isar-command-wrapping (filename start end string)
-  "A value for `proof-script-preprocess'."
-  (if isar-wrap-commands-singly
-      (list "Isabelle.command "
-           (isar-positions-of filename start end)
-           (isar-string-wrapping string))
-    (list (replace-regexp-in-string "\n" "\\\\<^newline>" string))))
-
-(defun isar-preprocessing ()
-  "Insert sync markers and other hacks.
-Uses variables `string' and `scriptspan' passed by dynamic scoping."
-  (with-no-warnings  ; dynamic scoping of string, scriptspan
-    (if (proof-string-match isabelle-verbatim-regexp string)
-       (setq string (match-string 1 string))
-      (unless (string-match ";[ \t]*\\'" string)
-       (setq string (concat string ";")))
-      (setq string (concat
-                   "\\<^sync>; "
-                   (isar-shell-adjust-line-width)
-                   string
-                   " \\<^sync>;")))))
-
-;;
-;;   Configuring proof output buffer
-;;
-
-(defun isar-mode-config ()
-  (isar-mode-config-set-variables)
-  (isar-init-syntax-table)
-  (setq proof-script-font-lock-keywords isar-font-lock-keywords-1)
-  (set (make-local-variable 'comment-quote-nested) nil) ;; can cope with 
nested comments
-  (set (make-local-variable 'outline-regexp) isar-outline-regexp)
-  (set (make-local-variable 'outline-heading-end-regexp) 
-       isar-outline-heading-end-regexp)
-  (set (make-local-variable 'outline-heading-alist)
-       isar-outline-heading-alist)
-  (set (make-local-variable 'blink-matching-paren-dont-ignore-comments) t)
-  (add-hook 'proof-shell-insert-hook 'isar-preprocessing)
-  (proof-config-done))
-
-(defun isar-shell-mode-config ()
-  "Configure Proof General proof shell for Isabelle/Isar."
-  (isar-init-output-syntax-table)
-  (isar-shell-mode-config-set-variables)
-  (set (make-local-variable 'font-lock-extra-managed-props)
-       '(invisible))
-  (setq proof-shell-font-lock-keywords
-       isar-shell-font-lock-keywords)
-  (proof-shell-config-done))
-
-(defun isar-response-mode-config ()
-  (isar-init-output-syntax-table)
-  (setq proof-response-font-lock-keywords
-       (append proof-response-font-lock-keywords
-               isar-output-font-lock-keywords-1))
-  (setq font-lock-multiline t)
-  (make-local-variable 'jit-lock-chunk-size)
-  (setq jit-lock-chunk-size 2000)
-  (proof-response-config-done))
-
-(defun isar-goals-mode-config ()
-  (setq pg-goals-change-goal "prefer %s")
-  (setq pg-goals-error-regexp proof-shell-error-regexp)
-  (isar-init-output-syntax-table)
-  (setq proof-goals-font-lock-keywords
-       (append proof-goals-font-lock-keywords
-               isar-goals-font-lock-keywords))
-  (setq font-lock-multiline t)
-  (make-local-variable 'jit-lock-chunk-size)
-  (setq jit-lock-chunk-size 2000)
-  (proof-goals-config-done))
-
-(provide 'isar)
-
-;;; isar.el ends here
diff --git a/isar/isartags b/isar/isartags
deleted file mode 100755
index 0d65f8e..0000000
--- a/isar/isartags
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/perl
-#
-# Or perhaps: /usr/local/bin/perl
-#
-# FIXME: this code is just borrowed from legotags program,
-#        it isn't yet working!   Please send us fixes.
-#
-# $Id$
-#
-undef $/;
-
-if($#ARGV<$[) {die "No Files\n";}
-open(tagfile,">TAGS") || die "Couldn't open TAGS: $!\n";
-
-while(<>)      
-{ 
-  print "Tagging $ARGV\n";
-  $a=$_;
-  $cp=1;
-  $lp=1;
-  $tagstring="";
-
-  while(1) 
-  { 
-
-#   ---- Get the next statement starting on a newline ---- 
-
-    if($a=~/^[ \t\n]*\(\*/)
-    { while($a=~/^\s*\(\*/) 
-      { $d=1; $a=$'; $cp+=length $&; $lp+=(($wombat=$&)=~tr/\n/\n/);
-        while($d>0 && $a=~/\(\*|\*\)/)
-        { $a=$'; $cp+=2+length $`; $lp+=(($wombat=$`)=~tr/\n/\n/);
-          if($& eq "(*") {$d++} else {$d--};
-        }
-        if($d!=0) {die "Unbalanced Comment?";}
-      }
-    }
-
-    if($cp>1 && $a=~/.*\n/) {$a=$'; $cp+=length $&; $lp++;}
-    while($a=~/^\n/) {$cp++;$lp++;$a=$'}
-
-    if($a=~/^[^;]*;/) 
-    { $stmt=$&; 
-      $newa=$'; 
-      $newcp=$cp+length $&; 
-      $newlp=$lp+(($wombat=$&)=~tr/\n/\n/); }
-    else { last;}
-
-# ---- The above embarrasses itself if there are semicolons inside comments or
-# ---- inside commands. Could do better.
-
-#  print "----- (",$lp,",",$cp,")\n", $stmt, "\n";
-
-    if($stmt=~/^([ \t]*\$?theory\s*([\w\']+))\s*:/)
-       { $tagstring.=$1."\177".$2."\001".$lp.",".$cp."\n"; }
-
-    elsif($stmt=~/^([ \t]*\$?\[\s*[\w\']+)/)
-       { do adddecs($stmt,$1) }
-
-    elsif($stmt=~/^([ \t]*Inductive\s*\[\s*[\w\']+)/)
-       { do adddecs($stmt,$1) }
-
-#   ---- Maybe do something smart with discharge as well?
-
-    $cp=$newcp; $lp=$newlp; $a=$newa;
-  }  
-  print tagfile "\f\n".$ARGV.",".(length $tagstring)."\n".$tagstring;
-}
-close tagfile;
-
-
-sub adddecs {
-  $wk=$_[0];
-  $tag=$_[1];
-  while($wk=~/\[\s*([\w\']+)/)
-  { $tagstring.=$tag."\177".$1."\001".$lp.",".$cp."\n"; $wk=$';
-    while($wk=~/^\s*,\s*([\w\']+)/)
-    { $tagstring.=$tag."\177".$1."\001".$lp.",".$cp."\n"; $wk=$'; }
-    $d=1;
-    while($d>0 && $wk=~/\[|\]/)
-    { $wk=$'; if($& eq "[") {$d++} else {$d--};
-    }
-  }
-  0;
-}
-
diff --git a/lego/BUGS b/lego/BUGS
deleted file mode 100644
index bfe3975..0000000
--- a/lego/BUGS
+++ /dev/null
@@ -1,53 +0,0 @@
--*- mode:outline -*-
-
-* LEGO Proof General Bugs
-
-See also ../BUGS for generic bugs.
-
-
-** PBP doesn't work on FSF, reason mentioned in generic bugs.
-
-** [FSF specific] `proof-zap-commas-region' does not work for Emacs
-  
-  On lego/example.l . On *initially* fontifying the buffer,
-  commas are not zapped [unfontified]. However, when entering text,
-  commata are zapped correctly. Workaround: don't stare too much at commata
-
-** If LEGO attempts to write a (object) file in a non-writable directory
-
-  It forgets the protocol mechanism on how to interact with 
-  Proof General and gets stuck. Workaround: Directly enter "Configure
-  AnnotateOn" in the Proof Shell to recover.
-
-** After a `Discharge', retraction ought to only be possible back 
-
- to the first declaration/definition which is discharged. However,
- LEGO Proof General does not know that Discharge has such a non-local
- effect.  Workaround: retract back to the first declaration/definition
- which is discharged.
-
-** A thorny issue is local definitions in a proof state. 
-
- LEGO cannot undo them explicitly. Workaround: retract back to a
- command before a definition.
-
-** Normalisation commands such as `Dnf', `Hnf' `Normal' cannot be undone
-
- in a proof state by Proof General. Workaround: retract back to the
- start of the proof.
-
-** After LEGO has issued a `*** QED ***' you may undo steps in the proof
-
- as long as you don't issue a `Save' command or start a new proof.
- LEGO Proof General assumes that all proofs are terminated with a
- proper `Save' command. Workaround: Always issue a `Save' command after
- completing a proof. If you forget one, you should retract to a point
- before the offending proof development.
-
-** legotags doesn't find all declarations. 
-
- It cannot handle lists e.g., with [x,y:nat]; it only tags x but not y. 
- [The same problem exists for coqtags] 
- Workaround: don't rely too much on the etags mechanism.
-
-
diff --git a/lego/README b/lego/README
deleted file mode 100644
index ee92ec2..0000000
--- a/lego/README
+++ /dev/null
@@ -1,37 +0,0 @@
-LEGO Proof General
-
-Written by Thomas Kleymann and  Dilip Sequeira.
-Later maintainance by David Aspinall and Paul Callaghan.
-
-Status:                *unsupported* (but tell us about problems)
-Maintainer:    Paul Callaghan / David Aspinall
-LEGO version:  1.3.1
-LEGO homepage: http://www.lfcs.informatics.ed.ac.uk/lego
-
-========================================
-
-LEGO Proof General has full support for multiple file scripting, and
-experimental support for proof by pointing.
-
-There is support for X Symbol, but not using a proper token language.
-
-There is a tags program, legotags.
-
-========================================
-
-Installation notes:
-
-Install legotags in a standard place or add <proofgeneral-home>/lego 
-to your PATH.
-NB: You may need to change the path to perl at the top of the file.
-
-Generate a TAGS file for the Lego library by running
-       legotags `find . -name \*.l -print`
-in the root directory of the library.
-
-
-
-========================================
-
-$Id$
-
diff --git a/lego/example.l b/lego/example.l
deleted file mode 100644
index 535d571..0000000
--- a/lego/example.l
+++ /dev/null
@@ -1,15 +0,0 @@
-(*
-    Example proof script for Lego Proof General.
- 
-    $Id$
-*)
-
-Module example Import lib_logic;
-
-Goal {A,B:Prop}(A /\ B) -> (B /\ A);
-intros;
-Refine H;
-intros;
-andI;
-Immed;
-Save and_comms;
diff --git a/lego/example2.l b/lego/example2.l
deleted file mode 100644
index 37d1e56..0000000
--- a/lego/example2.l
+++ /dev/null
@@ -1 +0,0 @@
-Module example2 Import "readonly/readonly";
\ No newline at end of file
diff --git a/lego/lego-syntax.el b/lego/lego-syntax.el
deleted file mode 100644
index 1cca4cf..0000000
--- a/lego/lego-syntax.el
+++ /dev/null
@@ -1,131 +0,0 @@
-;;; lego-syntax.el --- Syntax of LEGO
-
-;; This file is part of Proof General.
-
-;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014  Free Software Foundation, Inc.
-;; Portions © Copyright 2001-2017  Pierre Courtieu
-;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
-;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
-;; Portions © Copyright 2015-2017  Clément Pit-Claudel
-
-;; Author: Thomas Kleymann and Dilip Sequeira
-;; Maintainer: Paul Callaghan <P.C.Callaghan@durham.ac.uk>
-
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
-
-;;; Commentary:
-;;
-
-;;; Code:
-
-(require 'proof-syntax)
-
-;; ----- keywords for font-lock.
-
-(defconst lego-keywords-goal '("$?Goal"))
-
-(defconst lego-keywords-save '("$?Save" "SaveFrozen" "SaveUnfrozen"))
-
-(defconst lego-commands
-  (append lego-keywords-goal lego-keywords-save
-         '("allE" "allI" "andE" "andI" "Assumption" "Claim"
-           "Cut" "Discharge" "DischargeKeep"
-           "echo" "exE" "exI" "Expand" "ExpAll"
-           "ExportState" "Equiv" "For" "Freeze" "Hnf" "Immed"
-           "impE" "impI" "Induction" "Inductive"
-           "Invert" "Init" "intros" "Intros" "Module" "Next"
-           "Normal" "notE" "notI" "orE" "orIL" "orIR" "qnify" "Qnify"
-           "Qrepl" "Record" "Refine" "Repeat" "Try" "Unfreeze"))
-  "Subset of LEGO keywords and tacticals which are terminated by a \?;")
-
-(defconst lego-keywords
-  (append lego-commands
-         '("Constructors" "Double" "ElimOver" "Fields" "Import" "Inversion"
-           "NoReductions" "Parameters" "Relation" "Theorems")))
-
-(defconst lego-tacticals '("Then" "Else" "Try" "Repeat" "For"))
-
-;; ----- regular expressions for font-lock
-(defconst lego-error-regexp "^\\(cannot assume\\|Error\\|Lego parser\\)"
-  "A regular expression indicating that the LEGO process has identified an 
error.")
-
-(defvar lego-id proof-id)
-
-(defvar lego-ids (concat lego-id "\\(\\s *,\\s *" lego-id "\\)*")
-  "*For font-lock, we treat \",\" separated identifiers as one identifier
-  and refontify commata using \\{lego-fixup-change}.")
-
-(defconst lego-arg-list-regexp "\\s *\\(\\[[^]]+\\]\\s *\\)*"
-  "Regular expression maching a list of arguments.")
-
-(defun lego-decl-defn-regexp (char)
-    (concat "\\[\\s *\\(" lego-ids "\\)" lego-arg-list-regexp char))
-; Examples
-;              ^        ^^^^        ^^^^^^^^^^^^^^^^^^^^^^^  ^^^^
-;              [        sort                                 =
-;              [        sort        [n:nat]                  =
-;              [        sort        [abbrev=...][n:nat]      =
-
-(defconst lego-definiendum-alternative-regexp
-  (concat "\\(" lego-id "\\)" lego-arg-list-regexp "\\s * ==")
-  "Regular expression where the first match identifies the definiendum.")
-
-(defvar lego-font-lock-terms
-  (list
-
-   ; lambda binders
-     (list (lego-decl-defn-regexp "[:|?]") 1
-          'proof-declaration-name-face)
-
-     ; let binders
-     (list lego-definiendum-alternative-regexp 1 'font-lock-function-name-face)
-     (list (lego-decl-defn-regexp "=") 1 'font-lock-function-name-face)
-
-     ; Pi and Sigma binders
-     (list (concat "[{<]\\s *\\(" lego-ids "\\)") 1
-          'proof-declaration-name-face)
-
-     ;; Kinds
-     (cons (concat "\\<Prop\\>\\|\\<Type\\s *\\(("
-                  lego-id ")\\)?") 'font-lock-type-face)
-
-     ;; Special hacks!!
-     (cons "Discharge.." 'font-lock-keyword-face)
-     (cons "\\*\\*\\* QED \\*\\*\\*" 'font-lock-keyword-face))
-  "*Font-lock table for LEGO terms (displayed in output buffers).")
-
-;; Instead of "[^:]+", it may be better to use "lego-id". Furthermore,
-;; it might be safer to append "\\s-*:".
-(defconst lego-goal-with-hole-regexp
-  (concat "\\(" (proof-ids-to-regexp lego-keywords-goal) 
"\\)\\s-+\\([^(){},:]+\\)")
-  "Regular expression which matches an entry in `lego-keywords-goal'
-  and the name of the goal.")
-
-(defconst lego-save-with-hole-regexp
-  (concat "\\(" (proof-ids-to-regexp lego-keywords-save) "\\)\\s-+\\([^;]+\\)")
-  "Regular expression which matches an entry in
-  `lego-keywords-save' and the name of the goal.")
-
-(defvar lego-font-lock-keywords-1
-   (append
-    lego-font-lock-terms
-    (list
-     (cons (proof-ids-to-regexp lego-keywords) 'font-lock-keyword-face)
-     (cons (proof-ids-to-regexp lego-tacticals) 'proof-tacticals-name-face)
-     (list lego-goal-with-hole-regexp 2 'font-lock-function-name-face)
-     (list lego-save-with-hole-regexp 2 'font-lock-function-name-face)
-     ;; Remove spurious variable and function faces on commas.
-     '(proof-zap-commas))))
-
-(defun lego-init-syntax-table ()
-  "Set appropriate values for syntax table in current buffer."
-
-  (modify-syntax-entry ?_ "_")
-  (modify-syntax-entry ?\' "_")
-  (modify-syntax-entry ?\| ".")
-  (modify-syntax-entry ?\* ". 23")
-  (modify-syntax-entry ?\( "()1")
-  (modify-syntax-entry ?\) ")(4"))
-
-(provide 'lego-syntax)
diff --git a/lego/lego.el b/lego/lego.el
deleted file mode 100644
index 248e9d0..0000000
--- a/lego/lego.el
+++ /dev/null
@@ -1,439 +0,0 @@
-;;; lego.el --- Major mode for LEGO proof assistants
-
-;; This file is part of Proof General.
-
-;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2018  Free Software Foundation, Inc.
-;; Portions © Copyright 2001-2017  Pierre Courtieu
-;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
-;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
-;; Portions © Copyright 2015-2017  Clément Pit-Claudel
-
-;; Author:      Thomas Kleymann and Dilip Sequeira
-;; Maintainer: Paul Callaghan <P.C.Callaghan@durham.ac.uk>
-
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
-
-;;; Commentary:
-;;
-
-;;; Code:
-
-(require 'cl-lib)                       ;cl-member-if
-(require 'proof)
-(require 'lego-syntax)
-(eval-when-compile
-  (require 'outline))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; User Configuration ;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;; I believe this is standard for Linux under RedHat -tms
-(defcustom lego-tags "/usr/lib/lego/lib_Type/"
-  "*The directory of the TAGS table for the LEGO library"
-  :type 'file
-  :group 'lego)
-
-(defcustom lego-test-all-name "test_all"
-  "*The name of the LEGO module which inherits all other modules of the
-  library."
-  :type 'string
-  :group 'lego)
-
-(defpgdefault help-menu-entries
-  '(["LEGO Reference Card" (browse-url lego-www-refcard) t]
-    ["LEGO library (WWW)" (browse-url lego-library-www-page)  t]))
-
-(defpgdefault menu-entries
-  '(["intros" lego-intros t]
-    ["Intros" lego-Intros t]
-    ["Refine" lego-Refine t]))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Configuration of Generic Proof Package ;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Users should not need to change this.
-
-(defvar lego-shell-handle-output
-  (lambda (cmd string) 
-    (when (proof-string-match "^Module" cmd)
-      ;; prevent output and just give a minibuffer message
-      (setq proof-shell-last-output-kind 'systemspecific)
-      (message "Imports done!")))
-  "Acknowledge end of processing import declarations.")
-
-(defconst lego-process-config
-  ;; da: I think "Configure AnnotateOn;" is only included here for
-  ;; safety since there is a bug in LEGO which turns it off
-  ;; inadvertently sometimes.
-  "Init XCC; Configure PrettyOn; Configure AnnotateOn;"
-  "Command to initialise the LEGO process.
-
-Initialises empty context and prepares XCC theory.
-Enables pretty printing.
-Activates extended printing routines required for Proof General.")
-
-(defconst lego-pretty-set-width "Configure PrettyWidth %s; "
-  "Command to adjust the linewidth for pretty printing of the LEGO
-  process.")
-
-(defconst lego-interrupt-regexp "Interrupt.."
-  "Regexp corresponding to an interrupt")
-
-;; ----- web documentation
-
-(defcustom lego-www-home-page "http://www.dcs.ed.ac.uk/home/lego/";
-  "Lego home page URL."
-  :type 'string
-  :group 'lego)
-
-(defcustom lego-www-latest-release
-  "http://www.dcs.ed.ac.uk/home/lego/html/release-1.3.1/";
-  "The WWW address for the latest LEGO release."
-  :type 'string
-  :group 'lego)
-
-(defcustom lego-www-refcard
-  (concat lego-www-latest-release "refcard.ps.gz")
-  "URL for the Lego reference card."
-  :type 'string
-  :group 'lego)
-
-(defcustom lego-library-www-page
-  (concat lego-www-latest-release "library/library.html")
-  "The HTML documentation of the LEGO library."
-  :type 'string
-  :group 'lego)
-
-
-;; ----- lego-shell configuration options
-
-(defvar lego-prog-name "lego"
-  "*Name of program to run as lego.")
-
-(defvar lego-shell-cd "Cd \"%s\";"
-  "*Command of the inferior process to change the directory.")
-
-(defvar lego-shell-proof-completed-regexp "\\*\\*\\* QED \\*\\*\\*"
-  "*Regular expression indicating that the proof has been completed.")
-
-(defvar lego-save-command-regexp
-  (concat "^" (proof-ids-to-regexp lego-keywords-save)))
-(defvar lego-goal-command-regexp
-  (concat "^" (proof-ids-to-regexp lego-keywords-goal)))
-
-(defvar lego-kill-goal-command "KillRef;")
-(defvar lego-forget-id-command "Forget %s;")
-
-(defvar lego-undoable-commands-regexp
-  (proof-ids-to-regexp '("Dnf" "Refine" "Intros" "intros" "Next" "Normal"
-  "Qrepl" "Claim" "For" "Repeat" "Succeed" "Fail" "Try" "Assumption"
-  "UTac" "Qnify" "qnify" "andE" "andI" "exE" "exI" "orIL" "orIR" "orE" "ImpI"
-  "impE" "notI" "notE" "allI" "allE" "Expand" "Induction" "Immed"
-  "Invert")) "Undoable list")
-
-;; ----- outline
-
-(defvar lego-goal-regexp "\\?\\([0-9]+\\)")
-
-(defvar lego-outline-regexp
-  (concat "[[*]\\|"
-         (proof-ids-to-regexp
-          '("Discharge" "DischargeKeep" "Freeze" "$?Goal" "Module" "Record" 
"Inductive"
-     "Unfreeze"))))
-
-(defvar lego-outline-heading-end-regexp ";\\|\\*)")
-
-(defvar lego-shell-outline-regexp lego-goal-regexp)
-(defvar lego-shell-outline-heading-end-regexp lego-goal-regexp)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Derived modes - they're here 'cos they define keymaps 'n stuff ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(define-derived-mode lego-shell-mode proof-shell-mode
-   "lego-shell"
-     "Major mode for LEGO proof scripts.
-
-\\{lego-mode-map}"
-   (lego-shell-mode-config))
-
-(define-derived-mode lego-mode proof-mode
-  "lego" nil
-  (lego-mode-config))
-
-(define-derived-mode lego-response-mode proof-response-mode
-  "LEGOResp" nil
-  (setq proof-response-font-lock-keywords lego-font-lock-terms)
-  (lego-init-syntax-table)
-  (proof-response-config-done))
-
-(define-derived-mode lego-goals-mode proof-goals-mode
-  "LEGOGoals" "LEGO Proof State"
-  (lego-goals-mode-config))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Code that's lego specific                                      ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;; needs to handle Normal as well
-;; it should ignore Normal TReg Normal VReg and (Normal ...)
-(defun lego-count-undos (span)
-  "This is how to work out what the undo commands are.
-Given is the first SPAN which needs to be undone."
-  (let ((ct 0) str i)
-    (while span
-      (setq str (span-property span 'cmd))
-      (cond ((eq (span-property span 'type) 'vanilla)
-            (if (or (proof-string-match lego-undoable-commands-regexp str)
-                    (and (proof-string-match "Equiv" str)
-                         (not (proof-string-match "Equiv\\s +[TV]Reg" str))))
-                (setq ct (+ 1 ct))))
-           ((eq (span-property span 'type) 'pbp)
-            (setq i 0)
-            (while (< i (length str))
-              (if (= (aref str i) ?\;) (setq ct (+ 1 ct)))
-              (setq i (+ 1 i)))))
-      (setq span (next-span span 'type)))
-    (list (concat "Undo " (int-to-string ct) ";"))))
-
-(defun lego-goal-command-p (span)
-  "Decide whether argument is a goal or not"
-  (proof-string-match lego-goal-command-regexp
-                     (or (span-property span 'cmd) "")))
-
-(defun lego-find-and-forget (span)
-  (let (str ans)
-    (while (and span (not ans))
-      (setq str (span-property span 'cmd))
-
-      (cond
-
-       ((eq (span-property span 'type) 'comment))
-
-       ((eq (span-property span 'type) 'proverproc))
-
-       ((eq (span-property span 'type) 'goalsave)
-       (unless (eq (span-property span 'name) proof-unnamed-theorem-name)
-         (setq ans (format lego-forget-id-command (span-property span 
'name)))))
-       ;; alternative definitions
-       ((proof-string-match lego-definiendum-alternative-regexp str)
-       (setq ans (format lego-forget-id-command (match-string 1 str))))
-       ;; declarations
-       ((proof-string-match (concat "\\`\\$?" (lego-decl-defn-regexp "[:|=]")) 
str)
-       (let ((ids (match-string 1 str))) ; returns "a,b"
-         (proof-string-match proof-id ids)     ; matches "a"
-         (setq ans (format lego-forget-id-command (match-string 1 ids)))))
-
-       ((proof-string-match 
"\\`\\(Inductive\\|\\Record\\)\\s-*\\[\\s-*\\w+\\s-*:[^;]+\\`Parameters\\s-*\\[\\s-*\\(\\w+\\)\\s-*:"
 str)
-       (setq ans (format lego-forget-id-command (match-string 2 str))))
-
-       ((proof-string-match
-        "\\`\\(Inductive\\|Record\\)\\s-*\\[\\s-*\\(\\w+\\)\\s-*:" str)
-       (setq ans
-             (format lego-forget-id-command (match-string 2 str))))
-
-       ((proof-string-match "\\`\\s-*Module\\s-+\\(\\S-+\\)\\W" str)
-       (setq ans (format "ForgetMark %s;" (match-string 1 str)))))
-      ;; Carry on searching forward for something to forget
-      ;; (The first thing to be forget will forget everything following)
-      (setq span (next-span span 'type)))
-    (when ans (list ans)))); was (or ans proof-no-command)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Other stuff which is required to customise script management   ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun lego-goal-hyp ()
-  (cond
-   ((looking-at lego-goal-regexp)
-    (cons 'goal (match-string 1)))
-   ((looking-at proof-shell-assumption-regexp)
-    (cons 'hyp (match-string 1)))
-   (t nil)))
-
-
-(defun lego-state-preserving-p (cmd)
-  (not (proof-string-match lego-undoable-commands-regexp cmd)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Commands specific to lego                                      ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(proof-defshortcut lego-Intros "Intros "  [(control I)])
-(proof-defshortcut lego-intros "intros "  [(control i)])
-(proof-defshortcut lego-Refine "Refine "  [(control r)])
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Lego shell startup and exit hooks                              ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar lego-shell-current-line-width nil
-  "Current line width of the LEGO process's pretty printing module.
-  Its value will be updated whenever the corresponding screen gets
-  selected.")
-
-;; The line width needs to be adjusted if the LEGO process is
-;; running and is out of sync with the screen width
-
-(defun lego-shell-adjust-line-width ()
-  "Use LEGO's pretty printing facilities to adjust output line width.
-Checks the width in the `proof-goals-buffer'"
-  (and (proof-shell-live-buffer)
-       (proof-with-current-buffer-if-exists proof-goals-buffer
-        (let ((current-width
-               ;; Actually, one might sometimes
-               ;; want to get the width of the proof-response-buffer
-               ;; instead. Never mind.
-               (window-width (get-buffer-window proof-goals-buffer t))))
-          (if (equal current-width lego-shell-current-line-width) ()
-            ; else
-            (setq lego-shell-current-line-width current-width)
-            (set-buffer proof-shell-buffer)
-            (insert (format lego-pretty-set-width (- current-width 1)))
-            )))))
-
-(defun lego-mode-config ()
-
-  (setq proof-terminal-string ";")
-  (setq proof-script-comment-start "(*")
-  (setq proof-script-comment-end "*)")
-
-  (setq proof-assistant-home-page lego-www-home-page)
-
-  (setq proof-showproof-command "Prf;"
-       proof-goal-command "Goal %s;"
-       proof-save-command "Save %s;"
-       proof-context-command "Ctxt;"
-       proof-info-command "Help;")
-
-  (setq proof-prog-name lego-prog-name)
-
-  (setq proof-goal-command-p 'lego-goal-command-p
-       proof-completed-proof-behaviour 'closeany ; new in 3.0
-       proof-count-undos-fn 'lego-count-undos
-       proof-find-and-forget-fn 'lego-find-and-forget
-       pg-topterm-goalhyplit-fn 'lego-goal-hyp
-       proof-state-preserving-p 'lego-state-preserving-p)
-
-  (setq        proof-save-command-regexp lego-save-command-regexp
-       proof-goal-command-regexp lego-goal-command-regexp
-       proof-save-with-hole-regexp lego-save-with-hole-regexp
-       proof-goal-with-hole-regexp lego-goal-with-hole-regexp
-       proof-kill-goal-command lego-kill-goal-command
-       proof-indent-any-regexp
-       (proof-regexp-alt (proof-ids-to-regexp lego-commands) "\\s(" "\\s)"))
-
-  (lego-init-syntax-table)
-
-  ;; da: I've moved these out of proof-config-done in proof-script.el
-  (setq pbp-goal-command "Pbp %s;")
-  (setq pbp-hyp-command "PbpHyp %s;")
-
-;; font-lock
-
-  (set proof-script-font-lock-keywords lego-font-lock-keywords-1)
-
-  (proof-config-done)
-
-;; outline
-
-  (make-local-variable 'outline-regexp)
-  (setq outline-regexp lego-outline-regexp)
-
-  (make-local-variable 'outline-heading-end-regexp)
-  (setq outline-heading-end-regexp lego-outline-heading-end-regexp)
-
-;; tags
-  (cond ((boundp 'tags-table-list) ;; GNU Emacs
-        (make-local-variable 'tags-table-list)
-        (setq tags-table-list (cons lego-tags tags-table-list))))
-
-  (and (boundp 'tag-table-alist)  ;; XEmacs
-       (setq tag-table-alist
-            (append '(("\\.l$" . lego-tags)
-                      ("lego"  . lego-tags))
-                    tag-table-alist)))
-
-  (set (make-local-variable 'blink-matching-paren-dont-ignore-comments) t)
-
-;; hooks and callbacks
-
-  (add-hook 'proof-shell-insert-hook 'lego-shell-adjust-line-width))
-
-(defun lego-equal-module-filename (module filename)
-  "Returns `t' if MODULE is equal to the FILENAME and `nil' otherwise.
-The directory and extension is stripped of FILENAME before the test."
-  (equal module
-        (file-name-sans-extension (file-name-nondirectory filename))))
-
-(defun lego-shell-compute-new-files-list ()
-  "Function to update `proof-included-files-list'.
-Value for `proof-shell-compute-new-files-list', which see.
-
-For LEGO, we assume that module identifiers coincide with file names."
-  (let ((module (match-string 1)))
-    (cdr (cl-member-if
-         (lambda (filename) (lego-equal-module-filename module filename))
-         proof-included-files-list))))
-
-(defun lego-shell-mode-config ()
-  (setq proof-shell-cd-cmd lego-shell-cd
-       proof-shell-proof-completed-regexp lego-shell-proof-completed-regexp
-       proof-shell-error-regexp lego-error-regexp
-       proof-shell-interrupt-regexp lego-interrupt-regexp
-       proof-shell-assumption-regexp lego-id
-       pg-subterm-first-special-char ?\360
-       pg-subterm-start-char ?\372
-       pg-subterm-sep-char ?\373
-       pg-subterm-end-char ?\374
-       pg-topterm-regexp "\375"
-       proof-shell-eager-annotation-start "\376"
-       proof-shell-eager-annotation-start-length 1
-       proof-shell-eager-annotation-end "\377"
-       proof-shell-annotated-prompt-regexp "Lego> \371"
-       proof-shell-result-start "\372 Pbp result \373"
-       proof-shell-result-end "\372 End Pbp result \373"
-       proof-shell-start-goals-regexp "\372 Start of Goals \373"
-       proof-shell-end-goals-regexp "\372 End of Goals \373"
-       proof-shell-pre-sync-init-cmd "Configure AnnotateOn;"
-       proof-shell-init-cmd lego-process-config
-       proof-shell-restart-cmd lego-process-config
-       pg-subterm-anns-use-stack nil
-       proof-shell-handle-output-system-specific lego-shell-handle-output
-       lego-shell-current-line-width nil
-
-       ;; LEGO uses Unicode escape prefix: liable to create problems
-       proof-shell-unicode nil
-
-       proof-shell-process-file
-       (cons "Creating mark \"\\(.*\\)\" \\[\\(.*\\)\\]"
-         (lambda () (let ((match (match-string 2)))
-                      (if (equal match "") match
-                        (concat (file-name-sans-extension match) ".l")))))
-
-       proof-shell-retract-files-regexp
-       "forgot back through Mark \"\\(.*\\)\""
-       
-       proof-shell-font-lock-keywords lego-font-lock-keywords-1
-
-       proof-shell-compute-new-files-list
-       'lego-shell-compute-new-files-list)
-
-  (lego-init-syntax-table)
-
-  (proof-shell-config-done))
-
-(defun lego-goals-mode-config ()
-  (setq pg-goals-change-goal "Next %s;"
-       pg-goals-error-regexp lego-error-regexp)
-  (setq font-lock-keywords lego-font-lock-terms)
-  (lego-init-syntax-table)
-  (proof-goals-config-done))
-
-
-(provide 'lego)
diff --git a/lego/legotags b/lego/legotags
deleted file mode 100755
index 8243287..0000000
--- a/lego/legotags
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/perl
-#
-# Or perhaps: /usr/local/bin/perl
-#
-# $Id$
-#
-undef $/;
-
-if($#ARGV<$[) {die "No Files\n";}
-open(tagfile,">TAGS") || die "Couldn't open TAGS: $!\n";
-
-while(<>)      
-{ 
-  print "Tagging $ARGV\n";
-  $a=$_;
-  $cp=1;
-  $lp=1;
-  $tagstring="";
-
-  while(1) 
-  { 
-
-#   ---- Get the next statement starting on a newline ---- 
-
-    if($a=~/^[ \t\n]*\(\*/)
-    { while($a=~/^\s*\(\*/) 
-      { $d=1; $a=$'; $cp+=length $&; $lp+=(($wombat=$&)=~tr/\n/\n/);
-        while($d>0 && $a=~/\(\*|\*\)/)
-        { $a=$'; $cp+=2+length $`; $lp+=(($wombat=$`)=~tr/\n/\n/);
-          if($& eq "(*") {$d++} else {$d--};
-        }
-        if($d!=0) {die "Unbalanced Comment?";}
-      }
-    }
-
-    if($cp>1 && $a=~/.*\n/) {$a=$'; $cp+=length $&; $lp++;}
-    while($a=~/^\n/) {$cp++;$lp++;$a=$'}
-
-    if($a=~/^[^;]*;/) 
-    { $stmt=$&; 
-      $newa=$'; 
-      $newcp=$cp+length $&; 
-      $newlp=$lp+(($wombat=$&)=~tr/\n/\n/); }
-    else { last;}
-
-# ---- The above embarrasses itself if there are semicolons inside comments 
-# ---- inside commands. Could do better.
-
-#  print "----- (",$lp,",",$cp,")\n", $stmt, "\n";
-
-    if($stmt=~/^([ \t]*\$?Goal\s*([\w\']+))\s*:/)
-       { $tagstring.=$1."\177".$2."\001".$lp.",".$cp."\n"; }
-
-    elsif($stmt=~/^([ \t]*\$?\[\s*[\w\']+)/)
-       { do adddecs($stmt,$1) }
-
-    elsif($stmt=~/^([ \t]*Inductive\s*\[\s*[\w\']+)/)
-       { do adddecs($stmt,$1) }
-
-# ---- we don't need to tag saves: all goals should be named!
-
-#    elsif($stmt=~/([ \t]*\$?Save\s+([\w\']+))/)
-#       { $tagstring.=$1."\177".$2."\001".$lp.",".$cp."\n"; }
-#
-#    elsif($stmt=~/^([ \t]*\$?SaveUnfrozen\s+([\w\']+))/)
-#       { $tagstring.=$1."\177".$2."\001".$lp.",".$cp."\n"; }
-
-#   ---- Maybe do something smart with discharge as well?
-
-    $cp=$newcp; $lp=$newlp; $a=$newa;
-  }  
-  print tagfile "\f\n".$ARGV.",".(length $tagstring)."\n".$tagstring;
-}
-close tagfile;
-
-
-sub adddecs {
-  $wk=$_[0];
-  $tag=$_[1];
-  while($wk=~/\[\s*([\w\']+)/)
-  { $tagstring.=$tag."\177".$1."\001".$lp.",".$cp."\n"; $wk=$';
-    while($wk=~/^\s*,\s*([\w\']+)/)
-    { $tagstring.=$tag."\177".$1."\001".$lp.",".$cp."\n"; $wk=$'; }
-    $d=1;
-    while($d>0 && $wk=~/\[|\]/)
-    { $wk=$'; if($& eq "[") {$d++} else {$d--};
-    }
-  }
-  0;
-}
-
diff --git a/lego/root2.l b/lego/root2.l
deleted file mode 100644
index 5712b12..0000000
--- a/lego/root2.l
+++ /dev/null
@@ -1,368 +0,0 @@
-(************************************************************************
-   Conor McBride's proof that 2 has no rational root.
-
-   This proof is accepted by LEGO version 1.3.1 with its standard library.
-*************************************************************************)
-
-Make lib_nat; (* loading basic logic, nat, plus, times etc *)
-
-(* note, plus and times are defined by recursion on their first arg *)
-
-
-(************************************************************************
-   Alternative eliminators for nat
-
-   LEGO's induction tactic figures out which induction principle to use
-   by looking at the type of the variable on which we're doing induction.
-   Consequently, we can persuade the tactic to use an alternative induction
-   principle if we alias the type.
-
-   Nat_elim is just the case analysis principle for natural numbers---the
-   same as the induction principle except that there's no inductive hypothesis
-   in the step case. It's intended to be used in combination with...
-
-   ...NAT_elim, which performs no case analysis but says you can have an
-   inductive hypothesis for any smaller value, where y is smaller than
-   suc (plus x y). This is `well-founded induction' for the < relation,
-   but expressed more concretely.
-
-   The effect is very similar to that of `Case' and `Fix' in Coq.
-************************************************************************)
-
-[Nat = nat];
-[NAT = Nat];
-
-(* case analysis: just a weakening of induction *)
-
-Goal Nat_elim : {Phi:nat->Type}
-                {phiz:Phi zero}
-                {phis:{n:Nat}Phi (suc n)}
-                {n:Nat}Phi n;
-intros ___;
-  Expand Nat; Induction n;
-    Immed;
-    intros; Immed;
-Save;
-
-(* suc-plus guarded induction: the usual proof *)
-
-Goal NAT_elim :
-     {Phi:nat->Type}
-     {phi:{n:Nat}
-          {ih:{x,y|Nat}(Eq n (suc (plus x y)))->Phi y}
-          Phi n}
-     {n:NAT}Phi n;
-intros Phi phi n';
-(* claim that we can build the hypothesis collector for each n *)
-Claim {n:nat}{x,y|Nat}(Eq n (suc (plus x y)))->Phi y;
-(* use phi on the claimed collector *)
-Refine phi n' (?+1 n');
-(* now build the collector by one-step induction *)
-  Induction n;
-    Qnify; (* nothing to collect for zero *)
-    intros n nhyp;
-      Induction x; (* case analysis on the slack *)
-        Qnify;
-          Refine phi;  (* if the bound is tight, use phi to         *)
-            Immed;     (* generate the new member of the collection *)
-        Qnify;
-          Refine nhyp; (* otherwise, we've already collected it *)
-            Immed;
-Save;
-
-
-(***************************************************************************
-   Equational laws governing plus and times:
-   some of these are doubtless in the library, but it takes longer to
-   remember their names than to prove them again.
-****************************************************************************)
-
-Goal plusZero : {x:nat}Eq (plus x zero) x;
-Induction x;
-  Refine Eq_refl;
-  intros;
-    Refine Eq_resp suc;
-      Immed;
-Save;
-
-Goal plusSuc : {x,y:nat}Eq (plus x (suc y)) (suc (plus x y));
-Induction x;
-  intros; Refine Eq_refl;
-  intros;
-    Refine Eq_resp suc;
-      Immed;
-Save;
-
-Goal plusAssoc : {x,y,z:nat}Eq (plus (plus x y) z) (plus x (plus y z));
-Induction x;
-  intros; Refine Eq_refl;
-  intros;
-    Refine Eq_resp suc;
-      Immed;
-Save;
-
-Goal plusComm : {x,y:nat}Eq (plus x y) (plus y x);
-Induction y;
-  Refine plusZero;
-  intros y yh x;
-    Refine Eq_trans (plusSuc x y);
-      Refine Eq_resp suc;
-        Immed;
-Save;
-
-Goal plusCommA : {x,y,z:nat}Eq (plus x (plus y z)) (plus y (plus x z));
-intros;
-  Refine Eq_trans ? (plusAssoc ???);
-    Refine Eq_trans (Eq_sym (plusAssoc ???));
-      Refine Eq_resp ([w:nat]plus w z);
-        Refine plusComm;
-Save;
-
-Goal timesZero : {x:nat}Eq (times x zero) zero;
-Induction x;
-  Refine Eq_refl;
-    intros;
-      Immed;
-Save;
-
-Goal timesSuc : {x,y:nat}Eq (times x (suc y)) (plus x (times x y));
-Induction x;
-  intros; Refine Eq_refl;
-  intros x xh y;
-    Equiv Eq (suc (plus y (times x (suc y)))) ?;
-      Equiv Eq ? (suc (plus x (plus y (times x y))));
-        Refine Eq_resp;
-          Qrepl xh y;
-            Refine plusCommA;
-Save;
-
-Goal timesComm : {x,y:nat}Eq (times x y) (times y x);
-Induction y;
-  Refine timesZero;
-  intros y yh x;
-    Refine Eq_trans (timesSuc ??);
-      Refine Eq_resp (plus x);
-        Immed;
-Save;
-
-Goal timesDistL : {x,y,z:nat}Eq (times (plus x y) z)
-                                (plus (times x z) (times y z));
-Induction x;
-  intros; Refine Eq_refl;
-    intros x xh y z;
-      Refine Eq_trans (Eq_resp (plus z) (xh y z));
-        Refine Eq_sym (plusAssoc ???);
-Save;
-
-Goal timesAssoc : {x,y,z:nat}Eq (times (times x y) z) (times x (times y z));
-Induction x;
-  intros; Refine Eq_refl;
-  intros x xh y z;
-    Refine Eq_trans (timesDistL ???);
-      Refine Eq_resp (plus (times y z));
-        Immed;
-Save;
-
-(**********************************************************************
-   Inversion principles for equations governing plus and times:
-   these aren't in the library, at least not in this form.
-***********************************************************************)
-
-[Phi|Type]; (* Inversion principles are polymorphic in any goal *)
-
-Goal plusCancelL : {y,z|nat}{phi:{q':Eq y z}Phi}{x|nat}
-                   {q:Eq (plus x y) (plus x z)}Phi;
-intros ___;
-Induction x;
-  intros;
-    Refine phi q;
-  intros x xh; Qnify;
-    Refine xh;
-      Immed;
-Save;
-
-Goal timesToZero : {a,b|Nat}
-                   {phiL:(Eq a zero)->Phi}
-                   {phiR:(Eq b zero)->Phi}
-                   {tz:Eq (times a b) zero}
-                   Phi;
-Induction a;
-  intros; Refine phiL (Eq_refl ?);
-  intros a;
-    Induction b;
-      intros; Refine phiR (Eq_refl ?);
-      Qnify;
-Save;
-
-Goal timesToNonZero : {x,y|nat}
-                      {phi:{x',y'|nat}(Eq x (suc x'))->(Eq y (suc y'))->Phi}
-                      {z|nat}{q:Eq (times x y) (suc z)}Phi;
-Induction x;
-  Qnify;
-  intros x xh;
-    Induction y;
-      intros __; Qrepl timesZero (suc x); Qnify;
-      intros;
-        [EQR=Eq_refl]; Refine phi Then Immed;
-Save;
-
-(* I actually want plusDivisionL, but plusDivisionR is easier to prove,
-   because here we do induction where times does computation. *)
-Goal plusDivisionR : {b|nat}{a,x,c|Nat}
-                     {phi:{c'|nat}(Eq (times c' (suc x)) c)->
-                                  (Eq a (plus b c'))->Phi}
-                     {q:Eq (times a (suc x)) (plus (times b (suc x)) c)}
-                     Phi;
-Induction b;
-  intros _____; Refine phi;
-    Immed;
-    Refine Eq_refl;
-  intros b bh;
-    Induction a;
-      Qnify;
-      intros a x c phi;
-        Qrepl plusAssoc (suc x) (times b (suc x)) c;
-          Refine plusCancelL;
-            Refine bh;
-              intros c q1 q2; Refine phi q1;
-                Refine Eq_resp ? q2;
-Save;
-
-(* A bit of timesComm gives us the one we really need. *)
-Goal plusDivisionL : {b|nat}{a,x,c|Nat}
-                     {phi:{c'|nat}(Eq (times (suc x) c') c)->
-                                  (Eq a (plus b c'))->Phi}
-                     {q:Eq (times (suc x) a) (plus (times (suc x) b) c)}
-                     Phi;
-intros _____;
-  Qrepl timesComm (suc x) a; Qrepl timesComm (suc x) b;
-    Refine plusDivisionR;
-      intros c'; Qrepl timesComm c' (suc x);
-        Immed;
-Save;
-
-Discharge Phi;
-
-
-(**************************************************************************
-   Definition of primality:
-
-   This choice of definition makes primality easy to exploit
-   (especially as it's presented as an inversion principle), but hard to
-   establish.
-***************************************************************************)
-
-[Prime = [p:nat]
-         {a|NAT}{b,x|Nat}{Phi|Prop}
-         {q:Eq (times p x) (times a b)}
-         {phiL:{a':nat}
-               (Eq a (times p a'))->(Eq x (times a' b))->Phi}
-         {phiR:{b':nat}
-               (Eq b (times p b'))->(Eq x (times a b'))->Phi}
-         Phi
-];
-
-
-(**************************************************************************
-   Proof that 2 is Prime. Nontrivial because of the above definition.
-   Manageable because 1 is the only number between 0 and 2.
-***************************************************************************)
-
-Goal doublePlusGood : {x,y:nat}Eq (times (suc (suc x)) y)
-                                  (plus (times two y) (times x y));
-intros __;
-  Refine Eq_trans ? (Eq_sym (plusAssoc ???));
-    Refine Eq_resp (plus y);
-      Refine Eq_trans ? (Eq_sym (plusAssoc ???));
-        Refine Eq_refl;
-Save;
-
-Goal twoPrime : Prime two;
-Expand Prime;
-  Induction a;
-    Induction n;
-      intros useless b x _;
-        Refine timesToZero Then Expand Nat Then Qnify;
-                            (* Qnify needs to know it's a nat *)
-          intros; Refine phiL;
-            Refine +1 (Eq_sym (timesZero ?));
-            Refine Eq_refl;
-      Induction n;
-        intros useless b x _;
-          Qrepl plusZero b;
-            intros; Refine phiR;
-              Refine +1 Eq_sym q;
-              Refine Eq_sym (plusZero x);
-        intros n nhyp b x _;
-          Qrepl doublePlusGood n b;
-            Refine plusDivisionL;
-              intros c q1 q2; Qrepl q2; intros __;
-                Refine nhyp|one (Eq_refl ?) q1;
-                  intros a' q3 q4; Refine phiL (suc a');
-                    Refine Eq_resp suc;
-                      Refine Eq_trans ? (Eq_sym (plusSuc ??));
-                        Refine Eq_resp ? q3;
-                    Refine Eq_resp (plus b) q4;
-                  intros b' q3 q4; Refine phiR b';
-                    Immed;
-                    Qrepl q3; Qrepl q4;
-                      Refine Eq_sym (doublePlusGood ??);
-Save;
-
-
-(**************************************************************************
-   Now the proof that primes (>=2) have no rational root. It's the
-   classic `minimal counterexample' proof unwound as an induction: we
-   apply the inductive hypothesis to the smaller counterexample we
-   construct.
-***************************************************************************)
-
-[pm2:nat]
-[p=suc (suc pm2)] (* p is at least 2 *)
-[Pp:Prime p];
-
-Goal noRatRoot : {b|NAT}{a|Nat}{q:Eq (times p (times a a)) (times b b)}
-                          and (Eq a zero) (Eq b zero);
-Induction b;
-  Induction n; (* if b is zero, so is a, and the result holds *)
-    intros useless;
-      intros a;
-        Refine timesToZero;
-          Expand Nat; Qnify;
-          Refine timesToZero; Refine ?+1;
-            intros; Refine pair; Immed; Refine Eq_refl;
-    intros b hyp a q; (* otherwise, build a smaller counterexample *)
-      Refine Pp q; (* use primality once *)
-        Refine cut ?+1; (* standard technique for exploiting symmetry *)
-          intros H a' aq1 aq2; Refine H;
-            Immed;
-            Refine Eq_trans aq2;
-              Refine timesComm;
-        intros c bq; Qrepl bq; Qrepl timesAssoc p c c;
-          Refine timesToNonZero ? (Eq_sym bq); (* need c to be nonzero *)
-            intros p' c' dull cq; Qrepl cq; intros q2;
-              Refine Pp (Eq_sym q2); (* use primality twice *)
-                Refine cut ?+1; (* symmetry again *)
-                  intros H a' aq1 aq2; Refine H;
-                    Immed;
-                    Refine Eq_trans aq2;
-                      Refine timesComm;
-                intros d aq; Qrepl aq; Qrepl timesAssoc p d d;
-                  intros q3;
-                    Refine hyp ? (Eq_sym q3); (* now use ind hyp *)
-                      Next +2; Expand NAT Nat; Qnify; (* trivial solution *)
-                      Next +1; (* show induction was properly guarded *)
-                        Refine Eq_trans bq; Expand p; Qrepl cq;
-                          Refine plusComm;
-Save;
-
-Discharge pm2;
-
-(**********************************************************************
-   Putting it all together
-***********************************************************************)
-
-[noRatRootTwo = noRatRoot zero twoPrime
-  : {b|nat}{a|nat}(Eq (times two (times a a)) (times b b))->
-     (Eq a zero /\ Eq b zero)];
-
diff --git a/lib/bufhist.el b/lib/bufhist.el
index 91cfd67..d7cce2d 100644
--- a/lib/bufhist.el
+++ b/lib/bufhist.el
@@ -12,10 +12,10 @@
 ;; Author:     David Aspinall <David.Aspinall@ed.ac.uk>
 ;; Keywords:   tools
 
-;; License:    GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;; This file is distributed under the terms of the GNU General Public
-;; License, Version 2.  Find a copy of the GPL with your version of
+;; License, Version 3 or later.  Find a copy of the GPL with your version of
 ;; GNU Emacs or Texinfo.
 
 ;;; Commentary:
diff --git a/lib/holes.el b/lib/holes.el
index 577bffe..80c23c8 100644
--- a/lib/holes.el
+++ b/lib/holes.el
@@ -19,14 +19,14 @@
 
 ;; This software is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public
-;; License version 2, as published by the Free Software Foundation.
+;; License version 3 or later, as published by the Free Software Foundation.
 ;;
 ;; This software is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 ;;
-;; See the GNU General Public License version 2 for more details
-;; (enclosed in the file GPL).
+;; See the GNU General Public License for more details
+;; (enclosed in the file COPYING).
 
 ;;; Commentary:
 ;;
diff --git a/lib/local-vars-list.el b/lib/local-vars-list.el
index 4d737d7..8b5be2a 100644
--- a/lib/local-vars-list.el
+++ b/lib/local-vars-list.el
@@ -3,7 +3,7 @@
 ;; This file is part of Proof General.
 
 ;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014  Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2021  Free Software Foundation, Inc.
 ;; Portions © Copyright 2001-2017  Pierre Courtieu
 ;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
 ;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
@@ -14,14 +14,14 @@
 
 ;; This software is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public
-;; License version 2, as published by the Free Software Foundation.
+;; License version 3 or later, as published by the Free Software Foundation.
 ;;
 ;; This software is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 ;;
-;; See the GNU General Public License version 2 for more details
-;; (enclosed in the file GPL).
+;; See the GNU General Public License for more details
+;; (enclosed in the file COPYING).
 
 ;;; Commentary:
 ;;
@@ -150,10 +150,10 @@ of the buffer first."
 
 
 
-;;; Local Variables: ***
-;;; fill-column: 85 ***
-;;; indent-tabs-mode: nil ***
-;;; End: ***
+;; Local Variables: ***
+;; fill-column: 85 ***
+;; indent-tabs-mode: nil ***
+;; End: ***
 
 (provide 'local-vars-list)
 ;;; local-vars-list.el ends here
diff --git a/lib/maths-menu.el b/lib/maths-menu.el
index 1133d49..ab61f8a 100644
--- a/lib/maths-menu.el
+++ b/lib/maths-menu.el
@@ -18,7 +18,7 @@
 
 ;; This file is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; This file is distributed in the hope that it will be useful,
diff --git a/lib/pg-dev.el b/lib/pg-dev.el
index 78d7986..72202ee 100644
--- a/lib/pg-dev.el
+++ b/lib/pg-dev.el
@@ -3,7 +3,7 @@
 ;; This file is part of Proof General.
 
 ;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2018  Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2021  Free Software Foundation, Inc.
 ;; Portions © Copyright 2001-2017  Pierre Courtieu
 ;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
 ;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
@@ -110,10 +110,6 @@
      proof-maths-menu proof-unicode-tokens
      pg-thymodes pg-autotest
      ;;
-     isar-syntax isar-find-theorems isar-unicode-tokens
-     isar-autotest interface-setup isabelle-system isar
-     isar-keywords
-     ;;
      coq-abbrev coq-db coq-unicode-tokens coq-local-vars coq coq-syntax
      coq-indent coq-autotest)))
 
@@ -134,7 +130,6 @@
   (elp-instrument-package "scomint")
   (elp-instrument-package "unicode-tokens")
   (elp-instrument-package "coq")
-  (elp-instrument-package "isar")
   (elp-instrument-package "span")
   (elp-instrument-package "replace-") ; for replace-regexp etc
   (elp-instrument-package "re-search-") ; for re-search-forwad etc
@@ -176,7 +171,6 @@
              "http://proofgeneral.inf.ed.ac.uk/trac/ticket/%s";))))
 
 (add-hook 'emacs-lisp-mode-hook 'pg-bug-references)
-(add-hook 'isar-mode-hook 'pg-bug-references)
 (add-hook 'coq-mode-hook 'pg-bug-references)
 
 (add-hook 'emacs-lisp-mode-hook 'goto-address-mode)
diff --git a/lib/pg-fontsets.el b/lib/pg-fontsets.el
index 771e76f..2cb61a4 100644
--- a/lib/pg-fontsets.el
+++ b/lib/pg-fontsets.el
@@ -11,7 +11,7 @@
 
 ;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/lib/proof-compat.el b/lib/proof-compat.el
index 95c533e..b1db0dc 100644
--- a/lib/proof-compat.el
+++ b/lib/proof-compat.el
@@ -11,7 +11,7 @@
 
 ;; Author:      David Aspinall <David.Aspinall@ed.ac.uk> and others
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/lib/scomint.el b/lib/scomint.el
index 8f7104e..eef4e52 100644
--- a/lib/scomint.el
+++ b/lib/scomint.el
@@ -11,7 +11,7 @@
 
 ;; Author:    David Aspinall
 
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/lib/span.el b/lib/span.el
index fccec29..b478f3d 100644
--- a/lib/span.el
+++ b/lib/span.el
@@ -12,7 +12,7 @@
 ;; Author:      Healfdene Goguen
 ;; Maintainer:  David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;;; Commentary:
 ;;
diff --git a/lib/texi-docstring-magic.el b/lib/texi-docstring-magic.el
index b6ef604..91a3a5d 100644
--- a/lib/texi-docstring-magic.el
+++ b/lib/texi-docstring-magic.el
@@ -12,10 +12,10 @@
 ;; Author:     David Aspinall <David.Aspinall@ed.ac.uk>
 ;; Keywords: lisp, docs, tex
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;; This file is distributed under the terms of the GNU General Public
-;; License, Version 2.  Find a copy of the GPL with your version of
+;; License, Version 3 or later.  Find a copy of the GPL with your version of
 ;; GNU Emacs or Texinfo.
 
 ;;; Commentary:
diff --git a/lib/unicode-tokens.el b/lib/unicode-tokens.el
index c48d2ce..11fdada 100644
--- a/lib/unicode-tokens.el
+++ b/lib/unicode-tokens.el
@@ -11,11 +11,11 @@
 
 ;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
 
-;; License:     GPL (GNU GENERAL PUBLIC LICENSE)
+;; SPDX-License-Identifier: GPL-3.0-or-later
 
 ;; This is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; This software is distributed in the hope that it will be useful,
diff --git a/obsolete/demoisa/demoisa.el b/obsolete/demoisa/demoisa.el
index 5254e97..895b328 100644
--- a/obsolete/demoisa/demoisa.el
+++ b/obsolete/demoisa/demoisa.el
@@ -15,7 +15,7 @@
 ;; Basic configuration is controlled by one line in `proof-site.el'.
 ;; It has this line in proof-assistant-table:
 ;;
-;;     (demoisa "Isabelle Demo"        "\\.ML$")
+;;     (demoisa "Isabelle Demo"        "\\.ML\\'")
 ;;
 ;; From this it loads this file "demoisa/demoisa.el" whenever
 ;; a .ML file is visited, and sets the mode to `demoisa-mode'
diff --git a/obsolete/lclam/README b/obsolete/lclam/README
deleted file mode 100644
index 39db25c..0000000
--- a/obsolete/lclam/README
+++ /dev/null
@@ -1,15 +0,0 @@
-Lambda-CLAM Proof General
-
-Written by James Brotherston <jjb@dai.ed.ac.uk>.
-
-
-Status:                        supported
-Maintainer:            James Brotherston <jjb@dai.ed.ac.uk>
-Lambda-CLAM version:    ??
-Lambda-CLAM homepage:   http://dream.dai.ed.ac.uk/software/systems/lambda-clam/
-
-========================================
-
-$Id$
-
-
diff --git a/obsolete/lclam/example.lcm b/obsolete/lclam/example.lcm
deleted file mode 100644
index 5b27581..0000000
--- a/obsolete/lclam/example.lcm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* File name:      example.lcm                            */
-/* Description:    Tutorial walkthrough from LClam manual */
-/* Author:         James Brotherston                      */
-/* Last modified:  20th August 2001                       */
-
-query_top_goal X assp.
-
-set_spypoint (induction_top normal_ind).
-set_spypoint sym_eval.
-
-silent_output on.
-
-pds_plan (induction_top normal_ind) assp.
-continue.
-continue.
-continue.
-
-add_theory_to_induction_scheme_list arithmetic.
-add_theory_to_sym_eval_list arithmetic.
-set_wave_rule_to_sym_eval.
-add_to_sym_eval_list [idty].
-set_wave_rule_to_sym_eval.
-remove_spypoint (induction_top normal_ind).
-remove_spypoint sym_eval.
-pds_plan (induction_top normal_ind) assp.
-
-step_by_step on.
-pds_plan (induction_top normal_ind) assp.
-continue.
-backtrack.
-try ind_strat.
-continue.
-plan_node (2::1::nil).
-abandon.
diff --git a/obsolete/lclam/lclam.el b/obsolete/lclam/lclam.el
deleted file mode 100644
index 0472b6a..0000000
--- a/obsolete/lclam/lclam.el
+++ /dev/null
@@ -1,209 +0,0 @@
-;; File name:      lclam.el        
-;; Description:    Proof General instance for Lambda-CLAM
-;; Author:         James Brotherston <jjb@dai.ed.ac.uk>
-;; Last modified:  23 October 2001
-;;
-;; $Id$
-
-(require 'proof)            ; load generic parts
-(require 'proof-syntax)     
-
-;;
-;; =========== User settings for Lambda-CLAM ============
-;;
-
-(defcustom lclam-prog-name ; "~/lambda-clam-teyjus/bin/lclam"
-                          "lclam"
-  "*Name of program to run Lambda-CLAM"
-  :type 'file
-  :group 'lclam)
-
-(defcustom lclam-web-page
-  "http://dream.dai.ed.ac.uk/software/systems/lambda-clam/";
-  "URL of web page for Lambda-CLAM"
-  :type 'string
-  :group 'lclam-config)
-
-
-;;
-;; =========== Configuration of generic modes ============
-;;
-
-(defun lclam-config ()
-  "Configure Proof General scripting for Lambda-CLAM."
-  (setq 
-   proof-terminal-string           "."
-   proof-script-comment-start      "/*"
-   proof-script-comment-end        "*/"
-   proof-goal-command-regexp       "^pds_plan"
-   proof-save-command-regexp       nil
-   proof-goal-with-hole-regexp     nil
-   proof-save-with-hole-regexp     nil
-   proof-non-undoables-regexp      nil
-   proof-undo-n-times-cmd          nil
-   proof-showproof-command         nil 
-   proof-goal-command              "^pds_plan %s."
-   proof-save-command              nil
-   proof-kill-goal-command         nil
-   proof-assistant-home-page       lclam-web-page
-   proof-auto-multiple-files       nil 
-   ))
-
-(defun lclam-shell-config ()
-  "Configure Proof General shell for Lambda-CLAM"
-  (setq
-   proof-shell-annotated-prompt-regexp "^lclam:" 
-   proof-shell-cd-cmd                  nil
-   proof-shell-interrupt-regexp        nil
-   proof-shell-error-regexp            nil
-   proof-shell-start-goals-regexp      nil
-   proof-shell-end-goals-regexp        nil
-   proof-shell-proof-completed-regexp  "^Plan Succeeded"
-   proof-shell-init-cmd                nil
-   proof-shell-quit-cmd                "halt."
-   proof-shell-eager-annotation-start  nil
-    ))
-
-;;
-;; =========== Defining the derived modes ================
-;;
-
-(define-derived-mode lclam-proofscript-mode proof-mode
-  "Lambda-CLAM script" nil
-  (lclam-config)
-  (proof-config-done))
-
-(define-derived-mode lclam-shell-mode proof-shell-mode
-  "Lambda-CLAM shell" nil
-  (lclam-shell-config)
-  (proof-shell-config-done))
-
-(define-derived-mode lclam-response-mode proof-response-mode
-  "Lambda-CLAM response" nil
-  (proof-response-config-done))
-
-(define-derived-mode lclam-goals-mode proof-goals-mode
-  "Lambda-CLAM goals" nil
-  (proof-goals-config-done))
-
-;; Automatic selection of theory file or proof script mode
-;; .lcm -> proof script mode
-;; .def -> theory file mode
-
-(defun lclam-mode ()
-(interactive)
-(cond
-    ((proof-string-match "\\.def$" (buffer-file-name))
-    (thy-mode))
-    (t
-    (lclam-proofscript-mode)))
-)
-
-;; Hook which configures settings to get the proof shell running 
-
-(add-hook 'proof-pre-shell-start-hook 'lclam-pre-shell-start)
-
-(defun lclam-pre-shell-start ()
-  (setq proof-prog-name         lclam-prog-name)
-  (setq proof-mode-for-shell    'lclam-shell-mode)
-  (setq proof-mode-for-response 'lclam-response-mode)
-  (setq proof-mode-for-goals    'lclam-goals-mode)
-  (setq proof-shell-process-connection-type t))
-
-
-;;
-;; ============ Extra bits and pieces - JB ============
-;;
-
-;; Open .def files in theory mode from now on
-
-(setq auto-mode-alist
-      (cons '("\\.def$" . thy-mode) auto-mode-alist))
-
-;; Remove redundant toolbar buttons
-
-(eval-after-load "pg-custom"
-'(progn
-  (setq lclam-toolbar-entries
-       (remassoc 'state lclam-toolbar-entries))
-  (setq lclam-toolbar-entries
-       (remassoc 'context lclam-toolbar-entries))
-  (setq lclam-toolbar-entries
-       (remassoc 'undo lclam-toolbar-entries))
-  (setq lclam-toolbar-entries
-       (remassoc 'retract lclam-toolbar-entries))
-  (setq lclam-toolbar-entries
-       (remassoc 'qed lclam-toolbar-entries))))
-
-;;
-;; ============ Theory file mode ==============
-;;
-
-(define-derived-mode thy-mode fundamental-mode "Lambda-CLAM theory file mode"
-  (thy-add-menus))
-
-(defvar thy-mode-map nil)
-
-(defun thy-add-menus ()
-  "Add Lambda-CLAM menu to current menu bar."  
-  (require 'proof-script)    
-  (require 'proof-x-symbol)
-  (easy-menu-define thy-mode-pg-menu
-                    thy-mode-map
-                    "PG Menu for Lambda-CLAM Proof General"
-                    (cons proof-general-name
-                          (append
-                           (list
-                           ;; A couple from the toolbar that make sense here
-                           ;; (also in proof-universal-keys)
-                            ["Issue command" proof-minibuffer-cmd t]
-                            ["Interrupt prover" proof-interrupt-process t])
-                          (list proof-buffer-menu)
-                           (list proof-help-menu))))
-
-  (easy-menu-define thy-mode-lclam-menu
-                    thy-mode-map
-                    "Menu for Lambda-CLAM Proof General, theory file mode."
-                    (cons "Theory"
-                          (list
-                           ["Next section" thy-goto-next-section t]
-                           ["Prev section" thy-goto-prev-section t]
-                           ["Insert template" thy-insert-template t]
-; da: commented out this, function is incomplete
-;                           ["Include definitions" match-and-assert-defs
-;                            :active (proof-locked-region-empty-p)]
-                           ["Process theory" process-thy-file
-                            :active (proof-locked-region-empty-p)]
-; da: commented out this, there's no retract function provided
-;                           ["Retract theory" isa-retract-thy-file
-;                            :active (proof-locked-region-full-p)]
-                           ["Next error" proof-next-error t]
-                           ["Switch to script" thy-find-other-file t])))
-
-  (easy-menu-add thy-mode-pg-menu thy-mode-map)
-  (easy-menu-add thy-mode-lclam-menu thy-mode-map)
-)
-
-(defun process-thy-file (file)
-  "Process the theory file FILE.  If interactive, use buffer-file-name."
-  (interactive (list buffer-file-name))
-  (save-some-buffers)
-  (update-thy-only file nil nil))
-
-(defun update-thy-only (file try wait)
-  "Process the theory file FILE."
-  ;; First make sure we're in the right directory to take care of
-  ;; relative "files" paths inside theory file.
-  (proof-cd-sync)
-  (proof-shell-invisible-command
-   (proof-format-filename
-    ;; %r parameter means relative (don't expand) path
-    (format "use_thy \"%s%%r\"." (if try "try_" ""))
-    (file-name-nondirectory file))
-   wait))
-
-;(defun match-and-assert-defs
-;  "Interactively process and assert definitions in theory file"
-;)
-
-(provide 'lclam)
diff --git a/obsolete/plastic/README b/obsolete/plastic/README
deleted file mode 100644
index 881f5b5..0000000
--- a/obsolete/plastic/README
+++ /dev/null
@@ -1,12 +0,0 @@
-Plastic Proof General
-
-Written by Paul Callaghan
-
-Status:                  under development together with Plastic
-Maintainer:      Paul Callaghan
-Plastic homepage: http://www.dur.ac.uk/CARG/plastic.html
-
-========================================
-
-$Id$
-
diff --git a/obsolete/plastic/plastic-syntax.el 
b/obsolete/plastic/plastic-syntax.el
deleted file mode 100644
index c259a3b..0000000
--- a/obsolete/plastic/plastic-syntax.el
+++ /dev/null
@@ -1,119 +0,0 @@
-;; plastic-syntax.el - Syntax of Plastic
-;; Author: Paul Callaghan <P.C.Callaghan@durham.ac.uk>
-;; Maintainer: <author>
-;; plastic-syntax.el,v 6.0 2001/09/03 12:11:56 da Exp
-
-;; adapted from the following, by Paul Callaghan
-;; ;; lego-syntax.el Syntax of LEGO
-;; ;; Copyright (C) 1994 - 1998 LFCS Edinburgh.
-;; ;; Author: Thomas Kleymann and Dilip Sequeira
-;; ;; Maintainer: Paul Callaghan <P.C.Callaghan@durham.ac.uk>
-;; ;; lego-syntax.el,v 2.10 1998/11/06 16:18:55 tms Exp
-
-
-(require 'proof-syntax)
-
-;; ----- keywords for font-lock.
-
-(defconst plastic-keywords-goal '("$?Goal"))
-
-(defconst plastic-keywords-save '("$?Save" "SaveFrozen" "SaveUnfrozen"))
-
-(defconst plastic-commands
-  (append plastic-keywords-goal plastic-keywords-save
-         '("allE" "allI" "andE" "andI" "Assumption" "Claim" "Coercion"
-           "Cut" "Discharge" "DischargeKeep"
-           "echo" "exE" "exI" "Expand" "ExpAll"
-           "ExportState" "Equiv" "For" "Freeze" "Hnf" "Immed"
-           "impE" "impI" "Induction" "Inductive"
-           "Invert" "Init" "intros" "Intros" "Module" "Next"
-           "Normal" "notE" "notI" "orE" "orIL" "orIR" "qnify" "Qnify"
-           "Qrepl" "Record" "Refine" "Repeat" "Return" "ReturnAll"
-           "Try" "Unfreeze"))
-  "Subset of Plastic keywords and tacticals which are terminated by a \?;")
-
-(defconst plastic-keywords
-  (append plastic-commands
-         '("Constructors" "Double" "ElimOver" "Fields" "Import" "Inversion"
-           "NoReductions" "Parameters" "Relation" "Theorems")))
-
-(defconst plastic-tacticals '("Then" "Else" "Try" "Repeat" "For"))
-
-;; ----- regular expressions for font-lock
-(defconst plastic-error-regexp "^\\(FAIL\\)"
-  "A regular expression indicating that the Plastic process has identified an 
error.")
-
-(defvar plastic-id proof-id)
-
-(defvar plastic-ids (concat plastic-id "\\(\\s *,\\s *" plastic-id "\\)*")
-  "*For font-lock, we treat \",\" separated identifiers as one identifier
-  and refontify commata using \\{plastic-fixup-change}.")
-
-(defconst plastic-arg-list-regexp "\\s *\\(\\[[^]]+\\]\\s *\\)*"
-  "Regular expression maching a list of arguments.")
-
-(defun plastic-decl-defn-regexp (char)
-    (concat "\\[\\s *\\(" plastic-ids "\\)" plastic-arg-list-regexp char))
-; Examples
-;              ^        ^^^^        ^^^^^^^^^^^^^^^^^^^^^^^  ^^^^
-;              [        sort                                 =
-;              [        sort        [n:nat]                  =
-;              [        sort        [abbrev=...][n:nat]      =
-
-(defconst plastic-definiendum-alternative-regexp
-  (concat "\\(" plastic-id "\\)" plastic-arg-list-regexp "\\s * ==")
-  "Regular expression where the first match identifies the definiendum.")
-
-(defvar plastic-font-lock-terms
-  (list
-
-   ; lambda binders
-     (list (plastic-decl-defn-regexp "[:|?]") 1
-          'proof-declaration-name-face)
-
-     ; let binders
-     (list plastic-definiendum-alternative-regexp 1 
'font-lock-function-name-face)
-     (list (plastic-decl-defn-regexp "=") 1 'font-lock-function-name-face)
-
-     ; Pi and Sigma binders
-     (list (concat "[{<]\\s *\\(" plastic-ids "\\)") 1
-          'proof-declaration-name-face)
-
-     ;; Kinds
-     (cons (concat "\\<Prop\\>\\|\\<Type\\s *\\(("
-                  plastic-id ")\\)?") 'font-lock-type-face))
-  "*Font-lock table for Plastic terms.")
-
-;; Instead of "[^:]+", it may be better to use "plastic-id". Furthermore,
-;; it might be safer to append "\\s-*:".
-(defconst plastic-goal-with-hole-regexp
-  (concat "\\(" (proof-ids-to-regexp plastic-keywords-goal) 
"\\)\\s-+\\([^:]+\\)")
-  "Regular expression which matches an entry in `plastic-keywords-goal'
-  and the name of the goal.")
-
-(defconst plastic-save-with-hole-regexp
-  (concat "\\(" (proof-ids-to-regexp plastic-keywords-save) 
"\\)\\s-+\\([^;]+\\)")
-  "Regular expression which matches an entry in
-  `plastic-keywords-save' and the name of the goal.")
-
-(defvar plastic-font-lock-keywords-1
-   (append
-    plastic-font-lock-terms
-    (list
-     (cons (proof-ids-to-regexp plastic-keywords) 'font-lock-keyword-face)
-     (cons (proof-ids-to-regexp plastic-tacticals) 'proof-tacticals-name-face)
-     (list plastic-goal-with-hole-regexp 2 'font-lock-function-name-face)
-     (list plastic-save-with-hole-regexp 2 'font-lock-function-name-face))))
-
-(defun plastic-init-syntax-table ()
-  "Set appropriate values for syntax table in current buffer."
-
-  (modify-syntax-entry ?_ "_")
-  (modify-syntax-entry ?\' "_")
-  (modify-syntax-entry ?\| ".")
-  (modify-syntax-entry ?\* ". 23")
-  (modify-syntax-entry ?\( "()1")
-  (modify-syntax-entry ?\) ")(4"))
-
-
-(provide 'plastic-syntax)
diff --git a/obsolete/plastic/plastic.el b/obsolete/plastic/plastic.el
deleted file mode 100644
index 39f6c01..0000000
--- a/obsolete/plastic/plastic.el
+++ /dev/null
@@ -1,665 +0,0 @@
-;; plastic.el  - Major mode for Plastic proof assistant
-;;
-;; Portions © Copyright 2018  Free Software Foundation, Inc.
-;;
-;; Author: Paul Callaghan <P.C.Callaghan@durham.ac.uk>
-;;
-;; $Id$
-
-;; NOTES:
-;;     remember to prefix all potential cmds with plastic-lit-string
-;;     alternative is to fix the filtering
-
-
-(require 'proof)
-
-(require 'cl-lib)                       ;cl-member-if
-(eval-when-compile
-  (require 'span)
-  (require 'proof-syntax)
-  (require 'outline))
-(defvar plastic-keymap)                 ;FIXME: Not defined anywhere!
-
-(require 'plastic-syntax)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; User Configuration ;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;; I believe this is standard for Linux under RedHat -tms
-(defcustom plastic-tags "TO BE DONE"
-  "*The directory of the TAGS table for the Plastic library"
-  :type 'file
-  :group 'plastic)
-
-(defcustom plastic-test-all-name "need_a_global_lib"
-  "*The name of the LEGO module which inherits all other modules of the
-  library."
-  :type 'string
-  :group 'plastic)
-
-(eval-and-compile
-(defvar plastic-lit-string
-  ">"
-  "*Prefix of literate lines. Set to empty string to get non-literate mode"))
-
-(defcustom plastic-help-menu-list
-  '(["The PLASTIC Reference Card" (browse-url plastic-www-refcard) t]
-    ["The PLASTIC library (WWW)" (browse-url plastic-library-www-page)  t])
-  "List of menu items, as defined in `easy-menu-define' for Plastic
-  specific help."
-  :type '(repeat sexp)
-  :group 'plastic)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Configuration of Generic Proof Package ;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Users should not need to change this.
-
-(defvar plastic-shell-handle-output
-  (lambda (cmd string) 
-    (when (proof-string-match "^Module" cmd)
-      ;; prevent output and just give a minibuffer message
-      (setq proof-shell-last-output-kind 'systemspecific)
-      (message "Imports done!")))
-  "Acknowledge end of processing import declarations.")
-
-(defconst plastic-process-config
-  (concat plastic-lit-string
-         " &S ECHO No PrettyPrinting configuration implemented;\n")
-  "Command to enable pretty printing of the Plastic process.
-   Proof-General annotations triggered by a cmd-line opt
-  ")
-
-(defconst plastic-pretty-set-width "&S ECHO no PrettyWidth ;\n"
-  "Command to adjust the linewidth for pretty printing of the Plastic
-  process.")
-
-(defconst plastic-interrupt-regexp "Interrupt.."
-  "Regexp corresponding to an interrupt")
-
-
-;; ----- web documentation
-
-(defcustom plastic-www-home-page "http://www.dur.ac.uk/CARG/plastic.html";
-  "Plastic home page URL."
-  :type 'string
-  :group 'plastic)
-
-(defcustom plastic-www-latest-release
-  (concat plastic-www-home-page "/current")
-  "The WWW address for the latest Plastic release."
-  :type 'string
-  :group 'plastic)
-
-(defcustom plastic-www-refcard
-  plastic-www-home-page
-  "URL for the Plastic reference card."
-  :type 'string
-  :group 'plastic)
-
-(defcustom plastic-library-www-page
-  (concat plastic-www-home-page "/library")
-  "The HTML documentation of the Plastic library."
-  :type 'string
-  :group 'plastic)
-
-
-
-;; ----- plastic-shell configuration options
-
-(defcustom plastic-base
-  "/usr/local/plastic"
-  ;; da: was
-  ;; "PLASTIC_BASE:TO_BE_CUSTOMISED"
-  "*base dir of plastic distribution"
-  :type 'string
-  :group 'plastic)
-
-(defvar plastic-prog-name
-  (concat plastic-base "/bin/plastic")
-  "*Name of program to run as plastic.")
-
-(defun plastic-set-default-env-vars ()
-  "defaults for the expected lib vars."
-  (cond
-    ((not (getenv "PLASTIC_LIB"))
-               (setenv "PLASTIC_LIB" (concat plastic-base "/lib"))
-               (setenv "PLASTIC_TEST" (concat plastic-base "/test"))
-       )))
-
-(defvar plastic-shell-cd
-  (concat plastic-lit-string " &S ECHO no cd ;\n")
-  "*Command of the inferior process to change the directory.")
-
-(defvar plastic-shell-proof-completed-regexp "\\*\\*\\* QED \\*\\*\\*"
-  "*Regular expression indicating that the proof has been completed.")
-
-(defvar plastic-save-command-regexp
-  (concat "^" (proof-ids-to-regexp plastic-keywords-save)))
-(defvar plastic-goal-command-regexp
-  (concat "^" (proof-ids-to-regexp plastic-keywords-goal)))
-
-(defvar plastic-kill-goal-command
-  (concat plastic-lit-string " &S ECHO KillRef not applicable;"))
-(defvar plastic-forget-id-command
-  (concat plastic-lit-string " &S Forget "))
-
-(defvar plastic-undoable-commands-regexp
-  (proof-ids-to-regexp '("Refine" "Intros" "intros" "Normal" "Claim" "Immed"))
-  "Undoable list")
-
-;; "Dnf" "Refine" "Intros" "intros" "Next" "Normal"
-;;   "Qrepl" "Claim" "For" "Repeat" "Succeed" "Fail" "Try" "Assumption"
-;;   "UTac" "Qnify" "qnify" "andE" "andI" "exE" "exI" "orIL" "orIR" "orE" 
"ImpI"
-;;   "impE" "notI" "notE" "allI" "allE" "Expand" "Induction" "Immed"
-;;   "Invert"
-
-;; ----- outline
-
-(defvar plastic-goal-regexp "\\?\\([0-9]+\\)")
-
-(defvar plastic-outline-regexp
-  (concat "[[*]\\|"
-         (proof-ids-to-regexp
-          '("Discharge" "DischargeKeep" "Freeze" "$?Goal" "Module" "Record" 
"Inductive"
-     "Unfreeze"))))
-
-(defvar plastic-outline-heading-end-regexp ";\\|\\*)")
-
-(defvar plastic-shell-outline-regexp plastic-goal-regexp)
-(defvar plastic-shell-outline-heading-end-regexp plastic-goal-regexp)
-
-(defvar plastic-error-occurred
-       nil
-       "flag for whether undo is required for try or minibuffer cmds")
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Derived modes - they're here 'cos they define keymaps 'n stuff ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(define-derived-mode plastic-shell-mode proof-shell-mode
-   "plastic-shell"
-   ;; With nil argument for docstring, Emacs makes up a nice one.
-   nil
-   (plastic-shell-mode-config))
-
-(define-derived-mode plastic-mode proof-mode
-   "Plastic script"
-     "Major mode for Plastic proof scripts.
-
-\\{plastic-mode-map}"
-   (plastic-mode-config)
-   (easy-menu-change (list proof-general-name) (car proof-help-menu)
-                    (append (cdr proof-help-menu) plastic-help-menu-list)))
-
-(eval-and-compile
-  (define-derived-mode plastic-response-mode proof-response-mode
-    "PlasticResp" nil
-    (setq font-lock-keywords plastic-font-lock-terms)
-    (plastic-init-syntax-table)
-    (proof-response-config-done)))
-
-(define-derived-mode plastic-goals-mode proof-goals-mode
-  "PlasticGoals" "Plastic Goal State"
-  (plastic-goals-mode-config))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Code that's plastic specific                                      ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun plastic-count-undos (span)
-  "This is how to work out what the undo commands are.
-Given is the first SPAN which needs to be undone."
-  (let ((ct 0) string i
-       (tl (length proof-terminal-string)))
-    (while span
-      (setq string (span-property span 'cmd))
-      (plastic-preprocessing)                  ;; dynamic scope, on string
-      (cond ((eq (span-property span 'type) 'vanilla)
-            (if (or (proof-string-match plastic-undoable-commands-regexp 
string)
-                    (and (proof-string-match "Equiv" string)
-                         (not (proof-string-match "Equiv\\s +[TV]Reg" 
string))))
-                (setq ct (+ 1 ct))))
-           ((eq (span-property span 'type) 'pbp)
-            (setq i 0)
-            (while (< i (length string))
-              (if (string-equal (substring string i (+ i tl)) 
proof-terminal-string)
-                  (cl-incf ct))
-              (setq i (+ 1 i)))))
-      (setq span (next-span span 'type)))
-    (list (concat plastic-lit-string 
-                 " &S Undo x" (int-to-string ct) proof-terminal-string))))
-
-(defun plastic-goal-command-p (span)
-  "Decide whether argument is a goal or not"                   ;; NEED CHG.
-  (proof-string-match plastic-goal-command-regexp
-                     (or (span-property span 'cmd) "")))
-
-(defun plastic-find-and-forget (span)
-       ;; count the number of spans to undo.
-       ;; all spans are equal...
-    ;; (NB the 'x' before the id is required so xNN looks like an id,
-    ;;  so that Undo can be implemented via the tmp_cmd route.)
-  (let (string (spans 0))
-    (while span
-      ;; FIXME da: should probably ignore comments/proverproc here?
-      (setq string (span-property span 'cmd))
-      (plastic-preprocessing)          ;; dynamic scope, on string
-
-      (cond
-        ((null string) nil)
-        ((or (string-match "^\\s-*import" string)
-             (string-match "^\\s-*test" string)
-             (string-match "^\\s-*\\$" string)
-             (string-match "^\\s-*#" string))
-         
-         ; da: put this instead of XEmacs code
-         (message "Can't Undo imports yet!  You must exit Plastic for this!")
-       ;    (popup-dialog-box
-       ;       (list (concat "Can't Undo imports yet\n"
-       ;                          "You have to exit Plastic for this\n")
-       ;             ["ok, I'll do this" (lambda () t) t]))
-           (cl-return)  ;FIXME: No enclosing block?!
-          )    ;; warn the user that undo of imports not yet working.
-        (t (cl-incf spans))
-      )
-      (setq span (next-span span 'type))
-
-    )
-    (list (concat plastic-lit-string 
-                 " &S Undo x" (int-to-string spans) 
-                 proof-terminal-string))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Other stuff which is required to customise script management   ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun plastic-goal-hyp ()             ;; not used.
-  (cond
-   ((looking-at plastic-goal-regexp)
-    (cons 'goal (match-string 1)))
-   ((looking-at proof-shell-assumption-regexp)
-    (cons 'hyp (match-string 1)))
-   (t nil)))
-
-
-;; NEED TO REFINE THIS (may99)
-
-(defun plastic-state-preserving-p (cmd)
-  (not (proof-string-match plastic-undoable-commands-regexp cmd)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Commands specific to plastic                                      ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(eval-after-load "plastic" ;; da: so that plastic-lit-string can be changed
-  '(progn
-     (eval `(proof-defshortcut plastic-Intros
-                              ,(concat plastic-lit-string "Intros ")  
[(control i)]))
-     (eval `(proof-defshortcut plastic-Refine
-                              ,(concat plastic-lit-string "Refine ")  
[(control r)]))
-     (eval `(proof-defshortcut plastic-ReturnAll
-                              ,(concat plastic-lit-string "ReturnAll ") 
[(control u)]))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Plastic shell startup and exit hooks                              ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar plastic-shell-current-line-width nil
-  "Current line width of the Plastic process's pretty printing module.
-  Its value will be updated whenever the corresponding screen gets
-  selected.")
-
-;; The line width needs to be adjusted if the PLASTIC process is
-;; running and is out of sync with the screen width
-
-(defun plastic-shell-adjust-line-width ()
-  "Use Plastic's pretty printing facilities to adjust output line width.
-   Checks the width in the `proof-goals-buffer'
-   ACTUALLY - still need to work with this. (pcc, may99)"
-   (and (proof-shell-live-buffer)
-       (proof-with-current-buffer-if-exists proof-goals-buffer
-       (let ((current-width
-              ;; Actually, one might sometimes
-              ;; want to get the width of the proof-response-buffer
-              ;; instead. Never mind.
-              (window-width (get-buffer-window proof-goals-buffer t))))
-
-          (if (equal current-width plastic-shell-current-line-width) ()
-            ; else
-            (setq plastic-shell-current-line-width current-width)
-            (set-buffer proof-shell-buffer)
-            (insert (format plastic-pretty-set-width (- current-width 1)))
-            )))))
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;   Configuring proof mode and setting up various utilities  ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defun plastic-mode-config ()
-
-  (setq proof-terminal-string ";")
-  (setq proof-script-comment-start "(*")                       ;; these still 
active
-  (setq proof-script-comment-end "*)")
-
-  (setq proof-prog-name (concat plastic-prog-name ""))
-  (setenv "PROOF_GENERAL" "") ;; signal to plastic, use annotations
-
-  (setq proof-assistant-home-page plastic-www-home-page)
-
-  (setq proof-showproof-command (concat plastic-lit-string " &S PrfCtxt")
-       proof-goal-command      (concat plastic-lit-string " Claim %s;")
-       proof-save-command      (concat plastic-lit-string " Save %s;") ;; 
analogue?
-       proof-context-command   (concat plastic-lit-string " &S Ctxt 20"))
-
-  (setq proof-showproof-command  (concat plastic-lit-string " &S PrfCtxt")
-       proof-goal-command   (concat plastic-lit-string " Claim %s;")
-       proof-save-command   (concat plastic-lit-string " Save %s;") ;; 
analogue?
-       proof-context-command  (concat plastic-lit-string " &S Ctxt 20")
-          ;; show 20 things; see ^c+C...
-       proof-info-command   (concat plastic-lit-string " &S Help"))
-
-  (setq proof-goal-command-p 'plastic-goal-command-p
-       proof-count-undos-fn 'plastic-count-undos
-       proof-find-and-forget-fn 'plastic-find-and-forget
-       pg-topterm-goalhyplit-fn 'plastic-goal-hyp
-       proof-state-preserving-p 'plastic-state-preserving-p)
-
-  (setq        proof-save-command-regexp plastic-save-command-regexp
-       proof-goal-command-regexp plastic-goal-command-regexp
-       proof-save-with-hole-regexp plastic-save-with-hole-regexp
-       proof-goal-with-hole-regexp plastic-goal-with-hole-regexp
-       proof-kill-goal-command plastic-kill-goal-command
-       proof-indent-any-regexp
-       (proof-regexp-alt
-        (proof-ids-to-regexp plastic-commands)
-        "\\s(" "\\s)"))
-
-  (plastic-init-syntax-table)
-
-  ;; da: I've moved these out of proof-config-done in proof-script.el
-  (setq pbp-goal-command (concat "UNIMPLEMENTED"))
-  (setq pbp-hyp-command (concat "UNIMPLEMENTED"))
-
-;; font-lock
-
-  (set proof-script-font-lock-keywords plastic-font-lock-keywords-1)
-
-  (proof-config-done)
-
-;; outline
-
-  (make-local-variable 'outline-regexp)
-  (setq outline-regexp plastic-outline-regexp)
-
-  (make-local-variable 'outline-heading-end-regexp)
-  (setq outline-heading-end-regexp plastic-outline-heading-end-regexp)
-
-;; tags
-  (cond ((boundp 'tags-table-list)
-        (make-local-variable 'tags-table-list)
-        (setq tags-table-list (cons plastic-tags tags-table-list))))
-
-  (and (boundp 'tag-table-alist)
-       (setq tag-table-alist
-            (append '(("\\.lf$"   . plastic-tags)
-                      ("plastic"  . plastic-tags))
-                    tag-table-alist)))
-
-  (set (make-local-variable 'blink-matching-paren-dont-ignore-comments) t)
-
-;; hooks and callbacks
-
-  (add-hook 'proof-shell-insert-hook       'plastic-shell-adjust-line-width)
-  (add-hook 'proof-shell-handle-error-or-interrupt-hook 'plastic-had-error)
-  (add-hook 'proof-shell-insert-hook       'plastic-preprocessing)
-
-;; (add-hook 'proof-shell-handle-error-or-interrupt-hook
-;; (lambda()(goto-char (search-forward (regexp-quote proof-terminal-char)))))
-
-;;  (add-hook 'proof-shell-handle-delayed-output-hook 
`plastic-show-shell-buffer t)
-;; this forces display of shell-buffer after each cmd, rather than goals-buffer
-;; it is not always necessary - could always add it as a toggle option?
-
-;; set up the env.
-  (plastic-set-default-env-vars)
-  )
-
-(defun plastic-show-shell-buffer ()
-   "switch buffers."
-   (display-buffer proof-shell-buffer)
-   )
-
-
-(defun plastic-equal-module-filename (module filename)
-  "Returns `t' if MODULE is equal to the FILENAME and `nil' otherwise.
-The directory and extension is stripped of FILENAME before the test."
-  (equal module
-        (file-name-sans-extension (file-name-nondirectory filename))))
-
-(defun plastic-shell-compute-new-files-list ()
-  "Function to update `proof-included-files list'.
-Value for `proof-shell-compute-new-files-list', which see.
-
-For Plastic, we assume that module identifiers coincide with file names."
-  (let ((module (match-string 1)))
-    (cdr (cl-member-if
-         (lambda (filename) (plastic-equal-module-filename module filename))
-         proof-included-files-list))))
-
-
-
-(defun plastic-shell-mode-config ()
-  (setq proof-shell-cd-cmd plastic-shell-cd
-       proof-shell-proof-completed-regexp plastic-shell-proof-completed-regexp
-       proof-shell-error-regexp plastic-error-regexp
-       proof-shell-interrupt-regexp plastic-interrupt-regexp
-       ;; DEAD proof-shell-noise-regexp "Discharge\\.\\. "
-       proof-shell-assumption-regexp plastic-id
-       proof-shell-start-goals-regexp plastic-goal-regexp
-       pg-subterm-first-special-char ?\360
-       pg-subterm-start-char ?\372
-       pg-subterm-sep-char ?\373
-       pg-subterm-end-char ?\374
-       pg-topterm-regexp "\375"
-       proof-shell-eager-annotation-start "\376"
-       ;; FIXME da: if p-s-e-a-s is implemented, you should set
-       ;; proof-shell-eager-annotation-start-length=1 to
-       ;; avoid possibility of duplicating short messages.
-       proof-shell-eager-annotation-end "\377"
-
-       proof-shell-annotated-prompt-regexp "LF> \371"
-       proof-shell-result-start "\372 Pbp result \373"
-       proof-shell-result-end "\372 End Pbp result \373"
-       proof-shell-start-goals-regexp "\372 Start of Goals \373"
-       proof-shell-end-goals-regexp "\372 End of Goals \373"
-
-       proof-shell-init-cmd plastic-process-config
-       proof-shell-restart-cmd plastic-process-config
-       pg-subterm-anns-use-stack nil
-       proof-shell-handle-output-system-specific plastic-shell-handle-output
-       plastic-shell-current-line-width nil
-
-       proof-shell-process-file
-       (cons "Creating mark \"\\(.*\\)\" \\[\\(.*\\)\\]"
-             (lambda () (let ((match (match-string 2)))
-                             (if (equal match "") match
-                               (concat 
-                                (file-name-sans-extension match) ".lf")))))
-
-       proof-shell-retract-files-regexp "forgot back through Mark \"\\(.*\\)\""
-       ;; DEAD: proof-shell-font-lock-keywords plastic-font-lock-keywords-1
-
-       proof-shell-compute-new-files-list 
'plastic-shell-compute-new-files-list)
-
-  (plastic-init-syntax-table)
-
-  (proof-shell-config-done)
-  )
-
-(defun plastic-goals-mode-config ()
-  (setq pg-goals-change-goal "Next %s;"
-       pg-goals-error-regexp plastic-error-regexp)
-  (setq proof-goals-font-lock-keywords plastic-font-lock-terms)
-  (plastic-init-syntax-table)
-  (proof-goals-config-done))
-
-
-
-;;;;;;;;;;;;;;;;;
-;; MY new additions.
-
-(defun plastic-small-bar () (interactive) (insert 
"%------------------------------\n"))
-
-(defun plastic-large-bar () (interactive) (insert 
"%-------------------------------------------------------------------------------\n"))
-
-(defun plastic-preprocessing () ;; NB: dynamic scoping of string
-   "clear comments and remove literate marks (ie, \\n> ) - acts on var string"
-
-   (with-no-warnings
-   ;; might want to use proof-string-match here if matching is going
-   ;; to be case sensitive (see docs)
-
-   (if (= 0 (length plastic-lit-string))
-       string                          ; no-op if non-literate
-                                       ; remaining lines are the
-                                       ; Else. (what, no 'return'?)
-   (setq string (concat "\n" string " "))   ;; seed routine below, & extra char
-   (let* ;; da: let* not really needed, added to nuke byte-comp warnings.
-       (x
-       (i 0)
-       (l (length string))
-       (eat-rest (lambda ()
-                   (aset string i ?\ )  ;; kill the \n or "-" at least
-                   (cl-incf i)
-                   (while (and (< i l) (/= (aref string i) ?\n))
-                     (aset string i ?\ )
-                     (cl-incf i) )))
-       (keep-rest (lambda ()
-                    (cl-loop for x in (string-to-list plastic-lit-string)
-                             do (aset string i ?\ ) (cl-incf i))
-                    (while (and (< i l)
-                                (/= (aref string i) ?\n)
-                                (/= (aref string i) ?-))
-                      (cl-incf i) ))))
-     (while (< i l)
-       (cond
-       ((eq 0 (string-match "--" (substring string i)))
-        (funcall eat-rest))            ; comment.
-       ((eq 0 (string-match "\n\n" (substring string i)))
-        (aset string i ?\ )
-        (cl-incf i))                   ; kill repeat \n
-       ((= (aref string i) ?\n)        ; start of new line
-        (aset string i ?\ ) (cl-incf i)        ; remove \n
-        (if (eq 0 (string-match plastic-lit-string
-                                (substring string i)))
-            (funcall keep-rest)        ; code line.
-          (funcall eat-rest)           ; non-code line
-          ))
-       (t
-        (cl-incf i))))                 ; else include.
-     (setq string (replace-regexp-in-string "  +" " " string))
-     (setq string (replace-regexp-in-string "^ +" "" string))
-   (if (string-match "^\\s-*$" string)
-       (setq string (concat "ECHO comment line" proof-terminal-string))
-     string)))))
-
-
-(defun plastic-all-ctxt ()
-       "show the full ctxt"
-       (interactive)
-       (proof-shell-invisible-command
-             (concat plastic-lit-string " &S Ctxt" proof-terminal-string))
-       )
-
-(defun plastic-send-one-undo ()
-       "send an Undo cmd"
-    ;; FIXME etc
-    ;; is like this because I don't want the undo output to be shown.
-    (proof-shell-insert (concat plastic-lit-string " &S Undo;")
-                       'proof-done-invisible))
-
-;; hacky expt version.
-;; still don't understand the significance of cmd!
-
-(defun plastic-minibuf-cmd (cmd)
-    "do minibuffer cmd then undo it, if error-free."
-    (interactive
-     (list (read-string "Command: " nil 'proof-minibuffer-history)))
-    (print "hello")
-    (plastic-reset-error)
-    (if (and proof-state-preserving-p
-          (not (funcall proof-state-preserving-p cmd)))
-      (error "Command is not state preserving, I won't execute it!"))
-    (proof-shell-invisible-command cmd)
-    (plastic-call-if-no-error 'plastic-send-one-undo))
-
-(defun plastic-minibuf ()
-    "do minibuffer cmd then undo it, if error-free."
-    (interactive)
-    (plastic-reset-error)
-    (plastic-send-minibuf)
-    (plastic-call-if-no-error 'plastic-send-one-undo))
-
-(defun plastic-synchro ()
-    "do minibuffer cmd BUT DON'T UNDO IT - use if things go wrong!"
-    (interactive)
-    (plastic-send-minibuf))
-
-(defun plastic-send-minibuf ()
-    "take cmd from minibuffer - see doc for proof-minibuffer-cmd"
-    (interactive)
-    (let (cmd)
-       (setq cmd (read-string "Command: " nil 'proof-minibuffer-history))
-       (setq cmd (concat plastic-lit-string " " cmd proof-terminal-string))
-       (proof-shell-invisible-command cmd)))
-
-(defun plastic-had-error ()
-    "sets var plastic-error-occurred, called from hook"
-    (if (eq proof-shell-error-or-interrupt-seen 'error)
-       (setq plastic-error-occurred t)))
-(defun plastic-reset-error ()
-    "UNsets var plastic-error-occurred, before minibuffer or try cmd"
-    (setq plastic-error-occurred nil))
-(defun plastic-call-if-no-error (fn)
-    "wait for proof process to be idle, and call fn if error-free."
-    (while proof-shell-busy (sleep-for 0.25))
-    (if (not plastic-error-occurred) (funcall fn)))
-
-(defun plastic-show-shell ()
-    "shortcut to shell buffer"
-    (interactive)
-    (proof-switch-to-buffer proof-shell-buffer))
-
-(define-key plastic-keymap [(control s)] 'plastic-small-bar)
-(define-key plastic-keymap [(control l)] 'plastic-large-bar)
-(define-key plastic-keymap [(control c)] 'plastic-all-ctxt)
-(define-key plastic-keymap [(control v)] 'plastic-minibuf)
-(define-key plastic-keymap [(control o)] 'plastic-synchro)
-(define-key plastic-keymap [(control p)] 'plastic-show-shell)
-
-
-;; original end.
-
-;;;;;;;;;;;;;;;;;
-;; hacky overriding of the toolbar command and C-c C-v action
-;; my version handles literate characters.
-;; (should do better for long-term though)
-
-(defalias 'proof-toolbar-command 'plastic-minibuf)
-(defalias 'proof-minibuffer-cmd  'plastic-minibuf)
-       ;; the latter doesn't seem to work (pcc, 05aug02)
-
-;;;
-
-(provide 'plastic)
diff --git a/obsolete/plastic/test.lf b/obsolete/plastic/test.lf
deleted file mode 100644
index 7c163d3..0000000
--- a/obsolete/plastic/test.lf
+++ /dev/null
@@ -1,64 +0,0 @@
-EXAMPLE FILE: less than or equal on Nat
-
-%---------------------------------------
-Nat
-
-> Inductive
->      [Nat : Type]
->      Constructors
->      [zero : Nat]
->      [succ : (n:Nat)Nat];
-
-> [plus [m:Nat] = E_Nat ([_:Nat]Nat) m ([_:Nat]succ) ];
-
-
------------------------
-Non-dependent Pi type.
-
-> Inductive
->      [A,B:Type]
->      [Pi_ : Type]
->      Constructors
->      [La_ : (f:(x:El A)El B)Pi_ ];
-
-
-application of Pi_ types, ie conversion to a dependent product.
-
-> Claim ap_ : (A,B:Type) Pi_ A B -> A -> B;
-> Intros A B f x;
-> Refine E_Pi_ ? ? ([_:?]B);
-> Refine f;
-> Intros fo;
-> Refine fo x;
-> ReturnAll;
-> ap_;
-
-
-
-%---------------------------------------
-Combined leq with if-branch - thus avoiding Boolean type.
-
-Notice that we have to prove (Pi_ Nat T) by induction on x, since we can't
-eliminate over (Nat -> T) in LF. 
-
-
-> Claim if_leq : (x,y:Nat)(T:Type)T -> T -> T;
-> Intros x y T leq not_leq;
-> Refine ap_ ? ? (ap_ ? ? ? x) y;
-
-> Refine La_;
-> Intros x1;
-> Refine E_Nat ([_:?]Pi_ Nat T) ?x_z ?x_s x1;
-> x_z Refine La_ ? ? ([_:?]leq);
-> Intros x1_ f_x1_;
-> Refine La_;
-> Intros y1;
-> Refine E_Nat ([_:?]T) ?y_z ?y_s y1;
-> y_z Refine not_leq;
-> Intros y1_ _;
-> Refine ap_ ? ? f_x1_ y1_;
-> ReturnAll;
-
-> if_leq;
-
-
diff --git a/proof-general.el b/proof-general.el
index 425ee60..3dc15fa 100644
--- a/proof-general.el
+++ b/proof-general.el
@@ -3,7 +3,7 @@
 ;; This file is part of Proof General.
 
 ;; Portions © Copyright 1994-2012  David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003-2019  Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2021  Free Software Foundation, Inc.
 ;; Portions © Copyright 2001-2017  Pierre Courtieu
 ;; Portions © Copyright 2010, 2016  Erik Martin-Dorel
 ;; Portions © Copyright 2011-2013, 2016-2017  Hendrik Tews
@@ -14,9 +14,10 @@
 ;; Package-Requires: ((emacs "25.1"))
 ;; Version: 4.5-git
 
-;; This software is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; version 2, as published by the Free Software Foundation.
+;; The software is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -69,8 +70,8 @@
   (require 'proof-site (expand-file-name "generic/proof-site" 
pg-init--pg-root)))
 
 (eval-when-compile
-  ;; FIXME: This is used during installation of the ELPA package:
-  ;; we presume that this file will be compiled before any of the files in
+  ;; FIXME: [ This is used during installation of the ELPA package ]
+  ;; We presume that this file will be compiled before any of the files in
   ;; sub-directories and we presume that all files are compiled within the same
   ;; session, so we here add to load-path all the subdirectories so
   ;; that files in (say) coq/ can (require 'coq-foo) and the compiler will find
@@ -78,11 +79,7 @@
   (let ((byte-compile-directories
          '("generic" "lib"
            "coq" "easycrypt" "pghaskell" "pgocaml" "pgshell" "phox"
-           ;; FIXME: These dirs used to not be listed, but I needed to add
-           ;; them for the compilation to succeed for me.  --Stef
-           ;; These dirs are now obsolete and not published on MELPA.  --Erik
-           ;; "isar" "lego" "twelf" "obsolete/plastic"
-       )))
+           )))
     (dolist (dir byte-compile-directories)
       (add-to-list 'load-path (expand-file-name dir pg-init--pg-root)))))
 
diff --git a/twelf/README b/twelf/README
deleted file mode 100644
index 2d91f55..0000000
--- a/twelf/README
+++ /dev/null
@@ -1,27 +0,0 @@
-Twelf Proof General, for Twelf.
-
-Written by David Aspinall.
-
-Status:                not officially supported yet
-Maintainer:     volunteer required
-Twelf version:  Twelf 1.2 (and later, I hope)
-Twelf homepage: http://www.twelf.org
-
-========================================
-
-
-This is a "technology demonstration" of Proof General for Twelf.
-
-It has basic script management support, with some support for
-decoration taken from the present Twelf Emacs mode.
-
-There is support for X Symbol, but not using a proper token language,
-and it seems fairly broken because Twelf's syntax highlighting
-doesn't work properly with font lock.
-
-I have written this in the hope that somebody from the Twelf community
-will adopt it, maintain and improve it, and thus turn it into a proper
-instantiation of Proof General.
-
-$Id$
-
diff --git a/twelf/example.elf b/twelf/example.elf
deleted file mode 100644
index b428173..0000000
--- a/twelf/example.elf
+++ /dev/null
@@ -1,64 +0,0 @@
-%%% 
-%%% Example script for Twelf Proof General.
-%%%
-%%% $Id$
-%%%
-
-%%% Rather than a proof this file is just a signature,
-%%% bunch of declarations.  Would be nice to have something
-%%% closer to other systems for pedagogical purposes...
-%%% (i.e. proving commutativity of conjunction in ND fragment
-%%%  of this logic)
-
-%%% Intuitionistic propositional calculus
-%%% Positive fragment with implies, and, true.
-%%% Two formulations here: natural deduction and Hilbert-style system.
-%%% Author: Frank Pfenning
-
-% Type of propositions.
-o : type.
-%name o A.
-
-% Syntax: implication, plus a few constants.
-=> : o -> o -> o.  %infix right 10 =>.
-&  : o -> o -> o.  %infix right 11 &.
-true : o.
-
-% Provability.
-|- : o -> type.    %prefix 9 |-.
-%name |- P.
-
-% Axioms.
-K : |- A => B => A.
-S : |- (A => B => C) => (A => B) => A => C.
-ONE : |- true.
-PAIR : |- A => B => A & B.
-LEFT : |- A & B => A.
-RIGHT : |- A & B => B.
-
-% Inference Rule.
-MP : |- A => B -> |- A -> |- B. 
-
-% Natural Deduction.
-
-! : o -> type.   %prefix 9 !.
-%name ! D.
-
-trueI : ! true.
-andI  : ! A -> ! B -> ! A & B.
-andEL : ! A & B -> ! A.
-andER : ! A & B -> ! B.
-impliesI : (! A -> ! B) -> ! A => B.
-impliesE : ! A => B -> ! A -> ! B.
-
-% Normal deductions (for faster search)
-!^ : o -> type.
-!v : o -> type.
-
-trueI^ : !^ true.
-andI^ : !^ A -> !^ B -> !^ (A & B).
-andEvL : !v (A & B) -> !v A.
-andEvR : !v (A & B) -> !v B.
-impI^ : (!v A -> !^ B) -> !^ (A => B).
-impEv : !v (A => B) -> !^ A -> !v B.
-close : !v A -> !^ A.
diff --git a/twelf/twelf-font.el b/twelf/twelf-font.el
deleted file mode 100644
index 44e5468..0000000
--- a/twelf/twelf-font.el
+++ /dev/null
@@ -1,444 +0,0 @@
-;; twelf-font.el  Font lock configuration for Twelf
-;;
-;; Author: Frank Pfenning
-;;        Taken from Twelf's emacs mode and
-;;        adapted for Proof General by David Aspinall <David.Aspinall@ed.ac.uk>
-;;
-;; $Id$
-;;
-;;
-
-(require 'font-lock)
-
-;; FIXME da: integrate with PG's face mechanism?
-;; (but maybe keep twelf faces to help users)
-;; Also should add font locking.
-
-;; FIXME da: the twelf faces don't work with PG's
-;; background colouring, why?
-
-
-;; modify the syntax table so _ and ' are word constituents
-;; otherwise the regexp's for identifiers become very complicated
-;; FIXME: fn undef'd(set-word ?\_)
-;; FIXME: fn (set-word ?\')
-
-;; setting faces here...
-;; use devices to improve portability?
-;; make it dependent on light background vs dark background
-;; tie in X resources?
-
-(defun twelf-font-create-face (face from-face color)
-  "Creates a Twelf font from FROM-FACE with COLOR."
-  (make-face face)
-  ;(reset-face face)                   ; seems to be necessary, but why?
-  (copy-face from-face face)
-  (if color (set-face-foreground face color)))
-
-(defvar twelf-font-dark-background nil
-  "*T if the background of Emacs is to be considered dark.")
-
-;; currently we not using bold or italics---some font families
-;; work poorly with that kind of face.
-(cond (twelf-font-dark-background
-       (twelf-font-create-face 'twelf-font-keyword-face 'default nil)
-       (twelf-font-create-face 'twelf-font-comment-face 'font-lock-comment-face
-                            nil)
-       (twelf-font-create-face 'twelf-font-percent-key-face 'default "Plum")
-       (twelf-font-create-face 'twelf-font-decl-face 'default "Orange")
-       (twelf-font-create-face 'twelf-font-parm-face 'default "Orange")
-       (twelf-font-create-face 'twelf-font-fvar-face 'default "SpringGreen")
-       (twelf-font-create-face 'twelf-font-evar-face 'default "Aquamarine"))
-      (t
-       (twelf-font-create-face 'twelf-font-keyword-face 'default nil)
-       (twelf-font-create-face 'twelf-font-comment-face 'font-lock-comment-face
-                            nil)
-       (twelf-font-create-face 'twelf-font-percent-key-face 'default 
"MediumPurple")
-       (twelf-font-create-face 'twelf-font-decl-face 'default "FireBrick")
-       (twelf-font-create-face 'twelf-font-parm-face 'default "Green4")
-       (twelf-font-create-face 'twelf-font-fvar-face 'default "Blue1")
-       (twelf-font-create-face 'twelf-font-evar-face 'default "Blue4")))
-
-;; Note that the order matters!
-
-(defvar twelf-font-patterns
- '(
-   ;; delimited comments, perhaps should use different font
-   ;;("%{" "}%" comment)
-   (twelf-font-find-delimited-comment . twelf-font-comment-face)
-   ;; single-line comments
-   ;; replace \\W by \\s- for whitespace?
-   ("%\\W.*$" 0 twelf-font-comment-face)
-   ;; %keyword declarations
-   
("\\(%infix\\|%prefix\\|%prefix\\|%postfix\\|%name\\|%solve\\|%query\\|%mode\\|%terminates\\|%theorem\\|%prove\\).*$"
-    1 twelf-font-percent-key-face nil)
-   ;; keywords, omit punctuations for now.
-   ("\\(\\<<-\\>\\|\\<->\\>\\|\\<type\\>\\|\\<=\\>\\|\\<_\\>\\)"
-    ;; for LLF, no punctuation marks
-;;"\\(\\<<-\\>\\|\\<->\\>\\|\\<o-\\>\\|\\<-o\\>\\|\\<<T>\\>\\|\\<&\\>\\|\\^\\|()\\|\\<type\\>\\|\\<sigma\\>\\)"
-    ;; for LLF, with punctuation marks
-    
;;"\\([][:.(){},]\\|\\<<-\\>\\|\\<->\\>\\|\\<o-\\>\\|\\<-o\\>\\|\\<<T>\\>\\|\\<&\\>\\|\\^\\|()\\|\\<type\\>\\|\\<sigma\\>\\)"
-    ;; for Elf, no punction marks
-    ;;"\\(\\<<-\\>\\|\\<->\\>\\|\\<type\\>\\|\\<sigma\\>\\)"
-    ;; for Elf, including punctuation marks
-    ;;"\\([][:.(){}]\\|\\<<-\\>\\|\\<->\\>\\|\\<type\\>\\|\\<sigma\\>\\)"
-   . twelf-font-keyword-face)
-   ;; declared constants
-   (twelf-font-find-decl . twelf-font-decl-face)
-   ;; parameters
-   (twelf-font-find-parm . twelf-font-parm-face)
-   ;; quantified existentials
-   (twelf-font-find-evar . twelf-font-evar-face)
-   ;; lower-case identifiers (almost = constants)
-   ;;("\\<\\([a-z!&$^+/<=>?@~|#*`;,]\\|\\-\\|\\\\\\)\\w*\\>"
-   ;; nil black)
-   ;; upper-case identifiers (almost = variables)
-   ("\\<[A-Z_]\\w*\\>" . twelf-font-fvar-face)
-   ;; numbers and quoted identifiers omitted for now
-   )
- "Highlighting patterns for Twelf mode.
-This generally follows the syntax of the FONT-LOCK-KEYWORDS variable,
-but allows an arbitrary function to be called instead of just
-regular expressions."
- )
-
-(defun twelf-font-fontify-decl  ()
-  "Fontifies the current Twelf declaration."
-  (interactive)
-  (let* ((region (twelf-current-decl))
-        (start (nth 0 region))
-        (end (nth 1 region)))
-    (save-excursion
-      (font-lock-unfontify-region start end)
-      (twelf-font-fontify-region start end))))
-
-(defun twelf-font-fontify-buffer ()
-  "Fontitifies the current buffer as Twelf code."
-  (interactive)
-  (save-excursion
-    (font-lock-unfontify-region (point-min) (point-max)) ; t optional in XEmacs
-    (twelf-font-fontify-region (point-min) (point-max))))
-
-(defun twelf-font-unfontify ()
-  "Removes fontification from current buffer."
-  (interactive)
-  (font-lock-unfontify-region (point-min) (point-max)))        ; t optional in 
XEmacs
-
-(defvar font-lock-message-threshold 6000) ; in case we are running FSF Emacs
-
-(defun twelf-font-fontify-region (start end)
-  "Go through TWELF-FONT-PATTERNS, fontifying according to given functions"
-  (save-restriction
-    (narrow-to-region start end)
-    (if (and font-lock-verbose
-            (>= (- end start) font-lock-message-threshold))
-       (message "Fontifying %s... (semantically...)" (buffer-name)))
-    (let ((patterns twelf-font-patterns)
-         (case-fold-search nil)        ; in Twelf, never case-fold
-         (modified (buffer-modified-p)) ; for FSF Emacs 19
-         pattern
-         fun-or-regexp
-         instructions
-         face
-         match-index
-         allow-overlap-p
-         region)
-      (while patterns
-       (setq pattern (car patterns))
-       (setq patterns (cdr patterns))
-       (goto-char start)
-       (cond ((stringp pattern)
-              (setq match-index 0)
-              (setq face 'font-lock-keyword-face)
-              (setq allow-overlap-p nil))
-             ((listp pattern)
-              (setq fun-or-regexp (car pattern))
-              (setq instructions (cdr pattern))
-              (cond ((integerp instructions)
-                     (setq match-index instructions)
-                     (setq face 'font-lock-keyword-face)
-                     (setq allow-overlap-p nil))
-                    ((symbolp instructions)
-                     (setq match-index 0)
-                     (setq face instructions)
-                     (setq allow-overlap-p nil))
-                    ((listp instructions)
-                     (setq match-index (nth 0 instructions))
-                     (setq face (nth 1 instructions))
-                     (setq allow-overlap-p (nth 2 instructions)))
-                    (t (error "Illegal font-lock-keyword instructions"))))
-             (t (error "Illegal font-lock-keyword instructions")))
-       (cond ((symbolp fun-or-regexp)  ; a function to call
-              (while
-                  (setq region (funcall fun-or-regexp end))
-                ;; END is limit of forward search, start at point
-                ;; and move point
-                ;; check whether overlap is permissible!
-                (twelf-font-highlight (car region) (cdr region)
-                                    face allow-overlap-p)))
-             ((stringp fun-or-regexp)  ; a pattern to find
-              (while
-                  (re-search-forward fun-or-regexp end t)
-                (goto-char (match-end match-index)) ; back-to-back font hack
-                (twelf-font-highlight (match-beginning match-index)
-                                    (match-end match-index)
-                                    face
-                                    allow-overlap-p)))
-             (t (error "Illegal font-lock-keyword instructions"))))
-      ;; For FSF Emacs 19: mark buffer not modified, if it wasn't before
-      ;; fontification.
-      (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil))
-      (if (and font-lock-verbose
-              (>= (- end start) font-lock-message-threshold))
-         (message "Fontifying %s... done" (buffer-name))))))
-
-(defun twelf-font-highlight (start end face allow-overlap-p)
-  "Highlight region between START and END with FONT.
-If already highlighted and ALLOW-OVERLAP-P is nil, don't highlight."
-  (or (= start end)
-      ;;(if allow-overlap-p nil (font-lock-any-faces-p start (1- end)))
-      ;; different in XEmacs 19.16?  font-lock-any-faces-p subtracts 1.
-      (if allow-overlap-p nil (font-lock-any-faces-p start end))
-      (font-lock-set-face start end face)))
-
-(defun twelf-font-find-delimited-comment (limit)
-  "Find a delimited Twelf comment and return (START . END), nil if none."
-  (let ((comment-level nil)
-       (comment-start nil))
-    (if (search-forward "%{" limit t)
-       (progn
-         (setq comment-start (- (point) 2))
-         (setq comment-level 1)
-         (while (and (> comment-level 0)
-                     (re-search-forward "\\(%{\\)\\|\\(}%\\)"
-                                        limit 'limit))
-           (cond
-            ((match-beginning 1) (setq comment-level (1+ comment-level)))
-            ((match-beginning 2) (setq comment-level (1- comment-level)))))
-         (cons comment-start (point)))
-      nil)))
-
-;; doesn't work yet with LIMIT!!!
-;; this should never be done in incremental-highlighting mode
-(defun twelf-font-find-decl (limit)
-  "Find an Twelf constant declaration and return (START . END), nil if none."
-  (let (start
-       end
-       ;; Turn off error messages
-       (id (twelf-next-decl nil nil)))
-    ;; ignore limit for now because of global buffer restriction
-    (if (null id) ; (or (null id) (> (point) limit))
-       nil
-      (skip-chars-backward *whitespace*)
-      (setq end (point))
-      (beginning-of-line 1)
-      (setq start (point))
-      (twelf-end-of-par)
-      (cons start end))))
-
-(defun twelf-font-find-binder (var-pattern limit occ-face)
-  "Find Twelf binder whose bound variable matches var-pattern.
-Returns (START . END) if found, NIL if there is none before LIMIT.
-Binders have the form [x],[x:A],{y},{y:A}.
-As a side-effect, it highlights all occurrences of the bound
-variable using the variable OCC-FACE."
-  (let (start
-       end
-       par-end
-       scope-start
-       scope-end
-       word
-       (found nil))
-    ;;; At the moment, ignore limit since restriction is done globally
-    ;; (save-restriction
-    ;; (narrow-to-region (point) limit)
-      (while (not found)
-       (skip-chars-forward "^[{%")
-       (while (looking-at *twelf-comment-start*)
-         (cond ((looking-at "%{")
-                (condition-case nil (forward-sexp 1)
-                  (error (goto-char (point-max))))
-                (or (eobp) (forward-char 1)))
-               (t
-                (end-of-line 1)))
-         (skip-chars-forward "^[{%"))
-       (if (eobp)
-           (setq found 'eob)
-         (forward-char 1)
-         (skip-chars-forward *whitespace*)
-         (if (looking-at var-pattern)
-             ;;"\\<\\w+\\>"
-             ;;"\\<[-a-z!&$^+/\\<=>?@~|#*`;,]\\w*\\>"
-             (setq found t))))
-      (if (eq found 'eob)
-         nil
-       (setq start (match-beginning 0))
-       (setq end (match-end 0))
-       (setq word (buffer-substring start end))
-       ;; find scope of quantifier
-       (twelf-end-of-par)
-       (setq par-end (point))
-       (goto-char end)
-       (condition-case nil (up-list 1) ; end of quantifier
-         (error (goto-char par-end)))
-       (setq scope-start (min (point) par-end))
-       (condition-case nil (up-list 1) ; end of scope
-         (error (goto-char par-end)))
-       (setq scope-end (min (point) par-end))
-       (goto-char scope-start)
-       (while
-           ;; speed here???
-           (search-forward-regexp (concat "\\<" (regexp-quote word) "\\>")
-                                  scope-end 'limit)
-         ;; Check overlap here!!! --- current bug if in comment
-         (font-lock-set-face (match-beginning 0) (match-end 0)
-                             occ-face))
-       (goto-char end)
-       (cons start end)))
-  ;;)
-  )
-
-(defun twelf-font-find-parm (limit)
-  "Find bound Twelf parameters and return (START . END), NIL if none.
-Also highlights all occurrences of the parameter.
-For these purposes, a parameter is a bound, lower-case identifier."
-  (twelf-font-find-binder "\\<[-a-z!&$^+/\\<=>?@~|#*`;,]\\w*\\>"
-                       limit 'twelf-font-parm-face))
-
-(defun twelf-font-find-evar (limit)
-  "Find bound Twelf existential variable return (START . END), NIL if none.
-Also highlights all occurrences of the existential variable.
-For these purposes, an existential variable is a bound, upper-case identifier."
-  (twelf-font-find-binder "\\<[A-Z_]\\w*\\>"
-                       limit 'twelf-font-evar-face))
-
-; next two are now in twelf.el
-;(define-key twelf-mode-map "\C-c\C-l" 'twelf-font-fontify-decl)
-;(define-key twelf-mode-map "\C-cl" 'twelf-font-fontify-buffer)
-
-
-;;;
-;;;
-;;; This comes from twelf-old.el but is needed for fontification,
-;;;
-;;; Perhaps some of these parsing functions will need reusing
-;;; for sending input to server properly?
-;;;
-
-;;; FIXME: some of names need fixing for safe conventions.
-
-(defun twelf-current-decl ()
-  "Returns list (START END COMPLETE) for current Twelf declaration.
-This should be the declaration or query under or just before
-point within the nearest enclosing blank lines.
-If declaration ends in `.' then COMPLETE is t, otherwise nil."
-  (let (par-start par-end complete)
-    (save-excursion
-      ;; Skip backwards if between declarations
-      (if (or (eobp) (looking-at (concat "[" *whitespace* "]")))
-         (skip-chars-backward (concat *whitespace* ".")))
-      (setq par-end (point))
-      ;; Move forward from beginning of decl until last
-      ;; declaration before par-end is found.
-      (if (not (bobp)) (backward-paragraph 1))
-      (setq par-start (point))
-      (while (and (twelf-end-of-par par-end)
-                 (< (point) par-end))
-       (setq par-start (point)))
-      ;; Now par-start is at end of preceding declaration or query.
-      (goto-char par-start)
-      (skip-twelf-comments-and-whitespace)
-      (setq par-start (point))
-      ;; Skip to period or consective blank lines
-      (setq complete (twelf-end-of-par))
-      (setq par-end (point)))
-    (list par-start par-end complete)))
-
-(defun twelf-next-decl (filename error-buffer)
-  "Set point after the identifier of the next declaration.
-Return the declared identifier or `nil' if none was found.
-FILENAME and ERROR-BUFFER are used if something appears wrong."
-  (let ((id nil)
-       end-of-id
-       beg-of-id)
-    (skip-twelf-comments-and-whitespace)
-    (while (and (not id) (not (eobp)))
-      (setq beg-of-id (point))
-      (if (zerop (skip-chars-forward *twelf-id-chars*))
-         ;; Not looking at id: skip ahead
-         (skip-ahead filename (current-line-absolute) "No identifier"
-                     error-buffer)
-       (setq end-of-id (point))
-       (skip-twelf-comments-and-whitespace)
-       (if (not (looking-at ":"))
-           ;; Not looking at valid decl: skip ahead
-           (skip-ahead filename (current-line-absolute end-of-id) "No colon"
-                       error-buffer)
-         (goto-char end-of-id)
-         (setq id (buffer-substring beg-of-id end-of-id))))
-      (skip-twelf-comments-and-whitespace))
-    id))
-
-(defconst *whitespace* " \t\n\f"
-  "Whitespace characters to be skipped by various operations.")
-
-(defconst *twelf-comment-start* (concat "%[%{" *whitespace* "]")
-  "Regular expression to match the start of a Twelf comment.")
-
-(defconst *twelf-id-chars* "a-z!&$^+/<=>?@~|#*`;,\\-\\\\A-Z_0-9'"
-  "Characters that constitute Twelf identifiers.")
-
-(defun skip-twelf-comments-and-whitespace ()
-  "Skip Twelf comments (single-line or balanced delimited) and white space."
-  (skip-chars-forward *whitespace*)
-  (while (looking-at *twelf-comment-start*)
-    (cond ((looking-at "%{")           ; delimited comment
-          (condition-case nil (forward-sexp 1)
-            (error (goto-char (point-max))))
-          (or (eobp) (forward-char 1)))
-         (t                            ; single-line comment
-          (end-of-line 1)))
-    (skip-chars-forward *whitespace*)))
-
-(defun twelf-end-of-par (&optional limit)
-  "Skip to presumed end of current Twelf declaration.
-Moves to next period or blank line (whichever comes first)
-and returns t if period is found, nil otherwise.
-Skips over comments (single-line or balanced delimited).
-Optional argument LIMIT specifies limit of search for period."
-  (if (not limit)
-      (save-excursion
-       (forward-paragraph 1)
-       (setq limit (point))))
-  (while (and (not (looking-at "\\."))
-             (< (point) limit))
-    (skip-chars-forward "^.%" limit)
-    (cond ((looking-at *twelf-comment-start*)
-          (skip-twelf-comments-and-whitespace))
-         ((looking-at "%")
-          (forward-char 1))))
-  (cond ((looking-at "\\.")
-        (forward-char 1)
-        t)
-       (t ;; stopped at limit
-        nil)))
-
-(defun skip-ahead (filename line message error-buffer)
-  "Skip ahead when syntactic error was found.
-A parsable error message constited from FILENAME, LINE, and MESSAGE is
-deposited in ERROR-BUFFER."
-  (if error-buffer
-      (save-excursion
-       (set-buffer error-buffer)
-       (goto-char (point-max))
-       (insert filename ":" (int-to-string line) " Warning: " message "\n")
-       (setq *twelf-error-pos* (point))))
-  (twelf-end-of-par))
-
-(defun current-line-absolute (&optional char-pos)
-  "Return line number of CHAR-POS (default: point) in current buffer.
-Ignores any possible buffer restrictions."
-  (1+ (count-lines 1 (or char-pos (point)))))
-
-
-(provide 'twelf-font)
diff --git a/twelf/twelf-old.el b/twelf/twelf-old.el
deleted file mode 100644
index 62763ba..0000000
--- a/twelf/twelf-old.el
+++ /dev/null
@@ -1,2660 +0,0 @@
-;; twelf-old.el  Port of old Twelf Emacs mode
-;;
-;; Author: Frank Pfenning
-;;        Adapted for Proof General by David Aspinall <David.Aspinall@ed.ac.uk>
-;;
-;; $Id$
-;;
-;;
-
-;; FIXME: have copied over directly!
-
-;;; Modes and utilities for Twelf programming.  This package supports (1)
-;;; editing Twelf source files with reasonable indentation, (2) managing
-;;; configurations of Twelf source files, including TAGS tables, (3)
-;;; communication with an inferior Twelf server to type-check and execute
-;;; declarations and queries, (4) interaction with an inferior Twelf process
-;;; in SML.
-;;;
-;;; For documentation, type C-h m in Twelf mode, or see the function
-;;; twelf-mode below
-;;;
-;;; Author: Frank Pfenning
-;;; Thu Oct 7 19:48:50 1993 (1.0 created)
-;;; Fri Jan 6 09:06:38 1995 (2.0 major revision)
-;;; Tue Jun 16 15:49:31 1998 (3.0 major revision)
-;;;
-;;;======================================================================
-;;; For the `.emacs' file (copied from init.el)
-;;;======================================================================
-;;;
-;;; ;; Tell Emacs where the Twelf libraries are.
-;;; (setq load-path
-;;;       (cons "/afs/cs/project/twelf/research/twelf/emacs" load-path))
-;;;
-;;; ;; Autoload libraries when Twelf-related major modes are started.
-;;; (autoload 'twelf-mode "twelf" "Major mode for editing Twelf source." t)
-;;; (autoload 'twelf-server "twelf" "Run an inferior Twelf server." t)
-;;; (autoload 'twelf-sml "twelf" "Run an inferior Twelf-SML process." t)
-;;;
-;;; ;; Switch buffers to Twelf mode based on filename extension,
-;;; ;; which is one of .elf, .quy, .thm, or .cfg.
-;;; (setq auto-mode-alist
-;;;       (cons '("\\.elf$" . twelf-mode)
-;;;        (cons '("\\.quy$" . twelf-mode)
-;;;              (cons '("\\.thm$" . twelf-mode)
-;;;                    (cons '("\\.cfg$" . twelf-mode)
-;;;                          auto-mode-alist)))))
-;;;
-;;; ;; Default Twelf server program location
-;;; (setq twelf-server-program
-;;;       "/afs/cs/project/twelf/research/twelf/bin/twelf-server")
-;;;
-;;; ;; Default Twelf SML program location
-;;; (setq twelf-sml-program
-;;;       "/afs/cs/project/twelf/misc/smlnj/bin/sml-cm")
-;;;
-;;; ;; Default documentation location (in info format)
-;;; (setq twelf-info-file
-;;;       "/afs/cs/project/twelf/research/twelf/doc/info/twelf.info")
-;;;
-;;; ;; Automatically highlight Twelf sources using font-lock
-;;; (add-hook 'twelf-mode-hook 'twelf-font-fontify-buffer)
-;;;
-;;;======================================================================
-;;; Command Summary
-;;;======================================================================
-;;;
-;;; Quick summary of Twelf mode, generated from C-h b:
-;;;
-;;; --- Editing Commands ---
-;;; TAB          twelf-indent-line
-;;; DEL          backward-delete-char-untabify
-;;; M-C-q        twelf-indent-decl
-;;;
-;;; --- Type Checking ---
-;;; C-c C-c      twelf-save-check-config
-;;; C-c C-s      twelf-save-check-file
-;;; C-c C-d      twelf-check-declaration
-;;; C-c c        twelf-type-const
-;;; C-c C-u      twelf-server-display
-;;;
-;;; --- Error Tracking ---
-;;; C-c `        twelf-next-error
-;;; C-c =        twelf-goto-error
-;;;
-;;; --- Syntax Highlighting ---
-;;; C-c C-l      twelf-font-fontify-decl
-;;; C-c l        twelf-font-fontify-buffer
-;;;
-;;; --- Server State ---
-;;; C-c <        twelf-set
-;;; C-c >        twelf-get
-;;; C-c C-i      twelf-server-interrupt
-;;; M-x twelf-server
-;;; M-x twelf-server-configure
-;;; M-x twelf-server-quit
-;;; M-x twelf-server-restart
-;;; M-x twelf-server-send-command
-;;;
-;;; --- Timers ---
-;;; M-x twelf-timers-reset
-;;; M-x twelf-timers-show
-;;; M-x twelf-timers-check
-;;;
-;;; --- Tags (standard Emacs etags package) ---
-;;; M-x twelf-tag
-;;; M-.          find-tag (standard binding)
-;;; C-x 4 .      find-tag-other-window (standard binding)
-;;; C-c q        tags-query-replace (Twelf mode binding)
-;;; C-c s        tags-search (Twelf mode binding)
-;;; M-,          tags-loop-continue (standard binding)
-;;;              visit-tags-table, list-tags, tags-apropos
-;;;
-;;; --- Communication with inferior Twelf-SML process (not Twelf Server) ---
-;;; M-x twelf-sml
-;;; C-c C-e      twelf-sml-send-query
-;;; C-c C-r      twelf-sml-send-region
-;;; C-c RET      twelf-sml-send-newline
-;;; C-c ;        twelf-sml-send-semicolon
-;;; C-c d        twelf-sml-cd
-;;; M-x twelf-sml-quit
-;;;
-;;; --- Variables ---
-;;; twelf-indent        amount of indentation for nested Twelf expressions
-;;;
-;;;======================================================================
-;;; Some Terminology
-;;;======================================================================
-;;;
-;;; Twelf Server --- an inferior process that services requests to type-check,
-;;; load, or execute declarations and queries.  It is usually attached to the
-;;; buffer *twelf-server*.  Requests are generated by Emacs from user commands,
-;;; or may be typed directly into the Twelf server buffer.
-;;;
-;;; Current configuration --- A configuration is an ordered list of
-;;; Twelf source files in dependency order.  It is usually initialized
-;;; and maintained in a file sources.cfg.  The current configuration is
-;;; also the bases for the TAGS file created by twelf-tags.  This allows
-;;; quick jumping to declaration sites for constants, or to apply
-;;; searches or replacements to all files in a configuration.
-;;;
-;;; Current Twelf declaration --- When checking individual declarations
-;;; Emacs must extract it from the current buffer and then send it to
-;;; the server.  This is necessarily based on a heuristic, since Emacs
-;;; does not know enough in order to parse Twelf source properly in all
-;;; cases, but it knows the syntax for comments, Twelf identifiers, and
-;;; matching delimiters.  Search for the end or beginning of a
-;;; declaration is always limited by double blank lines in order to be
-;;; more robust (in case a period is missing at the end of a
-;;; declaration).  If the point falls between declarations, the
-;;; declaration after the point is considered current.
-;;;
-;;; Twelf-SML --- During development or debugging of the Twelf
-;;; implementation itself it is often useful to interact with SML, the
-;;; language in which Twelf is implementated, rather than using an Twelf
-;;; server.  This is an inferior SML process which may run a Twelf
-;;; query interpreter.
-;;;
-;;;======================================================================
-;;; Change Log
-;;;======================================================================
-;;;
-;;; Thu Jun  3 14:51:35 1993 -fp
-;;; Added variable display-elf-queries.  If T (default) redisplays Elf
-;;; buffer after a query has been sent.  Delays one second after sending
-;;; the query which is rather arbitrary.
-;;; Wed Jun 30 19:57:58 1993
-;;; - Error messages in the format line0.col0-line1.col1 can now be parsed.
-;;; - Error from std_in, either interactive or through elf-send-query
-;;;   can now be tracked.
-;;; - Added simple directory tracking and function elf-cd, bound to C-c d.
-;;; - improved filename completion in Elf mode under Lucid Emacs.
-;;; - replaced tail recursion in elf-indent-line by a while loop.
-;;; - changed elf-input-filter to ignore one character inputs.
-;;; - elf-error-marker is now updated on every interactive input or send.
-;;; - added commands elf-send-newline, bound to C-c RET
-;;;   and elf-send-semicolon, bound to C-c ;.
-;;;   These are useful when sending queries from a buffer with examples.
-;;; Fri Sep  3 15:02:10 1993
-;;; Changed definition of elf-current-paragraph so that it recognizes
-;;; individual declarations within a traditional ``paragraph'' (separated
-;;; by blank lines).
-;;; Fri Oct 22 10:05:08 1993
-;;; Changed elf-send-query to ensure that the Elf process expects a query
-;;; If the Elf process is at the SML prompt, it starts a top level.
-;;; If the Elf process is waiting after printing an answer substitution,
-;;; it sends a RET.
-;;; This is based on a heuristic analysis of the contents of the Elf buffer.
-;;; Fri Dec 16 15:27:14 1994
-;;; Changed elf-error-marker to elf-error-pos, since it moved in undesirable
-;;; ways in Emacs 19.
-;;; Fri Jan  6 09:06:54 1995
-;;; Major revision: incorporating elf-server.el and elf-tag.el
-;;; Thu Jan 12 14:31:36 1995
-;;; Finished major revision (version 2.0)
-;;; Sat Jun 13 12:14:34 1998
-;;; Renamed to Twelf and incorporated menus from elf-menu.el
-;;; Major revision for Twelf 1.2 release
-;;; Q: Improve tagging for %keyword declarations?
-;;; Thu Jun 25 08:52:41 1998
-;;; Finished major revision (version 3.0)
-;;; Fri Oct  2 11:06:15 1998
-;;; Added NT Emacs bug workaround
-
-(require 'comint)
-(require 'easymenu)
-
-;;;----------------------------------------------------------------------
-;;; User visible variables
-;;;----------------------------------------------------------------------
-
-(defvar twelf-indent 3
-  "*Indent for Twelf expressions.")
-
-(defvar twelf-infix-regexp ":\\|\\<->\\>\\|\\<<-\\>\\|\\<=\\>"
-  "*Regular expression to match Twelf infix operators.
-Match must exclude surrounding whitespace.  This is used for indentation.")
-
-(defvar twelf-server-program "twelf-server"
-  "*Default Twelf server program.")
-
-(defvar twelf-info-file "twelf.info"
-  "*Default info file for Twelf.")
-
-(defvar twelf-server-display-commands nil
-  "*If non-nil, the Twelf server buffer will be displayed after each command.
-Normally, the Twelf server buffer is displayed only after some selected
-commands or if a command is given a prefix argument.")
-
-(defvar twelf-highlight-range-function 'twelf-highlight-range-zmacs
-  "*Function which highlights the range analyzed by the server.
-This is called for certain commands which apply to a subterm at point.
-You may want to change this for FSF Emacs, XEmacs and/or highlight packages.")
-
-(defvar twelf-focus-function 'twelf-focus-noop
-  "*Function which focusses on the current declaration or query.
-This is called for certain commands which pick out (a part of) a declaration
-or query.  You may want to change this for FSF Emacs, XEmacs and/or highlight
-packages.")
-
-(defvar twelf-server-echo-commands t
-  "*If nil, Twelf server commands will not be echoed in the Twelf server 
buffer.")
-
-(defvar twelf-save-silently nil
-  "*If non-nil, modified buffers are saved without confirmation
-before `twelf-check-config' if they belong to the current configuration.")
-
-(defvar twelf-server-timeout 5
-  "*Number of seconds before the server is considered delinquent.
-This is unsupported in some versions of Emacs.")
-
-(defvar twelf-sml-program "twelf-sml"
-  "*Default Twelf-SML program.")
-
-(defvar twelf-sml-args '()
-  "*Arguments to Twelf-SML program.")
-
-(defvar twelf-sml-display-queries t
-  "*If nil, the Twelf-SML buffer will not be selected after a query.")
-
-(defvar twelf-mode-hook '()
-  "List of hook functions to run when switching to Twelf mode.")
-
-(defvar twelf-server-mode-hook '()
-  "List of hook functions to run when switching to Twelf Server mode.")
-
-(defvar twelf-config-mode-hook '()
-  "List of hook functions to run when switching to Twelf Config minor mode.")
-
-(defvar twelf-sml-mode-hook '()
-  "List of hook functions for Twelf-SML mode.")
-
-(defvar twelf-to-twelf-sml-mode '()
-  "List of hook functions for 2Twelf-SML minor mode.")
-
-(defvar twelf-config-mode nil
-  "Non-NIL means the Twelf Config minor mode is in effect.")
-
-;;;----------------------------------------------------------------------
-;;; Internal variables
-;;;----------------------------------------------------------------------
-
-(defvar *twelf-server-buffer-name* "*twelf-server*"
-  "The default name for the Twelf server buffer.")
-
-(defvar *twelf-server-buffer* nil
-  "The buffer with the Twelf server if one exists.")
-
-(defvar *twelf-server-process-name* "twelf-server"
-  "Name of the Twelf server process.")
-
-(defvar *twelf-config-buffer* nil
-  "The current Twelf configuration buffer if one exists.")
-
-(defvar *twelf-config-time* nil
-  "The modification time of Twelf configuration file when read by the server.")
-
-(defvar *twelf-config-list* nil
-  "The reversely ordered list with files in the current Twelf configuration.")
-
-(defvar *twelf-server-last-process-mark* 0
-  "The process mark before the last command in the Twelf server buffer.")
-
-(defvar *twelf-last-region-sent* nil
-  "Contains a list (BUFFER START END) identifying the last region sent
-to the Twelf server or Twelf-SML process for error tracking.
-If nil, then the last input was interactive.
-If t, then the last input was interactive, but has already been copied
-to the end of the Twelf-SML buffer.")
-
-(defvar *twelf-last-input-buffer* nil
-  "Last buffer to which input was sent.
-This is used by the error message parser.")
-
-(defvar *twelf-error-pos* 0
-  "Last error position in the server buffer.")
-
-(defconst *twelf-read-functions*
-  '((nat . twelf-read-nat)
-    (bool . twelf-read-bool)
-    (limit . twelf-read-limit)
-    (strategy . twelf-read-strategy))
-  "Association between Twelf parameter types and their Emacs read functions.")
-
-(defconst *twelf-parm-table*
-  '(("chatter" . nat)
-    ("doubleCheck" . bool)
-    ("Print.implicit" . bool)
-    ("Print.depth" . limit)
-    ("Print.length" . limit)
-    ("Print.indent" . nat)
-    ("Print.width" . nat)
-    ("Prover.strategy" . strategy)
-    ("Prover.maxSplit" . nat)
-    ("Prover.maxRecurse" . nat))
-  "Association between Twelf parameters and their types.")
-
-(defvar twelf-chatter 3
-  "Chatter level in current Twelf server.
-Maintained to present reasonable menus.")
-
-;(defvar twelf-trace 0
-;  "Trace level in current Twelf server.
-;Maintained to present reasonable menus.")
-
-(defvar twelf-double-check "false"
-  "Current value of doubleCheck Twelf parameter.")
-
-(defvar twelf-print-implicit "false"
-  "Current value of Print.implicit Twelf parameter.")
-
-(defconst *twelf-track-parms*
-  '(("chatter" . twelf-chatter)
-    ;("trace" . twelf-trace)
-    ("doubleCheck" . twelf-double-check)
-    ("Print.implicit" . twelf-print-implicit))
-  "Association between Twelf parameters and Emacs tracking variables.")
-
-;;;----------------------------------------------------------------------
-;;; Basic key bindings
-;;;----------------------------------------------------------------------
-
-(defun install-basic-twelf-keybindings (map)
-  "General key bindings for Twelf and Twelf Server modes."
-  ;; Additional tag keybindings
-  (define-key map "\C-cq" 'tags-query-replace)
-  (define-key map "\C-cs" 'tags-search)
-  ;; Server state
-  (define-key map "\C-c<" 'twelf-set)
-  (define-key map "\C-c>" 'twelf-get)
-  ;; Error handling
-  (define-key map "\C-c`" 'twelf-next-error)
-  (define-key map "\C-c=" 'twelf-goto-error)
-  ;; Proper indentation
-  (define-key map "\e\C-q" 'twelf-indent-decl)
-  (define-key map "\t" 'twelf-indent-line)
-  (define-key map "\177" 'backward-delete-char-untabify)
-  ;; Info documentation
-  (define-key map "\C-c\C-h" 'twelf-info)
-  )
-
-;;;----------------------------------------------------------------------
-;;; Twelf mode
-;;; This mode should be used for files with Twelf declarations,
-;;; usually *.elf, *.quy, or *.thm, and Twelf configuration files *.cfg
-;;;----------------------------------------------------------------------
-
-(defun install-twelf-keybindings (map)
-  "Install the key bindings for the Twelf mode."
-  (define-key map "\C-cl" 'twelf-font-fontify-buffer) ;autoload twelf-font
-  (define-key map "\C-c\C-l" 'twelf-font-fontify-decl) ;autoload twelf-font
-  (define-key map "\C-c\C-i" 'twelf-server-interrupt)
-  (define-key map "\C-c\C-u" 'twelf-server-display)
-  (define-key map "\C-cc" 'twelf-type-const)
-  ;(define-key map "\C-ce" 'twelf-expected-type-at-point)
-  ;(define-key map "\C-cp" 'twelf-type-at-point)
-  ;(define-key map "\C-c." 'twelf-complete)
-  ;(define-key map "\C-c?" 'twelf-completions-at-point)
-  (define-key map "\C-c\C-d" 'twelf-check-declaration)
-  (define-key map "\C-c\C-s" 'twelf-save-check-file)
-  (define-key map "\C-c\C-c" 'twelf-save-check-config)
-  )
-
-(defvar twelf-mode-map nil
-  "The keymap used in Twelf mode.")
-
-(cond ((not twelf-mode-map)
-       (setq twelf-mode-map (make-sparse-keymap))
-       (install-basic-twelf-keybindings twelf-mode-map)
-       (install-twelf-keybindings twelf-mode-map)))
-
-;;;----------------------------------------------------------------------
-;;; General editing and indentation
-;;;----------------------------------------------------------------------
-
-(defvar twelf-mode-syntax-table nil
-  "The syntax table used in Twelf mode.")
-
-(defun set-twelf-syntax (char entry)
-  (modify-syntax-entry char entry twelf-mode-syntax-table))
-(defun set-word (char) (set-twelf-syntax char "w   "))
-(defun set-symbol (char) (set-twelf-syntax char "_   "))
-
-(defun map-string (func string)
-  (if (string= "" string)
-      ()
-    (funcall func (string-to-char string))
-    (map-string func (substring string 1))))
-
-(if twelf-mode-syntax-table
-    ()
-  (setq twelf-mode-syntax-table (make-syntax-table))
-  ;; A-Z and a-z are already word constituents
-  ;; For fontification, it would be better if _ and ' were word constituents
-  (map-string 'set-word "!&$^+/<=>?@~|#*`;,-0123456789\\") ; word constituents
-  (map-string 'set-symbol "_'")         ; symbol constituents
-  ;; Delimited comments are %{ }%, see 1234 below.
-  (set-twelf-syntax ?\ "    ")            ; whitespace
-  (set-twelf-syntax ?\t "    ")           ; whitespace
-  (set-twelf-syntax ?% "< 14")            ; comment begin
-  (set-twelf-syntax ?\n ">   ")           ; comment end
-  (set-twelf-syntax ?: ".   ")            ; punctuation
-  (set-twelf-syntax ?. ".   ")            ; punctuation
-  (set-twelf-syntax ?\( "()  ")           ; open delimiter
-  (set-twelf-syntax ?\) ")(  ")           ; close delimiter
-  (set-twelf-syntax ?\[ "(]  ")           ; open delimiter
-  (set-twelf-syntax ?\] ")[  ")           ; close delimiter
-  (set-twelf-syntax ?\{ "(}2 ")           ; open delimiter
-  (set-twelf-syntax ?\} "){ 3")           ; close delimiter
-  ;; Actually, strings are illegal but we include:
-  (set-twelf-syntax ?\" "\"   ")          ; string quote
-  ;; \ is not an escape, but a word constituent (see above)
-  ;;(set-twelf-syntax ?\\ "/   ")         ; escape
-  )
-
-(defconst *whitespace* " \t\n\f"
-  "Whitespace characters to be skipped by various operations.")
-
-(defconst *twelf-comment-start* (concat "%[%{" *whitespace* "]")
-  "Regular expression to match the start of a Twelf comment.")
-
-(defconst *twelf-id-chars* "a-z!&$^+/<=>?@~|#*`;,\\-\\\\A-Z_0-9'"
-  "Characters that constitute Twelf identifiers.")
-
-(defun skip-twelf-comments-and-whitespace ()
-  "Skip Twelf comments (single-line or balanced delimited) and white space."
-  (skip-chars-forward *whitespace*)
-  (while (looking-at *twelf-comment-start*)
-    (cond ((looking-at "%{")           ; delimited comment
-          (condition-case nil (forward-sexp 1)
-            (error (goto-char (point-max))))
-          (or (eobp) (forward-char 1)))
-         (t                            ; single-line comment
-          (end-of-line 1)))
-    (skip-chars-forward *whitespace*)))
-
-(defun twelf-end-of-par (&optional limit)
-  "Skip to presumed end of current Twelf declaration.
-Moves to next period or blank line (whichever comes first)
-and returns t if period is found, nil otherwise.
-Skips over comments (single-line or balanced delimited).
-Optional argument LIMIT specifies limit of search for period."
-  (if (not limit)
-      (save-excursion
-       (forward-paragraph 1)
-       (setq limit (point))))
-  (while (and (not (looking-at "\\."))
-             (< (point) limit))
-    (skip-chars-forward "^.%" limit)
-    (cond ((looking-at *twelf-comment-start*)
-          (skip-twelf-comments-and-whitespace))
-         ((looking-at "%")
-          (forward-char 1))))
-  (cond ((looking-at "\\.")
-        (forward-char 1)
-        t)
-       (t ;; stopped at limit
-        nil)))
-
-(defun twelf-current-decl ()
-  "Returns list (START END COMPLETE) for current Twelf declaration.
-This should be the declaration or query under or just before
-point within the nearest enclosing blank lines.
-If declaration ends in `.' then COMPLETE is t, otherwise nil."
-  (let (par-start par-end complete)
-    (save-excursion
-      ;; Skip backwards if between declarations
-      (if (or (eobp) (looking-at (concat "[" *whitespace* "]")))
-         (skip-chars-backward (concat *whitespace* ".")))
-      (setq par-end (point))
-      ;; Move forward from beginning of decl until last
-      ;; declaration before par-end is found.
-      (if (not (bobp)) (backward-paragraph 1))
-      (setq par-start (point))
-      (while (and (twelf-end-of-par par-end)
-                 (< (point) par-end))
-       (setq par-start (point)))
-      ;; Now par-start is at end of preceding declaration or query.
-      (goto-char par-start)
-      (skip-twelf-comments-and-whitespace)
-      (setq par-start (point))
-      ;; Skip to period or consective blank lines
-      (setq complete (twelf-end-of-par))
-      (setq par-end (point)))
-    (list par-start par-end complete)))
-
-(defun twelf-mark-decl ()
-  "Marks current Twelf declaration and moves point to its beginning."
-  (interactive)
-  (let* ((par (twelf-current-decl))
-        (par-start (nth 0 par))
-        (par-end (nth 1 par)))
-    (push-mark par-end)
-    (goto-char par-start)))
-
-(defun twelf-indent-decl ()
-  "Indent each line of the current Twelf declaration."
-  (interactive)
-  (let* ((par (twelf-current-decl))
-        (par-start (nth 0 par))
-        (par-end (nth 1 par)))
-    (goto-char par-start)
-    (twelf-indent-lines (count-lines par-start par-end))))
-
-(defun twelf-indent-region (from to)
-  "Indent each line of the region as Twelf code."
-  (interactive "r")
-  (cond ((< from to)
-        (goto-char from)
-        (twelf-indent-lines (count-lines from to)))
-       ((> from to)
-        (goto-char to)
-        (twelf-indent-lines (count-lines to from)))
-       (t nil)))
-
-(defun twelf-indent-lines (n)
-  "Indent N lines starting at point."
-  (interactive "p")
-  (while (> n 0)
-    (twelf-indent-line)
-    (forward-line 1)
-    (setq n (1- n))))
-
-(defun twelf-comment-indent ()
-  "Calculates the proper Twelf comment column.
-Currently does not deal specially with pragmas."
-  (cond ((looking-at "%%%")
-        0)
-       ((looking-at "%[%{]")
-        (car (twelf-calculate-indent)))
-       (t
-        (skip-chars-backward " \t")
-        (max (if (bolp) 0 (1+ (current-column))) comment-column))))
-
-(defun looked-at ()
-  "Returns the last string matched against.
-Beware of intervening, even unsuccessful matches."
-  (buffer-substring (match-beginning 0) (match-end 0)))
-
-(defun twelf-indent-line ()
-  "Indent current line as Twelf code.
-This recognizes comments, matching delimiters, and standard infix operators."
-  (interactive)
-  (let ((old-point (point)))
-    (beginning-of-line)
-    (let* ((indent-info (twelf-calculate-indent))
-          (indent-column (nth 0 indent-info))
-          (indent-type (nth 1 indent-info))
-          (indent-string (nth 2 indent-info)))
-      (skip-chars-forward " \t")        ; skip whitespace
-      (let ((fwdskip (- old-point (point))))
-       (cond ((looking-at "%%%")
-              (twelf-indent-line-to 0 fwdskip)) ; %%% comment at column 0
-             ((looking-at "%[%{]")     ; delimited or %% comment
-              (twelf-indent-line-to indent-column fwdskip))
-             ((looking-at *twelf-comment-start*)    ; indent single-line 
comment
-              (indent-for-comment)
-              (forward-char -1))
-             ((looking-at "%")         ; %keyword declaration
-              (twelf-indent-line-to indent-column fwdskip))
-             ((looking-at twelf-infix-regexp) ; looking at infix operator
-              (if (string= indent-string (looked-at))
-                  ;; indent string is the same as the one we are looking at
-                  (twelf-indent-line-to indent-column fwdskip)
-                (twelf-indent-line-to (+ indent-column twelf-indent) fwdskip)))
-             ((eq indent-type 'delimiter) ; indent after delimiter
-              (twelf-indent-line-to (+ indent-column twelf-indent) fwdskip))
-             ((eq indent-type 'limit)  ; no delimiter or infix found.
-              (twelf-indent-line-to indent-column fwdskip))
-             ((eq indent-type 'infix)
-              (twelf-indent-line-to (+ indent-column twelf-indent) 
fwdskip)))))))
-
-(defun twelf-indent-line-to (indent fwdskip)
-  "Indent current line to INDENT then skipping to FWDSKIP if positive.
-Assumes point is on the first non-whitespace character of the line."
-  (let ((text-start (point))
-       (shift-amount (- indent (current-column))))
-    (if (= shift-amount 0)
-       nil
-      (beginning-of-line)
-      (delete-region (point) text-start)
-      (indent-to indent))
-    (if (> fwdskip 0)
-       (forward-char fwdskip))))
-
-(defun twelf-calculate-indent ()
-  "Calculate the indentation and return a list (INDENT INDENT-TYPE STRING).
-INDENT is a natural number,
-INDENT-TYPE is 'DELIMITER, 'INFIX, or 'LIMIT, and
-STRING is the delimiter, infix operator, or the empty string, respectively."
-  (save-excursion
-    (let* ((par (twelf-current-decl))
-          (par-start (nth 0 par))
-          (par-end (nth 1 par))
-          (par-complete (nth 2 par))
-          (limit (cond ((> par-start (point)) (point))
-                       ((and (> (point) par-end) par-complete) par-end)
-                       (t par-start))))
-      (twelf-dsb limit))))
-
-(defun twelf-dsb (limit)
-  "Scan backwards from point to find opening delimiter or infix operator.
-This currently does not deal with comments or mis-matched delimiters.
-Argument LIMIT specifies bound for backwards search."
-  (let ((result nil)
-       (lparens 0) (lbraces 0) (lbrackets 0))
-    (while (not result)
-      (if (or (= lparens 1) (= lbraces 1) (= lbrackets 1))
-         (setq result (list (current-column) 'delimiter (looked-at)))
-       (if (re-search-backward (concat "[][{}()]\\|" twelf-infix-regexp)
-                               limit 'limit) ; return 'LIMIT if limit reached
-           (let ((found (looked-at)))
-             (cond
-              ((string= found "(") (setq lparens (1+ lparens)))
-              ((string= found ")") (setq lparens (1- lparens)))
-              ((string= found "{") (setq lbraces (1+ lbraces)))
-              ((string= found "}") (setq lbraces (1- lbraces)))
-              ((string= found "[") (setq lbrackets (1+ lbrackets)))
-              ((string= found "]") (setq lbrackets (1- lbrackets)))
-              (t;; otherwise, we are looking at an infix operator
-               (if (and (= lparens 0) (= lbraces 0) (= lbrackets 0))
-                   (setq result (list (current-column) 'infix found))
-                 nil))))               ; embedded - skip
-         (setq result (list 0 'limit ""))))) ; reached the limit, no indent
-    result))
-
-(defun twelf-mode-variables ()
-  "Set up local variables for Twelf mode."
-  (set-syntax-table twelf-mode-syntax-table)
-  ;; Paragraphs are separated by blank lines or ^L.
-  (make-local-variable 'paragraph-start)
-  (setq paragraph-start "^[ \t\f]*$")
-  (make-local-variable 'paragraph-separate)
-  (setq paragraph-separate paragraph-start)
-  (make-local-variable 'indent-line-function)
-  (setq indent-line-function 'twelf-indent-line)
-  (make-local-variable 'comment-start)
-  (setq comment-start "%")
-  (make-local-variable 'comment-start-skip)
-  (setq comment-start-skip "%+{?[ \t]*")
-  (make-local-variable 'comment-end)
-  (setq comment-end "")
-  (make-local-variable 'comment-column)
-  (setq comment-column 40)
-  ;; (make-local-variable 'parse-sexp-ignore-comments)
-  ;; (setq parse-sexp-ignore-comments t)
-  )
-
-(defun twelf-mode ()
-  "Major mode for editing Twelf code.
-Tab indents for Twelf code.
-Delete converts tabs to spaces as it moves back.
-M-C-q indents all lines in current Twelf declaration.
-
-Twelf mode also provides commands to maintain groups of Twelf source
-files (configurations) and communicate with an Twelf server which
-processes declarations.  It also supports quick jumps to the (presumed)
-source of error message that may arise during parsing or type-checking.
-
-Customisation: Entry to this mode runs the hooks on twelf-mode-hook.
-See also the hints for the .emacs file given below.
-
-Mode map
-========
-\\{twelf-mode-map}
-\\<twelf-mode-map>
-Overview
-========
-
-The basic architecture is that Emacs sends commands to an Twelf server
-which runs as an inferior process, usually in the buffer *twelf-server*.
-Emacs in turn interprets or displays the replies from the Twelf server.
-Since a typical Twelf application comprises several files, Emacs
-maintains a configuration in a file, usally called sources.cfg.  This
-file contains a list of files, each on a separate line, in dependency
-order.  The `%' character starts a comment line.  A configuration is
-established with the command \\[twelf-server-configure].
-
-A new file is switched to Twelf mode if a file has extension `.elf',
-`.quy', `.thm' or `.cfg' and the `auto-mode-alist' is set correctly (see
-init.el).
-
-The files in the current configuration can be checked in sequence with
-\\[twelf-save-check-config], the current file with
-\\[twelf-save-check-file], individual declarations with
-\\[twelf-check-declaration].  These, like many other commands, take an
-optional prefix arguments which means to display the Twelf server buffer
-after the processing of the configuration, file, or declaration.  If an
-error should arise during these or related operations a message is
-issued both in the server buffer and Emacs, and the command
-\\[twelf-next-error] visits the presumed source of the type error in a
-separate buffer.
-
-Summary of most common commands:
- M-x twelf-save-check-config \\[twelf-save-check-config]  save, check & load 
configuration
- M-x twelf-save-check-file   \\[twelf-save-check-file]  save, check & load 
current file
- M-x twelf-check-declaration \\[twelf-check-declaration]  type-check 
declaration at point
- M-x twelf-server-display    \\[twelf-server-display]  display Twelf server 
buffer
-
-It is important to remember that the commands to save and check
-a file or check a declaration may change the state of the global
-signature maintained in Twelf.  After a number of changes it is usually
-a good idea to return to a clean slate with \\[twelf-save-check-config].
-
-Individual Commands
-===================
-
-Configurations, Files and Declarations
-
-  twelf-save-check-config                   \\[twelf-save-check-config]
-   Save its modified buffers and then check the current Twelf configuration.
-   With prefix argument also displays Twelf server buffer.
-   If necessary, this will start up an Twelf server process.
-
-  twelf-save-check-file                     \\[twelf-save-check-file]
-   Save buffer and then check it by giving a command to the Twelf server.
-   With prefix argument also displays Twelf server buffer.
-
-  twelf-check-declaration                   \\[twelf-check-declaration]
-   Send the current declaration to the Twelf server process for checking.
-   With prefix argument, subsequently display Twelf server buffer.
-
-Subterm at Point
-
-  twelf-type-const                          \\[twelf-type-const]
-   Display the type of the constant before point.
-   Note that the type of the constant will be `absolute' rather than the
-   type of the particular instance of the constant.
-
-Error Tracking
-
-  twelf-next-error                          \\[twelf-next-error]
-   Find the next error by parsing the Twelf server or Twelf-SML buffer.
-
-  twelf-goto-error                          \\[twelf-goto-error]
-   Go to the error reported on the current line or below.
-
-Server State
-
-  twelf-set PARM VALUE                      \\[twelf-set]
-   Sets the Twelf server parameter PARM to VALUE.
-   Prompts for PARM when called interactively, using completion for legal
-   parameters.
-
-  twelf-get PARM                            \\[twelf-get]
-   Print the current value the Twelf server parameter PARM.
-
-  twelf-server-interrupt                    \\[twelf-server-interrupt]
-   Interrupt the Twelf server-process.
-
-  twelf-server                              \\[twelf-server]
-   Start a Twelf server process in a buffer named *twelf-server*.
-
-  twelf-server-configure                    \\[twelf-server-configure]
-   Set the current configuration of the Twelf server.
-
-  twelf-reset                               \\[twelf-reset]
-   Reset the global signature in the Twelf server process.
-
-  twelf-server-quit                         \\[twelf-server-quit]
-   Kill the Twelf server process.
-
-  twelf-server-restart                      \\[twelf-server-restart]
-   Restarts server and re-initializes configuration.
-   This is primarily useful during debugging of the Twelf server code or
-   if the Twelf server is hopelessly wedged.
-
-  twelf-server-send-command                 \\[twelf-server-send-command]
-   Send arbitrary string to Twelf server.
-
-Tags (for other, M-x apropos tags or see `etags' documentation)
-
-  twelf-tag                                 \\[twelf-tag]
-   Create tags file TAGS for current configuration.
-   If current configuration is names CONFIGx, tags file will be named TAGx.
-   Errors are displayed in the Twelf server buffer.
-
-Timers
-
-  twelf-timers-reset                       \\[twelf-timers-reset]
-   Reset Twelf timers.
-
-  twelf-timers-show                         \\[twelf-timers-show]
-   Show and reset Twelf timers.
-
-  twelf-timers-check                        \\[twelf-timers-check]
-   Show, but do not reset Twelf timers.
-
-Editing
-
-  twelf-indent-decl                         \\[twelf-indent-decl]
-   Indent each line in current declaration as Twelf code.
-
-  twelf-indent-region                       \\[twelf-indent-region]
-   Indent each line of the region as Twelf code.
-
-Minor Modes
-===========
-
-An associated minor modes is 2Twelf-SML (toggled with
-twelf-to-twelf-sml-mode).  This means that we assume communication
-is an inferior Twelf-SML process and not a Twelf server.
-
-Related Major Modes
-===================
-
-Related major modes are Twelf Server (for the Twelf server buffer) and
-Twelf-SML (for an inferior Twelf-SML process).  Both modes are based on
-the standard Emacs comint package and inherit keybindings for retrieving
-preceding input.
-
-Customization
-=============
-
-The following variables may be of general utility.
-
- twelf-indent          amount of indentation for nested Twelf expressions
- twelf-mode-hook       hook to run when entering Twelf mode
- twelf-server-program  full pathname of Twelf server program
- twelf-server-mode-hook  hook to run when entering Twelf server mode
- twelf-info-file       name of Twelf info file with documentation
-
-The following is a typical section of a .emacs initialization file
-which can be found in the file init.el.
-
-(setq load-path (cons \"/afs/cs/project/twelf/research/twelf/emacs\" 
load-path))
-
-(autoload 'twelf-mode \"twelf\" \"Major mode for editing Twelf source.\" t)
-(autoload 'twelf-server \"twelf\" \"Run an inferior Twelf server.\" t)
-(autoload 'twelf-sml \"twelf\" \"Run an inferior Twelf-SML process.\" t)
-
-(setq auto-mode-alist
-      (cons '(\"\\.elf$\" . twelf-mode)
-           (cons '(\"\\.quy$\" . twelf-mode)
-                 (cons '(\"\\.thm$\" . twelf-mode)
-                       (cons '(\"\\.cfg$\" . twelf-mode)
-                             auto-mode-alist)))))
-
-(setq twelf-server-program
-      \"/afs/cs/project/twelf/research/twelf/bin/twelf-server\")
-
-(setq twelf-sml-program
-      \"/afs/cs/project/twelf/misc/smlnj/bin/sml-cm\")
-
-(setq twelf-info-file
-      \"/afs/cs/project/twelf/research/twelf/doc/info/twelf.info\")
-"
-  (interactive)
-  (kill-all-local-variables)
-  (twelf-mode-variables)
-  (use-local-map twelf-mode-map)
-  (setq major-mode 'twelf-mode)
-  (setq mode-name "Twelf")
-  (twelf-config-mode-check)
-  (twelf-add-menu)                     ; add Twelf menu to menubar
-  ;; disable twelf-add-to-config-check: require explicit add-file
-  ;; (twelf-add-to-config-check)
-  (run-hooks 'twelf-mode-hook))
-
-;;;----------------------------------------------------------------------
-;;; Reading info file
-;;;----------------------------------------------------------------------
-
-(defun twelf-info (&optional file)
-  "Enter Info, starting with the Twelf node
-Optional argument FILE specifies the info file.
-
-In interactive use, a prefix arguments directs this command to
-read a file name from the minibuffer."
-  (interactive (if current-prefix-arg
-                  (list (read-file-name "Info file name: " nil nil t))))
-  (info (or file twelf-info-file)))
-
-;;;----------------------------------------------------------------------
-;;; Error message parsing
-;;;----------------------------------------------------------------------
-
-(defconst twelf-error-regexp
-  "^.+:[-0-9.:]+.* \\(Error\\|Warning\\):"
-  "Regexp for matching Twelf error.")
-
-(defconst twelf-error-fields-regexp
-   "^[-=? \t]*\\(.+\\):\
-\\([0-9]+\\)\\(\\.\\([0-9]+\\)\\)?\\(-\\([0-9]+\\)\\(\\.\\([0-9]+\\)\\)?\\)?\
-.+\\(Error\\|Warning\\):"
-   "Regexp to extract fields of Twelf error.")
-
-(defconst twelf-error-decl-regexp
-  "^[-=? \t]*\\(.+\\)::\\([^ \t\n]+\\) "
-  "Regexp to extract filename and identifier from declaration error.")
-
-(defun looked-at-nth (n)
-  (let ((b (match-beginning n))
-       (e (match-end n)))
-    (if (or (null b) (null e)) nil
-      (buffer-substring (match-beginning n) (match-end n)))))
-
-(defun looked-at-nth-int (n)
-  (let ((str (looked-at-nth n)))
-    (if (null str) nil
-      (string-to-number str))))
-
-(defun twelf-error-parser (pt)
-  "Standard parser for Twelf errors.
-Returns a 5-element list (FILE START-LINE START-COL END-LINE END-COL)
-or (\"Local\" START-CHAR NIL END-CHAR NIL)."
-  (save-excursion
-    (goto-char pt)
-    (re-search-forward twelf-error-fields-regexp)
-    (list (looked-at-nth 1)            ; file or "Local" or "stdIn"
-         (looked-at-nth-int 2)         ; start line or char
-         (looked-at-nth-int 4)         ; start column, if given, else nil
-         (looked-at-nth-int 6)         ; end line, if given, else nil or char
-         (looked-at-nth-int 8)         ; end column, if given, else nil
-         )))
-
-(defun twelf-error-decl (pos)
-  "Determines if the error is identified only by its declaration."
-  (save-excursion
-    (goto-char pos)
-    (looking-at twelf-error-decl-regexp)))
-
-(defun twelf-mark-relative (line0 col0 line1 col1)
-  "Mark error region if location is given relative to a buffer position."
-  (if (not (= line0 1))
-      (forward-line (1- line0)))
-  ;; work around bug: from stdIn, first line is off by one.
-  (forward-char (if (not (= line0 1)) (1- col0) (1- (1- col0))))
-  ;; select region, if non-empty
-  (cond ((not (null line1))
-        (push-mark (point))
-        (cond ((not (= line1 line0))
-               (forward-line (- line1 line0))
-               (forward-char (1- col1)))
-              (t (forward-char (- col1 col0))))
-        (exchange-point-and-mark)
-        (funcall twelf-highlight-range-function (point) (mark)))))
-
-(defun twelf-mark-absolute (line0 col0 line1 col1)
-  "Mark error region if location is given as absolute buffer position."
-  (cond ((and line0 col0 line1 col1)   ; line0.col0-line1.col1 range
-        (goto-line line0)
-        ;; don't use move-to-column since <tab> is 1 char to lexer
-        (forward-char (1- col0))
-        ;; select region, if non-empty
-        (push-mark (point))
-        (goto-line line1)
-        (forward-char (1- col1))
-        (exchange-point-and-mark)
-        (funcall twelf-highlight-range-function (point) (mark)))
-       ((and (null col0) (null col1))  ; char0-char1 range
-        (goto-char line0)
-        (push-mark (point))
-        (goto-char line1)
-        (exchange-point-and-mark)
-        (funcall twelf-highlight-range-function (point) (mark)))
-       ((and line0 col0)               ; beginning line0.col0
-        (goto-line line0)
-        (forward-char (1- col0)))
-       (line0                          ; beginning char0
-        (goto-char line0))
-       (t (error "Unrecognized format for error location"))))
-
-(defun twelf-find-decl (filename id)
-  "In FILENAME find probable declaration of ID."
-  (if (not (file-readable-p filename))
-      (error "Cannot read file %s" filename)
-    (switch-to-buffer-other-window (find-file-noselect filename))
-    (goto-char (point-min))
-    (let ((done nil)
-         decl-id)
-      (while (not done)
-       (setq decl-id (twelf-next-decl filename *twelf-last-input-buffer*))
-       (if (not decl-id)
-           (error "Declaration of %s not found in file %s." id filename)
-         (setq done (string= decl-id id))
-         (if (not done) (twelf-end-of-par)))))))
-
-(defun twelf-next-error ()
-  "Find the next error by parsing the Twelf server or Twelf-SML buffer.
-Move the error message on the top line of the window;
-put the cursor at the beginning of the error source. If the
-error message specifies a range, the mark is placed at the end."
-  (interactive)
-  (let ((case-fold-search nil)
-       (twelf-buffer (or *twelf-last-input-buffer*
-                       (error "Cannot determine process buffer with last 
input")))
-       error-begin)
-    (pop-to-buffer twelf-buffer)
-    (goto-char *twelf-error-pos*)   ; go to last error
-    (if (not (re-search-forward twelf-error-regexp (point-max) t))
-       (error "No error message found.")
-      (setq error-begin (match-beginning 0))
-      (setq *twelf-error-pos* (point))
-      (set-window-start (get-buffer-window twelf-buffer)
-                       (save-excursion (beginning-of-line) (point)))
-      (if (twelf-error-decl error-begin)
-         (twelf-find-decl (looked-at-nth 1) (looked-at-nth 2))
-       (let* ((parse (twelf-error-parser error-begin))
-              (file (nth 0 parse))
-              (line0 (nth 1 parse))
-              (col0 (nth 2 parse))
-              (line1 (nth 3 parse))
-              (col1 (nth 4 parse)))
-         (cond ((equal file "stdIn")
-                ;; Error came from direct input
-                (cond ((null *twelf-last-region-sent*)
-                       ;; from last interactive input in the Twelf buffer
-                       (goto-char (point-max))
-                       (comint-previous-input 1)
-                       (setq *twelf-last-region-sent* t)
-                       (goto-char (process-mark
-                                   (get-buffer-process twelf-buffer)))
-                       (twelf-mark-relative line0 col0 line1 col1))
-                      ((eq *twelf-last-region-sent* t)
-                       ;; from the waiting input in the Twelf buffer
-                       (goto-char (process-mark
-                                   (get-buffer-process twelf-buffer)))
-                       (twelf-mark-relative line0 col0 line1 col1))
-                      (t
-                       ;; from a region sent from some buffer
-                       (let ((buf (nth 0 *twelf-last-region-sent*))
-                             (start (nth 1 *twelf-last-region-sent*)))
-                         (switch-to-buffer-other-window buf)
-                         (goto-char start)
-                         (twelf-mark-relative line0 col0 line1 col1)))))
-               ((equal file "Local")
-                ;; Error came from local input, usually to a server process
-                ;; in this case the address relative, and expressed in
-                ;; characters, rather than lines.
-                (let ((local-buffer (nth 0 *twelf-last-region-sent*))
-                      ;; Local characters seem to be off by two
-                      (char0 (+ (nth 1 *twelf-last-region-sent*) (- line0 2)))
-                      (char1 (+ (nth 1 *twelf-last-region-sent*) (- line1 2))))
-                  (switch-to-buffer-other-window local-buffer)
-                  (goto-char char1)
-                  (push-mark)
-                  (goto-char char0)
-                  (exchange-point-and-mark)))
-               ((file-readable-p file)
-                ;; Error came from a source file
-                (switch-to-buffer-other-window (find-file-noselect file))
-                (twelf-mark-absolute line0 col0 line1 col1))
-               (t
-                (error (concat "Can't read file " file)))))))))
-
-(defun twelf-goto-error ()
-  "Go to the error reported on the current line or below.
-Also updates the error cursor to the current line."
-  (interactive)
-  (pop-to-buffer (or *twelf-last-input-buffer*
-                    (error "Cannot determine process buffer with last input")))
-  (beginning-of-line)
-  (setq *twelf-error-pos* (point))
-  (twelf-next-error))
-
-;;;----------------------------------------------------------------------
-;;; NT Emacs bug workaround
-;;;----------------------------------------------------------------------
-
-(defun twelf-convert-standard-filename (filename)
-  "Convert FILENAME to form appropriate for Twelf Server of current OS."
-  (cond ((eq system-type 'windows-nt)
-        (while (string-match "/" filename)
-          (setq filename (replace-match "\\" t t filename)))
-        filename)
-       (t (convert-standard-filename filename))))
-
-;;;----------------------------------------------------------------------
-;;; Communication with Twelf server
-;;;----------------------------------------------------------------------
-
-(defun string-member (x l)
-  (if (null l) nil
-    (or (string-equal x (car l)) (string-member x (cdr l)))))
-
-;(defun twelf-add-to-config-check ()
-;  "Ask if current file should be added to the current Twelf configuration."
-;  (let ((file-name (buffer-file-name)))
-;    (if (and (not (string-member file-name *twelf-config-list*))
-;             (not (null *twelf-config-buffer*))
-;             (yes-or-no-p "Add to the current configuration? "))
-;        (twelf-server-add-file file-name))))
-
-(defun twelf-config-proceed-p (file-name)
-  "Ask if to proceed if FILE-NAME is not in current configuration."
-  (if (and (not (string-member file-name *twelf-config-list*))
-          (not (yes-or-no-p "File not in current configuration.  Save? ")))
-      nil
-    t))
-
-(defun twelf-save-if-config (buffer)
-  "Ask if BUFFER should be saved if in the current configuration.
-Always save if the variable `twelf-save-silently' is non-nil."
-  (let ((file-name (buffer-file-name buffer)))
-    (if (and (buffer-modified-p buffer)
-            file-name
-            (string-member file-name *twelf-config-list*))
-       (if twelf-save-silently
-           (save-buffer)
-         (pop-to-buffer buffer)
-         (if (yes-or-no-p (concat "Save " file-name "? "))
-             (save-buffer))))))
-
-(defun twelf-config-save-some-buffers ()
-  "Cycle through all buffers and save those in the current configuration."
-  (mapcar 'twelf-save-if-config (buffer-list)))
-
-(defun twelf-save-check-config (&optional displayp)
-  "Save its modified buffers and then check the current Twelf configuration.
-With prefix argument also displays Twelf server buffer.
-If necessary, this will start up an Twelf server process."
-  (interactive "P")
-  (let ((current-file-name (buffer-file-name)))
-    (cond ((and current-file-name
-               (not buffer-read-only)
-               (buffer-modified-p)
-               (twelf-config-proceed-p current-file-name))
-          (save-buffer)))
-    (save-excursion
-      (twelf-config-save-some-buffers))
-    (twelf-check-config displayp)))
-
-(defun twelf-check-config (&optional displayp)
-  "Check the current Twelf configuration.
-With prefix argument also displays Twelf server buffer.
-If necessary, this will start up an Twelf server process."
-  (interactive "P")
-  (if (not *twelf-config-buffer*)
-      (call-interactively 'twelf-server-configure))
-  (twelf-server-sync-config)
-  (twelf-focus nil nil)
-  (twelf-server-send-command "Config.load")
-  (twelf-server-wait displayp))
-
-(defun twelf-save-check-file (&optional displayp)
-  "Save buffer and then check it by giving a command to the Twelf server.
-In Twelf Config minor mode, it reconfigures the server.
-With prefix argument also displays Twelf server buffer."
-  (interactive "P")
-  (save-buffer)
-  (if twelf-config-mode
-      (twelf-server-configure (buffer-file-name) "Server OK: Reconfigured")
-    (let* ((save-file (buffer-file-name))
-          (check-file (file-relative-name save-file (twelf-config-directory)))
-          (check-file-os (twelf-convert-standard-filename check-file)))
-      (twelf-server-sync-config)
-      (twelf-focus nil nil)
-      (twelf-server-send-command (concat "loadFile " check-file-os))
-      (twelf-server-wait displayp))))
-
-(defun twelf-buffer-substring (start end)
-  "The substring of the current buffer between START and END.
-The location is recorded for purposes of error parsing."
-  (setq *twelf-last-region-sent* (list (current-buffer) start end))
-  (buffer-substring start end))
-
-(defun twelf-buffer-substring-dot (start end)
-  "The substring of the current buffer between START and END plus
-an end-of-input marker, `%.'.  The location of the input is recorded
-for purposes of error parsing."
-  (concat (twelf-buffer-substring start end) "%."))
-
-(defun twelf-check-declaration (&optional displayp)
-  "Send the current declaration to the Twelf server process for checking.
-With prefix argument also displays Twelf server buffer."
-  (interactive "P")
-  (let* ((par (twelf-current-decl))
-        (par-start (nth 0 par))
-        (par-end (nth 1 par))
-        (decl (twelf-buffer-substring-dot par-start par-end)))
-    (twelf-focus par-start par-end)
-    (twelf-server-send-command (concat "readDecl\n" decl))
-    (twelf-server-wait displayp)))
-
-;(defun twelf-highlight-range (par-start par-end &optional offset)
-;  "Set point and mark to encompass the range analyzed by the Twelf server."
-;  (let* ((range (twelf-parse-range))
-;         (range-start (nth 0 range))
-;         (range-end (nth 1 range))
-;         (offset (if (null offset) 0 offset)))
-;    (if (and (integerp range-start) (integerp range-end))
-;        (progn (goto-char (+ (- (+ par-start range-end) 2) offset))
-;               (push-mark (- (+ par-start range-start) 2))
-;             (funcall twelf-highlight-range-function (point) (mark))))))
-
-(defun twelf-highlight-range-zmacs (start end)
-  "Highlight range as zmacs region.  Assumes point and mark are set.
-Does nothing if function zmacs-activate-region is undefined."
-  (if (fboundp 'zmacs-activate-region)
-      (zmacs-activate-region)))
-
-(defun twelf-focus (&optional start end)
-  "Focus on region between START and END as current declaration or query.  If
-START and END are nil, then no focus exists.  This intermediary just calls
-the appropriate function."
-  (funcall twelf-focus-function start end))
-
-(defun twelf-focus-noop (start end)
-  "This default focus function does nothing."
-  ())
-
-;; Not yet available in Twelf 1.2 -fp
-
-;(defun twelf-type-at-point ()
-;  "Display the type of the subterm at the point in the current Twelf decl.
-
-;The subterm at point is the smallest subterm whose printed representation
-;begins to the left of point and extends up to or beyond point.  After this and
-;similar commands applicable to subterms, the current region (between mark and
-;point) is set to encompass precisely the selected subterm.  In XEmacs,
-;it will thus be highlighted under many circumstances.  In other versions
-;of Emacs \\[exchange-point-and-mark] will indicate the extent of the region.
-
-;The type computed for the subterm at point takes contextual information into
-;account.  For example, if the subterm at point is a constant with implicit
-;arguments, the type displayed will be the instance of the constant (unlike
-;M-x twelf-type-const (\\[twelf-type-const]), which yields the absolute type 
of a constant)."
-
-;  (interactive)
-;  (let* ((par (twelf-current-decl))
-;         (par-start (nth 0 par))
-;         (par-end (nth 1 par))
-;         (decl (twelf-buffer-substring-dot par-start par-end)))
-;    (twelf-focus par-start par-end)
-;    (twelf-server-send-command
-;     (concat "type-at "
-;             (twelf-current-syncat) " "
-;             (int-to-string (+ (- (point) par-start) 2)) "\n"
-;             decl))
-;    (twelf-server-wait t)
-;    (twelf-highlight-range par-start par-end)))
-
-;(defun twelf-expected-type-at-point ()
-;  "Display the type expected at the point in the current declaration.
-
-;This replaces the subterm at point by an underscore _ and determines
-;the type that _ would have to have for the whole declaration to be valid.
-;This is useful for debugging in places where inconsistent type constraints
-;have arisen.  Error messages may be given, but will not be correctly
-;interpreted by Emacs, since the string sent to the server may be different
-;from the declaration in the buffer.
-
-;For a definition of the subterm at point, see function twelf-type-at-point."
-;  (interactive)
-;  (let* ((par (twelf-current-decl))
-;         (par-start (nth 0 par))
-;         (par-end (nth 1 par))
-;         (par-initial-end nil)
-;         (par-final-start nil)
-;         modified-decl)
-;    ;; (exp-present (not (looking-at (concat "[" *whitespace* "]"))))
-;    (backward-sexp 1)
-;    (setq par-initial-end (point))
-;    (forward-sexp 1)
-;    (setq par-final-start (point))
-;    (setq modified-decl
-;          (concat (twelf-buffer-substring par-start par-initial-end)
-;                  "_" (twelf-buffer-substring-dot par-final-start par-end)))
-;    ;; Error messages here are not accurate.  Nontheless:
-;    (setq *twelf-last-region-sent* (list (current-buffer) par-start par-end))
-;    (twelf-focus par-start par-end)
-;    (twelf-server-send-command
-;     (concat "type-at "
-;             (twelf-current-syncat) " "
-;             (int-to-string (1+ (+ (- par-initial-end par-start) 2))) "\n"
-;             modified-decl))
-;    (twelf-server-wait t)
-;    (twelf-highlight-range par-start par-end
-;                       (1- (- par-final-start par-initial-end)))))
-
-;(defun twelf-parse-range ()
-;  "Parse a range as returned by the Twelf server and return as a list."
-;  (save-window-excursion
-;    (let ((twelf-server-buffer (twelf-get-server-buffer)))
-;      (set-buffer twelf-server-buffer)
-;      (goto-char *twelf-server-last-process-mark*)
-;      ;; We are now at the beginning of the output
-;      (re-search-forward "^\\[\\([0-9]+\\),\\([0-9]+\\))")
-;      (list (looked-at-nth-int 1) (looked-at-nth-int 2)))))
-
-(defun twelf-type-const ()
-  "Display the type of the constant before point.
-Note that the type of the constant will be `absolute' rather than the
-type of the particular instance of the constant."
-  (interactive)
-  (let ((previous-point (point)))
-    (skip-chars-backward *whitespace* (point-min))
-    (skip-chars-forward *twelf-id-chars* (point-max))
-    (let ((end-of-id (point)))
-      (skip-chars-backward *twelf-id-chars* (point-min))
-      (let ((c (if (= (point) end-of-id)
-                  ;; we didn't move.  this should eventually become a
-                  ;; completing-read
-                  (read-string "Constant: ")
-                (buffer-substring (point) end-of-id))))
-       (twelf-server-send-command (concat "decl " c))
-       (twelf-server-wait t)             ; Wait for and display reply
-       (goto-char previous-point)))))
-
-;; Unused? -fp
-;(defun twelf-backwards-parse-arglist ()
-;  "Parse an argument list template as returned by the server."
-;  (save-window-excursion
-;    (let ((twelf-server-buffer (twelf-get-server-buffer)))
-;      (set-buffer twelf-server-buffer)
-;      (goto-char *twelf-server-last-process-mark*)
-;      ;; Should be right at the beginning of the output.
-;      ;; (re-search-forward "^arglist") ;
-;      ;; (beginning-of-line 2)
-;      (let ((arglist-begin (point)))
-;        (skip-chars-forward "^." (point-max))
-;        (buffer-substring arglist-begin (point))))))
-
-;; Not yet ported to Twelf 1.2
-;(defun twelf-show-region-in-window (start end)
-;  "Change window parameters so it precisely shows the given region."
-;  (enlarge-window (- (max (count-lines start end) window-min-height)
-;                     (window-height)))
-;  (set-window-start (selected-window) start))
-
-;(defun twelf-show-menu ()
-;  "Display the Twelf server buffer to show menu of possible completions."
-;  (let ((old-buffer (current-buffer))
-;        (twelf-server-buffer (twelf-get-server-buffer))
-;        region-start region-end)
-;    (switch-to-buffer-other-window twelf-server-buffer)
-;    (goto-char *twelf-server-last-process-mark*)
-;    (if (re-search-forward "-\\.$" (point-max) t)
-;        (progn
-;          (forward-char 1)
-;          (setq region-start (point))
-;          (if (re-search-forward "^-\\." (point-max) t)
-;              (setq region-end (point))
-;            (error "List of alternatives not terminated by -.")))
-;      (error "No alternatives found."))
-;    (twelf-show-region-in-window region-start region-end)
-;    (switch-to-buffer-other-window old-buffer)))
-
-;(defun twelf-completions-at-point ()
-;  "List the possible completions of the term at point based on type 
information.
-
-;The possible completions are numbered, and the function twelf-complete
-;(\\[twelf-complete]) can be used subsequently to replace the term at point 
with
-;one of the alternatives.
-
-;Above the display of the alternatives, the type of the subterm at
-;point is shown, since it is this type which is the basis for listing
-;the possible completions.
-
-;In the list alternatives, a variable X free in the remaining declaration
-;is printed ^X, and a bound variable x may be printed as !x.  These marks
-;are intended to aid in the understanding of the alternatives, but
-;must be removed in case the alternative is copied literally into the
-;input declaration (as, for example, with the \\[twelf-complete] command)."
-;  (interactive)
-;  (let* ((par (twelf-current-decl))
-;         (par-start (nth 0 par))
-;         (par-end (nth 1 par))
-;         (decl (twelf-buffer-substring-dot par-start par-end)))
-;    (twelf-focus par-start par-end)
-;    (twelf-server-send-command
-;     (concat "complete-at "
-;             (twelf-current-syncat) " "
-;             (int-to-string (+ (- (point) par-start) 2)) "\n"
-;             decl))
-;    (twelf-server-wait nil)
-;    (twelf-highlight-range par-start par-end)
-;    (twelf-show-menu)))
-
-;(defun twelf-complete (n)
-;  "Pick the alternative N from among possible completions.
-;This replaces the current region with the given pattern.
-;The list of completions must be generated with the command
-;twelf-completions-at-point (\\[twelf-completions-at-point])."
-;  (interactive "NAlternative: ")
-;  (let (start completion)
-;    (save-excursion
-;      (set-buffer (twelf-get-server-buffer))
-;      (goto-char *twelf-server-last-process-mark*)
-;      (if (not (re-search-forward (concat "^" (int-to-string n) "\\. ")
-;                                  (point-max) t))
-;          (error "No alternative %d found in Twelf server buffer." n))
-;      (setq start (point))
-;      (if (not (search-forward " ::" (point-max) t))
-;          (error "List of completions not well-formed."))
-;      (backward-char 3)
-;      (setq completion (buffer-substring start (point))))
-;    (delete-region (point) (mark))
-;    (insert "(" completion ")")
-;    (twelf-show-menu)))
-
-;;;----------------------------------------------------------------------
-;;; Twelf server mode (major mode)
-;;; This is for the buffer with the Twelf server process, to facilitate
-;;; direct interaction (which should rarely be necessary)
-;;;----------------------------------------------------------------------
-
-(defvar twelf-server-mode-map nil
-  "The keymap used in twelf-server mode.")
-
-(cond ((not twelf-server-mode-map)
-       (setq twelf-server-mode-map (copy-keymap comint-mode-map))
-       (install-basic-twelf-keybindings twelf-server-mode-map)
-       ;; C-c C-c is bound to twelf-save-check config in Twelf mode
-       (define-key twelf-server-mode-map "\C-c\C-c" 'twelf-save-check-config)
-       ;; Bind the function shadowed by the previous definition to C-c C-i
-       (define-key twelf-server-mode-map "\C-c\C-i" 'comint-interrupt-subjob)
-       ))
-
-(defconst twelf-server-cd-regexp "^\\s *OS\\.chDir\\s *\\(.*\\)"
-  "Regular expression used to match cd commands in Twelf server buffer.")
-
-(defun looked-at-string (string n)
-  "Substring of STRING consisting of Nth match."
-  (substring string (match-beginning n) (match-end n)))
-
-(defun twelf-server-directory-tracker (input)
-  "Checks input for cd commands and changes default directory in buffer.
-As a side effect, it resets *twelf-error-pos* and *twelf-last-region-sent*
-to indicate interactive input.  Used as comint-input-filter-function in Twelf
-server buffer."
-  (if (twelf-input-filter input)
-      (setq *twelf-last-region-sent* nil))
-  (setq *twelf-last-input-buffer* (current-buffer))
-  (setq *twelf-error-pos* (marker-position (process-mark 
(twelf-server-process))))
-  (cond ((string-match twelf-server-cd-regexp input)
-        (let ((expanded-dir (expand-dir (looked-at-string input 1))))
-          (setq default-directory expanded-dir)
-          (pwd)))
-       ((string-match "^set\\s +chatter\\s +\\([0-9]\\)+" input)
-        (setq twelf-chatter (string-to-number (looked-at-string input 1))))
-       ;;((string-match "^set\\s +trace\\s +\\([0-9]\\)+" input)
-       ;; (setq twelf-trace (string-to-number (looked-at-string input 1))))
-       ((string-match "^set\\s-+\\(\\S-+\\)\\s-+\\(\\w+\\)" input)
-        (if (assoc (looked-at-string input 1) *twelf-track-parms*)
-            (set (cdr (assoc (looked-at-string input 1) *twelf-track-parms*))
-                 (looked-at-string input 2))))))
-
-(defun twelf-input-filter (input)
-  "Function to filter strings before they are saved in input history.
-We filter out all whitespace and anything shorter than two characters."
-  (and (not (string-match "\\`\\s *\\'" input))
-       (> (length input) 1)))
-
-(defun twelf-server-mode ()
-  "Major mode for interacting with an inferior Twelf server process.
-Runs twelf-server-mode-hook.
-
-The following commands are available:
-\\{twelf-server-mode-map}"
-  (interactive)
-  (kill-all-local-variables)
-  ;; Initialize comint parameters
-  (comint-mode)
-  (setq comint-prompt-regexp "^") ;; no prompt
-  (setq comint-input-filter 'twelf-input-filter)
-  ;;changed for XEmacs 19.16
-  ;;(setq comint-input-sentinel 'twelf-server-directory-tracker)
-  (add-hook 'comint-input-filter-functions 'twelf-server-directory-tracker
-           nil t)
-  (twelf-mode-variables)
-  ;; For sequencing through error messages:
-  (make-local-variable '*twelf-error-pos*)
-  (setq *twelf-error-pos* (point-max))
-  ;; Set mode and keymap
-  (setq major-mode 'twelf-server-mode)
-  (setq mode-name "Twelf Server")
-  (setq mode-line-process '(": %s"))
-  (use-local-map twelf-server-mode-map)
-  (twelf-server-add-menu)              ; add Twelf Server menu
-  ;; Run user specified hooks, if any
-  (run-hooks 'twelf-server-mode-hook))
-
-;;;----------------------------------------------------------------------
-;;; Functions to support use of the Twelf server
-;;;----------------------------------------------------------------------
-
-(defun twelf-parse-config ()
-  "Starting at point, parse a configuration file."
-  (let ((filelist nil))
-    (skip-chars-forward *whitespace*)
-    (while (not (eobp))                 ; end of buffer?
-      (cond ((looking-at "%")           ; comment through end of line
-            (end-of-line))
-           (t (let ((begin-point (point))) ; parse filename starting at point
-                (skip-chars-forward (concat "^" *whitespace*))
-                (let* ((file-name (buffer-substring begin-point (point)))
-                       (absolute-file-name
-                        (expand-file-name file-name default-directory)))
-                  (if (file-readable-p absolute-file-name)
-                      (setq filelist (cons absolute-file-name filelist))
-                    (error "File %s not readable." file-name))))))
-      (skip-chars-forward *whitespace*))
-    filelist))
-
-(defun twelf-server-read-config ()
-  "Read the configuration and initialize *twelf-config-list*."
-  (if (or (not (bufferp *twelf-config-buffer*))
-         (null (buffer-name *twelf-config-buffer*)))
-      (error "No current configuration buffer"))
-  (set-buffer *twelf-config-buffer*)
-  (goto-char (point-min))
-  (twelf-parse-config))
-
-(defun twelf-server-sync-config ()
-  "Synchronize the configuration file, buffer, and Twelf server."
-  (if (or (not (bufferp *twelf-config-buffer*))
-         (null (buffer-name *twelf-config-buffer*)))
-      (error "No current configuration buffer"))
-  (if (and twelf-config-mode
-          (not (equal *twelf-config-buffer* (current-buffer)))
-          (yes-or-no-p "Buffer is different from current configuration, 
reconfigure server? "))
-      (twelf-server-configure (buffer-file-name (current-buffer))
-                             "Server OK: Reconfigured"))
-  (save-excursion
-    (set-buffer *twelf-config-buffer*)
-    (if (buffer-modified-p *twelf-config-buffer*)
-       (progn
-         (display-buffer *twelf-config-buffer*)
-         (if (yes-or-no-p "Config buffer has changed, save new version? ")
-             (save-buffer)
-           (message "Checking old configuration"))))
-    (if (not (verify-visited-file-modtime *twelf-config-buffer*))
-       (if (yes-or-no-p "Config file has changed, read new contents? ")
-           (revert-buffer t t)))
-    (if (not (equal (visited-file-modtime) *twelf-config-time*))
-       (progn
-         (display-buffer *twelf-config-buffer*)
-         (if (yes-or-no-p "Config file has changed, reconfigure server? ")
-             (twelf-server-configure (buffer-file-name *twelf-config-buffer*)
-                                   "Server OK: Configured")
-           (if (not (yes-or-no-p "Ask next time? "))
-               (setq *twelf-config-time* (visited-file-modtime))))))))
-
-(defun twelf-get-server-buffer (&optional createp)
-  "Get the current Twelf server buffer.
-Optional argument CREATEP indicates if the buffer should be
-created if it doesn't exist."
-  (if (and (bufferp *twelf-server-buffer*)
-          (not (null (buffer-name *twelf-server-buffer*))))
-      *twelf-server-buffer*
-    (if createp
-       (let ((twelf-server-buffer
-              (get-buffer-create *twelf-server-buffer-name*)))
-         (save-window-excursion
-           (set-buffer twelf-server-buffer)
-           (twelf-server-mode)
-           (setq *twelf-server-buffer* twelf-server-buffer))
-         twelf-server-buffer)
-      (error "No Twelf server buffer"))))
-
-(defun twelf-init-variables ()
-  "Initialize variables that track Twelf server state."
-  (setq twelf-chatter 3)
-  ;;(setq twelf-trace 0)
-  (setq twelf-double-check "false")
-  (setq twelf-print-implicit "false"))
-
-(defun twelf-server (&optional program)
-  "Start an Twelf server process in a buffer named *twelf-server*.
-Any previously existing process is deleted after confirmation.
-Optional argument PROGRAM defaults to the value of the variable
-twelf-server-program.
-This locally re-binds `twelf-server-timeout' to 15 secs."
-  (interactive)
-  (let* ((default-program (if (null program) twelf-server-program program))
-        (default-dir (file-name-directory default-program))
-        (program (expand-file-name
-                  (if (null program)
-                      (read-file-name (concat "Twelf server: (default "
-                                              (file-name-nondirectory
-                                               default-program)
-                                              ") ")
-                                      default-dir
-                                      default-program
-                                      t)
-                    program)))
-        ;; longer timeout during startup
-        (twelf-server-timeout 15))
-    ;; We save the program name as the default for the next time a server is
-    ;; started in this session.
-    (setq twelf-server-program program))
-  (save-window-excursion
-    (let* ((twelf-server-buffer (twelf-get-server-buffer t))
-          (twelf-server-process (get-buffer-process twelf-server-buffer)))
-      (set-buffer twelf-server-buffer)
-      (if (not (null twelf-server-process))
-         (if (yes-or-no-p "Kill current server process? ")
-             (delete-process twelf-server-process)
-           (error "Twelf Server restart aborted")))
-      (goto-char (point-max))
-      (setq *twelf-server-last-process-mark* (point))
-      ;; initialize variables
-      (twelf-init-variables)
-      (start-process *twelf-server-process-name*
-                    twelf-server-buffer
-                    twelf-server-program)
-      (twelf-server-wait)
-      (twelf-server-process))))
-
-(defun twelf-server-process (&optional buffer)
-  "Return the twelf server process, starting one if none exists."
-  (let* ((twelf-server-buffer (if (null buffer) (twelf-get-server-buffer t)
-                             buffer))
-        (twelf-server-process (get-buffer-process twelf-server-buffer)))
-      (if (not (null twelf-server-process))
-         twelf-server-process
-         (twelf-server))))
-
-(defun twelf-server-display (&optional selectp)
-  "Display Twelf server buffer, moving to the end of output.
-With prefix argument also selects the Twelf server buffer."
-  (interactive "P")
-  (display-server-buffer)
-  (if selectp (pop-to-buffer (twelf-get-server-buffer))))
-
-(defun display-server-buffer (&optional buffer)
-  "Display the Twelf server buffer so that the end of output is visible."
-  (let* ((twelf-server-buffer (if (null buffer) (twelf-get-server-buffer)
-                             buffer))
-        (_ (set-buffer twelf-server-buffer))
-        (twelf-server-process (twelf-server-process twelf-server-buffer))
-        (proc-mark (process-mark twelf-server-process))
-        (_ (display-buffer twelf-server-buffer))
-        (twelf-server-window (get-buffer-window twelf-server-buffer)))
-    (if (not (pos-visible-in-window-p proc-mark twelf-server-window))
-       (progn
-         (push-mark proc-mark)
-         (set-window-point twelf-server-window proc-mark)))
-    (sit-for 0)))
-
-(defun twelf-server-send-command (command)
-  "Send a string COMMAND to the Twelf server."
-  (interactive "sCommand: ")
-  (let* ((input (concat command "\n"))
-        (twelf-server-buffer (twelf-get-server-buffer))
-        (twelf-server-process (twelf-server-process twelf-server-buffer)))
-    (if twelf-server-echo-commands
-       (let ((previous-buffer (current-buffer)))
-         (if twelf-server-display-commands
-             (display-server-buffer twelf-server-buffer))
-         (set-buffer twelf-server-buffer)
-         (goto-char (point-max))
-         (insert input)
-         (set-marker (process-mark twelf-server-process) (point-max))
-         (setq *twelf-error-pos* (point-max))
-         (set-buffer previous-buffer)))
-    (setq *twelf-last-input-buffer* twelf-server-buffer)
-    (setq *twelf-server-last-process-mark*
-         (marker-position (process-mark twelf-server-process)))
-    (comint-send-string twelf-server-process input)))
-
-(defun twelf-accept-process-output (process timeout)
-  "Incompatibility workaround for versions of accept-process-output.
-In case the function accepts no TIMEOUT argument, we wait potentially
-forever (until the user aborts, typically with \\[keyboard-quit])."
-  (condition-case nil                  ; do not keep track of error message
-      (accept-process-output process timeout)
-    (wrong-number-of-arguments
-     (accept-process-output process))))
-
-(defun twelf-server-wait (&optional displayp ok-message abort-message)
-  "Wait for server acknowledgment and beep if error occurred.
-If optional argument DISPLAYP is non-NIL, or if an error occurred, the
-Twelf server buffer is displayed.  Optional second and third arguments
-OK-MESSAGE and ABORT-MESSAGE are the strings to show upon successful
-completion or abort of the server which default to \"Server OK\" and
-\"Server ABORT\"."
-  (let* ((chunk-count 0)
-        (last-point *twelf-server-last-process-mark*)
-        (previous-buffer (current-buffer))
-        (previous-match-data (match-data))
-        (twelf-server-buffer (twelf-get-server-buffer))
-        (twelf-server-process (get-buffer-process twelf-server-buffer)))
-    (unwind-protect
-       (catch 'done
-         (set-buffer twelf-server-buffer)
-         (while t
-           (goto-char last-point)
-           (if (re-search-forward "\\(%% OK %%\n\\)\\|\\(%% ABORT %%\n\\)"
-                                  (point-max) 'limit)
-               (cond ((match-beginning 1)
-                      (if displayp
-                          (display-server-buffer twelf-server-buffer))
-                      (message (or ok-message "Server OK"))
-                      (throw 'done nil))
-                     ((match-beginning 2)
-                      (display-server-buffer twelf-server-buffer)
-                      (error (or abort-message "Server ABORT"))
-                      (throw 'done nil)))
-             (cond ((or (not (twelf-accept-process-output
-                              twelf-server-process twelf-server-timeout))
-                        (= last-point (point)))
-                    (display-server-buffer twelf-server-buffer)
-                    (message "Server TIMEOUT, continuing Emacs")
-                    (throw 'done nil))
-                   (t (setq chunk-count (+ chunk-count 1))
-                      (if (= (mod chunk-count 10) 0)
-                          (message (make-string (/ chunk-count 10) ?#)))
-                      (sit-for 0))))))
-      (store-match-data previous-match-data)
-      (set-buffer previous-buffer))))
-
-(defun twelf-server-quit ()
-  "Kill the Twelf server process."
-  (interactive)
-  (twelf-server-send-command "OS.exit"))
-
-(defun twelf-server-interrupt ()
-  "Interrupt the Twelf server process."
-  (interactive)
-  (interrupt-process (twelf-server-process)))
-
-(defun twelf-reset ()
-  "Reset the global signature of Twelf maintained by the server."
-  (interactive)
-  (twelf-server-send-command "reset"))
-
-(defun twelf-config-directory ()
-  "Returns directory with current Twelf server configuration."
-  (let ((config-file (buffer-file-name *twelf-config-buffer*)))
-    (file-name-directory config-file)))
-
-;(defun relativize-file-name (filename dir)
-;  "Relativize FILENAME with respect to DIR, if possible."
-;  (if (string= dir (file-name-directory filename))
-;      (file-name-nondirectory filename)
-;    filename))
-
-(defun twelf-server-configure (config-file &optional ok-message)
-  "Initializes the Twelf server configuration from CONFIG-FILE.
-A configuration file is a list of relative file names in
-dependency order.  Lines starting with % are treated as comments.
-Starts a Twelf servers if necessary."
-  (interactive
-   (list (if twelf-config-mode (buffer-file-name)
-          (expand-file-name
-           (read-file-name "Visit config file: (default sources.cfg) "
-                           default-directory
-                           (concat default-directory "sources.cfg")
-                           nil ; don't require match for now
-                           )))))
-  (let* ((config-file (if (file-directory-p config-file)
-                         (concat config-file "sources.cfg")
-                       config-file))
-        (config-file-os (twelf-convert-standard-filename config-file))
-        (config-dir (file-name-directory config-file))
-        (config-dir-os (twelf-convert-standard-filename config-dir))
-        (config-buffer (set-buffer (or (get-file-buffer config-file)
-                                       (find-file-noselect config-file))))
-        config-list)
-    (setq *twelf-config-buffer* config-buffer)
-    (if (and (not (verify-visited-file-modtime (get-file-buffer config-file)))
-            (yes-or-no-p "Config file has changed, read new contents? "))
-       (revert-buffer t t))
-    (setq config-list (twelf-server-read-config))
-    (twelf-server-process)                ; Start process if necessary
-    (let* ((_ (set-buffer (twelf-get-server-buffer)))
-          (cd-command
-           (if (equal default-directory config-dir)
-               nil
-             (setq default-directory config-dir)
-             (concat "OS.chDir " config-dir-os)))
-          (_ (set-buffer config-buffer)))
-      (cond ((not (null cd-command))
-            (twelf-server-send-command cd-command)
-            (twelf-server-wait nil ""
-                               "Server ABORT: Could not change directory")))
-      (twelf-server-send-command
-       (concat "Config.read " config-file-os))
-      (twelf-server-wait nil (or ok-message "Server OK")
-                      "Server ABORT: Could not be configured")
-      ;; *twelf-config-buffer* should still be current buffer here
-      (setq *twelf-config-time* (visited-file-modtime))
-      (setq *twelf-config-list* config-list))))
-
-;(defun twelf-server-add-file (filename)
-;  "Adds a file to the current configuration."
-;  (interactive
-;   (list (expand-file-name
-;          (read-file-name "File to add: " (twelf-config-directory)))))
-;  (let ((relative-file (file-relative-name filename (twelf-config-directory)))
-;      temp-time)
-;    (save-excursion
-;      (set-buffer *twelf-config-buffer*)
-;      (goto-char (point-max))
-;      (if (not (= (point) (point-min)))
-;          (progn
-;            (backward-char 1)
-;            (if (looking-at "\n")
-;                (forward-char 1)
-;              (forward-char 1)
-;              (insert "\n"))))
-;      (insert (concat relative-file "\n"))
-;      (save-buffer)
-;      (setq temp-time (visited-file-modtime)))
-;    (twelf-server-send-command
-;     (concat "Config.read " (buffer-file-name *twelf-config-buffer*)))
-;    (twelf-server-wait nil "" "Server ABORT: File could not be added to 
configuration")
-;    (setq *twelf-config-list* (cons filename *twelf-config-list*))
-;    (setq *twelf-config-time* temp-time)))
-
-(defun natp (x)
-  "Checks if X is an integer greater or equal to 0."
-  (and (integerp x) (>= x 0)))
-
-(defun twelf-read-nat ()
-  "Reads a natural number from the minibuffer."
-  (let ((num nil))
-    (while (not (natp num))
-      (setq num (read-from-minibuffer "Number: " (if num (prin1-to-string num))
-                                     nil t t))
-      (if (not (natp num)) (beep)))
-    num))
-
-(defun twelf-read-bool ()
-  "Read a boolean in mini-buffer."
-  (completing-read "Boolean: "
-                  '(("true" . true) ("false" . false))
-                  nil t))
-
-(defun twelf-read-limit ()
-  "Read a limit (* or natural number) in mini-buffer."
-  (let ((input (read-string "Limit (* or nat): ")))
-    (if (equal input "*")
-       input
-      (let ((n (string-to-number input)))
-       (if (and (integerp n) (> n 0))
-           n
-         (error "Number must be non-negative integer"))))))
-
-(defun twelf-read-strategy ()
-  "Read a strategy in mini-buffer."
-  (completing-read "Strategy: "
-                  '(("FRS" . "FRS") ("RFS" . "RFS"))
-                  nil t))
-
-(defun twelf-read-value (argtype)
-  "Call the read function appropriate for ARGTYPE and return result."
-  (funcall (cdr (assoc argtype *twelf-read-functions*))))
-
-(defun twelf-set (parm value)
-  "Sets the Twelf parameter PARM to VALUE.
-When called interactively, prompts for parameter and value, supporting
-completion."
-  (interactive
-   (let* ((parm (completing-read
-                "Parameter: " *twelf-parm-table* nil t))
-         (argtype (cdr (assoc parm *twelf-parm-table*)))
-         (value (twelf-read-value argtype)))
-     (list parm value)))
-  (track-parm parm value)              ; track, if necessary
-  (twelf-server-send-command (concat "set " parm " " value)))
-
-(defun twelf-set-parm (parm)
-  "Prompts for and set the value of Twelf parameter PARM.
-Used in menus."
-  (let* ((argtype (cdr (assoc parm *twelf-parm-table*)))
-        (value (and argtype (twelf-read-value argtype))))
-    (if (null argtype)
-       (error "Unknown parameter")
-      (twelf-set parm value))))
-
-(defun track-parm (parm value)
-  "Tracks Twelf parameter values in Emacs."
-  (if (assoc parm *twelf-track-parms*)
-      (set (cdr (assoc parm *twelf-track-parms*)) value)))
-
-(defun twelf-toggle-double-check ()
-  "Toggles doubleCheck parameter of Twelf."
-  (let ((value (if (string-equal twelf-double-check "false")
-                  "true" "false")))
-    (twelf-set "doubleCheck" value)))
-
-(defun twelf-toggle-print-implicit ()
-  "Toggles Print.implicit parameter of Twelf."
-  (let ((value (if (string-equal twelf-print-implicit "false")
-                  "true" "false")))
-    (twelf-set "Print.implicit" value)))
-
-(defun twelf-get (parm)
-  "Prints the value of the Twelf parameter PARM.
-When called interactively, promts for parameter, supporting completion."
-  (interactive (list (completing-read "Parameter: " *twelf-parm-table* nil t)))
-  (twelf-server-send-command (concat "get " parm))
-  (twelf-server-wait)
-  (save-window-excursion
-    (let ((twelf-server-buffer (twelf-get-server-buffer)))
-      (set-buffer twelf-server-buffer)
-      (goto-char *twelf-server-last-process-mark*)
-      ;; We are now at the beginning of the output
-      (end-of-line 1)
-      (message (buffer-substring *twelf-server-last-process-mark* (point))))))
-
-(defun twelf-timers-reset ()
-  "Reset the Twelf timers."
-  (interactive)
-  (twelf-server-send-command "Timers.reset"))
-
-(defun twelf-timers-show ()
-  "Show and reset the Twelf timers."
-  (interactive)
-  (twelf-server-send-command "Timers.show")
-  (twelf-server-wait t))
-
-(defun twelf-timers-check ()
-  "Show the Twelf timers without resetting them."
-  (interactive)
-  (twelf-server-send-command "Timers.show")
-  (twelf-server-wait t))
-
-(defun twelf-server-restart ()
-  "Restarts server and re-initializes configuration.
-This is primarily useful during debugging of the Twelf server code or
-if the Twelf server is hopelessly wedged."
-  (interactive)
-  (twelf-server twelf-server-program)
-  (twelf-server-configure (if *twelf-config-buffer*
-                           (buffer-file-name *twelf-config-buffer*)
-                         "sources.cfg")
-                       "Server configured, now checking...")
-  (twelf-check-config))
-
-;;;----------------------------------------------------------------------
-;;; Twelf Config minor mode
-;;;----------------------------------------------------------------------
-
-(defun twelf-config-mode (&optional prefix)
-  "Toggles minor mode for Twelf configuration files.
-This affects \\<twelf-mode-map>
- twelf-server-configure (\\[twelf-server-configure])
- twelf-save-check-config (\\[twelf-save-check-config])
-"
-  (interactive "P")
-  (make-local-variable 'twelf-config-mode)
-  (cond ((not (assq 'twelf-config-mode minor-mode-alist))
-        (setq minor-mode-alist
-              (cons '(twelf-config-mode " Config") minor-mode-alist))))
-  (cond ((or (not twelf-config-mode) prefix)
-        (setq twelf-config-mode t)
-        (run-hooks 'twelf-config-mode-hook))
-       (t (setq twelf-config-mode t))))
-
-(defun twelf-config-mode-check (&optional buffer)
-  "Switch on the Twelf Config minor mode if the ends in `.cfg'."
-  (if (string-match "\\.cfg$" (buffer-file-name (or buffer (current-buffer))))
-      (twelf-config-mode t)))
-
-;;;----------------------------------------------------------------------
-;;; Support for creating a TAGS file for current Twelf server configuration
-;;;----------------------------------------------------------------------
-
-(defun twelf-tag (&optional tags-filename)
-  "Create tags file for current configuration.
-If the current configuration is sources.cfg, the tags file is TAGS.
-If current configuration is named FILE.cfg, tags file will be named FILE.tag
-Errors are displayed in the Twelf server buffer.
-Optional argument TAGS-FILENAME specifies alternative filename."
-  (interactive)
-  (twelf-server-sync-config)
-  (let* ((error-buffer (twelf-get-server-buffer))
-        (config-filename (buffer-file-name *twelf-config-buffer*))
-        (tags-file
-         (or tags-filename
-             (if (string-equal "sources.cfg"
-                               (file-name-nondirectory config-filename))
-                 (concat (file-name-directory config-filename "TAGS"))
-               (concat (file-name-sans-extension config-filename)
-                       ".tag")))))
-    (save-excursion
-      (set-buffer error-buffer)
-      (goto-char (point-max))
-      (insert "Tagging configuration " config-filename " in file " tags-file 
"\n"))
-    (set-buffer *twelf-config-buffer*)
-    (twelf-tag-files (rev-relativize *twelf-config-list* default-directory)
-                  tags-file error-buffer)
-    (if (get-buffer-process error-buffer)
-       (set-marker (process-mark (get-buffer-process error-buffer))
-                   (point-max)))))
-
-(defun twelf-tag-files (filelist &optional tags-filename error-buffer)
-  "Create tags file for FILELIST, routing errors to buffer *tags-errors*.
-Optional argument TAGS-FILENAME specifies alternative filename (default: TAGS),
-optional argument ERROR-BUFFER specifies alternative buffer for error message
-(default: *tags-errors*)."
-  (let* ((tags-filename (or tags-filename "TAGS"))
-        (tags-buffer (find-file-noselect tags-filename))
-        (error-buffer (or error-buffer (new-temp-buffer "*tags-errors*"))))
-    (save-excursion
-      (set-buffer tags-buffer)
-      (if (equal (point-min) (point-max))
-         nil
-       ;;(pop-to-buffer tags-buffer)
-       ;;(if (yes-or-no-p "Delete current tags information? ")
-       (delete-region (point-min) (point-max))
-       ;;)
-       ))
-    (switch-to-buffer-other-window error-buffer)
-    (while (not (null filelist))
-      (twelf-tag-file (car filelist) tags-buffer error-buffer)
-      (setq filelist (cdr filelist)))
-    (save-excursion
-      (set-buffer tags-buffer)
-      (save-buffer))))
-
-(defun twelf-tag-file (filename tags-buffer error-buffer)
-  "Deposit tag information for FILENAME in TAGS-BUFFER, errors in 
ERROR-BUFFER."
-  (let ((src-buffer (find-file-noselect filename))
-       file-start file-end end-of-id tag-string)
-    (save-excursion
-      (set-buffer tags-buffer)
-      (goto-char (point-max))
-      (insert "\f\n" filename ",0\n")
-      (setq file-start (point))
-      (save-excursion
-       (set-buffer src-buffer)
-       (goto-char (point-min))
-       (while (twelf-next-decl filename error-buffer)
-         (setq end-of-id (point))
-         (beginning-of-line 1)
-         (setq tag-string
-               (concat (buffer-substring (point) end-of-id)
-                       "\C-?" (current-line-absolute) "," (point) "\n"))
-         (goto-char end-of-id)
-         (if (not (twelf-end-of-par))
-             (let ((error-line (current-line-absolute)))
-               (save-excursion
-                 (set-buffer error-buffer)
-                 (goto-char (point-max))
-                 (insert filename ":" (int-to-string error-line)
-                         " Warning: missing period\n"))))
-         (save-excursion
-           (set-buffer tags-buffer)
-           (insert tag-string))))
-      (setq file-end (point-max))
-      (goto-char (- file-start 2))
-      (delete-char 1)
-      (insert (int-to-string (- file-end file-start)))
-      (goto-char (point-max)))))
-
-(defun twelf-next-decl (filename error-buffer)
-  "Set point after the identifier of the next declaration.
-Return the declared identifier or `nil' if none was found.
-FILENAME and ERROR-BUFFER are used if something appears wrong."
-  (let ((id nil)
-       end-of-id
-       beg-of-id)
-    (skip-twelf-comments-and-whitespace)
-    (while (and (not id) (not (eobp)))
-      (setq beg-of-id (point))
-      (if (zerop (skip-chars-forward *twelf-id-chars*))
-         ;; Not looking at id: skip ahead
-         (skip-ahead filename (current-line-absolute) "No identifier"
-                     error-buffer)
-       (setq end-of-id (point))
-       (skip-twelf-comments-and-whitespace)
-       (if (not (looking-at ":"))
-           ;; Not looking at valid decl: skip ahead
-           (skip-ahead filename (current-line-absolute end-of-id) "No colon"
-                       error-buffer)
-         (goto-char end-of-id)
-         (setq id (buffer-substring beg-of-id end-of-id))))
-      (skip-twelf-comments-and-whitespace))
-    id))
-
-(defun skip-ahead (filename line message error-buffer)
-  "Skip ahead when syntactic error was found.
-A parsable error message constited from FILENAME, LINE, and MESSAGE is
-deposited in ERROR-BUFFER."
-  (if error-buffer
-      (save-excursion
-       (set-buffer error-buffer)
-       (goto-char (point-max))
-       (insert filename ":" (int-to-string line) " Warning: " message "\n")
-       (setq *twelf-error-pos* (point))))
-  (twelf-end-of-par))
-
-(defun current-line-absolute (&optional char-pos)
-  "Return line number of CHAR-POS (default: point) in current buffer.
-Ignores any possible buffer restrictions."
-  (1+ (count-lines 1 (or char-pos (point)))))
-
-(defun new-temp-buffer (&optional name)
-  "Create or delete contents of buffer named \"*temp*\" and return it.
-Optional argument NAME specified an alternative name."
-  (if (not name) (setq name "*temp*"))
-  (if (get-buffer name)
-      (save-excursion
-       (set-buffer name)
-       (delete-region (point-min) (point-max))
-       (get-buffer name))
-    (get-buffer-create name)))
-
-(defun rev-relativize (filelist dir)
-  "Reverse and relativize FILELIST with respect to DIR."
-  (let ((newlist nil))
-    (while (not (null filelist))
-      (setq newlist
-           (cons (file-relative-name (car filelist) dir) newlist))
-      (setq filelist (cdr filelist)))
-    newlist))
-
-
-;;;----------------------------------------------------------------------
-;;; Twelf-SML mode
-;;;----------------------------------------------------------------------
-
-(defvar twelf-sml-mode-map nil
-  "The keymap used in Twelf-SML mode.")
-
-(cond ((not twelf-sml-mode-map)
-       ;;(setq twelf-sml-mode-map (full-copy-sparse-keymap comint-mode-map))
-       ;; fixed for Emacs 19.25.  -fp Thu Oct 27 09:08:44 1994
-       (setq twelf-sml-mode-map (copy-keymap comint-mode-map))
-       (install-basic-twelf-keybindings twelf-sml-mode-map)
-       ))
-
-(defconst twelf-sml-prompt-regexp "^\\- \\|^\\?\\- ")
-
-(defun expand-dir (dir)
-  "Expand argument and check that it is a directory."
-  (let ((expanded-dir (file-name-as-directory (expand-file-name dir))))
-    (if (not (file-directory-p expanded-dir))
-       (error "%s is not a directory" dir))
-    expanded-dir))
-
-(defun twelf-sml-cd (dir)
-  "Make DIR become the Twelf-SML process' buffer's default directory and
-furthermore issue an appropriate command to the inferior Twelf-SML process."
-  (interactive "DChange default directory: ")
-  (let ((expanded-dir (expand-dir dir)))
-    (save-excursion
-      (set-buffer (twelf-sml-process-buffer))
-      (setq default-directory expanded-dir)
-      (comint-simple-send (twelf-sml-process) (concat "Twelf.OS.chDir \"" 
expanded-dir "\";")))
-    ;;(pwd)
-    ))
-
-(defconst twelf-sml-cd-regexp "^\\s *cd\\s *\"\\([^\"]*\\)\""
-  "Regular expression used to match cd commands in Twelf-SML buffer.")
-
-(defun twelf-sml-directory-tracker (input)
-  "Checks input for cd commands and changes default directory in buffer.
-As a side-effect, it sets *twelf-last-region-sent* to NIL to indicate 
interactive
-input.  As a second side-effect, it resets the *twelf-error-pos*.
-Used as comint-input-sentinel in Twelf-SML buffer."
-  (if (twelf-input-filter input)
-      (setq *twelf-last-region-sent* nil))
-  (setq *twelf-last-input-buffer* (current-buffer))
-  (setq *twelf-error-pos* (marker-position (process-mark (twelf-sml-process))))
-  (cond ((string-match twelf-sml-cd-regexp input)
-        (let ((expanded-dir (expand-dir (substring input
-                                                   (match-beginning 1)
-                                                   (match-end 1)))))
-          (setq default-directory expanded-dir)
-          (pwd)))))
-
-(defun twelf-sml-mode ()
-  "Major mode for interacting with an inferior Twelf-SML process.
-
-The following commands are available:
-\\{twelf-sml-mode-map}
-
-An Twelf-SML process can be started with \\[twelf-sml].
-
-Customisation: Entry to this mode runs the hooks on twelf-sml-mode-hook.
-
-You can send queries to the inferior Twelf-SML process from other buffers.
-
-Commands:
-Return after the end of the process' output sends the text from the
-    end of process to point.
-Return before the end of the process' output copies the current line
-    to the end of the process' output, and sends it.
-Delete converts tabs to spaces as it moves back.
-Tab indents for Twelf; with argument, shifts rest
-    of expression rigidly with the current line.
-C-M-q does Tab on each line starting within following expression.
-Paragraphs are separated only by blank lines.  % start single comments,
-delimited comments are enclosed in %{...}%.
-If you accidentally suspend your process, use \\[comint-continue-subjob]
-to continue it."
-  (interactive)
-  (kill-all-local-variables)
-  (comint-mode)
-  (setq comint-prompt-regexp twelf-sml-prompt-regexp)
-  (setq comint-input-filter 'twelf-input-filter)
-  ;; changed for XEmacs 19.16 Sat Jun 13 11:28:53 1998
-  (add-hook 'comint-input-filter-functions 'twelf-sml-directory-tracker
-           nil t)
-  (twelf-mode-variables)
-
-  ;; For sequencing through error messages:
-  (make-local-variable '*twelf-error-pos*)
-  (setq *twelf-error-pos* (point-max))
-  ;; Workaround for problem with Lucid Emacs version of comint.el:
-  ;; must exclude double quotes " and must include $ and # in filenames.
-  (make-local-variable 'comint-match-partial-pathname-chars)
-  (setq comint-match-partial-pathname-chars
-       "^][<>{}()!^&*\\|?`'\" \t\n\r\b")
-
-  (setq major-mode 'twelf-sml-mode)
-  (setq mode-name "Twelf-SML")
-  (setq mode-line-process '(": %s"))
-  (use-local-map twelf-sml-mode-map)
-
-  (run-hooks 'twelf-sml-mode-hook))
-
-(defun twelf-sml (&optional cmd)
-  "Run an inferior Twelf-SML process in a buffer *twelf-sml*.
-If there is a process already running in *twelf-sml*, just
-switch to that buffer.  With argument, allows you to change the program
-which defaults to the value of twelf-sml-program.  Runs the hooks from
-twelf-sml-mode-hook (after the comint-mode-hook is run).
-
-Type \\[describe-mode] in the process buffer for a list of commands."
-  (interactive (list (and current-prefix-arg
-                         (read-string "Run Twelf-SML: " twelf-sml-program))))
-  (let ((cmd (or cmd twelf-sml-program)))
-    (cond ((not (comint-check-proc (twelf-sml-process-buffer)))
-          ;; process does not already exist
-          (set-buffer (apply 'make-comint "twelf-sml" cmd nil twelf-sml-args))
-          ;; in case we are using SML mode (for error tracking)
-          (if (boundp 'sml-buffer)
-              (set 'sml-buffer (twelf-sml-process-buffer)))
-          (twelf-sml-mode))))
-  (switch-to-buffer (twelf-sml-process-buffer)))
-
-(defun switch-to-twelf-sml (eob-p)
-  "Switch to the Twelf-SML process buffer.
-With argument, positions cursor at end of buffer."
-  (interactive "P")
-  (if (twelf-sml-process-buffer)
-      (pop-to-buffer (twelf-sml-process-buffer))
-      (error "No current process buffer. "))
-  (cond (eob-p
-        (push-mark)
-        (goto-char (point-max)))))
-
-(defun display-twelf-sml-buffer (&optional buffer)
-  "Display the Twelf-SML buffer so that the end of output is visible."
-  ;; Accept output from Twelf-SML process
-  (sit-for 1)
-  (let* ((twelf-sml-buffer (if (null buffer) (twelf-sml-process-buffer)
-                      buffer))
-        (_ (set-buffer twelf-sml-buffer))
-        (twelf-sml-process (twelf-sml-process))
-        (proc-mark (process-mark twelf-sml-process))
-        (_ (display-buffer twelf-sml-buffer))
-        (twelf-sml-window (get-buffer-window twelf-sml-buffer)))
-    (if (not (pos-visible-in-window-p proc-mark twelf-sml-window))
-       (progn
-         (push-mark proc-mark)
-         (set-window-point twelf-sml-window proc-mark)))))
-
-(defun twelf-sml-send-string (string)
-  "Send the given string to the Twelf-SML process."
-  (setq *twelf-last-input-buffer* (twelf-sml-process-buffer))
-  (comint-send-string (twelf-sml-process) string))
-
-(defun twelf-sml-send-region (start end &optional and-go)
-  "Send the current region to the inferior Twelf-SML process.
-Prefix argument means switch-to-twelf-sml afterwards.
-If the region is short, it is sent directly, via COMINT-SEND-REGION."
-  (interactive "r\nP")
-  (if (> start end)
-      (twelf-sml-send-region end start and-go)
-    ;; (setq twelf-sml-last-region-sent (list (current-buffer) start end))
-    (let ((cur-buffer (current-buffer))
-         (twelf-sml-buffer (twelf-sml-process-buffer)))
-      (switch-to-buffer twelf-sml-buffer)
-      ;; (setq sml-error-pos (marker-position (process-mark 
(twelf-sml-process))))
-      (setq *twelf-last-input-buffer* twelf-sml-buffer)
-      (switch-to-buffer cur-buffer))
-    (comint-send-region (twelf-sml-process) start end)
-    (if (not (string= (buffer-substring (1- end) end) "\n"))
-       (comint-send-string (twelf-sml-process) "\n"))
-    ;; Next two lines mess up when an Twelf error occurs, since the
-    ;; newline is not read and later messes up counting.
-    ;; (if (not and-go)
-    ;;  (comint-send-string (twelf-sml-process) "\n"))
-    (if and-go (switch-to-twelf-sml t)
-      (if twelf-sml-display-queries (display-twelf-sml-buffer)))))
-
-(defun twelf-sml-send-query (&optional and-go)
-  "Send the current declaration to the inferior Twelf-SML process as a query.
-Prefix argument means switch-to-twelf-sml afterwards."
-  (interactive "P")
-  (let* ((par (twelf-current-decl))
-        (query-start (nth 0 par))
-        (query-end (nth 1 par)))
-    (twelf-sml-set-mode 'TWELF)
-    (twelf-sml-send-region query-start query-end and-go)))
-
-(defun twelf-sml-send-newline (&optional and-go)
-  "Send a newline to the inferior Twelf-SML process.
-If a prefix argument is given, switches to Twelf-SML buffer afterwards."
-  (interactive "P")
-  (twelf-sml-send-string "\n")
-  (if and-go (switch-to-twelf-sml t)
-    (if twelf-sml-display-queries (display-twelf-sml-buffer))))
-
-(defun twelf-sml-send-semicolon (&optional and-go)
-  "Send a semi-colon to the inferior Twelf-SML process.
-If a prefix argument is given, switched to Twelf-SML buffer afterwards."
-  (interactive "P")
-  (twelf-sml-send-string ";\n")
-  (if and-go (switch-to-twelf-sml t)
-    (if twelf-sml-display-queries (display-twelf-sml-buffer))))
-
-(defun twelf-sml-status (&optional buffer)
-  "Returns the status of the Twelf-SML process.
-This employs a heuristic, looking at the contents of the Twelf-SML buffer.
-Results:
- NONE --- no process
- ML   --- ML top level
- TWELF  --- Twelf top level
- MORE --- asking whether to find the next solution
- UNKNOWN --- process is running, but can't tell status."
-  (let* ((twelf-sml-buffer (or buffer (twelf-sml-process-buffer)))
-        (twelf-sml-process (get-buffer-process twelf-sml-buffer)))
-    (if (null twelf-sml-process)
-       'NONE
-      (save-excursion
-       (set-buffer twelf-sml-buffer)
-       (let ((buffer-end (buffer-substring (max (point-min) (- (point-max) 3))
-                                           (point-max))))
-         (cond ((string-match "\\?- " buffer-end) 'TWELF)
-               ((string-match "\n- " buffer-end) 'ML)
-               ((string-match "More\\? " buffer-end) 'MORE)
-               (t 'UNKNOWN)))))))
-
-(defvar twelf-sml-init "Twelf.Config.load (Twelf.Config.read 
\"sources.cfg\");\n"
-  "Initial command sent to Twelf-SML process when started during 
twelf-sml-set-mode 'TWELF.")
-
-(defun twelf-sml-set-mode (mode &optional buffer)
-  "Attempts to read and if necessary correct the mode of the Twelf-SML buffer.
-This does not check if the status has been achieved.  It returns NIL
-if the status is unknown and T if it believes the status should have
-been achieved.  This allows for asynchronous operation."
-  (cond
-    ((eq mode 'ML)
-     (let ((status (twelf-sml-status)))
-       (cond ((eq status 'NONE) (twelf-sml) 't)
-            ((eq status 'ML) 't)
-            ((eq status 'TWELF) (twelf-sml-send-string "") 't)
-            ((eq status 'MORE) (twelf-sml-send-string "q\n") 't)
-            ((eq status 'UNKNOWN) nil))))
-    ((eq mode 'TWELF)
-     (let ((status (twelf-sml-status)))
-       (cond ((eq status 'NONE)
-             (twelf-sml)
-             (twelf-sml-send-string twelf-sml-init)
-             (twelf-sml-send-string "Twelf.top ();\n") 't)
-            ((eq status 'ML)
-             (twelf-sml-send-string "Twelf.top ();\n") 't)
-            ((eq status 'TWELF) 't)
-            ((eq status 'MORE) (twelf-sml-send-string "\n") 't)
-            ((eq status 'UNKNOWN) nil))))
-    (t (error "twelf-sml-set-mode: illegal mode %s" mode))))
-
-(defun twelf-sml-quit ()
-  "Kill the Twelf-SML process."
-  (interactive)
-  (kill-process (twelf-sml-process)))
-
-(defun twelf-sml-process-buffer ()
-  "Returns the current Twelf-SML process buffer."
-  (get-buffer "*twelf-sml*"))
-
-(defun twelf-sml-process (&optional buffer)
-  "Returns the current Twelf-SML process."
-  (let ((proc (get-buffer-process (or buffer (twelf-sml-process-buffer)))))
-    (or proc
-       (error "No current process."))))
-
-;;;----------------------------------------------------------------------
-;;; 2Twelf-SML minor mode for Twelf
-;;; Some keybindings now refer to Twelf-SML instead of the Twelf server.
-;;; Toggle with twelf-to-twelf-sml-mode
-;;;----------------------------------------------------------------------
-
-(defvar twelf-to-twelf-sml-mode nil
-  "Non-NIL means the minor mode is in effect.")
-
-(defun install-twelf-to-twelf-sml-keybindings (map)
-  ;; Process commands:
-  (define-key map "\C-c\C-r" 'twelf-sml-send-region)
-  (define-key map "\C-c\C-e" 'twelf-sml-send-query)
-  (define-key map "\C-c\C-m" 'twelf-sml-send-newline)
-  (define-key map "\C-c\n" 'twelf-sml-send-newline)
-  (define-key map "\C-c;" 'twelf-sml-send-semicolon)
-  (define-key map "\C-cd" 'twelf-sml-cd)
-  )
-
-(defvar twelf-to-twelf-sml-mode-map nil
-  "Keymap for twelf-to-twelf-sml minor mode.")
-
-(cond ((not twelf-to-twelf-sml-mode-map)
-       (setq twelf-to-twelf-sml-mode-map (make-sparse-keymap))
-       (install-basic-twelf-keybindings twelf-to-twelf-sml-mode-map)
-       (install-twelf-keybindings twelf-to-twelf-sml-mode-map)
-       ;; The next line shadows certain bindings to refer to
-       ;; Twelf-SML instead of the Twelf server.
-       (install-twelf-to-twelf-sml-keybindings twelf-to-twelf-sml-mode-map)))
-
-(defun twelf-to-twelf-sml-mode (&optional prefix)
-  "Toggles minor mode for sending queries to Twelf-SML instead of Twelf server.
-Specifically:   \\<twelf-to-twelf-sml-mode-map>
- \\[twelf-sml-send-query] (for sending queries),
- \\[twelf-sml-send-newline] (for sending newlines) and
- \\[twelf-sml-send-semicolon] (for sending `;')
-are rebound.
-
-Mode map
-========
-\\{twelf-to-twelf-sml-mode-map}
-"
-  (interactive "P")
-  (make-local-variable 'twelf-to-twelf-sml-mode)
-  (cond ((not (assq 'twelf-to-twelf-sml-mode minor-mode-alist))
-        (setq minor-mode-alist
-              (cons '(twelf-to-twelf-sml-mode " 2Twelf-SML")
-                    minor-mode-alist))))
-  (cond ((or (not twelf-to-twelf-sml-mode) prefix)
-        (setq twelf-to-twelf-sml-mode t)
-        (use-local-map twelf-to-twelf-sml-mode-map)
-        (run-hooks 'twelf-to-twelf-sml-mode-hook))
-       (t
-        (setq twelf-to-twelf-sml-mode nil)
-        (use-local-map twelf-mode-map))))
-
-;;;----------------------------------------------------------------------
-;;; Twelf mode menus
-;;; requires auc-menu utilities
-;;;----------------------------------------------------------------------
-
-(cond
- ((string-match "XEmacs" emacs-version) ;; XEmacs nee Lucid Emacs
-  (defun radio (label callback condition)
-    (vector label callback ':style 'radio ':selected condition))
-  (defun toggle (label callback condition)
-    (vector label callback ':style 'toggle ':selected condition))
-  (defun disable-form (label callback condition)
-    (vector label callback condition))
-  )
- (t ;; FSF Emacs 19
-  (defun radio (label callback condition)
-    (vector label callback t))
-  (defun toggle (label callback condition)
-    (vector label callback t))
-  (defun disable-form (label callback condition)
-    (cond ((symbolp condition) (vector label callback condition))
-         (t (vector label callback t))))
-  ))
-
-(defconst twelf-at-point-menu
-  '("At Point"
-    ["Constant" twelf-type-const t]
-    ;["Type" twelf-type-at-point nil]  ;disabled for Twelf 1.2
-    ;["Expected Type" twelf-expected-type-at-point nil] ;disabled
-    ;["List Completions" twelf-completions-at-point nil]       ;disabled
-    ;["Complete" twelf-complete nil] ;disabled
-    )
-  "Menu for commands applying at point.")
-
-(defconst twelf-server-state-menu
-  '("Server State"
-    ["Configure" twelf-server-configure t]
-    ["Interrupt" twelf-server-interrupt t]
-    ["Reset" twelf-reset t]
-    ["Start" twelf-server t]
-    ["Restart" twelf-server-restart t]
-    ["Quit" twelf-server-quit t])
-  "Menu for commands affecting server state.")
-
-(defconst twelf-error-menu
-  '("Error Tracking"
-    ["Next" twelf-next-error t]
-    ["Goto" twelf-goto-error t])
-  "Menu for error commands.")
-
-(defconst twelf-tags-menu
-  '("Tags"
-    ["Find" find-tag t]
-    ["Find Other Window" find-tag-other-window t]
-    ["Query Replace" tags-query-replace t]
-    ["Search" tags-search t]
-    ["Continue" tags-loop-continue t]
-    ["Create/Update" twelf-tag t])
-  "Menu for tag commands.")
-
-(defun twelf-toggle-server-display-commands ()
-  (setq twelf-server-display-commands (not twelf-server-display-commands)))
-
-(defconst twelf-options-menu
-  `("Options"
-    (, (toggle "Display Commands" '(twelf-toggle-server-display-commands)
-              'twelf-server-display-commands))
-    ("chatter"
-     (, (radio "0" '(twelf-set "chatter" 0) '(= twelf-chatter 0)))
-     (, (radio "1" '(twelf-set "chatter" 1) '(= twelf-chatter 1)))
-     (, (radio "2" '(twelf-set "chatter" 2) '(= twelf-chatter 2)))
-     (, (radio "3*" '(twelf-set "chatter" 3) '(= twelf-chatter 3)))
-     (, (radio "4" '(twelf-set "chatter" 4) '(= twelf-chatter 4)))
-     (, (radio "5" '(twelf-set "chatter" 5) '(= twelf-chatter 5)))
-     (, (radio "6" '(twelf-set "chatter" 6) '(= twelf-chatter 6))))
-    (, (toggle "doubleCheck" '(twelf-toggle-double-check)
-              '(string-equal twelf-double-check "true")))
-    ("Print."
-     (, (toggle "implicit" '(twelf-toggle-print-implicit)
-               '(string-equal twelf-print-implicit "true")))
-     ["depth" (twelf-set-parm "Print.depth") t]
-     ["length" (twelf-set-parm "Print.length") t]
-     ["indent" (twelf-set-parm "Print.indent") t]
-     ["width" (twelf-set-parm "Print.width") t])
-    ("Prover."
-     ["strategy" (twelf-set-parm "Prover.strategy") t]
-     ["maxSplit" (twelf-set-parm "Prover.maxSplit") t]
-     ["maxRecurse" (twelf-set-parm "Prover.maxRecurse") t])
-    ;;["Trace" nil nil]
-    ;; (, (radio "0" '(twelf-set "trace" 0) '(= twelf-trace 0)))
-    ;; (, (radio "1" '(twelf-set "trace 1) '(= twelf-trace 1)))
-    ;; (, (radio "2" '(twelf-set "trace" 2) '(= twelf-trace 2))))
-    ;;["Untrace" nil nil]
-    ;;(, (disable-form "Untrace" '(twelf-set "trace" 0)
-    ;;        '(not (= twelf-trace 0))))
-    ["Reset Menubar" twelf-reset-menu t])
-  "Menu to change options in Twelf mode.")
-
-(defconst twelf-timers-menu
-  '("Timing"
-    ["Show and Reset" twelf-timers-show t]
-    ["Check" twelf-timers-check t]
-    ["Reset" twelf-timers-reset t]))
-
-;(autoload 'toggle-twelf-font-immediate "twelf-font"
-;  "Toggle experimental immediate highlighting in font-lock mode.")
-(autoload 'twelf-font-fontify-decl "twelf-font"
-  "Fontify current declaration using font-lock minor mode.")
-(autoload 'twelf-font-fontify-buffer "twelf-font"
-  "Fontify current buffer using font-lock minor mode.")
-
-(defconst twelf-syntax-menu
-  `("Syntax Highlighting"
-    ["Highlight Declaration" twelf-font-fontify-decl t]
-    ["Highlight Buffer" twelf-font-fontify-buffer t]
-    ;;(, (toggle "Immediate Highlighting" 'toggle-twelf-font-immediate
-    ;;'font-lock-mode))
-    )
-  "Menu for syntax highlighting in Twelf mode.")
-
-(easy-menu-define twelf-menu (list twelf-mode-map)
-  "Menu for Twelf mode.
-This may be selected from the menubar.  In XEmacs, also bound to Button3."
-  (list
-   "Twelf"
-   ["Display Server" twelf-server-display t]
-   ["Check Configuration" twelf-save-check-config t]
-   ["Check File" twelf-save-check-file t]
-   ["Check Declaration" twelf-check-declaration t]
-   twelf-at-point-menu
-   twelf-error-menu
-   twelf-options-menu
-   twelf-syntax-menu
-   twelf-tags-menu
-   twelf-timers-menu
-   twelf-server-state-menu
-   ["Info" twelf-info t]))
-
-(defun twelf-add-menu ()
-  "Add Twelf menu to menubar."
-  (easy-menu-add twelf-menu twelf-mode-map))
-
-(defun twelf-remove-menu ()
-  "Remove Twelf menu from menubar."
-  (easy-menu-remove twelf-menu))
-
-(defun twelf-reset-menu ()
-  "Reset Twelf menu."
-  (twelf-remove-menu)
-  (twelf-add-menu))
-
-;;;----------------------------------------------------------------------
-;;; Twelf Server mode menu
-;;;----------------------------------------------------------------------
-
-(easy-menu-define twelf-server-menu (list twelf-server-mode-map)
-  "Menu for Twelf Server mode.
-This may be selected from the menubar.  In XEmacs, also bound to Button3."
-  (list
-   "Twelf-Server"
-   ;; ["Display Server" twelf-server-display t]
-   ["Check Configuration" twelf-save-check-config t]
-   ;; ["Check File" twelf-save-check-file nil]
-   ;; ["Check Declaration" twelf-check-declaration nil]
-   ;; ["Check Query" twelf-check-query nil]
-   ;; ["Solve Query" twelf-solve-query nil]
-   ;; ["At Point" () nil]
-   twelf-error-menu
-   twelf-options-menu
-   twelf-tags-menu
-   twelf-server-state-menu
-   ["Info" twelf-info t]))
-
-(defun twelf-server-add-menu ()
-  "Add Twelf menu to menubar."
-  (easy-menu-add twelf-server-menu twelf-server-mode-map))
-
-(defun twelf-server-remove-menu ()
-  "Remove Twelf menu from menubar."
-  (easy-menu-remove twelf-server-menu))
-
-(defun twelf-server-reset-menu ()
-  "Reset Twelf menu."
-  (twelf-server-remove-menu)
-  (twelf-server-add-menu))
-
-(provide 'twelf-old)
diff --git a/twelf/twelf.el b/twelf/twelf.el
deleted file mode 100644
index 236846f..0000000
--- a/twelf/twelf.el
+++ /dev/null
@@ -1,209 +0,0 @@
-;; twelf.el  Proof General instance for Twelf
-;;
-;; Copyright (C) 2000 LFCS Edinburgh.
-;; License:   GPL (GNU GENERAL PUBLIC LICENSE)
-;; Author:    David Aspinall <David.Aspinall@ed.ac.uk>
-;;
-;; $Id$
-;;
-;;
-;; TODO:
-;;   Info doc menu entry
-;;   X-Symbol upgrade/test?  Mule XE better?
-;;
-
-
-(require 'proof-easy-config)            ; easy configure mechanism
-
-(require 'twelf-font)                  ; font lock configuration
-;; (require 'twelf-old)
-;; FIXME: put parts of old code into twelf-syntax or similar
-
-;;
-;; User configuration settings for Twelf PG
-;;
-(defcustom twelf-root-dir
-  "/usr/local/twelf/"
-  "*Root of twelf installation.  Default /usr/local/twelf suits RPM package."
-  :type 'file
-  :group 'twelf)
-
-(defcustom twelf-info-dir
-  (concat twelf-root-dir "doc/info/")
-  "*Directory of Twelf Infor files."
-  :type 'file
-  :group 'twelf)
-
-;;
-;; Instantiation of Proof General
-;;
-(proof-easy-config 'twelf "Twelf"
- proof-prog-name                "twelf-server"
- proof-assistant-home-page       "http://www.cs.cmu.edu/~twelf/";
-
- proof-terminal-char             ?\.
- proof-script-comment-start             "%"    ;; for inserting comments
- proof-script-comment-end               ""
- proof-script-comment-start-regexp      "%[%{ \t\n\f]" ;; recognizing
- proof-script-comment-end-regexp        "%}\\|\n"      ;; comments
-
- proof-shell-auto-terminate-commands nil ; server commands don't end with .
- proof-shell-strip-crs-from-input nil   ; server needs CRs with readDecl
-
- proof-auto-multiple-files       t
- proof-shell-cd-cmd              "OS.chDir %s"
- proof-shell-interrupt-regexp    "interrupt"
-
- proof-shell-annotated-prompt-regexp "%% [OA][KB]O?R?T? %%\n"
- proof-shell-error-regexp        "Server error:"
- proof-shell-quit-cmd            "quit"
- proof-shell-restart-cmd        "reset"
-
- ;; "Eager annotations" mark messages Proof General should display
- ;; or recognize while the prover is pontificating
- proof-shell-eager-annotation-start
- "^\\[Opening \\|\\[Closing "
- proof-shell-eager-annotation-end "\n"
-
- ;; next setting is just to prevent warning
- proof-save-command-regexp     proof-no-regexp)
-
-
-;; unset: all of the interactive proof commands
-;; These don't really apply, I don't think, because Twelf
-;; only has fully automatic prover at the moment.
-;; Also, there is no concept of "undo" to remove declarations
-;; (can simply repeat them, tho.)
-;; proof-goal-command-regexp       "^%theorem"
-;; proof-save-command-regexp       "" ;; FIXME: empty?
-;; proof-goal-with-hole-regexp     "^%theorem\w-+\\(.*\\)\w-+:"
-;; proof-save-with-hole-regexp     "" ;; FIXME
-;; proof-non-undoables-regexp
-;; proof-goal-command              "%theorem %s."
-;; proof-save-command              "%prove "
-;; remaining strings are left over from Isabelle example
-;; proof-kill-goal-command         "Goal \"PROP no_goal_set\";"
-;; proof-showproof-command         "pr()"
-;; proof-undo-n-times-cmd          "pg_repeat undo %s;"
-;; proof-shell-start-goals-regexp  "Level [0-9]"
-;; proof-shell-end-goals-regexp    "val it"
-;; proof-shell-init-cmd
-;; proof-shell-proof-completed-regexp "^No subgoals!"
-
-
-;;
-;; Twelf server doesn't take declarations directly:
-;; we need to pre-process script input slightly
-;;
-
-(defun twelf-add-read-declaration ()
-  "A hook value for `proof-shell-insert-hook'."
-  (if (eq action 'proof-done-advancing)
-      (setq string (concat "readDecl\n" string))))
-
-(add-hook 'proof-shell-insert-hook 'twelf-add-read-declaration)
-
-
-;;
-;; Syntax table
-;;
-
-;; Taken from old Emacs mode, renamed fns to be convention compliant
-(defun twelf-set-syntax (char entry)
-  (modify-syntax-entry char entry twelf-mode-syntax-table))
-(defun twelf-set-word  (char) (twelf-set-syntax char "w   "))
-(defun twelf-set-symbol (char) (twelf-set-syntax char "_   "))
-
-(defun twelf-map-string (func string)
-  (if (string= "" string)
-      ()
-    (funcall func (string-to-char string))
-    (twelf-map-string func (substring string 1))))
-
-;; A-Z and a-z are already word constituents
-;; For fontification, it would be better if _ and ' were word constituents
-(twelf-map-string
- 'twelf-set-word "!&$^+/<=>?@~|#*`;,-0123456789\\") ; word constituents
-(twelf-map-string 'twelf-set-symbol "_'")         ; symbol constituents
-;; Delimited comments are %{ }%, see 1234 below.
-(twelf-set-syntax ?\ "    ")            ; whitespace
-(twelf-set-syntax ?\t "    ")           ; whitespace
-; da: this old entry is wrong: it says % always starts a comment
-;(twelf-set-syntax ?% "< 14")            ; comment begin
-; This next one is much better,
-(twelf-set-syntax ?% ". 14")            ; comment begin/second char
-(twelf-set-syntax ?\n ">   ")           ; comment end
-(twelf-set-syntax ?: ".   ")            ; punctuation
-(twelf-set-syntax ?. ".   ")            ; punctuation
-(twelf-set-syntax ?\( "()  ")           ; open delimiter
-(twelf-set-syntax ?\) ")(  ")           ; close delimiter
-(twelf-set-syntax ?\[ "(]  ")           ; open delimiter
-(twelf-set-syntax ?\] ")[  ")           ; close delimiter
-;(twelf-set-syntax ?\{ "(}2 ")           ; open delimiter
-;(twelf-set-syntax ?\} "){ 3")           ; close delimiter
-;; Actually, strings are illegal but we include:
-(twelf-set-syntax ?\" "\"   ")          ; string quote
-;; \ is not an escape, but a word constituent (see above)
-;;(twelf-set-syntax ?\\ "/   ")         ; escape
-
-
-
-;;
-;; Syntax highlighting (from twelf-old.el, NEEDS WORK)
-;;
-;; Highlighting is maybe a nuisance for twelf because of its funny syntax.
-;; But font lock could perhaps be got to work with recent versions.
-;; That would be better than the present mechanism, which doesn't lock,
-;; doesn't work well with X Symbol (which really needs locking), and
-;; even breaks the background colouring for some reason (presumably
-;; the Twelf faces)
-
-(require 'twelf-font)
-(add-hook 'twelf-mode-hook 'twelf-mode-extra-config)
-
-(defun twelf-mode-extra-config ()
-  (make-local-hook 'font-lock-after-fontify-buffer-hook)
-  (add-hook 'font-lock-after-fontify-buffer-hook
-           'twelf-font-fontify-buffer nil 'local)
-  (font-lock-mode))
-
-(defconst twelf-syntax-menu
-  '("Syntax Highlighting"
-    ["Highlight Declaration" twelf-font-fontify-decl t]
-    ["Highlight Buffer" twelf-font-fontify-buffer t]
-    ;;(, (toggle "Immediate Highlighting" 'toggle-twelf-font-immediate
-    ;;'font-lock-mode))
-      )
-  "Menu for syntax highlighting in Twelf mode.")
-
-
-;;
-;; Setting Twelf options via Proof General
-;;
-
-(defpacustom chatter 1
-  "Value for chatter."
-  :type 'integer
-  :setting "set chatter %i")
-
-(defpacustom double-check nil
-  "Double-check declarations after type reconstruction."
-  :type 'boolean
-  :setting "set doubleCheck %b")
-(defpacustom print-implicit nil
-  "Show implicit arguments."
-  :type 'boolean
-  :setting "set Print.implict %b")
-
-;; etc
-
-
-;;
-;; Twelf menu
-;;
-
-(defpgdefault menu-entries
-  (cdr twelf-syntax-menu))
-
-
-(provide 'twelf)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]