Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Categories for IntegerMod rings #8562

Closed
nthiery opened this issue Mar 19, 2010 · 20 comments
Closed

Categories for IntegerMod rings #8562

nthiery opened this issue Mar 19, 2010 · 20 comments

Comments

@nthiery
Copy link
Contributor

nthiery commented Mar 19, 2010

After this patch, IntegerModRing's inherit properly from categories:

    sage: Z3 = IntegerModRing(3)
    sage: Z3.category()
    Category of commutative rings
    sage: TestSuite(Z3).run(verbose = True)
    running ._test_additive_associativity() . . . pass
    running ._test_an_element() . . . pass
    running ._test_associativity() . . . pass
    running ._test_category() . . . pass
    running ._test_elements() . . . 
      Running the test suite of self.an_element()
      running ._test_category() . . . pass
      running ._test_not_implemented_methods() . . . pass
      running ._test_pickling() . . . pass
      pass
    running ._test_not_implemented_methods() . . . pass
    running ._test_one() . . . pass
    running ._test_pickling() . . . pass
    running ._test_prod() . . . pass
    running ._test_some_elements() . . . pass
    running ._test_zero() . . . pass

And this makes the cool features from #7555 work for Z/nZ.

Potential conflict with #8218 (which has higher priority)

For a later ticket, see: running design discussion on:

http://groups.google.com/group/sage-devel/t/21e21e1ec9cd21fe

CC: @sagetrac-sage-combinat

Component: algebra

Keywords: integer mod rings

Author: Nicolas M. Thiéry

Reviewer: John Palmieri, Rob Beezer

Merged: sage-4.5.2.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/8562

@nthiery nthiery added this to the sage-4.5.2 milestone Mar 19, 2010
@nthiery
Copy link
Contributor Author

nthiery commented Mar 19, 2010

Work Issues: (didn't run full tests yet)

@nthiery
Copy link
Contributor Author

nthiery commented Mar 19, 2010

comment:2

Ok, the tests passed fine up to some trivialities (*_with_category class name changes). I'll fix this and upload an updated patch soon. The review can start in parallel

@rbeezer
Copy link
Mannequin

rbeezer mannequin commented Mar 20, 2010

comment:3

This applies, builds and limited testing (prime and composite orders) indicates that it plays nicely with "addition tables" at #7555 which rely heavily on the category framework. Didn't run tests, but witnessed no problems otherwise.

Good to see how easy it is to insert a new object into the category framework.

I'll come back when the patch is completed.

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Mar 21, 2010

comment:4

Just a heads-up: this looks rather like it might clash with #8218, which is the first of several patches by David Roe which do a substantial amount of work improving finite fields. #8218 has been held up for ages because it moves loads of files around (without substantially changing their content) so even small changes to finite fields will cause conflicts, and there is a lot of really good code waiting on it, so it would be a shame to have to put it off even longer.

David

@nthiery
Copy link
Contributor Author

nthiery commented Mar 21, 2010

comment:5

Replying to @loefflerd:

Just a heads-up: this looks rather like it might clash with #8218, which is the first of several patches by David Roe which do a substantial amount of work improving finite fields. #8218 has been held up for ages because it moves loads of files around (without substantially changing their content) so even small changes to finite fields will cause conflicts, and there is a lot of really good code waiting on it, so it would be a shame to have to put it off even longer.

Thanks for the notice. There is no urgency for that one, so sure, if there is any conflict, #8218 should go first.

David: I won't be touching this patch further. Feel free to update / refactor / merge /... it within the other series of patch whenever it feels right.

@nthiery

This comment has been minimized.

@nthiery
Copy link
Contributor Author

nthiery commented Mar 21, 2010

comment:6

David: I won't be touching this patch further. Feel free to update / refactor / merge /... it within the other series of patch whenever it feels right.

Note: I meant David Roe, but any other David is welcome too :-)

Oh: would you agree to take over that patch, and finalize it (or ping me) when it's ripe to get in?

(then I could forget about it).

@nthiery
Copy link
Contributor Author

nthiery commented Mar 21, 2010

Changed work issues from (didn't run full tests yet) to Designe decision for IntegerModRing(5).category()

@nthiery

This comment has been minimized.

@nthiery
Copy link
Contributor Author

nthiery commented Mar 22, 2010

Changed work issues from Designe decision for IntegerModRing(5).category() to none

@nthiery
Copy link
Contributor Author

nthiery commented Mar 22, 2010

Changed reviewer from Robert Beezer to none

@nthiery
Copy link
Contributor Author

nthiery commented Mar 22, 2010

comment:8

Replying to @nthiery:

David: I won't be touching this patch further. Feel free to update / refactor / merge /... it within the other series of patch whenever it feels right.

Well, actually I did. But I should be done now, unless I notice a test failure.

@nthiery
Copy link
Contributor Author

nthiery commented Mar 22, 2010

@jhpalmieri
Copy link
Member

comment:9

Here's a rebased patch. It looks good and all tests pass for me so I'm willing to give it a positive review, but since I made the rebased patch, can someone else (Nicolas, for example) take a look at it also?

@nthiery
Copy link
Contributor Author

nthiery commented Jun 21, 2010

comment:10

Hi John!

Thanks much for rebasing the patch. I looked through the changes, and am happy to give my green light, up to three minor comments:

  • Is the convention to use as ticket summary "trac 8562:" or "Categories for IntegerMod rings #8562:"? (I personally prefer the later).
  • With the updated patch, sage -coverage complains because of the absence of #indirect doctest for create_object in sage/rings/finite_rings/integer_mod_ring.py. Just wanted to check; if this is voluntary, because you consider that this requires better tests, that's all fine with me.
  • I like the options nodates=1 and showfunc = 1 of hg :-)

I let you set up the positive review as you feel appropriate.

Thanks again,
Nicolas

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri, Rob Beezer

@jhpalmieri
Copy link
Member

comment:11

Replying to @nthiery:

Is the convention to use as ticket summary "trac 8562:" or "#8562:"? (I personally prefer the later).

I think either is fine. I've been using "trac 8562" for a while and have not had any complaints from release managers.

  • With the updated patch, sage -coverage complains because of the absence of #indirect doctest for create_object in sage/rings/finite_rings/integer_mod_ring.py. Just wanted to check; if this is voluntary, because you consider that this requires better tests, that's all fine with me.

This wasn't voluntary, it was an oversight. I'll fix it.

  • I like the options nodates=1 and showfunc = 1 of hg :-)

Nice, I didn't know about those.

@jhpalmieri
Copy link
Member

rebased version. apply only this patch.

@jhpalmieri
Copy link
Member

comment:12

Attachment: trac_8562-rebased.patch.gz

@qed777
Copy link
Mannequin

qed777 mannequin commented Jul 20, 2010

Merged: sage-4.5.2.alpha0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants