l3lab/ntp-mathlib huggingface dataset:
/-- This is the `Invertible` version of `Units.isUnit_units_mul` -/
@[reducible]
def invertibleOfInvertibleMul (a b : α) [Invertible a] [Invertible (a * b)] : Invertible b where
  invOf := ⅟ (a * b) * a
  invOf_mul_self := by rw [mul_assoc, invOf_mul_self]
  mul_invOf_self := by
    

Proof state:
α : Type u
inst✝² : Monoid α
a b : α
inst✝¹ : Invertible a
inst✝ : Invertible (a * b)
⊢ b * (⅟(a * b) * a) = 1

Next tactic:
rw [← (isUnit_of_invertible a).mul_right_inj, ← mul_assoc, ← mul_assoc, mul_invOf_self, mul_one,
      one_mul]
/-- This is the `Invertible` version of `Units.isUnit_mul_units` -/
@[reducible]
def invertibleOfMulInvertible (a b : α) [Invertible (a * b)] [Invertible b] : Invertible a where
  invOf := b * ⅟ (a * b)
  invOf_mul_self := by
    

Proof state:
α : Type u
inst✝² : Monoid α
a b : α
inst✝¹ : Invertible (a * b)
inst✝ : Invertible b
⊢ b * ⅟(a * b) * a = 1

Next tactic:
rw [← (isUnit_of_invertible b).mul_left_inj, mul_assoc, mul_assoc, invOf_mul_self, mul_one,
      one_mul]
/-- This is the `Invertible` version of `Units.isUnit_mul_units` -/
@[reducible]
def invertibleOfMulInvertible (a b : α) [Invertible (a * b)] [Invertible b] : Invertible a where
  invOf := b * ⅟ (a * b)
  invOf_mul_self := by
    rw [← (isUnit_of_invertible b).mul_left_inj, mul_assoc, mul_assoc, invOf_mul_self, mul_one,
      one_mul]
  mul_invOf_self := by 

Proof state:
α : Type u
inst✝² : Monoid α
a b : α
inst✝¹ : Invertible (a * b)
inst✝ : Invertible b
⊢ a * (b * ⅟(a * b)) = 1

Next tactic:
rw [← mul_assoc, mul_invOf_self]
/-- `b / a` is the inverse of `a / b` -/
def invertibleDiv (a b : α) [Invertible a] [Invertible b] : Invertible (a / b) :=
  ⟨b / a, by 

Proof state:
α : Type u
inst✝² : GroupWithZero α
a b : α
inst✝¹ : Invertible a
inst✝ : Invertible b
⊢ b / a * (a / b) = 1

Next tactic:
simp [← mul_div_assoc]
/-- `b / a` is the inverse of `a / b` -/
def invertibleDiv (a b : α) [Invertible a] [Invertible b] : Invertible (a / b) :=
  ⟨b / a, by simp [← mul_div_assoc], by 

Proof state:
α : Type u
inst✝² : GroupWithZero α
a b : α
inst✝¹ : Invertible a
inst✝ : Invertible b
⊢ a / b * (b / a) = 1

Next tactic:
simp [← mul_div_assoc]
theorem invOf_div (a b : α) [Invertible a] [Invertible b] [Invertible (a / b)] :
    ⅟ (a / b) = b / a :=
  invOf_eq_right_inv (by 

Proof state:
α : Type u
inst✝³ : GroupWithZero α
a b : α
inst✝² : Invertible a
inst✝¹ : Invertible b
inst✝ : Invertible (a / b)
⊢ a / b * (b / a) = 1

Next tactic:
simp [← mul_div_assoc]
/-- Monoid homs preserve invertibility. -/
def Invertible.map {R : Type*} {S : Type*} {F : Type*} [MulOneClass R] [MulOneClass S]
    [MonoidHomClass F R S] (f : F) (r : R) [Invertible r] :
    Invertible (f r) where
  invOf := f (⅟ r)
  invOf_mul_self := by 

Proof state:
α : Type u
R : Type u_1
S : Type u_2
F : Type u_3
inst✝³ : MulOneClass R
inst✝² : MulOneClass S
inst✝¹ : MonoidHomClass F R S
f : F
r : R
inst✝ : Invertible r
⊢ f ⅟r * f r = 1

Next tactic:
rw [← map_mul, invOf_mul_self, map_one]
/-- Monoid homs preserve invertibility. -/
def Invertible.map {R : Type*} {S : Type*} {F : Type*} [MulOneClass R] [MulOneClass S]
    [MonoidHomClass F R S] (f : F) (r : R) [Invertible r] :
    Invertible (f r) where
  invOf := f (⅟ r)
  invOf_mul_self := by rw [← map_mul, invOf_mul_self, map_one]
  mul_invOf_self := by 

Proof state:
α : Type u
R : Type u_1
S : Type u_2
F : Type u_3
inst✝³ : MulOneClass R
inst✝² : MulOneClass S
inst✝¹ : MonoidHomClass F R S
f : F
r : R
inst✝ : Invertible r
⊢ f r * f ⅟r = 1

Next tactic:
rw [← map_mul, mul_invOf_self, map_one]
/-- Note that the `Invertible (f r)` argument can be satisfied by using `letI := Invertible.map f r`
before applying this lemma. -/
theorem map_invOf {R : Type*} {S : Type*} {F : Type*} [MulOneClass R] [Monoid S]
    [MonoidHomClass F R S] (f : F) (r : R) [Invertible r] [ifr : Invertible (f r)] :
    f (⅟ r) = ⅟ (f r) :=
  have h : ifr = Invertible.map f r := Subsingleton.elim _ _
  by 

Proof state:
α : Type u
R : Type u_1
S : Type u_2
F : Type u_3
inst✝³ : MulOneClass R
inst✝² : Monoid S
inst✝¹ : MonoidHomClass F R S
f : F
r : R
inst✝ : Invertible r
ifr : Invertible (f r)
h : ifr = Invertible.map f r
⊢ f ⅟r = ⅟(f r)

Next tactic:
subst h
/-- Note that the `Invertible (f r)` argument can be satisfied by using `letI := Invertible.map f r`
before applying this lemma. -/
theorem map_invOf {R : Type*} {S : Type*} {F : Type*} [MulOneClass R] [Monoid S]
    [MonoidHomClass F R S] (f : F) (r : R) [Invertible r] [ifr : Invertible (f r)] :
    f (⅟ r) = ⅟ (f r) :=
  have h : ifr = Invertible.map f r := Subsingleton.elim _ _
  by subst h; 

Proof state:
α : Type u
R : Type u_1
S : Type u_2
F : Type u_3
inst✝³ : MulOneClass R
inst✝² : Monoid S
inst✝¹ : MonoidHomClass F R S
f : F
r : R
inst✝ : Invertible r
⊢ f ⅟r = ⅟(f r)

Next tactic:
rfl
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
A B : StructuredArrow V (pairwiseToOpensLeCover U)
⊢ ∃ l, List.Chain Zag A l ∧ List.getLast (A :: l) (_ : A :: l ≠ []) = B

Next tactic:
rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩ <;> 

Proof state:
case mk.mk.unit.single
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
B : StructuredArrow V (pairwiseToOpensLeCover U)
i : ι
a : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i)
⊢ ∃ l,
    List.Chain Zag { left := { as := PUnit.unit }, right := single i, hom := a } l ∧
      List.getLast ({ left := { as := PUnit.unit }, right := single i, hom := a } :: l)
          (_ : { left := { as := PUnit.unit }, right := single i, hom := a } :: l ≠ []) =
        B

Next tactic:
rcases B with ⟨⟨⟨⟩⟩, ⟨i'⟩ | ⟨i', j'⟩, b⟩
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩ <;> 

Proof state:
case mk.mk.unit.pair
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
B : StructuredArrow V (pairwiseToOpensLeCover U)
i j : ι
a : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (Pairwise.pair i j)
⊢ ∃ l,
    List.Chain Zag { left := { as := PUnit.unit }, right := Pairwise.pair i j, hom := a } l ∧
      List.getLast ({ left := { as := PUnit.unit }, right := Pairwise.pair i j, hom := a } :: l)
          (_ : { left := { as := PUnit.unit }, right := Pairwise.pair i j, hom := a } :: l ≠ []) =
        B

Next tactic:
rcases B with ⟨⟨⟨⟩⟩, ⟨i'⟩ | ⟨i', j'⟩, b⟩
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩ <;> rcases B with ⟨⟨⟨⟩⟩, ⟨i'⟩ | ⟨i', j'⟩, b⟩
      · 

Proof state:
case mk.mk.unit.single.mk.mk.unit.single
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
i : ι
a : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i)
i' : ι
b : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i')
⊢ ∃ l,
    List.Chain Zag { left := { as := PUnit.unit }, right := single i, hom := a } l ∧
      List.getLast ({ left := { as := PUnit.unit }, right := single i, hom := a } :: l)
          (_ : { left := { as := PUnit.unit }, right := single i, hom := a } :: l ≠ []) =
        { left := { as := PUnit.unit }, right := single i', hom := b }

Next tactic:
refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i i'
                hom := (le_inf a.le b.le).hom }, _], _, rfl⟩
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩ <;> rcases B with ⟨⟨⟨⟩⟩, ⟨i'⟩ | ⟨i', j'⟩, b⟩
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i i'
                hom := (le_inf a.le b.le).hom }, _], _, rfl⟩
        

Proof state:
case mk.mk.unit.single.mk.mk.unit.single
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
i : ι
a : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i)
i' : ι
b : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i')
⊢ List.Chain Zag { left := { as := PUnit.unit }, right := single i, hom := a }
    [{ left := { as := PUnit.unit }, right := Pairwise.pair i i',
        hom :=
          LE.le.hom
            (_ :
              ((Functor.fromPUnit V).obj { as := PUnit.unit }).obj ≤
                ((pairwiseToOpensLeCover U).obj (single i)).obj ⊓ ((pairwiseToOpensLeCover U).obj (single i')).obj) },
      { left := { as := PUnit.unit }, right := single i', hom := b }]

Next tactic:
exact
          List.Chain.cons
            (Or.inr
              ⟨{  left := 𝟙 _
                  right := left i i' }⟩)
            (List.Chain.cons
              (Or.inl
                ⟨{  left := 𝟙 _
                    right := right i i' }⟩)
              List.Chain.nil)
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩ <;> rcases B with ⟨⟨⟨⟩⟩, ⟨i'⟩ | ⟨i', j'⟩, b⟩
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i i'
                hom := (le_inf a.le b.le).hom }, _], _, rfl⟩
        exact
          List.Chain.cons
            (Or.inr
              ⟨{  left := 𝟙 _
                  right := left i i' }⟩)
            (List.Chain.cons
              (Or.inl
                ⟨{  left := 𝟙 _
                    right := right i i' }⟩)
              List.Chain.nil)
      · 

Proof state:
case mk.mk.unit.single.mk.mk.unit.pair
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
i : ι
a : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i)
i' j' : ι
b : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (Pairwise.pair i' j')
⊢ ∃ l,
    List.Chain Zag { left := { as := PUnit.unit }, right := single i, hom := a } l ∧
      List.getLast ({ left := { as := PUnit.unit }, right := single i, hom := a } :: l)
          (_ : { left := { as := PUnit.unit }, right := single i, hom := a } :: l ≠ []) =
        { left := { as := PUnit.unit }, right := Pairwise.pair i' j', hom := b }

Next tactic:
refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i' i
                hom := (le_inf (b.le.trans inf_le_left) a.le).hom },
              { left := ⟨⟨⟩⟩
                right := single i'
                hom := (b.le.trans inf_le_left).hom }, _], _, rfl⟩
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩ <;> rcases B with ⟨⟨⟨⟩⟩, ⟨i'⟩ | ⟨i', j'⟩, b⟩
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i i'
                hom := (le_inf a.le b.le).hom }, _], _, rfl⟩
        exact
          List.Chain.cons
            (Or.inr
              ⟨{  left := 𝟙 _
                  right := left i i' }⟩)
            (List.Chain.cons
              (Or.inl
                ⟨{  left := 𝟙 _
                    right := right i i' }⟩)
              List.Chain.nil)
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i' i
                hom := (le_inf (b.le.trans inf_le_left) a.le).hom },
              { left := ⟨⟨⟩⟩
                right := single i'
                hom := (b.le.trans inf_le_left).hom }, _], _, rfl⟩
        

Proof state:
case mk.mk.unit.single.mk.mk.unit.pair
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
i : ι
a : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i)
i' j' : ι
b : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (Pairwise.pair i' j')
⊢ List.Chain Zag { left := { as := PUnit.unit }, right := single i, hom := a }
    [{ left := { as := PUnit.unit }, right := Pairwise.pair i' i,
        hom :=
          LE.le.hom
            (_ :
              ((Functor.fromPUnit V).obj { as := PUnit.unit }).obj ≤
                U i' ⊓ ((pairwiseToOpensLeCover U).obj (single i)).obj) },
      { left := { as := PUnit.unit }, right := single i',
        hom := LE.le.hom (_ : ((Functor.fromPUnit V).obj { as := PUnit.unit }).obj ≤ U i') },
      { left := { as := PUnit.unit }, right := Pairwise.pair i' j', hom := b }]

Next tactic:
exact
          List.Chain.cons
            (Or.inr
              ⟨{  left := 𝟙 _
                  right := right i' i }⟩)
            (List.Chain.cons
              (Or.inl
                ⟨{  left := 𝟙 _
                    right := left i' i }⟩)
              (List.Chain.cons
                (Or.inr
                  ⟨{  left := 𝟙 _
                      right := left i' j' }⟩)
                List.Chain.nil))
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩ <;> rcases B with ⟨⟨⟨⟩⟩, ⟨i'⟩ | ⟨i', j'⟩, b⟩
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i i'
                hom := (le_inf a.le b.le).hom }, _], _, rfl⟩
        exact
          List.Chain.cons
            (Or.inr
              ⟨{  left := 𝟙 _
                  right := left i i' }⟩)
            (List.Chain.cons
              (Or.inl
                ⟨{  left := 𝟙 _
                    right := right i i' }⟩)
              List.Chain.nil)
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i' i
                hom := (le_inf (b.le.trans inf_le_left) a.le).hom },
              { left := ⟨⟨⟩⟩
                right := single i'
                hom := (b.le.trans inf_le_left).hom }, _], _, rfl⟩
        exact
          List.Chain.cons
            (Or.inr
              ⟨{  left := 𝟙 _
                  right := right i' i }⟩)
            (List.Chain.cons
              (Or.inl
                ⟨{  left := 𝟙 _
                    right := left i' i }⟩)
              (List.Chain.cons
                (Or.inr
                  ⟨{  left := 𝟙 _
                      right := left i' j' }⟩)
                List.Chain.nil))
      · 

Proof state:
case mk.mk.unit.pair.mk.mk.unit.single
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
i j : ι
a : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (Pairwise.pair i j)
i' : ι
b : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i')
⊢ ∃ l,
    List.Chain Zag { left := { as := PUnit.unit }, right := Pairwise.pair i j, hom := a } l ∧
      List.getLast ({ left := { as := PUnit.unit }, right := Pairwise.pair i j, hom := a } :: l)
          (_ : { left := { as := PUnit.unit }, right := Pairwise.pair i j, hom := a } :: l ≠ []) =
        { left := { as := PUnit.unit }, right := single i', hom := b }

Next tactic:
refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := single i
                hom := (a.le.trans inf_le_left).hom },
              { left := ⟨⟨⟩⟩
                right := pair i i'
                hom := (le_inf (a.le.trans inf_le_left) b.le).hom }, _], _, rfl⟩
/-- The diagram consisting of the `U i` and `U i ⊓ U j` is cofinal in the diagram
of all opens contained in some `U i`.
-/
instance : Functor.Final (pairwiseToOpensLeCover U) :=
  ⟨fun V =>
    isConnected_of_zigzag fun A B => by
      rcases A with ⟨⟨⟨⟩⟩, ⟨i⟩ | ⟨i, j⟩, a⟩ <;> rcases B with ⟨⟨⟨⟩⟩, ⟨i'⟩ | ⟨i', j'⟩, b⟩
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i i'
                hom := (le_inf a.le b.le).hom }, _], _, rfl⟩
        exact
          List.Chain.cons
            (Or.inr
              ⟨{  left := 𝟙 _
                  right := left i i' }⟩)
            (List.Chain.cons
              (Or.inl
                ⟨{  left := 𝟙 _
                    right := right i i' }⟩)
              List.Chain.nil)
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := pair i' i
                hom := (le_inf (b.le.trans inf_le_left) a.le).hom },
              { left := ⟨⟨⟩⟩
                right := single i'
                hom := (b.le.trans inf_le_left).hom }, _], _, rfl⟩
        exact
          List.Chain.cons
            (Or.inr
              ⟨{  left := 𝟙 _
                  right := right i' i }⟩)
            (List.Chain.cons
              (Or.inl
                ⟨{  left := 𝟙 _
                    right := left i' i }⟩)
              (List.Chain.cons
                (Or.inr
                  ⟨{  left := 𝟙 _
                      right := left i' j' }⟩)
                List.Chain.nil))
      · refine'
          ⟨[{   left := ⟨⟨⟩⟩
                right := single i
                hom := (a.le.trans inf_le_left).hom },
              { left := ⟨⟨⟩⟩
                right := pair i i'
                hom := (le_inf (a.le.trans inf_le_left) b.le).hom }, _], _, rfl⟩
        

Proof state:
case mk.mk.unit.pair.mk.mk.unit.single
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
V : OpensLeCover U
i j : ι
a : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (Pairwise.pair i j)
i' : ι
b : (Functor.fromPUnit V).obj { as := PUnit.unit } ⟶ (pairwiseToOpensLeCover U).obj (single i')
⊢ List.Chain Zag { left := { as := PUnit.unit }, right := Pairwise.pair i j, hom := a }
    [{ left := { as := PUnit.unit }, right := single i,
        hom := LE.le.hom (_ : ((Functor.fromPUnit V).obj { as := PUnit.unit }).obj ≤ U i) },
      { left := { as := PUnit.unit }, right := Pairwise.pair i i',
        hom :=
          LE.le.hom
            (_ :
              ((Functor.fromPUnit V).obj { as := PUnit.unit }).obj ≤
                U i ⊓ ((pairwiseToOpensLeCover U).obj (single i')).obj) },
      { left := { as := PUnit.unit }, right := single i', hom := b }]

Next tactic:
exact
          List.Chain.cons
            (Or.inl
              ⟨{  left := 𝟙 _
                  right := left i j }⟩)
            (List.Chain.cons
              (Or.inr
                ⟨{  left := 𝟙 _
                    right := left i i' }⟩)
              (List.Chain.cons
                (Or.inl
                  ⟨{  left := 𝟙 _
                      right := right i i' }⟩)
                List.Chain.nil))
/-- The diagram in `opens X` indexed by pairwise intersections from `U` is isomorphic
(in fact, equal) to the diagram factored through `opens_le_cover U`.
-/
def pairwiseDiagramIso : Pairwise.diagram U ≅ pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion _
    where
  hom := { app := by 

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
⊢ (X_1 : CategoryTheory.Pairwise ι) →
    (diagram U).obj X_1 ⟶ (pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion fun V => ∃ i, V ≤ U i).obj X_1

Next tactic:
rintro (i | ⟨i, j⟩)
/-- The diagram in `opens X` indexed by pairwise intersections from `U` is isomorphic
(in fact, equal) to the diagram factored through `opens_le_cover U`.
-/
def pairwiseDiagramIso : Pairwise.diagram U ≅ pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion _
    where
  hom := { app := by rintro (i | ⟨i, j⟩) <;> 

Proof state:
case single
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
i : ι
⊢ (diagram U).obj (single i) ⟶
    (pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion fun V => ∃ i, V ≤ U i).obj (single i)

Next tactic:
exact 𝟙 _
/-- The diagram in `opens X` indexed by pairwise intersections from `U` is isomorphic
(in fact, equal) to the diagram factored through `opens_le_cover U`.
-/
def pairwiseDiagramIso : Pairwise.diagram U ≅ pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion _
    where
  hom := { app := by rintro (i | ⟨i, j⟩) <;> 

Proof state:
case pair
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
i j : ι
⊢ (diagram U).obj (Pairwise.pair i j) ⟶
    (pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion fun V => ∃ i, V ≤ U i).obj (Pairwise.pair i j)

Next tactic:
exact 𝟙 _
/-- The diagram in `opens X` indexed by pairwise intersections from `U` is isomorphic
(in fact, equal) to the diagram factored through `opens_le_cover U`.
-/
def pairwiseDiagramIso : Pairwise.diagram U ≅ pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion _
    where
  hom := { app := by rintro (i | ⟨i, j⟩) <;> exact 𝟙 _ }
  inv := { app := by 

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
⊢ (X_1 : CategoryTheory.Pairwise ι) →
    (pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion fun V => ∃ i, V ≤ U i).obj X_1 ⟶ (diagram U).obj X_1

Next tactic:
rintro (i | ⟨i, j⟩)
/-- The diagram in `opens X` indexed by pairwise intersections from `U` is isomorphic
(in fact, equal) to the diagram factored through `opens_le_cover U`.
-/
def pairwiseDiagramIso : Pairwise.diagram U ≅ pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion _
    where
  hom := { app := by rintro (i | ⟨i, j⟩) <;> exact 𝟙 _ }
  inv := { app := by rintro (i | ⟨i, j⟩) <;> 

Proof state:
case single
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
i : ι
⊢ (pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion fun V => ∃ i, V ≤ U i).obj (single i) ⟶
    (diagram U).obj (single i)

Next tactic:
exact 𝟙 _
/-- The diagram in `opens X` indexed by pairwise intersections from `U` is isomorphic
(in fact, equal) to the diagram factored through `opens_le_cover U`.
-/
def pairwiseDiagramIso : Pairwise.diagram U ≅ pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion _
    where
  hom := { app := by rintro (i | ⟨i, j⟩) <;> exact 𝟙 _ }
  inv := { app := by rintro (i | ⟨i, j⟩) <;> 

Proof state:
case pair
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
i j : ι
⊢ (pairwiseToOpensLeCover U ⋙ fullSubcategoryInclusion fun V => ∃ i, V ≤ U i).obj (Pairwise.pair i j) ⟶
    (diagram U).obj (Pairwise.pair i j)

Next tactic:
exact 𝟙 _
/--
The cocone `Pairwise.cocone U` with cocone point `supr U` over `Pairwise.diagram U` is isomorphic
to the cocone `opens_le_cover_cocone U` (with the same cocone point)
after appropriate whiskering and postcomposition.
-/
def pairwiseCoconeIso :
    (Pairwise.cocone U).op ≅
      (Cones.postcomposeEquivalence (NatIso.op (pairwiseDiagramIso U : _) : _)).functor.obj
        ((opensLeCoverCocone U).op.whisker (pairwiseToOpensLeCover U).op) :=
  Cones.ext (Iso.refl _) (by 

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type w
U : ι → Opens ↑X
⊢ ∀ (j : (CategoryTheory.Pairwise ι)ᵒᵖ),
    (Cocone.op (cocone U)).π.app j =
      (Iso.refl (Cocone.op (cocone U)).pt).hom ≫
        ((Cones.postcomposeEquivalence (NatIso.op (pairwiseDiagramIso U))).functor.obj
                (Cone.whisker (pairwiseToOpensLeCover U).op (Cocone.op (opensLeCoverCocone U)))).π.app
          j

Next tactic:
aesop_cat