On Tue, May 18, 2010 at 8:27 AM, jvkersch <joris.vankerscha...@gmail.com> wrote: > Dear all, > > I would like to follow up on my differential forms class query (http:// > groups.google.be/group/sage-devel/browse_thread/thread/ > 2feef1f0be557585/75173b6c6f52450d) with a question about Sage > programming/invoking style. > > If R^n has coordinates x, y, ... (or whatever), then the algebra of > differential forms is generated by the differentials dx, dy, ... (the > differentials of each of the coordinate functions). So there's a one- > to-one correspondence between generators and coordinates on the > underlying space. Is it allowable programming practice to implement > the DifferentialForms class so that the following construction becomes > possible: > > sage: F.<x, y, z> = DifferentialForms() > sage: F.gens() >>>>> (dx, dy, dz) > > but also > sage: x in F.gens() >>>>> False > > That is, should the names between <> be exactly the generators > themselves, rather than something which can be made into a generator > in a non-canonical way? > > I am not entirely comfortable with this approach, but in this way I > avoid having to check whether the names, number, ... of generators are > correct, since ParentWithBase.__init__ takes care of that.
I'm definitely not comfortable with this; it seems like a recipe for confusion. I have to admit that I don't at all understand your argument for this. -- William -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org