Example #1
0
 /// <summary>
 /// Returns the semidirect product N x_f H.
 /// </summary>
 public static Group <Pair <T, U> > SemidirectProduct <T, U>(Group <T> n, Group <U> h, Func <U, T, T> f)
     where T : IEquatable <T>
     where U : IEquatable <U>
 {
     return(new Group <Pair <T, U> >(
                FiniteSet.CartesianProduct(n.Set, h.Set),
                (g1, g2) => new Pair <T, U>(n.Product(g1.First, f(g1.Second, g2.First)), h.Product(g1.Second, g2.Second)),
                g => { U inverse = h.Inverse(g.Second); return new Pair <T, U>(f(inverse, n.Inverse(g.First)), inverse); },
                new Pair <T, U>(n.Identity, h.Identity)
                ));
 }
Example #2
0
 /// <summary>
 /// Returns the direct product G_1 x G_2.
 /// </summary>
 public static Group <Pair <T, U> > DirectProduct <T, U>(Group <T> group1, Group <U> group2)
     where T : IEquatable <T>
     where U : IEquatable <U>
 {
     return(new Group <Pair <T, U> >(
                FiniteSet.CartesianProduct(group1.Set, group2.Set),
                (g1, g2) => new Pair <T, U>(group1.Product(g1.First, g2.First), group2.Product(g1.Second, g2.Second)),
                g => new Pair <T, U>(group1.Inverse(g.First), group2.Inverse(g.Second)),
                new Pair <T, U>(group1.Identity, group2.Identity)
                ));
 }