Add functions for computation of krylov basis and krylov kernel basis#40508
Add functions for computation of krylov basis and krylov kernel basis#40508vbraun merged 68 commits intosagemath:developfrom
Conversation
…dn_dense, add aliases for pivots and pivot_rows, optimisation for krylov_rank_profile by minimising index conversion and full permutation calculation
…ial creation in basis calculation
|
Some benchmarks are provided here (done in a branch with #40423 and #40435 merged): |
xcaruso
left a comment
There was a problem hiding this comment.
Just a few comments on the doctests to start with.
Krylov kernel basis documentation and examples + handling var argument
|
The latest changes handle the input |
vneiger
left a comment
There was a problem hiding this comment.
All my comments have been handled properly and I see no other immediate enhancement. Looks good to me!
|
@xcaruso I have not yet put the "positive review" label, in case you still have some suggestions to add. |
xcaruso
left a comment
There was a problem hiding this comment.
A last round of comments. After this, I give a positive review, I promise :-)
|
Thanks for all! |
sagemathgh-40508: Add functions for computation of krylov basis and krylov kernel basis This PR implements the following functions, adds aliases `row_rank_profile` for `pivot_rows` and `column_rank_profile` for `pivots`, and caches the row rank profile that is calculated as part of `linbox_echelonize` in `matrix_modn_dense_template.pxi`. Given a $\mathbb{K}[x]$-module $V$ with multiplication matrix $J \in \mathbb{K}^{\sigma\times\sigma}$, a set of $m$ elements of $V$ expressed in matrix form $E \in \mathbb{K}^{m\times\sigma}$, a priority shift $s = (s_1,\dots,s_m) \in \mathbb{Z}^m$, and an upper bound $d$ on the degree of the minimal polynomial of $J$, **`krylov_rank_profile`** finds the lexicographical first maximal linearly independent set of rows from the matrix, with rows ordered according to the priority $P(E_{c,*} J^d) = s_c + d$: ``` [ E ] [ EJ ] [ ... ] [ EJ^δ ] ``` It returns the positions of these rows in the permuted matrix, the submatrix formed by these rows, and the lexicographical first maximal linearly independent set of columns of the submatrix. Given the same arguments and a variable name, **`linear_interpolation_basis`** calculates an $s$-minimal interpolation basis for $(E,J)$, i.e. an $s$-reduced basis for the space of polynomials satisfying $p_1 E_{1,*}+\dots+p_mE_{m,\*}=0$. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [X] The title is concise and informative. - [X] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [X] I have created tests covering the changes. - [X] I have updated the documentation and checked the documentation preview. URL: sagemath#40508 Reported by: Biffo89 Reviewer(s): Biffo89, Vincent Neiger, Xavier Caruso
This PR implements the following functions, adds aliases
row_rank_profileforpivot_rowsandcolumn_rank_profileforpivots, and caches the row rank profile that is calculated as part oflinbox_echelonizeinmatrix_modn_dense_template.pxi.Given a$\mathbb{K}[x]$ -module $V$ with multiplication matrix $J \in \mathbb{K}^{\sigma\times\sigma}$ , a set of $m$ elements of $V$ expressed in matrix form $E \in \mathbb{K}^{m\times\sigma}$ , a priority shift $s = (s_1,\dots,s_m) \in \mathbb{Z}^m$ , and an upper bound $d$ on the degree of the minimal polynomial of $J$ , $P(E_{c,*} J^d) = s_c + d$ :
krylov_rank_profilefinds the lexicographical first maximal linearly independent set of rows from the matrix, with rows ordered according to the priorityIt returns the positions of these rows in the permuted matrix, the submatrix formed by these rows, and the lexicographical first maximal linearly independent set of columns of the submatrix.
Given the same arguments and a variable name,$s$ -minimal interpolation basis for $(E,J)$ , i.e. an $s$ -reduced basis for the space of polynomials satisfying $p_1 E_{1,*}+\dots+p_mE_{m,*}=0$ .
linear_interpolation_basiscalculates an📝 Checklist