summaryrefslogtreecommitdiffstats
path: root/test.g
blob: 40a36c2e2fd9af91ec109dd986c67bb674f72c3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
TestRandom := function(n)
  local
    p,
    g,
    l, 
    i;

  p := RandomPartialPerm(n);
  p := ComponentsOfPartialPerm(p);
  g := YoungGroupFromPartition(p);
  l := SubgroupLadder(g);
  
  for i in [2..Length(l)] do
    if Order(l[i]) < Order(l[i-1]) then
      if not (IsSubgroup(l[i-1],l[i]) and Order(l[i-1])/Order(l[i]) <= n) then
        return false;
      fi;
    else
      if not (IsSubgroup(l[i],l[i-1]) and Order(l[i])/Order(l[i-1]) <= n) then
        return false;
      fi;
    fi;
  od;

  return true;
end;