Re: [sage-devel] Suggestion: Remove restriction on q in NonisotropicOrthogonalPolarGraph

2020-04-03 Thread Ferdinand Ihringer
I forgot a minor remark.

On Freitag, 3. April 2020 19:13:50 CEST Dima Pasechnik wrote:
> On Sat, Apr 4, 2020 at 12:44 AM Ferdinand Ihringer
>  wrote:
> > My understanding is that I should ask for improvements here. Can one
> > remove the restriction on q in NonisotropicOrthogonalPolarGraph in
> > graphs/generators/classical_geometries.py? These graphs are nice for
> > general q, see [1] or [2].
> IIRC this restriction is due to these graphs not being strongly
> regular for the other values of q.

For m odd and q = 3, you also get SRGs. The SRGs are isomorphic to the 
perp=False case (maybe the complement graph of the perp=False case, do not 
recall).

Best,

Ferdinand



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/1723287.Jc8WpS11KJ%40grosserwald.


Re: [sage-devel] Suggestion: Remove restriction on q in NonisotropicOrthogonalPolarGraph

2020-04-03 Thread Ferdinand Ihringer
Hi Dima,

On Freitag, 3. April 2020 19:13:50 CEST Dima Pasechnik wrote:
> On Sat, Apr 4, 2020 at 12:44 AM Ferdinand Ihringer
>  wrote:
> Certainly we can make that function more general, and test for the
> strongly regular needs elsewhere.

That would be nice.

> (although functions with names starting from _ are not meant for general
> use...)

I only edited classical_geometries.py as it was the quickest solution for me. 
I do not assume that I am meant to edit anything in that file. ;-)

For q odd, just replacing the hard coded point_type by some equivalent of the 
GAP code Difference(List(Elements(GF(q)), x -> x^2), [0 * Z(q)]), respectively, 
Difference(Elements(GF(q)), List(Elements(GF(q)), x -> x^2)) should suffice.

For q even, it is similar with the trace, but I cannot write down GAP code for 
it without some effort.

> If you can open a trac ticket for this, please do and CC me on this

Done. I CCed you in it.

https://trac.sagemath.org/ticket/29459

> (incidentally I am working on https://trac.sagemath.org/ticket/26513
> right now - and appear to have a fix :-))

Nice!

Best,

Ferdinand



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/1587251.WigJy6oaBf%40grosserwald.


Re: [sage-devel] Suggestion: Remove restriction on q in NonisotropicOrthogonalPolarGraph

2020-04-03 Thread Dima Pasechnik
Hi Ferdinand,

On Sat, Apr 4, 2020 at 12:44 AM Ferdinand Ihringer
 wrote:
>
> My understanding is that I should ask for improvements here. Can one remove 
> the restriction on q in NonisotropicOrthogonalPolarGraph in 
> graphs/generators/classical_geometries.py? These graphs are nice for general 
> q, see [1] or [2].

IIRC this restriction is due to these graphs not being strongly
regular for the other values of q.
Certainly we can make that function more general, and test for the
strongly regular needs elsewhere.
(although functions with names starting from _ are not meant for general use...)

If you can open a trac ticket for this, please do and CC me on this
(incidentally I am working on https://trac.sagemath.org/ticket/26513
right now - and appear to have a fix :-))



>
> My current hack is to change
>
> if m % 2 == 0:
> if q in [2, 3]:
> G = _orthogonal_polar_graph(m, q, sign=sign, point_type=[1])
> else:
> raise ValueError("for m even q must be 2 or 3")
>
> to
>
> if m % 2 == 0:
> if q in [2, 3]:
> G = _orthogonal_polar_graph(m, q, sign=sign, point_type=[1])
> elif q == 5:
> G = _orthogonal_polar_graph(m, q, sign=sign, point_type=[1,4])
> elif q == 7:
> G = _orthogonal_polar_graph(m, q, sign=sign, point_type=[1,2,4])
> else:
> raise ValueError("for m even q must be 2 or 3")
>
> but maybe one can do this more properly in Sage itself? For q odd and m even, 
> point_type should simply be the set of all squares in GF(q). For q odd and m 
> odd (I did not copy this part in the code snippet above), it is either the 
> set of all squares or the set of all non-squares.
>
> For q even, one replaces square/non-square with the trace to distinguish.
>
> I never use Sage's GAP interface (usually, I use GAP directly), but I suspect 
> that anymore slightly more familiar can do this in a minute.
>
> All the best,
>
> Ferdinand
>
>
> [1] https://www.sciencedirect.com/science/article/pii/009731659090029V
> [2] https://arxiv.org/abs/1905.04677 or 
> https://link.springer.com/article/10.1007/s00493-020-4226-6
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/b523ed6d-f533-411a-bf37-0541557d9bb1%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq0C2f1bYsqdyhnM6p3NzqEzccfeDETYBt%3Djv4f%2BBn7%3Dxg%40mail.gmail.com.


[sage-devel] Suggestion: Remove restriction on q in NonisotropicOrthogonalPolarGraph

2020-04-03 Thread Ferdinand Ihringer
Dear Sage Developers,

My understanding is that I should ask for improvements here. Can one remove 
the restriction on q in NonisotropicOrthogonalPolarGraph in 
graphs/generators/classical_geometries.py? These graphs are nice for 
general q, see [1] or [2].

My current hack is to change

if m % 2 == 0:
if q in [2, 3]:
G = _orthogonal_polar_graph(m, q, sign=sign, point_type=[1])
else:
raise ValueError("for m even q must be 2 or 3")

to

if m % 2 == 0:
if q in [2, 3]:
G = _orthogonal_polar_graph(m, q, sign=sign, point_type=[1])
elif q == 5:
G = _orthogonal_polar_graph(m, q, sign=sign, point_type=[1,4])
elif q == 7:
G = _orthogonal_polar_graph(m, q, sign=sign, point_type=[1,2,4])
else:
raise ValueError("for m even q must be 2 or 3")

but maybe one can do this more properly in Sage itself? For q odd and m 
even, point_type should simply be the set of all squares in GF(q). For q 
odd and m odd (I did not copy this part in the code snippet above), it is 
either the set of all squares or the set of all non-squares.

For q even, one replaces square/non-square with the trace to distinguish.

I never use Sage's GAP interface (usually, I use GAP directly), but I 
suspect that anymore slightly more familiar can do this in a minute.

All the best,

Ferdinand


[1] https://www.sciencedirect.com/science/article/pii/009731659090029V
[2] https://arxiv.org/abs/1905.04677 or 
https://link.springer.com/article/10.1007/s00493-020-4226-6

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/b523ed6d-f533-411a-bf37-0541557d9bb1%40googlegroups.com.