Cadabra
a field-theory motivated approach to computer algebra

Accent

Turn a symbol into an accent.
Turns a symbol into an accent. Accented objects inherit all properties and indices from the objects which they wrap. Here is an example with inherited coordinate dependence,
\hat{#}::Accent; \partial{#}::PartialDerivative; A::Depends(\partial{#}, \hat{#}); ex:=\partial(A \hat{A} B);
\(\displaystyle{}\text{Attached property Accent to }\widehat{\#}.\)
\(\displaystyle{}\text{Attached property PartialDerivative to }\partial{\#}.\)
\(\displaystyle{}\text{Attached property Depends to }A.\)
\(\displaystyle{}\partial\left(A \widehat{A} B\right)\)
product_rule(_);
\(\displaystyle{}\partial{A} \widehat{A} B+A \partial\left(\widehat{A}\right) B+A \widehat{A} \partial{B}\)
unwrap(_, $\partial{#}$);
\(\displaystyle{}\partial{A} \widehat{A} B+A \partial\left(\widehat{A}\right) B+A \widehat{A} \partial{B}\)
Copyright © 2001-2024 Kasper Peeters
Questions? info@cadabra.science