/-- The restriction `End(L/K) → End(B/A)` in an AKLB setup.
Also see `galRestrict` for the `AlgEquiv` version. -/
noncomputable
def galRestrictHom : (L →ₐ[K] L) ≃* (B →ₐ[A] B) where
  toFun := fun f ↦ (IsIntegralClosure.equiv A (integralClosure A L) L B).toAlgHom.comp
      (((f.restrictScalars A).comp (IsScalarTower.toAlgHom A B L)).codRestrict
        (integralClosure A L) (fun x ↦ IsIntegral.map _ (IsIntegralClosure.isIntegral A L x)))
  map_mul' := by
    intros σ₁ σ₂
    ext x
    

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
σ₁ σ₂ : L →ₐ[K] L
x : B
⊢ (Equiv.toFun
        {
          toFun := fun f =>
            AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
              (AlgHom.codRestrict (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                (integralClosure A L)
                (_ :
                  ∀ (x : B),
                    IsIntegral A ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))),
          invFun := galLift A K L B,
          left_inv :=
            (_ :
              ∀ (σ : L →ₐ[K] L),
                galLift A K L B
                    ((fun f =>
                        AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
                          (AlgHom.codRestrict (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                            (integralClosure A L)
                            (_ :
                              ∀ (x : B),
                                IsIntegral A
                                  ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))))
                      σ) =
                  σ),
          right_inv :=
            (_ :
              ∀ (σ : B →ₐ[A] B),
                (fun f =>
                      AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
                        (AlgHom.codRestrict (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                          (integralClosure A L)
                          (_ :
                            ∀ (x : B),
                              IsIntegral A
                                ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))))
                    (galLift A K L B σ) =
                  σ) }
        (σ₁ * σ₂))
      x =
    (Equiv.toFun
          {
            toFun := fun f =>
              AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
                (AlgHom.codRestrict (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                  (integralClosure A L)
                  (_ :
                    ∀ (x : B),
                      IsIntegral A ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))),
            invFun := galLift A K L B,
            left_inv :=
              (_ :
                ∀ (σ : L →ₐ[K] L),
                  galLift A K L B
                      ((fun f =>
                          AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
                            (AlgHom.codRestrict
                              (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                              (integralClosure A L)
                              (_ :
                                ∀ (x : B),
                                  IsIntegral A
                                    ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))))
                        σ) =
                    σ),
            right_inv :=
              (_ :
                ∀ (σ : B →ₐ[A] B),
                  (fun f =>
                        AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
                          (AlgHom.codRestrict (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                            (integralClosure A L)
                            (_ :
                              ∀ (x : B),
                                IsIntegral A
                                  ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))))
                      (galLift A K L B σ) =
                    σ) }
          σ₁ *
        Equiv.toFun
          {
            toFun := fun f =>
              AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
                (AlgHom.codRestrict (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                  (integralClosure A L)
                  (_ :
                    ∀ (x : B),
                      IsIntegral A ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))),
            invFun := galLift A K L B,
            left_inv :=
              (_ :
                ∀ (σ : L →ₐ[K] L),
                  galLift A K L B
                      ((fun f =>
                          AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
                            (AlgHom.codRestrict
                              (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                              (integralClosure A L)
                              (_ :
                                ∀ (x : B),
                                  IsIntegral A
                                    ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))))
                        σ) =
                    σ),
            right_inv :=
              (_ :
                ∀ (σ : B →ₐ[A] B),
                  (fun f =>
                        AlgHom.comp (↑(IsIntegralClosure.equiv A (↥(integralClosure A L)) L B))
                          (AlgHom.codRestrict (AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L))
                            (integralClosure A L)
                            (_ :
                              ∀ (x : B),
                                IsIntegral A
                                  ((AlgHom.comp (AlgHom.restrictScalars A f) (IsScalarTower.toAlgHom A B L)) x))))
                      (galLift A K L B σ) =
                    σ) }
          σ₂)
      x

Next tactic:
apply (IsIntegralClosure.equiv A (integralClosure A L) L B).symm.injective