l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem count_apply_eq_top [MeasurableSingletonClass α] : count s = ∞ ↔ s.Infinite := by
  by_cases hs : s.Finite
  · exact count_apply_eq_top' hs.measurableSet
  · change s.Infinite at hs
    

Proof state:
case neg
α : Type u_1
β : Type ?u.13331
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
s : Set α
inst✝ : MeasurableSingletonClass α
hs : Set.Infinite s
⊢ ↑↑count s = ⊤ ↔ Set.Infinite s

Next tactic:
simp [hs, count_apply_infinite]
theorem empty_of_count_eq_zero' (s_mble : MeasurableSet s) (hsc : count s = 0) : s = ∅ := by
  

Proof state:
α : Type u_1
β : Type ?u.15972
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
s_mble : MeasurableSet s
hsc : ↑↑count s = 0
⊢ s = ∅

Next tactic:
have hs : s.Finite := by
    rw [← count_apply_lt_top' s_mble, hsc]
    exact WithTop.zero_lt_top
theorem empty_of_count_eq_zero' (s_mble : MeasurableSet s) (hsc : count s = 0) : s = ∅ := by
  have hs : s.Finite := by
    

Proof state:
α : Type u_1
β : Type ?u.15972
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
s_mble : MeasurableSet s
hsc : ↑↑count s = 0
⊢ Set.Finite s

Next tactic:
rw [← count_apply_lt_top' s_mble, hsc]
theorem empty_of_count_eq_zero' (s_mble : MeasurableSet s) (hsc : count s = 0) : s = ∅ := by
  have hs : s.Finite := by
    rw [← count_apply_lt_top' s_mble, hsc]
    

Proof state:
α : Type u_1
β : Type ?u.15972
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
s_mble : MeasurableSet s
hsc : ↑↑count s = 0
⊢ 0 < ⊤

Next tactic:
exact WithTop.zero_lt_top
theorem empty_of_count_eq_zero' (s_mble : MeasurableSet s) (hsc : count s = 0) : s = ∅ := by
  have hs : s.Finite := by
    rw [← count_apply_lt_top' s_mble, hsc]
    exact WithTop.zero_lt_top
  

Proof state:
α : Type u_1
β : Type ?u.15972
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
s_mble : MeasurableSet s
hsc : ↑↑count s = 0
hs : Set.Finite s
⊢ s = ∅

Next tactic:
simpa [count_apply_finite' hs s_mble] using hsc
theorem empty_of_count_eq_zero [MeasurableSingletonClass α] (hsc : count s = 0) : s = ∅ := by
  

Proof state:
α : Type u_1
β : Type ?u.17503
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
s : Set α
inst✝ : MeasurableSingletonClass α
hsc : ↑↑count s = 0
⊢ s = ∅

Next tactic:
have hs : s.Finite := by
    rw [← count_apply_lt_top, hsc]
    exact WithTop.zero_lt_top
theorem empty_of_count_eq_zero [MeasurableSingletonClass α] (hsc : count s = 0) : s = ∅ := by
  have hs : s.Finite := by
    

Proof state:
α : Type u_1
β : Type ?u.17503
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
s : Set α
inst✝ : MeasurableSingletonClass α
hsc : ↑↑count s = 0
⊢ Set.Finite s

Next tactic:
rw [← count_apply_lt_top, hsc]
theorem empty_of_count_eq_zero [MeasurableSingletonClass α] (hsc : count s = 0) : s = ∅ := by
  have hs : s.Finite := by
    rw [← count_apply_lt_top, hsc]
    

Proof state:
α : Type u_1
β : Type ?u.17503
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
s : Set α
inst✝ : MeasurableSingletonClass α
hsc : ↑↑count s = 0
⊢ 0 < ⊤

Next tactic:
exact WithTop.zero_lt_top
theorem empty_of_count_eq_zero [MeasurableSingletonClass α] (hsc : count s = 0) : s = ∅ := by
  have hs : s.Finite := by
    rw [← count_apply_lt_top, hsc]
    exact WithTop.zero_lt_top
  

Proof state:
α : Type u_1
β : Type ?u.17503
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
s : Set α
inst✝ : MeasurableSingletonClass α
hsc : ↑↑count s = 0
hs : Set.Finite s
⊢ s = ∅

Next tactic:
simpa [count_apply_finite _ hs] using hsc
theorem count_ne_zero' (hs' : s.Nonempty) (s_mble : MeasurableSet s) : count s ≠ 0 := by
  

Proof state:
α : Type u_1
β : Type ?u.19840
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
hs' : Set.Nonempty s
s_mble : MeasurableSet s
⊢ ↑↑count s ≠ 0

Next tactic:
rw [Ne.def, count_eq_zero_iff' s_mble]
theorem count_ne_zero' (hs' : s.Nonempty) (s_mble : MeasurableSet s) : count s ≠ 0 := by
  rw [Ne.def, count_eq_zero_iff' s_mble]
  

Proof state:
α : Type u_1
β : Type ?u.19840
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
hs' : Set.Nonempty s
s_mble : MeasurableSet s
⊢ ¬s = ∅

Next tactic:
exact hs'.ne_empty
theorem count_ne_zero [MeasurableSingletonClass α] (hs' : s.Nonempty) : count s ≠ 0 := by
  

Proof state:
α : Type u_1
β : Type ?u.20081
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
s : Set α
inst✝ : MeasurableSingletonClass α
hs' : Set.Nonempty s
⊢ ↑↑count s ≠ 0

Next tactic:
rw [Ne.def, count_eq_zero_iff]
theorem count_ne_zero [MeasurableSingletonClass α] (hs' : s.Nonempty) : count s ≠ 0 := by
  rw [Ne.def, count_eq_zero_iff]
  

Proof state:
α : Type u_1
β : Type ?u.20081
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
s : Set α
inst✝ : MeasurableSingletonClass α
hs' : Set.Nonempty s
⊢ ¬s = ∅

Next tactic:
exact hs'.ne_empty
@[simp]
theorem count_singleton' {a : α} (ha : MeasurableSet ({a} : Set α)) : count ({a} : Set α) = 1 := by
  

Proof state:
α : Type u_1
β : Type ?u.20377
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
a : α
ha : MeasurableSet {a}
⊢ ↑↑count {a} = 1

Next tactic:
rw [count_apply_finite' (Set.finite_singleton a) ha, Set.Finite.toFinset]
@[simp]
theorem count_singleton' {a : α} (ha : MeasurableSet ({a} : Set α)) : count ({a} : Set α) = 1 := by
  rw [count_apply_finite' (Set.finite_singleton a) ha, Set.Finite.toFinset]
  

Proof state:
α : Type u_1
β : Type ?u.20377
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
a : α
ha : MeasurableSet {a}
⊢ ↑(Finset.card (toFinset {a})) = 1

Next tactic:
simp [@toFinset_card _ _ (Set.finite_singleton a).fintype,
    @Fintype.card_unique _ _ (Set.finite_singleton a).fintype]
theorem count_injective_image' {f : β → α} (hf : Function.Injective f) {s : Set β}
    (s_mble : MeasurableSet s) (fs_mble : MeasurableSet (f '' s)) : count (f '' s) = count s := by
  

Proof state:
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
f : β → α
hf : Function.Injective f
s : Set β
s_mble : MeasurableSet s
fs_mble : MeasurableSet (f '' s)
⊢ ↑↑count (f '' s) = ↑↑count s

Next tactic:
by_cases hs : s.Finite
theorem count_injective_image' {f : β → α} (hf : Function.Injective f) {s : Set β}
    (s_mble : MeasurableSet s) (fs_mble : MeasurableSet (f '' s)) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · 

Proof state:
case pos
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
f : β → α
hf : Function.Injective f
s : Set β
s_mble : MeasurableSet s
fs_mble : MeasurableSet (f '' s)
hs : Set.Finite s
⊢ ↑↑count (f '' s) = ↑↑count s

Next tactic:
lift s to Finset β using hs
theorem count_injective_image' {f : β → α} (hf : Function.Injective f) {s : Set β}
    (s_mble : MeasurableSet s) (fs_mble : MeasurableSet (f '' s)) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · lift s to Finset β using hs
    

Proof state:
case pos.intro
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
f : β → α
hf : Function.Injective f
s : Finset β
s_mble : MeasurableSet ↑s
fs_mble : MeasurableSet (f '' ↑s)
⊢ ↑↑count (f '' ↑s) = ↑↑count ↑s

Next tactic:
rw [← Finset.coe_image, count_apply_finset' _, count_apply_finset' s_mble,
      s.card_image_of_injective hf]
theorem count_injective_image' {f : β → α} (hf : Function.Injective f) {s : Set β}
    (s_mble : MeasurableSet s) (fs_mble : MeasurableSet (f '' s)) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · lift s to Finset β using hs
    rw [← Finset.coe_image, count_apply_finset' _, count_apply_finset' s_mble,
      s.card_image_of_injective hf]
    

Proof state:
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
f : β → α
hf : Function.Injective f
s : Finset β
s_mble : MeasurableSet ↑s
fs_mble : MeasurableSet (f '' ↑s)
⊢ MeasurableSet ↑(Finset.image f s)

Next tactic:
simpa only [Finset.coe_image] using fs_mble
theorem count_injective_image' {f : β → α} (hf : Function.Injective f) {s : Set β}
    (s_mble : MeasurableSet s) (fs_mble : MeasurableSet (f '' s)) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · lift s to Finset β using hs
    rw [← Finset.coe_image, count_apply_finset' _, count_apply_finset' s_mble,
      s.card_image_of_injective hf]
    simpa only [Finset.coe_image] using fs_mble
  · 

Proof state:
case neg
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
f : β → α
hf : Function.Injective f
s : Set β
s_mble : MeasurableSet s
fs_mble : MeasurableSet (f '' s)
hs : ¬Set.Finite s
⊢ ↑↑count (f '' s) = ↑↑count s

Next tactic:
rw [count_apply_infinite hs]
theorem count_injective_image' {f : β → α} (hf : Function.Injective f) {s : Set β}
    (s_mble : MeasurableSet s) (fs_mble : MeasurableSet (f '' s)) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · lift s to Finset β using hs
    rw [← Finset.coe_image, count_apply_finset' _, count_apply_finset' s_mble,
      s.card_image_of_injective hf]
    simpa only [Finset.coe_image] using fs_mble
  · rw [count_apply_infinite hs]
    

Proof state:
case neg
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
f : β → α
hf : Function.Injective f
s : Set β
s_mble : MeasurableSet s
fs_mble : MeasurableSet (f '' s)
hs : ¬Set.Finite s
⊢ ↑↑count (f '' s) = ⊤

Next tactic:
rw [← finite_image_iff <| hf.injOn _] at hs
theorem count_injective_image' {f : β → α} (hf : Function.Injective f) {s : Set β}
    (s_mble : MeasurableSet s) (fs_mble : MeasurableSet (f '' s)) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · lift s to Finset β using hs
    rw [← Finset.coe_image, count_apply_finset' _, count_apply_finset' s_mble,
      s.card_image_of_injective hf]
    simpa only [Finset.coe_image] using fs_mble
  · rw [count_apply_infinite hs]
    rw [← finite_image_iff <| hf.injOn _] at hs
    

Proof state:
case neg
α : Type u_2
β : Type u_1
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
f : β → α
hf : Function.Injective f
s : Set β
s_mble : MeasurableSet s
fs_mble : MeasurableSet (f '' s)
hs : ¬Set.Finite (f '' s)
⊢ ↑↑count (f '' s) = ⊤

Next tactic:
rw [count_apply_infinite hs]
theorem count_injective_image [MeasurableSingletonClass α] [MeasurableSingletonClass β] {f : β → α}
    (hf : Function.Injective f) (s : Set β) : count (f '' s) = count s := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
⊢ ↑↑count (f '' s) = ↑↑count s

Next tactic:
by_cases hs : s.Finite
theorem count_injective_image [MeasurableSingletonClass α] [MeasurableSingletonClass β] {f : β → α}
    (hf : Function.Injective f) (s : Set β) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : Set.Finite s
⊢ ↑↑count (f '' s) = ↑↑count s

Next tactic:
exact count_injective_image' hf hs.measurableSet (Finite.image f hs).measurableSet
theorem count_injective_image [MeasurableSingletonClass α] [MeasurableSingletonClass β] {f : β → α}
    (hf : Function.Injective f) (s : Set β) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · exact count_injective_image' hf hs.measurableSet (Finite.image f hs).measurableSet
  

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬Set.Finite s
⊢ ↑↑count (f '' s) = ↑↑count s

Next tactic:
rw [count_apply_infinite hs]
theorem count_injective_image [MeasurableSingletonClass α] [MeasurableSingletonClass β] {f : β → α}
    (hf : Function.Injective f) (s : Set β) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · exact count_injective_image' hf hs.measurableSet (Finite.image f hs).measurableSet
  rw [count_apply_infinite hs]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬Set.Finite s
⊢ ↑↑count (f '' s) = ⊤

Next tactic:
rw [← finite_image_iff <| hf.injOn _] at hs
theorem count_injective_image [MeasurableSingletonClass α] [MeasurableSingletonClass β] {f : β → α}
    (hf : Function.Injective f) (s : Set β) : count (f '' s) = count s := by
  by_cases hs : s.Finite
  · exact count_injective_image' hf hs.measurableSet (Finite.image f hs).measurableSet
  rw [count_apply_infinite hs]
  rw [← finite_image_iff <| hf.injOn _] at hs
  

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬Set.Finite (f '' s)
⊢ ↑↑count (f '' s) = ⊤

Next tactic:
rw [count_apply_infinite hs]
instance count.isFiniteMeasure [Finite α] [MeasurableSpace α] :
    IsFiniteMeasure (Measure.count : Measure α) :=
  ⟨by
    

Proof state:
α : Type ?u.23782
β : Type ?u.23785
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
inst✝¹ : Finite α
inst✝ : MeasurableSpace α
⊢ ↑↑count univ < ⊤

Next tactic:
cases nonempty_fintype α
instance count.isFiniteMeasure [Finite α] [MeasurableSpace α] :
    IsFiniteMeasure (Measure.count : Measure α) :=
  ⟨by
    cases nonempty_fintype α
    

Proof state:
case intro
α : Type ?u.23782
β : Type ?u.23785
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
inst✝¹ : Finite α
inst✝ : MeasurableSpace α
val✝ : Fintype α
⊢ ↑↑count univ < ⊤

Next tactic:
simpa [Measure.count_apply, tsum_fintype] using (ENNReal.nat_ne_top _).lt_top
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      

Proof state:
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ c✝ d✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
g : b✝ ⟶ c✝
h : c✝ ⟶ d✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
apply Discrete.ext
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      apply Discrete.ext
      

Proof state:
case as
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ c✝ d✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
g : b✝ ⟶ c✝
h : c✝ ⟶ d✝
⊢ ((f ≫ g) ≫ h).as = (f ≫ g ≫ h).as

Next tactic:
change (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      apply Discrete.ext
      change (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)
      

Proof state:
case as
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ c✝ d✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
g : b✝ ⟶ c✝
h : c✝ ⟶ d✝
⊢ (f.as ≫ g.as) ≫ h.as = f.as ≫ g.as ≫ h.as

Next tactic:
rw [Category.assoc]
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      apply Discrete.ext
      change (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)
      rw [Category.assoc]
  leftUnitor f :=
    eqToIso <| by
      

Proof state:
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
⊢ 𝟙 a✝ ≫ f = f

Next tactic:
apply Discrete.ext
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      apply Discrete.ext
      change (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)
      rw [Category.assoc]
  leftUnitor f :=
    eqToIso <| by
      apply Discrete.ext
      

Proof state:
case as
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
⊢ (𝟙 a✝ ≫ f).as = f.as

Next tactic:
change 𝟙 _ ≫ _ = _
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      apply Discrete.ext
      change (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)
      rw [Category.assoc]
  leftUnitor f :=
    eqToIso <| by
      apply Discrete.ext
      change 𝟙 _ ≫ _ = _
      

Proof state:
case as
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
⊢ 𝟙 a✝ ≫ f.as = f.as

Next tactic:
rw [Category.id_comp]
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      apply Discrete.ext
      change (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)
      rw [Category.assoc]
  leftUnitor f :=
    eqToIso <| by
      apply Discrete.ext
      change 𝟙 _ ≫ _ = _
      rw [Category.id_comp]
  rightUnitor f :=
    eqToIso <| by
      

Proof state:
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
⊢ f ≫ 𝟙 b✝ = f

Next tactic:
apply Discrete.ext
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      apply Discrete.ext
      change (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)
      rw [Category.assoc]
  leftUnitor f :=
    eqToIso <| by
      apply Discrete.ext
      change 𝟙 _ ≫ _ = _
      rw [Category.id_comp]
  rightUnitor f :=
    eqToIso <| by
      apply Discrete.ext
      

Proof state:
case as
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
⊢ (f ≫ 𝟙 b✝).as = f.as

Next tactic:
change _ ≫ 𝟙 _ = _
/-- The locally discrete bicategory on a category is a bicategory in which the objects and the
1-morphisms are the same as those in the underlying category, and the 2-morphisms are the
equalities between 1-morphisms.
-/
instance locallyDiscreteBicategory : Bicategory (LocallyDiscrete C)
    where
  whiskerLeft f g h η := eqToHom (congr_arg₂ (· ≫ ·) rfl (LocallyDiscrete.eq_of_hom η))
  whiskerRight η h := eqToHom (congr_arg₂ (· ≫ ·) (LocallyDiscrete.eq_of_hom η) rfl)
  associator f g h :=
    eqToIso <| by
      apply Discrete.ext
      change (f.as ≫ g.as) ≫ h.as = f.as ≫ (g.as ≫ h.as)
      rw [Category.assoc]
  leftUnitor f :=
    eqToIso <| by
      apply Discrete.ext
      change 𝟙 _ ≫ _ = _
      rw [Category.id_comp]
  rightUnitor f :=
    eqToIso <| by
      apply Discrete.ext
      change _ ≫ 𝟙 _ = _
      

Proof state:
case as
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f : a✝ ⟶ b✝
⊢ f.as ≫ 𝟙 b✝ = f.as

Next tactic:
rw [Category.comp_id]
/-- A locally discrete bicategory is strict. -/
instance locallyDiscreteBicategory.strict : Strict (LocallyDiscrete C)
    where
  id_comp := by
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
⊢ ∀ {a b : LocallyDiscrete C} (f : a ⟶ b), 𝟙 a ≫ f = f

Next tactic:
intros
/-- A locally discrete bicategory is strict. -/
instance locallyDiscreteBicategory.strict : Strict (LocallyDiscrete C)
    where
  id_comp := by
    intros
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f✝ : a✝ ⟶ b✝
⊢ 𝟙 a✝ ≫ f✝ = f✝

Next tactic:
apply Discrete.ext
/-- A locally discrete bicategory is strict. -/
instance locallyDiscreteBicategory.strict : Strict (LocallyDiscrete C)
    where
  id_comp := by
    intros
    apply Discrete.ext
    

Proof state:
case as
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f✝ : a✝ ⟶ b✝
⊢ (𝟙 a✝ ≫ f✝).as = f✝.as

Next tactic:
apply Category.id_comp
/-- A locally discrete bicategory is strict. -/
instance locallyDiscreteBicategory.strict : Strict (LocallyDiscrete C)
    where
  id_comp := by
    intros
    apply Discrete.ext
    apply Category.id_comp
  comp_id := by
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
⊢ ∀ {a b : LocallyDiscrete C} (f : a ⟶ b), f ≫ 𝟙 b = f

Next tactic:
intros
/-- A locally discrete bicategory is strict. -/
instance locallyDiscreteBicategory.strict : Strict (LocallyDiscrete C)
    where
  id_comp := by
    intros
    apply Discrete.ext
    apply Category.id_comp
  comp_id := by
    intros
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f✝ : a✝ ⟶ b✝
⊢ f✝ ≫ 𝟙 b✝ = f✝

Next tactic:
apply Discrete.ext
/-- A locally discrete bicategory is strict. -/
instance locallyDiscreteBicategory.strict : Strict (LocallyDiscrete C)
    where
  id_comp := by
    intros
    apply Discrete.ext
    apply Category.id_comp
  comp_id := by
    intros
    apply Discrete.ext
    

Proof state:
case as
C : Type u
inst✝ : Category.{v, u} C
a✝ b✝ : LocallyDiscrete C
f✝ : a✝ ⟶ b✝
⊢ (f✝ ≫ 𝟙 b✝).as = f✝.as

Next tactic:
apply Category.comp_id
/-- A locally discrete bicategory is strict. -/
instance locallyDiscreteBicategory.strict : Strict (LocallyDiscrete C)
    where
  id_comp := by
    intros
    apply Discrete.ext
    apply Category.id_comp
  comp_id := by
    intros
    apply Discrete.ext
    apply Category.comp_id
  assoc := by
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
⊢ ∀ {a b c d : LocallyDiscrete C} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
intros