def example(self, G = None): """ Return an example of group algebra. EXAMPLES:: sage: GroupAlgebras(QQ['x']).example() Group algebra of Dihedral group of order 8 as a permutation group over Univariate Polynomial Ring in x over Rational Field An other group can be specified as optional argument:: sage: GroupAlgebras(QQ).example(AlternatingGroup(4)) Group algebra of Alternating group of order 4!/2 as a permutation group over Rational Field """ from sage.groups.perm_gps.permgroup_named import DihedralGroup if G is None: G = DihedralGroup(4) return G.algebra(self.base_ring())
def example(self, G=None): """ Return an example of group algebra. EXAMPLES:: sage: GroupAlgebras(QQ[x]).example() Group algebra of Dihedral group of order 8 as a permutation group over Univariate Polynomial Ring in x over Rational Field An other group can be specified as optional argument:: sage: GroupAlgebras(QQ).example(SymmetricGroup(4)) Group algebra of Symmetric group of order 4! as a permutation group over Rational Field """ from sage.groups.perm_gps.permgroup_named import DihedralGroup if G is None: G = DihedralGroup(4) return G.algebra(self.base_ring())
def example(self): """ Returns an example of finite permutation group, as per :meth:`Category.example`. EXAMPLES:: sage: G = FinitePermutationGroups().example(); G Dihedral group of order 6 as a permutation group """ from sage.groups.perm_gps.permgroup_named import DihedralGroup return DihedralGroup(3)
def example(self, G = None): """ Returns an example of algebra with basis:: sage: HopfAlgebrasWithBasis(QQ['x']).example() An example of Hopf algebra with basis: the group algebra of the Dihedral group of order 6 as a permutation group over Univariate Polynomial Ring in x over Rational Field An other group can be specified as optional argument:: sage: HopfAlgebrasWithBasis(QQ).example(SymmetricGroup(4)) An example of Hopf algebra with basis: the group algebra of the Symmetric group of order 4! as a permutation group over Rational Field """ from sage.categories.examples.hopf_algebras_with_basis import MyGroupAlgebra from sage.groups.perm_gps.permgroup_named import DihedralGroup if G is None: G = DihedralGroup(3) return MyGroupAlgebra(self.base_ring(), G)
print('Draw the flower with 6 sides out to layer 4.') f.render_flower((elems[1], elems[1]), 6, 4, 'flower') print('') print('The default colors aren\'t the best, so we override them.') f.render_flower((elems[1], elems[1]), 6, 4, 'flower_better_colors', initial_colors=('blue', 'red', 'green', 'purple', 'orange')) print('') print( 'Let\'s examine a batch of \'flower\' covering space images for the dihedral group on 4 vertices.' ) b = GroupStructure(DihedralGroup(4)) print(b) print('') g = OperationComplex(b, '*') elems = b.canonical_order x = elems[2] y = elems[5] print('We will start our complexes with the product of {} and {}.'.format( x, y)) print('We let the number of \'petals\' on our complex vary from 4 to 29.') print( 'We also adjust the number of \'layers\' we draw in order to avoid overlapping triangles in the plane.' ) cols = ('blue', 'red', 'green', 'purple', 'orange') for i in range(4, 30): g.render_flower((x, y), i, i, 'dihedral{}'.format(i), initial_colors=cols)