Processing math: 100%
Ask Your Question
1

Overhead of isometry testing of quadratic forms

asked 7 years ago

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?

Preview: (hide)

Comments

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

tmonteil gravatar imagetmonteil ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 7 years ago

watson_ladd gravatar image

updated 7 years ago

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.

Preview: (hide)
link

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 ( 7 years ago )

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

slelievre gravatar imageslelievre ( 7 years ago )

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 ( 7 years ago )

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

Seen: 407 times

Last updated: Dec 08 '17