Project

General

Profile

Bug #1745

Printing of Hilbert series via indent

Added by John Abbott 11 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bug
Target version:
Start date:
22 May 2023
Due date:
% Done:

100%

Estimated time:
1.67 h
Spent time:

Description

Printing of Hilbert series is "strange":

/**/ use R ::= QQ[t,x,y,z];
/**/ HilbertSeries(R/ideal(t^2, x, y^3));
(1 + 2*t + 2*t^2 + t^3) / (1-t)
/**/ L := [It]; L; -- as element of a list (or record)
[tagged(record[DenFactors := record[RemainingFactor := 1, factors := [-t +1], multiplicities := [4]], num := -t^6 +t^5 +t^4 -t^2 -t +1], "$hp.PSeries")]
/**/ indent(L);  - printing via indent
**[
  (1 + 2t + 2t^2 + t^3) / (1-t)
]


Related issues

Related to CoCoA-5 - Bug #1475: HilbertSeries: make into proper rational functionNew2020-08-06

Related to CoCoA-5 - Design #376: Hilbert: Redesign hp.cpkg5 and public functions in TmpHilbert.CIn Progress2013-06-18

History

#1 Updated by John Abbott 11 months ago

  • Status changed from New to Resolved
  • Assignee set to John Abbott
  • % Done changed from 0 to 60

There was a bug in sppoly.cpkg5 where the asterisk was printed directly rather than to the output stream D.
Now corrected -- I shall check in shortly.

Not sure about printing via print when a Hilbert series is in a list. Presumably this is only rarely tried (since no one has complained before now). The problem with using the special printing function is that it make the list almost impossible to read.

Oscar uses 3 levels of printing: pretty printing, one-line printing (e.g. for elems of a list), and supercompact (e.g. when the object appears at deeper levels of nesting).

#2 Updated by John Abbott 11 months ago

  • Related to Bug #1475: HilbertSeries: make into proper rational function added

#3 Updated by John Abbott 11 months ago

  • Related to Design #376: Hilbert: Redesign hp.cpkg5 and public functions in TmpHilbert.C added

#4 Updated by Anna Maria Bigatti 11 months ago

  • % Done changed from 60 to 70

John Abbott wrote:

There was a bug in sppoly.cpkg5 where the asterisk was printed directly rather than to the output stream D.
Now corrected -- I shall check in shortly.

checked, ok

Not sure about printing via print when a Hilbert series is in a list. Presumably this is only rarely tried (since no one has complained before now). The problem with using the special printing function is that it make the list almost impossible to read.

I think it is pretty unusual to print a list containing tagged objects without using indent.

Oscar uses 3 levels of printing: pretty printing, one-line printing (e.g. for elems of a list), and supercompact (e.g. when the object appears at deeper levels of nesting).

Interesting, but not sure I want to do it

#5 Updated by Anna Maria Bigatti 11 months ago

  • Status changed from Resolved to Feedback
  • % Done changed from 70 to 90

added test in exbugs.cocoa5

#6 Updated by John Abbott 11 months ago

I think we can leaving printing in a list as it is (for the time being).
Tagged values are (often) ones which we print in a special way, so it is probably not appropriate to try to print them "cleverly" inside a list. If a better solution is needed then maybe we will have to think of a solution similar to that used in Oscar.

#7 Updated by John Abbott 4 months ago

  • Status changed from Feedback to Closed
  • Estimated time set to 1.67 h

The current situation is not "perfect" but probably good enough (until we encounter a real situation where a better solution is needed).
Closing after 7 months in feedback.

#8 Updated by John Abbott 4 months ago

  • % Done changed from 90 to 100

Also available in: Atom PDF