# usage of canonicalise

+1 vote

Hi,
this is my code

{\mu,\nu}::Indices(vector).
f^{\mu?\nu?}::AntiSymmetric.
h^{\mu?\nu?}::Symmetric.
{u^{\mu?},f^{\mu?\nu?},h^{\mu?\nu?}}::NonCommuting.
ex:=u^{\mu}u^{\nu}f^{\nu\mu}+f^{\mu\nu}h^{\mu\nu};
canonicalise(_);


the result is $0$, it's wrong. How to get the correct result?(i.e. $-u^{\mu}u^{\nu}f^{\mu\nu}$)

edited

The NonCommuting property only relates different objects; your line says that $u^{\mu}$ does not commute with $f^{\mu\nu}$, but it says nothing about how $u^{\mu}$ commutes with $u^{\nu}$. To impose what you want, use SelfNonCommuting, as in:

{\mu,\nu}::Indices(vector).
f^{\mu\nu}::AntiSymmetric.
h^{\mu\nu}::Symmetric.
u^{\mu}::SelfNonCommuting.
ex:=u^{\mu}u^{\nu}f^{\nu\mu}+f^{\mu\nu}h^{\mu\nu};
canonicalise(_);


which then gives $-u^{\mu} u^{\nu} f^{\mu\nu}$.

(I have taken the liberty of removing the question marks on the indices (you don't need them)).
{"ft_lang_label":"__label__en","ft_lang_prob":0.82962954,"math_prob":0.9969192,"size":560,"snap":"2020-24-2020-29","text_gpt3_token_len":199,"char_repetition_ratio":0.16366906,"word_repetition_ratio":0.0,"special_character_ratio":0.3267857,"punctuation_ratio":0.19512194,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9997553,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-06-04T18:55:43Z\",\"WARC-Record-ID\":\"<urn:uuid:372ab1c8-9fbc-4f6b-ae7f-e728249f0cd5>\",\"Content-Length\":\"20107\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3449bbf2-e39e-4c64-b8cb-88ba6129d12b>\",\"WARC-Concurrent-To\":\"<urn:uuid:578711c8-a341-4836-8793-2267e6729148>\",\"WARC-IP-Address\":\"78.31.107.13\",\"WARC-Target-URI\":\"https://cadabra.science/qa/1368/usage-of-canonicalise?show=1372\",\"WARC-Payload-Digest\":\"sha1:FVB4BRV6GWPCWH6ETJ6A3Z4HJZCEZYQD\",\"WARC-Block-Digest\":\"sha1:KWXHXZXPYAIRMQTXZTOSWGYKRDKAA5NZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-24/CC-MAIN-2020-24_segments_1590347445880.79_warc_CC-MAIN-20200604161214-20200604191214-00056.warc.gz\"}"}