/// <summary> /// Find the inverse of the given element in the group. /// </summary> /// <param name="g">The element to find the inverse of</param> /// <returns>The inverse of the given element</returns> public abstract GroupElement <I> GetInverse(GroupElement <I> g);
public GroupElement <I> times(GroupElement <I> g) { return(((Group <I>)g.structure).MultiplyElements(this, g)); }
/// <summary> /// Find the product of two elements in the group. /// </summary> /// <param name="g">The first element to multiply.</param> /// <param name="h">The second element to multiply.</param> /// <returns>The element gh.</returns> public abstract GroupElement <I> MultiplyElements(GroupElement <I> g, GroupElement <I> h);
private bool has_inverses(GroupElement <I> identity) { return(Elements.Elements.Select(g1 => Elements.Elements.Any(g2 => identity.Equals(g1 * g2))).All(hasInverse => hasInverse)); }