File: Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean

full_name: TensorProduct.instModuleFstSnd
code: instance (i : ι × ι) : Module R (𝒜 (Prod.fst i) ⊗[R] ℬ (Prod.snd i)) 
goal: Module R (𝒜 i.1 ⊗[R] ℬ i.2)

full_name: TensorProduct._aux_Mathlib_LinearAlgebra_TensorProduct_Graded_External___macroRules_TensorProduct_term𝒜ℬ_1
code: local notation "𝒜ℬ" => (fun i : ι × ι => 𝒜 (Prod.fst i) ⊗[R] ℬ (Prod.snd i))
goal: Lean.Macro

full_name: TensorProduct._aux_Mathlib_LinearAlgebra_TensorProduct_Graded_External___macroRules_TensorProduct_termℬ𝒜_1
code: local notation "ℬ𝒜" => (fun i : ι × ι => ℬ (Prod.fst i) ⊗[R] 𝒜 (Prod.snd i))
goal: Lean.Macro

full_name: TensorProduct.gradedCommAux
code: /-- Auxliary construction used to build `TensorProduct.gradedComm`.

This operates on direct sums of tensors instead of tensors of direct sums. -/
def gradedCommAux : DirectSum _ 𝒜ℬ →ₗ[R] DirectSum _ ℬ𝒜 
goal: (⨁ (i : ι × ι), 𝒜 i.1 ⊗[R] ℬ i.2) →ₗ[R] ⨁ (i : ι × ι), ℬ i.1 ⊗[R] 𝒜 i.2

full_name: TensorProduct.gradedCommAux_lof_tmul
code: @[simp]
theorem gradedCommAux_lof_tmul (i j : ι) (a : 𝒜 i) (b : ℬ j) :
    gradedCommAux R 𝒜 ℬ (lof R _ 𝒜ℬ (i, j) (a ⊗ₜ b)) =
      (-1 : ℤˣ)^(j * i) • lof R _ ℬ𝒜 (j, i) (b ⊗ₜ a) 
goal: (TensorProduct.gradedCommAux R 𝒜 ℬ) ((DirectSum.lof R (ι × ι) (fun i => 𝒜 i.1 ⊗[R] ℬ i.2) (i, j)) (a ⊗ₜ[R] b)) =
  (-1) ^ (j * i) • (DirectSum.lof R (ι × ι) (fun i => ℬ i.1 ⊗[R] 𝒜 i.2) (j, i)) (b ⊗ₜ[R] a)

full_name: TensorProduct.gradedCommAux_comp_gradedCommAux
code: @[simp]
theorem gradedCommAux_comp_gradedCommAux :
    gradedCommAux R 𝒜 ℬ ∘ₗ gradedCommAux R ℬ 𝒜 = LinearMap.id 
goal: TensorProduct.gradedCommAux R 𝒜 ℬ ∘ₗ TensorProduct.gradedCommAux R ℬ 𝒜 = LinearMap.id

full_name: TensorProduct.gradedComm
code: /-- The braiding operation for tensor products of externally `ι`-graded algebras.

This sends $a ⊗ b$ to $(-1)^{\deg a' \deg b} (b ⊗ a)$. -/
def gradedComm :
    (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i) ≃ₗ[R] (⨁ i, ℬ i) ⊗[R] (⨁ i, 𝒜 i) 
goal: ((⨁ (i : ι), 𝒜 i) ⊗[R] ⨁ (i : ι), ℬ i) ≃ₗ[R] (⨁ (i : ι), ℬ i) ⊗[R] ⨁ (i : ι), 𝒜 i

full_name: TensorProduct.gradedComm_symm
code: /-- The braiding is symmetric. -/
@[simp]
theorem gradedComm_symm : (gradedComm R 𝒜 ℬ).symm = gradedComm R ℬ 𝒜 
goal: (TensorProduct.gradedComm R 𝒜 ℬ).symm = TensorProduct.gradedComm R ℬ 𝒜

full_name: TensorProduct.gradedComm_of_tmul_of
code: theorem gradedComm_of_tmul_of (i j : ι) (a : 𝒜 i) (b : ℬ j) :
    gradedComm R 𝒜 ℬ (lof R _ 𝒜 i a ⊗ₜ lof R _ ℬ j b) =
      (-1 : ℤˣ)^(j * i) • (lof R _ ℬ _ b ⊗ₜ lof R _ 𝒜 _ a) 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) ((DirectSum.lof R ι 𝒜 i) a ⊗ₜ[R] (DirectSum.lof R ι ℬ j) b) =
  (-1) ^ (j * i) • (DirectSum.lof R ι ℬ j) b ⊗ₜ[R] (DirectSum.lof R ι 𝒜 i) a

full_name: TensorProduct.gradedComm_tmul_of_zero
code: theorem gradedComm_tmul_of_zero (a : ⨁ i, 𝒜 i) (b : ℬ 0) :
    gradedComm R 𝒜 ℬ (a ⊗ₜ lof R _ ℬ 0 b) = lof R _ ℬ _ b ⊗ₜ a 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) (a ⊗ₜ[R] (DirectSum.lof R ι ℬ 0) b) = (DirectSum.lof R ι ℬ 0) b ⊗ₜ[R] a

full_name: TensorProduct.gradedComm_of_zero_tmul
code: theorem gradedComm_of_zero_tmul (a : 𝒜 0) (b : ⨁ i, ℬ i) :
    gradedComm R 𝒜 ℬ (lof R _ 𝒜 0 a ⊗ₜ b) = b ⊗ₜ lof R _ 𝒜 _ a 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) ((DirectSum.lof R ι 𝒜 0) a ⊗ₜ[R] b) = b ⊗ₜ[R] (DirectSum.lof R ι 𝒜 0) a

full_name: TensorProduct.gradedComm_tmul_one
code: theorem gradedComm_tmul_one (a : ⨁ i, 𝒜 i) : gradedComm R 𝒜 ℬ (a ⊗ₜ 1) = 1 ⊗ₜ a 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) (a ⊗ₜ[R] 1) = 1 ⊗ₜ[R] a

full_name: TensorProduct.gradedComm_one_tmul
code: theorem gradedComm_one_tmul (b : ⨁ i, ℬ i) : gradedComm R 𝒜 ℬ (1 ⊗ₜ b) = b ⊗ₜ 1 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) (1 ⊗ₜ[R] b) = b ⊗ₜ[R] 1

full_name: TensorProduct.gradedComm_one
code: @[simp, nolint simpNF] -- linter times out
theorem gradedComm_one : gradedComm R 𝒜 ℬ 1 = 1 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) 1 = 1

full_name: TensorProduct.gradedComm_tmul_algebraMap
code: theorem gradedComm_tmul_algebraMap (a : ⨁ i, 𝒜 i) (r : R) :
    gradedComm R 𝒜 ℬ (a ⊗ₜ algebraMap R _ r) = algebraMap R _ r ⊗ₜ a 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) (a ⊗ₜ[R] (algebraMap R (⨁ (i : ι), ℬ i)) r) = (algebraMap R (⨁ (i : ι), ℬ i)) r ⊗ₜ[R] a

full_name: TensorProduct.gradedComm_algebraMap_tmul
code: theorem gradedComm_algebraMap_tmul (r : R) (b : ⨁ i, ℬ i) :
    gradedComm R 𝒜 ℬ (algebraMap R _ r ⊗ₜ b) = b ⊗ₜ algebraMap R _ r 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) ((algebraMap R (⨁ (i : ι), 𝒜 i)) r ⊗ₜ[R] b) = b ⊗ₜ[R] (algebraMap R (⨁ (i : ι), 𝒜 i)) r

full_name: TensorProduct.gradedComm_algebraMap
code: theorem gradedComm_algebraMap (r : R) :
    gradedComm R 𝒜 ℬ (algebraMap R _ r) = algebraMap R _ r 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) ((algebraMap R ((⨁ (i : ι), 𝒜 i) ⊗[R] ⨁ (i : ι), ℬ i)) r) =
  (algebraMap R ((⨁ (i : ι), ℬ i) ⊗[R] ⨁ (i : ι), 𝒜 i)) r

full_name: TensorProduct.gradedMul
code: /-- The multiplication operation for tensor products of externally `ι`-graded algebras. -/
noncomputable irreducible_def gradedMul :
    letI AB := DirectSum _ 𝒜 ⊗[R] DirectSum _ ℬ
    letI : Module R AB := TensorProduct.leftModule
    AB →ₗ[R] AB →ₗ[R] AB 
goal: DirectSum ι 𝒜 ⊗[R] DirectSum ι ℬ →ₗ[R] DirectSum ι 𝒜 ⊗[R] DirectSum ι ℬ →ₗ[R] DirectSum ι 𝒜 ⊗[R] DirectSum ι ℬ

full_name: TensorProduct.definition._@.Mathlib.LinearAlgebra.TensorProduct.Graded.External._hyg.4757
code: /-- The multiplication operation for tensor products of externally `ι`-graded algebras. -/
noncomputable irreducible_def gradedMul :
    letI AB := DirectSum _ 𝒜 ⊗[R] DirectSum _ ℬ
    letI : Module R AB := TensorProduct.leftModule
    AB →ₗ[R] AB →ₗ[R] AB 
goal: DirectSum ι 𝒜 ⊗[R] DirectSum ι ℬ →ₗ[R] DirectSum ι 𝒜 ⊗[R] DirectSum ι ℬ →ₗ[R] DirectSum ι 𝒜 ⊗[R] DirectSum ι ℬ

full_name: TensorProduct.wrapped._@.Mathlib.LinearAlgebra.TensorProduct.Graded.External._hyg.4757
code: /-- The multiplication operation for tensor products of externally `ι`-graded algebras. -/
noncomputable irreducible_def gradedMul :
    letI AB := DirectSum _ 𝒜 ⊗[R] DirectSum _ ℬ
    letI : Module R AB := TensorProduct.leftModule
    AB →ₗ[R] AB →ₗ[R] AB 
goal: Subtype (Eq TensorProduct.definition✝)

full_name: TensorProduct.gradedMul_def
code: /-- The multiplication operation for tensor products of externally `ι`-graded algebras. -/
noncomputable irreducible_def gradedMul :
    letI AB := DirectSum _ 𝒜 ⊗[R] DirectSum _ ℬ
    letI : Module R AB := TensorProduct.leftModule
    AB →ₗ[R] AB →ₗ[R] AB 
goal: TensorProduct.gradedMul R 𝒜 ℬ =
  TensorProduct.curry
    (TensorProduct.map (LinearMap.mul' R (⨁ (i : ι), 𝒜 i)) (LinearMap.mul' R (⨁ (i : ι), ℬ i)) ∘ₗ
      ↑(TensorProduct.assoc R (⨁ (i : ι), 𝒜 i) (⨁ (i : ι), 𝒜 i) ((⨁ (i : ι), ℬ i) ⊗[R] ⨁ (i : ι), ℬ i)).symm ∘ₗ
        LinearMap.lTensor (⨁ (i : ι), 𝒜 i)
            (↑(TensorProduct.assoc R (⨁ (i : ι), 𝒜 i) (⨁ (i : ι), ℬ i) (⨁ (i : ι), ℬ i)) ∘ₗ
              LinearMap.rTensor (⨁ (i : ι), ℬ i) ↑(TensorProduct.gradedComm R ℬ 𝒜) ∘ₗ
                ↑(TensorProduct.assoc R (DirectSum ι ℬ) (DirectSum ι 𝒜) (DirectSum ι ℬ)).symm) ∘ₗ
          ↑(TensorProduct.assoc R (DirectSum ι 𝒜) (DirectSum ι ℬ) (DirectSum ι 𝒜 ⊗[R] DirectSum ι ℬ)))

full_name: TensorProduct.tmul_of_gradedMul_of_tmul
code: theorem tmul_of_gradedMul_of_tmul (j₁ i₂ : ι)
    (a₁ : ⨁ i, 𝒜 i) (b₁ : ℬ j₁) (a₂ : 𝒜 i₂) (b₂ : ⨁ i, ℬ i) :
    gradedMul R 𝒜 ℬ (a₁ ⊗ₜ lof R _ ℬ j₁ b₁) (lof R _ 𝒜 i₂ a₂ ⊗ₜ b₂) =
      (-1 : ℤˣ)^(j₁ * i₂) • ((a₁ * lof R _ 𝒜 _ a₂) ⊗ₜ (lof R _ ℬ _ b₁ * b₂)) 
goal: ((TensorProduct.gradedMul R 𝒜 ℬ) (a₁ ⊗ₜ[R] (DirectSum.lof R ι ℬ j₁) b₁)) ((DirectSum.lof R ι 𝒜 i₂) a₂ ⊗ₜ[R] b₂) =
  (-1) ^ (j₁ * i₂) • (a₁ * (DirectSum.lof R ι 𝒜 i₂) a₂) ⊗ₜ[R] ((DirectSum.lof R ι ℬ j₁) b₁ * b₂)

full_name: TensorProduct.algebraMap_gradedMul
code: theorem algebraMap_gradedMul (r : R) (x : (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i)) :
    gradedMul R 𝒜 ℬ (algebraMap R _ r ⊗ₜ 1) x = r • x 
goal: ((TensorProduct.gradedMul R 𝒜 ℬ) ((algebraMap R (DirectSum ι 𝒜)) r ⊗ₜ[R] 1)) x = r • x

full_name: TensorProduct.one_gradedMul
code: theorem one_gradedMul (x : (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i)) :
    gradedMul R 𝒜 ℬ 1 x = x 
goal: ((TensorProduct.gradedMul R 𝒜 ℬ) 1) x = x

full_name: TensorProduct.gradedMul_algebraMap
code: theorem gradedMul_algebraMap (x : (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i)) (r : R) :
    gradedMul R 𝒜 ℬ x (algebraMap R _ r ⊗ₜ 1) = r • x 
goal: ((TensorProduct.gradedMul R 𝒜 ℬ) x) ((algebraMap R (DirectSum ι 𝒜)) r ⊗ₜ[R] 1) = r • x

full_name: TensorProduct.gradedMul_one
code: theorem gradedMul_one (x : (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i)) :
    gradedMul R 𝒜 ℬ x 1 = x 
goal: ((TensorProduct.gradedMul R 𝒜 ℬ) x) 1 = x

full_name: TensorProduct.gradedMul_assoc
code: theorem gradedMul_assoc (x y z : DirectSum _ 𝒜 ⊗[R] DirectSum _ ℬ) :
    gradedMul R 𝒜 ℬ (gradedMul R 𝒜 ℬ x y) z = gradedMul R 𝒜 ℬ x (gradedMul R 𝒜 ℬ y z) 
goal: ((TensorProduct.gradedMul R 𝒜 ℬ) (((TensorProduct.gradedMul R 𝒜 ℬ) x) y)) z =
  ((TensorProduct.gradedMul R 𝒜 ℬ) x) (((TensorProduct.gradedMul R 𝒜 ℬ) y) z)

full_name: TensorProduct.gradedComm_gradedMul
code: theorem gradedComm_gradedMul (x y : DirectSum _ 𝒜 ⊗[R] DirectSum _ ℬ) :
    gradedComm R 𝒜 ℬ (gradedMul R 𝒜 ℬ x y)
      = gradedMul R ℬ 𝒜 (gradedComm R 𝒜 ℬ x) (gradedComm R 𝒜 ℬ y) 
goal: (TensorProduct.gradedComm R 𝒜 ℬ) (((TensorProduct.gradedMul R 𝒜 ℬ) x) y) =
  ((TensorProduct.gradedMul R ℬ 𝒜) ((TensorProduct.gradedComm R 𝒜 ℬ) x)) ((TensorProduct.gradedComm R 𝒜 ℬ) y)