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

full_name: GradedTensorProduct
code: /-- A Type synonym for `A ⊗[R] B`, but with multiplication as `TensorProduct.gradedMul`.

This has notation `𝒜 ᵍ⊗[R] ℬ`. -/
@[nolint unusedArguments]
def GradedTensorProduct
    (𝒜 : ι → Submodule R A) (ℬ : ι → Submodule R B)
    [GradedAlgebra 𝒜] [GradedAlgebra ℬ] :
    Type _ 
goal: Type (max u_4 u_3)

full_name: TensorProduct.«_aux_Mathlib_LinearAlgebra_TensorProduct_Graded_Internal___macroRules_TensorProduct_term_ᵍ⊗[_]__1»
code: @[inherit_doc GradedTensorProduct]
scoped[TensorProduct] notation:100 𝒜 " ᵍ⊗[" R "] " ℬ:100 => GradedTensorProduct R 𝒜 ℬ
goal: Lean.Macro

full_name: TensorProduct._aux_Mathlib_LinearAlgebra_TensorProduct_Graded_Internal___unexpand_GradedTensorProduct_1
code: @[inherit_doc GradedTensorProduct]
scoped[TensorProduct] notation:100 𝒜 " ᵍ⊗[" R "] " ℬ:100 => GradedTensorProduct R 𝒜 ℬ
goal: Lean.PrettyPrinter.Unexpander

full_name: GradedTensorProduct.instAddCommGroupWithOne
code: instance instAddCommGroupWithOne : AddCommGroupWithOne (𝒜 ᵍ⊗[R] ℬ) 
goal: AddCommGroupWithOne (𝒜 ᵍ⊗[R] ℬ)

full_name: GradedTensorProduct.instModule
code: instance : Module R (𝒜 ᵍ⊗[R] ℬ) 
goal: Module R (𝒜 ᵍ⊗[R] ℬ)

full_name: GradedTensorProduct.of
code: /-- The casting equivalence to move between regular and graded tensor products. -/
def of : A ⊗[R] B ≃ₗ[R] 𝒜 ᵍ⊗[R] ℬ 
goal: A ⊗[R] B ≃ₗ[R] 𝒜 ᵍ⊗[R] ℬ

full_name: GradedTensorProduct.of_one
code: @[simp]
theorem of_one : of R 𝒜 ℬ 1 = 1 
goal: (GradedTensorProduct.of R 𝒜 ℬ) 1 = 1

full_name: GradedTensorProduct.of_symm_one
code: @[simp]
theorem of_symm_one : (of R 𝒜 ℬ).symm 1 = 1 
goal: (GradedTensorProduct.of R 𝒜 ℬ).symm 1 = 1

full_name: GradedTensorProduct.of_symm_of
code: @[simp]
theorem of_symm_of (x : A ⊗[R] B) : (of R 𝒜 ℬ).symm (of R 𝒜 ℬ x) = x 
goal: (GradedTensorProduct.of R 𝒜 ℬ).symm ((GradedTensorProduct.of R 𝒜 ℬ) x) = x

full_name: GradedTensorProduct.symm_of_of
code: @[simp]
theorem symm_of_of (x : 𝒜 ᵍ⊗[R] ℬ) : of R 𝒜 ℬ ((of R 𝒜 ℬ).symm x) = x 
goal: (GradedTensorProduct.of R 𝒜 ℬ) ((GradedTensorProduct.of R 𝒜 ℬ).symm x) = x

full_name: GradedTensorProduct.hom_ext
code: /-- Two linear maps from the graded tensor product agree if they agree on the underlying tensor
product. -/
@[ext]
theorem hom_ext {M} [AddCommMonoid M] [Module R M] ⦃f g : 𝒜 ᵍ⊗[R] ℬ →ₗ[R] M⦄
    (h : f ∘ₗ of R 𝒜 ℬ = (g ∘ₗ of R 𝒜 ℬ : A ⊗[R] B →ₗ[R] M)) :
    f = g 
goal: f = g

full_name: GradedTensorProduct.tmul
code: /-- The graded tensor product of two elements of graded rings. -/
abbrev tmul (a : A) (b : B) : 𝒜 ᵍ⊗[R] ℬ 
goal: 𝒜 ᵍ⊗[R] ℬ

full_name: GradedTensorProduct.«_aux_Mathlib_LinearAlgebra_TensorProduct_Graded_Internal___macroRules_GradedTensorProduct_term_ᵍ⊗ₜ__1»
code: @[inherit_doc]
notation:100 x " ᵍ⊗ₜ" y:100 => tmul _ x y
goal: Lean.Macro

full_name: GradedTensorProduct._aux_Mathlib_LinearAlgebra_TensorProduct_Graded_Internal___unexpand_GradedTensorProduct_tmul_1
code: @[inherit_doc]
notation:100 x " ᵍ⊗ₜ" y:100 => tmul _ x y
goal: Lean.PrettyPrinter.Unexpander

full_name: GradedTensorProduct._aux_Mathlib_LinearAlgebra_TensorProduct_Graded_Internal___unexpand_GradedTensorProduct_tmul_2
code: @[inherit_doc]
notation:100 x " ᵍ⊗ₜ[" R "] " y:100 => tmul R x y
goal: Lean.PrettyPrinter.Unexpander

full_name: GradedTensorProduct.«_aux_Mathlib_LinearAlgebra_TensorProduct_Graded_Internal___macroRules_GradedTensorProduct_term_ᵍ⊗ₜ[_]__1»
code: @[inherit_doc]
notation:100 x " ᵍ⊗ₜ[" R "] " y:100 => tmul R x y
goal: Lean.Macro

full_name: GradedTensorProduct.auxEquiv
code: /-- An auxiliary construction to move between the graded tensor product of internally-graded objects
and the tensor product of direct sums. -/
noncomputable def auxEquiv : (𝒜 ᵍ⊗[R] ℬ) ≃ₗ[R] (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i) 
goal: 𝒜 ᵍ⊗[R] ℬ ≃ₗ[R] (⨁ (i : ι), ↥(𝒜 i)) ⊗[R] ⨁ (i : ι), ↥(ℬ i)

full_name: GradedTensorProduct.auxEquiv_tmul
code: theorem auxEquiv_tmul (a : A) (b : B) :
    auxEquiv R 𝒜 ℬ (a ᵍ⊗ₜ b) = decompose 𝒜 a ⊗ₜ decompose ℬ b 
goal: (GradedTensorProduct.auxEquiv R 𝒜 ℬ) (a ᵍ⊗ₜ[R] b) = (DirectSum.decompose 𝒜) a ⊗ₜ[R] (DirectSum.decompose ℬ) b

full_name: GradedTensorProduct.auxEquiv_one
code: theorem auxEquiv_one : auxEquiv R 𝒜 ℬ 1 = 1 
goal: (GradedTensorProduct.auxEquiv R 𝒜 ℬ) 1 = 1

full_name: GradedTensorProduct.auxEquiv_symm_one
code: theorem auxEquiv_symm_one : (auxEquiv R 𝒜 ℬ).symm 1 = 1 
goal: (GradedTensorProduct.auxEquiv R 𝒜 ℬ).symm 1 = 1

full_name: GradedTensorProduct.mulHom
code: /-- Auxiliary construction used to build the `Mul` instance and get distributivity of `+` and
`\smul`. -/
noncomputable def mulHom : (𝒜 ᵍ⊗[R] ℬ) →ₗ[R] (𝒜 ᵍ⊗[R] ℬ) →ₗ[R] (𝒜 ᵍ⊗[R] ℬ) 
goal: 𝒜 ᵍ⊗[R] ℬ →ₗ[R] 𝒜 ᵍ⊗[R] ℬ →ₗ[R] 𝒜 ᵍ⊗[R] ℬ

full_name: GradedTensorProduct.mulHom_apply
code: theorem mulHom_apply (x y : 𝒜 ᵍ⊗[R] ℬ) :
    mulHom 𝒜 ℬ x y
      = (auxEquiv R 𝒜 ℬ).symm (gradedMul R (𝒜 ·) (ℬ ·) (auxEquiv R 𝒜 ℬ x) (auxEquiv R 𝒜 ℬ y)) 
goal: ((GradedTensorProduct.mulHom 𝒜 ℬ) x) y =
  (GradedTensorProduct.auxEquiv R 𝒜 ℬ).symm
    (((TensorProduct.gradedMul R (fun x => ↥(𝒜 x)) fun x => ↥(ℬ x)) ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) x))
      ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) y))

full_name: GradedTensorProduct.instMul
code: /-- The multipication on the graded tensor product.

See `GradedTensorProduct.coe_mul_coe` for a characterization on pure tensors. -/
instance : Mul (𝒜 ᵍ⊗[R] ℬ) 
goal: Mul (𝒜 ᵍ⊗[R] ℬ)

full_name: GradedTensorProduct.mul_def
code: theorem mul_def (x y : 𝒜 ᵍ⊗[R] ℬ) : x * y = mulHom 𝒜 ℬ x y 
goal: x * y = ((GradedTensorProduct.mulHom 𝒜 ℬ) x) y

full_name: GradedTensorProduct.auxEquiv_mul
code: theorem auxEquiv_mul (x y : 𝒜 ᵍ⊗[R] ℬ) :
    auxEquiv R 𝒜 ℬ (x * y) = gradedMul R (𝒜 ·) (ℬ ·) (auxEquiv R 𝒜 ℬ x) (auxEquiv R 𝒜 ℬ y) 
goal: (GradedTensorProduct.auxEquiv R 𝒜 ℬ) (x * y) =
  ((TensorProduct.gradedMul R (fun x => ↥(𝒜 x)) fun x => ↥(ℬ x)) ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) x))
    ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) y)

full_name: GradedTensorProduct.instMonoid
code: instance instMonoid : Monoid (𝒜 ᵍ⊗[R] ℬ) 
goal: Monoid (𝒜 ᵍ⊗[R] ℬ)

full_name: GradedTensorProduct.instRing
code: instance instRing : Ring (𝒜 ᵍ⊗[R] ℬ) 
goal: Ring (𝒜 ᵍ⊗[R] ℬ)

full_name: GradedTensorProduct.tmul_coe_mul_coe_tmul
code: /-- The characterization of this multiplication on partially homogenous elements. -/
theorem tmul_coe_mul_coe_tmul {j₁ i₂ : ι} (a₁ : A) (b₁ : ℬ j₁) (a₂ : 𝒜 i₂) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (b₁ : B) * (a₂ : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) =
      (-1 : ℤˣ)^(j₁ * i₂) • ((a₁ * a₂ : A) ᵍ⊗ₜ (b₁ * b₂ : B)) 
goal: a₁ ᵍ⊗ₜ[R] ↑b₁ * ↑a₂ ᵍ⊗ₜ[R] b₂ = (-1) ^ (j₁ * i₂) • (a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)

full_name: GradedTensorProduct.tmul_zero_coe_mul_coe_tmul
code: /-- A special case for when `b₁` has grade 0. -/
theorem tmul_zero_coe_mul_coe_tmul {i₂ : ι} (a₁ : A) (b₁ : ℬ 0) (a₂ : 𝒜 i₂) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (b₁ : B) * (a₂ : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) =
      ((a₁ * a₂ : A) ᵍ⊗ₜ (b₁ * b₂ : B)) 
goal: a₁ ᵍ⊗ₜ[R] ↑b₁ * ↑a₂ ᵍ⊗ₜ[R] b₂ = (a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)

full_name: GradedTensorProduct.tmul_coe_mul_zero_coe_tmul
code: /-- A special case for when `a₂` has grade 0. -/
theorem tmul_coe_mul_zero_coe_tmul {j₁ : ι} (a₁ : A) (b₁ : ℬ j₁) (a₂ : 𝒜 0) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (b₁ : B) * (a₂ : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) =
      ((a₁ * a₂ : A) ᵍ⊗ₜ (b₁ * b₂ : B)) 
goal: a₁ ᵍ⊗ₜ[R] ↑b₁ * ↑a₂ ᵍ⊗ₜ[R] b₂ = (a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)

full_name: GradedTensorProduct.tmul_one_mul_coe_tmul
code: theorem tmul_one_mul_coe_tmul {i₂ : ι} (a₁ : A) (a₂ : 𝒜 i₂) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (1 : B) * (a₂ : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) = (a₁ * a₂ : A) ᵍ⊗ₜ (b₂ : B) 
goal: a₁ ᵍ⊗ₜ[R] 1 * ↑a₂ ᵍ⊗ₜ[R] b₂ = (a₁ * ↑a₂) ᵍ⊗ₜ[R] b₂

full_name: GradedTensorProduct.tmul_coe_mul_one_tmul
code: theorem tmul_coe_mul_one_tmul {j₁ : ι} (a₁ : A) (b₁ : ℬ j₁) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (b₁ : B) * (1 : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) = (a₁ : A) ᵍ⊗ₜ (b₁ * b₂ : B) 
goal: a₁ ᵍ⊗ₜ[R] ↑b₁ * 1 ᵍ⊗ₜ[R] b₂ = a₁ ᵍ⊗ₜ[R] (↑b₁ * b₂)

full_name: GradedTensorProduct.tmul_one_mul_one_tmul
code: theorem tmul_one_mul_one_tmul (a₁ : A) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (1 : B) * (1 : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) = (a₁ : A) ᵍ⊗ₜ (b₂ : B) 
goal: a₁ ᵍ⊗ₜ[R] 1 * 1 ᵍ⊗ₜ[R] b₂ = a₁ ᵍ⊗ₜ[R] b₂

full_name: GradedTensorProduct.includeLeftRingHom_apply
code: /-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ 
goal: (GradedTensorProduct.includeLeftRingHom 𝒜 ℬ) a = a ᵍ⊗ₜ[R] 1

full_name: GradedTensorProduct.includeLeftRingHom
code: /-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* 𝒜 ᵍ⊗[R] ℬ 
goal: A →+* 𝒜 ᵍ⊗[R] ℬ

full_name: GradedTensorProduct.instAlgebra
code: instance instAlgebra : Algebra R (𝒜 ᵍ⊗[R] ℬ) 
goal: Algebra R (𝒜 ᵍ⊗[R] ℬ)

full_name: GradedTensorProduct.algebraMap_def
code: lemma algebraMap_def (r : R) : algebraMap R (𝒜 ᵍ⊗[R] ℬ) r = algebraMap R A r ᵍ⊗ₜ[R] 1 
goal: (algebraMap R (𝒜 ᵍ⊗[R] ℬ)) r = (algebraMap R A) r ᵍ⊗ₜ[R] 1

full_name: GradedTensorProduct.tmul_algebraMap_mul_coe_tmul
code: theorem tmul_algebraMap_mul_coe_tmul {i₂ : ι} (a₁ : A) (r : R) (a₂ : 𝒜 i₂) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] algebraMap R B r * (a₂ : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ)
      = (a₁ * a₂ : A) ᵍ⊗ₜ (algebraMap R B r * b₂ : B) 
goal: a₁ ᵍ⊗ₜ[R] (algebraMap R B) r * ↑a₂ ᵍ⊗ₜ[R] b₂ = (a₁ * ↑a₂) ᵍ⊗ₜ[R] ((algebraMap R B) r * b₂)

full_name: GradedTensorProduct.tmul_coe_mul_algebraMap_tmul
code: theorem tmul_coe_mul_algebraMap_tmul {j₁ : ι} (a₁ : A) (b₁ : ℬ j₁) (r : R) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (b₁ : B) * algebraMap R A r ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ)
      = (a₁ * algebraMap R A r : A) ᵍ⊗ₜ (b₁ * b₂ : B) 
goal: a₁ ᵍ⊗ₜ[R] ↑b₁ * (algebraMap R A) r ᵍ⊗ₜ[R] b₂ = (a₁ * (algebraMap R A) r) ᵍ⊗ₜ[R] (↑b₁ * b₂)

full_name: GradedTensorProduct.includeLeft
code: /-- The algebra morphism `A →ₐ[R] A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps!]
def includeLeft : A →ₐ[R] 𝒜 ᵍ⊗[R] ℬ 
goal: A →ₐ[R] 𝒜 ᵍ⊗[R] ℬ

full_name: GradedTensorProduct.includeLeft_apply
code: /-- The algebra morphism `A →ₐ[R] A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps!]
def includeLeft : A →ₐ[R] 𝒜 ᵍ⊗[R] ℬ 
goal: (GradedTensorProduct.includeLeft 𝒜 ℬ) a = a ᵍ⊗ₜ[R] 1

full_name: GradedTensorProduct.includeRight_apply
code: /-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) 
goal: (GradedTensorProduct.includeRight 𝒜 ℬ) a = 1 ᵍ⊗ₜ[R] a

full_name: GradedTensorProduct.includeRight
code: /-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
@[simps!]
def includeRight : B →ₐ[R] (𝒜 ᵍ⊗[R] ℬ) 
goal: B →ₐ[R] 𝒜 ᵍ⊗[R] ℬ

full_name: GradedTensorProduct.algebraMap_def'
code: lemma algebraMap_def' (r : R) : algebraMap R (𝒜 ᵍ⊗[R] ℬ) r = 1 ᵍ⊗ₜ[R] algebraMap R B r 
goal: (algebraMap R (𝒜 ᵍ⊗[R] ℬ)) r = 1 ᵍ⊗ₜ[R] (algebraMap R B) r

full_name: GradedTensorProduct.lift
code: /-- 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 
goal: 𝒜 ᵍ⊗[R] ℬ →ₐ[R] C

full_name: GradedTensorProduct.lift_tmul
code: @[simp]
theorem lift_tmul (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) (b : B) :
    lift 𝒜 ℬ f g h_anti_commutes (a ᵍ⊗ₜ b) = f a * g b 
goal: (GradedTensorProduct.lift 𝒜 ℬ f g h_anti_commutes) (a ᵍ⊗ₜ[R] b) = f a * g b

full_name: GradedTensorProduct.liftEquiv
code: /-- The universal property of the graded tensor product; every algebra morphism uniquely factors
as a pair of algebra morphisms that anticommute with respect to the grading. -/
def liftEquiv :
    { fg : (A →ₐ[R] C) × (B →ₐ[R] C) //
        ∀ ⦃i j⦄ (a : 𝒜 i) (b : ℬ j), fg.1 a * fg.2 b = (-1 : ℤˣ)^(j * i) • (fg.2 b * fg.1 a)} ≃
      ((𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C) 
goal: { fg // ∀ ⦃i j : ι⦄ (a : ↥(𝒜 i)) (b : ↥(ℬ j)), fg.1 ↑a * fg.2 ↑b = (-1) ^ (j * i) • (fg.2 ↑b * fg.1 ↑a) } ≃
  (𝒜 ᵍ⊗[R] ℬ →ₐ[R] C)

full_name: GradedTensorProduct.algHom_ext
code: /-- Two algebra morphism from the graded tensor product agree if their compositions with the left
and right inclusions agree. -/
@[ext]
lemma algHom_ext ⦃f g : (𝒜 ᵍ⊗[R] ℬ) →ₐ[R] C⦄
    (ha : f.comp (includeLeft 𝒜 ℬ) = g.comp (includeLeft 𝒜 ℬ))
    (hb : f.comp (includeRight 𝒜 ℬ) = g.comp (includeRight 𝒜 ℬ)) : f = g 
goal: f = g

full_name: GradedTensorProduct.comm
code: /-- The non-trivial symmetric braiding, sending $a \otimes b$ to
$(-1)^{\deg a' \deg b} (b \otimes a)$. -/
def comm : (𝒜 ᵍ⊗[R] ℬ) ≃ₐ[R] (ℬ ᵍ⊗[R] 𝒜) 
goal: 𝒜 ᵍ⊗[R] ℬ ≃ₐ[R] ℬ ᵍ⊗[R] 𝒜

full_name: GradedTensorProduct.auxEquiv_comm
code: lemma auxEquiv_comm (x : 𝒜 ᵍ⊗[R] ℬ) :
    auxEquiv R ℬ 𝒜 (comm 𝒜 ℬ x) = gradedComm R (𝒜 ·) (ℬ ·) (auxEquiv R 𝒜 ℬ x) 
goal: (GradedTensorProduct.auxEquiv R ℬ 𝒜) ((GradedTensorProduct.comm 𝒜 ℬ) x) =
  (TensorProduct.gradedComm R (fun x => ↥(𝒜 x)) fun x => ↥(ℬ x)) ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) x)

full_name: GradedTensorProduct.comm_coe_tmul_coe
code: @[simp] lemma comm_coe_tmul_coe {i j : ι} (a : 𝒜 i) (b : ℬ j) :
    comm 𝒜 ℬ (a ᵍ⊗ₜ b) = (-1 : ℤˣ)^(j * i) • (b ᵍ⊗ₜ a : ℬ ᵍ⊗[R] 𝒜) 
goal: (GradedTensorProduct.comm 𝒜 ℬ) (↑a ᵍ⊗ₜ[R] ↑b) = (-1) ^ (j * i) • ↑b ᵍ⊗ₜ[R] ↑a