Opened 2 years ago

Closed 2 years ago

#29894 closed enhancement (fixed)

add minimal interface for using ZZ[x]-matrices from flint

Reported by: Frédéric Chapoton Owned by:
Priority: major Milestone: sage-9.2
Component: interfaces Keywords:
Cc: Vincent Delecroix Merged in:
Authors: Frédéric Chapoton Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 1f52255 (Commits, GitHub, GitLab) Commit: 1f52255c43134cf47840466f3ca27fc79bd4e346
Dependencies: Stopgaps:

Status badges

Description

So that one may use this later to compute determinants in this case, for example.

Change History (8)

comment:1 Changed 2 years ago by Frédéric Chapoton

Branch: u/chapoton/29894
Commit: 1f52255c43134cf47840466f3ca27fc79bd4e346
Status: newneeds_review

New commits:

1f52255introduce minimal interface for using ZZ[x] matrices in Flint

comment:2 Changed 2 years ago by Travis Scrimshaw

Could we add at least one little direct use for this interface, say in computing the determinants as mentioned in the ticket description?

comment:3 Changed 2 years ago by Frédéric Chapoton

ok, I will try to think about it. I had some use case, but it turned out to be slower than the existing method.

comment:4 Changed 2 years ago by Travis Scrimshaw

That is interesting and surprising to me. Bill probably would like to know about that. The flint version might also be asymptotically faster. Plus, I am generally a fan of having multiple implementations available and giving the choice to the user (if for nothing else other than testing).

comment:5 Changed 2 years ago by Frédéric Chapoton

My test case was (for M upper triangular square matrix with 1 on the diagonal)

det(x M^t + M)

versus

charpoly(-M (M^t)^(-1))

and the inversion + product + charpoly over ZZ was much faster than the det over ZZ[x]

Last edited 2 years ago by Frédéric Chapoton (previous) (diff)

comment:6 Changed 2 years ago by Frédéric Chapoton

maybe useful for Alexander polynomial from Seifert matrix, see #29952

comment:7 Changed 2 years ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

Perhaps that is just a special case of the fact it is a upper unitriangular matrix? Anyways, I am not going to fret over not having a definitive use case at this time. It doesn't hurt anything to have the interface all setup.

comment:8 Changed 2 years ago by Volker Braun

Branch: u/chapoton/298941f52255c43134cf47840466f3ca27fc79bd4e346
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.