File: Mathlib/LinearAlgebra/TensorPower.lean

full_name: TensorPower
code: /-- Homogenous tensor powers $M^{\otimes n}$. `⨂[R]^n M` is a shorthand for
`⨂[R] (i : Fin n), M`. -/
abbrev TensorPower (R : Type*) (n : ℕ) (M : Type*) [CommSemiring R] [AddCommMonoid M]
    [Module R M] : Type _ 
goal: Type (max u_2 u_1)

full_name: TensorProduct._aux_Mathlib_LinearAlgebra_TensorPower___unexpand_TensorPower_1
code: @[inherit_doc] scoped[TensorProduct] notation:max "⨂[" R "]^" n:arg => TensorPower R n
goal: Lean.PrettyPrinter.Unexpander

full_name: TensorProduct.«_aux_Mathlib_LinearAlgebra_TensorPower___macroRules_TensorProduct_term⨂[_]^__1»
code: @[inherit_doc] scoped[TensorProduct] notation:max "⨂[" R "]^" n:arg => TensorPower R n
goal: Lean.Macro

full_name: PiTensorProduct.gradedMonoid_eq_of_reindex_cast
code: /-- Two dependent pairs of tensor products are equal if their index is equal and the contents
are equal after a canonical reindexing. -/
@[ext]
theorem gradedMonoid_eq_of_reindex_cast {ιι : Type*} {ι : ιι → Type*} :
    ∀ {a b : GradedMonoid fun ii => ⨂[R] _ : ι ii, M} (h : a.fst = b.fst),
      reindex R (fun _ ↦ M) (Equiv.cast <| congr_arg ι h) a.snd = b.snd → a = b
  
goal: (PiTensorProduct.reindex R (fun x => M) (Equiv.cast ⋯)) a.snd = b.snd → a = b

full_name: TensorPower.gOne
code: /-- As a graded monoid, `⨂[R]^i M` has a `1 : ⨂[R]^0 M`. -/
instance gOne : GradedMonoid.GOne fun i => ⨂[R]^i M 
goal: GradedMonoid.GOne fun i => ⨂[R]^i M

full_name: TensorPower._aux_Mathlib_LinearAlgebra_TensorPower___macroRules_TensorPower_termₜ1_1
code: local notation "ₜ1" => @GradedMonoid.GOne.one ℕ (fun i => ⨂[R]^i M) _ _
goal: Lean.Macro

full_name: TensorPower.gOne_def
code: theorem gOne_def : ₜ1 = tprod R (@Fin.elim0 M) 
goal: GradedMonoid.GOne.one = (PiTensorProduct.tprod R) Fin.elim0

full_name: TensorPower.mulEquiv
code: /-- A variant of `PiTensorProduct.tmulEquiv` with the result indexed by `Fin (n + m)`. -/
def mulEquiv {n m : ℕ} : ⨂[R]^n M ⊗[R] (⨂[R]^m) M ≃ₗ[R] (⨂[R]^(n + m)) M 
goal: ⨂[R]^n M ⊗[R] ⨂[R]^m M ≃ₗ[R] ⨂[R]^(n + m) M

full_name: TensorPower.gMul
code: /-- As a graded monoid, `⨂[R]^i M` has a `(*) : ⨂[R]^i M → ⨂[R]^j M → ⨂[R]^(i + j) M`. -/
instance gMul : GradedMonoid.GMul fun i => ⨂[R]^i M 
goal: GradedMonoid.GMul fun i => ⨂[R]^i M

full_name: TensorPower.«_aux_Mathlib_LinearAlgebra_TensorPower___macroRules_TensorPower_term_ₜ*__1»
code: local infixl:70 " ₜ* " => @GradedMonoid.GMul.mul ℕ (fun i => ⨂[R]^i M) _ _ _ _
goal: Lean.Macro

full_name: TensorPower.gMul_def
code: theorem gMul_def {i j} (a : ⨂[R]^i M) (b : (⨂[R]^j) M) :
    a ₜ* b = @mulEquiv R M _ _ _ i j (a ⊗ₜ b) 
goal: GradedMonoid.GMul.mul a b = TensorPower.mulEquiv (a ⊗ₜ[R] b)

full_name: TensorPower.gMul_eq_coe_linearMap
code: theorem gMul_eq_coe_linearMap {i j} (a : ⨂[R]^i M) (b : (⨂[R]^j) M) :
    a ₜ* b = ((TensorProduct.mk R _ _).compr₂ ↑(mulEquiv : _ ≃ₗ[R] (⨂[R]^(i + j)) M) :
      ⨂[R]^i M →ₗ[R] (⨂[R]^j) M →ₗ[R] (⨂[R]^(i + j)) M) a b 
goal: GradedMonoid.GMul.mul a b = (((TensorProduct.mk R (⨂[R]^i M) (⨂[R]^j M)).compr₂ ↑TensorPower.mulEquiv) a) b

full_name: TensorPower.cast
code: /-- Cast between "equal" tensor powers. -/
def cast {i j} (h : i = j) : ⨂[R]^i M ≃ₗ[R] (⨂[R]^j) M 
goal: ⨂[R]^i M ≃ₗ[R] ⨂[R]^j M

full_name: TensorPower.cast_tprod
code: theorem cast_tprod {i j} (h : i = j) (a : Fin i → M) :
    cast R M h (tprod R a) = tprod R (a ∘ Fin.cast h.symm) 
goal: (TensorPower.cast R M h) ((PiTensorProduct.tprod R) a) = (PiTensorProduct.tprod R) (a ∘ Fin.cast ⋯)

full_name: TensorPower.cast_refl
code: @[simp]
theorem cast_refl {i} (h : i = i) : cast R M h = LinearEquiv.refl _ _ 
goal: TensorPower.cast R M h = LinearEquiv.refl R (⨂[R]^i M)

full_name: TensorPower.cast_symm
code: @[simp]
theorem cast_symm {i j} (h : i = j) : (cast R M h).symm = cast R M h.symm 
goal: (TensorPower.cast R M h).symm = TensorPower.cast R M ⋯

full_name: TensorPower.cast_trans
code: @[simp]
theorem cast_trans {i j k} (h : i = j) (h' : j = k) :
    (cast R M h).trans (cast R M h') = cast R M (h.trans h') 
goal: TensorPower.cast R M h ≪≫ₗ TensorPower.cast R M h' = TensorPower.cast R M ⋯

full_name: TensorPower.cast_cast
code: @[simp]
theorem cast_cast {i j k} (h : i = j) (h' : j = k) (a : ⨂[R]^i M) :
    cast R M h' (cast R M h a) = cast R M (h.trans h') a 
goal: (TensorPower.cast R M h') ((TensorPower.cast R M h) a) = (TensorPower.cast R M ⋯) a

full_name: TensorPower.gradedMonoid_eq_of_cast
code: @[ext]
theorem gradedMonoid_eq_of_cast {a b : GradedMonoid fun n => ⨂[R] _ : Fin n, M} (h : a.fst = b.fst)
    (h2 : cast R M h a.snd = b.snd) : a = b 
goal: a = b

full_name: TensorPower.cast_eq_cast
code: theorem cast_eq_cast {i j} (h : i = j) :
    ⇑(cast R M h) = _root_.cast (congrArg (fun i => ⨂[R]^i M) h) 
goal: ⇑(TensorPower.cast R M h) = cast ⋯

full_name: TensorPower.tprod_mul_tprod
code: theorem tprod_mul_tprod {na nb} (a : Fin na → M) (b : Fin nb → M) :
    tprod R a ₜ* tprod R b = tprod R (Fin.append a b) 
goal: GradedMonoid.GMul.mul ((PiTensorProduct.tprod R) a) ((PiTensorProduct.tprod R) b) =
  (PiTensorProduct.tprod R) (Fin.append a b)

full_name: TensorPower.one_mul
code: theorem one_mul {n} (a : ⨂[R]^n M) : cast R M (zero_add n) (ₜ1 ₜ* a) = a 
goal: (TensorPower.cast R M ⋯) (GradedMonoid.GMul.mul GradedMonoid.GOne.one a) = a

full_name: TensorPower.mul_one
code: theorem mul_one {n} (a : ⨂[R]^n M) : cast R M (add_zero _) (a ₜ* ₜ1) = a 
goal: (TensorPower.cast R M ⋯) (GradedMonoid.GMul.mul a GradedMonoid.GOne.one) = a

full_name: TensorPower.mul_assoc
code: theorem mul_assoc {na nb nc} (a : (⨂[R]^na) M) (b : (⨂[R]^nb) M) (c : (⨂[R]^nc) M) :
    cast R M (add_assoc _ _ _) (a ₜ* b ₜ* c) = a ₜ* (b ₜ* c) 
goal: (TensorPower.cast R M ⋯) (GradedMonoid.GMul.mul (GradedMonoid.GMul.mul a b) c) =
  GradedMonoid.GMul.mul a (GradedMonoid.GMul.mul b c)

full_name: TensorPower.gmonoid
code: instance gmonoid : GradedMonoid.GMonoid fun i => ⨂[R]^i M 
goal: GradedMonoid.GMonoid fun i => ⨂[R]^i M

full_name: TensorPower.algebraMap₀
code: /-- The canonical map from `R` to `⨂[R]^0 M` corresponding to the `algebraMap` of the tensor
algebra. -/
def algebraMap₀ : R ≃ₗ[R] (⨂[R]^0) M 
goal: R ≃ₗ[R] ⨂[R]^0 M

full_name: TensorPower.algebraMap₀_eq_smul_one
code: theorem algebraMap₀_eq_smul_one (r : R) : (algebraMap₀ r : (⨂[R]^0) M) = r • ₜ1 
goal: TensorPower.algebraMap₀ r = r • GradedMonoid.GOne.one

full_name: TensorPower.algebraMap₀_one
code: theorem algebraMap₀_one : (algebraMap₀ 1 : (⨂[R]^0) M) = ₜ1 
goal: TensorPower.algebraMap₀ 1 = GradedMonoid.GOne.one

full_name: TensorPower.algebraMap₀_mul
code: theorem algebraMap₀_mul {n} (r : R) (a : ⨂[R]^n M) :
    cast R M (zero_add _) (algebraMap₀ r ₜ* a) = r • a 
goal: (TensorPower.cast R M ⋯) (GradedMonoid.GMul.mul (TensorPower.algebraMap₀ r) a) = r • a

full_name: TensorPower.mul_algebraMap₀
code: theorem mul_algebraMap₀ {n} (r : R) (a : ⨂[R]^n M) :
    cast R M (add_zero _) (a ₜ* algebraMap₀ r) = r • a 
goal: (TensorPower.cast R M ⋯) (GradedMonoid.GMul.mul a (TensorPower.algebraMap₀ r)) = r • a

full_name: TensorPower.algebraMap₀_mul_algebraMap₀
code: theorem algebraMap₀_mul_algebraMap₀ (r s : R) :
    cast R M (add_zero _) (algebraMap₀ r ₜ* algebraMap₀ s) = algebraMap₀ (r * s) 
goal: (TensorPower.cast R M ⋯) (GradedMonoid.GMul.mul (TensorPower.algebraMap₀ r) (TensorPower.algebraMap₀ s)) =
  TensorPower.algebraMap₀ (r * s)

full_name: TensorPower.gsemiring
code: instance gsemiring : DirectSum.GSemiring fun i => ⨂[R]^i M 
goal: DirectSum.GSemiring fun i => ⨂[R]^i M

full_name: TensorPower.galgebra
code: /-- The tensor powers form a graded algebra.

Note that this instance implies `Algebra R (⨁ n : ℕ, ⨂[R]^n M)` via `DirectSum.Algebra`. -/
instance galgebra : DirectSum.GAlgebra R fun i => ⨂[R]^i M 
goal: DirectSum.GAlgebra R fun i => ⨂[R]^i M

full_name: TensorPower.galgebra_toFun_def
code: theorem galgebra_toFun_def (r : R) :
    @DirectSum.GAlgebra.toFun ℕ R (fun i => ⨂[R]^i M) _ _ _ _ _ _ _ r = algebraMap₀ r 
goal: DirectSum.GAlgebra.toFun r = TensorPower.algebraMap₀ r