[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [Axiom-developer] [DynamicFunctionDomains] (new)

**From**: |
Bill Page |

**Subject**: |
[Axiom-developer] [DynamicFunctionDomains] (new) |

**Date**: |
Wed, 12 Jan 2005 14:00:26 -0600 |

On Wednesday, January 12, 2005 12:00 PM you wrote:
Ralf Hemmecke wrote:
Well, I haven't checked whether it should really work, but
shouldn't be::
Foo: with {
g: (n: PositiveInteger, k: PositiveInteger) ->
(P: PrimeFieldCategory, x: P)
} == add {
g(n: PositiveInteger, k: PositiveInteger ):
(P: PrimeFieldCategory, x:P) == {
(PrimeField(n), k::Integer::PrimeField(n)
}
}
be even better?
Later William Sit wrote:
In fact you just pointed a way to solve the problem! Notice
that you are in effect constructing a domain! So first create
this domain (call this anything else you like)
\begin{axiom}
)abbrev domain PPF PointedPrimeField
--%PointedPrimeField
PointedPrimeField(n:PositiveInteger):Cat==Dog where
Cat == FiniteFieldCategory with
foo:PositiveInteger->PrimeField(n)
Dog == PrimeField(n) add
foo(k)==k::Integer::PrimeField(n)
\end{axiom}
After compiling, define in the interpreter
\begin{axiom}
g(n,k)==foo(k)$PPF(n)
g(7,4)
\end{axiom}
and it works (in Axiom)! (Do not declare the types
for g because n is not defined).
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden

[Prev in Thread] |
**Current Thread** |
[Next in Thread] |

**[Axiom-developer] [DynamicFunctionDomains] (new)**,
*Bill Page* **<=**