CA

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.zip

Installs 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 theory
69 charsno explicit “when” trigger
Advanced

Key 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

You give it
A problem or concept in category theory involving categories and functors
You get back
A verified proof or analysis of category and functor properties

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

  1. 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
  2. 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
  3. Functor Types

    • Covariant: preserves arrow direction
    • Contravariant: reverses arrow direction
    • Faithful/Full: injective/surjective on Hom-sets
    • Equivalence: full, faithful, essentially surjective
  4. 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)
  5. Verify with Lean 4

    • Compiler-in-the-loop: write proof, lake build checks
    • Mathlib has full category theory library
    • See: .claude/skills/lean4-functors/SKILL.md for exact syntax

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

Lean 4Mathlib

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.

SkillInstallsUpdatedSafetyDifficulty
categories-functors (this skill)17moReviewAdvanced
literature-review5592moReviewAdvanced
openalex-database487moReviewIntermediate
market-research-reports387moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

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.).

5591,298

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.

48202

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.

38162

scientific-brainstorming

davila7

Research ideation partner. Generate hypotheses, explore interdisciplinary connections, challenge assumptions, develop methodologies, identify research gaps, for creative scientific problem-solving.

37155

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.

9106

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.

1888

Search skills

Search the agent skills registry