recent commit and Algebra(Fraction(Integer))

3 views
Skip to first unread message

Ralf Hemmecke

unread,
Feb 19, 2026, 7:53:24 AM (4 days ago) Feb 19
to fricas-devel
Hi Waldek,

Why did you have to Join Algebra(Fraction(Integer)) to the conditions of
the domain parameters?

https://github.com/fricas/fricas/commit/812606113da68664979efc1d4b2b73536a9225b7#diff-d6dc411f4c819cbba6e78d851e1c48e0d67be2ef910a5b1a7e67ac728389d758R13

We already have that field is a DivisionRing

https://github.com/fricas/fricas/blob/master/src/algebra/catdef.spad#L579

and a DivisionRing exports Algebra(Fraction(Integer)).

https://github.com/fricas/fricas/blob/master/src/algebra/catdef.spad#L322

Ralf

Waldek Hebisch

unread,
Feb 19, 2026, 9:54:36 AM (4 days ago) Feb 19
to 'Ralf Hemmecke' via FriCAS - computer algebra system
Well, the goal is to remove unsound unconditional export of
Algebra(Fraction(Integer)) from DivisionRing. The commit above allows
to compile algebra with such a change to DivisionRing. There is one
regression that I know and some possibility for breakage, so I did not
commit change to DivisionRing. What I commited AFAICS is safe and
needed to get consistent conditions.

--
Waldek Hebisch

Ralf Hemmecke

unread,
Feb 19, 2026, 10:09:44 AM (4 days ago) Feb 19
to fricas...@googlegroups.com
I suspected something of this kind, but since you did not write
something like

"Prepare for the removal of the export Algebra(Fraction(Integer)) from
DivisionRing."

into the extended commit message, I had to wonder about your goals.

I guess, the following is a particular reason why you want to remove
Algebra(Fraction(Integer)) from DivisionRing.

Ralf

%%% (5) -> e := 1 $ PrimeField(5)

(5) 1
Type: PrimeField(5)
%%% (6) -> 1/5 * e

>> Error detected within library code:
not invertible

Waldek Hebisch

unread,
Feb 19, 2026, 11:08:15 AM (4 days ago) Feb 19
to 'Ralf Hemmecke' via FriCAS - computer algebra system
One of reasons. Particualar problem that I looked at is:

Ut := UTS(FF(7, 2), x, 0)
a := generator()$FF(7, 2)
s1 := 1 + monomial(1, 1)$Ut
s1^a

which gives:

>> Error detected within library code:
catdef: division by zero

This also needs changes to series machinery, but change to series can not
solve the problem before fix to DivisionRing.

--
Waldek Hebisch

Ralf Hemmecke

unread,
Feb 19, 2026, 11:29:00 AM (4 days ago) Feb 19
to fricas...@googlegroups.com
I suppose, this

%%% (10) -> s1^(1/7)


>> Error detected within library code:
not invertible


traces back to the same problem.

Honestly, I don't know what s1^a should actually mean. Perhaps something
like exp(a*ln(s1))? Maybe I am wrong, but if I simply use the expansions
for log(1+x) and exp(x) I still see rational numbers (like 1/7) in that
computation.
What do you have in mind by "changes in the series machinery"?


Ralf

Waldek Hebisch

unread,
Feb 19, 2026, 11:56:03 AM (4 days ago) Feb 19
to 'Ralf Hemmecke' via FriCAS - computer algebra system
Yes, classic characteristic 0 series make no sense in finite characteristic
because of denominators. Some things can be reasonably defined, but
I am affraid that most characteristic 0 things need to be disallowed
in finite characteristic.

> What do you have in mind by "changes in the series machinery"?

Mainly disallowing things which do not make sense, while making
sure that sensible things still work. In particular, requesting
base ring which has Algebra(Fraction(Integer)). But such condition
can not solve the problem as long as DivisionRing asserts
Algebra(Fraction(Integer)) for finite fields.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages