Ask Your Question
1

Overhead of isometry testing of quadratic forms

asked 2017-12-05 22:22:06 +0100

watson_ladd gravatar image

I have a script that generates a bunch of locally isomorphic quadratic forms and then tests them for global isometry. This script is too slow. Looking at profiling data much of the runtime is spent in the Quadratic forms class computing the useless local invariants and very little in the Pari qfisom calls. What can I do to cut down on this overhead?

edit retag flag offensive close merge delete

Comments

It will be hard to answer without more information. Could you tell more about the contents script ?

tmonteil gravatar imagetmonteil ( 2017-12-05 23:25:54 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-12-06 03:39:33 +0100

watson_ladd gravatar image

updated 2017-12-08 01:07:44 +0100

So I solved the problem by going straight to Pari's qfisom routine that the is_globally_isomorphic routine eventually calls. The script generates the p-neighbors and checks for isometry, so all the forms are positive definite, but determining this is extremely expensive as currently implemented and overshadows the cost of the isomorphism testing.

To do this if $q1$ and $q2$ are the Gram matricies I write:

T = g1.__pari()__.qfisom(g2.__pari__())

and T is either False or the transformation matrix I want.

edit flag offensive delete link more

Comments

Great! I turned your comment into an answer. Could you edit your question and your answer to provide your code? This would make this more useful for anyone reading the question and its answer. Thanks in advance!

slelievre gravatar imageslelievre ( 2017-12-06 08:25:37 +0100 )edit

Additionally, it might entice someone to make Sage faster at this task!

slelievre gravatar imageslelievre ( 2017-12-06 08:26:52 +0100 )edit

NB: To display inline code, use backticks. To display blocks of code or error messages, separate them by a blank line from the rest of the text, and indent them with 4 spaces, or select code lines and click the "code" button (the icon with '101 010').

For instance, typing

To do this, if `g_1` and `g_2` are the Gram matrices, I write:

    T = g1.__pari()__.qfisom(g2.__pari__())

and `T` is either `False` or the transformation matrix I want.

will produce:

To do this, if q_1 and q_2 are the Gram matrices, I write:

T = g1.__pari()__.qfisom(g2.__pari__())

and T is either False or the transformation matrix I want.

slelievre gravatar imageslelievre ( 2017-12-06 08:27:38 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-12-05 22:22:06 +0100

Seen: 337 times

Last updated: Dec 08 '17