Let $M_1, M_2, M_3, M_4$ be four matrices. The number of rows in $M_1$ and $M_2$, and those of $M_3$ and $M_4$ should be equal. Also, the number of columns of $M_1$ and $M_3$, and those of M_2 and M_4 must be equal.
The idea is to define a (super) Matrix, which can be considered as $p|q\times r|s$ matrix. This super Matrix can be a morphism between super modules $A^{p|q}$ and $A^{r|s}$ over super algebra $A$.
The function uses four matrices M_1 and M_2, and also M_3 and M_4 as four blocks of a new matrix, say $\begin{pmatrix} M1&M2\\ M3&M4\end{pmatrix}$.
The key supermatrix shows the result matrix created as above.
i1 : M1 = matrix {{1, 2}, {5, 6}, {9, 10}} o1 = | 1 2 | | 5 6 | | 9 10 | 3 2 o1 : Matrix ZZ <--- ZZ |
i2 : M2 = matrix {{3, 4}, {7, 8}, {11, 12}} o2 = | 3 4 | | 7 8 | | 11 12 | 3 2 o2 : Matrix ZZ <--- ZZ |
i3 : M3 = matrix {{13, 14}, {17, 18}} o3 = | 13 14 | | 17 18 | 2 2 o3 : Matrix ZZ <--- ZZ |
i4 : M4 = matrix {{15, 16}, {19, 20}} o4 = | 15 16 | | 19 20 | 2 2 o4 : Matrix ZZ <--- ZZ |
i5 : G = superMatrixGenerator(M1, M2, M3, M4) o5 = SuperMatrix{...1...} o5 : SuperMatrix |
i6 : G.supermatrix o6 = | 1 2 3 4 | | 5 6 7 8 | | 9 10 11 12 | | 13 14 15 16 | | 17 18 19 20 | 5 4 o6 : Matrix ZZ <--- ZZ |
The object SuperMatrix is a type, with ancestor classes MutableHashTable < HashTable < Thing.