# Ticket #4383: trac_4383-order-trivial-permgp3.patch

File trac_4383-order-trivial-permgp3.patch, 1.8 KB (added by wdj, 12 years ago)
• ## sage/groups/perm_gps/permgroup.py

```# HG changeset patch
# User David Joyner <wdjoyner@gmail.com>
# Date 1225504812 14400
# Node ID 89d9d290ee28d3e6f60c5c934545a24b0d7c82a6
# Parent  6c2e187f6c5ba5931c0542664b98443fcde44a18
patch for trivial group output - wdj

diff -r 6c2e187f6c5b -r 89d9d290ee28 sage/groups/perm_gps/permgroup.py```
 a self._gap_string = gap_group if isinstance(gap_group, str) else str(gap_group) self._gens = self._gens_from_gap() return gens = [PermutationGroupElement(x, check=False).list() for x in gens] self._deg = max([1]+[max(g) for g in gens]) gens = [PermutationGroupElement(x, self, check=False) for x in gens] if gens == []: gens = [()] self._gens = gens self._gap_string = 'Group(%s)'%gens gens = [PermutationGroupElement(gens[n],self, check=False) for n in range(1, int(gens.Length())+1)] if gens == []: gens = [self.identity()] gens = [()] return gens sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G.composition_series()  # random output [Permutation Group with generators [(1,2,3)(4,5), (3,4)], Permutation Group with generators [(1,5)(3,4), (1,5)(2,3), (1,5,4)], Permutation Group with generators [()]] sage: G = PermutationGroup([[(1,2,3),(4,5)], [(1,2)]]) sage: CS = G.composition_series() sage: CS[3] Permutation Group with generators [()] """ current_randstate().set_seed_gap()