DMUG-Archiv 2025

Frühere   Chronologischer Index   Spätere
Vorherige   Thematischer Index   Nächste

Re: [Dmug] Kommutatoranwendung unter NonCommutativeMultiply vs. TensorProduct

Liebe Freundinnen und Freunde der Ersetzung in nichtkommutativen Algebren,

obwohl das TensorProduct als Multiplikation einer nichtkommutativen Algebra festgesetzt werden kann,

In[5]:= Clear[alg]
alg = NonCommutativeAlgebra[<|"Multiplication" -> TensorProduct|>]

Out[6]= NonCommutativeAlgebra[<|"Multiplication" -> TensorProduct,
  "Addition" -> Plus, "Unity" -> 1, "Zero" -> 0,
  "CommutativeVariables" -> {}, "ScalarVariables" -> {}|>]

wird nach einer einmaligen Ersetzung

In[3]:= z\[TensorProduct]w /.
 a___\[TensorProduct]z_\[TensorProduct]w_\[TensorProduct]b___ ->
  a\[TensorProduct](w\[TensorProduct]z - I)\[TensorProduct]b

Out[3]= -I + w\[TensorProduct]z

die Nichtkommutativität ignoriert

In[4]:= ReplaceRepeated[-I + w\[TensorProduct]z,
 a___\[TensorProduct]z_\[TensorProduct]w_\[TensorProduct]b___ ->
  a\[TensorProduct](w\[TensorProduct]z - I)\[TensorProduct]b,
 MaxIterations -> 666]

During evaluation of In[4]:= ReplaceRepeated::rrlim: Exiting after -I+w\[TensorProduct]z scanned 666 times.

Out[4]= -667 I + w\[TensorProduct]z

Nach einem ersten "Scan" sollte feststehen, dass hier nichts weiter zu tun ist. Dazu braucht es Verbatim[]


In[8]:= ReplaceRepeated[-I + w\[TensorProduct]z,
 a___\[TensorProduct]Verbatim[
    z_\[TensorProduct]w_]\[TensorProduct]b___ ->
  a\[TensorProduct](w\[TensorProduct]z - I)\[TensorProduct]b,
 MaxIterations -> 666]

Out[8]= -I + w\[TensorProduct]z

Grüsse

Udo.



On 8/26/2025 5:58 PM, Susanne & Udo Krause via demug wrote:
Liebe Freundinnen und Freunde der Kommutatoranwendung,


In[124]:=  z ** z ** w /. a___ ** z_ ** w_ ** b___ -> a ** (w ** z - I) ** b
Out[124]= (-I + z ** z) ** w

Das ist m.E. falsch, man erwartet z ** (-I+ w ** z)

Wählt man als Operation das TensorProduct, dann sieht Mathematica das ebenso:


In[125]:=
z\[TensorProduct]z\[TensorProduct]w /.
 a___\[TensorProduct]z\[TensorProduct]w\[TensorProduct]b___ ->
  a\[TensorProduct](w\[TensorProduct]z - I)\[TensorProduct]b

Out[125]= z\[TensorProduct](-I + w\[TensorProduct]z)

In[126]:= $Version
Out[126]= "14.3.0 for Microsoft Windows (64-bit) (July 8, 2025)"


Mit den besten Grüssen

Udo.


P.S.: Was bedeutet dieser Ausdruck?


In[127]:= z ** z ** w /. a___ ** z_ ** w_ -> a ** (w ** z - I)
Out[127]= NonCommutativeMultiply[-I + z ** w ** z]

_______________________________________________
DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch
http://www.mathematica.ch/mailman/listinfo/demug
Archiv: http://www.mathematica.ch/archiv.html
_______________________________________________
DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch
http://www.mathematica.ch/mailman/listinfo/demug
Archiv: http://www.mathematica.ch/archiv.html

Verweise:
Frühere   Chronologischer Index   Spätere
Vorherige   Thematischer Index   Nächste

DMUG DMUG-Archiv, http://www.mathematica.ch/archiv.html