categories-functors
Provides strategies and proofs for category theory problems using Lean 4.
Install
mkdir -p .claude/skills/categories-functors && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3770" && unzip -o skill.zip -d .claude/skills/categories-functors && rm skill.zipInstalls to .claude/skills/categories-functors
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Problem-solving strategies for categories functors in category theoryKey capabilities
- →Verify category axioms like identity and associativity
- →Check functor properties such as identity and composition preservation
- →Identify different functor types like covariant or contravariant
- →Recognize common functors such as forgetful or Hom functors
- →Construct proofs for category theory concepts using Lean 4
- →Verify mathematical proofs with `lake build`
How it works
This skill guides users through verifying category axioms and functor properties, identifying functor types, and constructing proofs using Lean 4 with the Mathlib library.
Inputs & outputs
When to use categories-functors
- →Verify category axioms
- →Prove functor composition laws
- →Implement category theory structures in Lean 4
About this skill
Categories Functors
When to Use
Use this skill when working on categories-functors problems in category theory.
Decision Tree
-
Verify Category Axioms
- Objects and morphisms (arrows) defined?
- Identity morphism for each object: id_A: A -> A
- Composition associative: (f . g) . h = f . (g . h)
- Write Lean 4:
theorem assoc : (f ≫ g) ≫ h = f ≫ (g ≫ h) := Category.assoc
-
Check Functor Properties
- F: C -> D maps objects to objects, arrows to arrows
- Preserves identity: F(id_A) = id_{F(A)}
- Preserves composition: F(g . f) = F(g) . F(f)
- Write Lean 4:
theorem comp : F.map (g ≫ f) = F.map g ≫ F.map f := F.map_comp
-
Functor Types
- Covariant: preserves arrow direction
- Contravariant: reverses arrow direction
- Faithful/Full: injective/surjective on Hom-sets
- Equivalence: full, faithful, essentially surjective
-
Common Functors
- Forgetful functor: forgets structure (e.g., Grp -> Set)
- Free functor: left adjoint to forgetful
- Hom functor: Hom(A, -) or Hom(-, B)
- Power set functor: Set -> Set via X |-> P(X)
-
Verify with Lean 4
- Compiler-in-the-loop: write proof,
lake buildchecks - Mathlib has full category theory library
- See:
.claude/skills/lean4-functors/SKILL.mdfor exact syntax
- Compiler-in-the-loop: write proof,
Tool Commands
Lean4_Category
# Lean 4 with Mathlib: import CategoryTheory.Category.Basic
Lean4_Functor
# Lean 4: theorem map_comp (F : C ⥤ D) : F.map (g ≫ f) = F.map g ≫ F.map f := F.map_comp
Lean4_Build
lake build # Compiler-in-the-loop verification
Cognitive Tools Reference
See .claude/skills/math-mode/SKILL.md for full tool documentation.
Prerequisites
How it compares
This approach uses a compiler-in-the-loop with Lean 4 and Mathlib to formally verify mathematical proofs, providing a rigorous check beyond manual reasoning.
Compared to similar skills
categories-functors side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| categories-functors (this skill) | 1 | 7mo | Review | Advanced |
| literature-review | 559 | 2mo | Review | Advanced |
| openalex-database | 48 | 7mo | Review | Intermediate |
| market-research-reports | 38 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by parcadei
View all by parcadei →You might also like
literature-review
K-Dense-AI
Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).
openalex-database
davila7
Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.
market-research-reports
davila7
Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for data gathering, and multi-framework strategic analysis including Porter's Five Forces, PESTLE, SWOT, TAM/SAM/SOM, and BCG Matrix.
scientific-brainstorming
davila7
Research ideation partner. Generate hypotheses, explore interdisciplinary connections, challenge assumptions, develop methodologies, identify research gaps, for creative scientific problem-solving.
exa-search
benjaminjackson
Search the web for content matching a query with AI-powered semantic search. Use for finding relevant web pages, research papers, news articles, code repositories, or any web content by meaning rather than just keywords.
scientific-critical-thinking
davila7
Evaluate research rigor. Assess methodology, experimental design, statistical validity, biases, confounding, evidence quality (GRADE, Cochrane ROB), for critical analysis of scientific claims.