I also can’t quickly find any details about what field/algebra/whatever these cover. If I make a Expression.var, what structure is it assumed to have?
Great job on this project :)
I also can’t quickly find any details about what field/algebra/whatever these cover. If I make a Expression.var, what structure is it assumed to have?
Great job on this project :)
An expression is very general. Each variable and function is commutative and should hold for the complex numbers. For functions you can set if they are symmetric, linear or antisymmetric. Non-commutativity can be emulated by adding an extra argument that determines the ordering or by giving them different names.
If you use the Polynomial class instead of Expression, you can choose the field yourself. This is especially the clear in Rust where most structures are generic over the field. For example:
MultivariatePolynomial<AlgebraicNumberRing<RationalField>>
or
UnivariatePolynomial<FiniteField<u64>>> Non-commutativity can be emulated by adding an extra argument that determines the ordering or by giving them different names.
Would you mind giving an example? (or just tell me it’s in the docs and i’ll look deeper)
f(1,...)*f(2,...)
Then when you do pattern matching with wildcards x_ and y_ you can do f(x_,...)*f(y_,..)
with the requirement that x_ < y_. This way you will know you match them in the expected order and not the other way around.