(1) -> principalIdeal([2/3])
2
(1) [coef = [-], generator = 1]
3
(2) -> principalIdeal([2/3,2/3])
3
(2) [coef = [0, -], generator = 1]
2
principalIdeal : List % -> Record(coef : List %, generator : %)
++ principalIdeal([f1, ..., fn]) returns a record whose
++ generator component is a generator of the ideal
++ generated by \spad{[f1, ..., fn]} whose coef component satisfies
++ \spad{generator = sum (input.i * coef.i)}
unitNormal : % -> Record(unit : %, canonical : %, associate : %)
++ unitNormal(x) tries to choose a canonical element
++ from the associate class of x.
++ The attribute canonicalUnitNormal, if asserted, means that
++ the "canonical" element is the same across all associates of x
++ if \spad{unitNormal(x) = [u, c, a]} then
++ \spad{u*c = x}, \spad{a*u = 1}.
As illustrated in the example and documentation above, it should
be "uca.associate" instead of "uca.unit" in "principalIdeal".
- Qian
diff --git a/src/algebra/catdef.spad b/src/algebra/catdef.spad
index 262ba2ba..ff3334c7 100644
--- a/src/algebra/catdef.spad
+++ b/src/algebra/catdef.spad
@@ -528,7 +528,7 @@
l = [] => error "empty list passed to principalIdeal"
rest l = [] =>
uca := unitNormal(first l)
- [[uca.unit], uca.canonical]
+ [[uca.associate], uca.canonical]
rest rest l = [] =>
u := extendedEuclidean(first l, second l)
[[u.coef1, u.coef2], u.generator]
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/fricas-devel/1966ca8a-85e5-4edc-8abe-317f1608e506%40gmail.com.