/-- Construct a functor out of the wide pushout shape given a J-indexed collection of arrows from a
fixed object.
-/
@[simps]
def wideSpan (B : C) (objs : J → C) (arrows : ∀ j : J, B ⟶ objs j) : WidePushoutShape J ⥤ C where
  obj j := Option.casesOn j B objs
  map f := by
    cases' f with _ j
    · apply 𝟙 _
    · exact arrows j
  map_comp := fun f g => by
    cases f
    · 

Proof state:
case id
J : Type w
C : Type u
inst✝ : Category.{v, u} C
B : C
objs : J → C
arrows : (j : J) → B ⟶ objs j
X✝ Z✝ : WidePushoutShape J
g : X✝ ⟶ Z✝
⊢ { obj := fun j => Option.casesOn j B objs,
          map := fun {X Y} f =>
            Hom.casesOn (motive := fun a a_1 t =>
              X = a → Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
              f
              (fun X_1 h =>
                Eq.ndrec (motive := fun X_2 =>
                  Y = X_2 →
                    HEq f (Hom.id X_2) → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                  (fun h =>
                    Eq.ndrec (motive := fun {Y} =>
                      (f : X ⟶ Y) →
                        HEq f (Hom.id X) →
                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                      (fun f h => 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)
                  h)
              (fun j h =>
                Eq.ndrec (motive := fun {X} =>
                  (f : X ⟶ Y) →
                    Y = some j →
                      HEq f (Hom.init j) →
                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                  (fun f h =>
                    Eq.ndrec (motive := fun {Y} =>
                      (f : none ⟶ Y) →
                        HEq f (Hom.init j) →
                          ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))
                      (fun f h => arrows j) (_ : some j = Y) f)
                  (_ : none = X) f)
              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map
      (Hom.id X✝ ≫ g) =
    { obj := fun j => Option.casesOn j B objs,
            map := fun {X Y} f =>
              Hom.casesOn (motive := fun a a_1 t =>
                X = a →
                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                f
                (fun X_1 h =>
                  Eq.ndrec (motive := fun X_2 =>
                    Y = X_2 →
                      HEq f (Hom.id X_2) →
                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                    (fun h =>
                      Eq.ndrec (motive := fun {Y} =>
                        (f : X ⟶ Y) →
                          HEq f (Hom.id X) →
                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                        (fun f h => 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)
                    h)
                (fun j h =>
                  Eq.ndrec (motive := fun {X} =>
                    (f : X ⟶ Y) →
                      Y = some j →
                        HEq f (Hom.init j) →
                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                    (fun f h =>
                      Eq.ndrec (motive := fun {Y} =>
                        (f : none ⟶ Y) →
                          HEq f (Hom.init j) →
                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))
                        (fun f h => arrows j) (_ : some j = Y) f)
                    (_ : none = X) f)
                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map
        (Hom.id X✝) ≫
      { obj := fun j => Option.casesOn j B objs,
            map := fun {X Y} f =>
              Hom.casesOn (motive := fun a a_1 t =>
                X = a →
                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                f
                (fun X_1 h =>
                  Eq.ndrec (motive := fun X_2 =>
                    Y = X_2 →
                      HEq f (Hom.id X_2) →
                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                    (fun h =>
                      Eq.ndrec (motive := fun {Y} =>
                        (f : X ⟶ Y) →
                          HEq f (Hom.id X) →
                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                        (fun f h => 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)
                    h)
                (fun j h =>
                  Eq.ndrec (motive := fun {X} =>
                    (f : X ⟶ Y) →
                      Y = some j →
                        HEq f (Hom.init j) →
                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
                    (fun f h =>
                      Eq.ndrec (motive := fun {Y} =>
                        (f : none ⟶ Y) →
                          HEq f (Hom.init j) →
                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))
                        (fun f h => arrows j) (_ : some j = Y) f)
                    (_ : none = X) f)
                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map
        g

Next tactic:
simp only [Eq.ndrec, hom_id, eq_rec_constant, Category.id_comp]