l3lab/ntp-mathlib huggingface dataset:
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; 

Proof state:
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
⊢ f 1 * g 1 = 1

Next tactic:
simp only [_root_.map_one, mul_one]
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      

Proof state:
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
⊢ ∀ (x y : 𝒜 ᵍ⊗[R] ℬ),
    (LinearMap.mul' R C ∘ₗ map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ)))
        (x * y) =
      (LinearMap.mul' R C ∘ₗ map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) x *
        (LinearMap.mul' R C ∘ₗ map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) y

Next tactic:
rw [LinearMap.map_mul_iff]
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      

Proof state:
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
⊢ LinearMap.compr₂ (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ))
      (LinearMap.mul' R C ∘ₗ map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) =
    LinearMap.compl₂
      (LinearMap.mul R C ∘ₗ
        LinearMap.mul' R C ∘ₗ map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ)))
      (LinearMap.mul' R C ∘ₗ map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ)))

Next tactic:
ext a₁ : 3
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      

Proof state:
case h.a.h
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
⊢ (AlgebraTensorModule.curry
        (LinearMap.compr₂ (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ))
            (LinearMap.mul' R C ∘ₗ
              map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
          ↑(of R 𝒜 ℬ)))
      a₁ =
    (AlgebraTensorModule.curry
        (LinearMap.compl₂
            (LinearMap.mul R C ∘ₗ
              LinearMap.mul' R C ∘ₗ map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ)))
            (LinearMap.mul' R C ∘ₗ
              map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
          ↑(of R 𝒜 ℬ)))
      a₁

Next tactic:
refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
      

Proof state:
case h.a.h
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
j₁ : ι
⊢ (AlgebraTensorModule.curry
          (LinearMap.compr₂ (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ))
              (LinearMap.mul' R C ∘ₗ
                map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
            ↑(of R 𝒜 ℬ)))
        a₁ ∘ₗ
      Submodule.subtype (ℬ j₁) =
    (AlgebraTensorModule.curry
          (LinearMap.compl₂
              (LinearMap.mul R C ∘ₗ
                LinearMap.mul' R C ∘ₗ
                  map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ)))
              (LinearMap.mul' R C ∘ₗ
                map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
            ↑(of R 𝒜 ℬ)))
        a₁ ∘ₗ
      Submodule.subtype (ℬ j₁)

Next tactic:
ext b₁ : 3
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
      ext b₁ : 3
      

Proof state:
case h.a.h.h.h.a
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
j₁ : ι
b₁ : ↥(ℬ j₁)
⊢ AlgebraTensorModule.curry
      (((AlgebraTensorModule.curry
                (LinearMap.compr₂ (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ))
                    (LinearMap.mul' R C ∘ₗ
                      map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
                  ↑(of R 𝒜 ℬ)))
              a₁ ∘ₗ
            Submodule.subtype (ℬ j₁))
          b₁ ∘ₗ
        ↑(of R 𝒜 ℬ)) =
    AlgebraTensorModule.curry
      (((AlgebraTensorModule.curry
                (LinearMap.compl₂
                    (LinearMap.mul R C ∘ₗ
                      LinearMap.mul' R C ∘ₗ
                        map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ)))
                    (LinearMap.mul' R C ∘ₗ
                      map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
                  ↑(of R 𝒜 ℬ)))
              a₁ ∘ₗ
            Submodule.subtype (ℬ j₁))
          b₁ ∘ₗ
        ↑(of R 𝒜 ℬ))

Next tactic:
refine DirectSum.decompose_lhom_ext 𝒜 fun i₂ => ?_
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
      ext b₁ : 3
      refine DirectSum.decompose_lhom_ext 𝒜 fun i₂ => ?_
      

Proof state:
case h.a.h.h.h.a
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
j₁ : ι
b₁ : ↥(ℬ j₁)
i₂ : ι
⊢ AlgebraTensorModule.curry
        (((AlgebraTensorModule.curry
                  (LinearMap.compr₂ (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ))
                      (LinearMap.mul' R C ∘ₗ
                        map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
                    ↑(of R 𝒜 ℬ)))
                a₁ ∘ₗ
              Submodule.subtype (ℬ j₁))
            b₁ ∘ₗ
          ↑(of R 𝒜 ℬ)) ∘ₗ
      Submodule.subtype (𝒜 i₂) =
    AlgebraTensorModule.curry
        (((AlgebraTensorModule.curry
                  (LinearMap.compl₂
                      (LinearMap.mul R C ∘ₗ
                        LinearMap.mul' R C ∘ₗ
                          map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ)))
                      (LinearMap.mul' R C ∘ₗ
                        map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
                    ↑(of R 𝒜 ℬ)))
                a₁ ∘ₗ
              Submodule.subtype (ℬ j₁))
            b₁ ∘ₗ
          ↑(of R 𝒜 ℬ)) ∘ₗ
      Submodule.subtype (𝒜 i₂)

Next tactic:
ext a₂ b₂ : 2
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
      ext b₁ : 3
      refine DirectSum.decompose_lhom_ext 𝒜 fun i₂ => ?_
      ext a₂ b₂ : 2
      

Proof state:
case h.a.h.h.h.a.h.h
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
j₁ : ι
b₁ : ↥(ℬ j₁)
i₂ : ι
a₂ : ↥(𝒜 i₂)
b₂ : B
⊢ ((AlgebraTensorModule.curry
            (((AlgebraTensorModule.curry
                      (LinearMap.compr₂ (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ))
                          (LinearMap.mul' R C ∘ₗ
                            map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
                        ↑(of R 𝒜 ℬ)))
                    a₁ ∘ₗ
                  Submodule.subtype (ℬ j₁))
                b₁ ∘ₗ
              ↑(of R 𝒜 ℬ)) ∘ₗ
          Submodule.subtype (𝒜 i₂))
        a₂)
      b₂ =
    ((AlgebraTensorModule.curry
            (((AlgebraTensorModule.curry
                      (LinearMap.compl₂
                          (LinearMap.mul R C ∘ₗ
                            LinearMap.mul' R C ∘ₗ
                              map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ)))
                          (LinearMap.mul' R C ∘ₗ
                            map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) ∘ₗ
                        ↑(of R 𝒜 ℬ)))
                    a₁ ∘ₗ
                  Submodule.subtype (ℬ j₁))
                b₁ ∘ₗ
              ↑(of R 𝒜 ℬ)) ∘ₗ
          Submodule.subtype (𝒜 i₂))
        a₂)
      b₂

Next tactic:
dsimp
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
      ext b₁ : 3
      refine DirectSum.decompose_lhom_ext 𝒜 fun i₂ => ?_
      ext a₂ b₂ : 2
      dsimp
      

Proof state:
case h.a.h.h.h.a.h.h
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
j₁ : ι
b₁ : ↥(ℬ j₁)
i₂ : ι
a₂ : ↥(𝒜 i₂)
b₂ : B
⊢ (LinearMap.mul' R C)
      ((map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g))
        ((LinearEquiv.symm (of R 𝒜 ℬ)) ((of R 𝒜 ℬ) (a₁ ⊗ₜ[R] ↑b₁) * (of R 𝒜 ℬ) (↑a₂ ⊗ₜ[R] b₂)))) =
    f a₁ * g ↑b₁ * (f ↑a₂ * g b₂)

Next tactic:
rw [tmul_coe_mul_coe_tmul]
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
      ext b₁ : 3
      refine DirectSum.decompose_lhom_ext 𝒜 fun i₂ => ?_
      ext a₂ b₂ : 2
      dsimp
      rw [tmul_coe_mul_coe_tmul]
      

Proof state:
case h.a.h.h.h.a.h.h
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
j₁ : ι
b₁ : ↥(ℬ j₁)
i₂ : ι
a₂ : ↥(𝒜 i₂)
b₂ : B
⊢ (LinearMap.mul' R C)
      ((map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g))
        ((LinearEquiv.symm (of R 𝒜 ℬ)) ((-1) ^ (j₁ * i₂) • (a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)))) =
    f a₁ * g ↑b₁ * (f ↑a₂ * g b₂)

Next tactic:
rw [@Units.smul_def _ _ (_) (_), zsmul_eq_smul_cast R, map_smul, map_smul, map_smul]
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
      ext b₁ : 3
      refine DirectSum.decompose_lhom_ext 𝒜 fun i₂ => ?_
      ext a₂ b₂ : 2
      dsimp
      rw [tmul_coe_mul_coe_tmul]
      rw [@Units.smul_def _ _ (_) (_), zsmul_eq_smul_cast R, map_smul, map_smul, map_smul]
      

Proof state:
case h.a.h.h.h.a.h.h
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
j₁ : ι
b₁ : ↥(ℬ j₁)
i₂ : ι
a₂ : ↥(𝒜 i₂)
b₂ : B
⊢ ↑↑((-1) ^ (j₁ * i₂)) •
      (LinearMap.mul' R C)
        ((map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g))
          ((LinearEquiv.symm (of R 𝒜 ℬ)) ((a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)))) =
    f a₁ * g ↑b₁ * (f ↑a₂ * g b₂)

Next tactic:
rw [← zsmul_eq_smul_cast R, ← @Units.smul_def _ _ (_) (_)]
/-- The forwards direction of the universal property; an algebra morphism out of the graded tensor
product can be assembed from maps on each component that (anti)commute on pure elements of the
corresponding graded algebras. -/
def lift (f : A →ₐ[R] C) (g : B →ₐ[R] C)
    (h_anti_commutes : ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), f a * g b = (-1 : ℤˣ)^(j * i) • (g b * f a)) :
    (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C :=
  AlgHom.ofLinearMap
    (LinearMap.mul' R C
      ∘ₗ (TensorProduct.map f.toLinearMap g.toLinearMap)
      ∘ₗ ((of R 𝒜 ℬ).symm : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] A ⊗[R] B))
    (by dsimp [Algebra.TensorProduct.one_def]; simp only [_root_.map_one, mul_one])
    (by
      rw [LinearMap.map_mul_iff]
      ext a₁ : 3
      refine DirectSum.decompose_lhom_ext ℬ fun j₁ => ?_
      ext b₁ : 3
      refine DirectSum.decompose_lhom_ext 𝒜 fun i₂ => ?_
      ext a₂ b₂ : 2
      dsimp
      rw [tmul_coe_mul_coe_tmul]
      rw [@Units.smul_def _ _ (_) (_), zsmul_eq_smul_cast R, map_smul, map_smul, map_smul]
      rw [← zsmul_eq_smul_cast R, ← @Units.smul_def _ _ (_) (_)]
      

Proof state:
case h.a.h.h.h.a.h.h
R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝¹¹ : CommSemiring ι
inst✝¹⁰ : Module ι (Additive ℤˣ)
inst✝⁹ : DecidableEq ι
inst✝⁸ : CommRing R
inst✝⁷ : Ring A
inst✝⁶ : Ring B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝³ : GradedAlgebra 𝒜
inst✝² : GradedAlgebra ℬ
C : Type ?u.1000162
inst✝¹ : Ring C
inst✝ : Algebra R C
f : A →ₐ[R] C
g : B →ₐ[R] C
h_anti_commutes : ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), f ↑a * g ↑b = (-1) ^ (j * i) • (g ↑b * f ↑a)
a₁ : A
j₁ : ι
b₁ : ↥(ℬ j₁)
i₂ : ι
a₂ : ↥(𝒜 i₂)
b₂ : B
⊢ (-1) ^ (j₁ * i₂) •
      (LinearMap.mul' R C)
        ((map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g))
          ((LinearEquiv.symm (of R 𝒜 ℬ)) ((a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)))) =
    f a₁ * g ↑b₁ * (f ↑a₂ * g b₂)

Next tactic:
rw [of_symm_of, map_tmul, LinearMap.mul'_apply]