Discussion Overview
The discussion focuses on how to preserve the order of variables in Mathematica, particularly when defining functions that involve symbolic multiplication. Participants explore various methods to achieve this while maintaining the symbolic nature of the expressions.
Discussion Character
- Technical explanation
- Exploratory
- Debate/contested
Main Points Raised
- One participant asks if there is a way to set Mathematica to preserve the order of variables in expressions, providing an example where the output does not meet their expectations.
- Another participant suggests using NonCommutativeMultiply as a potential solution, noting that it may require additional definitions to work correctly.
- A different participant describes their need to handle a variety of mathematical objects (matrices, vectors, scalars, tensors) while keeping the output symbolic and avoiding simplifications that Mathematica might apply.
- One participant proposes a function, ExpandNCM, to facilitate distributivity while preserving order, providing an example of its use.
- Another participant mentions the possibility of using ClearAttributes[Times, Orderless] but expresses doubt about its effectiveness due to unpredictable behavior of the Orderless attribute.
Areas of Agreement / Disagreement
Participants express a range of approaches to the problem, with no consensus on a single best solution. Multiple competing methods are discussed, indicating ongoing exploration and debate.
Contextual Notes
Participants mention the need for symbolic representation and the challenges posed by Mathematica's simplification processes. There are references to specific mathematical structures that may complicate the preservation of order.
Who May Find This Useful
This discussion may be useful for Mathematica users dealing with symbolic mathematics who need to maintain the order of variables in their expressions, particularly in contexts involving noncommutative operations.