|
| 1 | +/- |
| 2 | +Copyright (c) 2021 Eric Wieser. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Eric Wieser |
| 5 | +-/ |
| 6 | + |
| 7 | +import linear_algebra.pi_tensor_product |
| 8 | +import logic.equiv.fin |
| 9 | +import algebra.direct_sum.algebra |
| 10 | + |
| 11 | +/-! |
| 12 | +# Tensor power of a semimodule over a commutative semirings |
| 13 | +
|
| 14 | +We define the `n`th tensor power of `M` as the n-ary tensor product indexed by `fin n` of `M`, |
| 15 | +`⨂[R] (i : fin n), M`. This is a special case of `pi_tensor_product`. |
| 16 | +
|
| 17 | +This file introduces the notation `⨂[R]^n M` for `tensor_power R n M`, which in turn is an |
| 18 | +abbreviation for `⨂[R] i : fin n, M`. |
| 19 | +
|
| 20 | +## Main definitions: |
| 21 | +
|
| 22 | +* `tensor_power.ghas_one` |
| 23 | +* `tensor_power.ghas_mul` |
| 24 | +
|
| 25 | +## TODO |
| 26 | +
|
| 27 | +Show `direct_sum.galgebra R (λ i, ⨂[R]^i M)` and `algebra R (⨁ n : ℕ, ⨂[R]^n M)`. |
| 28 | +
|
| 29 | +
|
| 30 | +## Implementation notes |
| 31 | +
|
| 32 | +In this file we use `ₜ1` and `ₜ*` as local notation for the graded multiplicative structure on |
| 33 | +tensor powers. Elsewhere, using `1` and `*` on `graded_monoid` should be preferred. |
| 34 | +-/ |
| 35 | + |
| 36 | +open_locale tensor_product |
| 37 | + |
| 38 | +/-- Homogenous tensor powers $M^{\otimes n}$. `⨂[R]^n M` is a shorthand for |
| 39 | +`⨂[R] (i : fin n), M`. -/ |
| 40 | +@[reducible] protected def tensor_power (R : Type*) (n : ℕ) (M : Type*) |
| 41 | + [comm_semiring R] [add_comm_monoid M] [module R M] : Type* := |
| 42 | +⨂[R] i : fin n, M |
| 43 | + |
| 44 | +variables {R : Type*} {M : Type*} [comm_semiring R] [add_comm_monoid M] [module R M] |
| 45 | + |
| 46 | +localized "notation `⨂[`:100 R `]^`:80 n:max := tensor_power R n" |
| 47 | + in tensor_product |
| 48 | + |
| 49 | +namespace tensor_power |
| 50 | +open_locale tensor_product direct_sum |
| 51 | +open pi_tensor_product |
| 52 | + |
| 53 | +/-- As a graded monoid, `⨂[R]^i M` has a `1 : ⨂[R]^0 M`. -/ |
| 54 | +instance ghas_one : graded_monoid.ghas_one (λ i, ⨂[R]^i M) := |
| 55 | +{ one := tprod R fin.elim0 } |
| 56 | + |
| 57 | +local notation `ₜ1` := @graded_monoid.ghas_one.one ℕ (λ i, ⨂[R]^i M) _ _ |
| 58 | + |
| 59 | +lemma ghas_one_def : ₜ1 = tprod R fin.elim0 := rfl |
| 60 | + |
| 61 | +/-- A variant of `pi_tensor_prod.tmul_equiv` with the result indexed by `fin (n + m)`. -/ |
| 62 | +def mul_equiv {n m : ℕ} : (⨂[R]^n M) ⊗[R] (⨂[R]^m M) ≃ₗ[R] ⨂[R]^(n + m) M := |
| 63 | +(tmul_equiv R M).trans (reindex R M fin_sum_fin_equiv) |
| 64 | + |
| 65 | +/-- As a graded monoid, `⨂[R]^i M` has a `(*) : ⨂[R]^i M → ⨂[R]^j M → ⨂[R]^(i + j) M`. -/ |
| 66 | +instance ghas_mul : graded_monoid.ghas_mul (λ i, ⨂[R]^i M) := |
| 67 | +{ mul := λ i j a b, mul_equiv (a ⊗ₜ b) } |
| 68 | + |
| 69 | +local infix `ₜ*`:70 := @graded_monoid.ghas_mul.mul ℕ (λ i, ⨂[R]^i M) _ _ _ _ |
| 70 | + |
| 71 | +lemma ghas_mul_def {i j} (a : ⨂[R]^i M) (b : ⨂[R]^j M) : a ₜ* b = mul_equiv (a ⊗ₜ b) := rfl |
| 72 | + |
| 73 | +end tensor_power |
0 commit comments