def __init__(self, cartan_type): """ TESTS:: sage: from sage.libs.coxeter3.coxeter_group import CoxeterGroup # optional - coxeter3 sage: CoxeterGroup(['A',2]) # optional - coxeter3 Coxeter group of type ['A', 2] implemented by Coxeter3 sage: TestSuite(CoxeterGroup(['A',2])).run() # optional - coxeter3 """ Parent.__init__(self, category=(FiniteCoxeterGroups() if cartan_type.is_finite() else CoxeterGroups())) self._coxgroup = get_CoxGroup(cartan_type) self._cartan_type = cartan_type
def __init__(self, n=5): r""" INPUT: - ``n`` - an integer with `n>=2` Construct the n-th DihedralGroup of order 2*n EXAMPLES:: sage: from sage.categories.examples.finite_coxeter_groups import DihedralGroup sage: DihedralGroup(3) The 3-th dihedral group of order 6 """ assert n >= 2 Parent.__init__(self, category=FiniteCoxeterGroups()) self.n = n