does Sage support Grassmannians over finite fields?

78 views
Skip to first unread message

Jackson Walters

unread,
Mar 25, 2025, 1:46:56 PM3/25/25
to sage-devel
Does Sage support computing Gr_{F_q}(k,r), the space of k-hyperplanes through the origin in GF(q**r)? I looked around for things like Schubert cells and didn't see anything immediately relevant. I've started to write some stuff for k=2. I may do a PR if it's not already available.

Thanks,
Jackson
gr_2.py

Dima Pasechnik

unread,
Mar 25, 2025, 5:33:55 PM3/25/25
to sage-...@googlegroups.com

Jackson Walters

unread,
Mar 25, 2025, 6:04:51 PM3/25/25
to sage-...@googlegroups.com
Thanks, that's helpful.

G = graphs.GrassmannGraph(5, 4, 2); G

gives 806 vertices, as expected, but why do the vertices seem to have six points?

G.vertices()[0]
{(0, 0, 0, 1), (1, 0, 0, 1), (1, 0, 0, 2), (1, 0, 0, 4), (1, 0, 0, 0), (1, 0, 0, 3)}

I don't see anything about this in the documentation. Shouldn't it be just two basis vectors that span the subspace?

Thanks,
Jackson

--
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+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-devel/68A3261B-8643-43BC-BFBF-AB2DBF9D89FB%40gmail.com.

Jackson Walters

unread,
Mar 25, 2025, 6:24:01 PM3/25/25
to sage-...@googlegroups.com
I guess they are projective lines with q+1 points arising from designs.ProjectiveGeometryDesign. However, the blocks (the 2-subspaces) should be in one-to-one correspondence with the vertices.

Jackson Walters

unread,
Mar 25, 2025, 6:42:42 PM3/25/25
to sage-...@googlegroups.com
I suppose it comes down to this:

from sage.combinat.designs import design_catalog as designs
PG = designs.ProjectiveGeometryDesign(4 - 1, 2 - 1, 5)
PG.blocks()[0]
[(1, 0, 0, 0), (1, 0, 0, 1), (1, 0, 0, 2), (1, 0, 0, 3), (1, 0, 0, 4), (0, 0, 0, 1)]

dim...@gmail.com

unread,
Mar 26, 2025, 12:48:56 AM3/26/25
to sage-...@googlegroups.com
On Tue, Mar 25, 2025 at 06:04:30PM -0400, Jackson Walters wrote:
> Thanks, that's helpful.
>
> G = graphs.GrassmannGraph(5, 4, 2); G
>
> gives 806 vertices, as expected, but why do the vertices seem to have six
> points?
>
> G.vertices()[0]
> {(0, 0, 0, 1), (1, 0, 0, 1), (1, 0, 0, 2), (1, 0, 0, 4), (1, 0, 0, 0), (1,
> 0, 0, 3)}
>
> I don't see anything about this in the documentation. Shouldn't it be just
> two basis vectors that span the subspace?

The 3rd parameter, the dimension of the subspaces, is equal to
2. Thus these are all the q+1 (projective) points in the projective line over
GF(q), with q=5. It was a quick and not optimised coding.

If you would like to change this to a more economic representation,
please open a PR.
As the documentation doesn't say anything about a particular way the
subspaces are represented, it can be changed quickly, no deprecation
would be needed.

Dima

>
> Thanks,
> Jackson
>
> On Tue, Mar 25, 2025 at 5:33 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> > We have functionality to build Grassmann graphs. See GrassmannGraph in
> >
> > <
> > https://doc.sagemath.org/html/en/reference/graphs/sage/graphs/graph_generators.html#sage.graphs.graph_generators.graphgenerators.paleygraph
> > >
> >
> >
> > On 25 March 2025 12:46:56 GMT-05:00, Jackson Walters <
> > jackson...@gmail.com> wrote:
> >
> >> Does Sage support computing Gr_{F_q}(k,r), the space of k-hyperplanes
> >> through the origin in GF(q**r)? I looked around for things like Schubert
> >> cells and didn't see anything immediately relevant. I've started to write
> >> some stuff for k=2. I may do a PR if it's not already available.
> >>
> >> Thanks,
> >> Jackson
> >>
> >> --
> > 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+...@googlegroups.com.
> > To view this discussion visit
> > https://groups.google.com/d/msgid/sage-devel/68A3261B-8643-43BC-BFBF-AB2DBF9D89FB%40gmail.com
> > <https://groups.google.com/d/msgid/sage-devel/68A3261B-8643-43BC-BFBF-AB2DBF9D89FB%40gmail.com?utm_medium=email&utm_source=footer>
> > .
> >
>
> --
> 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+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/CAGqtwVBaOiXUP4NJiW%2BF1nY9k5Zjmhp4tSuH%3DSNvtSS1xtwhWA%40mail.gmail.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages