I've define the action of the exterior derivative on the non-Abelian
connection,

class nAform(object):
    def __init__(self, a, b):
        self._form = a
        self._matrix = b

    def __add__(self, other):
        if isinstance(other, nAform):
            if (self._matrix == other._matrix):
                return nAform(self._form + other._form, self._matrix)
            else:
                raise NotImplemented
        raise NotImplemented

    def __mul__(self, other):
        if isinstance(other, nAform):
            return nAform(self._form.wedge(other._form),
self._matrix.commutator(other._matrix))
        raise NotImplemented

    def diff(self):
        return nAform(self._form.diff(), self._matrix)

    def __repr__(self):
        return str((self._form, self._matrix))

    def __str__(self):
        return self.__repr__()

* TODO:
** Define the sum for forms with values in different elements of the
algebra.
** Define the product of the forms by a number (or function)

Cheers

 DOX

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to