l3lab/ntp-mathlib huggingface dataset:
lemma csSup_mem_of_not_isSuccLimit
    (hne : s.Nonempty) (hbdd : BddAbove s) (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : ConditionallyCompleteLinearOrder α
inst✝ : Nonempty ι
f : ι → α
s : Set α
x : α
hne : Set.Nonempty s
hbdd : BddAbove s
hlim : ¬IsSuccLimit (sSup s)
⊢ sSup s ∈ s

Next tactic:
obtain ⟨y, hy⟩ := not_forall_not.mp hlim
lemma csSup_mem_of_not_isSuccLimit
    (hne : s.Nonempty) (hbdd : BddAbove s) (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  obtain ⟨y, hy⟩ := not_forall_not.mp hlim
  

Proof state:
case intro
ι : Type u_1
α : Type u_2
inst✝¹ : ConditionallyCompleteLinearOrder α
inst✝ : Nonempty ι
f : ι → α
s : Set α
x : α
hne : Set.Nonempty s
hbdd : BddAbove s
hlim : ¬IsSuccLimit (sSup s)
y : α
hy : y ⋖ sSup s
⊢ sSup s ∈ s

Next tactic:
obtain ⟨i, his, hi⟩ := exists_lt_of_lt_csSup hne hy.lt
lemma csSup_mem_of_not_isSuccLimit
    (hne : s.Nonempty) (hbdd : BddAbove s) (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  obtain ⟨y, hy⟩ := not_forall_not.mp hlim
  obtain ⟨i, his, hi⟩ := exists_lt_of_lt_csSup hne hy.lt
  

Proof state:
case intro.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : ConditionallyCompleteLinearOrder α
inst✝ : Nonempty ι
f : ι → α
s : Set α
x : α
hne : Set.Nonempty s
hbdd : BddAbove s
hlim : ¬IsSuccLimit (sSup s)
y : α
hy : y ⋖ sSup s
i : α
his : i ∈ s
hi : y < i
⊢ sSup s ∈ s

Next tactic:
exact eq_of_le_of_not_lt (le_csSup hbdd his) (hy.2 hi) ▸ his
lemma csInf_mem_of_not_isPredLimit
    (hne : s.Nonempty) (hbdd : BddBelow s) (hlim : ¬ IsPredLimit (sInf s)) :
    sInf s ∈ s := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : ConditionallyCompleteLinearOrder α
inst✝ : Nonempty ι
f : ι → α
s : Set α
x : α
hne : Set.Nonempty s
hbdd : BddBelow s
hlim : ¬IsPredLimit (sInf s)
⊢ sInf s ∈ s

Next tactic:
obtain ⟨y, hy⟩ := not_forall_not.mp hlim
lemma csInf_mem_of_not_isPredLimit
    (hne : s.Nonempty) (hbdd : BddBelow s) (hlim : ¬ IsPredLimit (sInf s)) :
    sInf s ∈ s := by
  obtain ⟨y, hy⟩ := not_forall_not.mp hlim
  

Proof state:
case intro
ι : Type u_1
α : Type u_2
inst✝¹ : ConditionallyCompleteLinearOrder α
inst✝ : Nonempty ι
f : ι → α
s : Set α
x : α
hne : Set.Nonempty s
hbdd : BddBelow s
hlim : ¬IsPredLimit (sInf s)
y : α
hy : sInf s ⋖ y
⊢ sInf s ∈ s

Next tactic:
obtain ⟨i, his, hi⟩ := exists_lt_of_csInf_lt hne hy.lt
lemma csInf_mem_of_not_isPredLimit
    (hne : s.Nonempty) (hbdd : BddBelow s) (hlim : ¬ IsPredLimit (sInf s)) :
    sInf s ∈ s := by
  obtain ⟨y, hy⟩ := not_forall_not.mp hlim
  obtain ⟨i, his, hi⟩ := exists_lt_of_csInf_lt hne hy.lt
  

Proof state:
case intro.intro.intro
ι : Type u_1
α : Type u_2
inst✝¹ : ConditionallyCompleteLinearOrder α
inst✝ : Nonempty ι
f : ι → α
s : Set α
x : α
hne : Set.Nonempty s
hbdd : BddBelow s
hlim : ¬IsPredLimit (sInf s)
y : α
hy : sInf s ⋖ y
i : α
his : i ∈ s
hi : i < y
⊢ sInf s ∈ s

Next tactic:
exact eq_of_le_of_not_lt (csInf_le hbdd his) (hy.2 · hi) ▸ his
/-- See `csSup_mem_of_not_isSuccLimit` for the `ConditionallyCompleteLinearOrder` version. -/
lemma csSup_mem_of_not_isSuccLimit'
    (hbdd : BddAbove s) (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
s : Set α
x : α
hbdd : BddAbove s
hlim : ¬IsSuccLimit (sSup s)
⊢ sSup s ∈ s

Next tactic:
obtain (rfl|hs) := s.eq_empty_or_nonempty
/-- See `csSup_mem_of_not_isSuccLimit` for the `ConditionallyCompleteLinearOrder` version. -/
lemma csSup_mem_of_not_isSuccLimit'
    (hbdd : BddAbove s) (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  obtain (rfl|hs) := s.eq_empty_or_nonempty
  · 

Proof state:
case inl
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
x : α
hbdd : BddAbove ∅
hlim : ¬IsSuccLimit (sSup ∅)
⊢ sSup ∅ ∈ ∅

Next tactic:
simp [isSuccLimit_bot] at hlim
/-- See `csSup_mem_of_not_isSuccLimit` for the `ConditionallyCompleteLinearOrder` version. -/
lemma csSup_mem_of_not_isSuccLimit'
    (hbdd : BddAbove s) (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  obtain (rfl|hs) := s.eq_empty_or_nonempty
  · simp [isSuccLimit_bot] at hlim
  · 

Proof state:
case inr
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
s : Set α
x : α
hbdd : BddAbove s
hlim : ¬IsSuccLimit (sSup s)
hs : Set.Nonempty s
⊢ sSup s ∈ s

Next tactic:
exact csSup_mem_of_not_isSuccLimit hs hbdd hlim
lemma IsLUB.mem_of_not_isSuccLimit (hs : IsLUB s x) (hx : ¬ IsSuccLimit x) :
    x ∈ s := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
s : Set α
x : α
hs : IsLUB s x
hx : ¬IsSuccLimit x
⊢ x ∈ s

Next tactic:
obtain (rfl|hs') := s.eq_empty_or_nonempty
lemma IsLUB.mem_of_not_isSuccLimit (hs : IsLUB s x) (hx : ¬ IsSuccLimit x) :
    x ∈ s := by
  obtain (rfl|hs') := s.eq_empty_or_nonempty
  · 

Proof state:
case inl
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
x : α
hx : ¬IsSuccLimit x
hs : IsLUB ∅ x
⊢ x ∈ ∅

Next tactic:
simp [show x = ⊥ by simpa using hs, isSuccLimit_bot] at hx
lemma IsLUB.mem_of_not_isSuccLimit (hs : IsLUB s x) (hx : ¬ IsSuccLimit x) :
    x ∈ s := by
  obtain (rfl|hs') := s.eq_empty_or_nonempty
  · simp [show x = ⊥ by 

Proof state:
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
x : α
hx : ¬IsSuccLimit x
hs : IsLUB ∅ x
⊢ x = ⊥

Next tactic:
simpa using hs
lemma IsLUB.mem_of_not_isSuccLimit (hs : IsLUB s x) (hx : ¬ IsSuccLimit x) :
    x ∈ s := by
  obtain (rfl|hs') := s.eq_empty_or_nonempty
  · simp [show x = ⊥ by simpa using hs, isSuccLimit_bot] at hx
  · 

Proof state:
case inr
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
s : Set α
x : α
hs : IsLUB s x
hx : ¬IsSuccLimit x
hs' : Set.Nonempty s
⊢ x ∈ s

Next tactic:
exact hs.mem_of_nonempty_of_not_isSuccLimit hs' hx
lemma sSup_mem_of_not_isSuccLimit (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝ : CompleteLinearOrder α
s : Set α
f : ι → α
x : α
hlim : ¬IsSuccLimit (sSup s)
⊢ sSup s ∈ s

Next tactic:
obtain ⟨y, hy⟩ := not_forall_not.mp hlim
lemma sSup_mem_of_not_isSuccLimit (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  obtain ⟨y, hy⟩ := not_forall_not.mp hlim
  

Proof state:
case intro
ι : Type u_1
α : Type u_2
inst✝ : CompleteLinearOrder α
s : Set α
f : ι → α
x : α
hlim : ¬IsSuccLimit (sSup s)
y : α
hy : y ⋖ sSup s
⊢ sSup s ∈ s

Next tactic:
obtain ⟨i, his, hi⟩ := lt_sSup_iff.mp hy.lt
lemma sSup_mem_of_not_isSuccLimit (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s := by
  obtain ⟨y, hy⟩ := not_forall_not.mp hlim
  obtain ⟨i, his, hi⟩ := lt_sSup_iff.mp hy.lt
  

Proof state:
case intro.intro.intro
ι : Type u_1
α : Type u_2
inst✝ : CompleteLinearOrder α
s : Set α
f : ι → α
x : α
hlim : ¬IsSuccLimit (sSup s)
y : α
hy : y ⋖ sSup s
i : α
his : i ∈ s
hi : y < i
⊢ sSup s ∈ s

Next tactic:
exact eq_of_le_of_not_lt (le_sSup his) (hy.2 hi) ▸ his
lemma sInf_mem_of_not_isPredLimit (hlim : ¬ IsPredLimit (sInf s)) :
    sInf s ∈ s := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝ : CompleteLinearOrder α
s : Set α
f : ι → α
x : α
hlim : ¬IsPredLimit (sInf s)
⊢ sInf s ∈ s

Next tactic:
obtain ⟨y, hy⟩ := not_forall_not.mp hlim
lemma sInf_mem_of_not_isPredLimit (hlim : ¬ IsPredLimit (sInf s)) :
    sInf s ∈ s := by
  obtain ⟨y, hy⟩ := not_forall_not.mp hlim
  

Proof state:
case intro
ι : Type u_1
α : Type u_2
inst✝ : CompleteLinearOrder α
s : Set α
f : ι → α
x : α
hlim : ¬IsPredLimit (sInf s)
y : α
hy : sInf s ⋖ y
⊢ sInf s ∈ s

Next tactic:
obtain ⟨i, his, hi⟩ := sInf_lt_iff.mp hy.lt
lemma sInf_mem_of_not_isPredLimit (hlim : ¬ IsPredLimit (sInf s)) :
    sInf s ∈ s := by
  obtain ⟨y, hy⟩ := not_forall_not.mp hlim
  obtain ⟨i, his, hi⟩ := sInf_lt_iff.mp hy.lt
  

Proof state:
case intro.intro.intro
ι : Type u_1
α : Type u_2
inst✝ : CompleteLinearOrder α
s : Set α
f : ι → α
x : α
hlim : ¬IsPredLimit (sInf s)
y : α
hy : sInf s ⋖ y
i : α
his : i ∈ s
hi : i < y
⊢ sInf s ∈ s

Next tactic:
exact eq_of_le_of_not_lt (sInf_le his) (hy.2 · hi) ▸ his
@[ext]
theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
    (w_fiber : eqToHom (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.2068, u_1} C
inst✝ : Category.{?u.2072, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f g : Hom X Y
w_base : f.base = g.base
⊢ (F.map g.base).obj X.fiber = (F.map f.base).obj X.fiber

Next tactic:
rw [w_base]
@[ext]
theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
    (w_fiber : eqToHom (by rw [w_base]) ≫ f.fiber = g.fiber) : f = g := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{?u.2072, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f g : Hom X Y
w_base : f.base = g.base
w_fiber : eqToHom (_ : (F.map g.base).obj X.fiber = (F.map f.base).obj X.fiber) ≫ f.fiber = g.fiber
⊢ f = g

Next tactic:
cases f
@[ext]
theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
    (w_fiber : eqToHom (by rw [w_base]) ≫ f.fiber = g.fiber) : f = g := by
  cases f; 

Proof state:
case mk
C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{?u.2072, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
g : Hom X Y
base✝ : X.base ⟶ Y.base
fiber✝ : (F.map base✝).obj X.fiber ⟶ Y.fiber
w_base : { base := base✝, fiber := fiber✝ }.base = g.base
w_fiber :
  eqToHom (_ : (F.map g.base).obj X.fiber = (F.map { base := base✝, fiber := fiber✝ }.base).obj X.fiber) ≫
      { base := base✝, fiber := fiber✝ }.fiber =
    g.fiber
⊢ { base := base✝, fiber := fiber✝ } = g

Next tactic:
cases g
@[ext]
theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
    (w_fiber : eqToHom (by rw [w_base]) ≫ f.fiber = g.fiber) : f = g := by
  cases f; cases g
  

Proof state:
case mk.mk
C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{?u.2072, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
base✝¹ : X.base ⟶ Y.base
fiber✝¹ : (F.map base✝¹).obj X.fiber ⟶ Y.fiber
base✝ : X.base ⟶ Y.base
fiber✝ : (F.map base✝).obj X.fiber ⟶ Y.fiber
w_base : { base := base✝¹, fiber := fiber✝¹ }.base = { base := base✝, fiber := fiber✝ }.base
w_fiber :
  eqToHom
        (_ :
          (F.map { base := base✝, fiber := fiber✝ }.base).obj X.fiber =
            (F.map { base := base✝¹, fiber := fiber✝¹ }.base).obj X.fiber) ≫
      { base := base✝¹, fiber := fiber✝¹ }.fiber =
    { base := base✝, fiber := fiber✝ }.fiber
⊢ { base := base✝¹, fiber := fiber✝¹ } = { base := base✝, fiber := fiber✝ }

Next tactic:
congr
@[ext]
theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
    (w_fiber : eqToHom (by rw [w_base]) ≫ f.fiber = g.fiber) : f = g := by
  cases f; cases g
  congr
  

Proof state:
case mk.mk.h.e_7
C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{?u.2072, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
base✝¹ : X.base ⟶ Y.base
fiber✝¹ : (F.map base✝¹).obj X.fiber ⟶ Y.fiber
base✝ : X.base ⟶ Y.base
fiber✝ : (F.map base✝).obj X.fiber ⟶ Y.fiber
w_base : { base := base✝¹, fiber := fiber✝¹ }.base = { base := base✝, fiber := fiber✝ }.base
w_fiber :
  eqToHom
        (_ :
          (F.map { base := base✝, fiber := fiber✝ }.base).obj X.fiber =
            (F.map { base := base✝¹, fiber := fiber✝¹ }.base).obj X.fiber) ≫
      { base := base✝¹, fiber := fiber✝¹ }.fiber =
    { base := base✝, fiber := fiber✝ }.fiber
⊢ HEq fiber✝¹ fiber✝

Next tactic:
dsimp at w_base
@[ext]
theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
    (w_fiber : eqToHom (by rw [w_base]) ≫ f.fiber = g.fiber) : f = g := by
  cases f; cases g
  congr
  dsimp at w_base
  

Proof state:
case mk.mk.h.e_7
C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{?u.2072, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
base✝¹ : X.base ⟶ Y.base
fiber✝¹ : (F.map base✝¹).obj X.fiber ⟶ Y.fiber
base✝ : X.base ⟶ Y.base
fiber✝ : (F.map base✝).obj X.fiber ⟶ Y.fiber
w_base : base✝¹ = base✝
w_fiber :
  eqToHom
        (_ :
          (F.map { base := base✝, fiber := fiber✝ }.base).obj X.fiber =
            (F.map { base := base✝¹, fiber := fiber✝¹ }.base).obj X.fiber) ≫
      { base := base✝¹, fiber := fiber✝¹ }.fiber =
    { base := base✝, fiber := fiber✝ }.fiber
⊢ HEq fiber✝¹ fiber✝

Next tactic:
aesop_cat
/-- The identity morphism in the Grothendieck category.
-/
@[simps]
def id (X : Grothendieck F) : Hom X X where
  base := 𝟙 X.base
  fiber := eqToHom (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.4991, u_1} C
inst✝ : Category.{?u.4995, u_2} D
F : C ⥤ Cat
X : Grothendieck F
⊢ (F.map (𝟙 X.base)).obj X.fiber = X.fiber

Next tactic:
erw [CategoryTheory.Functor.map_id, Functor.id_obj X.fiber]
/-- Composition of morphisms in the Grothendieck category.
-/
@[simps]
def comp {X Y Z : Grothendieck F} (f : Hom X Y) (g : Hom Y Z) : Hom X Z where
  base := f.base ≫ g.base
  fiber :=
    eqToHom (by 

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.6638, u_1} C
inst✝ : Category.{?u.6642, u_2} D
F : C ⥤ Cat
X Y Z : Grothendieck F
f : Hom X Y
g : Hom Y Z
⊢ (F.map (f.base ≫ g.base)).obj X.fiber = (F.map g.base).obj ((F.map f.base).obj X.fiber)

Next tactic:
erw [Functor.map_comp, Functor.comp_obj]
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by 

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ 𝟙 X ≫ f = f

Next tactic:
dsimp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by dsimp; 

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ comp (id X) f = f

Next tactic:
ext
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by dsimp; ext <;> 

Proof state:
case w_base
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ (comp (id X) f).base = f.base

Next tactic:
simp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by dsimp; ext <;> 

Proof state:
case w_fiber
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ eqToHom (_ : (F.map f.base).obj X.fiber = (F.map (comp (id X) f).base).obj X.fiber) ≫ (comp (id X) f).fiber = f.fiber

Next tactic:
simp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ f ≫ 𝟙 Y = f

Next tactic:
dsimp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; 

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ comp f (id Y) = f

Next tactic:
ext
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · 

Proof state:
case w_base
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ (comp f (id Y)).base = f.base

Next tactic:
simp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · 

Proof state:
case w_fiber
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ eqToHom (_ : (F.map f.base).obj X.fiber = (F.map (comp f (id Y)).base).obj X.fiber) ≫ (comp f (id Y)).fiber = f.fiber

Next tactic:
dsimp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      

Proof state:
case w_fiber
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ eqToHom (_ : (F.map f.base).obj X.fiber = (F.map (f.base ≫ 𝟙 Y.base)).obj X.fiber) ≫
      eqToHom (_ : (F.map (f.base ≫ (id Y).base)).obj X.fiber = (F.map (id Y).base).obj ((F.map f.base).obj X.fiber)) ≫
        (F.map (𝟙 Y.base)).map f.fiber ≫ eqToHom (_ : (F.map (𝟙 Y.base)).obj Y.fiber = Y.fiber) =
    f.fiber

Next tactic:
rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      

Proof state:
case w_fiber
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
X Y : Grothendieck F
f : X ⟶ Y
⊢ eqToHom (_ : (F.map f.base).obj X.fiber = (F.map (f.base ≫ 𝟙 Y.base)).obj X.fiber) ≫
      eqToHom (_ : (F.map (f.base ≫ (id Y).base)).obj X.fiber = (F.map (id Y).base).obj ((F.map f.base).obj X.fiber)) ≫
        ((eqToIso (_ : F.map (𝟙 Y.base) = 𝟙 (F.obj Y.base))).hom.app ((F.map f.base).obj X.fiber) ≫
            (𝟙 (F.obj Y.base)).map f.fiber ≫ (eqToIso (_ : F.map (𝟙 Y.base) = 𝟙 (F.obj Y.base))).inv.app Y.fiber) ≫
          eqToHom (_ : (F.map (𝟙 Y.base)).obj Y.fiber = Y.fiber) =
    f.fiber

Next tactic:
simp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by dsimp; ext <;> simp
  assoc := @fun W X Y Z f g h => by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
W X Y Z : Grothendieck F
f : W ⟶ X
g : X ⟶ Y
h : Y ⟶ Z
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
dsimp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by dsimp; ext <;> simp
  assoc := @fun W X Y Z f g h => by
    dsimp; 

Proof state:
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
W X Y Z : Grothendieck F
f : W ⟶ X
g : X ⟶ Y
h : Y ⟶ Z
⊢ comp (comp f g) h = comp f (comp g h)

Next tactic:
ext
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by dsimp; ext <;> simp
  assoc := @fun W X Y Z f g h => by
    dsimp; ext
    · 

Proof state:
case w_base
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
W X Y Z : Grothendieck F
f : W ⟶ X
g : X ⟶ Y
h : Y ⟶ Z
⊢ (comp (comp f g) h).base = (comp f (comp g h)).base

Next tactic:
simp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by dsimp; ext <;> simp
  assoc := @fun W X Y Z f g h => by
    dsimp; ext
    · simp
    · 

Proof state:
case w_fiber
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
W X Y Z : Grothendieck F
f : W ⟶ X
g : X ⟶ Y
h : Y ⟶ Z
⊢ eqToHom (_ : (F.map (comp f (comp g h)).base).obj W.fiber = (F.map (comp (comp f g) h).base).obj W.fiber) ≫
      (comp (comp f g) h).fiber =
    (comp f (comp g h)).fiber

Next tactic:
dsimp
instance : Category (Grothendieck F) where
  Hom X Y := Grothendieck.Hom X Y
  id X := Grothendieck.id X
  comp := @fun X Y Z f g => Grothendieck.comp f g
  comp_id := @fun X Y f => by
    dsimp; ext
    · simp
    · dsimp
      rw [← NatIso.naturality_2 (eqToIso (F.map_id Y.base)) f.fiber]
      simp
  id_comp := @fun X Y f => by dsimp; ext <;> simp
  assoc := @fun W X Y Z f g h => by
    dsimp; ext
    · simp
    · dsimp
      

Proof state:
case w_fiber
C : Type u_1
D : Type u_2
inst✝¹ : Category.{?u.9489, u_1} C
inst✝ : Category.{?u.9493, u_2} D
F : C ⥤ Cat
W X Y Z : Grothendieck F
f : W ⟶ X
g : X ⟶ Y
h : Y ⟶ Z
⊢ eqToHom (_ : (F.map (f.base ≫ g.base ≫ h.base)).obj W.fiber = (F.map ((f.base ≫ g.base) ≫ h.base)).obj W.fiber) ≫
      eqToHom
          (_ :
            (F.map ((comp f g).base ≫ h.base)).obj W.fiber = (F.map h.base).obj ((F.map (comp f g).base).obj W.fiber)) ≫
        (F.map h.base).map
            (eqToHom (_ : (F.map (f.base ≫ g.base)).obj W.fiber = (F.map g.base).obj ((F.map f.base).obj W.fiber)) ≫
              (F.map g.base).map f.fiber ≫ g.fiber) ≫
          h.fiber =
    eqToHom
        (_ :
          (F.map (f.base ≫ (comp g h).base)).obj W.fiber = (F.map (comp g h).base).obj ((F.map f.base).obj W.fiber)) ≫
      (F.map (g.base ≫ h.base)).map f.fiber ≫
        eqToHom (_ : (F.map (g.base ≫ h.base)).obj X.fiber = (F.map h.base).obj ((F.map g.base).obj X.fiber)) ≫
          (F.map h.base).map g.fiber ≫ h.fiber

Next tactic:
rw [← NatIso.naturality_2 (eqToIso (F.map_comp _ _)) f.fiber]