Hello all,

Consider the following code:

from sympy import *
from sympy.physics.secondquant import KroneckerDelta
from sympy.tensor import IndexedBase, Idx
from sympy.functions import conjugate

init_printing()

Psi = Symbol('Psi_0', complex=True, real=False)
print(Psi.is_real)
print(Psi.is_complex)
print(latex(Psi * conjugate(Psi)))

Psi = IndexedBase(Symbol('Psi', complex=True, real=False))

print(Psi[0].is_real)
print(Psi[0].is_complex)
print(latex(Psi[0] * conjugate(Psi[0])))

Its output is
False
True
\Psi_{0} \overline{\Psi_{0}}
False
False
Psi[0] \overline{Psi[0]}

This raises two questions:
1) What is the proper way of setting constraints for indexed objects? 
2) How do I make indexes and symbols get pretty printed in the same way as 
for the normal symbols (i.e. using subscripts and greek letter where 
appropriate)? Do I have to write a custom printer function?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to