|
| 1 | +# SPDX-License-Identifier: MPL-2.0 |
| 2 | +# |
| 3 | +# ACL2 (+ ACL2s) decl, hint, and theory synonyms. |
| 4 | +# Schema: see data/synonyms/README.adoc. |
| 5 | +# Seeded 2026-06-01 for the ACL2 community-books corpus adapter. |
| 6 | +# |
| 7 | +# Coverage focus: top-level decls, defthm hint vocabulary, theory |
| 8 | +# enable/disable manipulation, the standard hazard surface |
| 9 | +# (skip-proofs / defaxiom / defstub / ld-skip-proofsp), and ACL2s |
| 10 | +# extensions (defdata, definec, defunc, cgen, test?). |
| 11 | + |
| 12 | +# --------------------------------------------------------------------------- |
| 13 | +# Top-level decls |
| 14 | +# --------------------------------------------------------------------------- |
| 15 | + |
| 16 | +[[synonym]] |
| 17 | +canonical = "defthm" |
| 18 | +aliases = ["defthmd", "defrule", "rule"] |
| 19 | +tactic_class = "decl" |
| 20 | +notes = """ |
| 21 | +Prove and store a theorem. `defthmd` is the disabled variant — same |
| 22 | +proof obligation, but the rule isn't added to the active theory. |
| 23 | +""" |
| 24 | + |
| 25 | +[[synonym]] |
| 26 | +canonical = "defun" |
| 27 | +aliases = ["defun-nx", "defund", "defn"] |
| 28 | +tactic_class = "decl" |
| 29 | +notes = """ |
| 30 | +Function definition. `defund` is the disabled variant. `defun-nx` |
| 31 | +declares a non-executable function (logical only — no Lisp body |
| 32 | +needed). ACL2s' `defn` is `defun` with stricter guard-verification. |
| 33 | +""" |
| 34 | + |
| 35 | +[[synonym]] |
| 36 | +canonical = "defaxiom" |
| 37 | +aliases = ["axiom", "postulate"] |
| 38 | +tactic_class = "danger" |
| 39 | +notes = """ |
| 40 | +HAZARD. Postulates a theorem without proof. Every `defaxiom` is a |
| 41 | +hole in the trusted base — the official ACL2 advice is to use |
| 42 | +`skip-proofs` for development scaffolding and elaborate to a real |
| 43 | +proof before release. `defaxiom` makes the leak permanent. |
| 44 | +""" |
| 45 | + |
| 46 | +[[synonym]] |
| 47 | +canonical = "defstub" |
| 48 | +aliases = ["stub", "constrained-function"] |
| 49 | +tactic_class = "danger" |
| 50 | +notes = """ |
| 51 | +HAZARD. Introduces a constrained function whose body is opaque. Used |
| 52 | +for encapsulate-style reasoning, but in isolation is an axiom about |
| 53 | +the existence of a function with the given signature. |
| 54 | +""" |
| 55 | + |
| 56 | +[[synonym]] |
| 57 | +canonical = "defconst" |
| 58 | +aliases = ["constant", "defparameter"] |
| 59 | +tactic_class = "decl" |
| 60 | +notes = "Top-level constant. Name is conventionally wrapped in earmuffs (`*name*`)." |
| 61 | + |
| 62 | +[[synonym]] |
| 63 | +canonical = "defmacro" |
| 64 | +aliases = ["macro", "macroexpand"] |
| 65 | +tactic_class = "decl" |
| 66 | +notes = "Macro definition. Expanded before logic processing." |
| 67 | + |
| 68 | +[[synonym]] |
| 69 | +canonical = "defabbrev" |
| 70 | +aliases = ["abbreviation", "inline-defun"] |
| 71 | +tactic_class = "decl" |
| 72 | +notes = """ |
| 73 | +Function with always-inline semantics. Equivalent to a `defmacro` |
| 74 | +that takes evaluated arguments — convenient for short helpers |
| 75 | +without paying the macro-expansion cost at the surface. |
| 76 | +""" |
| 77 | + |
| 78 | +[[synonym]] |
| 79 | +canonical = "include-book" |
| 80 | +aliases = ["import-book", "load-book"] |
| 81 | +tactic_class = "import" |
| 82 | +notes = """ |
| 83 | +Import a previously-certified book. The basic composition mechanism |
| 84 | +for the ACL2 community books. Use `:dir :system` to pull from the |
| 85 | +system book directory. |
| 86 | +""" |
| 87 | + |
| 88 | +[[synonym]] |
| 89 | +canonical = "in-package" |
| 90 | +aliases = ["select-package", "package-decl"] |
| 91 | +tactic_class = "decl" |
| 92 | +notes = """ |
| 93 | +Set the current package. Every book starts with `(in-package \"X\")` |
| 94 | +where `X` is typically `\"ACL2\"` for community books. |
| 95 | +""" |
| 96 | + |
| 97 | +# --------------------------------------------------------------------------- |
| 98 | +# Proof hints (inside :hints (("Goal" …)) or per-subgoal) |
| 99 | +# --------------------------------------------------------------------------- |
| 100 | + |
| 101 | +[[synonym]] |
| 102 | +canonical = ":induct" |
| 103 | +aliases = ["induct-scheme", "induction-scheme"] |
| 104 | +tactic_class = "hint" |
| 105 | +notes = """ |
| 106 | +Specify the induction scheme. Either a function name (use its |
| 107 | +recursion structure) or an explicit `(:induct (… …))` form. |
| 108 | +""" |
| 109 | + |
| 110 | +[[synonym]] |
| 111 | +canonical = ":in-theory" |
| 112 | +aliases = ["theory-hint", "in-theory-hint"] |
| 113 | +tactic_class = "hint" |
| 114 | +notes = """ |
| 115 | +Override the rewrite theory active during the proof. Common idioms: |
| 116 | +`(enable foo)`, `(disable bar)`, `(e/d (enable-these)(disable-those))`. |
| 117 | +""" |
| 118 | + |
| 119 | +[[synonym]] |
| 120 | +canonical = ":hints" |
| 121 | +aliases = ["hints-block"] |
| 122 | +tactic_class = "hint" |
| 123 | +notes = "Top-level hint container in a `defthm`. Per-subgoal hints keyed by `\"Goal\"`, `\"Subgoal *1/3\"`, etc." |
| 124 | + |
| 125 | +[[synonym]] |
| 126 | +canonical = ":use" |
| 127 | +aliases = ["lemma-instance"] |
| 128 | +tactic_class = "hint" |
| 129 | +notes = """ |
| 130 | +Force the prover to use a particular lemma instance. Form: |
| 131 | +`(:instance lemma-name (var1 e1) (var2 e2))`. The standard way to |
| 132 | +inject a known fact when the rewriter wouldn't find it on its own. |
| 133 | +""" |
| 134 | + |
| 135 | +[[synonym]] |
| 136 | +canonical = ":by" |
| 137 | +aliases = ["by-hint", "single-step"] |
| 138 | +tactic_class = "hint" |
| 139 | +notes = "Single-step justification — the term must literally match the goal up to alpha-equivalence." |
| 140 | + |
| 141 | +[[synonym]] |
| 142 | +canonical = ":cases" |
| 143 | +aliases = ["case-split-hint"] |
| 144 | +tactic_class = "hint" |
| 145 | +notes = "Split the proof into cases on the given list of terms." |
| 146 | + |
| 147 | +[[synonym]] |
| 148 | +canonical = ":expand" |
| 149 | +aliases = ["force-expand"] |
| 150 | +tactic_class = "hint" |
| 151 | +notes = "Force the rewriter to expand the listed terms even if they're disabled or under a heuristic guard." |
| 152 | + |
| 153 | +[[synonym]] |
| 154 | +canonical = ":do-not" |
| 155 | +aliases = ["disable-proof-step"] |
| 156 | +tactic_class = "hint" |
| 157 | +notes = """ |
| 158 | +Disable specific waterfall steps. Common values: `'(generalize fertilize |
| 159 | +eliminate-destructors)` to keep the prover from rewriting too |
| 160 | +aggressively. |
| 161 | +""" |
| 162 | + |
| 163 | +# --------------------------------------------------------------------------- |
| 164 | +# Theory manipulation (the tactic-equivalent vocabulary) |
| 165 | +# --------------------------------------------------------------------------- |
| 166 | + |
| 167 | +[[synonym]] |
| 168 | +canonical = "enable" |
| 169 | +aliases = ["enable-rules"] |
| 170 | +tactic_class = "theory" |
| 171 | +notes = "Add the listed rules to the active theory. Inside `:in-theory`." |
| 172 | + |
| 173 | +[[synonym]] |
| 174 | +canonical = "disable" |
| 175 | +aliases = ["disable-rules"] |
| 176 | +tactic_class = "theory" |
| 177 | +notes = "Remove the listed rules. Inverse of `enable`." |
| 178 | + |
| 179 | +[[synonym]] |
| 180 | +canonical = "e/d" |
| 181 | +aliases = ["enable-disable", "e/d*"] |
| 182 | +tactic_class = "theory" |
| 183 | +notes = """ |
| 184 | +`(e/d (enables) (disables))` — combined enable/disable in one form. |
| 185 | +Idiomatic for theory hints. `e/d*` is the recursive variant. |
| 186 | +""" |
| 187 | + |
| 188 | +[[synonym]] |
| 189 | +canonical = "executable-counterpart" |
| 190 | +aliases = ["ec", ":executable-counterpart"] |
| 191 | +tactic_class = "theory" |
| 192 | +notes = """ |
| 193 | +Toggle the executable-counterpart of a function (the rewrite that |
| 194 | +unfolds calls on concrete arguments). Frequently disabled inside |
| 195 | +proofs to keep terms small. |
| 196 | +""" |
| 197 | + |
| 198 | +[[synonym]] |
| 199 | +canonical = "theory" |
| 200 | +aliases = ["current-theory", "ground-zero"] |
| 201 | +tactic_class = "theory" |
| 202 | +notes = """ |
| 203 | +Predefined theory primitives: `(theory 'minimal-theory)`, |
| 204 | +`(theory 'ground-zero)`, `(current-theory 'world)`. Used to build |
| 205 | +custom `:in-theory` lists. |
| 206 | +""" |
| 207 | + |
| 208 | +# --------------------------------------------------------------------------- |
| 209 | +# Hazards |
| 210 | +# --------------------------------------------------------------------------- |
| 211 | + |
| 212 | +[[synonym]] |
| 213 | +canonical = "skip-proofs" |
| 214 | +aliases = ["skip-proofs-wrapper", "trusted-block"] |
| 215 | +tactic_class = "danger" |
| 216 | +notes = """ |
| 217 | +THE BIG ACL2 HAZARD. `(skip-proofs FORM)` makes the prover accept |
| 218 | +`FORM` as if it had been proved, without actually proving it. Common |
| 219 | +in development scaffolding; absolutely forbidden in shipped books. |
| 220 | +Every `skip-proofs` is a trusted hole. |
| 221 | +""" |
| 222 | + |
| 223 | +[[synonym]] |
| 224 | +canonical = "ld-skip-proofsp" |
| 225 | +aliases = ["ld-skip-proofs-mode"] |
| 226 | +tactic_class = "danger" |
| 227 | +notes = """ |
| 228 | +Global flag that makes the read-eval loop skip ALL proofs. Used to |
| 229 | +quickly re-certify a development without re-running proofs, but lethal |
| 230 | +if it leaks into a release. Detect any toggle of this flag as a |
| 231 | +hazard. |
| 232 | +""" |
| 233 | + |
| 234 | +[[synonym]] |
| 235 | +canonical = "(local (in-theory nil))" |
| 236 | +aliases = ["local-empty-theory", "anti-pattern-empty-theory"] |
| 237 | +tactic_class = "danger" |
| 238 | +notes = """ |
| 239 | +ANTI-PATTERN. Setting the theory to nil inside a local context defeats |
| 240 | +all standard rewriter behaviour and almost always indicates the author |
| 241 | +got stuck and bypassed normal proof discipline. |
| 242 | +""" |
| 243 | + |
| 244 | +# --------------------------------------------------------------------------- |
| 245 | +# ACL2s extensions (counterexample generation, contracts, data) |
| 246 | +# --------------------------------------------------------------------------- |
| 247 | + |
| 248 | +[[synonym]] |
| 249 | +canonical = "defdata" |
| 250 | +aliases = ["data-definition", "type-like-decl"] |
| 251 | +tactic_class = "decl" |
| 252 | +notes = """ |
| 253 | +ACL2s data definition. Generates recognisers, constructors, and the |
| 254 | +test-case generator hooks needed by `cgen`. The ACL2s analogue of an |
| 255 | +algebraic datatype. |
| 256 | +""" |
| 257 | + |
| 258 | +[[synonym]] |
| 259 | +canonical = "definec" |
| 260 | +aliases = ["definec-with-contracts", "contract-fn"] |
| 261 | +tactic_class = "decl" |
| 262 | +notes = """ |
| 263 | +ACL2s function definition with input/output contracts. Generates the |
| 264 | +guard, the type-of-each-input theorem, and the type-of-output theorem |
| 265 | +in one shot. |
| 266 | +""" |
| 267 | + |
| 268 | +[[synonym]] |
| 269 | +canonical = "defunc" |
| 270 | +aliases = ["defunc-with-contracts"] |
| 271 | +tactic_class = "decl" |
| 272 | +notes = "ACL2s `defun` + contracts. Older spelling kept for compatibility with the long-tail ACL2s book corpus." |
| 273 | + |
| 274 | +[[synonym]] |
| 275 | +canonical = "cgen" |
| 276 | +aliases = ["counterexample-generation", "test-then-prove"] |
| 277 | +tactic_class = "automation" |
| 278 | +notes = """ |
| 279 | +ACL2s counterexample generator. Runs random + targeted test cases |
| 280 | +against a conjecture before attempting the proof. The "test-then-prove" |
| 281 | +discipline. |
| 282 | +""" |
| 283 | + |
| 284 | +[[synonym]] |
| 285 | +canonical = "test?" |
| 286 | +aliases = ["check-conjecture", "cgen-only"] |
| 287 | +tactic_class = "automation" |
| 288 | +notes = """ |
| 289 | +Run `cgen` on a conjecture without attempting a real proof. Returns |
| 290 | +counterexamples if any. The fastest way to sanity-check a draft |
| 291 | +theorem statement before committing to the proof effort. |
| 292 | +""" |
0 commit comments