2. SYLLABUS
• Formal Systems : Soundness and completeness
• First Order Predicate Logic(FOPL)
• System and semantics
• Properties of well formed formulae
• Conversion to clausal form
• Inference rules
• Unification algorithm
4. INTRODUCE SEMANTICS IN
PROPOSITIONAL LOGIC
• Valuation Function V
• Definition of V Syntactic
•
• Where F is called ‘false’ and is one of the two symbols (T, F) Semantic ‘false’
• V(A->B) is defined through what is called the truth table
6. TAUTOLOGY
• An expression ‘E’ is a tautology if
• V(E) = T
• for all valuations of constituent propositions
• Each ‘valuation’ is called a ‘model’.
7. CONT….
• Soundness: Correctness of the System
• Proved entities are indeed valid
• Completeness: Power of the System
• Valid things are indeed provable
8. FIRST ORDER PREDICATE LOGIC(FOPL)
• In the topic of Propositional logic, we have seen that how to represent statements
using propositional logic. But unfortunately, in propositional logic, we can only
represent the facts, which are either true or false. PL is not sufficient to represent the
complex sentences or natural language statements. The propositional logic has very
limited expressive power. Consider the following sentence, which we cannot
represent using PL logic.
• "Some humans are intelligent", or
• "Sachin likes cricket."
• To represent the above statements, PL logic is not sufficient, so we required some
more powerful logic, such as first-order logic.
9. FIRST-ORDER LOGIC:
• First-order logic is another way of knowledge representation in artificial intelligence. It is an extension to
propositional logic.
• FOL is sufficiently expressive to represent the natural language statements in a concise way.
• First-order logic is also known as Predicate logic or First-order predicate logic. First-order logic is a powerful
language that develops information about the objects in a more easy way and can also express the
relationship between those objects.
• First-order logic (like natural language) does not only assume that the world contains facts like propositional
logic but also assumes the following things in the world:
• Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus, ......
• Relations: It can be unary relation such as: red, round, is adjacent, or n-any relation such as: the sister of,
brother of, has color, comes between
• Function: Father of, best friend, third inning of, end of, ......
• As a natural language, first-order logic also has two main parts:
• Syntax
• Semantics
10. SYSTEM AND SEMANTICS
• Semantic AI is the combination of methods derived from symbolic AI and statistical
AI.
• Virtuously playing the AI piano means that for a given use case various stakeholders,
not only data scientists, but also process owners or subject matter experts, choose
from available methods and tools, and collaboratively develop workflows that are
most likely a good fit to tackle the underlying problem.
• For example, one can combine entity extraction based on machine learning with
text mining methods based on semantic knowledge graphs and related reasoning
capabilities to achieve the optimal results.
11. CONT….
• Semantic AI is the next-generation Artificial Intelligence. Machine learning can help
to extend knowledge graphs (e.g., through ‘corpus-based ontology learning’ or
through graph mapping based on ‘spreading activation’), and in return, knowledge
graphs can help to improve ML algorithms (e.g., through ‘distant supervision’).
• This integrated approach ultimately leads to systems that work like self optimizing
machines after an initial setup phase, while being transparent to the underlying
knowledge models.
12. CONT….
• Data is the fuel of the digital economy and the underlying asset of every AI
application.
• Semantic AI addresses the need for interpretable and meaningful data, and it
provides technologies to create this kind of data from the very beginning of a data
lifecycle.
• Companies possess and constantly generate data, which is distributed across
various database systems.
• When it comes to the implementation of new use cases, usually very specific data is
needed.
13. PROPERTIES OF WELL FORMED
FORMULAE
• Propositional logic uses a symbolic “language” to represent the logical structure, or form, of
a compound proposition.
• Like any language, this symbolic language has rules of syntax—grammatical rules for putting
symbols together in the right way.
• Any expression that obeys the syntactic rules of propositional logic is called a well-formed
formula, or WFF.
• Fortunately, the syntax of propositional logic is easy to learn.
• It has only three rules:
• Any capital letter by itself is a WFF.
• Any WFF can be prefixed with “~”. (The result will be a WFF too.)
• Any two WFFs can be put together with “•”, “∨”, “⊃”, or “≡” between them, enclosing the
result in parentheses. (This will be a WFF too.)
14. CONT….
• Some logic textbooks add a 4th rule: Parentheses may be omitted when doing so
doesn’t result in any ambiguity.
• This convention makes some formulas slightly easier to read and write, but
complicates the rules of syntax.
• To avoid unnecessary complications, I’ll adhere to the stricter convention of keeping
all parentheses.
15. CONVERSION TO CLAUSAL FORM
• These rules are adapted from Artificial Intelligence, by Elaine Rich and Kevin Knight.
• Eliminate logical implications, ⇒, using the fact that A ⇒ B is equivalent to ¬A ∨ B.
• Reduce the scope of each negation to a single term, using the following facts:
• ¬(¬P) = P
• ¬(A ∨ B) = ¬A ∧ ¬B
• ¬(A ∧ B) = ¬A V ¬B
• ¬∀x: P(x) = ∃x: ¬P(x)
• ¬∃x: P(x) = ∀x: ¬P(x)
• Standardize variables so that each quantifier binds a unique variable.
• Move all quantifiers to the left, maintaining their order.
16. CONT…
• Eliminate existential quantifiers, using Skolem functions (functions of the preceding
universally quantified variables). Examples:
• ∃x: P(x) becomes x'
• ∀x: ∃y: P(y) becomes ∀x: y'(x)
• Drop the prefix; assume universal quantification.
• Note: The term prefix refers to all the quantifiers; the matrix is everything else.
• Convert the matrix into a conjunction of disjuncts.
• Create a separate clause corresponding to each conjunct.
• Standardize apart the variables in the clauses.
17. INFERENCE RULES
• In artificial intelligence, we need intelligent computers which can create new logic
from old logic or by evidence, so generating the conclusions from evidence and
facts is termed as Inference.
• Inference rules are the templates for generating valid arguments. Inference rules are
applied to derive proofs in artificial intelligence, and the proof is a sequence of the
conclusion that leads to the desired goal.
• In inference rules, the implication among all the connectives plays an important role.
Following are some terminologies related to inference rules:
• Implication: It is one of the logical connectives which can be represented as P → Q.
It is a Boolean expression.
18. CONT….
• Converse: The converse of implication, which means the right-hand side
proposition goes to the left-hand side and vice-versa. It can be written as Q → P.
• Contrapositive: The negation of converse is termed as contrapositive, and it can be
represented as ¬ Q → ¬ P.
• Inverse: The negation of implication is called inverse. It can be represented as ¬ P
→ -
19. UNIFICATION ALGORITHM
• Unification is a process of making two different logical atomic expressions identical
by finding a substitution. Unification depends on the substitution process.
• It takes two literals as input and makes them identical using substitution.
• Let Ψ1 and Ψ2 be two atomic sentences and 𝜎 be a unifier such that, Ψ1𝜎 = Ψ2𝜎,
then it can be expressed as UNIFY(Ψ1, Ψ2).
• Example: Find the MGU for Unify{King(x), King(John)}
• Let Ψ1 = King(x), Ψ2 = King(John),
• Substitution θ = {John/x} is a unifier for these atoms and applying this
substitution, and both expressions will be identical.
20. CONT…
• Substitution θ = {John/x} is a unifier for these atoms and applying this
substitution, and both expressions will be identical.
• The UNIFY algorithm is used for unification, which takes two atomic sentences and
returns a unifier for those sentences (If any exist).
• Unification is a key component of all first-order inference algorithms.
• It returns fail if the expressions do not match with each other.
• The substitution variables are called Most General Unifier or MGU.