Ejemplo n.º 1
0
def test():
    '''constructs and displays all products of two objects'''
    D = Diagram()
    X = Object(D,"X")
    Y = Object(D,"Y")
    f1 = Morphism(X,Y,"f1")
    f1.name="f1"
    f1.latex=r"\phi"

    rule=ExistProduct
    homs=HomomorphismIterator(rule.CD,D)
    ers=[]
    for hom in homs:
        ers.append(ExtensionRequest(rule,hom))
    for ER in ers:
        ER.implement()
    
    
    return D