Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
/*
 * This file:
 *   https://anggtwu.net/MAXIMA/2025-ex-subst.mac.html
 *   https://anggtwu.net/MAXIMA/2025-ex-subst.mac
 *           (find-angg "MAXIMA/2025-ex-subst.mac")
 * Author: Eduardo Ochs <eduardoochs@gmail.com>
 *
 * (defun e () (interactive) (find-angg "MAXIMA/2025-ex-subst.mac"))
 * «.funcoes»	(to "funcoes")
 * «.matrixes»	(to "matrixes")
 * «.renomear»	(to "renomear")

*/


** ---- «funcoes»  (to ".funcoes")
** (c2m252exsubstp 4 "funcoes")
** (c2m252exsubsta   "funcoes")
** (c2m252exsubstp 15 "funcoes-gab")
** (c2m252exsubsta    "funcoes-gab")
* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
** (find-angg "MAXIMA/2025-emaxima.mac+")
load       ("~/MAXIMA/2025-emaxima.mac");
linenum:0;

* (eeks 0.25 0.25)
/* block f1 */
f(x) := x ^ 2$
f(200);
f(3*u + 4);
f(42 * x^3 + 99);
f(a + b);
f(g(x));
42 + f(200);
f(f(200));
h(f(x));
h(f(a + b));
linenum:0;

/* block f2 */
f(x) := x ^. 2$
f(200);
f(3*u +. 4);
f(42 *. x^3 +. 99);
f(a +. b);
f(g(x));
42 +. f(200);
h(f(200));
h(f(x));
h(f(a +. b));

linenum:0;
/* block f3 */
kill(f)$
S1 : [f(y) = y^.5 +. y^.6]$
f(200);
f(200)              _s_ S1;
f(3*u +. 4)         _s_ S1;
f(42*.x^3 +. 99)    _s_ S1;
f(a +. b)           _s_ S1;
f(g(x))             _s_ S1;
(42 +. f(200))      _s_ S1;

/* block f3b */
h(f(200))           _s_ S1;
h(f(x))             _s_ S1;
h(f(a +. b))        _s_ S1;
f(f(200))           _s_ S1;
h(x)                _s_ S1;
h(y)                _s_ S1;

* (ee-write-buffer-contents "*maxima*" "/tmp/o")
* (find-angg "LUA/Maxima3.lua" "log-to-i" 4)




** --- «matrixes»  (to ".matrixes")
** (c2m252exsubstp 16 "matrix-and-subst")
** (c2m252exsubsta    "matrix-and-subst")
** Supersedes: (find-angg "MAXIMA/2025-matrixes.mac")

* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
** (find-angg "MAXIMA/2025-emaxima+.mac")
load       ("~/MAXIMA/2025-emaxima+.mac");
linenum:0;
display2d:true$
* (eeks 0.25 0.25)

/* block ignore */
qyes() := (stringdisp:true,  lisptree0_config(q))$
qno()  := (stringdisp:false, lisptree0_config(nq))$

/* block matrixes 1 */
lisptree2(    matrix([10,20],[30,40]));
lisptree2(   bmatrix([10,20],[30,40]));
lisptree2(barematrix([10,20],[30,40]));

qno()$  lisptree2(matrix([a,b],["c",""]));
qno()$  lisptree2(matrix([a,"=",b],["", "=",c]));

/* block substs */
S1 : [a=2,b=3];
V(S1);
lisptree2(S1);
lisptree2(V(S1));
 a+.b=b+.a;
(a+.b=b+.a) _s_   S1;
(a+.b=b+.a) _ss_  S1;

/* block substs 2 */
(a+.b=b+.a) _sss_ S1;
(a+.b=b+.a) _ssu_ S1;

lisptree2q((a+.b=b+.a) _s_   S1);
lisptree2 ((a+.b=b+.a) _s_   S1);
lisptree2 ((a+.b=b+.a) _ss_  S1);

* (ee-write-buffer-contents "*maxima*" "/tmp/o")
* (find-angg "LUA/Maxima3.lua" "log-to-i" 4)




** ---- «renomear»  (to ".renomear")
** (c2m251exsubstp 12 "renomear")
** (c2m251exsubsta    "renomear")
** (c2m252exsubstp 17 "renomear-maxima")
** (c2m252exsubsta    "renomear-maxima")

* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
** (find-angg "MAXIMA/2025-emaxima+.mac")
load       ("~/MAXIMA/2025-emaxima.mac");
linenum:0;
** display2d:true$
texput(fp,"f'");
texput(gp,"g'");
texput(hp,"h'");
texput(kp,"k'");
* (eeks 0.25 0.25)

/* block renomear */
S1  : [f=h,g=k]$
S2  : [h=g,k=f]$
S3  : [x=t]$
S4  : [f=g,g=f,x=t]$
S1b : [f=h,g=k,fp=hp,gp=kp]$
S2b : [h=g,k=f,hp=gp,kp=fp]$
S4b : [f=g,g=f,fp=gp,gp=fp,x=t]$

RCL _ssu_ S1  _usu_ S2  _usu_ S3;
RCL _ssu_ S1b _usu_ S2b _usu_ S3;

/* block renomear 2 */
RCV _ssu_ S1b _usu_ S2b _usu_ S3;
RCL _ssu_ S4;
RCV _ssu_ S4b;

* (ee-write-buffer-contents "*maxima*" "/tmp/o")
* (find-angg "LUA/Maxima3.lua" "log-to-i" 4)