Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Exponential in Clifford algebra

Hello, I am trying to take the exponential of A+B*i in Clifford algebra (isomorphic to the complex numbers) .

Code is:

sage: R.<A,B> = PolynomialRing(ZZ);
sage: Q = QuadraticForm(R,1,[1]);
sage: Cl.<i> = CliffordAlgebra(Q);
sage: exp(A+B*i)

and produces this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6714)()
    572             try:
--> 573                 args = [SR.coerce(a) for a in args]
    574             except TypeError as err:

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:11014)()
   1176 
-> 1177     cpdef coerce(self, x):
   1178         """

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:10940)()
   1206                     _record_exception()
-> 1207             raise TypeError(_LazyString(_lazy_format, ("no canonical coercion from %s to %s", parent(x), self), {}))
   1208         else:

TypeError: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/all_cmdline.py in <module>
----> 1 exp(A+B*i)

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:12834)()
   1177             res = self._evalf_try_(*args)
   1178             if res is None:
-> 1179                 res = super(BuiltinFunction, self).__call__(
   1180                         *args, coerce=coerce, hold=hold)
   1181 

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6876)()
    584                     if callable(method):
    585                         return method()
--> 586                 raise TypeError("cannot coerce arguments: %s" % (err))
    587 
    588         else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

Exponential in Clifford algebra

Hello, I am trying to take the exponential of A+B*i in Clifford algebra (isomorphic to the complex numbers) .

Code is:

sage: R.<A,B> = PolynomialRing(ZZ);
sage: Q = QuadraticForm(R,1,[1]);
sage: Cl.<i> = CliffordAlgebra(Q);
sage: exp(A+B*i)
exp(A+B*i)exp(A-B*i)

and I would expect it to output exp(2A), but it produces this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6714)()
    572             try:
--> 573                 args = [SR.coerce(a) for a in args]
    574             except TypeError as err:

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:11014)()
   1176 
-> 1177     cpdef coerce(self, x):
   1178         """

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:10940)()
   1206                     _record_exception()
-> 1207             raise TypeError(_LazyString(_lazy_format, ("no canonical coercion from %s to %s", parent(x), self), {}))
   1208         else:

TypeError: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/all_cmdline.py in <module>
----> 1 exp(A+B*i)

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:12834)()
   1177             res = self._evalf_try_(*args)
   1178             if res is None:
-> 1179                 res = super(BuiltinFunction, self).__call__(
   1180                         *args, coerce=coerce, hold=hold)
   1181 

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6876)()
    584                     if callable(method):
    585                         return method()
--> 586                 raise TypeError("cannot coerce arguments: %s" % (err))
    587 
    588         else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

Exponential in Clifford algebra

Hello, I am trying to take the exponential of A+B*i in Clifford algebra (isomorphic to the complex numbers) .

Code is:

sage: R.<A,B> = PolynomialRing(ZZ);
sage: Q = QuadraticForm(R,1,[1]);
sage: Cl.<i> = CliffordAlgebra(Q);
sage: exp(A+B*i)exp(A-B*i)
exp(A+B*i)*exp(A-B*i)

I would expect it to output exp(2A), but it produces this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6714)()
    572             try:
--> 573                 args = [SR.coerce(a) for a in args]
    574             except TypeError as err:

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:11014)()
   1176 
-> 1177     cpdef coerce(self, x):
   1178         """

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:10940)()
   1206                     _record_exception()
-> 1207             raise TypeError(_LazyString(_lazy_format, ("no canonical coercion from %s to %s", parent(x), self), {}))
   1208         else:

TypeError: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/all_cmdline.py in <module>
----> 1 exp(A+B*i)

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:12834)()
   1177             res = self._evalf_try_(*args)
   1178             if res is None:
-> 1179                 res = super(BuiltinFunction, self).__call__(
   1180                         *args, coerce=coerce, hold=hold)
   1181 

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6876)()
    584                     if callable(method):
    585                         return method()
--> 586                 raise TypeError("cannot coerce arguments: %s" % (err))
    587 
    588         else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

Exponential in Clifford algebra

Hello, I am trying to take the exponential of A+B*i in Clifford algebra (isomorphic to the complex numbers) .

Code is:

sage: R.<A,B> = PolynomialRing(ZZ);
sage: Q = QuadraticForm(R,1,[1]);
sage: Cl.<i> = CliffordAlgebra(Q);
sage: exp(A+B*i)*exp(A-B*i)

I would expect it to output exp(2A)exp(2*A), but it produces this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6714)()
    572             try:
--> 573                 args = [SR.coerce(a) for a in args]
    574             except TypeError as err:

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:11014)()
   1176 
-> 1177     cpdef coerce(self, x):
   1178         """

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:10940)()
   1206                     _record_exception()
-> 1207             raise TypeError(_LazyString(_lazy_format, ("no canonical coercion from %s to %s", parent(x), self), {}))
   1208         else:

TypeError: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/all_cmdline.py in <module>
----> 1 exp(A+B*i)

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:12834)()
   1177             res = self._evalf_try_(*args)
   1178             if res is None:
-> 1179                 res = super(BuiltinFunction, self).__call__(
   1180                         *args, coerce=coerce, hold=hold)
   1181 

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6876)()
    584                     if callable(method):
    585                         return method()
--> 586                 raise TypeError("cannot coerce arguments: %s" % (err))
    587 
    588         else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

Exponential in Clifford algebra

Hello, I am trying to take the exponential of A+B*i in Clifford algebra (isomorphic to the complex numbers) .

Code is:

sage: R.<A,B> = PolynomialRing(ZZ);
sage: Q = QuadraticForm(R,1,[1]);
QuadraticForm(R,1,[-1]);
sage: Cl.<i> = CliffordAlgebra(Q);
sage: exp(A+B*i)*exp(A-B*i)

I would expect it to output exp(2*A), but it produces this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6714)()
    572             try:
--> 573                 args = [SR.coerce(a) for a in args]
    574             except TypeError as err:

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:11014)()
   1176 
-> 1177     cpdef coerce(self, x):
   1178         """

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:10940)()
   1206                     _record_exception()
-> 1207             raise TypeError(_LazyString(_lazy_format, ("no canonical coercion from %s to %s", parent(x), self), {}))
   1208         else:

TypeError: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/all_cmdline.py in <module>
----> 1 exp(A+B*i)

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:12834)()
   1177             res = self._evalf_try_(*args)
   1178             if res is None:
-> 1179                 res = super(BuiltinFunction, self).__call__(
   1180                         *args, coerce=coerce, hold=hold)
   1181 

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6876)()
    584                     if callable(method):
    585                         return method()
--> 586                 raise TypeError("cannot coerce arguments: %s" % (err))
    587 
    588         else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

Exponential in Clifford algebra

Hello, I am trying to take the exponential of A+B*i in Clifford algebra (isomorphic to the complex numbers) .

Code is:

sage: R.<A,B> = PolynomialRing(ZZ);
sage: Q = QuadraticForm(R,1,[-1]);
sage: Cl.<i> = CliffordAlgebra(Q);
sage: exp(A+B*i)*exp(A-B*i)

I would expect it to output exp(2*A), but it produces this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6714)()
    572             try:
--> 573                 args = [SR.coerce(a) for a in args]
    574             except TypeError as err:

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:11014)()
   1176 
-> 1177     cpdef coerce(self, x):
   1178         """

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:10940)()
   1206                     _record_exception()
-> 1207             raise TypeError(_LazyString(_lazy_format, ("no canonical coercion from %s to %s", parent(x), self), {}))
   1208         else:

TypeError: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/all_cmdline.py in <module>
----> 1 exp(A+B*i)

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:12834)()
   1177             res = self._evalf_try_(*args)
   1178             if res is None:
-> 1179                 res = super(BuiltinFunction, self).__call__(
   1180                         *args, coerce=coerce, hold=hold)
   1181 

/var/tmp/sage-9.4-current/local/lib/python3.9/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6876)()
    584                     if callable(method):
    585                         return method()
--> 586                 raise TypeError("cannot coerce arguments: %s" % (err))
    587 
    588         else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from The Clifford algebra of the Quadratic form in 1 variables over Multivariate Polynomial Ring in A, B over Integer Ring with coefficients: 
[ 1 ] to Symbolic Ring