lean-search-discovery
Use when searching Mathlib for existing declarations, likely theorem names, relevant files, or proof ingredients before attempting a new Lean proof.
- License 许可
- CC-BY-4.0
- 最近更新
- 2026-11-14
- Stars
- ★ 12
- Forks
- 5
01 前言 Front Matter
- name
- lean-search-discovery
- description
- Use when searching Mathlib for existing declarations, likely theorem names, relevant files, or proof ingredients before attempting a new Lean proof.
02 资源文件 9
- 参考文档agents/openai.yaml253 B
- 参考文档INDEX.md2.9 KB
- 许可证LICENSE18.2 KB
- 参考文档LICENSES/Apache-2.0.txt11.1 KB
- 参考文档PROVENANCE.md2.6 KB
- 参考文档references/search-and-discovery.md11.5 KB
- 参考文档references/tools.md14.4 KB
- 参考文档SOURCES.md1.5 KB
- 参考文档THIRD_PARTY_NOTICES.md2.1 KB
03 SKILL.md 正文
Lean Search Discovery
Use this skill when the next bottleneck is not proving a statement from scratch, but finding the right declaration, namespace, import, or existing theorem. The default posture is: search before you prove.
Search Workflow
- Decide what you are searching for.
- a theorem name
- a namespace or file
- a rewrite lemma
- a theorem with a recognizable type signature
- Predict likely names from Mathlib conventions.
- use conclusion-driven names such as
foo_of_bar - translate symbols into name fragments like
mem,inter,union,nonneg,inj
- use conclusion-driven names such as
- Search locally first.
- inside Lean:
exact?,apply?,rw?,simp?,#check,#print - in the terminal:
rg,find,ls, targeted file inspection
- inside Lean:
- Verify every hit before using it.
- confirm the statement shape
- confirm the namespace and import path
- confirm the lemma is at the right level of generality
- Only after two or more search strategies fail should you assume the theorem is missing and start proving it yourself.
Local Search Rules
- Prefer
rgin.lake/packages/mathlib/Mathlibfor terminal search. - Search both likely names and nearby concepts.
- Limit output aggressively so inspection stays local and readable.
- After a hit, read the surrounding file rather than trusting the name alone.
In-Proof Search Rules
exact?is for “this goal should be one lemma.”apply?is for “this looks like the head of a useful theorem.”rw?is for normal-form mismatches.simp?is for turning exploratory simplification into explicitsimp only [...].- None of these should remain in finished code.
Online Search
If online access is available, use Loogle or LeanSearch when local name search is not enough. Treat them as discovery tools, not proof authorities: always verify the result locally with #check, #print, or direct file inspection.
References
- Read references/search-and-discovery.md for the full search workflow, theorem-name heuristics, and search-service guidance.
- Read references/tools.md when choosing between search tactics, terminal search, API docs, and broader workflow tools.
04 同仓库更多 Skills
zarr-python
Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3/GCS storage, and NumPy/Dask/Xarray integration. Use for array layout, bounded I/O, format migration, or scientific metadata preservation.
yeet
Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.
xarray
N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF/GRIB/Zarr files, climate/weather/oceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.
writing-mstest-tests
Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for "review" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected/actual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext/lifecycle; timeout/cancellation; OS/CI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest/non-.NET code.
wgs-prs
End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core/sarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti/Tv and Het/Hom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.