public static CSATProblem reduct(CSATProblem problem)
        {
            CLiteralSet newLiterals = new CLiteralSet();
            CClausuleSet newClausules = new CClausuleSet();

            newLiterals.addAllLiterals(problem.getLiterals());

            for (int i = 0; i < problem.getClausules().getClausules().Count; i++) { // por cada clausula de entrada

                if (problem.getClausules().getClausules()[i].getSize() == 1)

                    caseSize1(problem.getClausules().getClausules()[i], newLiterals, newClausules);

                else if (problem.getClausules().getClausules()[i].getSize() == 2)

                    caseSize2(problem.getClausules().getClausules()[i], newLiterals, newClausules);

                else if (problem.getClausules().getClausules()[i].getSize() == 3)

                    caseSize3(problem.getClausules().getClausules()[i], newLiterals, newClausules);

                else if (problem.getClausules().getClausules()[i].getSize() > 3)

                    caseSize4(problem.getClausules().getClausules()[i], newLiterals, newClausules);

            }

            return new CThreeSATProblem(newLiterals, newClausules);
        }
        private void example1()
        {
            bool[] directs = new bool[1];
            CLiteral[] ls = new CLiteral[1];
            ls[0] = CLiteral.generateLiteral(true);
            directs[0] = true;

            CLiteralSet literalSet = new CLiteralSet();
            for (int i = 0; i < ls.Count(); i++)
                literalSet.addLiteral(ls[i]);

            CClausuleSet clausuleSet = new CClausuleSet();
            clausuleSet.addClausule(new CClausule(ls, directs));

            CSATProblem problem = new CSATProblem(literalSet, clausuleSet);

            txOutput.Text = problem.toString();

            txOutput.Text += problem.isSatisfactible().ToString() + Environment.NewLine;

            txOutput.Text += CProblemReduction.reduct(problem).toString();
        }