# formation -- recover the methods used to make a module

## Synopsis

• Usage:
formation M
• Inputs:
• M, , a module
• Outputs:
• , whose value is the module itself

## Description

If the module was created as a direct sum, tensor product, of Hom-module, then the expression will reflect that. In each case, the result is a function application, and the sequence of arguments is easily obtained.

 i1 : M = ZZ^2 ++ ZZ^3 5 o1 = ZZ o1 : ZZ-module, free i2 : t = formation M 2 3 o2 = directSum (ZZ , ZZ ) o2 : Expression of class FunctionApplication i3 : peek t 2 3 o3 = FunctionApplication{directSum, (ZZ , ZZ )} i4 : t#1 2 3 o4 = (ZZ , ZZ ) o4 : Sequence i5 : value t 5 o5 = ZZ o5 : ZZ-module, free i6 : M = directSum(ZZ^2, ZZ^3, ZZ^4) 9 o6 = ZZ o6 : ZZ-module, free i7 : t = formation M 2 3 4 o7 = directSum (ZZ , ZZ , ZZ ) o7 : Expression of class FunctionApplication i8 : t#1 2 3 4 o8 = (ZZ , ZZ , ZZ ) o8 : Sequence i9 : M = ZZ^2 ** ZZ^3 6 o9 = ZZ o9 : ZZ-module, free i10 : t = formation M 2 3 o10 = tensor (ZZ , ZZ ) o10 : Expression of class FunctionApplication i11 : t#1 2 3 o11 = (ZZ , ZZ ) o11 : Sequence

If the module was not obtained that way, then null is returned.

 i12 : formation ZZ^6

The same remarks apply to certain other types of objects, such as chain complexes.

 i13 : R = QQ[x,y]; i14 : C = res coker vars R; i15 : D = C ++ C 2 4 2 o15 = R <-- R <-- R <-- 0 0 1 2 3 o15 : ChainComplex i16 : formation D 1 2 1 1 2 1 o16 = directSum (R <-- R <-- R <-- 0, R <-- R <-- R <-- 0) 0 1 2 3 0 1 2 3 o16 : Expression of class FunctionApplication