-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Description
Hi,
The following is a bug that Bill Page found in Sage. It is in the combinatorial
classes code (mostly) by Mike Hansen, so maybe he'll fix it.
In: http://modular.math.washington.edu/msri06/work/kohel/msri_magma.pdf
"A Brief Magma Tutorial" by David R. Kohel gives this example:
----------
The parent structure of a tuple is more important than in the case
of sequences or sets.
> C := CartesianProduct(Integers(),RationalField());
> t := C!<1,1>;
> Parent(t[2]);
Rational Field
----------
The analogous computation in Sage 3.0.2 yields:
sage: C = CartesianProduct(Integers(),RationalField())
# case 1
sage: t=C([1,1/2])
sage: parent(t[0])
Integer Ring
sage: parent(t[1])
Rational Field
# case 2
sage: t=C([1,1])
sage: parent(t[0])
Integer Ring
sage: parent(t[1])
Integer Ring
---------
Notice that the parent of t[1] is incorrect in the 2nd case.
CC: @sagetrac-sage-combinat
Component: combinatorics
Author: William Stein
Issue created by migration from https://trac.sagemath.org/ticket/3368