AIMA.Core.Logic.FOL.KB.FOLKnowledgeBaseFactory.createABCEqualityKnowledgeBase C# (CSharp) Method

createABCEqualityKnowledgeBase() public static method

public static createABCEqualityKnowledgeBase ( InferenceProcedure infp, bool includeEqualityAxioms ) : FOLKnowledgeBase
infp InferenceProcedure
includeEqualityAxioms bool
return FOLKnowledgeBase
        public static FOLKnowledgeBase createABCEqualityKnowledgeBase(
                InferenceProcedure infp, bool includeEqualityAxioms)
        {
            FOLDomain domain = new FOLDomain();
            domain.addConstant("A");
            domain.addConstant("B");
            domain.addConstant("C");

            FOLKnowledgeBase kb = new FOLKnowledgeBase(domain, infp);

            kb.tell("B = A");
            kb.tell("B = C");

            if (includeEqualityAxioms)
            {
                // Reflexivity Axiom
                kb.tell("x = x");
                // Symmetry Axiom
                kb.tell("(x = y => y = x)");
                // Transitivity Axiom
                kb.tell("((x = y AND y = z) => x = z)");
            }

            return kb;
        }