lean-math-discrete
Skill3 starsChanged 24 days agoApache-2.0View on GitHub
USE FOR: graph theory, applied lattice theory, combinatorics, DAGs, posets, provenance chains, dependency orders. DO NOT USE FOR: the abstract algebraic typeclass tower (@lean-math-foundations). TRIGGERS: graph, DAG, lattice, poset, combinatorics, provenance.
In this repository65 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-guard-judge-evalSkill
- applied-data-information-securitySkill
- applied-engineering-disciplinesSkill
- applied-legal-reasoningSkill
- epistemic-discovery-engineSkill
- epistemic-mappingSkill
- hol-metamath-adapterSkill
- isabelle-isar-adapterSkill
- itp-cross-portingSkill
- lean-ai-formalizationSkill
- lean-applied-reasoningSkill
- lean-axiom-closureSkill
- lean-bigraph-modelingSkill
- lean-bisectSkill
- lean-blueprintSkill
- lean-buildSkill
- lean-causal-reasoningSkill
- lean-competitive-mathSkill
- lean-convergence-verificationSkill
- lean-core-onlySkill
- lean-dag-visualizerSkill
- lean-deep-auditSkill
- lean-doc-feedbackSkill
- lean-doc-improvementSkill
- lean-doc-requirementsSkill
- lean-enforcementSkill
- lean-formalization-breakdownSkill
- lean-gatewaySkill
- lean-integration-protocolSkill
- lean-knowledge-formalizationSkill
- lean-math-analysisSkill
- lean-math-dynamicalSkill
- lean-math-foundationsSkill
- lean-math-optimizationSkill
- lean-math-stochasticSkill
- lean-mweSkill
- lean-nested-learningSkill
- lean-package-researchSkill
- lean-pedagogical-expositionSkill
- lean-proof-refactorSkill
- lean-proof-repairSkill
- lean-proof-reviewSkill
- lean-proofSkill
- lean-prSkill
- lean-quality-engineSkill
- lean-replay-verificationSkill
- lean-reportSkill
- lean-researchSkill
- lean-retroactive-auditSkill
- lean-retro-methodologySkill
- lean-review-councilSkill
- lean-security-formalizationSkill
- lean-setupSkill
- lean-specificationSkill
- lean-tautology-triageSkill
- lean-upstream-portingSkill
- lean-vendor-substrateSkill
- lean-zettelkastenSkill
- math-product-managementSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
STOP if cardinality blows up or a Fintype instance cannot be synthesised — handoff to @lean-math-foundations for the instance plumbing.
- Very specific: line 46
STOP if the lattice instance you need does not exist at the current Mathlib pin — escalate to @lean-research, then author the instance …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lean 4 Discrete Mathematics & Graph Theory
Guide to formalizing graphs, lattices, combinatorics, and discrete structures in Lean 4.
Routing
- USE FOR: graph theory, applied lattice theory, combinatorics, DAGs, posets, provenance chains, dependency orders, lattice operations (severity / quality-gate / trust-vector / information-flow lattices), combinatorial bounds, and finite structures in Lean 4. Owns all applied lattice instances.
- DO NOT USE FOR: the abstract algebraic typeclass tower (delegate to
@lean-math-foundations); continuous structures (delegate to@lean-math-analysis); writing one specific proof (delegate to@lean-proof).
Workflow
- Identify the discrete structure (graph, lattice, poset, finite set, combinatorial relation).
- Map to the matching
Mathlib.Combinatorics.*/Mathlib.Order.*API and read the relevant Part below. - Apply the pattern; handoff to
@lean-prooffor the concrete proof and to@lean-math-foundationsif aDecidableEq/Fintypeinstance is missing.
Recovery & STOP
- STOP if cardinality blows up or a
Fintypeinstance cannot be synthesised — handoff to@lean-math-foundationsfor the instance plumbing. - STOP if the lattice instance you need does not exist at the current Mathlib pin — escalate to
@lean-research, then author the instance under@lean-proof.
Handoffs
- Predecessors:
agent:gateway,skill:lean-proof(mid-proof graph or lattice goal),skill:lean-research(combinatorial result survey). - Successors:
skill:lean-proof(apply the discrete pattern),skill:lean-proof-review(audit the instance),skill:lean-math-foundations(typeclass / decidability plumbing).
Detailed reference
Full encyclopedic reference, decision trees, and lookup tables live in
references/lean-math-discrete-handbook.md .
See also
../../references/lean-math-discrete-handbook.md-- Completelean-math-discreteHandbook../lean-gateway/SKILL.md-- Top-level skill router
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

