I want to express the following function:
$z^{(1)}=w^{(1)}a^{(0)}+b^{(1)}$
I have read in Mathematica documentation that Symbolize can be used to define variables with superscripts. I would like to define a function that uses $w^{(1)}$, $a^{(0)}$ and $b^{(1)}$ as dependent variables.
This is what I have tried:
<< Notation`
Symbolize[NotationTemplateTag[z^(1)]]
Symbolize[NotationTemplateTag[w^(1)]]
Symbolize[NotationTemplateTag[a^(0)]]
Symbolize[NotationTemplateTag[a^(1)]]
Symbolize[NotationTemplateTag[b^(1)]]
And then I try to define the variable as:
(z^(1))[w^(1)_, a^(0)_, b^(1)_] := w^(1) a^(0) + b^(1)
but I get $Failed.
Is it possible to define a function named with a superscript and having as dependent variables symbols with superscripts? I so, what is not properly done above?


z^(1)is interpreted asPower[z,1]and simplifying tozautomatically. You could tryTraceandFullForm. – mikado Sep 03 '22 at 11:35z[1]instead. – MarcoB Sep 03 '22 at 15:02$Failed. Using the Notations pallete to create theSymbolize[]command, I achieved this: https://i.stack.imgur.com/OnwNr.png -- It seems key here to usesymbol : Blank[]instead ofsymbol_. I guess the latter is not parsed correctly whensymbolis a box structure that is supposed to be symbolized. – Michael E2 Sep 03 '22 at 15:19Symbolize[...]code fails each of the four times. – Michael E2 Sep 03 '22 at 15:46