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: |

### 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

Branch: | → u/chapoton/29894 |
---|---|

Commit: | → 1f52255c43134cf47840466f3ca27fc79bd4e346 |

Status: | new → needs_review |

### comment:2 Changed 2 years ago by

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

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

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

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]

### comment:6 Changed 2 years ago by

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

### comment:7 Changed 2 years ago by

Reviewers: | → Travis Scrimshaw |
---|---|

Status: | needs_review → positive_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

Branch: | u/chapoton/29894 → 1f52255c43134cf47840466f3ca27fc79bd4e346 |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

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

New commits:

`introduce minimal interface for using ZZ[x] matrices in Flint`