[PATCH] Fix 'order' in DihedralGroup

4 views
Skip to first unread message

Qian Yun

unread,
May 9, 2026, 7:00:44 AMMay 9
to fricas-devel
The order of the identity element in DihedralGroup should be 1.

- Qian

(issue spotted by LLM)

diff --git a/src/algebra/discrgrp.spad b/src/algebra/discrgrp.spad
index 62c03981..0b060130 100644
--- a/src/algebra/discrgrp.spad
+++ b/src/algebra/discrgrp.spad
@@ -264,7 +264,7 @@
x

order(x:%) : Integer ==
- one? x => 0
+ one? x => 1
one? expb x => 2
n quo gcd(convert expa x, n)

Waldek Hebisch

unread,
May 10, 2026, 8:11:11 PMMay 10
to fricas...@googlegroups.com
On Sat, May 09, 2026 at 07:00:39PM +0800, Qian Yun wrote:
> The order of the identity element in DihedralGroup should be 1.
>
Thanks, please commit.
>
> (issue spotted by LLM)
>
> diff --git a/src/algebra/discrgrp.spad b/src/algebra/discrgrp.spad
> index 62c03981..0b060130 100644
> --- a/src/algebra/discrgrp.spad
> +++ b/src/algebra/discrgrp.spad
> @@ -264,7 +264,7 @@
> x
>
> order(x:%) : Integer ==
> - one? x => 0
> + one? x => 1
> one? expb x => 2
> n quo gcd(convert expa x, n)
>
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/7d9e0e39-5be2-4a25-b65c-70cc68b373d2%40gmail.com.

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