On Sun, Sep 14, 2008 at 1:25 PM, Justin Walker <[EMAIL PROTECTED]> wrote: > > Hi, all, > > I'm looking at the patches John mentioned in another thread > (<http://groups.google.com/group/sage-devel/browse_thread/thread/9d7eafe3d36f0d27 > >). A couple of comments: > > 1) I'm removing Pari/Magma usage from the code > 2) There is now some support for negative definite (using a new > method to provide matrix action on forms; see below [1]) and > indefinite forms > 3) John thinks that self.reduce() should actually modify > 'self'; is everyone agreed on that? See below [2] > > [1] The method takes a matrix, V, and returns a BQF that looks like > self(V.[x,y]^t) > An alternate version would be to return > (det V) self(V.[x,y]^t) > which is what Buchmann/Vollmer used to define the form "f.V", > given f and V. I tend to like the latter, but the former is > more general (though maybe not more generally useful). > > [2] I fussed over this while working on my patch, and finally decided > to leave it alone. Is there any cause to be concerned about > caching, > by code using the BQF code? It might be disconcerting to find > things > changing under you. I may have missed discussion on the lists > about > this; apologies if this has been kneaded to a tough consistency. >
Make damn sure that the __hash__ method is *not* implemented if quadratic forms are mutable. Otherwise, bad things will happen. Otherwise, it's just a design choice. E.g., mutable matrices are certainly useful, but mutable polynomials usually aren't so we don't (officially) have them (though there is an _underscore method to mutate even a polynomial). I personally would tend to vote to have a method "reduced" that returns the reduced version of the quadratic form. I usually prefer for elements to be immutable whenever possible... William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---