Computing the degree of the projection Grassmannian
In this file, we compute the degree of the projection Grassmannian. To do so, we intersect the projection Grassmannian with an affine linear subspace of complementary dimension and then count the intersection points. More specifically, we put the generators for the ideal \(I_{n,d}\) into a system with the linear equations for the subspace and solve the system using monodromy.
[29]:
using HomotopyContinuation
using LinearAlgebra
using Combinatorics
When \(n\) and \(d\) are specified below, the remainder of the code computes the degree of the projection Grassmannian \(\textrm{pGr}(d, n)\).
[30]:
n = 5;
d = 3;
Create a symmetric variable matrix \(P\) and a list of equations defining the ideal \(I_{n,d}\), which is given by the entries of \(P^2 - P\) and \(\textrm{trace}(P)-d\).
[32]:
@var P[1:n, 1:n]
P = Symmetric(P)
p = [P[i,j] for i in 1:n for j in i:n]
Ind_generators = [[(P^2 - P)[i,j] for i in 1:n for j in i:n]; sum(diag(P)) - d];
Create a generic linear subspace defined by the variable matrix \(a\) which is used to compute the degree. We then shift the subspace by the vector \(b\) to obtain a generic affine linear subspace.
[33]:
@var a[1:d*(n-d), 1:Int(n*(n+1)/2)]
@var b[1:d*(n-d)]
L = sum(a * p + b, dims = 2);
We can now form a system from our generators and our affine linear equations with variables \(p\) and parameters \(a\) and \(b\).
[34]:
F = System([Ind_generators; vec(L)]; variables = p, parameters = [[(a...)...]; b]);
Solve the system using HomotopyContinuation’s monodromy method. The number of solutions is the degree of the projection Grassmannian \(\textrm{pGr}(d, n)\). Unfortunately we cannot certify the result as the system is not square.
[36]:
solns = monodromy_solve(F, threading=true)
[36]:
MonodromyResult
===============
• return_code → :heuristic_stop
• 40 solutions
• 280 tracked loops
• random_seed → 0x6d45fe2b