File: representations.rules

package info (click to toggle)
polymake 3.0r2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 19,752 kB
  • ctags: 30,928
  • sloc: cpp: 151,785; perl: 32,510; ansic: 3,597; java: 2,654; python: 278; makefile: 181; xml: 103; sh: 79
file content (126 lines) | stat: -rw-r--r-- 3,766 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#  Copyright (c) 1997-2015
#  Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
#  http://www.polymake.org
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 2, or (at your option) any
#  later version: http://www.gnu.org/licenses/gpl.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#-------------------------------------------------------------------------------

declare object Representation {

# the underlying permutation group 
property GROUP : Group;

# the dimension of the representation
property DEGREE : Int;

# the decomposition into irreducible representations, in the same order as the rows of the GROUP.CHARACTER_TABLE
property IRREDUCIBLE_DECOMPOSITION : Array<Int>;

}


declare object PermutationRepresentationOnSets : Representation {

# the list of sets on which the group acts
property DOMAIN : Array<Set<Int>>;

# the list of sets on which the group acts, ordered by orbits and conjugacy classes
property DOMAIN_IN_ORBIT_ORDER : Array<Set<Int>>;

# the union of all sets in DOMAIN
property UNDERLYING_SET : Set<Int>;

# the function that indexes these sets
property INDEX_OF : Map<Set<Int>, Int>;

# the function that indexes these sets
property INDEX_IN_ORBIT_ORDER_OF : Map<Set<Int>, Int>;

# the character of the representation
property CHARACTER : Array<Int>;

# the lex-min representatives for each orbit
property ORBIT_REPRESENTATIVES : Array<Set<Int>>;

# the size of each orbit
property ORBIT_SIZES : Array<Int>;

rule DEGREE : DOMAIN {
    $this->DEGREE = $this->DOMAIN->size;
}

rule UNDERLYING_SET : DOMAIN {
    my $s = new Set<Int>;
    foreach (@{$this->DOMAIN}) {
        $s += $_;
    }
    $this->UNDERLYING_SET = $s;
}

rule INDEX_OF : DOMAIN {
    $this->INDEX_OF(temporary) = index_of($this->DOMAIN);
}

rule INDEX_IN_ORBIT_ORDER_OF : DOMAIN_IN_ORBIT_ORDER {
    $this->INDEX_IN_ORBIT_ORDER_OF(temporary) = index_of($this->DOMAIN_IN_ORBIT_ORDER);
}

rule CHARACTER : GROUP.CONJUGACY_CLASS_REPRESENTATIVES, DOMAIN {
    my @character = ();
    foreach my $ccr (@{$this->GROUP->CONJUGACY_CLASS_REPRESENTATIVES}) {
        my $n_fix = 0;
        foreach my $set (@{$this->DOMAIN}) {
            my @image = ();
            foreach (@{$set}) {
                push @image, $ccr->[$_];
            } 
            my $image = new Set<Int>(\@image);
            if ($image == $set) {
                ++$n_fix;
            }
        }
        push @character, $n_fix;
    }
    $this->CHARACTER = new Array<Int>(\@character);
}

rule IRREDUCIBLE_DECOMPOSITION : CHARACTER, GROUP {
    $this->IRREDUCIBLE_DECOMPOSITION = irreducible_decomposition($this->CHARACTER, $this->GROUP);
}

rule DOMAIN_IN_ORBIT_ORDER : ORBIT_REPRESENTATIVES, GROUP.CONJUGACY_CLASSES {
    my @doo = ();
    foreach my $rep (@{$this->ORBIT_REPRESENTATIVES}) {
        my $orbit_bag = new Set<Set<Int>>;
        foreach my $cc (@{$this->GROUP->CONJUGACY_CLASSES}) {
            foreach my $g (@{$cc}) {
                my $img = new Set<Int>;
                foreach (@{$rep}) {
                    $img += $g->[$_];
                }
                $orbit_bag += $img;
            }
        }
        foreach (@{$orbit_bag}) {
            push @doo, new Set<Int>($_);
        }
    }
    $this->DOMAIN_IN_ORBIT_ORDER = new Array<Set<Int>>(\@doo);
}

} # end object PermutationRepresentationOnSets


# Local Variables:
# mode: perl
# cperl-indent-level:3
# indent-tabs-mode:nil
# End: