本文整理汇总了Python中sympy.combinatorics.named_groups.DihedralGroup.schreier_sims_incremental方法的典型用法代码示例。如果您正苦于以下问题:Python DihedralGroup.schreier_sims_incremental方法的具体用法?Python DihedralGroup.schreier_sims_incremental怎么用?Python DihedralGroup.schreier_sims_incremental使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.combinatorics.named_groups.DihedralGroup
的用法示例。
在下文中一共展示了DihedralGroup.schreier_sims_incremental方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_remove_gens
# 需要导入模块: from sympy.combinatorics.named_groups import DihedralGroup [as 别名]
# 或者: from sympy.combinatorics.named_groups.DihedralGroup import schreier_sims_incremental [as 别名]
def test_remove_gens():
S = SymmetricGroup(10)
base, strong_gens = S.schreier_sims_incremental()
new_gens = _remove_gens(base, strong_gens)
assert _verify_bsgs(S, base, new_gens) is True
A = AlternatingGroup(7)
base, strong_gens = A.schreier_sims_incremental()
new_gens = _remove_gens(base, strong_gens)
assert _verify_bsgs(A, base, new_gens) is True
D = DihedralGroup(2)
base, strong_gens = D.schreier_sims_incremental()
new_gens = _remove_gens(base, strong_gens)
assert _verify_bsgs(D, base, new_gens) is True
示例2: test_schreier_sims_incremental
# 需要导入模块: from sympy.combinatorics.named_groups import DihedralGroup [as 别名]
# 或者: from sympy.combinatorics.named_groups.DihedralGroup import schreier_sims_incremental [as 别名]
def test_schreier_sims_incremental():
identity = Permutation([0, 1, 2, 3, 4])
TrivialGroup = PermutationGroup([identity])
base, strong_gens = TrivialGroup.schreier_sims_incremental(base=[0, 1, 2])
assert _verify_bsgs(TrivialGroup, base, strong_gens) is True
S = SymmetricGroup(5)
base, strong_gens = S.schreier_sims_incremental(base=[0, 1, 2])
assert _verify_bsgs(S, base, strong_gens) is True
D = DihedralGroup(2)
base, strong_gens = D.schreier_sims_incremental(base=[1])
assert _verify_bsgs(D, base, strong_gens) is True
A = AlternatingGroup(7)
gens = A.generators[:]
gen0 = gens[0]
gen1 = gens[1]
gen1 = rmul(gen1, ~gen0)
gen0 = rmul(gen0, gen1)
gen1 = rmul(gen0, gen1)
base, strong_gens = A.schreier_sims_incremental(base=[0, 1], gens=gens)
assert _verify_bsgs(A, base, strong_gens) is True
C = CyclicGroup(11)
gen = C.generators[0]
base, strong_gens = C.schreier_sims_incremental(gens=[gen**3])
assert _verify_bsgs(C, base, strong_gens) is True