diff options
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/irsn.spad.pamphlet | 2 | ||||
-rw-r--r-- | src/algebra/perm.spad.pamphlet | 36 | ||||
-rw-r--r-- | src/algebra/permgrps.spad.pamphlet | 28 | ||||
-rw-r--r-- | src/algebra/rep1.spad.pamphlet | 2 |
4 files changed, 31 insertions, 37 deletions
diff --git a/src/algebra/irsn.spad.pamphlet b/src/algebra/irsn.spad.pamphlet index 95d9a257..5b2a4f48 100644 --- a/src/algebra/irsn.spad.pamphlet +++ b/src/algebra/irsn.spad.pamphlet @@ -171,7 +171,7 @@ IrrRepSymNatPackage(): public == private where listPermutation(pi) == li : L I := nil$(L I) for k in n..1 by -1 repeat - li := cons(eval(pi,k)$(PERM I),li) + li := cons(pi.k,li) li signum(numberOfRowTableau, numberOfColumnTableau,pi) == diff --git a/src/algebra/perm.spad.pamphlet b/src/algebra/perm.spad.pamphlet index 69f33f83..2dd9da5b 100644 --- a/src/algebra/perm.spad.pamphlet +++ b/src/algebra/perm.spad.pamphlet @@ -15,7 +15,7 @@ ++ Authors: Holger Gollan, Johannes Grabmeier, Gerhard Schneider ++ Date Created: 27 July 1989 ++ Date Last Updated: 29 March 1990 -++ Basic Operations: cycle, cycles, eval, orbit +++ Basic Operations: cycle, cycles, orbit ++ Related Constructors: PermutationGroup, PermutationGroupExamples ++ Also See: RepresentationTheoryPackage1 ++ AMS Classifications: @@ -24,7 +24,8 @@ ++ Description: PermutationCategory provides a categorial environment ++ for subgroups of bijections of a set (i.e. permutations) -PermutationCategory(S:SetCategory): Category == Group with +PermutationCategory(S:SetCategory): Category == + Join(Group,Eltable(S,S)) with cycle : List S -> % ++ cycle(ls) coerces a cycle {\em ls}, i.e. a list with not ++ repetitions to a permutation, which maps {\em ls.i} to @@ -37,12 +38,9 @@ PermutationCategory(S:SetCategory): Category == Group with ++ {\em ls.i} to {\em ls.i+1}, indices modulo the length of the list, ++ then these permutations are mutiplied. ++ Error: if repetitions occur in one cycle. - eval : (%,S) -> S - ++ eval(p, el) returns the image of {\em el} under the - ++ permutation p. - elt : (%,S) -> S - ++ elt(p, el) returns the image of {\em el} under the - ++ permutation p. + support: % -> Set S + ++ \spad{support p} returns the set of points not fixed by the + ++ permutation \spad{p}. orbit : (%,S) -> Set S ++ orbit(p, el) returns the orbit of {\em el} under the ++ permutation p, i.e. the set which is given by applications of @@ -61,7 +59,7 @@ PermutationCategory(S:SetCategory): Category == Group with ++ Authors: Johannes Grabmeier, Holger Gollan ++ Date Created: 19 May 1989 ++ Date Last Updated: 2 June 2006 -++ Basic Operations: _*, degree, movedPoints, cyclePartition, order, +++ Basic Operations: _*, degree, support, cyclePartition, order, ++ numberOfCycles, sign, even?, odd? ++ Related Constructors: PermutationGroup, PermutationGroupExamples ++ Also See: RepresentationTheoryPackage1 @@ -126,8 +124,6 @@ Permutation(S:SetCategory): public == private where degree : % -> NonNegativeInteger ++ degree(p) retuns the number of points moved by the ++ permutation p. - movedPoints : % -> Set S - ++ movedPoints(p) returns the set of points moved by the permutation p. cyclePartition : % -> Partition ++ cyclePartition(p) returns the cycle structure of a permutation ++ p including cycles of length 1 only if S is finite. @@ -300,7 +296,7 @@ Note that before [[patch--50]] this read coercePreimagesImages preImageAndImage == p : % := [preImageAndImage.1,preImageAndImage.2] \end{verbatim} -causing bugs when computing [[movedPoints]], [[fixedPoints]], [[even?]], +causing bugs when computing [[support]], [[fixedPoints]], [[even?]], [[odd?]], etc., as reported in Issue~\#295. The other coercion facilities check for fixed points. It also seems that [[*]] @@ -308,7 +304,7 @@ removes fixed points from its result. <<TEST PERM>>= p := coercePreimagesImages([[1,2,3],[1,2,3]]) - movedPoints p -- should return {} + support p -- should return {} even? p -- should return true p := coercePreimagesImages([[0,1,2,3],[3,0,2,1]])$PERM ZMOD 4 fixedPoints p -- should return {2} @@ -319,9 +315,9 @@ removes fixed points from its result. <<domain PERM Permutation>>= - movedPoints p == construct p.1 + support p == construct p.1 - degree p == #movedPoints p + degree p == #support p p = q == #(preimp := p.1) ~= #(preimq := q.1) => false @@ -334,12 +330,12 @@ removes fixed points from its result. orbit(p ,el) == -- start with a 1-element list: out : Set S := brace list el - el2 := eval(p, el) + el2 := p(el) while el2 ~= el repeat -- be carefull: insert adds one element -- as side effect to out insert!(el2, out) - el2 := eval(p, el2) + el2 := p(el2) out cyclePartition p == @@ -450,13 +446,11 @@ removes fixed points from its result. inv p == [p.2, p.1] - eval(p, el) == + elt(p,el) == pos := position(el, p.1) pos = 0 => el (p.2).pos - elt(p, el) == eval(p, el) - numberOfCycles p == #coerceToCycle(p, false) @@ -480,7 +474,7 @@ Up to [[patch--50]] we did not check for duplicates. Up to [[patch--50]] we did not check for duplicates. <<domain PERM Permutation>>= - fixedPoints ( p ) == complement movedPoints p + fixedPoints ( p ) == complement support p cyclePartition p == pt := partition([#c::PI for c in coerceToCycle(p, false)])$Partition diff --git a/src/algebra/permgrps.spad.pamphlet b/src/algebra/permgrps.spad.pamphlet index 5d69a574..98e2ab75 100644 --- a/src/algebra/permgrps.spad.pamphlet +++ b/src/algebra/permgrps.spad.pamphlet @@ -116,8 +116,8 @@ PermutationGroup(S:SetCategory): public == private where ++ wordInGenerators(p,gp) returns the word for the permutation p ++ in the original generators of the group {\em gp}, ++ represented by the indices of the list, given by {\em generators}. - movedPoints : % -> FSET S - ++ movedPoints(gp) returns the points moved by the group {\em gp}. + support : % -> FSET S + ++ support(gp) returns the points moved by the group {\em gp}. < : (%,%) -> B ++ gp1 < gp2 returns true if and only if {\em gp1} ++ is a proper subgroup of {\em gp2}. @@ -261,7 +261,7 @@ PermutationGroup(S:SetCategory): public == private where newList := nil()$(L S) workList := orbitList.pos for j in #workList..1 by -1 repeat - newList := cons ( eval ( gen , workList.j ) , newList ) + newList := cons (gen(workList.j) , newList ) if not member?( newList , orbitList ) then orbitList := cons ( newList , orbitList ) pos := pos + 1 @@ -298,10 +298,10 @@ PermutationGroup(S:SetCategory): public == private where true pointList(group : %) : L S == - support : FSET S := brace() -- empty set !! + s : FSET S := brace() -- empty set !! for perm in group.gens repeat - support := union(support, movedPoints perm) - parts support + s := union(s, support perm) + parts s orbitWithSvc ( group : L V NNI , point : NNI ) : REC == -- compute orbit with Schreier vector, "-2" means not in the orbit, @@ -469,7 +469,7 @@ PermutationGroup(S:SetCategory): public == private where for ggg in 1..#gp repeat q := new(degree,0)$(V NNI) for i in 1..degree repeat - newEl := eval ( gp.ggg , supp.i ) + newEl := elt(gp.ggg,supp.i) pos2 := position ( newEl , supp ) q.i := pos2 pretend NNI newGroup := cons ( q , newGroup ) @@ -597,7 +597,7 @@ PermutationGroup(S:SetCategory): public == private where -- internal membership testing supp := pointList gp outlist := nil()$(L NNI) - mP : L S := parts movedPoints p + mP : L S := parts support p for x in mP repeat not member? (x, supp) => return [ false , nil()$(L NNI) ] if flag then @@ -617,7 +617,7 @@ PermutationGroup(S:SetCategory): public == private where degree := # supp pp := new(degree,0)$(V NNI) for i in 1..degree repeat - el := eval ( p , supp.i ) + el := p(supp.i) pos := position ( el , supp ) pp.i := pos::NNI words := nil()$(L L NNI) @@ -649,7 +649,7 @@ PermutationGroup(S:SetCategory): public == private where elt ( gp , i ) == (gp.gens).i - movedPoints ( gp ) == brace pointList gp + support ( gp ) == brace pointList gp random ( group , maximalNumberOfFactors ) == maximalNumberOfFactors < 1 => 1$(PERM S) @@ -707,7 +707,7 @@ PermutationGroup(S:SetCategory): public == private where outSet orbits ( gp ) == - spp := movedPoints gp + spp := support gp orbits := nil()$(L FSET S) while cardinality spp > 0 repeat el := extract! spp @@ -734,17 +734,17 @@ PermutationGroup(S:SetCategory): public == private where shortenWord ( outlist , gp ) gp1 < gp2 == - not empty? difference ( movedPoints gp1 , movedPoints gp2 ) => false + not empty? difference ( support gp1 , support gp2 ) => false not subgroup ( gp1 , gp2 ) => false order gp1 = order gp2 => false true gp1 <= gp2 == - not empty? difference ( movedPoints gp1 , movedPoints gp2 ) => false + not empty? difference ( support gp1 , support gp2 ) => false subgroup ( gp1 , gp2 ) gp1 = gp2 == - movedPoints gp1 ~= movedPoints gp2 => false + support gp1 ~= support gp2 => false if #(gp1.gens) <= #(gp2.gens) then not subgroup ( gp1 , gp2 ) => return false else diff --git a/src/algebra/rep1.spad.pamphlet b/src/algebra/rep1.spad.pamphlet index f26ae02c..dde33bc9 100644 --- a/src/algebra/rep1.spad.pamphlet +++ b/src/algebra/rep1.spad.pamphlet @@ -302,7 +302,7 @@ RepresentationPackage1(R): public == private where -- permutations are assumed to permute {1,2,...,n} a : M I := zero(n :: NNI, n :: NNI) for i in 1..n repeat - a(eval(p,i)$(PERM I),i) := 1 + a(p.i,i) := 1 a |