I am trying to use subscripted variables as symbols and provide assumptions elegantly for them, e.g. in order to simplify logs, I'd like to have
Simplify[ Log[Subscript[x,1]^2] - Log[Subscript[x,2]^2], Assumptions -> Subscript[x,_] > 0]
be simplified to
Log[Subscript[x,1]^2 / Subscript[x,2]^2]
I am aware of the Notation package, but symbolizing any subscripted variable prevents me from pattern matching variable names. I am as well aware of the fact, that this is an incarnation of the same old story of "Don't put data in your variable names".
Apart from that it makes the output hard to read, I couldn't get
Simplify[Log[y[1]^2] - Log[y[2]^2], Assumptions -> y[_] > 0]
to make the desired simplification, either. Hence, putting the subscript as an extra parameter of a "function" fails as well.
What would be the elegant and formally correct way to implement the desired behaviour without enumerating the different variables as x1, x2, ... and having to explicitly state the assumption for every single variable in the game?
Scope: I have a whole lot of different masses in my calculation, hence I wanted to keep track of them by using subscripts. In the end, I'd like to give certain linear combinations of fundamental masses special names and have logarithms like the ones above simplified.
Thank you very much in advance!
Best Ben
Simplify[Log[Subscript[x, 1]^2] + Log[Subscript[x, 2]^2], Table[Subscript[x, k] > 0, {k, 2}]]
wouldn't be useful, then? $\endgroup$