Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
/*
 * This file:
 *   http://anggtwu.net/MAXIMA/LI_split1.mac.html
 *   http://anggtwu.net/MAXIMA/LI_split1.mac
 *          (find-angg "MAXIMA/LI_split1.mac")
 * Author: Eduardo Ochs <eduardoochs@gmail.com>
 *
 * Superseded by:
 *   (find-angg "MAXIMA/LI_Axb1.mac")
 *
 * (defun e () (interactive) (find-angg "MAXIMA/LI_split1.mac"))
 * (find-es "maxima" "augcoefmatrix")
 * (find-es "maxima" "LI_split")
 * (find-es "maxima" "2023-2-C2-P2")
 * (find-es "maxima" "2023-2-C2-P2" "Questao 2 por s e c")
*/

columnvector(x) := transpose(matrix(x));
vtolist(v)      := transpose(v)[1];
Mtolist(M)      := args(M);

LI_delta (i,j)        := if is(i=j) then 1 else 0;
LI_subst1(lis, k)     := makelist(lis[ii]=LI_delta(ii,k), ii,1,length(lis));
LI_subst (ex, lis, k) := subst(LI_subst1(lis, k), ex);
LI_split (ex, lis)    := makelist(LI_subst(ex, lis, k), k,1,length(lis));

LI_lastrow   (M)            := M[length(M)];
LI_lastcolumn(M)            := transpose(LI_lastrow(transpose(M)));
LI_eqs       (bigeq,lis)    := makelist(LI_subst(bigeq, lis, k), k,1,length(lis));
LI_coefmatrix(bigeq,lis,xx) := coefmatrix(LI_eqs(bigeq,lis), xx);
LI_augmatrix (bigeq,lis,xx) := augcoefmatrix(LI_eqs(bigeq,lis), xx);
LI_right     (bigeq,lis,xx) := -LI_lastcolumn(augcoefmatrix(LI_eqs(bigeq,lis), xx));
LI_Axx       (bigeq,lis,xx) := [LI_coefmatrix(bigeq,lis,xx), LI_right(bigeq,lis,xx)];
LI_matreq3   (bigeq,lis,xx) := block([A,vv], [A,vv]:LI_Axx(bigeq,lis,xx), [A,columnvector(xx),vv]);
LI_matreq    (bigeq,lis,xx) := block([A,vv], [A,vv]:LI_Axx(bigeq,lis,xx), [A,columnvector(xx)]=vv);



/*
* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
load("LI_split1.mac");

LI_split(A*s+B*c=C*s, [s,c]);

A   : matrix([a,b,c], [d,e,f]);
xyz : matrix([x], [y], [z]);
A. xyz;
eq1 : (A.xyz)[1][1] = u;
eq2 : (A.xyz)[2][1] = v;
      ss*eq1 + cc*eq2;
eq3 : expand(ss*eq1 + cc*eq2);
LI_split     (eq3, [ss,cc]);
LI_coefmatrix(eq3, [ss,cc], [x,y,z]);
LI_augmatrix (eq3, [ss,cc], [x,y,z]);
LI_right     (eq3, [ss,cc], [x,y,z]);
LI_matreq    (eq3, [ss,cc], [x,y,z]);

*/