File contents 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 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.
1 --- 2 name: categories-functors 3 description: Categories Functors 4 --- 5 6 # Categories Functors 7 8 ## When to Use 9 10 Use this skill when working on categories-functors problems in category theory. 11 12 ## Decision Tree 13 14 15 1. **Verify Category Axioms** 16 - Objects and morphisms (arrows) defined? 17 - Identity morphism for each object: id_A: A -> A 18 - Composition associative: (f . g) . h = f . (g . h) 19 - Write Lean 4: `theorem assoc : (f ≫ g) ≫ h = f ≫ (g ≫ h) := Category.assoc` 20 21 2. **Check Functor Properties** 22 - F: C -> D maps objects to objects, arrows to arrows 23 - Preserves identity: F(id_A) = id_{F(A)} 24 - Preserves composition: F(g . f) = F(g) . F(f) 25 - Write Lean 4: `theorem comp : F.map (g ≫ f) = F.map g ≫ F.map f := F.map_comp` 26 27 3. **Functor Types** 28 - Covariant: preserves arrow direction 29 - Contravariant: reverses arrow direction 30 - Faithful/Full: injective/surjective on Hom-sets 31 - Equivalence: full, faithful, essentially surjective 32 33 4. **Common Functors** 34 - Forgetful functor: forgets structure (e.g., Grp -> Set) 35 - Free functor: left adjoint to forgetful 36 - Hom functor: Hom(A, -) or Hom(-, B) 37 - Power set functor: Set -> Set via X |-> P(X) 38 39 5. **Verify with Lean 4** 40 - Compiler-in-the-loop: write proof, `lake build` checks 41 - Mathlib has full category theory library 42 - See: `.claude/skills/lean4-functors/SKILL.md` for exact syntax 43 44 45 ## Tool Commands 46 47 ### Lean4_Category 48 ```bash 49 # Lean 4 with Mathlib: import CategoryTheory.Category.Basic 50 ``` 51 52 ### Lean4_Functor 53 ```bash 54 # Lean 4: theorem map_comp (F : C ⥤ D) : F.map (g ≫ f) = F.map g ≫ F.map f := F.map_comp 55 ``` 56 57 ### Lean4_Build 58 ```bash 59 lake build # Compiler-in-the-loop verification 60 ``` 61 62 ## Cognitive Tools Reference 63 64 See `.claude/skills/math-mode/SKILL.md` for full tool documentation.
DojoGenesis/plugins/tree/main/plugins/community-skills/skills/categories-functors commit 9dd7eeb284
Frequently asked questions How do I install the Categories Functors skill? Run npx skillmds@latest add dojogenesis/categories-functors in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Categories Functors skill do? Categories Functors It is listed under Coding & Dev Tools on SkillMD.
Is Categories Functors safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Categories Functors? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Categories Functors free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Categories Functors? DojoGenesis (@dojogenesis) published this skill. Their other Agent Skills are listed on their SkillMD profile.