lean-math-discrete

Formalize graph theory, lattices, and discrete structures in Lean 4 using Mathlib4 patterns.

2|Updated May 26, 2026
One-click install
npx skills add https://github.com/r-irbe/proof-skills --skill lean-math-discrete
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lean-math-discrete
Source: https://github.com/r-irbe/proof-skills/tree/main/skills/lean-math-discrete
Command: npx skills add https://github.com/r-irbe/proof-skills --skill lean-math-discrete

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a structured approach to formalizing graphs, lattices, and discrete structures in Lean 4, enabling rigorous proofs and reusable patterns across projects.

Core Features & Use Cases

  • Graph theory and lattice pattern templates aligned with Mathlib4 APIs.
  • Provenance-style handoffs and cross-reference guidance to related skills (e.g., lean-proof, lean-math-foundations).
  • Reference material and encyclopaedia guidance for rapid lookup during proof development.

Quick Start

Load this skill in your Lean 4 environment and begin by mapping your discrete problem (graph, lattice, or combinatorics) to the corresponding Mathlib pattern using the provided routing guidance.

Frequently Asked Questions about lean-math-discrete

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

FAQPage Schema
How do I formalize graph theory proofs in Lean 4?

To formalize graph theory in Lean 4, map your discrete problem to the corresponding Mathlib4 API patterns. This skill provides structured templates and routing guidance to translate graph algorithms into rigorous Lean 4 proofs.

What is the best way to prove lattice theory statements using Mathlib4?

Proving lattice theory statements in Mathlib4 requires mapping poset and lattice reasoning to existing APIs. This skill provides pattern templates aligned with Mathlib4 to support rigorous proofs of discrete structures.

Can I use this skill for combinatorial proofs and discrete math structures?

Yes, you can use this skill for combinatorial proofs and discrete math structures in Lean 4. It supports formalizing discrete structures by applying modular routing and cross-reference guidance to Mathlib4.

Do I need Lean 4 and Mathlib4 to formalize discrete structures with this skill?

Yes, you need a Lean 4 environment and Mathlib4 to formalize discrete structures. The skill relies on Mathlib4 APIs and patterns to enable rigorous proofs of graphs, lattices, and combinatorial problems.

How do I map discrete math problems to Mathlib APIs in Lean 4?

To map discrete math problems to Mathlib APIs in Lean 4, use the provided routing guidance and pattern templates. The skill implements a modular handoff contract to direct you to the correct Mathlib4 structures for your proofs.