dot INDEX

. _ _ _ DOT _ _ _ _ _ _ _ _ _ _ _ _ operator

The . (dot) infix binary operator adds a new item to the beginning of an existing list. In high energy physics expressions, it can also be used to represent the scalar product of two Lorentz four-vectors.

syntax:

<item> . <list>

<item> can be any REDUCE scalar expression, including a list; <list> must be a list to avoid producing an error message. The dot operator is right associative.

examples:



liss := a . {}; 

  LISS := {A} 


liss := b . liss; 

  LISS := {B,A} 


newliss := liss . liss; 

  NEWLISS := {{B,A},B,A} 


firstlis := a . b . {c}; 

  FIRSTLIS := {A,B,C} 


secondlis := x . y . {z}; 

  SECONDLIS := {X,Y,Z} 


for i := 1:3 sum part(firstlis,i)*part(secondlis,i);
 


  A*X + B*Y + C*Z