Stefan Neis quoted:
> (In fact, the following problem occured while using "KASH", but since
> they use the "GAP-engine", I tought, this would be the right adress to
You're wrong with that one because, although KASH is using the GAP
parser, interpreter, basics types, it supplies its own types which follow
a slightly different concepts due to the fact that the major part of
KANT/KASH is written low-language (in C) in contrast to GAP where most
algorithms are implemented in high-language (GAP interpreter).
Although there's no such thing as a KASH-Forum You can post problems
like that to firstname.lastname@example.org .
To Your problem:
There are two things to distinguish: GAP matrices (list of lists) and
kash> M:=[[1,2],[3,4]]; [ [ 1, 2 ], [ 3, 4 ] ] kash> TYPE(M); "list" kash> A:=Mat(Z,M); [1 2] [3 4]
The printout of most of the KASH types is not rereadable and only
printed for information. But for KANT matrices over Z You can use the
function MatToRowList() which is quite the opposite to Mat(*,.).
To get what You really want Alexander's function looks like that:
"Print(\"#I ",name," loaded\\n\");\n");
kash> SaveKantMatZTo("mat1.kash",A,"B"); kash> Read("mat1.kash"); #I B loaded kash> B; [1 2] [3 4]
The latest release of KASH features a new BagWrite/BagRead
concept addressing exactly this problem in a more general
approach. See Manual for details.
KASH is a tool for sophisticated computations
in number fields and is availabe free of charge from