read ConicIsom: # Pick some arbitrary conic: v := [30030, 7429, -1363783]; # Compute a simpler conic with the same BadPrimes (ramified primes). w := SimplifyConic(v); BadPrimes(v); # The ramified primes of conic v. BadPrimes(w); # The same, so v and w are isomorphic. # Compute isomorphism: ConicIsomorphism(v, w); # A simpler example: v := [1,2,3]; w := [1,1,1]; M := ConicIsomorphism(v,w); # Check correctness: P := M . <1,1,I>; # Note that <1,1,I> is on v since 1*1^2+2*1^2+3*I^2 = 0 w[1]*P[1]^2 + w[2]*P[2]^2 + w[3]*P[3]^2; # Should be 0. # Other examples ConicIsomorphism([26455, 14, 1767], [37, 5, 1]); ConicIsomorphism([3009008874, 44044, -46918], [958, 1892000, -1003002958]); v := [23456345763547,29387465928374562,29837465928375629]; w := SimplifyConic(v); ConicIsomorphism(v,w); ConicIsomorphism(w,v); v := [23456345763530498657039456447, 293874643563456355928374562, 298374567456745465928375629]; BadPrimes(v); w := SimplifyConic(v); ConicIsomorphism(v,w); # It's often a good idea to let the second argument be the smallest # one, this example would take much longer if you do ConicIsomorphism(w,v);