Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Science & Technologies University of Koblenz ▪ Landau, Germany Models in First Order Logics.

Similar presentations


Presentation on theme: "Web Science & Technologies University of Koblenz ▪ Landau, Germany Models in First Order Logics."— Presentation transcript:

1 Web Science & Technologies University of Koblenz ▪ Landau, Germany Models in First Order Logics

2 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 2 of 17 WeST Overview First-order logic. Syntax and semantics. Herbrand interpretations; Clauses and goals; Datalog.

3 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 3 of 17 WeST First-order signature First-order signature § consists of  con — the set of constants of § ;  fun — the set of function symbols of § ;  rel — the set of relation symbols of §.

4 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 4 of 17 WeST Terms Term of § with variables in X: 1. Constant c 2 con; 2. Variable v 2 X; 3. If f 2 fun is a function symbol of arity n and t 1, …, t n are terms, then f(t 1, …, t n ) is a term. A term is ground if it has no variables var(t) — the set of variables of t

5 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 5 of 17 WeST Abstract and concrete notation Abstract notation:  a, b, c, d, e for constants;  x, y, z, u, v, w for variables;  f, g, h for function symbols;  p, q for relation symbols, Example: f(x, g(y)). Concrete notation: Variable names start with upper-case letters. Example: likes(john, Anybody).

6 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 6 of 17 WeST Formulas Atomic formulas, or atoms p(t 1, …, t n ). (A 1 Æ … Æ A n ) and (A 1 Ç … Ç A n ) (A ! B) and (A $ B) : A 8 v A and 9 vA

7 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 7 of 17 WeST Substitutions Substitution µ : is any mapping from the set V of variables to the set of terms such that there is only a finite number of variables v 2 V with µ (v)  v. Domain dom( µ ), range ran( µ ) and variable range vran( µ ): dom( µ ) = {v | v  µ (v)}, ran( µ ) = { t | 9 v 2 dom( µ )( µ (v) = t)}, vran( µ ) = var(ran( µ )). Notation: { x 1  t 1, …, x n  t n } empty substitution {}

8 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 8 of 17 WeST Application of substitution Application of a substitution µ to a term t:  x µ = µ (x)  c µ = c  f(t 1, …, t n ) µ = f(t 1 µ, …, t n µ )

9 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 9 of 17 WeST Herbrand interpretation A Herbrand interpretation of a signature § is a set of ground atoms of this signature.

10 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 10 of 17 WeST Truth in Herbrand Interpretations 1. If A is atomic, then I ² A if A 2 I 2. I ² B 1 Æ … Æ B n if I ² B i for all i 3. I ² B 1 Ç … Ç B n if I ² B i for some i 4. I ² B 1 ! B 2 if either I ² B 2 or I ² B 1 5. I ² : B if I ² B 6. I ² 8 xB if I ² B{x  t} for all ground terms t of the signature § 7. I ² 9 xB if I ² B{x  t} for some ground term t of the signature §

11 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 11 of 17 WeST Tautology and Inconsistent A formula F is a tautology (is valid), if I ² F for every (Herbrand) interpretation I A formula F is inconsistent, if I ² F for every (Herbrand) interpretation I.

12 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 12 of 17 WeST Types of Formulas Tautologies / Valid Neither valid nor inconsistent Inconsistent All formulas Invalid formulas

13 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 13 of 17 WeST Logical Implication A (set of) formula(s) F logically implies G (we write F ² G), iff every (Herbrand) interpretation I that fulfills F (I ² F) also fulfills G (I ² G). Æ F ² G is true iff for every (Herbrand) interpretation I: I ² ( Æ F ! G)

14 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 14 of 17 WeST Literals Literal is either an atom or the negation : A of an atom A. Positive literal: atom Negative literal: negation of an atom Complementary literals: A and : A Notation: L

15 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 15 of 17 WeST Clause Clause: (or normal clause) formula L 1 Æ … Æ L n ! A, where n ¸ 0, each L i is a literal and A is an atom. Notation: A :- L 1 Æ … Æ L n or A :- L 1, …, L Head: the atom A. Body: The conjunction L 1 Æ … Æ L n Definite clause: all L i are positive Fact: clause with empty body

16 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 16 of 17 WeST Syntactic Classification ClauseClass lives(Person, sweden) :- sells(Person, wine, Shop), not open(Shop,saturday) normal spy(Person) :- russian(Person)definite spy(bond)fact

17 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 17 of 17 WeST Goal  Goal (also normal goal) is any conjunction of literals L 1 Æ … Æ L n  Definite goal: all L i are positive  Empty goal □: when n = 0

18 Steffen Staab staab@uni-koblenz.de Advanced Data Modeling 18 of 17 WeST A new language Excercise:  Syntax & Semantics for Monadic Fuzzy Logics  Monadic: only unary predicates  Fuzzy:  Truth values in [0,1]  operators for truth values T-norm: > min (a,b)=min{a,b} T-conorm: ? min (a,b)=max{a,b} Also: > prod (a,b)=a ¢ b, ? sum (a,b)=a+b-a ¢ b,… Duality for N(x)=1-x


Download ppt "Web Science & Technologies University of Koblenz ▪ Landau, Germany Models in First Order Logics."

Similar presentations


Ads by Google