-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add is_unimodular(integer matrix)
#2249
Comments
The definition for "unimodular matrix" I am familiar with is for square matrices only. So perhaps to get started on this, could you tell us what definition for non-square matrices you have in mind (ideally with a ref to a textbook definition, so it can be included in the docstring) ? In principle I see no harm in having this, as long as we are very clear about what it means. |
@JohnAAbbott has some code for determining if a square integer matrix ( |
I am finalizing my impl of
Do you have a reference for this definition? I am aware only of the definition Since I believe that my implementation should be usefully faster for square matrices, it would be nice to call my code when the input is square. We could make my code the main function, and make it delegate to your code for non-square matrices; or vice versa? What do you think? |
I cannot find this function For all it matters: In https://github.com/oscar-system/Oscar.jl/pull/2228/files a function function _is_unimodular(M::ZZMatrix)
nrows(M) <= ncols(M) || return false
n = nrows(M)
return abs(det(snf(M)[:,1:n])) == 1
end |
The function @JohnAAbbott I am fine with having |
Is your feature request related to a problem? Please describe.
We would like to have a method for testing integer matrices for unimodularity, i.e. determine whether the rows of an integer matrix can be completed to a lattice basis.
Describe the solution you'd like
Something similar to the following would work. I am unsure though whether the first line should give an error instead.
Probably the solution should happen in Hecke.
Describe alternatives you've considered
I tried using
is_unimodular
from Hecke with someZlattice
construction but on slack we agreed that this does something different.Additional context
This is used for smoothness tests in toric geometry.
cc @HereAround @thofma
The text was updated successfully, but these errors were encountered: