Lean4
/-- The product `Xᶥ` is the vertex of a limit cone on `wideCospan ι X`. -/
def limitCone [Finite ι] (X : C) : LimitCone (wideCospan ι X)
where
cone :=
{ pt := ∏ᶜ fun _ : ι => X
π :=
{ app := fun X => Option.casesOn X (terminal.from _) fun i => limit.π _ ⟨i⟩
naturality := fun i j f => by
cases f
· cases i
all_goals simp
· simp only [Functor.const_obj_obj, Functor.const_obj_map, terminal.comp_from]
subsingleton } }
isLimit :=
{ lift := fun s => Limits.Pi.lift fun j => s.π.app (some j)
fac := fun s j => Option.casesOn j (by subsingleton) fun _ => limit.lift_π _ _
uniq := fun s f h => by
dsimp
ext j
dsimp only [Limits.Pi.lift]
rw [limit.lift_π]
dsimp
rw [← h (some j)] }