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
is_weak_popov #16739
Comments
This comment has been minimized.
This comment has been minimized.
Changed keywords from none to matrix |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Changed keywords from matrix to matrix weak-popov-form #16742 |
Branch: u/ketzu/is_weak_popov |
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:13
Though the check is elegantly written in two lines, I think it has two
Both issues can be repaired by changing the outer list comprehension Probably is_weak_popov will usually not be a performance bottleneck, but nonetheless. Cheers, |
comment:14
Btw. Sage usually has line wraps on doc strings, right? The line under OUTPUT is very long. Also, the last sentence there is missing a full stop. Last pet peeve: can you change one or two of the doc tests to be Come to think of it, if the matrix has more rows than cols, the function can immediately return False. |
comment:15
Line wraps are already in, but not pushed. |
comment:16
Doctests and fast fail/less overhead is in progress. |
comment:18
Some simple measures for the change from list comprehension (probably more "pythonic") to double loops: list comprehension: sage: PF = PolynomialRing(GF(2!^32,'a'),'x') sage: A = random_matrix(PF,400,400,degree=10) sage: B = random_matrix(PF,10,10,degree=800) loops sage: A = random_matrix(PF,400,400,degree=10) sage: for x in range(A.nrows()): sage: B = random_matrix(PF,10,10,degree=800) sage: for x in range(B.nrows()): Now it's in wpfsage: %timeit B.is_weak_popov() New commits:
New commits:
|
comment:19
Cool, looks good. And the timings are quite persuasive. One thing: I don't see what you need the "p = self.ncols()-1" line for. p will always be reassigned if any element is non-zero. And if not, p will never be read. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:22
Cool. Ready to mark as Needs Review? It might be too in-bred to make me review it... |
comment:24
The doc syntax is not good. After any ::, the next line should be indented by 4. After any :, the next line should not be indented at all. See http://www.sagemath.org/doc/developer/coding_basics.html |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:29
Looks good enough. A few more minor things:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:32
Please write your real name in the Authors: field above. |
Author: David Mödinger |
Reviewer: Frédéric Chapoton |
Changed branch from u/ketzu/is_weak_popov to public/ticket/16739 |
comment:36
I apreciate your help, thank you for these changes, since I am still uneasy in python and english. |
This comment has been minimized.
This comment has been minimized.
Changed branch from public/ticket/16739 to |
The target of this ticket is to provide/add a function is_weak_popov to the matrix interface. The function should return true if the matrix it is called on is in weak popov form. This ticket is independent from but connected to #16742.
Short description of weak popov form: Let R be an ordered Ring and Amxn a matrix over R. The leading position of a row is called the position i in [1,m) such that the order of A[i,_] is maximal within the row. If there are multiple entries with the maximum order, the highest i is the leading position (the furthest to the right in the matrix). A is in weak popov form if all leading positions are different (zero lines ignored).
The function will implement this only for polynomial rings, the order function is the degree of the polynomial. Example:
[x2+1, x]
[x, x+1]
is in weak popov form: Row 1 has the degrees 2 and 1, the leading position is for i=0, row 2 has two times degree 1 so the higher i is chosen with i=1.
[x2+1, x]
[x,0]
is NOT in weak popov form, row 1 has now degrees 1 and -1, so the leading position is i=0 as in row 1.
See: [MS] Mulders, Storjohann, On Lattice Reduction for Polynomial Matrices, ftp://ftp.inf.ethz.ch/pub/publications/tech-reports/3xx/356.pdf
CC: @johanrosenkilde
Component: linear algebra
Keywords: matrix weak-popov-form #16742
Author: David Mödinger
Branch/Commit:
b29a645
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/16739
The text was updated successfully, but these errors were encountered: