expression
.derivation(
label
,
breaking
=False)
Compute the derivation of a weighted expression.
Arguments:
label
: the (non empty) string to derive the expression with.breaking
: whether to split the result.
See also:
References:
lombardy.2005.tcs defines the derivation
angrand.2010.jalc defines the breaking derivation
Examples
The following function will prove handy: it takes a rational expression and a list of strings, and returns a aligned
environment to display nicely the result.
Classical expressions
In the classical case (labels are letters, and weights are Boolean), this is the construct as described by Antimirov.
Or, using the diffs
function we defined above:
Weighted Expressions
Of course, expressions can be weighted.
And this is tightly connected with the construction of the derived-term automaton.
Multitape expressions
It is possible to compute the derivatives of a multitape expression.
The following expressions corresponds to the second state of the above automaton (reached from the initial state via ).
Breaking derivation
The "breaking" derivation "splits" the polynomial at the end.
Again, this is tightly connected with both flavors of the derived-term automaton.