src/main/java/org/thegalactic/rule/ImplicationalSystem.java
public int makeCanonicalBasis() {
        this.makeMinimum();
        ImplicationalSystem save = new ImplicationalSystem(this);
        for (Rule rule : save.sigma) {
            ImplicationalSystem epsilon = new ImplicationalSystem(this);
            epsilon.removeRule(rule);
            Rule tmp = new Rule(epsilon.closure(rule.getPremise()), rule.getConclusion());
            if (!rule.equals(tmp)) {
                this.replaceRule(rule, tmp);
            }
        }
        this.makeProper();
        return save.sizeRules() - this.sizeRules();
    }
/**
     * Replace this component by the canonical basis.
     *
     * Conclusion of each rule is first replaced by its closure. Then, premise
     * of each rule r is replaced by its closure in ImplicationalSystem \ rule.
     * This treatment is performed in (|Sigma||S|cl) where O(cl) is the
     * computation of a closure.
     *
     * @return the difference between the number of rules of this component
     *         before and after this treatment
     */
Replace this component by the canonical basis.
Conclusion of each rule is first replaced by its closure. Then, premise
of each rule r is replaced by its closure in ImplicationalSystem \ rule.
This treatment is performed in (|Sigma||S|cl) where O(cl) is the
computation of a closure.

@return the difference between the number of rules of this component
before and after this treatment
Replace this component by the canonical basis . Conclusion of each rule is first replaced by its closure . Then premise of each rule r is replaced by its closure in ImplicationalSystem \ rule . This treatment is performed in ( |Sigma||S|cl ) where O ( cl ) is the computation of a closure . @return the difference between the number of rules of this component before and after this treatment
public int makeCanonicalBasis() {
        this.makeMinimum();
        ImplicationalSystem save = new ImplicationalSystem(this);
        for (Rule rule : save.sigma) {
            ImplicationalSystem epsilon = new ImplicationalSystem(this);
            epsilon.removeRule(rule);
            Rule tmp = new Rule(epsilon.closure(rule.getPremise()), rule.getConclusion());
            if (!rule.equals(tmp)) {
                this.replaceRule(rule, tmp);
            }
        }
        this.makeProper();
        return save.sizeRules() - this.sizeRules();
    }
public int makeCanonicalBasis ( ) { this . makeMinimum ( ) ; ImplicationalSystem save = new ImplicationalSystem ( this ) ; for ( Rule rule : save . sigma ) { ImplicationalSystem epsilon = new ImplicationalSystem ( this ) ; epsilon . removeRule ( rule ) ; Rule tmp = new Rule ( epsilon . closure ( rule . getPremise ( ) ) , rule . getConclusion ( ) ) ; if ( ! rule . equals ( tmp ) ) { this . replaceRule ( rule , tmp ) ; } } this . makeProper ( ) ; return save . sizeRules ( ) - this . sizeRules ( ) ; }
Replace this component by the canonical basis.
Replace this component by the canonical basis .