Naming variables with same number of subscripts I have a very stupid question.
I am writing a LaTeX document with a complex mathematical model and I'm running out of letters and symbols. I also don't want to keep adding more and more \hat{}'s and \tilde{}'s if it's unnecessary, as those also have other meanings in my model.
I want different sets of objects that have subscripts belonging to different sets to have the same name and number of subscripts; but I don't want there to be any confusion.
Suppose my original variable is $X_{a,b} \quad\forall a\in A,b \in B$, and I define $X_a = \sum_{b \in B}X_{a,b} \quad\forall a\in A$, and $X_b = \sum_{a \in A}X_{a,b} \quad\forall b \in B$.
Now we know $X_{a,b}$ is quite different from $X_a$ and also from $X_b$ because the number of subscripts is different. But what about $X_a$ from $X_b$? Can we know they are different because the subscript is $a \in A$ versus $b \in B$? Or do I need to explicitly qualify them as being different by having something like $\hat{X}_a$ and $\tilde{X}_b$ or $X_a^{(A)}$ and $X_b^{(B)}$?
At the end of the day, $A$ and $B$ are just numbers - so even though conceptually they are very different objects, they still end up just been integer subscripts of $X$.
I could say $X_c$ or $X_1$ and then I wouldn't know which $X$ I'm talking about unless I explicitly qualify $c \in A$ or $c \in B$, and I would need to replace $X_1$ with $X_{B_1}$, for example.

If the variable is $internal$, then you can name it anything you want.
An example is $b$ in
"$X_a = \sum_{b \in B}X_{a,b} \quad\forall a\in A$".
As for the number of subscripts problem,
usually $X_a$ will have some relation to
$X_{a, b}$, but it doesn't have to
as far as I am concerned.
The fact that the number of subscripts is different
means, to me, that the objects are of different type.
As to your having to distinguish
"$X_a = \sum_{b \in B}X_{a,b} \quad\forall a\in A$"
and
"$X_b = \sum_{a \in A}X_{a,b} \quad\forall b \in B$",
I would have an indication as to which subscript
is constant,
so that I would write, for example,
"$X_a^{(1)}$" and "$X_b^{(2)}$"
or "$_{1}X_a$" and "$_2X_b$".
