File: Mathlib/LinearAlgebra/TensorAlgebra/ToTensorPower.lean

full_name: TensorPower.toTensorAlgebra
code: /-- The canonical embedding from a tensor power to the tensor algebra -/
def toTensorAlgebra {n} : ⨂[R]^n M →ₗ[R] TensorAlgebra R M 
goal: ⨂[R]^n M →ₗ[R] TensorAlgebra R M

full_name: TensorPower.toTensorAlgebra_tprod
code: @[simp]
theorem toTensorAlgebra_tprod {n} (x : Fin n → M) :
    TensorPower.toTensorAlgebra (PiTensorProduct.tprod R x) = TensorAlgebra.tprod R M n x 
goal: TensorPower.toTensorAlgebra ((PiTensorProduct.tprod R) x) = (TensorAlgebra.tprod R M n) x

full_name: TensorPower.toTensorAlgebra_gOne
code: @[simp]
theorem toTensorAlgebra_gOne :
    TensorPower.toTensorAlgebra (@GradedMonoid.GOne.one _ (fun n => ⨂[R]^n M) _ _) = 1 
goal: TensorPower.toTensorAlgebra GradedMonoid.GOne.one = 1

full_name: TensorPower.toTensorAlgebra_gMul
code: @[simp]
theorem toTensorAlgebra_gMul {i j} (a : (⨂[R]^i) M) (b : (⨂[R]^j) M) :
    TensorPower.toTensorAlgebra (@GradedMonoid.GMul.mul _ (fun n => ⨂[R]^n M) _ _ _ _ a b) =
      TensorPower.toTensorAlgebra a * TensorPower.toTensorAlgebra b 
goal: TensorPower.toTensorAlgebra (GradedMonoid.GMul.mul a b) = TensorPower.toTensorAlgebra a * TensorPower.toTensorAlgebra b

full_name: TensorPower.toTensorAlgebra_galgebra_toFun
code: @[simp]
theorem toTensorAlgebra_galgebra_toFun (r : R) :
    TensorPower.toTensorAlgebra (DirectSum.GAlgebra.toFun (R := R) (A := fun n => ⨂[R]^n M) r) =
      algebraMap _ _ r 
goal: TensorPower.toTensorAlgebra (DirectSum.GAlgebra.toFun r) = (algebraMap R (TensorAlgebra R M)) r

full_name: TensorAlgebra.ofDirectSum
code: /-- The canonical map from a direct sum of tensor powers to the tensor algebra. -/
def ofDirectSum : (⨁ n, ⨂[R]^n M) →ₐ[R] TensorAlgebra R M 
goal: (⨁ (n : ℕ), ⨂[R]^n M) →ₐ[R] TensorAlgebra R M

full_name: TensorAlgebra.ofDirectSum_of_tprod
code: @[simp]
theorem ofDirectSum_of_tprod {n} (x : Fin n → M) :
    ofDirectSum (DirectSum.of _ n (PiTensorProduct.tprod R x)) = tprod R M n x 
goal: TensorAlgebra.ofDirectSum ((DirectSum.of (fun n => ⨂[R]^n M) n) ((PiTensorProduct.tprod R) x)) =
  (TensorAlgebra.tprod R M n) x

full_name: TensorAlgebra.toDirectSum
code: /-- The canonical map from the tensor algebra to a direct sum of tensor powers. -/
def toDirectSum : TensorAlgebra R M →ₐ[R] ⨁ n, ⨂[R]^n M 
goal: TensorAlgebra R M →ₐ[R] ⨁ (n : ℕ), ⨂[R]^n M

full_name: TensorAlgebra.toDirectSum_ι
code: @[simp]
theorem toDirectSum_ι (x : M) :
    toDirectSum (ι R x) =
      DirectSum.of (fun n => ⨂[R]^n M) _ (PiTensorProduct.tprod R fun _ : Fin 1 => x) 
goal: TensorAlgebra.toDirectSum ((TensorAlgebra.ι R) x) =
  (DirectSum.of (fun n => ⨂[R]^n M) 1) ((PiTensorProduct.tprod R) fun x_1 => x)

full_name: TensorAlgebra.ofDirectSum_comp_toDirectSum
code: theorem ofDirectSum_comp_toDirectSum :
    ofDirectSum.comp toDirectSum = AlgHom.id R (TensorAlgebra R M) 
goal: TensorAlgebra.ofDirectSum.comp TensorAlgebra.toDirectSum = AlgHom.id R (TensorAlgebra R M)

full_name: TensorAlgebra.ofDirectSum_toDirectSum
code: @[simp]
theorem ofDirectSum_toDirectSum (x : TensorAlgebra R M) :
    ofDirectSum (TensorAlgebra.toDirectSum x) = x 
goal: TensorAlgebra.ofDirectSum (TensorAlgebra.toDirectSum x) = x

full_name: TensorAlgebra.mk_reindex_cast
code: @[simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem mk_reindex_cast {n m : ℕ} (h : n = m) (x : ⨂[R]^n M) :
    GradedMonoid.mk (A := fun i => (⨂[R]^i) M) m
    (PiTensorProduct.reindex R (fun _ ↦ M) (Equiv.cast <| congr_arg Fin h) x) =
    GradedMonoid.mk n x 
goal: GradedMonoid.mk m ((PiTensorProduct.reindex R (fun x => M) (Equiv.cast ⋯)) x) = GradedMonoid.mk n x

full_name: TensorAlgebra.mk_reindex_fin_cast
code: @[simp]
theorem mk_reindex_fin_cast {n m : ℕ} (h : n = m) (x : ⨂[R]^n M) :
    GradedMonoid.mk (A := fun i => (⨂[R]^i) M) m
    (PiTensorProduct.reindex R (fun _ ↦ M) (finCongr h) x) = GradedMonoid.mk n x 
goal: GradedMonoid.mk m ((PiTensorProduct.reindex R (fun x => M) (finCongr h)) x) = GradedMonoid.mk n x

full_name: TensorPower.list_prod_gradedMonoid_mk_single
code: /-- The product of tensor products made of a single vector is the same as a single product of
all the vectors. -/
theorem _root_.TensorPower.list_prod_gradedMonoid_mk_single (n : ℕ) (x : Fin n → M) :
    ((List.finRange n).map fun a =>
          (GradedMonoid.mk _ (PiTensorProduct.tprod R fun _ : Fin 1 => x a) :
            GradedMonoid fun n => ⨂[R]^n M)).prod =
      GradedMonoid.mk n (PiTensorProduct.tprod R x) 
goal: (List.map (fun a => GradedMonoid.mk 1 ((PiTensorProduct.tprod R) fun x_1 => x a)) (List.finRange n)).prod =
  GradedMonoid.mk n ((PiTensorProduct.tprod R) x)

full_name: TensorAlgebra.toDirectSum_tensorPower_tprod
code: theorem toDirectSum_tensorPower_tprod {n} (x : Fin n → M) :
    toDirectSum (tprod R M n x) = DirectSum.of _ n (PiTensorProduct.tprod R x) 
goal: TensorAlgebra.toDirectSum ((TensorAlgebra.tprod R M n) x) =
  (DirectSum.of (fun i => ⨂[R]^i M) n) ((PiTensorProduct.tprod R) x)

full_name: TensorAlgebra.toDirectSum_comp_ofDirectSum
code: theorem toDirectSum_comp_ofDirectSum :
    toDirectSum.comp ofDirectSum = AlgHom.id R (⨁ n, ⨂[R]^n M) 
goal: TensorAlgebra.toDirectSum.comp TensorAlgebra.ofDirectSum = AlgHom.id R (⨁ (n : ℕ), ⨂[R]^n M)

full_name: TensorAlgebra.toDirectSum_ofDirectSum
code: @[simp]
theorem toDirectSum_ofDirectSum (x : ⨁ n, ⨂[R]^n M) :
    TensorAlgebra.toDirectSum (ofDirectSum x) = x 
goal: TensorAlgebra.toDirectSum (TensorAlgebra.ofDirectSum x) = x

full_name: TensorAlgebra.equivDirectSum
code: /-- The tensor algebra is isomorphic to a direct sum of tensor powers. -/
@[simps!]
def equivDirectSum : TensorAlgebra R M ≃ₐ[R] ⨁ n, ⨂[R]^n M 
goal: TensorAlgebra R M ≃ₐ[R] ⨁ (n : ℕ), ⨂[R]^n M

full_name: TensorAlgebra.equivDirectSum_apply
code: /-- The tensor algebra is isomorphic to a direct sum of tensor powers. -/
@[simps!]
def equivDirectSum : TensorAlgebra R M ≃ₐ[R] ⨁ n, ⨂[R]^n M 
goal: TensorAlgebra.equivDirectSum a = TensorAlgebra.toDirectSum a

full_name: TensorAlgebra.equivDirectSum_symm_apply
code: /-- The tensor algebra is isomorphic to a direct sum of tensor powers. -/
@[simps!]
def equivDirectSum : TensorAlgebra R M ≃ₐ[R] ⨁ n, ⨂[R]^n M 
goal: TensorAlgebra.equivDirectSum.symm a = TensorAlgebra.ofDirectSum a