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

factorization of 0 in GF(p)[x,y] fails #12419

Closed
zimmermann6 opened this issue Feb 3, 2012 · 27 comments
Closed

factorization of 0 in GF(p)[x,y] fails #12419

zimmermann6 opened this issue Feb 3, 2012 · 27 comments

Comments

@zimmermann6
Copy link

This was reported by Charles Bouillaguet.


sage: R.<x,y> = GF(2)[] 
sage: R(1).factor()    
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
...

AttributeError: 'sage.rings.finite_rings.integer_mod.IntegerMod_int' object has no attribute 'factor'

Paul Zimmermann

Component: factorization

Author: Paul Zimmermann

Branch/Commit: c7e7d54

Reviewer: Frédéric Chapoton

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

@zimmermann6 zimmermann6 added this to the sage-5.11 milestone Feb 3, 2012
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@fchapoton
Copy link
Contributor

comment:5

works now (sage 9.5.b0):

sage: R.<x,y> = GF(2)[]  
sage: R(1).factor()                                                       
1

@zimmermann6
Copy link
Author

comment:6

it works already in Sage 9.1. I propose to resolve as "fixed".

@fchapoton
Copy link
Contributor

comment:7

somebody(?) should add a doctest, no ?

@zimmermann6
Copy link
Author

comment:8

I can do it, but it's a long time I didn't contribute to Sage. Is there a howto somewhere?

@fchapoton
Copy link
Contributor

comment:9

humm, if you know git, this is simple. Otherwise, c'est moins simple.

there is the big developer manual, and in particular

https://doc.sagemath.org/html/en/developer/index.html#git-tricks-tips

in very short :

(1) clone the git repo and go to the develop branch

(2) set the remote to trac

(3) make a local branch on top of the develop branch

(4) push the branch to trac under u/your_trac_name/branch_name

(5) write that branch name in the ticket branch field

@zimmermann6
Copy link
Author

comment:10

thanks, I've added a doctest, now running sage -t -all

@fchapoton
Copy link
Contributor

comment:11

si la branche est prete, le patchbot peut se charger de lancer les tests.

@zimmermann6
Copy link
Author

comment:12

I get the following error while running the tests:

zimmerma@tomate:/tmp/sage$ ./sage -t -p 4 -all
...
Killing test src/sage/rings/valuation/augmented_valuation.py
Killing test src/sage/combinat/rigged_configurations/rc_infinity.py
Killing test src/sage/symbolic/integration/external.py
Killing test src/sage/coding/databases.py
----------------------------------------------------------------------
sage -t --long --warn-long 56.2 --random-seed=0 src/sage/functions/piecewise.py  # UnicodeEncodeError in doctesting framework
Doctests interrupted: 666/4346 files tested
----------------------------------------------------------------------
Total time for all tests: 2466.7 seconds
    cpu time: 6988.6 seconds
    cumulative wall time: 9651.5 seconds
Traceback (most recent call last):
  File "/tmp/sage/src/bin/sage-runtests", line 144, in <module>
    err = DC.run()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/control.py", line 1207, in run
    self.run_doctests()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/control.py", line 909, in run_doctests
    self.dispatcher.dispatch()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 2044, in dispatch
    self.parallel_dispatch()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 1965, in parallel_dispatch
    w.read_messages()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 2255, in read_messages
    self.messages += bytes_to_str(s)
  File "sage/cpython/string.pxd", line 28, in sage.cpython.string.bytes_to_str (build/cythonized/sage/cpython/string.c:1588)
  File "sage/cpython/string.pxd", line 51, in sage.cpython.string.bytes_to_str (build/cythonized/sage/cpython/string.c:1466)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 1627: invalid start byte

@fchapoton
Copy link
Contributor

comment:13

merci de pousser la branche sur trac, et d'écrire son nom dans le champ "branch" ci-dessus. On fera faire les tests par un patchbot.

@zimmermann6
Copy link
Author

comment:14

it seems I don't have the right to push to trac (or I did the wrong command):

zimmerma@tomate:/tmp/sage$ git remote -v
origin  https://github.com/sagemath/sage.git (fetch)
origin  https://github.com/sagemath/sage.git (push)
trac    git@trac.sagemath.org:sage.git (fetch)
trac    git@trac.sagemath.org:sage.git (push)

zimmerma@tomate:/tmp/sage$ git push --set-upstream trac trac-12419
X11 forwarding request failed on channel 0
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 4 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 629 bytes | 629.00 KiB/s, done.
Total 7 (delta 6), reused 0 (delta 0), pack-reused 0
remote: FATAL: W refs/heads/trac-12419 sage zimmerma DENIED by fallthru
remote: error: hook declined to update refs/heads/trac-12419
To trac.sagemath.org:sage.git
 ! [remote rejected]       trac-12419 -> trac-12419 (hook declined)
error: failed to push some refs to 'trac.sagemath.org:sage.git'

@fchapoton
Copy link
Contributor

comment:15

my remote says

~/sage$ git remote -v
trac	ssh://git@trac.sagemath.org:22/sage.git (fetch)
trac	ssh://git@trac.sagemath.org:22/sage.git (push)

Tro to use simply

git push trac HEAD:u/zimmerma/12419

EDIT: should use zimmerma, your user name here

@fchapoton fchapoton modified the milestones: sage-6.4, sage-9.5 Sep 8, 2021
@zimmermann6
Copy link
Author

comment:17

thanks, it works! The branch is called u/zimmerma/12419.

For the record, what I did:

git clone ssh://git@trac.sagemath.org:22/sage.git
cd sage
git remote add trac ssh://git@trac.sagemath.org:22/sage.git -t master
git remote set-url --push trac ssh://git@trac.sagemath.org:22/sage.git
<edit files>
git commit -a
git push trac HEAD:u/zimmerma/12419

@zimmermann6 zimmermann6 modified the milestones: sage-9.5, sage-6.4 Sep 8, 2021
@fchapoton
Copy link
Contributor

Commit: 1733915

@fchapoton
Copy link
Contributor

Branch: u/zimmerma/12419

@fchapoton
Copy link
Contributor

comment:18

I have put the branch name in place


New commits:

1733915added doctect for trac #12419

@fchapoton
Copy link
Contributor

Author: Paul Zimmermann

@fchapoton fchapoton modified the milestones: sage-6.4, sage-9.5 Sep 8, 2021
@fchapoton
Copy link
Contributor

comment:19

branch looks good. A patchbot should come, if not I will launch mine when it becomes available.

@fchapoton
Copy link
Contributor

comment:20

ok, green bot

@fchapoton
Copy link
Contributor

Reviewer: Frédéric Chapoton

@vbraun
Copy link
Member

vbraun commented Sep 15, 2021

comment:21

Merge conflict

@fchapoton
Copy link
Contributor

Changed branch from u/zimmerma/12419 to u/chapoton/12419

@fchapoton
Copy link
Contributor

Changed commit from 1733915 to c7e7d54

@fchapoton
Copy link
Contributor

comment:23

rebased


New commits:

c7e7d54Merge branch 'u/zimmerma/12419' in 9.6.b1

@fchapoton
Copy link
Contributor

comment:24

back to positive

@zimmermann6
Copy link
Author

comment:25

I don't have time to test, but the original failure was for 0 not 1 if I remember correctly. Does it work for 0 too?

@zimmermann6
Copy link
Author

comment:26

sorry, the factorization of 0 is not defined. For 1 it works already in 9.4.

@vbraun
Copy link
Member

vbraun commented Mar 1, 2022

Changed branch from u/chapoton/12419 to c7e7d54

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

5 participants