Project

General

Profile

Design #498

IsIntegralDomain, IamIntegralDomain3

Added by John Abbott about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tidying
Start date:
28 Mar 2014
Due date:
% Done:

100%

Estimated time:
3.01 h
Spent time:

Description

JAA has just added an impl of IsIntegralDomain3

The design is probably wrong. Replace it with a better one!


Related issues

Related to CoCoALib - Feature #356: IsZeroDivisorClosed2013-05-24

Related to CoCoALib - Feature #361: implement IsPrime3, IsMaximal3Closed2013-05-29

Related to CoCoALib - Design #513: Quick/correct flag for bool3 fnsIn Progress2014-04-02

History

#1 Updated by John Abbott about 10 years ago

Current design has IamIntegralDomain and IamIntegralDomain3 pure virtual in RingBase, so every concrete ring has to implement both (or some intermediate ring has to do so).

Now I think it may be better to have just a single mem fn IamIntegralDomain3 which accepts an extra flag saying whether to be quick or to be correct -- in the simple cases the flag is just ignored....

What do you think?
What do I think (when it's not the middle of the night)?

#2 Updated by John Abbott about 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20

I have removed IamIntegralDomain and modified IamIntegralDomain3 so that it expects an arg (bool QuickMode). Most impls ignore the arg because the result is always true; I was tempted to link the impl to that of IamField, but I'm not sure how to do this in a non-confusing way.

Anyway it's better than before.

Maybe the idea of bool3 fns which take a flag saying whether to be fast or correct should be extended? For instance, in QuotientRing it would have been simplest to implement the integral domain test as IsPrime3(myDefiningIdeal,QuickModeFlag)

#3 Updated by Anna Maria Bigatti about 10 years ago

  • Subject changed from IsIntegralDomain to IsIntegralDomain, IamIntegralDomain3

#4 Updated by John Abbott about 10 years ago

  • Status changed from In Progress to Feedback
  • Assignee set to John Abbott
  • % Done changed from 20 to 90

#5 Updated by John Abbott about 10 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

#6 Updated by John Abbott about 10 years ago

The final design is:

  inline bool IsIntegralDomain(const ring& R)
  { return IsTrue3(R->IamIntegralDomain3(false));}

  inline bool3 IsIntegralDomain3(const ring& R)
  { return R->IamIntegralDomain3(true);}

where RingBase::IamIntegralDomain3(bool QuickMode) takes a flag to say whether it should be quick or correct -- see discussion in #513.

#7 Updated by Anna Maria Bigatti about 10 years ago

  • Estimated time set to 3.01 h

Also available in: Atom PDF