Project

General

Profile

Bug #100

BringIn should map only the indets in its arg

Added by John Abbott about 12 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Incomplete function
Target version:
Start date:
07 Mar 2012
Due date:
% Done:

0%

Estimated time:
15.00 h
Spent time:

Description

In C4 the function BringIn maps only the indets which actually appear in the arg to be mapped. In C5, the currently impl tries to create a canonical hom (which wants to map all indets in the source ring, even those which don't appear in the arg); this causes needless failure. Consider the following example:

R ::= QQ[a];
Use R[x];
F := x^2-2;
Use QQ[x];
BringIn(F);

The problem seems to be limited to cases where indets are in the coeff ring of the source ring, but those same indets are not in the destination ring.


Related issues

Related to CoCoA-5 - Bug #132: BringIn should allow reduction modulo pClosed2012-04-17

Related to CoCoA-5 - Feature #7: Automatic mapping between (some) ringsResolved2011-10-20

Related to CoCoALib - Feature #562: SubringsNew2014-05-20

Related to CoCoALib - Feature #658: Indets actually in a poly (or vector or matrix)Closed2015-01-22

Related to CoCoALib - Feature #151: Iterated CanonicalHomNew2012-05-03

History

#1 Updated by John Abbott almost 12 years ago

JAA suggests that BringIn should be simple rather than "clever". For instance it should give an error in the following circumstance:

Use QQ[x,y];
f := x+3*y;
Use ZZ/(3)[x];
BringIn(f);

One could argue that the image should simply be x, and that this is well-defined. However, I'm not sure how easy it would be to do this in general.

I suggest making a simple impl first; if there is a real need to make BringIn cleverer then we can always try to "improve" it later on.

#2 Updated by Anna Maria Bigatti about 11 years ago

  • Category set to Incomplete function

#3 Updated by John Abbott about 11 years ago

We need a sort of partial canonical hom which maps symbols which are not in the codomain to zero. Before applying it someone must check whether any forbidden symbols appear.

#4 Updated by Anna Maria Bigatti almost 10 years ago

  • Target version set to CoCoA-5.1.0 Easter14

#5 Updated by John Abbott almost 10 years ago

  • Target version changed from CoCoA-5.1.0 Easter14 to CoCoA-5.1.1 Seoul14

#6 Updated by John Abbott over 9 years ago

  • Target version changed from CoCoA-5.1.1 Seoul14 to CoCoA-5.1.2 summer 2015

#7 Updated by John Abbott almost 9 years ago

  • Target version changed from CoCoA-5.1.2 summer 2015 to CoCoA-5.1.3/4 Jan 2016

#8 Updated by John Abbott about 8 years ago

  • Target version changed from CoCoA-5.1.3/4 Jan 2016 to CoCoA-5.2.0 spring 2017

#9 Updated by John Abbott over 7 years ago

  • Target version changed from CoCoA-5.2.0 spring 2017 to CoCoA-5.?.?

This will be a little tricky so postponing.

#10 Updated by John Abbott over 1 year ago

Here is the status at 2022-09-26

/**/ R ::= QQ[a];
Use R[x];
F := x^2-2;
Use QQ[x];
BringIn(F);
--> ERROR: Unable to construct canonical homomorphism
--> [CoCoALib] CanonicalHom(R1,R2)
--> WHERE: at line 38 (column 9) of BringIn.cpkg5
-->  Return PolyAlgebraHom(RingOf(F), R, MapList(R,F))(F);
-->         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CONTEXT: function BringIn at line 38 of BringIn.cpkg5
 called at top-level

And using the example from comment 1 above:

/**/ Use QQ[x,y];
f := x+3*y;
Use ZZ/(3)[x];
BringIn(f);
--> ERROR: symbol not in ring
--> [CoCoALib] ReadFactor: symbol
--> WHERE: at line 62 (column 16) of BringIn.cpkg5
-->       ML[i] := RingElem(R, sprint(indet(P,i))); // indet in R with same name ...
-->                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CONTEXT: function MapList at line 62 of BringIn.cpkg5
 CALLED BY: function BringIn at line 44 of BringIn.cpkg5
  called at top-level

JAA says that the error mesg in this second case is quite unhelpful!

#11 Updated by John Abbott over 1 year ago

Also available in: Atom PDF