Skip to content

Commit 197378a

Browse files
committed
chore: Fix some porting notes and make some defs computable again. (#10062)
These are some auxiliary definitions for the monoidal structure on a category induced by binary products and terminal objects.
1 parent 86ffe04 commit 197378a

File tree

1 file changed

+2
-20
lines changed
  • Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts

1 file changed

+2
-20
lines changed

Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Basic.lean

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ which seems less often useful.
3030

3131
universe v u
3232

33-
noncomputable section
3433

3534
namespace CategoryTheory
3635

@@ -190,16 +189,7 @@ def BinaryFan.associatorOfLimitCone (L : ∀ X Y : C, LimitCone (pair X Y)) (X Y
190189
def BinaryFan.leftUnitor {X : C} {s : Cone (Functor.empty.{v} C)} (P : IsLimit s)
191190
{t : BinaryFan s.pt X} (Q : IsLimit t) : t.pt ≅ X where
192191
hom := t.snd
193-
inv :=
194-
Q.lift
195-
(BinaryFan.mk
196-
(P.lift
197-
{ pt := X, π :=
198-
-- Porting note: there is something fishy here:
199-
-- `PEmpty.rec x x` should not even typecheck.
200-
{ app := fun x => Discrete.rec (fun x => PEmpty.rec.{_, v+1} x x) x } })
201-
(𝟙 X))
202-
-- Porting note: this should be automatable:
192+
inv := Q.lift <| BinaryFan.mk (P.lift ⟨_, fun x => x.as.elim, fun {x} => x.as.elim⟩) (𝟙 _)
203193
hom_inv_id := by
204194
apply Q.hom_ext
205195
rintro ⟨⟨⟩⟩
@@ -214,15 +204,7 @@ def BinaryFan.leftUnitor {X : C} {s : Cone (Functor.empty.{v} C)} (P : IsLimit s
214204
def BinaryFan.rightUnitor {X : C} {s : Cone (Functor.empty.{v} C)} (P : IsLimit s)
215205
{t : BinaryFan X s.pt} (Q : IsLimit t) : t.pt ≅ X where
216206
hom := t.fst
217-
inv :=
218-
Q.lift
219-
(BinaryFan.mk (𝟙 X)
220-
(P.lift
221-
{ pt := X
222-
π :=
223-
-- Porting note: there is something fishy here:
224-
-- `PEmpty.rec x x` should not even typecheck.
225-
{ app := fun x => Discrete.rec (fun x => PEmpty.rec.{_, v+1} x x) x } }))
207+
inv := Q.lift <| BinaryFan.mk (𝟙 _) <| P.lift ⟨_, fun x => x.as.elim, fun {x} => x.as.elim⟩
226208
hom_inv_id := by
227209
apply Q.hom_ext
228210
rintro ⟨⟨⟩⟩

0 commit comments

Comments
 (0)