a field theory motivated approach to computer algebra

# Derivative

Declare an operator to satisfy the Leibnitz rule.
This property representes an generic derivative object, satisfying the Leibnitz rule. These generic derivatives do not have to commute
D{#}::Derivative; ex:= D(A B C); product_rule(_);
$$\displaystyle{}\text{Attached property Derivative to }D(\#).$$
$$\displaystyle{}D(A B C)$$
$$\displaystyle{}D(A) B C+A D(B) C+A B D(C)$$
Refer to the documentation of PartialDerivative on how to write derivatives with respect to coordinate indices or coordinates.
Make sure to declare the derivative either using the "with any arguments" notation as used above (using the hash mark), or by giving an appropriate pattern. The following does not work:
D::Derivative; ex:=D(A B C); product_rule(_);
$$\displaystyle{}\text{Attached property Derivative to }D.$$
$$\displaystyle{}D(A B C)$$
$$\displaystyle{}D(A B C)$$
The pattern D above does not match the expression D(A B C) and hence the algorithm does not know that D(A B C) is a derivative acting on the product of three objects.