- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 684
Closed
Milestone
Description
A Polyhedron is not a Parent, so Set refuses to construct the set of its elements.
We change this by creating a new abstract base class for non-necessarily-parent sets with methods union, intersection, etc.
ConvexSet_base (from #31919) and RealSet now both inherit from Set_base.  To complete the implementation of the Set_base protocol, we add an implementation of RealSet.symmetric_difference.
So we can now do the following things:
sage: Set(polytopes.cube())                                                                                                                                                                          
Set of elements of A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 8 vertices
sage: polytopes.cube().union(polytopes.tetrahedron())                                                                                                                                                
Set-theoretic union of Set of elements of A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 8 vertices and Set of elements of A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 4 vertices
Depends on #30473
Component: geometry
Author: Matthias Koeppe
Branch/Commit: fff2a79
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/32013