loogle-search

Search Mathlib for lemmas by type signature patterns.

3.9k|296|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/parcadei/Continuous-Claude-v3 --skill loogle-search-parcadei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loogle-search
Source: https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/loogle-search
Command: npx skills add https://github.com/parcadei/Continuous-Claude-v3 --skill loogle-search-parcadei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users find specific mathematical lemmas within the Mathlib library by searching based on patterns in their type signatures, especially when the lemma's name is unknown.

Core Features & Use Cases

  • Type-Directed Search: Find lemmas that match a given type shape, useful for proof-oriented development.
  • Pattern Matching: Supports wildcards (_) and type variables (?a) for flexible queries.
  • Use Case: When writing a Lean proof and needing a lemma that transforms a list of elements to a list of their mapped values, you can search for (?a → ?b) → List ?a → List ?b to find relevant functions like List.map.

Quick Start

Use loogle-search to find lemmas matching the pattern 'Nontrivial _ ↔ _'.

Frequently Asked Questions about loogle-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for Mathlib lemmas by type signature in Lean?

To search for Mathlib lemmas by type signature, you can query using functional shape patterns with wildcards (`_`) and type variables (`?a`) to find theorems when their names are unknown.

What is type-directed theorem search for formal verification?

Type-directed theorem search is finding mathematical lemmas by matching their type signature shape rather than their name, which supports proof automation and exploration in formal verification environments.

How do I find a Lean lemma that transforms List ?a to List ?b?

You can find a Lean lemma transforming lists by searching the pattern `(?a → ?b) → List ?a → List ?b`, which returns matching functions like `List.map` from the Mathlib library.

Do I need a local Loogle index to search Mathlib by type signature?

Yes, you need a local or server-based Loogle index to efficiently query the Mathlib library and retrieve lemmas matching your specified type signature patterns.

Can I use wildcards when searching for theorems in Mathlib?

Yes, you can use wildcards (`_`) and type variables (`?a`) when searching for theorems in Mathlib to perform flexible pattern matching against type signatures.

What is the best way to discover unknown lemmas in a Lean proof?

The best way to discover unknown lemmas in a Lean proof is type signature search, which matches the functional shape of the transformation you need, such as querying `Nontrivial _ ↔ _`.