l3lab/ntp-mathlib huggingface dataset:
/-- The pigeonhole principle for finitely many pigeons counted by heads: given a function between
finite sets `s` and `t` and a number `b` such that `card t • b ≤ card s`, there exists `y ∈ t` such
that its preimage in `s` has at least `b` elements.
See also `Finset.exists_lt_card_fiber_of_nsmul_lt_card_of_maps_to` for a stronger statement. -/
theorem exists_le_card_fiber_of_nsmul_le_card_of_maps_to (hf : ∀ a ∈ s, f a ∈ t) (ht : t.Nonempty)
    (hb : t.card • b ≤ s.card) : ∃ y ∈ t, b ≤ (s.filter fun x => f x = y).card := by
  

Proof state:
α : Type u
β : Type v
M : Type w
inst✝¹ : DecidableEq β
s : Finset α
t : Finset β
f : α → β
w : α → M
b : M
n : ℕ
inst✝ : LinearOrderedCommSemiring M
hf : ∀ a ∈ s, f a ∈ t
ht : Finset.Nonempty t
hb : card t • b ≤ ↑(card s)
⊢ ∃ y ∈ t, b ≤ ↑(card (filter (fun x => f x = y) s))

Next tactic:
simp_rw [cast_card] at hb ⊢
/-- The pigeonhole principle for finitely many pigeons counted by heads: given a function between
finite sets `s` and `t` and a number `b` such that `card t • b ≤ card s`, there exists `y ∈ t` such
that its preimage in `s` has at least `b` elements.
See also `Finset.exists_lt_card_fiber_of_nsmul_lt_card_of_maps_to` for a stronger statement. -/
theorem exists_le_card_fiber_of_nsmul_le_card_of_maps_to (hf : ∀ a ∈ s, f a ∈ t) (ht : t.Nonempty)
    (hb : t.card • b ≤ s.card) : ∃ y ∈ t, b ≤ (s.filter fun x => f x = y).card := by
  simp_rw [cast_card] at hb ⊢
  

Proof state:
α : Type u
β : Type v
M : Type w
inst✝¹ : DecidableEq β
s : Finset α
t : Finset β
f : α → β
w : α → M
b : M
n : ℕ
inst✝ : LinearOrderedCommSemiring M
hf : ∀ a ∈ s, f a ∈ t
ht : Finset.Nonempty t
hb : card t • b ≤ ∑ a in s, 1
⊢ ∃ y ∈ t, b ≤ ∑ a in filter (fun x => f x = y) s, 1

Next tactic:
exact exists_le_sum_fiber_of_maps_to_of_nsmul_le_sum hf ht hb
/-- The pigeonhole principle for finitely many pigeons counted by heads: given a function `f`, a
finite sets `s` and `t`, and a number `b` such that `card s ≤ card t • b`, there exists `y ∈ t` such
that its preimage in `s` has no more than `b` elements.
See also `Finset.exists_card_fiber_lt_of_card_lt_nsmul` for a stronger statement. -/
theorem exists_card_fiber_le_of_card_le_nsmul (ht : t.Nonempty) (hb : ↑s.card ≤ t.card • b) :
    ∃ y ∈ t, ↑(s.filter fun x => f x = y).card ≤ b := by
  

Proof state:
α : Type u
β : Type v
M : Type w
inst✝¹ : DecidableEq β
s : Finset α
t : Finset β
f : α → β
w : α → M
b : M
n : ℕ
inst✝ : LinearOrderedCommSemiring M
ht : Finset.Nonempty t
hb : ↑(card s) ≤ card t • b
⊢ ∃ y ∈ t, ↑(card (filter (fun x => f x = y) s)) ≤ b

Next tactic:
simp_rw [cast_card] at hb ⊢
/-- The pigeonhole principle for finitely many pigeons counted by heads: given a function `f`, a
finite sets `s` and `t`, and a number `b` such that `card s ≤ card t • b`, there exists `y ∈ t` such
that its preimage in `s` has no more than `b` elements.
See also `Finset.exists_card_fiber_lt_of_card_lt_nsmul` for a stronger statement. -/
theorem exists_card_fiber_le_of_card_le_nsmul (ht : t.Nonempty) (hb : ↑s.card ≤ t.card • b) :
    ∃ y ∈ t, ↑(s.filter fun x => f x = y).card ≤ b := by
  simp_rw [cast_card] at hb ⊢
  

Proof state:
α : Type u
β : Type v
M : Type w
inst✝¹ : DecidableEq β
s : Finset α
t : Finset β
f : α → β
w : α → M
b : M
n : ℕ
inst✝ : LinearOrderedCommSemiring M
ht : Finset.Nonempty t
hb : ∑ a in s, 1 ≤ card t • b
⊢ ∃ y ∈ t, ∑ a in filter (fun x => f x = y) s, 1 ≤ b

Next tactic:
refine'
    exists_sum_fiber_le_of_sum_fiber_nonneg_of_sum_le_nsmul
      (fun _ _ => sum_nonneg fun _ _ => zero_le_one) ht hb
/-- Composition of prelax functors. -/
@[simps]
def comp (F : PrelaxFunctor B C) (G : PrelaxFunctor C D) : PrelaxFunctor B D :=
  { (F : Prefunctor B C).comp ↑G with map₂ := fun η => by 

Proof state:
B : Type u₁
inst✝⁵ : Quiver B
inst✝⁴ : (a b : B) → Quiver (a ⟶ b)
C : Type u₂
inst✝³ : Quiver C
inst✝² : (a b : C) → Quiver (a ⟶ b)
D : Type u₃
inst✝¹ : Quiver D
inst✝ : (a b : D) → Quiver (a ⟶ b)
F✝ F : PrelaxFunctor B C
G : PrelaxFunctor C D
src✝ : B ⥤q D := ↑F ⋙q ↑G
a✝ b✝ : B
f✝ g✝ : a✝ ⟶ b✝
η : f✝ ⟶ g✝
⊢ { obj := src✝.obj, map := fun {X Y} => src✝.map }.map f✝ ⟶ { obj := src✝.obj, map := fun {X Y} => src✝.map }.map g✝

Next tactic:
exact G.map₂ (F.map₂ η)
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by 

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a : B
⊢ (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map (𝟙 a) ⟶
    𝟙 ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).obj a)

Next tactic:
exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ : B
f : a✝ ⟶ b✝
g : b✝ ⟶ c✝
⊢ (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map (f ≫ g) ⟶
    (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ≫
      (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map g

Next tactic:
exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ : B
f✝ f'✝ : a✝ ⟶ b✝
η : f✝ ⟶ f'✝
g : b✝ ⟶ c✝
⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (η ▷ g) ≫
      (fun {a b c} f g =>
          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
        f'✝ g =
    (fun {a b c} f g =>
          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
        f✝ g ≫
      PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } η ▷
        (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map g

Next tactic:
dsimp
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      dsimp
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ : B
f✝ f'✝ : a✝ ⟶ b✝
η : f✝ ⟶ f'✝
g : b✝ ⟶ c✝
⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (η ▷ g)) ≫
      PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f'✝ g) ≫
        mapComp G ((↑F.toPrelaxFunctor).map f'✝) ((↑F.toPrelaxFunctor).map g) =
    (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f✝ g) ≫
        mapComp G ((↑F.toPrelaxFunctor).map f✝) ((↑F.toPrelaxFunctor).map g)) ≫
      PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor η) ▷
        (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map g)

Next tactic:
rw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left,
        assoc]
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      dsimp
      rw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left,
        assoc]
    mapComp_naturality_right := fun η => by
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ : B
η : a✝ ⟶ b✝
⊢ ∀ {g g' : b✝ ⟶ c✝} (η_1 : g ⟶ g'),
    PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (η ◁ η_1) ≫
        (fun {a b c} f g =>
            (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
              mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
          η g' =
      (fun {a b c} f g =>
            (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
              mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
          η g ≫
        (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map η ◁
          PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } η_1

Next tactic:
dsimp
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      dsimp
      rw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left,
        assoc]
    mapComp_naturality_right := fun η => by
      dsimp
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ : B
η : a✝ ⟶ b✝
⊢ ∀ {g g' : b✝ ⟶ c✝} (η_1 : g ⟶ g'),
    PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (η ◁ η_1)) ≫
        PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F η g') ≫
          mapComp G ((↑F.toPrelaxFunctor).map η) ((↑F.toPrelaxFunctor).map g') =
      (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F η g) ≫
          mapComp G ((↑F.toPrelaxFunctor).map η) ((↑F.toPrelaxFunctor).map g)) ≫
        (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map η) ◁
          PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor η_1)

Next tactic:
intros
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      dsimp
      rw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left,
        assoc]
    mapComp_naturality_right := fun η => by
      dsimp
      intros
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ : B
η : a✝ ⟶ b✝
g✝ g'✝ : b✝ ⟶ c✝
η✝ : g✝ ⟶ g'✝
⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (η ◁ η✝)) ≫
      PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F η g'✝) ≫
        mapComp G ((↑F.toPrelaxFunctor).map η) ((↑F.toPrelaxFunctor).map g'✝) =
    (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F η g✝) ≫
        mapComp G ((↑F.toPrelaxFunctor).map η) ((↑F.toPrelaxFunctor).map g✝)) ≫
      (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map η) ◁
        PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor η✝)

Next tactic:
rw [← map₂_comp_assoc, mapComp_naturality_right, map₂_comp_assoc, mapComp_naturality_right,
        assoc]
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      dsimp
      rw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left,
        assoc]
    mapComp_naturality_right := fun η => by
      dsimp
      intros
      rw [← map₂_comp_assoc, mapComp_naturality_right, map₂_comp_assoc, mapComp_naturality_right,
        assoc]
    map₂_associator := fun f g h => by
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ d✝ : B
f : a✝ ⟶ b✝
g : b✝ ⟶ c✝
h : c✝ ⟶ d✝
⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (α_ f g h).hom ≫
      (fun {a b c} f g =>
            (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
              mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
          f (g ≫ h) ≫
        (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ◁
          (fun {a b c} f g =>
              (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
                mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
            g h =
    (fun {a b c} f g =>
          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
        (f ≫ g) h ≫
      (fun {a b c} f g =>
              (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
                mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
            f g ▷
          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h ≫
        (α_ ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f)
            ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map g)
            ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h)).hom

Next tactic:
dsimp
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      dsimp
      rw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left,
        assoc]
    mapComp_naturality_right := fun η => by
      dsimp
      intros
      rw [← map₂_comp_assoc, mapComp_naturality_right, map₂_comp_assoc, mapComp_naturality_right,
        assoc]
    map₂_associator := fun f g h => by
      dsimp
      -- porting note: if you use the `map₂_associator_aux` hack in the definition of
      -- `map₂_associator` then the `simp only` call below does not seem to apply `map₂_associator`
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ d✝ : B
f : a✝ ⟶ b✝
g : b✝ ⟶ c✝
h : c✝ ⟶ d✝
⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (α_ f g h).hom) ≫
      (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f (g ≫ h)) ≫
          mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map (g ≫ h))) ≫
        (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f) ◁
          (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F g h) ≫
            mapComp G ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h)) =
    (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F (f ≫ g) h) ≫
        mapComp G ((↑F.toPrelaxFunctor).map (f ≫ g)) ((↑F.toPrelaxFunctor).map h)) ≫
      (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f g) ≫
            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g)) ▷
          (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map h) ≫
        (α_ ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f))
            ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map g))
            ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map h))).hom

Next tactic:
simp only [map₂_associator, ← map₂_comp_assoc, ← mapComp_naturality_right_assoc,
        whiskerLeft_comp, assoc]
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      dsimp
      rw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left,
        assoc]
    mapComp_naturality_right := fun η => by
      dsimp
      intros
      rw [← map₂_comp_assoc, mapComp_naturality_right, map₂_comp_assoc, mapComp_naturality_right,
        assoc]
    map₂_associator := fun f g h => by
      dsimp
      -- porting note: if you use the `map₂_associator_aux` hack in the definition of
      -- `map₂_associator` then the `simp only` call below does not seem to apply `map₂_associator`
      simp only [map₂_associator, ← map₂_comp_assoc, ← mapComp_naturality_right_assoc,
        whiskerLeft_comp, assoc]
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ c✝ d✝ : B
f : a✝ ⟶ b✝
g : b✝ ⟶ c✝
h : c✝ ⟶ d✝
⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor
        (mapComp F (f ≫ g) h ≫
          mapComp F f g ▷ (↑F.toPrelaxFunctor).map h ≫
            (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h)).hom) ≫
      mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g ≫ (↑F.toPrelaxFunctor).map h) ≫
        (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f) ◁
          mapComp G ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h) =
    PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F (f ≫ g) h) ≫
      mapComp G ((↑F.toPrelaxFunctor).map (f ≫ g)) ((↑F.toPrelaxFunctor).map h) ≫
        (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f g) ≫
              mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g)) ▷
            (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map h) ≫
          (α_ ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f))
              ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map g))
              ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map h))).hom

Next tactic:
simp only [map₂_associator, map₂_comp, mapComp_naturality_left_assoc, comp_whiskerRight,
        assoc]
/-- Composition of oplax functors. -/
--@[simps]
def comp (F : OplaxFunctor B C) (G : OplaxFunctor C D) : OplaxFunctor B D :=
  {
    (F : PrelaxFunctor B C).comp G with
    mapId := fun a => by exact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)
    mapComp := fun f g => by
      exact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)
    mapComp_naturality_left := fun η g => by
      dsimp
      rw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left,
        assoc]
    mapComp_naturality_right := fun η => by
      dsimp
      intros
      rw [← map₂_comp_assoc, mapComp_naturality_right, map₂_comp_assoc, mapComp_naturality_right,
        assoc]
    map₂_associator := fun f g h => by
      dsimp
      -- porting note: if you use the `map₂_associator_aux` hack in the definition of
      -- `map₂_associator` then the `simp only` call below does not seem to apply `map₂_associator`
      simp only [map₂_associator, ← map₂_comp_assoc, ← mapComp_naturality_right_assoc,
        whiskerLeft_comp, assoc]
      simp only [map₂_associator, map₂_comp, mapComp_naturality_left_assoc, comp_whiskerRight,
        assoc]
    map₂_leftUnitor := fun f => by
      

Proof state:
B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F✝ F : OplaxFunctor B C
G : OplaxFunctor C D
src✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor
a✝ b✝ : B
f : a✝ ⟶ b✝
⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (λ_ f).hom =
    (fun {a b c} f g =>
          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫
            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))
        (𝟙 a✝) f ≫
      (fun a =>
              (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj a)).map (mapId F a) ≫
                mapId G ((↑F.toPrelaxFunctor).obj a))
            a✝ ▷
          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ≫
        (λ_ ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f)).hom

Next tactic:
dsimp