#19397: Add support for homogeneous components of a filtered module
-------------------------------------+-------------------------------------
Reporter: tscrim | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: categories | Resolution:
Keywords: | Merged in:
Authors: Travis Scrimshaw | Reviewers: John Palmieri
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/categories/homogeneous_components-19397|
05196437ca8197300162043ae0949c47bb6083ef
Dependencies: #17096 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by tscrim):
Replying to [comment:37 jhpalmieri]:
> Replying to [comment:35 tscrim]:
> > This will definitely do as a workaround. We should add an additional
check to make sure `self._indices` is finite and raise an error if not,
otherwise the fallback for `homogeneous_component_basis` will run forever.
>
> I guess I don't know the best way to go about this. If there is no
`subset` method (for example), then check `self._indices.is_finite()`. If
this fails, what error should we raise -- the lack of `subset` or the
failure of finiteness? Or just a general error about the set of indices
not being well enough implemented? We can break things down into lots of
cases, but that seems like overkill for this piece of error-checking.
I have found that calling `list` can very often catch infinite sets. So I
would do this change
{{{#!diff
-S = [i for i in self._indices if self.degree_on_basis(i) == d]
+S = [i for i in list(self._indices) if self.degree_on_basis(i) == d]
}}}
If this sounds good to you, I can do it as I also want to add a comment
saying this will be moved once MRO issues are fixed when creating a the
finite-dimensional category.
--
Ticket URL: <http://trac.sagemath.org/ticket/19397#comment:38>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.