>
> Martin,
>
> I don't know whether it is in fricas or not, but I have something on my
> wish list for fricas - namely the option for a / 0 = 0 for the field of
> real numbers, as is standard in Isabelle/HOL, and implicit for the
> pseudo-inverse in linear algebra.
>
> Could this be engineered as a domain?
>
Compile the following:
-------------------<cut here>------------------------
)abbrev category NFIELDC NewFieldCategory
NewFieldCategory : Category == Field with
ndiv : (%, %) -> %
add
x, y : %
x / y == ndiv(x, y)
)abbrev domain NFIELD NewField
NewField(F : Field) : NewFieldCategory
== F add
ndiv(x : %, y : %) : % ==
y pretend F =$F 0$F => 0$F pretend %
(x pretend F /$F y pretend F) pretend %
------------------<cut here>--------------------------
Then you can do:
(1) -> nF := NewField(Fraction(Integer))
(1) NewField(Fraction(Integer))
Type: Type
(2) -> 1$nF / 0$nF
(2) 0
Type: NewField(Fraction(Integer))
In other words, given a normal FriCAS field you can get new field
like the old one, but with new division.
You probably also want to redefine 'divide' and possiby other
functions.
BTW: I tried simpler definition, without extra category and 'ndiv'
function, but for some reason Spad compiler did not like it.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
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/fricas-devel?hl=en.