Opened 11 years ago

Closed 7 months ago

## #12419 closed defect (fixed)

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

Reported by: | Paul Zimmermann | Owned by: | tbd |
---|---|---|---|

Priority: | minor | Milestone: | sage-9.6 |

Component: | factorization | Keywords: | |

Cc: | Merged in: | ||

Authors: | Paul Zimmermann | Reviewers: | Frédéric Chapoton |

Report Upstream: | N/A | Work issues: | |

Branch: | c7e7d54 (Commits, GitHub, GitLab) | Commit: | c7e7d54dd25c06d5d930a3a70e2587d049cac1ed |

Dependencies: | Stopgaps: |

### Description

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

### Change History (27)

### comment:1 Changed 9 years ago by

Milestone: | sage-5.11 → sage-5.12 |
---|

### comment:2 Changed 9 years ago by

Milestone: | sage-6.1 → sage-6.2 |
---|

### comment:3 Changed 8 years ago by

Milestone: | sage-6.2 → sage-6.3 |
---|

### comment:4 Changed 8 years ago by

Milestone: | sage-6.3 → sage-6.4 |
---|

### comment:5 Changed 13 months ago by

### comment:6 Changed 13 months ago by

Status: | new → needs_review |
---|

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

### comment:8 Changed 13 months ago by

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

### comment:9 Changed 13 months ago by

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

### comment:11 Changed 13 months ago by

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

### comment:12 Changed 13 months ago by

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

### comment:13 Changed 13 months ago by

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.

### comment:14 Changed 13 months ago by

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'

### comment:15 Changed 13 months ago by

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/zimmerman/12419

### comment:16 Changed 13 months ago by

Milestone: | sage-6.4 → sage-9.5 |
---|

### comment:17 Changed 13 months ago by

Milestone: | sage-9.5 → sage-6.4 |
---|

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

### comment:18 Changed 13 months ago by

Authors: | → Paul Zimmermann |
---|---|

Branch: | → u/zimmerma/12419 |

Commit: | → 1733915f770a73937280c86aecf5e76c544a785b |

Milestone: | sage-6.4 → sage-9.5 |

### comment:19 Changed 13 months ago by

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

### comment:20 Changed 13 months ago by

Reviewers: | → Frédéric Chapoton |
---|---|

Status: | needs_review → positive_review |

ok, green bot

### comment:22 Changed 9 months ago by

Milestone: | sage-9.5 → sage-9.6 |
---|

### comment:23 Changed 7 months ago by

Branch: | u/zimmerma/12419 → u/chapoton/12419 |
---|---|

Commit: | 1733915f770a73937280c86aecf5e76c544a785b → c7e7d54dd25c06d5d930a3a70e2587d049cac1ed |

Status: | needs_work → needs_review |

### comment:25 Changed 7 months ago by

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?

### comment:26 Changed 7 months ago by

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

### comment:27 Changed 7 months ago by

Branch: | u/chapoton/12419 → c7e7d54dd25c06d5d930a3a70e2587d049cac1ed |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

**Note:**See TracTickets for help on using tickets.

works now (sage 9.5.b0):