On Wednesday, November 22, 2006 4:35 AM Frederic Lehobey wrote: > > I believe I am starting to be slightly off-topic for axiom-legal > with this message, so I think it will be my last contribution to > this thread.
Ok. I want to reply to one technical point so I will shift to axiom-developer. > ... > > > What I mean is being able to create domains in compiled code with > > > variables in their parameters (not change the value of the variable > > > after instantiation). With this much of the Galois field factorisation > > > of Axiom would be much easier to write *and maintain* (currently, > > > it is a kind of hack using the integers and contradicting the > > > grounding principles of Axiom). > > > > I think you could expect a lot of help on this from Ralf Hemmecke > > and Martin Rubey. I am not entirely sure what you mean by "variables > > that do not change value after instantiation". I think this is the > > definition of a constant. So what you want to do should be possible. > > Let's be specific: > > PrimeField(7) > > and > > PrimeField(p) > > both work in interpreted mode whereas the second one is not compiled > by the old compiler (it has already been discussed some time -- years > -- ago on axiom-dev). > Are you referring to the discussion of dependent types in Aldor function definitions such as g(p:PositiveInteger,k:Integer):PrimeField(p) == k::PrimeField(p) This looks innocent and "natural" in Aldor, and in the Axiom interpreter but William Sit and Ralf Hemmecke showed that in fact this is not really a function definition in the sense of category theory at all but rather a functor (i.e. package or domain constructor). See: http://lists.nongnu.org/archive/html/axiom-developer/2005-01/msg00207.ht ml http://lists.nongnu.org/archive/html/axiom-developer/2005-01/msg00310.ht ml In the Axiom/SPAD compiler you can write such a functor as g(p:PositiveInteger, k:Integer):with point:()->PrimeField(p) == add point()==k::PrimeField(p) The function 'point' is necessary because a functor returns something of type category. The parameters pick out a particular function from the category. E.g. point()$g(7,4) > ... >From my point of view this is technically more correct than Aldor's syntax. Regards, Bill Page. _______________________________________________ Axiom-developer mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-developer
