]> www.ginac.de Git - ginac.git/commitdiff
- synced to 1.0 (gammaL/R)
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 20 Nov 2002 20:44:49 +0000 (20:44 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 20 Nov 2002 20:44:49 +0000 (20:44 +0000)
- removed dirac_gamma6/7()
- renamed simplify_ncmul() to eval_ncmul(), as it should have been called from
  the beginning

18 files changed:
ginac/add.cpp
ginac/add.h
ginac/basic.cpp
ginac/basic.h
ginac/clifford.cpp
ginac/clifford.h
ginac/color.cpp
ginac/color.h
ginac/ex.h
ginac/indexed.cpp
ginac/mul.cpp
ginac/mul.h
ginac/ncmul.cpp
ginac/power.cpp
ginac/power.h
ginac/relational.cpp
ginac/relational.h
ginac/tinfos.h

index 4302c188a669daa4484a87f488f0a5f5bdc59c5b..ef41c05128aead589c68894eb933f589ab4cffe7 100644 (file)
@@ -316,7 +316,7 @@ ex add::coeff(const ex & s, int n) const
  *  x stands for a symbolic variables of type ex and c stands for such
  *  an expression that contain a plain number.
  *  - +(;c) -> c
- *  - +(x;1) -> x
+ *  - +(x;0) -> x
  *
  *  @param level cut-off in recursive evaluation */
 ex add::eval(int level) const
@@ -391,12 +391,12 @@ ex add::evalm(void) const
                return (new add(s, overall_coeff))->setflag(status_flags::dynallocated);
 }
 
-ex add::simplify_ncmul(const exvector & v) const
+ex add::eval_ncmul(const exvector & v) const
 {
        if (seq.empty())
-               return inherited::simplify_ncmul(v);
+               return inherited::eval_ncmul(v);
        else
-               return seq.begin()->rest.simplify_ncmul(v);
+               return seq.begin()->rest.eval_ncmul(v);
 }    
 
 // protected
index 032267e67bbf79ee821e58084fe5927b2e1dec20..e0f436cb9a7d30bfb0ca352b5d994033288b4cc0 100644 (file)
@@ -59,7 +59,7 @@ public:
        ex smod(const numeric &xi) const;
        numeric max_coefficient(void) const;
        exvector get_free_indices(void) const;
-       ex simplify_ncmul(const exvector & v) const;
+       ex eval_ncmul(const exvector & v) const;
 protected:
        ex derivative(const symbol & s) const;
        unsigned return_type(void) const;
index 882755f176cddc9fef5eb152f95728ccd243aca5..26db7b3470267bfeed2bbe7ac5fb1af7200df835 100644 (file)
@@ -555,7 +555,7 @@ exvector basic::get_free_indices(void) const
        return exvector(); // return an empty exvector
 }
 
-ex basic::simplify_ncmul(const exvector & v) const
+ex basic::eval_ncmul(const exvector & v) const
 {
        return simplified_ncmul(v);
 }
index d7fef59385856882a370e4f8383e67700a784e63..cd97a8352ad9437ae616451929223f8929aa4e4d 100644 (file)
@@ -131,7 +131,7 @@ protected: // functions that should be called from class ex only
        virtual bool is_equal_same_type(const basic & other) const;
        virtual bool match_same_type(const basic & other) const;
        virtual unsigned calchash(void) const;
-       virtual ex simplify_ncmul(const exvector & v) const;
+       virtual ex eval_ncmul(const exvector & v) const;
        
        // non-virtual functions in this class
 public:
index b912e42367860e9a64efb5392f79e02fb8b4d41d..078adf567bba09737b35f24d30c80803dea114fd 100644 (file)
@@ -44,6 +44,8 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(clifford, indexed)
 GINAC_IMPLEMENT_REGISTERED_CLASS(diracone, tensor)
 GINAC_IMPLEMENT_REGISTERED_CLASS(diracgamma, tensor)
 GINAC_IMPLEMENT_REGISTERED_CLASS(diracgamma5, tensor)
+GINAC_IMPLEMENT_REGISTERED_CLASS(diracgammaL, tensor)
+GINAC_IMPLEMENT_REGISTERED_CLASS(diracgammaR, tensor)
 
 //////////
 // default ctor, dtor, copy ctor, assignment operator and helpers
@@ -64,6 +66,8 @@ DEFAULT_DESTROY(clifford)
 DEFAULT_CTORS(diracone)
 DEFAULT_CTORS(diracgamma)
 DEFAULT_CTORS(diracgamma5)
+DEFAULT_CTORS(diracgammaL)
+DEFAULT_CTORS(diracgammaR)
 
 //////////
 // other constructors
@@ -117,6 +121,8 @@ DEFAULT_UNARCHIVE(clifford)
 DEFAULT_ARCHIVING(diracone)
 DEFAULT_ARCHIVING(diracgamma)
 DEFAULT_ARCHIVING(diracgamma5)
+DEFAULT_ARCHIVING(diracgammaL)
+DEFAULT_ARCHIVING(diracgammaR)
 
 //////////
 // functions overriding virtual functions from base classes
@@ -145,7 +151,9 @@ bool clifford::match_same_type(const basic & other) const
 
 void clifford::print(const print_context & c, unsigned level) const
 {
-       if (!is_a<diracgamma5>(seq[0]) && !is_a<diracgamma>(seq[0]) && !is_a<diracone>(seq[0])) {
+       if (!is_a<diracgamma5>(seq[0]) && !is_a<diracgammaL>(seq[0]) &&
+           !is_a<diracgammaR>(seq[0]) && !is_a<diracgamma>(seq[0]) &&
+           !is_a<diracone>(seq[0])) {
 
                // dirac_slash() object is printed differently
                if (is_a<print_tree>(c))
@@ -166,10 +174,14 @@ void clifford::print(const print_context & c, unsigned level) const
 DEFAULT_COMPARE(diracone)
 DEFAULT_COMPARE(diracgamma)
 DEFAULT_COMPARE(diracgamma5)
+DEFAULT_COMPARE(diracgammaL)
+DEFAULT_COMPARE(diracgammaR)
 
 DEFAULT_PRINT_LATEX(diracone, "ONE", "\\mathbb{1}")
 DEFAULT_PRINT_LATEX(diracgamma, "gamma", "\\gamma")
 DEFAULT_PRINT_LATEX(diracgamma5, "gamma5", "{\\gamma^5}")
+DEFAULT_PRINT_LATEX(diracgammaL, "gammaL", "{\\gamma_L}")
+DEFAULT_PRINT_LATEX(diracgammaR, "gammaR", "{\\gamma_R}")
 
 /** This function decomposes gamma~mu -> (1, mu) and a\ -> (a.ix, ix) */
 static void base_and_index(const ex & c, ex & b, ex & i)
@@ -180,7 +192,7 @@ static void base_and_index(const ex & c, ex & b, ex & i)
        if (is_a<diracgamma>(c.op(0))) { // proper dirac gamma object
                i = c.op(1);
                b = _ex1;
-       } else if (is_a<diracgamma5>(c.op(0))) { // gamma5
+       } else if (is_a<diracgamma5>(c.op(0)) || is_a<diracgammaL>(c.op(0)) || is_a<diracgammaR>(c.op(0))) { // gamma5/L/R
                i = _ex0;
                b = _ex1;
        } else { // slash object, generate new dummy index
@@ -273,9 +285,9 @@ bool diracgamma::contract_with(exvector::iterator self, exvector::iterator other
 }
 
 /** Perform automatic simplification on noncommutative product of clifford
- *  objects. This removes superfluous ONEs, permutes gamma5's to the front
+ *  objects. This removes superfluous ONEs, permutes gamma5/L/R's to the front
  *  and removes squares of gamma objects. */
-ex clifford::simplify_ncmul(const exvector & v) const
+ex clifford::eval_ncmul(const exvector & v) const
 {
        exvector s;
        s.reserve(v.size());
@@ -291,17 +303,67 @@ ex clifford::simplify_ncmul(const exvector & v) const
        bool something_changed = false;
        int sign = 1;
 
-       // Anticommute gamma5's to the front
+       // Anticommute gamma5/L/R's to the front
        if (s.size() >= 2) {
                exvector::iterator first = s.begin(), next_to_last = s.end() - 2;
                while (true) {
                        exvector::iterator it = next_to_last;
                        while (true) {
                                exvector::iterator it2 = it + 1;
-                               if (is_a<clifford>(*it) && is_a<clifford>(*it2) && !is_a<diracgamma5>(it->op(0)) && is_a<diracgamma5>(it2->op(0))) {
-                                       it->swap(*it2);
-                                       sign = -sign;
-                                       something_changed = true;
+                               if (is_a<clifford>(*it) && is_a<clifford>(*it2)) {
+                                       ex e1 = it->op(0), e2 = it2->op(0);
+
+                                       if (is_a<diracgamma5>(e2)) {
+
+                                               if (is_a<diracgammaL>(e1) || is_a<diracgammaR>(e1)) {
+
+                                                       // gammaL/R gamma5 -> gamma5 gammaL/R
+                                                       it->swap(*it2);
+                                                       something_changed = true;
+
+                                               } else if (!is_a<diracgamma5>(e1)) {
+
+                                                       // gamma5 gamma5 -> gamma5 gamma5 (do nothing)
+                                                       // x gamma5 -> -gamma5 x
+                                                       it->swap(*it2);
+                                                       sign = -sign;
+                                                       something_changed = true;
+                                               }
+
+                                       } else if (is_a<diracgammaL>(e2)) {
+
+                                               if (is_a<diracgammaR>(e1)) {
+
+                                                       // gammaR gammaL -> 0
+                                                       return _ex0;
+
+                                               } else if (!is_a<diracgammaL>(e1) && !is_a<diracgamma5>(e1)) {
+
+                                                       // gammaL gammaL -> gammaL gammaL (do nothing)
+                                                       // gamma5 gammaL -> gamma5 gammaL (do nothing)
+                                                       // x gammaL -> gammaR x
+                                                       it->swap(*it2);
+                                                       *it = clifford(diracgammaR(), ex_to<clifford>(*it).get_representation_label());
+                                                       something_changed = true;
+                                               }
+
+                                       } else if (is_a<diracgammaR>(e2)) {
+
+                                               if (is_a<diracgammaL>(e1)) {
+
+                                                       // gammaL gammaR -> 0
+                                                       return _ex0;
+
+                                               } else if (!is_a<diracgammaR>(e1) && !is_a<diracgamma5>(e1)) {
+
+                                                       // gammaR gammaR -> gammaR gammaR (do nothing)
+                                                       // gamma5 gammaR -> gamma5 gammaR (do nothing)
+                                                       // x gammaR -> gammaL x
+                                                       it->swap(*it2);
+                                                       *it = clifford(diracgammaL(), ex_to<clifford>(*it).get_representation_label());
+                                                       something_changed = true;
+                                               }
+                                       }
                                }
                                if (it == first)
                                        break;
@@ -321,9 +383,14 @@ ex clifford::simplify_ncmul(const exvector & v) const
                        ex & b = it[1];
                        if (!is_a<clifford>(a) || !is_a<clifford>(b))
                                continue;
-                       bool a_is_diracgamma = is_a<diracgamma>(a.op(0));
-                       bool b_is_diracgamma = is_a<diracgamma>(b.op(0));
+
+                       const ex & ag = a.op(0);
+                       const ex & bg = b.op(0);
+                       bool a_is_diracgamma = is_a<diracgamma>(ag);
+                       bool b_is_diracgamma = is_a<diracgamma>(bg);
+
                        if (a_is_diracgamma && b_is_diracgamma) {
+
                                const ex & ia = a.op(1);
                                const ex & ib = b.op(1);
                                if (ia.is_equal(ib)) { // gamma~alpha gamma~alpha -> g~alpha~alpha
@@ -331,20 +398,46 @@ ex clifford::simplify_ncmul(const exvector & v) const
                                        b = dirac_ONE(representation_label);
                                        something_changed = true;
                                }
-                       } else if (is_a<diracgamma5>(a.op(0)) && is_a<diracgamma5>(b.op(0))) {
+
+                       } else if ((is_a<diracgamma5>(ag) && is_a<diracgamma5>(bg))) {
+
                                // Remove squares of gamma5
                                a = dirac_ONE(representation_label);
                                b = dirac_ONE(representation_label);
                                something_changed = true;
-                       } else if (!a_is_diracgamma && !b_is_diracgamma) {
-                               const ex & ba = a.op(0);
-                               const ex & bb = b.op(0);
-                               if (ba.is_equal(bb)) { // a\ a\ -> a^2
-                                       varidx ix((new symbol)->setflag(status_flags::dynallocated), ex_to<idx>(a.op(1)).get_dim());
-                                       a = indexed(ba, ix) * indexed(bb, ix.toggle_variance());
-                                       b = dirac_ONE(representation_label);
-                                       something_changed = true;
-                               }
+
+                       } else if ((is_a<diracgammaL>(ag) && is_a<diracgammaL>(bg))
+                               || (is_a<diracgammaR>(ag) && is_a<diracgammaR>(bg))) {
+
+                               // Remove squares of gammaL/R
+                               b = dirac_ONE(representation_label);
+                               something_changed = true;
+
+                       } else if (is_a<diracgammaL>(ag) && is_a<diracgammaR>(bg)) {
+
+                               // gammaL and gammaR are orthogonal
+                               return _ex0;
+
+                       } else if (is_a<diracgamma5>(ag) && is_a<diracgammaL>(bg)) {
+
+                               // gamma5 gammaL -> -gammaL
+                               a = dirac_ONE(representation_label);
+                               sign = -sign;
+                               something_changed = true;
+
+                       } else if (is_a<diracgamma5>(ag) && is_a<diracgammaR>(bg)) {
+
+                               // gamma5 gammaR -> gammaR
+                               a = dirac_ONE(representation_label);
+                               something_changed = true;
+
+                       } else if (!a_is_diracgamma && !b_is_diracgamma && ag.is_equal(bg)) {
+
+                               // a\ a\ -> a^2
+                               varidx ix((new symbol)->setflag(status_flags::dynallocated), ex_to<idx>(a.op(1)).get_dim());
+                               a = indexed(ag, ix) * indexed(ag, ix.toggle_variance());
+                               b = dirac_ONE(representation_label);
+                               something_changed = true;
                        }
                }
        }
@@ -389,14 +482,14 @@ ex dirac_gamma5(unsigned char rl)
        return clifford(diracgamma5(), rl);
 }
 
-ex dirac_gamma6(unsigned char rl)
+ex dirac_gammaL(unsigned char rl)
 {
-       return clifford(diracone(), rl) + clifford(diracgamma5(), rl);
+       return clifford(diracgammaL(), rl);
 }
 
-ex dirac_gamma7(unsigned char rl)
+ex dirac_gammaR(unsigned char rl)
 {
-       return clifford(diracone(), rl) - clifford(diracgamma5(), rl);
+       return clifford(diracgammaR(), rl);
 }
 
 ex dirac_slash(const ex & e, const ex & dim, unsigned char rl)
@@ -461,9 +554,13 @@ ex dirac_trace(const ex & e, unsigned char rl, const ex & trONE)
 {
        if (is_a<clifford>(e)) {
 
-               if (ex_to<clifford>(e).get_representation_label() == rl
-                && is_a<diracone>(e.op(0)))
+               if (!ex_to<clifford>(e).get_representation_label() == rl)
+                       return _ex0;
+               const ex & g = e.op(0);
+               if (is_a<diracone>(g))
                        return trONE;
+               else if (is_a<diracgammaL>(g) || is_a<diracgammaR>(g))
+                       return trONE/2;
                else
                        return _ex0;
 
@@ -485,8 +582,11 @@ ex dirac_trace(const ex & e, unsigned char rl, const ex & trONE)
                if (!is_clifford_tinfo(e.return_type_tinfo(), rl))
                        return _ex0;
 
-               // Expand product, if necessary
-               ex e_expanded = e.expand();
+               // Substitute gammaL/R and expand product, if necessary
+               ex e_expanded = e.subs(lst(
+                       dirac_gammaL(rl) == (dirac_ONE(rl)-dirac_gamma5(rl))/2,
+                       dirac_gammaR(rl) == (dirac_ONE(rl)+dirac_gamma5(rl))/2
+               )).expand();
                if (!is_a<ncmul>(e_expanded))
                        return dirac_trace(e_expanded, rl, trONE);
 
index 2d1680c2604ea507c7a2bcd7d871337c7f1caf56..9c074f1736a669ca5082e9dd23139fa86f8abc92 100644 (file)
@@ -52,8 +52,8 @@ public:
        void print(const print_context & c, unsigned level = 0) const;
 
 protected:
+       ex eval_ncmul(const exvector & v) const;
        bool match_same_type(const basic & other) const;
-       ex simplify_ncmul(const exvector & v) const;
        ex thisexprseq(const exvector & v) const;
        ex thisexprseq(exvector * vp) const;
        unsigned return_type(void) const { return return_types::noncommutative; }
@@ -104,6 +104,30 @@ public:
 };
 
 
+/** This class represents the Dirac gammaL object which behaves like
+ *  1/2 (1-gamma5). */
+class diracgammaL : public tensor
+{
+       GINAC_DECLARE_REGISTERED_CLASS(diracgammaL, tensor)
+
+       // functions overriding virtual functions from base classes
+public:
+       void print(const print_context & c, unsigned level = 0) const;
+};
+
+
+/** This class represents the Dirac gammaL object which behaves like
+ *  1/2 (1+gamma5). */
+class diracgammaR : public tensor
+{
+       GINAC_DECLARE_REGISTERED_CLASS(diracgammaR, tensor)
+
+       // functions overriding virtual functions from base classes
+public:
+       void print(const print_context & c, unsigned level = 0) const;
+};
+
+
 // global functions
 
 /** Specialization of is_exactly_a<clifford>(obj) for clifford objects. */
@@ -131,11 +155,17 @@ ex dirac_gamma(const ex & mu, unsigned char rl = 0);
  *  @return newly constructed object */
 ex dirac_gamma5(unsigned char rl = 0);
 
-/** This returns (dirac_ONE(rl) + dirac_gamma5(rl)). */
-ex dirac_gamma6(unsigned char rl = 0);
+/** Create a Dirac gammaL object.
+ *
+ *  @param rl Representation label
+ *  @return newly constructed object */
+ex dirac_gammaL(unsigned char rl = 0);
 
-/** This returns (dirac_ONE(rl) - dirac_gamma5(rl)). */
-ex dirac_gamma7(unsigned char rl = 0);
+/** Create a Dirac gammaR object.
+ *
+ *  @param rl Representation label
+ *  @return newly constructed object */
+ex dirac_gammaR(unsigned char rl = 0);
 
 /** Create a term of the form e_mu * gamma~mu with a unique index mu.
  *
index 16f68c072ee1f41a149d67a76f2867243e6e4c60..ae14a29b11f6e4faa70dee1a7e22b6d60f4bf57d 100644 (file)
@@ -155,7 +155,7 @@ DEFAULT_PRINT(su3d, "d")
 
 /** Perform automatic simplification on noncommutative product of color
  *  objects. This removes superfluous ONEs. */
-ex color::simplify_ncmul(const exvector & v) const
+ex color::eval_ncmul(const exvector & v) const
 {
        exvector s;
        s.reserve(v.size());
index be51156dc084965c00545426dda8d61ff79e9e75..890cf407c482313dd94f5295afa46d3ad5ec8827 100644 (file)
@@ -51,8 +51,8 @@ public:
 
        // functions overriding virtual functions from base classes
 protected:
+       ex eval_ncmul(const exvector & v) const;
        bool match_same_type(const basic & other) const;
-       ex simplify_ncmul(const exvector & v) const;
        ex thisexprseq(const exvector & v) const;
        ex thisexprseq(exvector * vp) const;
        unsigned return_type(void) const { return return_types::noncommutative; }
index e84decd3f70aabf61a9d4e1d4ee42c6faa9f166e..dfab1461eb9385b116a7e22d9578fae60297d501 100644 (file)
@@ -157,7 +157,7 @@ public:
        ex antisymmetrize(const lst & l) const;
        ex symmetrize_cyclic(void) const;
        ex symmetrize_cyclic(const lst & l) const;
-       ex simplify_ncmul(const exvector & v) const { return bp->simplify_ncmul(v); }
+       ex eval_ncmul(const exvector & v) const { return bp->eval_ncmul(v); }
        ex operator[](const ex & index) const;
        ex operator[](int i) const;
        ex op(int i) const { return bp->op(i); }
index c51ec7ada64f4a7db1646ffc89441c4ad7613d03..9cc01b47b1cc04eac1fa004f09d6d2a02c0725e2 100644 (file)
@@ -743,7 +743,7 @@ contraction_done:
                                        // One of the factors became a sum or product:
                                        // re-expand expression and run again
                                        // Non-commutative products are always re-expanded to give
-                                       // simplify_ncmul() the chance to re-order and canonicalize
+                                       // eval_ncmul() the chance to re-order and canonicalize
                                        // the product
                                        ex r = (non_commutative ? ex(ncmul(v, true)) : ex(mul(v)));
                                        return simplify_indexed(r, free_indices, dummy_indices, sp);
index a56e4cf97eba870db6822d665d39e13b124de353..34f2021a3c8c91f5c01c2132ffb8db37800eb3d3 100644 (file)
@@ -469,19 +469,19 @@ ex mul::evalm(void) const
                return (new mul(s, overall_coeff))->setflag(status_flags::dynallocated);
 }
 
-ex mul::simplify_ncmul(const exvector & v) const
+ex mul::eval_ncmul(const exvector & v) const
 {
        if (seq.empty())
-               return inherited::simplify_ncmul(v);
+               return inherited::eval_ncmul(v);
 
-       // Find first noncommutative element and call its simplify_ncmul()
+       // Find first noncommutative element and call its eval_ncmul()
        epvector::const_iterator i = seq.begin(), end = seq.end();
        while (i != end) {
                if (i->rest.return_type() == return_types::noncommutative)
-                       return i->rest.simplify_ncmul(v);
+                       return i->rest.eval_ncmul(v);
                ++i;
        }
-       return inherited::simplify_ncmul(v);
+       return inherited::eval_ncmul(v);
 }
 
 // protected
index f2862dcb5c6f46a0f5508cb141786de46b43d5fc..4f2ae50032c278fc4bd0b123b9e982039ebb0e94 100644 (file)
@@ -62,9 +62,9 @@ public:
        ex smod(const numeric &xi) const;
        numeric max_coefficient(void) const;
        exvector get_free_indices(void) const;
-       ex simplify_ncmul(const exvector & v) const;
 protected:
        ex derivative(const symbol & s) const;
+       ex eval_ncmul(const exvector & v) const;
        unsigned return_type(void) const;
        unsigned return_type_tinfo(void) const;
        ex thisexpairseq(const epvector & v, const ex & oc) const;
index d6e14d7539fc7119a1a056bdf32060feb8ce27d1..308b02048593b03998e30dad3c44973db4e24750 100644 (file)
@@ -285,7 +285,7 @@ typedef std::vector<exvector> exvectorvector;
  *  - ncmul() -> 1
  *  - ncmul(...,c1,...,c2,...) -> *(c1,c2,ncmul(...))  (pull out commutative elements)
  *  - ncmul(x1,y1,x2,y2) -> *(ncmul(x1,x2),ncmul(y1,y2))  (collect elements of same type)
- *  - ncmul(x1,x2,x3,...) -> x::simplify_ncmul(x1,x2,x3,...)
+ *  - ncmul(x1,x2,x3,...) -> x::eval_ncmul(x1,x2,x3,...)
  *
  *  @param level cut-off in recursive evaluation */
 ex ncmul::eval(int level) const
@@ -413,7 +413,7 @@ ex ncmul::eval(int level) const
                
                // if all elements are of same type, simplify the string
                if (evv_num == 1)
-                       return evv[0][0].simplify_ncmul(evv[0]);
+                       return evv[0][0].eval_ncmul(evv[0]);
                
                exvector splitseq;
                splitseq.reserve(evv_num);
index e5325dd7d5115551d0183caec74f4fb0ae8e4760..a2c8c1af0e327c876955aacf26ead80eef2640f7 100644 (file)
@@ -523,9 +523,9 @@ ex power::subs(const lst & ls, const lst & lr, bool no_pattern) const
                return power(subsed_basis, subsed_exponent).basic::subs(ls, lr, no_pattern);
 }
 
-ex power::simplify_ncmul(const exvector & v) const
+ex power::eval_ncmul(const exvector & v) const
 {
-       return inherited::simplify_ncmul(v);
+       return inherited::eval_ncmul(v);
 }
 
 // protected
index 12ebf6a2aa896bedcd271c7ac865e1df977a4502..e9ca134c28e48a7efe7acdfc12ca3957c7044ec1 100644 (file)
@@ -65,9 +65,9 @@ public:
        ex normal(lst &sym_lst, lst &repl_lst, int level = 0) const;
        ex to_rational(lst &repl_lst) const;
        exvector get_free_indices(void) const;
-       ex simplify_ncmul(const exvector & v) const;
 protected:
        ex derivative(const symbol & s) const;
+       ex eval_ncmul(const exvector & v) const;
        unsigned return_type(void) const;
        unsigned return_type_tinfo(void) const;
        ex expand(unsigned options = 0) const;
index 78d0b7d44fe4e06f1c80bed2aa03cc741cac3c0e..cd109b4442135f627724e019d28905a8d761afc8 100644 (file)
@@ -184,9 +184,9 @@ ex relational::eval(int level) const
        return (new relational(lh.eval(level-1),rh.eval(level-1),o))->setflag(status_flags::dynallocated | status_flags::evaluated);
 }
 
-ex relational::simplify_ncmul(const exvector & v) const
+ex relational::eval_ncmul(const exvector & v) const
 {
-       return lh.simplify_ncmul(v);
+       return lh.eval_ncmul(v);
 }
 
 // protected
index 0062a753832be9cc13edccaa79b22f1f0917713f..a1e6b8c278e37db2bbdf948013db7ce9b864345f 100644 (file)
@@ -57,9 +57,9 @@ public:
        unsigned nops() const;
        ex & let_op(int i);
        ex eval(int level=0) const;
-       ex simplify_ncmul(const exvector & v) const;
 
 protected:
+       ex eval_ncmul(const exvector & v) const;
        bool match_same_type(const basic & other) const;
        unsigned return_type(void) const;
        unsigned return_type_tinfo(void) const;
index 03b7315e0a2eab78ba4ab9a02062167015e9d004..657a1cd7a5bd16cbb875d1e331f706adaf3ec01f 100644 (file)
@@ -82,6 +82,8 @@ const unsigned TINFO_su3d          = 0x000e100bU;
 const unsigned TINFO_diracone      = 0x000e100cU;
 const unsigned TINFO_diracgamma    = 0x000e100dU;
 const unsigned TINFO_diracgamma5   = 0x000e100eU;
+const unsigned TINFO_diracgammaL   = 0x000e100fU;
+const unsigned TINFO_diracgammaR   = 0x000e1010U;
 
 const unsigned TINFO_wildcard      = 0x000f0001U;