public void TestPow()
        {
            string polyBaseString = "2*X*Y^2 - 1";
            int    exponent       = 2;

            string expected = "4*X^2*Y^4 - 4*X*Y^2 + 1";

            MultivariatePolynomial polyBase = MultivariatePolynomial.Parse(polyBaseString);
            MultivariatePolynomial power    = MultivariatePolynomial.Pow(polyBase, exponent);

            string actual = power.ToString();

            TestContext.WriteLine($"Expected: \"{expected}\"; Actual: \"{actual}\"");
            Assert.AreEqual(expected, actual, $"Test of: MultivariatePolynomial.Pow({polyBaseString}, {exponent});");
        }
        public void TestFunctionalComposition001()
        {
            MultivariatePolynomial indeterminateX = MultivariatePolynomial.Parse("6*X + 1");

            MultivariatePolynomial zero     = MultivariatePolynomial.Parse("0");
            MultivariatePolynomial minusOne = MultivariatePolynomial.Parse("-1");
            MultivariatePolynomial one      = MultivariatePolynomial.Parse("1");
            MultivariatePolynomial X        = MultivariatePolynomial.Parse("X");

            MultivariatePolynomial even = MultivariatePolynomial.Parse("2*Y");
            MultivariatePolynomial odd  = MultivariatePolynomial.Parse("2*X + 1");


            string expecting1 = "1";
            string expecting2 = "6*X + 1";
            string expecting3 = "12*Y + 1";
            //string expecting4 = "";
            //string expecting5 = "";


            string actual1 = MultivariatePolynomial.Pow(indeterminateX, 0).ToString();
            string actual2 = MultivariatePolynomial.Pow(indeterminateX, 1).ToString();
            string actual3 = indeterminateX.FunctionalComposition(new List <Tuple <char, MultivariatePolynomial> >()
            {
                new Tuple <char, MultivariatePolynomial>('X', even)
            }).ToString();

            //string actual4 = composition4.ToString();
            //string actual5 = composition5.ToString();

            Assert.AreEqual(expecting1, actual1);
            Assert.AreEqual(expecting2, actual2);
            Assert.AreEqual(expecting3, actual3);
            //Assert.AreEqual(expecting4, actual4);
            //Assert.AreEqual(expecting5, actual5);
        }