Zulip Chat Archive

Stream: Is there code for X?

Topic: (Category of) Families of Sets


Chris Henson (Oct 16 2024 at 22:19):

Does something like this already exist?

import Mathlib
namespace CategoryTheory

structure Fam where
  X₀ : Type
  X₁ : X₀  Type

instance : Category Fam where
  Hom B C := by
    let {X₀ := B₀, X₁ := B₁} := B
    let {X₀ := C₀, X₁ := C₁} := C
    exact Σ(f₀ : B₀  C₀),  b : B₀, B₁ b  C₁ (f₀ b)
  id X := by exact id, fun _ => id
  comp := by simp; aesop_cat

nrs (Oct 16 2024 at 22:22):

this looks like PFunctor

Chris Henson (Oct 16 2024 at 22:25):

You're right, thanks!


Last updated: May 02 2025 at 03:31 UTC