Class DihedralGroup

java.lang.Object
org.episteme.core.mathematics.algebra.groups.DihedralGroup
All Implemented Interfaces:
Group<DihedralGroup.Element>, Magma<DihedralGroup.Element>, Monoid<DihedralGroup.Element>, Set<DihedralGroup.Element>

public class DihedralGroup extends Object implements Group<DihedralGroup.Element>
Represents a Dihedral Group D_n of order 2n.

Elements are symmetries of a regular n-gon: rotations and reflections. Represented as s^a * r^b where a in {0, 1} and b in {0, ..., n-1}.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • DihedralGroup

      public DihedralGroup(int n)
  • Method Details

    • getN

      public int getN()
    • operate

      Description copied from interface: Magma
      Performs the binary operation on two elements.

      This is the fundamental operation of a magma. The result must be an element of this magma (closure property).

      Properties: None required (not necessarily associative or commutative)

      Specified by:
      operate in interface Magma<DihedralGroup.Element>
      Parameters:
      left - the first operand
      right - the second operand
      Returns:
      the result of a ∗ b
      See Also:
    • identity

      public DihedralGroup.Element identity()
      Description copied from interface: Monoid
      Returns the identity element of this monoid.

      Satisfies: e ∗ a = a ∗ e = a for all a.

      Specified by:
      identity in interface Monoid<DihedralGroup.Element>
      Returns:
      the identity element
    • inverse

      public DihedralGroup.Element inverse(DihedralGroup.Element element)
      Description copied from interface: Group
      Returns the inverse of the given element.

      For element a, returns a⁻¹ such that: a ∗ a⁻¹ = a⁻¹ ∗ a = e (identity).

      Specified by:
      inverse in interface Group<DihedralGroup.Element>
      Parameters:
      element - the element to invert
      Returns:
      the inverse element
    • isCommutative

      public boolean isCommutative()
      Description copied from interface: Group
      Tests whether this is an abelian (commutative) group.
      Specified by:
      isCommutative in interface Group<DihedralGroup.Element>
      Specified by:
      isCommutative in interface Magma<DihedralGroup.Element>
      Returns:
      true if this group is abelian
    • description

      public String description()
      Description copied from interface: Set
      Returns a human-readable description of this set.

      Examples:

      • "ℝ (Real Numbers)"
      • "ℤ/12ℤ (Integers modulo 12)"
      • "{1, 2, 3, 4, 5}"

      Specified by:
      description in interface Set<DihedralGroup.Element>
      Returns:
      a description of this set
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Set
      Returns true if this set contains no elements.

      The empty set (∅) is a fundamental concept in set theory. It is the unique set containing no elements.

      Specified by:
      isEmpty in interface Set<DihedralGroup.Element>
      Returns:
      true if this set is empty
    • contains

      public boolean contains(DihedralGroup.Element element)
      Description copied from interface: Set
      Tests whether this set contains the specified element.

      This is the fundamental operation of a set - membership testing.

      Specified by:
      contains in interface Set<DihedralGroup.Element>
      Parameters:
      element - the element to test for membership
      Returns:
      true if this set contains the element, false otherwise
      See Also: