sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 452 forks source link

Metaticket for combinatorial species #30727

Open mantepse opened 3 years ago

mantepse commented 3 years ago

In preparation for a long needed overhaul (and a workshop in early 2021 I am planning), let's collect tickets and issues related to combinatorial species here. An earlier roadmap is #10662. An earlier attempt to refactor the species code is #20622.

CC: @slel @sagetrac-tmonteil @MatthieuDien

Component: combinatorics

Keywords: species

Issue created by migration from https://trac.sagemath.org/ticket/30727

mantepse commented 1 year ago

αn⋅U represent action of the sequence of group actions over the set U

I have honestly no idea what this could mean. Alpha acts on F_n, not on U.

Sandstorm831 commented 1 year ago

Ohk, since you have asked about $\alpha_n \cdot U$, so that was amswer to that question, In my original answer I have written $(\alpha_n \cdot U)$ here $U$ is not a set but a sequence of a single set given to the species $G$ which is $U$, sorry for the confusing notations @mantepse

Sandstorm831 commented 1 year ago

Please have a look @mantepse

mantepse commented 1 year ago

You still did not explain what $\alpha_n\cdot U$ means.

Sandstorm831 commented 1 year ago

$\alpha_n \cdot U$ application of sequence of group actions $\alpha_n$ on the sequence the set $U$. let $\alpha_x$ as one of the group action of $\alpha_n$ then $\alpha_n \cdot U =$ { $\alpha_x \cdot U$ | $\forall x \in [n]$} where $[n] = (1,2,3..,n)$ and $\alpha_x \cdot U$ is the application of group action $\alpha_x$ on the set $U$ , here $U$ is a set, but in $\alpha_n \cdot U$ it is sequence of set of given to species.

Sandstorm831 commented 1 year ago

@mantepse please have a look now

mantepse commented 1 year ago

@Sandstorm831, it does not help if you repeat what you already wrote. The point you are missing is the definition of $\alpha_n \cdot U$. As I wrote above, a solution can be found in the book (exercise 2.6.27e).

Sandstorm831 commented 1 year ago

$\alpha_n \cdot U$ can be defined as $\alpha_n \cdot U = \alpha_n(\sigma_n, U)$ where $U$ is a sequence of set given to species and $\sigma_n$ is the sequence of group elements of $\mathfrak S_n$ I think this is what I can call a definition of $\alpha_n \cdot U$, and is best of my understanding. I have tried to look up in the book also, but I can't relate the statement of question you have asked to the statement they have written in it. please have a look @mantepse

mantepse commented 1 year ago

The statement I asked for is precisely exercise 2.6.27e.

Sandstorm831 commented 1 year ago

@mantepse , can I answer this question afterwards, as currently I am engaged in writing the project proposal regarding this project and need some help.

mantepse commented 1 year ago

Dear @Sandstorm831, I must admit that I am not willing to mentor you. I am sorry having to say that, but I do not have enough time and energy to start at the basics.

Sandstorm831 commented 1 year ago

@mantepse , I have tried my level best for this. I don't know what lead you to this conclusion, but I hope you find a suitable person for this project. I will try for some other project in sagemath. Thanks and Regards

mantepse commented 1 year ago

I honestly wish you all the best! As I wrote, I think that this is not an easy project, neither mathematically nor concerning the implementation design.

Newtech66 commented 1 year ago

Hi! I would like to preface this by saying I am a prospective GSoC applicant for SageMath. That being said...

I have taken an introductory course in abstract algebra, so I have a basic background in group theory, ring theory, and field theory. I also know a little bit of character theory, but I think I can learn it more in depth quickly. However, I do not have any background in combinatorial species (yet).

Given the above, I'd like to try my hand at implementing the Burnside ring. I'm not sure what functionality is required by "implementing" it. I took a look at this thread from 2021. So, is it functionality like what was requested there?

Also, how can I contact you? What kind of discussion is this thread appropriate for? Looking forward to hearing from you!

Newtech66 commented 1 year ago

Bump @mantepse

mantepse commented 1 year ago

Hi @Newtech66, sorry for the delay, I was at a conference.

Concerning the Burnside ring: elements are formal sums of isomorphism classes of group actions of a given group $G$ on finite sets. The implementation should provide several means to create ring elements, most importantly by specifying the group action explicitly. For example

# set up the action
sage: G = SymmetricGroup(4)
sage: X = Subsets(4, 2)
sage: a = lambda g, x: X([g(e) for e in x])
# mockup
sage: B = BurnsideRing(QQ, G)
sage: b = B(action=a, domain=X)
sage: b.marks()
(6, 2, 2, 0, 0, 2, 0, 0)
sage: b.group()
Permutation Group with generators [(3,4), (1,2)]
mantepse commented 1 year ago

Here is a brute force implementation without any bells and whistles:

    W = CoxeterGroup(["B", n], implementation = "matrix")
    G = W._gap_()
    tom = G.TableOfMarks()
    C = tom.GeneratorsSubgroupsTom()[1].Length()
    vec = []
    for i in range(1, C+1):
        H = tom.RepresentativeTom(i)
        fix = 0
        for x in X:
            iterator = H.Iterator()
            while not iterator.IsDoneIterator().sage():
                w = W(iterator.NextIterator())
                if not action(w, x) == x:
                    break
            else:
                fix += 1
        vec.append(fix)
    tom.DecomposedFixedPointVector(vec)
Newtech66 commented 1 year ago

Ok, here's what I understand:

In the brute force implementation, first we are creating a Weyl group of type $B_n$ as a matrix group acting on some ambient space. Taken directly from Sage, this is my first time trying to understand Coxeter groups.

The point is, we can build a table of marks for this group. So next we interface with GAP and get the Table of Marks.

A ring element of the Burnside ring of a group $G$ is given by $$\sum^{N}_{i=1} a_i [G/G_i]$$ where $a_i$ belongs to $\mathbb{Z}$ and $G_i$ is a representative of a conjugacy class of subgroups of $G$. My question here is, if Wikipedia says $a_i$ belongs to $\mathbb{Z}$, why are we using QQ (the rationals) in the mockup code?

Now enters the group action. We take a set $X$ on which we define the action of the group $\cdot : G \times X \rightarrow X$. The rest of the code, I didn't understand every line (the ones with iterators), but the gist is that we create the row vector of marks $u$ (which is, for each representative of a conjugacy class of subgroups, we evaluate the number of elements of $X$ which are left unchanged by the action of every element of the representative).

According to Wikipedia, we can now decompose $X$ into disjoint copies of orbits of type $G_i$, that is, we can get $a_i$ using the relation $aM=u$. That is what DecomposedFixedPointVector is doing. So now we have a ring element of the Burnside ring of $G$.

Newtech66 commented 1 year ago

b.marks() is clearly the row vector of marks as mentioned earlier. Could you please explain the output of b.group()?

@mantepse (Is it necessary to tag someone to notify them of a reply in a thread? Please let me know if I shouldn't do this.)

mantepse commented 1 year ago

Just to make it completely clear: what I wrote is a mockup, so better method names may exist. b.group() should return a representative of the conjugacy class of subgroups of the symmetric group corresponding to the given action. The W in my silly implementation could be just any group. It happened to be the hyperoctahedral group, because at the time I was experimenting with it.

Tagging is only necessary if the tagged person was not involved in the issue before.

Newtech66 commented 1 year ago

After completing this task, I can study about combinatorial species and cycle index series and try to provide the quotient species from G-species as required from #14347.

I plan to use the following reference: https://arxiv.org/abs/1312.0542

mantepse commented 1 year ago

An Implementation of this is already available. It only has to be integrated.

Newtech66 commented 1 year ago

More questions:

  1. What do you mean by integration of the implementation? How long would this take?
  2. I also have an interest in (a) implementing the notion of polynomial species and (b) establishing link to permutation groups, and thus providing the molecular/atomic decomposition of a species of fixed cardinality and thereby also decidable equality. I have looked at the paper you linked earlier for molecular/atomic decompositions, and I think it will take me about 1 week to familiarise myself with the math. It would be great if you could point to resources for polynomial species.
  3. Could you also tell me what kind of work has already been done, and what needs to be done for the above two tasks?
mantepse commented 1 year ago
  1. I don't know. Anything from a day to a week, but it is not clear whether this is worthwhile right now.
  2. To implement the molecular decomposition we essentially need the Burnside ring. A polynomial species is just a species for which $F[n]=\emptyset$ when $n$ is large enough. There is nothing to do here.

The tasks really are as follows:

  1. implement the Burnside ring. A rough implementation should not take maybe a week or two, which includes time to make yourself familiar with the coding practices and the fundamental structures in sage.
  2. implement the molecular decomposition for univariate species.
  3. work out how to implement multivariate species.
  4. work out how to obtain isomorphism types of operations other than sum and product.

Items 3 and 4 are partially pen and paper work, and the hardest tasks. To make the project a success, I suspect that anybody tackling this would have to start thinking about them very soon, long before the actual coding.

Item 4 may be linked to 'tilde' species, as defined on page 310, Definition 1 of the book. The problem I currently have with this definition is that $\tilde F$ has a huge number of structures: $n!$ times the number of isomorphism types of $F[n]$. So, this is very beautiful from a mathematical point of view, but possibly impractical to work with on a computer.

Currently, the isomorphism types are programmed for each species and for each operation on species separately. In particular, the isomorphism types of a sum (or product) happen to be the pairs of isomorphism types of the two summands (respectively factors). But this does not work for other operations - using the 'tilde' species would always work.

Alternatively, we can obtain the isomorphism types of the substitution species (as in section 1.4 of the book) if we can obtain the isomorphism types with respect to a Young subgroup of the symmetric group of a species. But I am not sure whether this is the correct way to do it.

Newtech66 commented 1 year ago

Where in the book can I find a discussion of multivariate species?

mantepse commented 1 year ago

That's 2.4. Extension to the Multisort Context. Personally, I find the name multisort OK, but multiset (definition 2) misleading. A multiset in the sense of the book is simply a tuple of sets of labels.

mantepse commented 1 year ago

Hi @Newtech66, did you get the zoom link?