David Harvey <[EMAIL PROTECTED]> writes:

> On May 27, 2007, at 2:21 PM, Michel wrote:
>
>>> And I assume if you have a fraction a/b, where the system has
>>> remembered some factorisation information about b, then if you compute
>>> 1/(a/b) it throws that information away?
>>>
>> No it does not throw that information away. Internally elements of the
>> ring
>> are stored in "factored" form r_1^{e_1}...r_n^{e_n} (with a lazily
>> evaluated
>> cached product). This
>> information is preserved under "mulltiplicative" operations.
>> (multiplication, division, (mock)gcd, (mock)lcm). It is destroyed
>> under additive operations.
>
> Ah I see. That is quite interesting.
>
> Well I have another idea, I'm not sure to what extent this is already 
> implemented in your factor_cache.pyx, or to what extent it even makes 
> sense. (I haven't actually looked at your code yet.)
>
> It sounds like this factor caching thing actually has nothing to do 
> with fraction fields as such. Rather it sounds like one could implement 
> a wrapper around a generic ring which remembers factorisations of 
> elements. I'm imagining something like
>
> R = some ring
> S = FactorCache(R)

I vote +1 to this idea, because it is more modular.  Does this idea
only make sense over division rings?  Because it is sometimes nice to
do integer arithmetic and have everything factored, as well.

I will referee such a patch, if needed.

Nick

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to