l3lab/ntp-mathlib huggingface dataset:
/-- If two half-open intervals are disjoint and the endpoint of one lies in the other,
  then it must be equal to the endpoint of the other. -/
theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂)
    (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by
  rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ x₁ x₂ y₁ y₂ : α
h : x₂ ≤ x₁ ∨ x₂ ≤ y₁
hx : x₁ < x₂
h2 : x₂ ∈ Ico y₁ y₂
⊢ y₁ = x₂

Next tactic:
apply le_antisymm h2.1
/-- If two half-open intervals are disjoint and the endpoint of one lies in the other,
  then it must be equal to the endpoint of the other. -/
theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂)
    (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by
  rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h
  apply le_antisymm h2.1
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ x₁ x₂ y₁ y₂ : α
h : x₂ ≤ x₁ ∨ x₂ ≤ y₁
hx : x₁ < x₂
h2 : x₂ ∈ Ico y₁ y₂
⊢ x₂ ≤ y₁

Next tactic:
exact h.elim (fun h => absurd hx (not_lt_of_le h)) id
@[simp]
theorem iUnion_Ico_eq_Iio_self_iff {f : ι → α} {a : α} :
    ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ : α
f : ι → α
a : α
⊢ ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x

Next tactic:
simp [← Ici_inter_Iio, ← iUnion_inter, subset_def]
@[simp]
theorem iUnion_Ioc_eq_Ioi_self_iff {f : ι → α} {a : α} :
    ⋃ i, Ioc a (f i) = Ioi a ↔ ∀ x, a < x → ∃ i, x ≤ f i := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ : α
f : ι → α
a : α
⊢ ⋃ i, Ioc a (f i) = Ioi a ↔ ∀ (x : α), a < x → ∃ i, x ≤ f i

Next tactic:
simp [← Ioi_inter_Iic, ← inter_iUnion, subset_def]
@[simp]
theorem biUnion_Ico_eq_Iio_self_iff {p : ι → Prop} {f : ∀ i, p i → α} {a : α} :
    ⋃ (i) (hi : p i), Ico (f i hi) a = Iio a ↔ ∀ x < a, ∃ i hi, f i hi ≤ x := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ : α
p : ι → Prop
f : (i : ι) → p i → α
a : α
⊢ ⋃ i, ⋃ (hi : p i), Ico (f i hi) a = Iio a ↔ ∀ x < a, ∃ i, ∃ (hi : p i), f i hi ≤ x

Next tactic:
simp [← Ici_inter_Iio, ← iUnion_inter, subset_def]
@[simp]
theorem biUnion_Ioc_eq_Ioi_self_iff {p : ι → Prop} {f : ∀ i, p i → α} {a : α} :
    ⋃ (i) (hi : p i), Ioc a (f i hi) = Ioi a ↔ ∀ x, a < x → ∃ i hi, x ≤ f i hi := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ : α
p : ι → Prop
f : (i : ι) → p i → α
a : α
⊢ ⋃ i, ⋃ (hi : p i), Ioc a (f i hi) = Ioi a ↔ ∀ (x : α), a < x → ∃ i, ∃ (hi : p i), x ≤ f i hi

Next tactic:
simp [← Ioi_inter_Iic, ← inter_iUnion, subset_def]
theorem IsGLB.biUnion_Ioi_eq (h : IsGLB s a) : ⋃ x ∈ s, Ioi x = Ioi a := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
h : IsGLB s a
⊢ ⋃ x ∈ s, Ioi x = Ioi a

Next tactic:
refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
theorem IsGLB.biUnion_Ioi_eq (h : IsGLB s a) : ⋃ x ∈ s, Ioi x = Ioi a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · 

Proof state:
case refine'_1
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
h : IsGLB s a
x : α
hx : x ∈ s
⊢ Ioi x ⊆ Ioi a

Next tactic:
exact Ioi_subset_Ioi (h.1 hx)
theorem IsGLB.biUnion_Ioi_eq (h : IsGLB s a) : ⋃ x ∈ s, Ioi x = Ioi a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · exact Ioi_subset_Ioi (h.1 hx)
  · 

Proof state:
case refine'_2
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
h : IsGLB s a
x : α
hx : x ∈ Ioi a
⊢ x ∈ ⋃ i ∈ s, Ioi i

Next tactic:
rcases h.exists_between hx with ⟨y, hys, _, hyx⟩
theorem IsGLB.biUnion_Ioi_eq (h : IsGLB s a) : ⋃ x ∈ s, Ioi x = Ioi a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · exact Ioi_subset_Ioi (h.1 hx)
  · rcases h.exists_between hx with ⟨y, hys, _, hyx⟩
    

Proof state:
case refine'_2.intro.intro.intro
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
h : IsGLB s a
x : α
hx : x ∈ Ioi a
y : α
hys : y ∈ s
left✝ : a ≤ y
hyx : y < x
⊢ x ∈ ⋃ i ∈ s, Ioi i

Next tactic:
exact mem_biUnion hys hyx
theorem IsGLB.biUnion_Ici_eq_Ioi (a_glb : IsGLB s a) (a_not_mem : a ∉ s) :
    ⋃ x ∈ s, Ici x = Ioi a := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_not_mem : a ∉ s
⊢ ⋃ x ∈ s, Ici x = Ioi a

Next tactic:
refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
theorem IsGLB.biUnion_Ici_eq_Ioi (a_glb : IsGLB s a) (a_not_mem : a ∉ s) :
    ⋃ x ∈ s, Ici x = Ioi a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · 

Proof state:
case refine'_1
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_not_mem : a ∉ s
x : α
hx : x ∈ s
⊢ Ici x ⊆ Ioi a

Next tactic:
exact Ici_subset_Ioi.mpr (lt_of_le_of_ne (a_glb.1 hx) fun h => (h ▸ a_not_mem) hx)
theorem IsGLB.biUnion_Ici_eq_Ioi (a_glb : IsGLB s a) (a_not_mem : a ∉ s) :
    ⋃ x ∈ s, Ici x = Ioi a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · exact Ici_subset_Ioi.mpr (lt_of_le_of_ne (a_glb.1 hx) fun h => (h ▸ a_not_mem) hx)
  · 

Proof state:
case refine'_2
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_not_mem : a ∉ s
x : α
hx : x ∈ Ioi a
⊢ x ∈ ⋃ i ∈ s, Ici i

Next tactic:
rcases a_glb.exists_between hx with ⟨y, hys, _, hyx⟩
theorem IsGLB.biUnion_Ici_eq_Ioi (a_glb : IsGLB s a) (a_not_mem : a ∉ s) :
    ⋃ x ∈ s, Ici x = Ioi a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · exact Ici_subset_Ioi.mpr (lt_of_le_of_ne (a_glb.1 hx) fun h => (h ▸ a_not_mem) hx)
  · rcases a_glb.exists_between hx with ⟨y, hys, _, hyx⟩
    

Proof state:
case refine'_2.intro.intro.intro
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_not_mem : a ∉ s
x : α
hx : x ∈ Ioi a
y : α
hys : y ∈ s
left✝ : a ≤ y
hyx : y < x
⊢ x ∈ ⋃ i ∈ s, Ici i

Next tactic:
apply mem_iUnion₂.mpr
theorem IsGLB.biUnion_Ici_eq_Ioi (a_glb : IsGLB s a) (a_not_mem : a ∉ s) :
    ⋃ x ∈ s, Ici x = Ioi a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · exact Ici_subset_Ioi.mpr (lt_of_le_of_ne (a_glb.1 hx) fun h => (h ▸ a_not_mem) hx)
  · rcases a_glb.exists_between hx with ⟨y, hys, _, hyx⟩
    apply mem_iUnion₂.mpr
    

Proof state:
case refine'_2.intro.intro.intro
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_not_mem : a ∉ s
x : α
hx : x ∈ Ioi a
y : α
hys : y ∈ s
left✝ : a ≤ y
hyx : y < x
⊢ ∃ i, ∃ (_ : i ∈ s), x ∈ Ici i

Next tactic:
refine' ⟨y, hys, hyx.le⟩
theorem IsGLB.biUnion_Ici_eq_Ici (a_glb : IsGLB s a) (a_mem : a ∈ s) :
    ⋃ x ∈ s, Ici x = Ici a := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_mem : a ∈ s
⊢ ⋃ x ∈ s, Ici x = Ici a

Next tactic:
refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
theorem IsGLB.biUnion_Ici_eq_Ici (a_glb : IsGLB s a) (a_mem : a ∈ s) :
    ⋃ x ∈ s, Ici x = Ici a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · 

Proof state:
case refine'_1
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_mem : a ∈ s
x : α
hx : x ∈ s
⊢ Ici x ⊆ Ici a

Next tactic:
exact Ici_subset_Ici.mpr (mem_lowerBounds.mp a_glb.1 x hx)
theorem IsGLB.biUnion_Ici_eq_Ici (a_glb : IsGLB s a) (a_mem : a ∈ s) :
    ⋃ x ∈ s, Ici x = Ici a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · exact Ici_subset_Ici.mpr (mem_lowerBounds.mp a_glb.1 x hx)
  · 

Proof state:
case refine'_2
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_mem : a ∈ s
x : α
hx : x ∈ Ici a
⊢ x ∈ ⋃ i ∈ s, Ici i

Next tactic:
apply mem_iUnion₂.mpr
theorem IsGLB.biUnion_Ici_eq_Ici (a_glb : IsGLB s a) (a_mem : a ∈ s) :
    ⋃ x ∈ s, Ici x = Ici a := by
  refine' (iUnion₂_subset fun x hx => _).antisymm fun x hx => _
  · exact Ici_subset_Ici.mpr (mem_lowerBounds.mp a_glb.1 x hx)
  · apply mem_iUnion₂.mpr
    

Proof state:
case refine'_2
ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
s : Set α
a : α
f : ι → α
a_glb : IsGLB s a
a_mem : a ∈ s
x : α
hx : x ∈ Ici a
⊢ ∃ i, ∃ (_ : i ∈ s), x ∈ Ici i

Next tactic:
refine' ⟨a, a_mem, hx⟩
theorem iUnion_Ici_eq_Ioi_iInf {R : Type*} [CompleteLinearOrder R] {f : ι → R}
    (no_least_elem : ⨅ i, f i ∉ range f) : ⋃ i : ι, Ici (f i) = Ioi (⨅ i, f i) := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝¹ : LinearOrder α
s : Set α
a : α
f✝ : ι → α
R : Type u_1
inst✝ : CompleteLinearOrder R
f : ι → R
no_least_elem : ⨅ i, f i ∉ range f
⊢ ⋃ i, Ici (f i) = Ioi (⨅ i, f i)

Next tactic:
simp only [← IsGLB.biUnion_Ici_eq_Ioi (@isGLB_iInf _ _ _ f) no_least_elem, mem_range,
    iUnion_exists, iUnion_iUnion_eq']
theorem iUnion_Ici_eq_Ici_iInf {R : Type*} [CompleteLinearOrder R] {f : ι → R}
    (has_least_elem : (⨅ i, f i) ∈ range f) : ⋃ i : ι, Ici (f i) = Ici (⨅ i, f i) := by
  

Proof state:
ι : Sort u
α : Type v
β : Type w
inst✝¹ : LinearOrder α
s : Set α
a : α
f✝ : ι → α
R : Type u_1
inst✝ : CompleteLinearOrder R
f : ι → R
has_least_elem : ⨅ i, f i ∈ range f
⊢ ⋃ i, Ici (f i) = Ici (⨅ i, f i)

Next tactic:
simp only [← IsGLB.biUnion_Ici_eq_Ici (@isGLB_iInf _ _ _ f) has_least_elem, mem_range,
    iUnion_exists, iUnion_iUnion_eq']
/-- **Denumerability of the Rational Numbers** -/
instance : Denumerable ℚ := by
  

Proof state:
⊢ Denumerable ℚ

Next tactic:
let T := { x : ℤ × ℕ // 0 < x.2 ∧ x.1.natAbs.Coprime x.2 }
/-- **Denumerability of the Rational Numbers** -/
instance : Denumerable ℚ := by
  let T := { x : ℤ × ℕ // 0 < x.2 ∧ x.1.natAbs.Coprime x.2 }
  

Proof state:
T : Type := { x // 0 < x.2 ∧ Nat.Coprime (Int.natAbs x.1) x.2 }
⊢ Denumerable ℚ

Next tactic:
letI : Infinite T := Infinite.of_injective _ denumerable_aux.injective
/-- **Denumerability of the Rational Numbers** -/
instance : Denumerable ℚ := by
  let T := { x : ℤ × ℕ // 0 < x.2 ∧ x.1.natAbs.Coprime x.2 }
  letI : Infinite T := Infinite.of_injective _ denumerable_aux.injective
  

Proof state:
T : Type := { x // 0 < x.2 ∧ Nat.Coprime (Int.natAbs x.1) x.2 }
this : Infinite T := Infinite.of_injective (⇑Rat.denumerable_aux) (Equiv.injective Rat.denumerable_aux)
⊢ Denumerable ℚ

Next tactic:
letI : Encodable T := Subtype.encodable
/-- **Denumerability of the Rational Numbers** -/
instance : Denumerable ℚ := by
  let T := { x : ℤ × ℕ // 0 < x.2 ∧ x.1.natAbs.Coprime x.2 }
  letI : Infinite T := Infinite.of_injective _ denumerable_aux.injective
  letI : Encodable T := Subtype.encodable
  

Proof state:
T : Type := { x // 0 < x.2 ∧ Nat.Coprime (Int.natAbs x.1) x.2 }
this✝ : Infinite T := Infinite.of_injective (⇑Rat.denumerable_aux) (Equiv.injective Rat.denumerable_aux)
this : Encodable T := Subtype.encodable
⊢ Denumerable ℚ

Next tactic:
letI : Denumerable T := ofEncodableOfInfinite T
/-- **Denumerability of the Rational Numbers** -/
instance : Denumerable ℚ := by
  let T := { x : ℤ × ℕ // 0 < x.2 ∧ x.1.natAbs.Coprime x.2 }
  letI : Infinite T := Infinite.of_injective _ denumerable_aux.injective
  letI : Encodable T := Subtype.encodable
  letI : Denumerable T := ofEncodableOfInfinite T
  

Proof state:
T : Type := { x // 0 < x.2 ∧ Nat.Coprime (Int.natAbs x.1) x.2 }
this✝¹ : Infinite T := Infinite.of_injective (⇑Rat.denumerable_aux) (Equiv.injective Rat.denumerable_aux)
this✝ : Encodable T := Subtype.encodable
this : Denumerable T := ofEncodableOfInfinite T
⊢ Denumerable ℚ

Next tactic:
exact Denumerable.ofEquiv T denumerable_aux
theorem Cardinal.mkRat : #ℚ = ℵ₀ := by 

Proof state:
⊢ #ℚ = ℵ₀

Next tactic:
simp only [mk_eq_aleph0]
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ NatTrans.Equifibered α

Next tactic:
rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  

Proof state:
case mk.left.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ IsPullback (F.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })
    (α.app { as := WalkingPair.left }) (α.app { as := { as := WalkingPair.left }.as })
    (F'.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })
case mk.right.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ IsPullback (F.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })
    (α.app { as := WalkingPair.right }) (α.app { as := { as := WalkingPair.right }.as })
    (F'.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })

Next tactic:
all_goals
    dsimp; simp only [Discrete.functor_map_id]
    exact IsPullback.of_horiz_isIso ⟨by simp only [Category.comp_id, Category.id_comp]⟩
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  all_goals
    

Proof state:
case mk.left.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ IsPullback (F.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })
    (α.app { as := WalkingPair.left }) (α.app { as := { as := WalkingPair.left }.as })
    (F'.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })

Next tactic:
dsimp
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  all_goals
    dsimp; 

Proof state:
case mk.left.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ IsPullback (F.map { down := { down := (_ : WalkingPair.left = WalkingPair.left) } })
    (α.app { as := WalkingPair.left }) (α.app { as := WalkingPair.left })
    (F'.map { down := { down := (_ : WalkingPair.left = WalkingPair.left) } })

Next tactic:
simp only [Discrete.functor_map_id]
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  all_goals
    dsimp; simp only [Discrete.functor_map_id]
    

Proof state:
case mk.left.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ IsPullback (𝟙 (F.obj { as := WalkingPair.left })) (α.app { as := WalkingPair.left })
    (α.app { as := WalkingPair.left }) (𝟙 (F'.obj { as := WalkingPair.left }))

Next tactic:
exact IsPullback.of_horiz_isIso ⟨by simp only [Category.comp_id, Category.id_comp]⟩
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  all_goals
    dsimp; simp only [Discrete.functor_map_id]
    exact IsPullback.of_horiz_isIso ⟨by 

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ 𝟙 (F.obj { as := WalkingPair.left }) ≫ α.app { as := WalkingPair.left } =
    α.app { as := WalkingPair.left } ≫ 𝟙 (F'.obj { as := WalkingPair.left })

Next tactic:
simp only [Category.comp_id, Category.id_comp]
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  all_goals
    

Proof state:
case mk.right.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ IsPullback (F.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })
    (α.app { as := WalkingPair.right }) (α.app { as := { as := WalkingPair.right }.as })
    (F'.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })

Next tactic:
dsimp
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  all_goals
    dsimp; 

Proof state:
case mk.right.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ IsPullback (F.map { down := { down := (_ : WalkingPair.right = WalkingPair.right) } })
    (α.app { as := WalkingPair.right }) (α.app { as := WalkingPair.right })
    (F'.map { down := { down := (_ : WalkingPair.right = WalkingPair.right) } })

Next tactic:
simp only [Discrete.functor_map_id]
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  all_goals
    dsimp; simp only [Discrete.functor_map_id]
    

Proof state:
case mk.right.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ IsPullback (𝟙 (F.obj { as := WalkingPair.right })) (α.app { as := WalkingPair.right })
    (α.app { as := WalkingPair.right }) (𝟙 (F'.obj { as := WalkingPair.right }))

Next tactic:
exact IsPullback.of_horiz_isIso ⟨by simp only [Category.comp_id, Category.id_comp]⟩
theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α := by
  rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
  all_goals
    dsimp; simp only [Discrete.functor_map_id]
    exact IsPullback.of_horiz_isIso ⟨by 

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.5799, u_1} K
D : Type u_2
inst✝ : Category.{?u.5806, u_2} D
F F' : Discrete WalkingPair ⥤ C
α : F ⟶ F'
⊢ 𝟙 (F.obj { as := WalkingPair.right }) ≫ α.app { as := WalkingPair.right } =
    α.app { as := WalkingPair.right } ≫ 𝟙 (F'.obj { as := WalkingPair.right })

Next tactic:
simp only [Category.comp_id, Category.id_comp]
theorem NatTrans.equifibered_of_discrete {ι : Type*} {F G : Discrete ι ⥤ C}
    (α : F ⟶ G) : NatTrans.Equifibered α := by
  

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.8333, u_1} K
D : Type u_2
inst✝ : Category.{?u.8340, u_2} D
ι : Type u_3
F G : Discrete ι ⥤ C
α : F ⟶ G
⊢ Equifibered α

Next tactic:
rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
theorem NatTrans.equifibered_of_discrete {ι : Type*} {F G : Discrete ι ⥤ C}
    (α : F ⟶ G) : NatTrans.Equifibered α := by
  rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
  

Proof state:
case mk.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.8333, u_1} K
D : Type u_2
inst✝ : Category.{?u.8340, u_2} D
ι : Type u_3
F G : Discrete ι ⥤ C
α : F ⟶ G
i : ι
⊢ IsPullback (F.map { down := { down := (_ : i = i) } }) (α.app { as := i }) (α.app { as := i })
    (G.map { down := { down := (_ : i = i) } })

Next tactic:
simp only [Discrete.functor_map_id]
theorem NatTrans.equifibered_of_discrete {ι : Type*} {F G : Discrete ι ⥤ C}
    (α : F ⟶ G) : NatTrans.Equifibered α := by
  rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
  simp only [Discrete.functor_map_id]
  

Proof state:
case mk.mk.up.up
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.8333, u_1} K
D : Type u_2
inst✝ : Category.{?u.8340, u_2} D
ι : Type u_3
F G : Discrete ι ⥤ C
α : F ⟶ G
i : ι
⊢ IsPullback (𝟙 (F.obj { as := i })) (α.app { as := i }) (α.app { as := i }) (𝟙 (G.obj { as := i }))

Next tactic:
exact IsPullback.of_horiz_isIso ⟨by rw [Category.id_comp, Category.comp_id]⟩
theorem NatTrans.equifibered_of_discrete {ι : Type*} {F G : Discrete ι ⥤ C}
    (α : F ⟶ G) : NatTrans.Equifibered α := by
  rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
  simp only [Discrete.functor_map_id]
  exact IsPullback.of_horiz_isIso ⟨by 

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.8333, u_1} K
D : Type u_2
inst✝ : Category.{?u.8340, u_2} D
ι : Type u_3
F G : Discrete ι ⥤ C
α : F ⟶ G
i : ι
⊢ 𝟙 (F.obj { as := i }) ≫ α.app { as := i } = α.app { as := i } ≫ 𝟙 (G.obj { as := i })

Next tactic:
rw [Category.id_comp, Category.comp_id]
/-- A van Kampen colimit is a colimit. -/
noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
    (h : IsVanKampenColimit c) : IsColimit c := by
  

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.15128, u_1} K
D : Type u_2
inst✝ : Category.{?u.15135, u_2} D
F : J ⥤ C
c : Cocone F
h : IsVanKampenColimit c
⊢ IsColimit c

Next tactic:
refine' ((h c (𝟙 F) (𝟙 c.pt : _) (by rw [Functor.map_id, Category.comp_id, Category.id_comp])
    (NatTrans.equifibered_of_isIso _)).mpr fun j => _).some
/-- A van Kampen colimit is a colimit. -/
noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
    (h : IsVanKampenColimit c) : IsColimit c := by
  refine' ((h c (𝟙 F) (𝟙 c.pt : _) (by 

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.15128, u_1} K
D : Type u_2
inst✝ : Category.{?u.15135, u_2} D
F : J ⥤ C
c : Cocone F
h : IsVanKampenColimit c
⊢ 𝟙 F ≫ c.ι = c.ι ≫ (Functor.const J).map (𝟙 c.pt)

Next tactic:
rw [Functor.map_id, Category.comp_id, Category.id_comp]
/-- A van Kampen colimit is a colimit. -/
noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
    (h : IsVanKampenColimit c) : IsColimit c := by
  refine' ((h c (𝟙 F) (𝟙 c.pt : _) (by rw [Functor.map_id, Category.comp_id, Category.id_comp])
    (NatTrans.equifibered_of_isIso _)).mpr fun j => _).some
  

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.15128, u_1} K
D : Type u_2
inst✝ : Category.{?u.15135, u_2} D
F : J ⥤ C
c : Cocone F
h : IsVanKampenColimit c
j : J
⊢ IsPullback (c.ι.app j) ((𝟙 F).app j) (𝟙 c.pt) (c.ι.app j)

Next tactic:
haveI : IsIso (𝟙 c.pt) := inferInstance
/-- A van Kampen colimit is a colimit. -/
noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
    (h : IsVanKampenColimit c) : IsColimit c := by
  refine' ((h c (𝟙 F) (𝟙 c.pt : _) (by rw [Functor.map_id, Category.comp_id, Category.id_comp])
    (NatTrans.equifibered_of_isIso _)).mpr fun j => _).some
  haveI : IsIso (𝟙 c.pt) := inferInstance
  

Proof state:
J : Type v'
inst✝³ : Category.{u', v'} J
C : Type u
inst✝² : Category.{v, u} C
K : Type u_1
inst✝¹ : Category.{?u.15128, u_1} K
D : Type u_2
inst✝ : Category.{?u.15135, u_2} D
F : J ⥤ C
c : Cocone F
h : IsVanKampenColimit c
j : J
this : IsIso (𝟙 c.pt)
⊢ IsPullback (c.ι.app j) ((𝟙 F).app j) (𝟙 c.pt) (c.ι.app j)

Next tactic:
exact IsPullback.of_vert_isIso ⟨by erw [NatTrans.id_app, Category.comp_id, Category.id_comp]⟩