Search formal math (Loogle/LeanSearch)
search_formal_mathRetrieve formal Lean names and types of math theorems by searching mathlib via pattern or natural language queries.
Instructions
Find mathlib DECLARATIONS (name + type) via the public Loogle (pattern/type queries like '?a * ?b = ?b * ?a') and LeanSearch (natural-language queries) services — the ONE tool that itself calls the web; honest 'service unavailable' if down. Use when you need the formal Lean name/type of a result, e.g. before writing a verify_formal snippet. Args: query, k (default 10), backend ('auto'|'loogle'|'leansearch').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | natural language (leansearch) or a Loogle pattern/type query | |
| k | No | max merged hits (default 10) | |
| backend | No | 'loogle' = pattern/type, 'leansearch' = natural language, 'auto' = both (default) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| backend | No | ||
| backends | No | per-service block {available, hits, error} | |
| hits | Yes | ||
| note | No |