Ask Your Question

Revision history [back]

Was given the following (tweaked) solution using lambda functions on sage-support:

X=Poset({1:[],2:[1]})
Hom(X,X)(lambda x:{1:1,2:2}[x])