This first verifies that the conditions are either all partitions or all brackets, and that they form a Schubert problem on $Gr(k,n)$.
Then it computes the intersection number of the prodiuct of Schubert classes in the cohomology ring of the Grassmannnian
For instance, the problem of four lines is given by 4 partitions {1}$^4$ in $Gr(2,4)$
i1 : LRnumber({{1},{1},{1},{1}},2,4) o1 = 2 |
the same problem but using brackets instead of partitions
i2 : LRnumber({{2,4},{2,4},{2,4},{2,4}},2,4) o2 = 2 |
the same problem but using phc implementation of Littlewood-Richardson rule
i3 : LRnumber({{1},{1},{1},{1}},2,4,Strategy => "phc") o3 = 2 |
This uses the package Schubert2 and the Strategy "phc" requires the string parsing capabilities of Macaulay2 version 1.17 or later
The object LRnumber is a method function with options.