HI Nicolas, > Hmm. I would need to better know the mathematics behind to give any > useful answer. My (little) understanding was that the main point of > the Zumbroich basis was to avoid such dependencies.
see my answer above. > > 1. if I want to use the category Fields as well, I get the following > > TypeError: > > > TypeError: metaclass conflict: the metaclass of a derived class > > must be a (non-strict) subclass of the metaclasses of all its bases > > Please send me the smallest piece of code that triggers this, for me > to investigate. class FieldAndFreeModule(CombinatorialFreeModule): def __init__(self): CombinatorialFreeModule.__init__(self, QQ, ['a'], category=Fields) causes already the error. > > 3. the __div__ method in the Element class seem to explain how > > division by coefficients should work, not how basis elements interact, > > right? > > As far as I know, it should handle the division of two general > elements of the field. By the way, maybe it is sufficient to just > implement __invert__. Maybe, but the category Fields did not work yet. As the UCF is only a CombinatorialFreeModule, I get sage: F = UniversalCyclotomicField() sage: F.Element.__div__? ... Division by coefficients and __invert__ is not yet there. > > 4. the embedding into CC does not yet work: in the constructor, I > > define the following module_morphism: > > def on_basis( x ): > > return (2 * CLF.pi() * CLF.gen() * x[1] /x[0]).exp() > > > g = self.module_morphism( on_basis=on_basis, codomain=CLF ) > > self.register_embedding( g ) > > > but this morphism returns an error: > > sage: F = UniversalCyclotomicField() > > sage: CC( E(6) ) > > TypeError: unsupported operand parent(s) for '+': 'Complex Lazy > > Field' and '<type 'NoneType'>' > > Probably just a glitch. I would need to run the code to debug. The code should be on the track server, ticket 8327. > Infinite families indeed don't have a __contains__ by default. In that > case, it would be possible in principle to define one, by checking > that the element is in the field, and has a single term. In practice, > this would require using special families for basis of vector spaces. > How useful a feature would this be? I thought that, having a vector space with a concrete basis, it would be natural to be able to check if some object I have is in the basis. In our case, to check if some pair (n,k) is in the ZumbroichBasis(n,1) without reconstructing it. I will find a workaround for that... Thanks and best_2, Christian -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.