l3lab/ntp-mathlib huggingface dataset:
/-- A helper function used in defining the Čech adjunction. -/
@[simps]
def cechNerveEquiv (X : SimplicialObject.Augmented C) (F : Arrow C) :
    (Augmented.toArrow.obj X ⟶ F) ≃ (X ⟶ F.augmentedCechNerve) where
  toFun := equivalenceLeftToRight _ _
  invFun := equivalenceRightToLeft _ _
  left_inv := by
    intro A
    ext
    · dsimp
      erw [WidePullback.lift_π]
      nth_rw 2 [← Category.id_comp A.left]
      congr 1
      convert X.left.map_id _
      rw [← op_id]
      congr 1
      ext ⟨a, ha⟩
      change a < 1 at ha
      change 0 = a
      linarith
    · rfl
  right_inv := by
    intro A
    ext x : 2
    · refine' WidePullback.hom_ext _ _ _ (fun j => _) _
      · dsimp
        

Proof state:
case h₁.h.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
X : Augmented C
F : Arrow C
A : X ⟶ Arrow.augmentedCechNerve F
x : SimplexCategoryᵒᵖ
j : Fin (SimplexCategory.len x.unop + 1)
⊢ WidePullback.lift (X.hom.app x ≫ A.right)
        (fun i =>
          X.left.map (SimplexCategory.const x.unop i).op ≫
            A.left.app (Opposite.op (SimplexCategory.mk 0)) ≫ WidePullback.π (fun x => F.hom) 0)
        (_ :
          ∀ (i : Fin (SimplexCategory.len x.unop + 1)),
            (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ (equivalenceRightToLeft X F A).left) i ≫ F.hom =
              X.hom.app x ≫ (equivalenceRightToLeft X F A).right) ≫
      WidePullback.π (fun x => F.hom) j =
    A.left.app x ≫ WidePullback.π (fun x => F.hom) j

Next tactic:
simp
/-- A helper function used in defining the Čech adjunction. -/
@[simps]
def cechNerveEquiv (X : SimplicialObject.Augmented C) (F : Arrow C) :
    (Augmented.toArrow.obj X ⟶ F) ≃ (X ⟶ F.augmentedCechNerve) where
  toFun := equivalenceLeftToRight _ _
  invFun := equivalenceRightToLeft _ _
  left_inv := by
    intro A
    ext
    · dsimp
      erw [WidePullback.lift_π]
      nth_rw 2 [← Category.id_comp A.left]
      congr 1
      convert X.left.map_id _
      rw [← op_id]
      congr 1
      ext ⟨a, ha⟩
      change a < 1 at ha
      change 0 = a
      linarith
    · rfl
  right_inv := by
    intro A
    ext x : 2
    · refine' WidePullback.hom_ext _ _ _ (fun j => _) _
      · dsimp
        simp
        

Proof state:
case h₁.h.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
X : Augmented C
F : Arrow C
A : X ⟶ Arrow.augmentedCechNerve F
x : SimplexCategoryᵒᵖ
j : Fin (SimplexCategory.len x.unop + 1)
⊢ A.left.app x ≫ WidePullback.π (fun x => F.hom) ((SimplexCategory.Hom.toOrderHom (SimplexCategory.const x.unop j)) 0) =
    A.left.app x ≫ WidePullback.π (fun x => F.hom) j

Next tactic:
rfl
/-- A helper function used in defining the Čech adjunction. -/
@[simps]
def cechNerveEquiv (X : SimplicialObject.Augmented C) (F : Arrow C) :
    (Augmented.toArrow.obj X ⟶ F) ≃ (X ⟶ F.augmentedCechNerve) where
  toFun := equivalenceLeftToRight _ _
  invFun := equivalenceRightToLeft _ _
  left_inv := by
    intro A
    ext
    · dsimp
      erw [WidePullback.lift_π]
      nth_rw 2 [← Category.id_comp A.left]
      congr 1
      convert X.left.map_id _
      rw [← op_id]
      congr 1
      ext ⟨a, ha⟩
      change a < 1 at ha
      change 0 = a
      linarith
    · rfl
  right_inv := by
    intro A
    ext x : 2
    · refine' WidePullback.hom_ext _ _ _ (fun j => _) _
      · dsimp
        simp
        rfl
      · 

Proof state:
case h₁.h.refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
X : Augmented C
F : Arrow C
A : X ⟶ Arrow.augmentedCechNerve F
x : SimplexCategoryᵒᵖ
⊢ ((equivalenceLeftToRight X F (equivalenceRightToLeft X F A)).left.app x ≫ WidePullback.base fun x => F.hom) =
    A.left.app x ≫ WidePullback.base fun x => F.hom

Next tactic:
simpa using congr_app A.w.symm x
/-- A helper function used in defining the Čech adjunction. -/
@[simps]
def cechNerveEquiv (X : SimplicialObject.Augmented C) (F : Arrow C) :
    (Augmented.toArrow.obj X ⟶ F) ≃ (X ⟶ F.augmentedCechNerve) where
  toFun := equivalenceLeftToRight _ _
  invFun := equivalenceRightToLeft _ _
  left_inv := by
    intro A
    ext
    · dsimp
      erw [WidePullback.lift_π]
      nth_rw 2 [← Category.id_comp A.left]
      congr 1
      convert X.left.map_id _
      rw [← op_id]
      congr 1
      ext ⟨a, ha⟩
      change a < 1 at ha
      change 0 = a
      linarith
    · rfl
  right_inv := by
    intro A
    ext x : 2
    · refine' WidePullback.hom_ext _ _ _ (fun j => _) _
      · dsimp
        simp
        rfl
      · simpa using congr_app A.w.symm x
    · 

Proof state:
case h₂
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
X : Augmented C
F : Arrow C
A : X ⟶ Arrow.augmentedCechNerve F
⊢ (equivalenceLeftToRight X F (equivalenceRightToLeft X F A)).right = A.right

Next tactic:
rfl
/-- The augmented Čech nerve construction is right adjoint to the `toArrow` functor. -/
abbrev cechNerveAdjunction : (Augmented.toArrow : _ ⥤ Arrow C) ⊣ augmentedCechNerve :=
  Adjunction.mkOfHomEquiv
    { homEquiv := cechNerveEquiv
      homEquiv_naturality_left_symm := by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
⊢ ∀ {X' X : Augmented C} {Y : Arrow C} (f : X' ⟶ X) (g : X ⟶ augmentedCechNerve.obj Y),
    (cechNerveEquiv X' Y).symm (f ≫ g) = Augmented.toArrow.map f ≫ (cechNerveEquiv X Y).symm g

Next tactic:
dsimp [cechNerveEquiv]
/-- The augmented Čech nerve construction is right adjoint to the `toArrow` functor. -/
abbrev cechNerveAdjunction : (Augmented.toArrow : _ ⥤ Arrow C) ⊣ augmentedCechNerve :=
  Adjunction.mkOfHomEquiv
    { homEquiv := cechNerveEquiv
      homEquiv_naturality_left_symm := by dsimp [cechNerveEquiv]; 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
⊢ ∀ {X' X : Augmented C} {Y : Arrow C} (f : X' ⟶ X) (g : X ⟶ augmentedCechNerve.obj Y),
    equivalenceRightToLeft X' Y (f ≫ g) = Augmented.toArrow.map f ≫ equivalenceRightToLeft X Y g

Next tactic:
aesop_cat
/-- The augmented Čech nerve construction is right adjoint to the `toArrow` functor. -/
abbrev cechNerveAdjunction : (Augmented.toArrow : _ ⥤ Arrow C) ⊣ augmentedCechNerve :=
  Adjunction.mkOfHomEquiv
    { homEquiv := cechNerveEquiv
      homEquiv_naturality_left_symm := by dsimp [cechNerveEquiv]; aesop_cat
      homEquiv_naturality_right := by
        

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
⊢ ∀ {X : Augmented C} {Y Y' : Arrow C} (f : Augmented.toArrow.obj X ⟶ Y) (g : Y ⟶ Y'),
    (cechNerveEquiv X Y') (f ≫ g) = (cechNerveEquiv X Y) f ≫ augmentedCechNerve.map g

Next tactic:
dsimp [cechNerveEquiv]
/-- The augmented Čech nerve construction is right adjoint to the `toArrow` functor. -/
abbrev cechNerveAdjunction : (Augmented.toArrow : _ ⥤ Arrow C) ⊣ augmentedCechNerve :=
  Adjunction.mkOfHomEquiv
    { homEquiv := cechNerveEquiv
      homEquiv_naturality_left_symm := by dsimp [cechNerveEquiv]; aesop_cat
      homEquiv_naturality_right := by
        dsimp [cechNerveEquiv]
        -- The next three lines were not needed before leanprover/lean4#2644
        

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
⊢ ∀ {X : Augmented C} {Y Y' : Arrow C} (f : Augmented.toArrow.obj X ⟶ Y) (g : Y ⟶ Y'),
    { toFun := equivalenceLeftToRight X Y', invFun := equivalenceRightToLeft X Y',
          left_inv :=
            (_ : ∀ (A : Augmented.toArrow.obj X ⟶ Y'), equivalenceRightToLeft X Y' (equivalenceLeftToRight X Y' A) = A),
          right_inv :=
            (_ :
              ∀ (A : X ⟶ Arrow.augmentedCechNerve Y'),
                equivalenceLeftToRight X Y' (equivalenceRightToLeft X Y' A) = A) }
        (f ≫ g) =
      { toFun := equivalenceLeftToRight X Y, invFun := equivalenceRightToLeft X Y,
            left_inv :=
              (_ : ∀ (A : Augmented.toArrow.obj X ⟶ Y), equivalenceRightToLeft X Y (equivalenceLeftToRight X Y A) = A),
            right_inv :=
              (_ :
                ∀ (A : X ⟶ Arrow.augmentedCechNerve Y), equivalenceLeftToRight X Y (equivalenceRightToLeft X Y A) = A) }
          f ≫
        augmentedCechNerve.map g

Next tactic:
intro X Y Y' f g
/-- The augmented Čech nerve construction is right adjoint to the `toArrow` functor. -/
abbrev cechNerveAdjunction : (Augmented.toArrow : _ ⥤ Arrow C) ⊣ augmentedCechNerve :=
  Adjunction.mkOfHomEquiv
    { homEquiv := cechNerveEquiv
      homEquiv_naturality_left_symm := by dsimp [cechNerveEquiv]; aesop_cat
      homEquiv_naturality_right := by
        dsimp [cechNerveEquiv]
        -- The next three lines were not needed before leanprover/lean4#2644
        intro X Y Y' f g
        

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
X : Augmented C
Y Y' : Arrow C
f : Augmented.toArrow.obj X ⟶ Y
g : Y ⟶ Y'
⊢ { toFun := equivalenceLeftToRight X Y', invFun := equivalenceRightToLeft X Y',
        left_inv :=
          (_ : ∀ (A : Augmented.toArrow.obj X ⟶ Y'), equivalenceRightToLeft X Y' (equivalenceLeftToRight X Y' A) = A),
        right_inv :=
          (_ :
            ∀ (A : X ⟶ Arrow.augmentedCechNerve Y'), equivalenceLeftToRight X Y' (equivalenceRightToLeft X Y' A) = A) }
      (f ≫ g) =
    { toFun := equivalenceLeftToRight X Y, invFun := equivalenceRightToLeft X Y,
          left_inv :=
            (_ : ∀ (A : Augmented.toArrow.obj X ⟶ Y), equivalenceRightToLeft X Y (equivalenceLeftToRight X Y A) = A),
          right_inv :=
            (_ :
              ∀ (A : X ⟶ Arrow.augmentedCechNerve Y), equivalenceLeftToRight X Y (equivalenceRightToLeft X Y A) = A) }
        f ≫
      augmentedCechNerve.map g

Next tactic:
change equivalenceLeftToRight X Y' (f ≫ g) =
          equivalenceLeftToRight X Y f ≫ augmentedCechNerve.map g
/-- The augmented Čech nerve construction is right adjoint to the `toArrow` functor. -/
abbrev cechNerveAdjunction : (Augmented.toArrow : _ ⥤ Arrow C) ⊣ augmentedCechNerve :=
  Adjunction.mkOfHomEquiv
    { homEquiv := cechNerveEquiv
      homEquiv_naturality_left_symm := by dsimp [cechNerveEquiv]; aesop_cat
      homEquiv_naturality_right := by
        dsimp [cechNerveEquiv]
        -- The next three lines were not needed before leanprover/lean4#2644
        intro X Y Y' f g
        change equivalenceLeftToRight X Y' (f ≫ g) =
          equivalenceLeftToRight X Y f ≫ augmentedCechNerve.map g
        

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom
X : Augmented C
Y Y' : Arrow C
f : Augmented.toArrow.obj X ⟶ Y
g : Y ⟶ Y'
⊢ equivalenceLeftToRight X Y' (f ≫ g) = equivalenceLeftToRight X Y f ≫ augmentedCechNerve.map g

Next tactic:
aesop_cat
/-- The Čech conerve associated to an arrow. -/
@[simps]
def cechConerve : CosimplicialObject C where
  obj n := widePushout f.left (fun _ : Fin (n.len + 1) => f.right) fun _ => f.hom
  map {x y} g := by
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
f : Arrow C
inst✝ : ∀ (n : ℕ), HasWidePushout f.left (fun x => f.right) fun x => f.hom
x y : SimplexCategory
g : x ⟶ y
⊢ (fun n => widePushout f.left (fun x => f.right) fun x => f.hom) x ⟶
    (fun n => widePushout f.left (fun x => f.right) fun x => f.hom) y

Next tactic:
refine' WidePushout.desc (WidePushout.head _)
      (fun i => (@WidePushout.ι _ _ _ _ _ (fun _ => f.hom) ?_ (g.toOrderHom i))) (fun j => _)
/-- The Čech conerve associated to an arrow. -/
@[simps]
def cechConerve : CosimplicialObject C where
  obj n := widePushout f.left (fun _ : Fin (n.len + 1) => f.right) fun _ => f.hom
  map {x y} g := by
    refine' WidePushout.desc (WidePushout.head _)
      (fun i => (@WidePushout.ι _ _ _ _ _ (fun _ => f.hom) ?_ (g.toOrderHom i))) (fun j => _)
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
f : Arrow C
inst✝ : ∀ (n : ℕ), HasWidePushout f.left (fun x => f.right) fun x => f.hom
x y : SimplexCategory
g : x ⟶ y
j : Fin (SimplexCategory.len x + 1)
⊢ f.hom ≫ (fun i => WidePushout.ι (fun x => f.hom) ((SimplexCategory.Hom.toOrderHom g) i)) j =
    WidePushout.head fun x => f.hom

Next tactic:
erw [← WidePushout.arrow_ι]
/-- The morphism between Čech conerves associated to a morphism of arrows. -/
@[simps]
def mapCechConerve {f g : Arrow C}
    [∀ n : ℕ, HasWidePushout f.left (fun _ : Fin (n + 1) => f.right) fun _ => f.hom]
    [∀ n : ℕ, HasWidePushout g.left (fun _ : Fin (n + 1) => g.right) fun _ => g.hom] (F : f ⟶ g) :
    f.cechConerve ⟶ g.cechConerve where
  app n := WidePushout.desc (F.left ≫ WidePushout.head _)
    (fun i => F.right ≫ (by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
f✝ : Arrow C
inst✝² : ∀ (n : ℕ), HasWidePushout f✝.left (fun x => f✝.right) fun x => f✝.hom
f g : Arrow C
inst✝¹ : ∀ (n : ℕ), HasWidePushout f.left (fun x => f.right) fun x => f.hom
inst✝ : ∀ (n : ℕ), HasWidePushout g.left (fun x => g.right) fun x => g.hom
F : f ⟶ g
n : SimplexCategory
i : Fin (SimplexCategory.len n + 1)
⊢ g.right ⟶ (cechConerve g).obj n

Next tactic:
apply WidePushout.ι _ i
/-- The morphism between Čech conerves associated to a morphism of arrows. -/
@[simps]
def mapCechConerve {f g : Arrow C}
    [∀ n : ℕ, HasWidePushout f.left (fun _ : Fin (n + 1) => f.right) fun _ => f.hom]
    [∀ n : ℕ, HasWidePushout g.left (fun _ : Fin (n + 1) => g.right) fun _ => g.hom] (F : f ⟶ g) :
    f.cechConerve ⟶ g.cechConerve where
  app n := WidePushout.desc (F.left ≫ WidePushout.head _)
    (fun i => F.right ≫ (by apply WidePushout.ι _ i))
    (fun i => (by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
f✝ : Arrow C
inst✝² : ∀ (n : ℕ), HasWidePushout f✝.left (fun x => f✝.right) fun x => f✝.hom
f g : Arrow C
inst✝¹ : ∀ (n : ℕ), HasWidePushout f.left (fun x => f.right) fun x => f.hom
inst✝ : ∀ (n : ℕ), HasWidePushout g.left (fun x => g.right) fun x => g.hom
F : f ⟶ g
n : SimplexCategory
i : Fin (SimplexCategory.len n + 1)
⊢ f.hom ≫ (fun i => F.right ≫ WidePushout.ι (fun x => g.hom) i) i = F.left ≫ WidePushout.head fun x => g.hom

Next tactic:
rw [← Arrow.w_assoc F, ← WidePushout.arrow_ι]
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps]
def equivalenceLeftToRight (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F.augmentedCechConerve ⟶ X) : F ⟶ Augmented.toArrow.obj X where
  left := G.left
  right := (WidePushout.ι _ 0 ≫ G.right.app (SimplexCategory.mk 0) : _)
  w := by
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : Arrow.augmentedCechConerve F ⟶ X
⊢ (𝟭 C).map G.left ≫ (Augmented.toArrow.obj X).hom =
    F.hom ≫ (𝟭 C).map (WidePushout.ι (fun x => F.hom) 0 ≫ G.right.app (SimplexCategory.mk 0))

Next tactic:
dsimp
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps]
def equivalenceLeftToRight (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F.augmentedCechConerve ⟶ X) : F ⟶ Augmented.toArrow.obj X where
  left := G.left
  right := (WidePushout.ι _ 0 ≫ G.right.app (SimplexCategory.mk 0) : _)
  w := by
    dsimp
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : Arrow.augmentedCechConerve F ⟶ X
⊢ G.left ≫ X.hom.app (SimplexCategory.mk 0) =
    F.hom ≫ WidePushout.ι (fun x => F.hom) 0 ≫ G.right.app (SimplexCategory.mk 0)

Next tactic:
rw [@WidePushout.arrow_ι_assoc _ _ _ _ _ (fun (_ : Fin 1) => F.hom)
      (by dsimp; infer_instance)]
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps]
def equivalenceLeftToRight (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F.augmentedCechConerve ⟶ X) : F ⟶ Augmented.toArrow.obj X where
  left := G.left
  right := (WidePushout.ι _ 0 ≫ G.right.app (SimplexCategory.mk 0) : _)
  w := by
    dsimp
    rw [@WidePushout.arrow_ι_assoc _ _ _ _ _ (fun (_ : Fin 1) => F.hom)
      (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : Arrow.augmentedCechConerve F ⟶ X
⊢ HasWidePushout ((𝟭 C).obj F.left) (fun x => (𝟭 C).obj F.right) fun x => F.hom

Next tactic:
dsimp
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps]
def equivalenceLeftToRight (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F.augmentedCechConerve ⟶ X) : F ⟶ Augmented.toArrow.obj X where
  left := G.left
  right := (WidePushout.ι _ 0 ≫ G.right.app (SimplexCategory.mk 0) : _)
  w := by
    dsimp
    rw [@WidePushout.arrow_ι_assoc _ _ _ _ _ (fun (_ : Fin 1) => F.hom)
      (by dsimp; 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : Arrow.augmentedCechConerve F ⟶ X
⊢ HasWidePushout F.left (fun x => F.right) fun x => F.hom

Next tactic:
infer_instance
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps]
def equivalenceLeftToRight (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F.augmentedCechConerve ⟶ X) : F ⟶ Augmented.toArrow.obj X where
  left := G.left
  right := (WidePushout.ι _ 0 ≫ G.right.app (SimplexCategory.mk 0) : _)
  w := by
    dsimp
    rw [@WidePushout.arrow_ι_assoc _ _ _ _ _ (fun (_ : Fin 1) => F.hom)
      (by dsimp; infer_instance)]
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : Arrow.augmentedCechConerve F ⟶ X
⊢ G.left ≫ X.hom.app (SimplexCategory.mk 0) = (WidePushout.head fun x => F.hom) ≫ G.right.app (SimplexCategory.mk 0)

Next tactic:
exact congr_app G.w (SimplexCategory.mk 0)
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps!]
def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F ⟶ Augmented.toArrow.obj X) : F.augmentedCechConerve ⟶ X where
  left := G.left
  right :=
    { app := fun x =>
        Limits.WidePushout.desc (G.left ≫ X.hom.app _)
          (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))
          (by
            

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : F ⟶ Augmented.toArrow.obj X
x : SimplexCategory
⊢ ∀ (j : Fin (SimplexCategory.len x + 1)),
    F.hom ≫ (fun i => G.right ≫ X.right.map (SimplexCategory.const x i)) j = G.left ≫ X.hom.app x

Next tactic:
rintro j
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps!]
def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F ⟶ Augmented.toArrow.obj X) : F.augmentedCechConerve ⟶ X where
  left := G.left
  right :=
    { app := fun x =>
        Limits.WidePushout.desc (G.left ≫ X.hom.app _)
          (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))
          (by
            rintro j
            

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : F ⟶ Augmented.toArrow.obj X
x : SimplexCategory
j : Fin (SimplexCategory.len x + 1)
⊢ F.hom ≫ (fun i => G.right ≫ X.right.map (SimplexCategory.const x i)) j = G.left ≫ X.hom.app x

Next tactic:
rw [← Arrow.w_assoc G]
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps!]
def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F ⟶ Augmented.toArrow.obj X) : F.augmentedCechConerve ⟶ X where
  left := G.left
  right :=
    { app := fun x =>
        Limits.WidePushout.desc (G.left ≫ X.hom.app _)
          (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))
          (by
            rintro j
            rw [← Arrow.w_assoc G]
            

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : F ⟶ Augmented.toArrow.obj X
x : SimplexCategory
j : Fin (SimplexCategory.len x + 1)
⊢ G.left ≫ (Augmented.toArrow.obj X).hom ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ X.hom.app x

Next tactic:
have t := X.hom.naturality (x.const j)
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps!]
def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F ⟶ Augmented.toArrow.obj X) : F.augmentedCechConerve ⟶ X where
  left := G.left
  right :=
    { app := fun x =>
        Limits.WidePushout.desc (G.left ≫ X.hom.app _)
          (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))
          (by
            rintro j
            rw [← Arrow.w_assoc G]
            have t := X.hom.naturality (x.const j)
            

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : F ⟶ Augmented.toArrow.obj X
x : SimplexCategory
j : Fin (SimplexCategory.len x + 1)
t :
  ((const C).obj X.left).map (SimplexCategory.const x j) ≫ X.hom.app x =
    X.hom.app (SimplexCategory.mk 0) ≫ ((𝟭 (CosimplicialObject C)).obj X.right).map (SimplexCategory.const x j)
⊢ G.left ≫ (Augmented.toArrow.obj X).hom ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ X.hom.app x

Next tactic:
dsimp at t ⊢
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps!]
def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F ⟶ Augmented.toArrow.obj X) : F.augmentedCechConerve ⟶ X where
  left := G.left
  right :=
    { app := fun x =>
        Limits.WidePushout.desc (G.left ≫ X.hom.app _)
          (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))
          (by
            rintro j
            rw [← Arrow.w_assoc G]
            have t := X.hom.naturality (x.const j)
            dsimp at t ⊢
            

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : F ⟶ Augmented.toArrow.obj X
x : SimplexCategory
j : Fin (SimplexCategory.len x + 1)
t : 𝟙 X.left ≫ X.hom.app x = X.hom.app (SimplexCategory.mk 0) ≫ X.right.map (SimplexCategory.const x j)
⊢ G.left ≫ X.hom.app (SimplexCategory.mk 0) ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ X.hom.app x

Next tactic:
simp only [Category.id_comp] at t
/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps!]
def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F ⟶ Augmented.toArrow.obj X) : F.augmentedCechConerve ⟶ X where
  left := G.left
  right :=
    { app := fun x =>
        Limits.WidePushout.desc (G.left ≫ X.hom.app _)
          (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))
          (by
            rintro j
            rw [← Arrow.w_assoc G]
            have t := X.hom.naturality (x.const j)
            dsimp at t ⊢
            simp only [Category.id_comp] at t
            

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom
F : Arrow C
X : Augmented C
G : F ⟶ Augmented.toArrow.obj X
x : SimplexCategory
j : Fin (SimplexCategory.len x + 1)
t : X.hom.app x = X.hom.app (SimplexCategory.mk 0) ≫ X.right.map (SimplexCategory.const x j)
⊢ G.left ≫ X.hom.app (SimplexCategory.mk 0) ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ X.hom.app x

Next tactic:
rw [← t]