l3lab/ntp-mathlib huggingface dataset:
/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ where
  toFun a := a ᵍ⊗ₜ 1
  map_zero' := by simp
  map_add' := by simp [tmul, TensorProduct.add_tmul]
  map_one' := rfl
  map_mul' a₁ a₂ := 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 ℬ
a₁ a₂ : A
⊢ OneHom.toFun { toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := (_ : (fun a => a ᵍ⊗ₜ[R] 1) 1 = (fun a => a ᵍ⊗ₜ[R] 1) 1) }
      (a₁ * a₂) =
    OneHom.toFun { toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := (_ : (fun a => a ᵍ⊗ₜ[R] 1) 1 = (fun a => a ᵍ⊗ₜ[R] 1) 1) }
        a₁ *
      OneHom.toFun { toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := (_ : (fun a => a ᵍ⊗ₜ[R] 1) 1 = (fun a => a ᵍ⊗ₜ[R] 1) 1) }
        a₂

Next tactic:
dsimp
/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ where
  toFun a := a ᵍ⊗ₜ 1
  map_zero' := by simp
  map_add' := by simp [tmul, TensorProduct.add_tmul]
  map_one' := rfl
  map_mul' a₁ a₂ := by
    dsimp
    

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 ℬ
a₁ a₂ : A
⊢ (a₁ * a₂) ᵍ⊗ₜ[R] 1 = a₁ ᵍ⊗ₜ[R] 1 * a₂ ᵍ⊗ₜ[R] 1

Next tactic:
classical
    rw [← DirectSum.sum_support_decompose 𝒜 a₂, Finset.mul_sum]
    simp_rw [tmul, sum_tmul, map_sum, Finset.mul_sum]
    congr
    ext i
    rw [← SetLike.coe_gOne ℬ, tmul_coe_mul_coe_tmul, zero_mul, uzpow_zero, one_smul,
      SetLike.coe_gOne, one_mul]
/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ where
  toFun a := a ᵍ⊗ₜ 1
  map_zero' := by simp
  map_add' := by simp [tmul, TensorProduct.add_tmul]
  map_one' := rfl
  map_mul' a₁ a₂ := by
    dsimp
    classical
    

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 ℬ
a₁ a₂ : A
⊢ (a₁ * a₂) ᵍ⊗ₜ[R] 1 = a₁ ᵍ⊗ₜ[R] 1 * a₂ ᵍ⊗ₜ[R] 1

Next tactic:
rw [← DirectSum.sum_support_decompose 𝒜 a₂, Finset.mul_sum]
/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ where
  toFun a := a ᵍ⊗ₜ 1
  map_zero' := by simp
  map_add' := by simp [tmul, TensorProduct.add_tmul]
  map_one' := rfl
  map_mul' a₁ a₂ := by
    dsimp
    classical
    rw [← DirectSum.sum_support_decompose 𝒜 a₂, Finset.mul_sum]
    

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 ℬ
a₁ a₂ : A
⊢ (Finset.sum (DFinsupp.support ((decompose 𝒜) a₂)) fun x => a₁ * ↑(((decompose 𝒜) a₂) x)) ᵍ⊗ₜ[R] 1 =
    a₁ ᵍ⊗ₜ[R] 1 * (Finset.sum (DFinsupp.support ((decompose 𝒜) a₂)) fun i => ↑(((decompose 𝒜) a₂) i)) ᵍ⊗ₜ[R] 1

Next tactic:
simp_rw [tmul, sum_tmul, map_sum, Finset.mul_sum]
/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ where
  toFun a := a ᵍ⊗ₜ 1
  map_zero' := by simp
  map_add' := by simp [tmul, TensorProduct.add_tmul]
  map_one' := rfl
  map_mul' a₁ a₂ := by
    dsimp
    classical
    rw [← DirectSum.sum_support_decompose 𝒜 a₂, Finset.mul_sum]
    simp_rw [tmul, sum_tmul, map_sum, Finset.mul_sum]
    

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 ℬ
a₁ a₂ : A
⊢ (Finset.sum (DFinsupp.support ((decompose 𝒜) a₂)) fun x => (of R 𝒜 ℬ) ((a₁ * ↑(((decompose 𝒜) a₂) x)) ⊗ₜ[R] 1)) =
    Finset.sum (DFinsupp.support ((decompose 𝒜) a₂)) fun x =>
      (of R 𝒜 ℬ) (a₁ ⊗ₜ[R] 1) * (of R 𝒜 ℬ) (↑(((decompose 𝒜) a₂) x) ⊗ₜ[R] 1)

Next tactic:
congr
/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ where
  toFun a := a ᵍ⊗ₜ 1
  map_zero' := by simp
  map_add' := by simp [tmul, TensorProduct.add_tmul]
  map_one' := rfl
  map_mul' a₁ a₂ := by
    dsimp
    classical
    rw [← DirectSum.sum_support_decompose 𝒜 a₂, Finset.mul_sum]
    simp_rw [tmul, sum_tmul, map_sum, Finset.mul_sum]
    congr
    

Proof state:
case e_f
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 ℬ
a₁ a₂ : A
⊢ (fun x => (of R 𝒜 ℬ) ((a₁ * ↑(((decompose 𝒜) a₂) x)) ⊗ₜ[R] 1)) = fun x =>
    (of R 𝒜 ℬ) (a₁ ⊗ₜ[R] 1) * (of R 𝒜 ℬ) (↑(((decompose 𝒜) a₂) x) ⊗ₜ[R] 1)

Next tactic:
ext i
/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ where
  toFun a := a ᵍ⊗ₜ 1
  map_zero' := by simp
  map_add' := by simp [tmul, TensorProduct.add_tmul]
  map_one' := rfl
  map_mul' a₁ a₂ := by
    dsimp
    classical
    rw [← DirectSum.sum_support_decompose 𝒜 a₂, Finset.mul_sum]
    simp_rw [tmul, sum_tmul, map_sum, Finset.mul_sum]
    congr
    ext i
    

Proof state:
case e_f.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 ℬ
a₁ a₂ : A
i : ι
⊢ (of R 𝒜 ℬ) ((a₁ * ↑(((decompose 𝒜) a₂) i)) ⊗ₜ[R] 1) =
    (of R 𝒜 ℬ) (a₁ ⊗ₜ[R] 1) * (of R 𝒜 ℬ) (↑(((decompose 𝒜) a₂) i) ⊗ₜ[R] 1)

Next tactic:
rw [← SetLike.coe_gOne ℬ, tmul_coe_mul_coe_tmul, zero_mul, uzpow_zero, one_smul,
      SetLike.coe_gOne, one_mul]
/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ where
  toFun a := a ᵍ⊗ₜ 1
  map_zero' := 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 ℬ
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            { toFun := fun a => a ᵍ⊗ₜ[R] 1, map_one' := (_ : (fun a => a ᵍ⊗ₜ[R] 1) 1 = (fun a => a ᵍ⊗ₜ[R] 1) 1) },
          map_mul' :=
            (_ :
              ∀ (a₁ a₂ : A),
                OneHom.toFun
                    { toFun := fun a => a ᵍ⊗ₜ[R] 1,
                      map_one' := (_ : (fun a => a ᵍ⊗ₜ[R] 1) 1 = (fun a => a ᵍ⊗ₜ[R] 1) 1) }
                    (a₁ * a₂) =
                  OneHom.toFun
                      { toFun := fun a => a ᵍ⊗ₜ[R] 1,
                        map_one' := (_ : (fun a => a ᵍ⊗ₜ[R] 1) 1 = (fun a => a ᵍ⊗ₜ[R] 1) 1) }
                      a₁ *
                    OneHom.toFun
                      { toFun := fun a => a ᵍ⊗ₜ[R] 1,
                        map_one' := (_ : (fun a => a ᵍ⊗ₜ[R] 1) 1 = (fun a => a ᵍ⊗ₜ[R] 1) 1) }
                      a₂) })
      0 =
    0

Next tactic:
simp
instance instAlgebra : Algebra R (𝒜 ᵍ⊗[R] ℬ) where
  toRingHom := (includeLeftRingHom 𝒜 ℬ).comp (algebraMap R A)
  commutes' r x := 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 ℬ
r : R
x : 𝒜 ᵍ⊗[R] ℬ
⊢ (RingHom.comp (includeLeftRingHom 𝒜 ℬ) (algebraMap R A)) r * x =
    x * (RingHom.comp (includeLeftRingHom 𝒜 ℬ) (algebraMap R A)) r

Next tactic:
dsimp [mul_def, mulHom_apply, auxEquiv_tmul]
instance instAlgebra : Algebra R (𝒜 ᵍ⊗[R] ℬ) where
  toRingHom := (includeLeftRingHom 𝒜 ℬ).comp (algebraMap R A)
  commutes' r x := by
    dsimp [mul_def, mulHom_apply, auxEquiv_tmul]
    

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 ℬ
r : R
x : 𝒜 ᵍ⊗[R] ℬ
⊢ (LinearEquiv.symm (auxEquiv R 𝒜 ℬ))
      (((gradedMul R (fun x => ↥(𝒜 x)) fun x => ↥(ℬ x)) ((decompose 𝒜) ((algebraMap R A) r) ⊗ₜ[R] (decompose ℬ) 1))
        ((auxEquiv R 𝒜 ℬ) x)) =
    (LinearEquiv.symm (auxEquiv R 𝒜 ℬ))
      (((gradedMul R (fun x => ↥(𝒜 x)) fun x => ↥(ℬ x)) ((auxEquiv R 𝒜 ℬ) x))
        ((decompose 𝒜) ((algebraMap R A) r) ⊗ₜ[R] (decompose ℬ) 1))

Next tactic:
simp_rw [DirectSum.decompose_algebraMap, DirectSum.decompose_one, algebraMap_gradedMul,
      gradedMul_algebraMap]
instance instAlgebra : Algebra R (𝒜 ᵍ⊗[R] ℬ) where
  toRingHom := (includeLeftRingHom 𝒜 ℬ).comp (algebraMap R A)
  commutes' r x := by
    dsimp [mul_def, mulHom_apply, auxEquiv_tmul]
    simp_rw [DirectSum.decompose_algebraMap, DirectSum.decompose_one, algebraMap_gradedMul,
      gradedMul_algebraMap]
  smul_def' r x := 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 ℬ
r : R
x : 𝒜 ᵍ⊗[R] ℬ
⊢ r • x = (RingHom.comp (includeLeftRingHom 𝒜 ℬ) (algebraMap R A)) r * x

Next tactic:
dsimp [mul_def, mulHom_apply, auxEquiv_tmul]
instance instAlgebra : Algebra R (𝒜 ᵍ⊗[R] ℬ) where
  toRingHom := (includeLeftRingHom 𝒜 ℬ).comp (algebraMap R A)
  commutes' r x := by
    dsimp [mul_def, mulHom_apply, auxEquiv_tmul]
    simp_rw [DirectSum.decompose_algebraMap, DirectSum.decompose_one, algebraMap_gradedMul,
      gradedMul_algebraMap]
  smul_def' r x := by
    dsimp [mul_def, mulHom_apply, auxEquiv_tmul]
    

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 ℬ
r : R
x : 𝒜 ᵍ⊗[R] ℬ
⊢ r • x =
    (LinearEquiv.symm (auxEquiv R 𝒜 ℬ))
      (((gradedMul R (fun x => ↥(𝒜 x)) fun x => ↥(ℬ x)) ((decompose 𝒜) ((algebraMap R A) r) ⊗ₜ[R] (decompose ℬ) 1))
        ((auxEquiv R 𝒜 ℬ) x))

Next tactic:
simp_rw [DirectSum.decompose_algebraMap, DirectSum.decompose_one, algebraMap_gradedMul,
      map_smul, LinearEquiv.symm_apply_apply]
/-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) :=
  AlgHom.ofLinearMap (R := R) (A := B) (B := 𝒜 ᵍ⊗[R] ℬ)
    (f := {
       toFun := fun b => 1 ᵍ⊗ₜ b
       map_add' := 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 ℬ
⊢ ∀ (x y : B), (fun b => 1 ᵍ⊗ₜ[R] b) (x + y) = (fun b => 1 ᵍ⊗ₜ[R] b) x + (fun b => 1 ᵍ⊗ₜ[R] b) y

Next tactic:
simp [tmul, TensorProduct.tmul_add]
/-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) :=
  AlgHom.ofLinearMap (R := R) (A := B) (B := 𝒜 ᵍ⊗[R] ℬ)
    (f := {
       toFun := fun b => 1 ᵍ⊗ₜ b
       map_add' := by simp [tmul, TensorProduct.tmul_add]
       map_smul' := 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 ℬ
⊢ ∀ (r : R) (x : B),
    AddHom.toFun
        { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
          map_add' :=
            (_ : ∀ (a a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) }
        (r • x) =
      (RingHom.id R) r •
        AddHom.toFun
          { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
            map_add' :=
              (_ : ∀ (a a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) }
          x

Next tactic:
simp [tmul, TensorProduct.tmul_smul]
/-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) :=
  AlgHom.ofLinearMap (R := R) (A := B) (B := 𝒜 ᵍ⊗[R] ℬ)
    (f := {
       toFun := fun b => 1 ᵍ⊗ₜ b
       map_add' := by simp [tmul, TensorProduct.tmul_add]
       map_smul' := by simp [tmul, TensorProduct.tmul_smul] })
    (map_one := rfl)
    (map_mul := 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 ℬ
⊢ ∀ (x y : B),
    {
          toAddHom :=
            { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
              map_add' :=
                (_ :
                  ∀ (a a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
          map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) }
        (x * y) =
      {
            toAddHom :=
              { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
                map_add' :=
                  (_ :
                    ∀ (a a_1 : B),
                      (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
            map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) }
          x *
        {
            toAddHom :=
              { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
                map_add' :=
                  (_ :
                    ∀ (a a_1 : B),
                      (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
            map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) }
          y

Next tactic:
rw [LinearMap.map_mul_iff]
/-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) :=
  AlgHom.ofLinearMap (R := R) (A := B) (B := 𝒜 ᵍ⊗[R] ℬ)
    (f := {
       toFun := fun b => 1 ᵍ⊗ₜ b
       map_add' := by simp [tmul, TensorProduct.tmul_add]
       map_smul' := by simp [tmul, TensorProduct.tmul_smul] })
    (map_one := rfl)
    (map_mul := 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 ℬ
⊢ LinearMap.compr₂ (LinearMap.mul R B)
      {
        toAddHom :=
          { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
            map_add' :=
              (_ : ∀ (a a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
        map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) } =
    LinearMap.compl₂
      (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ) ∘ₗ
        {
          toAddHom :=
            { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
              map_add' :=
                (_ :
                  ∀ (a a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
          map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) })
      {
        toAddHom :=
          { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
            map_add' :=
              (_ : ∀ (a a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
        map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) }

Next tactic:
refine DirectSum.decompose_lhom_ext ℬ fun i₁ => ?_
/-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) :=
  AlgHom.ofLinearMap (R := R) (A := B) (B := 𝒜 ᵍ⊗[R] ℬ)
    (f := {
       toFun := fun b => 1 ᵍ⊗ₜ b
       map_add' := by simp [tmul, TensorProduct.tmul_add]
       map_smul' := by simp [tmul, TensorProduct.tmul_smul] })
    (map_one := rfl)
    (map_mul := by
      rw [LinearMap.map_mul_iff]
      refine DirectSum.decompose_lhom_ext ℬ fun i₁ => ?_
      

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 ℬ
i₁ : ι
⊢ LinearMap.compr₂ (LinearMap.mul R B)
        {
          toAddHom :=
            { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
              map_add' :=
                (_ :
                  ∀ (a a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
          map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) } ∘ₗ
      Submodule.subtype (ℬ i₁) =
    LinearMap.compl₂
        (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ) ∘ₗ
          {
            toAddHom :=
              { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
                map_add' :=
                  (_ :
                    ∀ (a a_1 : B),
                      (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
            map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) })
        {
          toAddHom :=
            { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
              map_add' :=
                (_ :
                  ∀ (a a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
          map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) } ∘ₗ
      Submodule.subtype (ℬ i₁)

Next tactic:
ext b₁ b₂ : 2
/-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) :=
  AlgHom.ofLinearMap (R := R) (A := B) (B := 𝒜 ᵍ⊗[R] ℬ)
    (f := {
       toFun := fun b => 1 ᵍ⊗ₜ b
       map_add' := by simp [tmul, TensorProduct.tmul_add]
       map_smul' := by simp [tmul, TensorProduct.tmul_smul] })
    (map_one := rfl)
    (map_mul := by
      rw [LinearMap.map_mul_iff]
      refine DirectSum.decompose_lhom_ext ℬ fun i₁ => ?_
      ext b₁ b₂ : 2
      

Proof state:
case 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 ℬ
i₁ : ι
b₁ : ↥(ℬ i₁)
b₂ : B
⊢ ((LinearMap.compr₂ (LinearMap.mul R B)
            {
              toAddHom :=
                { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
                  map_add' :=
                    (_ :
                      ∀ (a a_1 : B),
                        (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
              map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) } ∘ₗ
          Submodule.subtype (ℬ i₁))
        b₁)
      b₂ =
    ((LinearMap.compl₂
            (LinearMap.mul R (𝒜 ᵍ⊗[R] ℬ) ∘ₗ
              {
                toAddHom :=
                  { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
                    map_add' :=
                      (_ :
                        ∀ (a a_1 : B),
                          (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
                map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) })
            {
              toAddHom :=
                { toFun := fun b => 1 ᵍ⊗ₜ[R] b,
                  map_add' :=
                    (_ :
                      ∀ (a a_1 : B),
                        (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a + a_1)) = (of R 𝒜 ℬ) (1 ⊗ₜ[R] a) + (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) },
              map_smul' := (_ : ∀ (a : R) (a_1 : B), (of R 𝒜 ℬ) (1 ⊗ₜ[R] (a • a_1)) = a • (of R 𝒜 ℬ) (1 ⊗ₜ[R] a_1)) } ∘ₗ
          Submodule.subtype (ℬ i₁))
        b₁)
      b₂

Next tactic:
dsimp
/-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) :=
  AlgHom.ofLinearMap (R := R) (A := B) (B := 𝒜 ᵍ⊗[R] ℬ)
    (f := {
       toFun := fun b => 1 ᵍ⊗ₜ b
       map_add' := by simp [tmul, TensorProduct.tmul_add]
       map_smul' := by simp [tmul, TensorProduct.tmul_smul] })
    (map_one := rfl)
    (map_mul := by
      rw [LinearMap.map_mul_iff]
      refine DirectSum.decompose_lhom_ext ℬ fun i₁ => ?_
      ext b₁ b₂ : 2
      dsimp
      

Proof state:
case 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 ℬ
i₁ : ι
b₁ : ↥(ℬ i₁)
b₂ : B
⊢ 1 ᵍ⊗ₜ[R] (↑b₁ * b₂) = 1 ᵍ⊗ₜ[R] ↑b₁ * 1 ᵍ⊗ₜ[R] b₂

Next tactic:
rw [tmul_coe_mul_one_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 

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.mul' R C ∘ₗ map (AlgHom.toLinearMap f) (AlgHom.toLinearMap g) ∘ₗ ↑(LinearEquiv.symm (of R 𝒜 ℬ))) 1 = 1

Next tactic:
dsimp [Algebra.TensorProduct.one_def]