next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc :: tensor

tensor -- tensor product

Description

This function calculates the tensor product of a list or sequence of compatible objects.

This method is declared as a MethodFunctionBinary, so for two or more argument the product is computed iteratively from the binary tensor products, working from left to right. For two arguments, this is the same as A ** B except that options are allowed.

i1 : tensor(ZZ^2, ZZ^3, ZZ^4)

       24
o1 = ZZ

o1 : ZZ-module, free

When a more efficient algorithm is available for computing the intersection of all inputs simultaneously rather than iteratively, for instance for intersecting Modules, a specialized function that takes a list or sequence may be installed on (symbol intersect, Type).

i2 : code lookup(symbol intersect, Module)

o2 = /usr/share/Macaulay2/Core/option.m2:15:20-19:34: --source code:
       (opts,f) -> args -> (
            -- Common code for functions created with >> to process options and arguments.
            uncurry(f, override (opts,args))
            )
       )
     | symbol   class              value                                  location of symbol
     | ------   -----              -----                                  ------------------                                   
     | f      : FunctionClosure -- ...                                    /usr/share/Macaulay2/Core/option.m2:15:9-15:10
     | opts   : OptionTable     -- OptionTable{MinimalGenerators => true} /usr/share/Macaulay2/Core/option.m2:15:4-15:8 
     |                                         Strategy => null           
     | -- function f:
     | /usr/share/Macaulay2/Core/intersect.m2:86:48-86:104: --source code:
     | Module.intersect = moduleIntersectOpts >> opts -> L -> intersectHelper(L, (intersect, Module, Module), opts)
     | -- option table opts:
     | OptionTable{MinimalGenerators => true}
     |             Strategy => null

See also

Ways to use tensor :

For the programmer

The object tensor is an associative binary method function.