l3lab/ntp-mathlib huggingface dataset:
lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F := by
  dsimp [Functor.fromLeftDerivedZero, isoLeftDerivedObj]
  have h₁ := ProjectiveResolution.fromLeftDerivedZero'_naturality
    (𝟙 X) P (projectiveResolution X) (lift (𝟙 X) _ _) (by simp) F
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
h₁ :
  HomologicalComplex.opcyclesMap
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map (lift (𝟙 X) P (projectiveResolution X))) 0 ≫
      fromLeftDerivedZero' (projectiveResolution X) F =
    fromLeftDerivedZero' P F ≫ F.map (𝟙 X)
⊢ (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
      HomologicalComplex.homologyι
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) 0 ≫
        fromLeftDerivedZero' (projectiveResolution X) F =
    ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map (isoLeftDerivedToHomotopyCategoryObj P F).hom ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)) ≫
      HomologicalComplex.homologyι ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫
        fromLeftDerivedZero' P F

Next tactic:
have h₂ : (P.isoLeftDerivedToHomotopyCategoryObj F).inv =
    (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map (lift (𝟙 X) _ _) :=
      id_comp _
lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F := by
  dsimp [Functor.fromLeftDerivedZero, isoLeftDerivedObj]
  have h₁ := ProjectiveResolution.fromLeftDerivedZero'_naturality
    (𝟙 X) P (projectiveResolution X) (lift (𝟙 X) _ _) (by simp) F
  have h₂ : (P.isoLeftDerivedToHomotopyCategoryObj F).inv =
    (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map (lift (𝟙 X) _ _) :=
      id_comp _
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
h₁ :
  HomologicalComplex.opcyclesMap
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map (lift (𝟙 X) P (projectiveResolution X))) 0 ≫
      fromLeftDerivedZero' (projectiveResolution X) F =
    fromLeftDerivedZero' P F ≫ F.map (𝟙 X)
h₂ :
  (isoLeftDerivedToHomotopyCategoryObj P F).inv =
    (Functor.mapHomologicalComplex F (ComplexShape.down ℕ) ⋙ HomotopyCategory.quotient D (ComplexShape.down ℕ)).map
      (lift (𝟙 X) P (projectiveResolution X))
⊢ (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
      HomologicalComplex.homologyι
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) 0 ≫
        fromLeftDerivedZero' (projectiveResolution X) F =
    ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map (isoLeftDerivedToHomotopyCategoryObj P F).hom ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)) ≫
      HomologicalComplex.homologyι ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫
        fromLeftDerivedZero' P F

Next tactic:
simp only [Functor.map_id, comp_id] at h₁
lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F := by
  dsimp [Functor.fromLeftDerivedZero, isoLeftDerivedObj]
  have h₁ := ProjectiveResolution.fromLeftDerivedZero'_naturality
    (𝟙 X) P (projectiveResolution X) (lift (𝟙 X) _ _) (by simp) F
  have h₂ : (P.isoLeftDerivedToHomotopyCategoryObj F).inv =
    (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map (lift (𝟙 X) _ _) :=
      id_comp _
  simp only [Functor.map_id, comp_id] at h₁
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
h₂ :
  (isoLeftDerivedToHomotopyCategoryObj P F).inv =
    (Functor.mapHomologicalComplex F (ComplexShape.down ℕ) ⋙ HomotopyCategory.quotient D (ComplexShape.down ℕ)).map
      (lift (𝟙 X) P (projectiveResolution X))
h₁ :
  HomologicalComplex.opcyclesMap
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map (lift (𝟙 X) P (projectiveResolution X))) 0 ≫
      fromLeftDerivedZero' (projectiveResolution X) F =
    fromLeftDerivedZero' P F
⊢ (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
      HomologicalComplex.homologyι
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) 0 ≫
        fromLeftDerivedZero' (projectiveResolution X) F =
    ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map (isoLeftDerivedToHomotopyCategoryObj P F).hom ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)) ≫
      HomologicalComplex.homologyι ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫
        fromLeftDerivedZero' P F

Next tactic:
rw [assoc, ← cancel_epi ((HomotopyCategory.homologyFunctor _ _ 0).map
      (P.isoLeftDerivedToHomotopyCategoryObj F).inv), ← Functor.map_comp_assoc,
      Iso.inv_hom_id, Functor.map_id, id_comp, ← h₁, h₂,
      ← HomologicalComplex.homologyι_naturality_assoc]
lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F := by
  dsimp [Functor.fromLeftDerivedZero, isoLeftDerivedObj]
  have h₁ := ProjectiveResolution.fromLeftDerivedZero'_naturality
    (𝟙 X) P (projectiveResolution X) (lift (𝟙 X) _ _) (by simp) F
  have h₂ : (P.isoLeftDerivedToHomotopyCategoryObj F).inv =
    (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map (lift (𝟙 X) _ _) :=
      id_comp _
  simp only [Functor.map_id, comp_id] at h₁
  rw [assoc, ← cancel_epi ((HomotopyCategory.homologyFunctor _ _ 0).map
      (P.isoLeftDerivedToHomotopyCategoryObj F).inv), ← Functor.map_comp_assoc,
      Iso.inv_hom_id, Functor.map_id, id_comp, ← h₁, h₂,
      ← HomologicalComplex.homologyι_naturality_assoc]
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
h₂ :
  (isoLeftDerivedToHomotopyCategoryObj P F).inv =
    (Functor.mapHomologicalComplex F (ComplexShape.down ℕ) ⋙ HomotopyCategory.quotient D (ComplexShape.down ℕ)).map
      (lift (𝟙 X) P (projectiveResolution X))
h₁ :
  HomologicalComplex.opcyclesMap
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map (lift (𝟙 X) P (projectiveResolution X))) 0 ≫
      fromLeftDerivedZero' (projectiveResolution X) F =
    fromLeftDerivedZero' P F
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ) ⋙ HomotopyCategory.quotient D (ComplexShape.down ℕ)).map
          (lift (𝟙 X) P (projectiveResolution X))) ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
        HomologicalComplex.homologyι
            ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) 0 ≫
          fromLeftDerivedZero' (projectiveResolution X) F =
    (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) ≫
      HomologicalComplex.homologyMap
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map (lift (𝟙 X) P (projectiveResolution X))) 0 ≫
        HomologicalComplex.homologyι
            ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj (projectiveResolution X).complex) 0 ≫
          fromLeftDerivedZero' (projectiveResolution X) F

Next tactic:
erw [← NatTrans.naturality_assoc]
lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F := by
  dsimp [Functor.fromLeftDerivedZero, isoLeftDerivedObj]
  have h₁ := ProjectiveResolution.fromLeftDerivedZero'_naturality
    (𝟙 X) P (projectiveResolution X) (lift (𝟙 X) _ _) (by simp) F
  have h₂ : (P.isoLeftDerivedToHomotopyCategoryObj F).inv =
    (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map (lift (𝟙 X) _ _) :=
      id_comp _
  simp only [Functor.map_id, comp_id] at h₁
  rw [assoc, ← cancel_epi ((HomotopyCategory.homologyFunctor _ _ 0).map
      (P.isoLeftDerivedToHomotopyCategoryObj F).inv), ← Functor.map_comp_assoc,
      Iso.inv_hom_id, Functor.map_id, id_comp, ← h₁, h₂,
      ← HomologicalComplex.homologyι_naturality_assoc]
  erw [← NatTrans.naturality_assoc]
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
h₂ :
  (isoLeftDerivedToHomotopyCategoryObj P F).inv =
    (Functor.mapHomologicalComplex F (ComplexShape.down ℕ) ⋙ HomotopyCategory.quotient D (ComplexShape.down ℕ)).map
      (lift (𝟙 X) P (projectiveResolution X))
h₁ :
  HomologicalComplex.opcyclesMap
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map (lift (𝟙 X) P (projectiveResolution X))) 0 ≫
      fromLeftDerivedZero' (projectiveResolution X) F =
    fromLeftDerivedZero' P F
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ) ⋙ HomotopyCategory.quotient D (ComplexShape.down ℕ)).map
          (lift (𝟙 X) P (projectiveResolution X))) ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
        HomologicalComplex.homologyι
            ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) 0 ≫
          fromLeftDerivedZero' (projectiveResolution X) F =
    (HomotopyCategory.quotient D (ComplexShape.down ℕ) ⋙ HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map (lift (𝟙 X) P (projectiveResolution X))) ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj (projectiveResolution X).complex) ≫
        HomologicalComplex.homologyι
            ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj (projectiveResolution X).complex) 0 ≫
          fromLeftDerivedZero' (projectiveResolution X) F

Next tactic:
rfl
instance (F : C ⥤ D) [F.Additive] (X : C) [Projective X] :
    IsIso (F.fromLeftDerivedZero.app X) := by
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.125158, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Projective X
⊢ IsIso ((Functor.fromLeftDerivedZero F).app X)

Next tactic:
rw [(ProjectiveResolution.self X).fromLeftDerivedZero_eq F]
instance (F : C ⥤ D) [F.Additive] (X : C) [Projective X] :
    IsIso (F.fromLeftDerivedZero.app X) := by
  rw [(ProjectiveResolution.self X).fromLeftDerivedZero_eq F]
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.125158, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Projective X
⊢ IsIso
    ((ProjectiveResolution.isoLeftDerivedObj (ProjectiveResolution.self X) F 0).hom ≫
      (ChainComplex.isoHomologyι₀
            ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj (ProjectiveResolution.self X).complex)).hom ≫
        ProjectiveResolution.fromLeftDerivedZero' (ProjectiveResolution.self X) F)

Next tactic:
infer_instance
instance {X : C} (P : ProjectiveResolution X) :
    IsIso (P.fromLeftDerivedZero' F) := by
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.126970, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : PreservesFiniteColimits F
X : C
P : ProjectiveResolution X
⊢ IsIso (ProjectiveResolution.fromLeftDerivedZero' P F)

Next tactic:
dsimp [ProjectiveResolution.fromLeftDerivedZero']
instance {X : C} (P : ProjectiveResolution X) :
    IsIso (P.fromLeftDerivedZero' F) := by
  dsimp [ProjectiveResolution.fromLeftDerivedZero']
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.126970, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : PreservesFiniteColimits F
X : C
P : ProjectiveResolution X
⊢ IsIso
    (HomologicalComplex.descOpcycles ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)
      (F.map (HomologicalComplex.Hom.f P.π 0)) 1 ProjectiveResolution.fromLeftDerivedZero'.proof_2
      (_ :
        HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 1 0 ≫
            F.map (HomologicalComplex.Hom.f P.π 0) =
          0))

Next tactic:
rw [ChainComplex.isIso_descOpcycles_iff, ShortComplex.exact_and_epi_g_iff_g_is_cokernel]
instance {X : C} (P : ProjectiveResolution X) :
    IsIso (P.fromLeftDerivedZero' F) := by
  dsimp [ProjectiveResolution.fromLeftDerivedZero']
  rw [ChainComplex.isIso_descOpcycles_iff, ShortComplex.exact_and_epi_g_iff_g_is_cokernel]
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.126970, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : PreservesFiniteColimits F
X : C
P : ProjectiveResolution X
⊢ Nonempty
    (IsColimit
      (CokernelCofork.ofπ
        (ShortComplex.mk
            (HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 1 0)
            (F.map (HomologicalComplex.Hom.f P.π 0))
            (_ :
              HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 1 0 ≫
                  F.map (HomologicalComplex.Hom.f P.π 0) =
                0)).g
        (_ :
          (ShortComplex.mk
                  (HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 1 0)
                  (F.map (HomologicalComplex.Hom.f P.π 0))
                  (_ :
                    HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 1 0 ≫
                        F.map (HomologicalComplex.Hom.f P.π 0) =
                      0)).f ≫
              (ShortComplex.mk
                  (HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 1 0)
                  (F.map (HomologicalComplex.Hom.f P.π 0))
                  (_ :
                    HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 1 0 ≫
                        F.map (HomologicalComplex.Hom.f P.π 0) =
                      0)).g =
            0)))

Next tactic:
exact ⟨CokernelCofork.mapIsColimit _ (P.isColimitCokernelCofork) F⟩
instance (X : C) : IsIso (F.fromLeftDerivedZero.app X) := by
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.129635, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : PreservesFiniteColimits F
X : C
⊢ IsIso ((Functor.fromLeftDerivedZero F).app X)

Next tactic:
dsimp [Functor.fromLeftDerivedZero]
instance (X : C) : IsIso (F.fromLeftDerivedZero.app X) := by
  dsimp [Functor.fromLeftDerivedZero]
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.129635, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : PreservesFiniteColimits F
X : C
⊢ IsIso
    ((HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
      HomologicalComplex.homologyι
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) 0 ≫
        ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution X) F)

Next tactic:
infer_instance
/-- The lift `End(B/A) → End(L/K)` in an ALKB setup.
This is inverse to the restriction. See `galRestrictHom`. -/
noncomputable
def galLift (σ : B →ₐ[A] B) : L →ₐ[K] L :=
  haveI := (IsFractionRing.injective A K).isDomain
  haveI := NoZeroSMulDivisors.trans A K L
  haveI := IsIntegralClosure.isLocalization A K L B (Algebra.IsIntegral.of_finite _ _).isAlgebraic
  haveI H : ∀ (y :  Algebra.algebraMapSubmonoid B A⁰),
      IsUnit (((algebraMap B L).comp σ) (y : B)) := by
    

Proof state:
A : Type u_1
K : Type u_2
L : Type u_3
B : Type u_4
inst✝¹³ : CommRing A
inst✝¹² : CommRing B
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : Algebra A K
inst✝⁷ : IsFractionRing A K
inst✝⁶ : Algebra B L
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra A L
inst✝³ : IsScalarTower A B L
inst✝² : IsScalarTower A K L
inst✝¹ : IsIntegralClosure B A L
inst✝ : FiniteDimensional K L
σ : B →ₐ[A] B
this✝¹ : IsDomain A
this✝ : NoZeroSMulDivisors A L
this : IsLocalization (Algebra.algebraMapSubmonoid B A⁰) L
⊢ ∀ (y : ↥(Algebra.algebraMapSubmonoid B A⁰)), IsUnit ((RingHom.comp (algebraMap B L) ↑σ) ↑y)

Next tactic:
rintro ⟨_, x, hx, rfl⟩
/-- The lift `End(B/A) → End(L/K)` in an ALKB setup.
This is inverse to the restriction. See `galRestrictHom`. -/
noncomputable
def galLift (σ : B →ₐ[A] B) : L →ₐ[K] L :=
  haveI := (IsFractionRing.injective A K).isDomain
  haveI := NoZeroSMulDivisors.trans A K L
  haveI := IsIntegralClosure.isLocalization A K L B (Algebra.IsIntegral.of_finite _ _).isAlgebraic
  haveI H : ∀ (y :  Algebra.algebraMapSubmonoid B A⁰),
      IsUnit (((algebraMap B L).comp σ) (y : B)) := by
    rintro ⟨_, x, hx, rfl⟩
    

Proof state:
case mk.intro.intro
A : Type u_1
K : Type u_2
L : Type u_3
B : Type u_4
inst✝¹³ : CommRing A
inst✝¹² : CommRing B
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : Algebra A K
inst✝⁷ : IsFractionRing A K
inst✝⁶ : Algebra B L
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra A L
inst✝³ : IsScalarTower A B L
inst✝² : IsScalarTower A K L
inst✝¹ : IsIntegralClosure B A L
inst✝ : FiniteDimensional K L
σ : B →ₐ[A] B
this✝¹ : IsDomain A
this✝ : NoZeroSMulDivisors A L
this : IsLocalization (Algebra.algebraMapSubmonoid B A⁰) L
x : A
hx : x ∈ ↑A⁰
⊢ IsUnit
    ((RingHom.comp (algebraMap B L) ↑σ)
      ↑{ val := (algebraMap A B) x, property := (_ : ∃ a ∈ ↑A⁰, (algebraMap A B) a = (algebraMap A B) x) })

Next tactic:
simpa only [RingHom.coe_comp, RingHom.coe_coe, Function.comp_apply, AlgHom.commutes,
      isUnit_iff_ne_zero, ne_eq, map_eq_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective _ _),
      ← IsScalarTower.algebraMap_apply] using nonZeroDivisors.ne_zero hx
/-- The lift `End(B/A) → End(L/K)` in an ALKB setup.
This is inverse to the restriction. See `galRestrictHom`. -/
noncomputable
def galLift (σ : B →ₐ[A] B) : L →ₐ[K] L :=
  haveI := (IsFractionRing.injective A K).isDomain
  haveI := NoZeroSMulDivisors.trans A K L
  haveI := IsIntegralClosure.isLocalization A K L B (Algebra.IsIntegral.of_finite _ _).isAlgebraic
  haveI H : ∀ (y :  Algebra.algebraMapSubmonoid B A⁰),
      IsUnit (((algebraMap B L).comp σ) (y : B)) := by
    rintro ⟨_, x, hx, rfl⟩
    simpa only [RingHom.coe_comp, RingHom.coe_coe, Function.comp_apply, AlgHom.commutes,
      isUnit_iff_ne_zero, ne_eq, map_eq_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective _ _),
      ← IsScalarTower.algebraMap_apply] using nonZeroDivisors.ne_zero hx
  haveI H_eq : (IsLocalization.lift (S := L) H).comp (algebraMap K L) = (algebraMap K L) := by
    

Proof state:
A : Type u_1
K : Type u_2
L : Type u_3
B : Type u_4
inst✝¹³ : CommRing A
inst✝¹² : CommRing B
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : Algebra A K
inst✝⁷ : IsFractionRing A K
inst✝⁶ : Algebra B L
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra A L
inst✝³ : IsScalarTower A B L
inst✝² : IsScalarTower A K L
inst✝¹ : IsIntegralClosure B A L
inst✝ : FiniteDimensional K L
σ : B →ₐ[A] B
this✝¹ : IsDomain A
this✝ : NoZeroSMulDivisors A L
this : IsLocalization (Algebra.algebraMapSubmonoid B A⁰) L
H : ∀ (y : ↥(Algebra.algebraMapSubmonoid B A⁰)), IsUnit ((RingHom.comp (algebraMap B L) ↑σ) ↑y)
⊢ RingHom.comp (IsLocalization.lift H) (algebraMap K L) = algebraMap K L

Next tactic:
apply IsLocalization.ringHom_ext A⁰
/-- The lift `End(B/A) → End(L/K)` in an ALKB setup.
This is inverse to the restriction. See `galRestrictHom`. -/
noncomputable
def galLift (σ : B →ₐ[A] B) : L →ₐ[K] L :=
  haveI := (IsFractionRing.injective A K).isDomain
  haveI := NoZeroSMulDivisors.trans A K L
  haveI := IsIntegralClosure.isLocalization A K L B (Algebra.IsIntegral.of_finite _ _).isAlgebraic
  haveI H : ∀ (y :  Algebra.algebraMapSubmonoid B A⁰),
      IsUnit (((algebraMap B L).comp σ) (y : B)) := by
    rintro ⟨_, x, hx, rfl⟩
    simpa only [RingHom.coe_comp, RingHom.coe_coe, Function.comp_apply, AlgHom.commutes,
      isUnit_iff_ne_zero, ne_eq, map_eq_zero_iff _ (NoZeroSMulDivisors.algebraMap_injective _ _),
      ← IsScalarTower.algebraMap_apply] using nonZeroDivisors.ne_zero hx
  haveI H_eq : (IsLocalization.lift (S := L) H).comp (algebraMap K L) = (algebraMap K L) := by
    apply IsLocalization.ringHom_ext A⁰
    

Proof state:
case h
A : Type u_1
K : Type u_2
L : Type u_3
B : Type u_4
inst✝¹³ : CommRing A
inst✝¹² : CommRing B
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : Algebra A K
inst✝⁷ : IsFractionRing A K
inst✝⁶ : Algebra B L
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra A L
inst✝³ : IsScalarTower A B L
inst✝² : IsScalarTower A K L
inst✝¹ : IsIntegralClosure B A L
inst✝ : FiniteDimensional K L
σ : B →ₐ[A] B
this✝¹ : IsDomain A
this✝ : NoZeroSMulDivisors A L
this : IsLocalization (Algebra.algebraMapSubmonoid B A⁰) L
H : ∀ (y : ↥(Algebra.algebraMapSubmonoid B A⁰)), IsUnit ((RingHom.comp (algebraMap B L) ↑σ) ↑y)
⊢ RingHom.comp (RingHom.comp (IsLocalization.lift H) (algebraMap K L)) (algebraMap A K) =
    RingHom.comp (algebraMap K L) (algebraMap A K)

Next tactic:
ext