Repository navigation
v0.58.0
Finding a lemma to cite. prooflang find PATTERN lists the theorems
whose statement contains the pattern, a ProofLang proposition or term in
which each _ is a hole: find '_ ∣ _ * _', find '_ * _ > 0'.
- Matched on meaning, not text. The pattern, a proposition or a term
(_ × _), is elaborated in the scope of the searched modules and
matched against their elaborated IR, in a theorem's goal or in the type
of one of its context entries, insidematcharms too: a bound
variable's name does not matter, an operator matches at any carrier
(_ * _in a group and in ℕ), and a numeral at any type, with what it
fixes (_ ∈ {0, 1}matches a set of reals). Every_is a hole, even
under a binder named_. - Each match comes with its statement as a sequent, its obligation id
(whatsubmittakes), the last build's verdict, where it matched (the
goal, or which hypothesis, variable or instance), and how to cite it:
strategy simplify(using = [M.dvd_mul])for a project theorem,
qualified (two imported modules may share a name), whichsubmit --strategyaccepts as given. - Several projects are searched together: one whose scope lacks a name
the pattern uses is skipped; the pattern fails only when it elaborates in
none. --lean MODULEsearches a Lean module instead (find '_ < _ → _ ≤ _' --lean Mathlib.Order.Basic), asimport-lean --allimports it: only
what the importer can express (and self-checks) is searched; each match
carries its Lean name, cited asby: exact <name> ….--format jsonis one document for agents, pinned by a golden
(test/golden/cli/find.json).- Outside a pattern,
_is a name as before: a project'sa = _is an
unknown name, not a hole.