M2
This commit is contained in:
46
src/Algebra/Groups/Group.cs
Normal file
46
src/Algebra/Groups/Group.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
namespace Skeleton.Algebra.Groups;
|
||||
|
||||
/// <summary>
|
||||
/// a set of elements closed under group operation
|
||||
/// </summary>
|
||||
/// <typeparam name="TElement"></typeparam>
|
||||
public abstract class Group<TElement>
|
||||
{
|
||||
/// <summary>
|
||||
/// unit of the group<br/>
|
||||
/// unit * x = x * unit = x for all x in group
|
||||
/// </summary>
|
||||
public abstract TElement GroupUnit { get; }
|
||||
/// <summary>
|
||||
/// inverse of the element under group operation
|
||||
/// </summary>
|
||||
/// <param name="element"></param>
|
||||
/// <returns></returns>
|
||||
public abstract TElement GroupInv(TElement element);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="a"></param>
|
||||
/// <param name="b"></param>
|
||||
/// <returns></returns>
|
||||
public abstract TElement GroupOperation(TElement a, TElement b);
|
||||
|
||||
/// <summary>
|
||||
/// Commutator of group
|
||||
/// </summary>
|
||||
/// <param name="a">a</param>
|
||||
/// <param name="b">b</param>
|
||||
/// <returns></returns>
|
||||
public TElement GroupCommutator(TElement a, TElement b) =>
|
||||
GroupOperation(GroupOperation(a, b), GroupOperation(GroupInv(a), GroupInv(b)));
|
||||
/// <summary>
|
||||
/// a conjugate of b => aba^{-1}
|
||||
/// </summary>
|
||||
/// <param name="a">a</param>
|
||||
/// <param name="b">b</param>
|
||||
/// <returns>a b a^{-1}</returns>
|
||||
public TElement Conjugation(TElement a, TElement b) =>
|
||||
GroupOperation(a, GroupOperation(b, GroupInv(a)));
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user