public void CreateWithIdentity() { GeneratedGroup group = new GeneratedGroup(Element.CreateIdentity(4)); Assert.IsNotNull(group); Assert.AreEqual(1, group.Order); }
public void CreateWithSwapOrderTwo() { GeneratedGroup group = new GeneratedGroup(Element.CreateSwap(2)); Assert.IsNotNull(group); Assert.AreEqual(2, group.Order); }
public void CreateSymetricGroupSizeThree() { GeneratedGroup group = new GeneratedGroup(Element.CreateSwap(3), Element.CreateRotation(3)); Assert.IsNotNull(group); Assert.AreEqual(6, group.Order); }
public void TwoSymetricGroupsAreIsomorphic() { IGroup group1 = new GeneratedGroup(Element.CreateSwap(4), Element.CreateRotation(4)); IGroup group2 = new GeneratedGroup(Element.CreateSwap(4, 2), Element.CreateRotation(4)); Assert.IsTrue(GroupUtilities.AreIsomorphic(group1, group2)); }
public void CreateWithSwapOrderSix() { GeneratedGroup group = new GeneratedGroup(Element.CreateSwap(6)); Assert.IsNotNull(group); Assert.AreEqual(2, group.Order); }
public void TwoGroupsGeneratedByTwoNonOverlappingSwapsAreIsomorphic() { IGroup group1 = new GeneratedGroup(Element.CreateSwap(4), Element.CreateSwap(4, 2)); IGroup group2 = new GeneratedGroup(Element.CreateSwap(6, 2), Element.CreateSwap(6, 4)); Assert.IsTrue(GroupUtilities.AreIsomorphic(group1, group2)); }
public void CreateSymetricGroupSizeFour() { GeneratedGroup group = new GeneratedGroup(Element.CreateSwap(4), Element.CreateRotation(4)); Assert.IsNotNull(group); Assert.AreEqual(24, group.Order); }
public void IdentityIsNormalSubgroup() { IGroup group = new SymmetricGroup(3); IGroup id = new GeneratedGroup(Element.CreateIdentity(3)); Assert.IsTrue(GroupUtilities.IsNormalSubgroup(id, group)); }
public void GroupsGeneratedByDiffSizedSwapsAreIsomorphic() { IGroup group1 = new GeneratedGroup(Element.CreateSwap(3)); IGroup group2 = new GeneratedGroup(Element.CreateSwap(4)); Assert.IsTrue(GroupUtilities.AreIsomorphic(group1, group2)); }
public void GroupAndIdentityAreSubnormalGroups() { IGroup group = new SymmetricGroup(3); IGroup id = new GeneratedGroup(Element.CreateIdentity(3)); GroupUtilities.IsNormalSubgroup(group, group); GroupUtilities.IsNormalSubgroup(id, group); }
public void RotationsAreCyclic() { for (int k = 1; k <= 7; k++) { IGroup group = new GeneratedGroup(Element.CreateRotation(k)); Assert.IsTrue(GroupUtilities.IsCyclic(group)); } }
public void SwapsAreCyclic() { for (int k = 2; k <= 10; k++) { IGroup group = new GeneratedGroup(Element.CreateSwap(k)); Assert.IsTrue(GroupUtilities.IsCyclic(group)); } }
public void SymetricGroupSizeFourAreEqualToSymetrycGroup() { GeneratedGroup group = new GeneratedGroup(Element.CreateSwap(4), Element.CreateRotation(4)); SymmetricGroup group2 = new SymmetricGroup(4); Assert.AreEqual(group.Order, group2.Order); Assert.AreEqual(group.GetHashCode(), group2.GetHashCode()); Assert.AreEqual(group, group2); }
public void GetSubgroupsOfCyclicGroupSeven() { IGroup group = new GeneratedGroup(Element.CreateRotation(7)); IEnumerable <IGroup> subgroups = GroupUtilities.GetSubgroups(group); Assert.IsNotNull(subgroups); Assert.AreEqual(2, subgroups.Count()); }
public void GetSubgroupsOfCyclicGroupSeven() { IGroup group = new GeneratedGroup(Element.CreateRotation(7)); IEnumerable<IGroup> subgroups = GroupUtilities.GetSubgroups(group); Assert.IsNotNull(subgroups); Assert.AreEqual(2, subgroups.Count()); }
public void GroupsGeneratedByDiffPositionSwapsAreNotEqual() { IElement swap1 = Element.CreateSwap(3); IElement swap2 = Element.CreateRotation(4).Multiply(Element.CreateSwap(4)); IGroup group1 = new GeneratedGroup(swap1); IGroup group2 = new GeneratedGroup(swap2); Assert.IsFalse(GroupUtilities.AreEqual(group1, group2)); }
public void GroupsGeneratedByDiffPositionSwapsAreIsomorphic() { IElement swap1 = Element.CreateSwap(3); IElement swap2 = Element.CreateSwap(3, 1); IGroup group1 = new GeneratedGroup(swap1); IGroup group2 = new GeneratedGroup(swap2); Assert.IsTrue(GroupUtilities.AreIsomorphic(group1, group2)); }
public void PrimeRotationGroupsAreEqual() { IElement elementrot = Element.CreateRotation(5); IElement elementrot2 = elementrot.Multiply(elementrot); IGroup group1 = new GeneratedGroup(elementrot); IGroup group2 = new GeneratedGroup(elementrot2); Assert.IsTrue(GroupUtilities.AreEqual(group1, group2)); }
public void SubgroupsIncludesIdentityAndTotalGroup() { IGroup group = new SymmetricGroup(3); IGroup id = new GeneratedGroup(Element.CreateIdentity(3)); IEnumerable <IGroup> subgroups = GroupUtilities.GetSubgroups(group); Assert.IsTrue(subgroups.Contains(id)); Assert.IsTrue(subgroups.Contains(group)); }
public void CreateSymetricGroups() { int n = 1; for (int k = 2; k <= 5; k++) { GeneratedGroup group = new GeneratedGroup(Element.CreateSwap(k), Element.CreateRotation(k)); n *= k; Assert.IsNotNull(group); Assert.AreEqual(n, group.Order); } }
public void MultiplyGenerateSymmetricGroup() { IGroup group1 = new GeneratedGroup(Element.CreateRotation(4)); IGroup group2 = new GeneratedGroup(Element.CreateSwap(4)); IGroup group3 = GroupUtilities.Multiply(group1, group2); Assert.AreEqual(24, group3.Order); IGroup symm = new SymmetricGroup(4); Assert.IsTrue(GroupUtilities.AreEqual(group3, symm)); Assert.IsTrue(group3.Equals(symm)); }
public void TwoSymetricGroupsAreIsomorphic() { IGroup group1 = new GeneratedGroup(Element.CreateSwap(4), Element.CreateRotation(4)); IGroup group2 = new GeneratedGroup(Element.CreateSwap(4,2), Element.CreateRotation(4)); Assert.IsTrue(GroupUtilities.AreIsomorphic(group1, group2)); }
public void SubgroupsIncludesIdentityAndTotalGroup() { IGroup group = new SymmetricGroup(3); IGroup id = new GeneratedGroup(Element.CreateIdentity(3)); IEnumerable<IGroup> subgroups = GroupUtilities.GetSubgroups(group); Assert.IsTrue(subgroups.Contains(id)); Assert.IsTrue(subgroups.Contains(group)); }