l3lab/ntp-mathlib huggingface dataset:
/-- The pi-type is a limit cone for the product. -/
def isProduct (J : Type v) (f : J → ωCPO) : IsLimit (product f) where
  lift s :=
    -- Porting note: Original proof didn't have `.toFun`
    ⟨⟨fun t j => (s.π.app ⟨j⟩).toFun t, fun x y h j => (s.π.app ⟨j⟩).monotone h⟩,
      fun x => funext fun j => (s.π.app ⟨j⟩).continuous x⟩
  uniq s m w := by
    

Proof state:
J : Type v
f : J → ωCPO
s : Cone (Discrete.functor f)
m : s.pt ⟶ (product f).pt
w : ∀ (j : Discrete J), m ≫ (product f).π.app j = s.π.app j
⊢ m =
    (fun s =>
        {
          toOrderHom :=
            { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
              monotone' :=
                (_ : ∀ (x y : ↑s.pt), x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) },
          cont :=
            (_ :
              ∀ (x : Chain ↑s.pt),
                { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
                      monotone' :=
                        (_ : ∀ (x y : ↑s.pt), x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) }
                    (ωSup x) =
                  ωSup
                    (Chain.map x
                      { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
                        monotone' :=
                          (_ :
                            ∀ (x y : ↑s.pt),
                              x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) })) })
      s

Next tactic:
ext t
/-- The pi-type is a limit cone for the product. -/
def isProduct (J : Type v) (f : J → ωCPO) : IsLimit (product f) where
  lift s :=
    -- Porting note: Original proof didn't have `.toFun`
    ⟨⟨fun t j => (s.π.app ⟨j⟩).toFun t, fun x y h j => (s.π.app ⟨j⟩).monotone h⟩,
      fun x => funext fun j => (s.π.app ⟨j⟩).continuous x⟩
  uniq s m w := by
    ext t; 

Proof state:
case w
J : Type v
f : J → ωCPO
s : Cone (Discrete.functor f)
m : s.pt ⟶ (product f).pt
w : ∀ (j : Discrete J), m ≫ (product f).π.app j = s.π.app j
t : (forget ωCPO).obj s.pt
⊢ m t =
    ((fun s =>
          {
            toOrderHom :=
              { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
                monotone' :=
                  (_ : ∀ (x y : ↑s.pt), x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) },
            cont :=
              (_ :
                ∀ (x : Chain ↑s.pt),
                  { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
                        monotone' :=
                          (_ : ∀ (x y : ↑s.pt), x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) }
                      (ωSup x) =
                    ωSup
                      (Chain.map x
                        { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
                          monotone' :=
                            (_ :
                              ∀ (x y : ↑s.pt),
                                x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) })) })
        s)
      t

Next tactic:
funext j
/-- The pi-type is a limit cone for the product. -/
def isProduct (J : Type v) (f : J → ωCPO) : IsLimit (product f) where
  lift s :=
    -- Porting note: Original proof didn't have `.toFun`
    ⟨⟨fun t j => (s.π.app ⟨j⟩).toFun t, fun x y h j => (s.π.app ⟨j⟩).monotone h⟩,
      fun x => funext fun j => (s.π.app ⟨j⟩).continuous x⟩
  uniq s m w := by
    ext t; funext j -- Porting note: Originally `ext t j`
    

Proof state:
case w.h
J : Type v
f : J → ωCPO
s : Cone (Discrete.functor f)
m : s.pt ⟶ (product f).pt
w : ∀ (j : Discrete J), m ≫ (product f).π.app j = s.π.app j
t : (forget ωCPO).obj s.pt
j : J
⊢ m t j =
    ((fun s =>
          {
            toOrderHom :=
              { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
                monotone' :=
                  (_ : ∀ (x y : ↑s.pt), x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) },
            cont :=
              (_ :
                ∀ (x : Chain ↑s.pt),
                  { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
                        monotone' :=
                          (_ : ∀ (x y : ↑s.pt), x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) }
                      (ωSup x) =
                    ωSup
                      (Chain.map x
                        { toFun := fun t j => OrderHom.toFun (s.π.app { as := j }).toOrderHom t,
                          monotone' :=
                            (_ :
                              ∀ (x y : ↑s.pt),
                                x ≤ y → ∀ (j : J), (s.π.app { as := j }) x ≤ (s.π.app { as := j }) y) })) })
        s)
      t j

Next tactic:
change m.toFun t j = (s.π.app ⟨j⟩).toFun t
/-- The pi-type is a limit cone for the product. -/
def isProduct (J : Type v) (f : J → ωCPO) : IsLimit (product f) where
  lift s :=
    -- Porting note: Original proof didn't have `.toFun`
    ⟨⟨fun t j => (s.π.app ⟨j⟩).toFun t, fun x y h j => (s.π.app ⟨j⟩).monotone h⟩,
      fun x => funext fun j => (s.π.app ⟨j⟩).continuous x⟩
  uniq s m w := by
    ext t; funext j -- Porting note: Originally `ext t j`
    change m.toFun t j = (s.π.app ⟨j⟩).toFun t
    

Proof state:
case w.h
J : Type v
f : J → ωCPO
s : Cone (Discrete.functor f)
m : s.pt ⟶ (product f).pt
w : ∀ (j : Discrete J), m ≫ (product f).π.app j = s.π.app j
t : (forget ωCPO).obj s.pt
j : J
⊢ OrderHom.toFun m.toOrderHom t j = OrderHom.toFun (s.π.app { as := j }).toOrderHom t

Next tactic:
rw [← w ⟨j⟩]
/-- The pi-type is a limit cone for the product. -/
def isProduct (J : Type v) (f : J → ωCPO) : IsLimit (product f) where
  lift s :=
    -- Porting note: Original proof didn't have `.toFun`
    ⟨⟨fun t j => (s.π.app ⟨j⟩).toFun t, fun x y h j => (s.π.app ⟨j⟩).monotone h⟩,
      fun x => funext fun j => (s.π.app ⟨j⟩).continuous x⟩
  uniq s m w := by
    ext t; funext j -- Porting note: Originally `ext t j`
    change m.toFun t j = (s.π.app ⟨j⟩).toFun t
    rw [← w ⟨j⟩]
    

Proof state:
case w.h
J : Type v
f : J → ωCPO
s : Cone (Discrete.functor f)
m : s.pt ⟶ (product f).pt
w : ∀ (j : Discrete J), m ≫ (product f).π.app j = s.π.app j
t : (forget ωCPO).obj s.pt
j : J
⊢ OrderHom.toFun m.toOrderHom t j = OrderHom.toFun (m ≫ (product f).π.app { as := j }).toOrderHom t

Next tactic:
rfl
instance omegaCompletePartialOrderEqualizer {α β : Type*} [OmegaCompletePartialOrder α]
    [OmegaCompletePartialOrder β] (f g : α →𝒄 β) :
    OmegaCompletePartialOrder { a : α // f a = g a } :=
  OmegaCompletePartialOrder.subtype _ fun c hc => by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f g : α →𝒄 β
c : Chain α
hc : ∀ i ∈ c, f i = g i
⊢ f (ωSup c) = g (ωSup c)

Next tactic:
rw [f.continuous, g.continuous]
instance omegaCompletePartialOrderEqualizer {α β : Type*} [OmegaCompletePartialOrder α]
    [OmegaCompletePartialOrder β] (f g : α →𝒄 β) :
    OmegaCompletePartialOrder { a : α // f a = g a } :=
  OmegaCompletePartialOrder.subtype _ fun c hc => by
    rw [f.continuous, g.continuous]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f g : α →𝒄 β
c : Chain α
hc : ∀ i ∈ c, f i = g i
⊢ ωSup (Chain.map c ↑f) = ωSup (Chain.map c ↑g)

Next tactic:
congr 1
instance omegaCompletePartialOrderEqualizer {α β : Type*} [OmegaCompletePartialOrder α]
    [OmegaCompletePartialOrder β] (f g : α →𝒄 β) :
    OmegaCompletePartialOrder { a : α // f a = g a } :=
  OmegaCompletePartialOrder.subtype _ fun c hc => by
    rw [f.continuous, g.continuous]
    congr 1
    

Proof state:
case e_a
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f g : α →𝒄 β
c : Chain α
hc : ∀ i ∈ c, f i = g i
⊢ Chain.map c ↑f = Chain.map c ↑g

Next tactic:
apply OrderHom.ext
instance omegaCompletePartialOrderEqualizer {α β : Type*} [OmegaCompletePartialOrder α]
    [OmegaCompletePartialOrder β] (f g : α →𝒄 β) :
    OmegaCompletePartialOrder { a : α // f a = g a } :=
  OmegaCompletePartialOrder.subtype _ fun c hc => by
    rw [f.continuous, g.continuous]
    congr 1
    apply OrderHom.ext; 

Proof state:
case e_a.h
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f g : α →𝒄 β
c : Chain α
hc : ∀ i ∈ c, f i = g i
⊢ ⇑(Chain.map c ↑f) = ⇑(Chain.map c ↑g)

Next tactic:
funext x
instance omegaCompletePartialOrderEqualizer {α β : Type*} [OmegaCompletePartialOrder α]
    [OmegaCompletePartialOrder β] (f g : α →𝒄 β) :
    OmegaCompletePartialOrder { a : α // f a = g a } :=
  OmegaCompletePartialOrder.subtype _ fun c hc => by
    rw [f.continuous, g.continuous]
    congr 1
    apply OrderHom.ext; funext x -- Porting note: Originally `ext`
    

Proof state:
case e_a.h.h
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f g : α →𝒄 β
c : Chain α
hc : ∀ i ∈ c, f i = g i
x : ℕ
⊢ (Chain.map c ↑f) x = (Chain.map c ↑g) x

Next tactic:
apply hc _ ⟨_, rfl⟩
/-- The equalizer fork is a limit. -/
def isEqualizer {X Y : ωCPO.{v}} (f g : X ⟶ Y) : IsLimit (equalizer f g) :=
  Fork.IsLimit.mk' _ fun s =>
    -- Porting note: Changed `s.ι x` to `s.ι.toFun x`
    ⟨{  toFun := fun x => ⟨s.ι.toFun x, by 

Proof state:
X Y : ωCPO
f g : X ⟶ Y
s : Fork f g
x : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)
⊢ OrderHom.toFun f.toOrderHom (OrderHom.toFun (Fork.ι s).toOrderHom x) =
    OrderHom.toFun g.toOrderHom (OrderHom.toFun (Fork.ι s).toOrderHom x)

Next tactic:
apply ContinuousHom.congr_fun s.condition
/-- The equalizer fork is a limit. -/
def isEqualizer {X Y : ωCPO.{v}} (f g : X ⟶ Y) : IsLimit (equalizer f g) :=
  Fork.IsLimit.mk' _ fun s =>
    -- Porting note: Changed `s.ι x` to `s.ι.toFun x`
    ⟨{  toFun := fun x => ⟨s.ι.toFun x, by apply ContinuousHom.congr_fun s.condition⟩
        monotone' := fun x y h => s.ι.monotone h
        cont := fun x => Subtype.ext (s.ι.continuous x) }, by 

Proof state:
X Y : ωCPO
f g : X ⟶ Y
s : Fork f g
⊢ {
        toOrderHom :=
          {
            toFun := fun x =>
              { val := OrderHom.toFun (Fork.ι s).toOrderHom x, property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
            monotone' :=
              (_ :
                ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                  x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) },
        cont :=
          (_ :
            ∀ (x : Chain ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
              {
                    toFun := fun x =>
                      { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                        property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
                    monotone' :=
                      (_ :
                        ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                          x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) }
                  (ωSup x) =
                ωSup
                  (Chain.map x
                    {
                      toFun := fun x =>
                        { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                          property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
                      monotone' :=
                        (_ :
                          ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                            x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) })) } ≫
      Fork.ι (equalizer f g) =
    Fork.ι s

Next tactic:
ext
/-- The equalizer fork is a limit. -/
def isEqualizer {X Y : ωCPO.{v}} (f g : X ⟶ Y) : IsLimit (equalizer f g) :=
  Fork.IsLimit.mk' _ fun s =>
    -- Porting note: Changed `s.ι x` to `s.ι.toFun x`
    ⟨{  toFun := fun x => ⟨s.ι.toFun x, by apply ContinuousHom.congr_fun s.condition⟩
        monotone' := fun x y h => s.ι.monotone h
        cont := fun x => Subtype.ext (s.ι.continuous x) }, by ext; 

Proof state:
case w
X Y : ωCPO
f g : X ⟶ Y
s : Fork f g
x✝ : (forget ωCPO).obj (((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)
⊢ ({
          toOrderHom :=
            {
              toFun := fun x =>
                { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                  property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
              monotone' :=
                (_ :
                  ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                    x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) },
          cont :=
            (_ :
              ∀ (x : Chain ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                {
                      toFun := fun x =>
                        { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                          property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
                      monotone' :=
                        (_ :
                          ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                            x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) }
                    (ωSup x) =
                  ωSup
                    (Chain.map x
                      {
                        toFun := fun x =>
                          { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                            property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
                        monotone' :=
                          (_ :
                            ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                              x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) })) } ≫
        Fork.ι (equalizer f g))
      x✝ =
    (Fork.ι s) x✝

Next tactic:
rfl
/-- The equalizer fork is a limit. -/
def isEqualizer {X Y : ωCPO.{v}} (f g : X ⟶ Y) : IsLimit (equalizer f g) :=
  Fork.IsLimit.mk' _ fun s =>
    -- Porting note: Changed `s.ι x` to `s.ι.toFun x`
    ⟨{  toFun := fun x => ⟨s.ι.toFun x, by apply ContinuousHom.congr_fun s.condition⟩
        monotone' := fun x y h => s.ι.monotone h
        cont := fun x => Subtype.ext (s.ι.continuous x) }, by ext; rfl, fun hm => by
      

Proof state:
X Y : ωCPO
f g : X ⟶ Y
s : Fork f g
m✝ :
  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶
    ((Functor.const WalkingParallelPair).obj (equalizer f g).pt).obj WalkingParallelPair.zero
hm : m✝ ≫ Fork.ι (equalizer f g) = Fork.ι s
⊢ m✝ =
    {
      toOrderHom :=
        {
          toFun := fun x =>
            { val := OrderHom.toFun (Fork.ι s).toOrderHom x, property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
          monotone' :=
            (_ :
              ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) },
      cont :=
        (_ :
          ∀ (x : Chain ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
            {
                  toFun := fun x =>
                    { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                      property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
                  monotone' :=
                    (_ :
                      ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                        x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) }
                (ωSup x) =
              ωSup
                (Chain.map x
                  {
                    toFun := fun x =>
                      { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                        property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
                    monotone' :=
                      (_ :
                        ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                          x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) })) }

Next tactic:
apply ContinuousHom.ext _ _ fun x => Subtype.ext ?_
/-- The equalizer fork is a limit. -/
def isEqualizer {X Y : ωCPO.{v}} (f g : X ⟶ Y) : IsLimit (equalizer f g) :=
  Fork.IsLimit.mk' _ fun s =>
    -- Porting note: Changed `s.ι x` to `s.ι.toFun x`
    ⟨{  toFun := fun x => ⟨s.ι.toFun x, by apply ContinuousHom.congr_fun s.condition⟩
        monotone' := fun x y h => s.ι.monotone h
        cont := fun x => Subtype.ext (s.ι.continuous x) }, by ext; rfl, fun hm => by
      apply ContinuousHom.ext _ _ fun x => Subtype.ext ?_ -- Porting note: Originally `ext`
      

Proof state:
X Y : ωCPO
f g : X ⟶ Y
s : Fork f g
m✝ :
  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶
    ((Functor.const WalkingParallelPair).obj (equalizer f g).pt).obj WalkingParallelPair.zero
hm : m✝ ≫ Fork.ι (equalizer f g) = Fork.ι s
x : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)
⊢ ↑(m✝ x) =
    ↑({
          toOrderHom :=
            {
              toFun := fun x =>
                { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                  property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
              monotone' :=
                (_ :
                  ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                    x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) },
          cont :=
            (_ :
              ∀ (x : Chain ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                {
                      toFun := fun x =>
                        { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                          property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
                      monotone' :=
                        (_ :
                          ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                            x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) }
                    (ωSup x) =
                  ωSup
                    (Chain.map x
                      {
                        toFun := fun x =>
                          { val := OrderHom.toFun (Fork.ι s).toOrderHom x,
                            property := (_ : (Fork.ι s ≫ f) x = (Fork.ι s ≫ g) x) },
                        monotone' :=
                          (_ :
                            ∀ (x y : ↑(((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero)),
                              x ≤ y → (Fork.ι s) x ≤ (Fork.ι s) y) })) }
        x)

Next tactic:
apply ContinuousHom.congr_fun hm
/-- The universal morphism
$\colim_k \lim_j F(j,k) → \lim_j \colim_k F(j, k)$.
-/
noncomputable def colimitLimitToLimitColimit :
    colimit (curry.obj (Prod.swap K J ⋙ F) ⋙ lim) ⟶ limit (curry.obj F ⋙ colim) :=
  limit.lift (curry.obj F ⋙ colim)
    { pt := _
      π :=
        { app := fun j =>
            colimit.desc (curry.obj (Prod.swap K J ⋙ F) ⋙ lim)
              { pt := _
                ι :=
                  { app := fun k =>
                      limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫
                        colimit.ι ((curry.obj F).obj j) k
                    naturality := by
                      

Proof state:
J K : Type v
inst✝⁴ : SmallCategory J
inst✝³ : SmallCategory K
C : Type u
inst✝² : Category.{v, u} C
F : J × K ⥤ C
inst✝¹ : HasLimitsOfShape J C
inst✝ : HasColimitsOfShape K C
j : J
⊢ ∀ ⦃X Y : K⦄ (f : X ⟶ Y),
    (curry.obj (Prod.swap K J ⋙ F) ⋙ lim).map f ≫
        (fun k => limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫ colimit.ι ((curry.obj F).obj j) k) Y =
      (fun k => limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫ colimit.ι ((curry.obj F).obj j) k) X ≫
        ((Functor.const K).obj (colimit.cocone ((curry.obj F).obj j)).1).map f

Next tactic:
intro k k' f
/-- The universal morphism
$\colim_k \lim_j F(j,k) → \lim_j \colim_k F(j, k)$.
-/
noncomputable def colimitLimitToLimitColimit :
    colimit (curry.obj (Prod.swap K J ⋙ F) ⋙ lim) ⟶ limit (curry.obj F ⋙ colim) :=
  limit.lift (curry.obj F ⋙ colim)
    { pt := _
      π :=
        { app := fun j =>
            colimit.desc (curry.obj (Prod.swap K J ⋙ F) ⋙ lim)
              { pt := _
                ι :=
                  { app := fun k =>
                      limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫
                        colimit.ι ((curry.obj F).obj j) k
                    naturality := by
                      intro k k' f
                      

Proof state:
J K : Type v
inst✝⁴ : SmallCategory J
inst✝³ : SmallCategory K
C : Type u
inst✝² : Category.{v, u} C
F : J × K ⥤ C
inst✝¹ : HasLimitsOfShape J C
inst✝ : HasColimitsOfShape K C
j : J
k k' : K
f : k ⟶ k'
⊢ (curry.obj (Prod.swap K J ⋙ F) ⋙ lim).map f ≫
      (fun k => limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫ colimit.ι ((curry.obj F).obj j) k) k' =
    (fun k => limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫ colimit.ι ((curry.obj F).obj j) k) k ≫
      ((Functor.const K).obj (colimit.cocone ((curry.obj F).obj j)).1).map f

Next tactic:
simp only [Functor.comp_obj, lim_obj, colimit.cocone_x,
                        Functor.const_obj_obj, Functor.comp_map, lim_map,
                        curry_obj_obj_obj, Prod.swap_obj, limMap_π_assoc, curry_obj_map_app,
                        Prod.swap_map, Functor.const_obj_map, Category.comp_id]
/-- The universal morphism
$\colim_k \lim_j F(j,k) → \lim_j \colim_k F(j, k)$.
-/
noncomputable def colimitLimitToLimitColimit :
    colimit (curry.obj (Prod.swap K J ⋙ F) ⋙ lim) ⟶ limit (curry.obj F ⋙ colim) :=
  limit.lift (curry.obj F ⋙ colim)
    { pt := _
      π :=
        { app := fun j =>
            colimit.desc (curry.obj (Prod.swap K J ⋙ F) ⋙ lim)
              { pt := _
                ι :=
                  { app := fun k =>
                      limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫
                        colimit.ι ((curry.obj F).obj j) k
                    naturality := by
                      intro k k' f
                      simp only [Functor.comp_obj, lim_obj, colimit.cocone_x,
                        Functor.const_obj_obj, Functor.comp_map, lim_map,
                        curry_obj_obj_obj, Prod.swap_obj, limMap_π_assoc, curry_obj_map_app,
                        Prod.swap_map, Functor.const_obj_map, Category.comp_id]
                      

Proof state:
J K : Type v
inst✝⁴ : SmallCategory J
inst✝³ : SmallCategory K
C : Type u
inst✝² : Category.{v, u} C
F : J × K ⥤ C
inst✝¹ : HasLimitsOfShape J C
inst✝ : HasColimitsOfShape K C
j : J
k k' : K
f : k ⟶ k'
⊢ limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫ F.map (𝟙 j, f) ≫ colimit.ι ((curry.obj F).obj j) k' =
    limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j ≫ colimit.ι ((curry.obj F).obj j) k

Next tactic:
rw [map_id_left_eq_curry_map, colimit.w]