---
name: natural-transformations-39642d6371c9
description: "Problem-solving strategies for natural transformations in category theory"
allowed-tools: [Bash, Read]
---

# Natural Transformations

## When to Use

Use this skill when working on natural-transformations problems in category theory.

## Decision Tree


1. **Verify Naturality**
   - eta: F => G is natural transformation between functors F, G: C -> D
   - For each f: A -> B in C, diagram commutes:
     G(f) . eta_A = eta_B . F(f)
   - Write Lean 4: `theorem nat : η.app B ≫ G.map f = F.map f ≫ η.app A := η.naturality`

2. **Component Analysis**
   - eta_A: F(A) -> G(A) for each object A
   - Each component is morphism in target category D
   - Lean 4: `def η : F ⟶ G where app := fun X => ...`

3. **Natural Isomorphism**
   - Each component eta_A is isomorphism
   - Functors F and G are naturally isomorphic
   - Notation: F ≅ G (NatIso in Mathlib)

4. **Functor Category**
   - [C, D] has functors as objects
   - Natural transformations as morphisms
   - Vertical composition: Lean 4 `CategoryTheory.NatTrans.vcomp`
   - Horizontal composition: `CategoryTheory.NatTrans.hcomp`

5. **Yoneda Lemma Application**
   - Nat(Hom(A, -), F) ~ F(A) naturally in A
   - Lean 4: `CategoryTheory.yonedaEquiv`
   - Fully embeds C into [C^op, Set]
   - See: `.claude/skills/lean4-nat-trans/SKILL.md` for exact syntax


## Tool Commands

### Lean4_Naturality
```bash
# Lean 4: theorem nat : η.app B ≫ G.map f = F.map f ≫ η.app A := η.naturality
```

### Lean4_Nat_Trans
```bash
# Lean 4: def η : F ⟶ G where app := fun X => component_X
```

### Lean4_Yoneda
```bash
# Lean 4: CategoryTheory.yonedaEquiv -- Yoneda lemma
```

### Lean4_Build
```bash
lake build  # Compiler-in-the-loop verification
```

## Cognitive Tools Reference

See `.claude/skills/math-mode/SKILL.md` for full tool documentation.


---
Source attribution: vibeeval
Original project: https://github.com/vibeeval/vibecosystem/blob/3b763b1fb288f57bfa3cce76ef18184b96461a78/skills/math/category-theory/natural-transformations/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 vibeeval

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: vibeeval
Original project: https://github.com/vibeeval/vibecosystem/blob/3b763b1fb288f57bfa3cce76ef18184b96461a78/skills/math/category-theory/natural-transformations/SKILL.md
Attribution basis: Source repository record

Fields of work: Data & Analytics, Design, Education & Research
Roles: Data Scientist, Researcher, UX Designer
Specialties: API
Tools: Lean4
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: f7dc9efd6542d6283b683f1436aefc9d3ce622a1333f0769455d66f00b86a65d
