def leon_trivial2(): from permutation import Permutation from refinement import SubgroupFamily, PartitionStabaliserFamily, Refinement from partition import Partition from group import PermGroup from leon_search import PartitionBacktrackWorkhorse as PBW from coset_property import CosetProperty, SubgroupProperty, PartitionStabaliserProperty cf = Permutation.read_cycle_form a = cf([[2, 3], [4, 6], [5, 8], [9, 11]], 13) b = cf([[1, 2, 4, 7, 9, 3, 5, 6, 8, 10, 11, 12, 13]], 13) G = PermGroup([a, b]) fam_subgroup = SubgroupFamily(G) prop_subgroup = SubgroupProperty(G) stab = Partition([[1, 2], [3, 4]]) fam_part_stab = PartitionStabaliserFamily(stab) prop_part_stab = PartitionStabaliserProperty(stab) size = 4 fam = Refinement([]) prop = CosetProperty([prop_part_stab]) pbw = PBW(prop, fam, size) pbw.printing = True pbw.multi_backtrack = True print("Refinements: None") print("Desired property: partition stabaliser of [[1,2],[3,4]]") print("Heuristics: multi-backtrack") print("Search space: Sym(4)") gens = pbw.find_partition_backtrack_subgroup() print("Generators found:") for gen in gens: print(gen)
def leon_trivial55(): from permutation import Permutation from refinement import SubgroupFamily, PartitionStabaliserFamily, Refinement from partition import Partition from group import PermGroup from leon_search import PartitionBacktrackWorkhorse as PBW from coset_property import CosetProperty, SubgroupProperty, PartitionStabaliserProperty cf = Permutation.read_cycle_form a = cf([[1, 2, 3]], 4) b = cf([[2, 3, 4]], 4) G = PermGroup([a, b]) fam_subgroup = SubgroupFamily(G) prop_subgroup = SubgroupProperty(G) stab = Partition([[1, 2], [3, 4]]) fam_part_stab = PartitionStabaliserFamily(stab) prop_part_stab = PartitionStabaliserProperty(stab) size = 4 fam = Refinement([fam_subgroup, fam_part_stab]) prop = CosetProperty([prop_subgroup, prop_part_stab]) # [prop_part_stab]) pbw = PBW(prop, fam, size) pbw.printing = True pbw.multi_backtrack = True pbw.double_coset_check = False print("Refinements: partition stabaliser refinement and subgroup refinement") print("Desired property: partition stabaliser of [[1,2],[3,4]] and subgroup of alt(3)") print("Heuristics: multi-backtrack") print("Search space: Sym(4)") gens = pbw.find_partition_backtrack_subgroup() print("Generators found:") for gen in gens: print(gen)