OpenMaple/Python/Set - Maple Help

Set

Python representation of a Maple set

Description

 • The maple.Set class represents Maple objects of type set.

Method Summary

 • maple.Set inherits all the methods defined on Indexable objects.
 • It implements the collections.abc.Set base abstract class from the collections.abc module.
 • The following methods are defined on any Set object and invoke the specified implementation in Maple.

 Method name Usage Maple implementation __and__ x and y Intersection of x and y __le__ x <= y True if x is equal to or a subset of y __lt__ x < y True when x is a strict subset of y __ge__ x >= y True when x is equal to or a superset of y __gt__ x > y True when x is a strict superset of y __or__ x or y Union of x and y __sub__ x sub y Set difference of x and y __xor__ x or y Symmetric difference of of x and y isdisjoint isdisjoint(x,y) True when x and y are disjoint

Superclass

 •
 Examples import maple import maple.namespace as mpl S1 = mpl.numtheory.factorset( 139251547900201528249393594099433821579 ) S2 = mpl.numtheory.factorset( 164080939008352296076940100530587494269 ) S2.isdisjoint(S1)