예제 #1
0
        public static bool IsNormal(Group <T> group, FiniteSet <T> subset)
        {
            foreach (T g in group.Set)
            {
                T inverse = group.Inverse(g);

                foreach (T n in subset)
                {
                    if (!subset.IsMember(group.Product(group.Product(g, n), inverse)))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
예제 #2
0
        public bool IsSubsetOf(FiniteSet <T> superset)
        {
            if (superset is FiniteSet <T> )
            {
                return(_set.IsSubsetOf(((FiniteSet <T>)superset)._set));
            }
            else
            {
                foreach (T element in _set)
                {
                    if (!superset.IsMember(element))
                    {
                        return(false);
                    }
                }

                return(true);
            }
        }
예제 #3
0
        public static bool IsSubgroup(Group <T> group, FiniteSet <T> subset)
        {
            if (!subset.IsSubsetOf(group.Set))
            {
                return(false);
            }

            foreach (T a in subset)
            {
                foreach (T b in subset)
                {
                    T inverse = group.Inverse(b);

                    if (!subset.IsMember(group.Product(a, inverse)))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }