# Revision history [back]

### How do I define a homomorphism of a graded commutative algebra?

Why does the following throw a TypeError: images do not define a valid homomorphism?

E = GradedCommutativeAlgebra(QQ,'x,y',degrees=(1,1))
E.inject_variables()
f = E.hom([x,y])


I expected it to define $f$ to be the identity homomorphism of $E$. What is the right way to define a homomorphism of $E$? I'm more interested in the one that switches $x$ and $y$ than the identity homomorphism, but this seemed a more obvious version of the question.

 2 retagged slelievre 16999 ●21 ●151 ●335 http://carva.org/samue...

### How do I define a homomorphism of a graded commutative algebra?

Why does the following throw a TypeError: images do not define a valid homomorphism?

E = GradedCommutativeAlgebra(QQ,'x,y',degrees=(1,1))
E.inject_variables()
f = E.hom([x,y])


I expected it to define $f$ to be the identity homomorphism of $E$. What is the right way to define a homomorphism of $E$? I'm more interested in the one that switches $x$ and $y$ than the identity homomorphism, but this seemed a more obvious version of the question.

 3 retagged tmonteil 27203 ●31 ●198 ●511 http://wiki.sagemath.o...

### How do I define a homomorphism of a graded commutative algebra?

Why does the following throw a TypeError: images do not define a valid homomorphism?

E = GradedCommutativeAlgebra(QQ,'x,y',degrees=(1,1))
E.inject_variables()
f = E.hom([x,y])


I expected it to define $f$ to be the identity homomorphism of $E$. What is the right way to define a homomorphism of $E$? I'm more interested in the one that switches $x$ and $y$ than the identity homomorphism, but this seemed a more obvious version of the question.