First time here? Check out the FAQ!
answered 2016-07-09 23:18:07 +0100
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])