semantics and inference part ii johan bos. summary of last lecture inferences on the sentence level...

Post on 21-Jan-2016

213 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Semantics and Inference

Part II

Johan Bos

Summary of last lecture

• Inferences on the sentence level– Entailment– Paraphrase– Contradiction

• Using logic to understand semantics– Introduction to propositional logic– Syntax– Semantics

Propositions

• What is a proposition? – Something that is expressed by a

declarative sentence making a statement– Something that has a truth-value

• Propositions can be true or false– There are only two possible truth-values– True, T or 1– False, F or 0

Ingredients of propositional logic

• Propositional variables– Usually: p, q, r, …

• Connectives– The symbols: , ,, , – Often called logical constants

• Punctuation symbols– The round brackets ( )

Syntax of propositional logic

• All propositional variables are propositional formulas

• If is a propositional formula, then so is

• If and are propositional formulas, then so are (), (), () and ()

• Nothing else is a propositional formula

Negation

• Symbol: • Pronounced as: “not” is called the negation of

• Truth-table:

True False

False True

Conjunction

• Symbol: • Pronounced as: “and”

• () is called the conjunction of the conjuncts and

• Truth table: ()

True True True

True False False

False True False

False False False

Disjunction

• Symbol: • Pronounced as: “or”

• () is called the disjunction of the disjuncts and

• Truth table:

()

True True True

True False True

False True True

False False False

(Material) Implication

• Symbol: • Pronounced as: “implies” or “arrow”

• Truth table: ()

True True True

True False False

False True True

False False True

Equivalence (biconditional)

• Symbol:

• Pronounced as: “if and only if”

• Truth table: ()

True True True

True False False

False True False

False False True

Summary

()

True True True

True False False

False True False

False False True

()

True True True

True False False

False True True

False False True

()

True True True

True False True

False True True

False False False

()

True True True

True False False

False True False

False False False

True False

False True

This lecture

• We will look at the role of tautologies in propositional logic

• Explain the method of truth tables to detect tautologies

• Apply this formal method to textual entailment

• Look further at the notion of truth

Tautologies

• A formula that is true in all situations is called a tautology or a semantic theorem

• Examples of tautologies: (pp)(qq)(pp)(p(qp))(p(qp))((pq)((pq)(q p))

Checking for tautologies

• How can we systematically check whether some formula is a tautology?

• This is the business of theorem proving– This is what mathematicians do, and– therefore is not our main concern here

• There are many methods– Using semantic tableaux (intuitive)– Using resolution (advanced)– Using truth-tables (nice for simple cases)

Using a truth-table

Example: (pp)

1) Make a column for all propositional variables with possible truth-values

p

True

False

Using a truth-table

Example: (pp)

2) Add columns for all sub-formulas

p p

True

False

Using a truth-table

Example: (pp)

3) Put the formula itself in the last column

p p (pp)

True

False

Using a truth-table

Example: (pp)

4) Fill in the truth values for the columns using the tables of the connectives

p p (pp)

True ?

False

Using a truth-table

Example: (pp)

4) Fill in the truth values for the columns using the tables of the connectives

p p (pp)

True False

False ?

Using a truth-table

Example: (pp)

4) Fill in the truth values for the columns using the tables of the connectives

p p (pp)

True False ?

False True

Using a truth-table

Example: (pp)

4) Fill in the truth values for the columns using the tables of the connectives

p p (pp)

True False True

False True ?

Using a truth-table

Example: (pp)

4) Fill in the truth values for the columns using the tables of the connectives

p p (pp)

True False True

False True True

Using a truth-table

Example: (pp)

5) Check the values in the last column

p p (pp)

True False True

False True True

All true in this column, hence tautology

Another example

Example: (p q)

1) Make a column for all propositional variables with possible truth-values

p q

True True

True False

False True

False False

Another example

Example: (p q)

2) Add columns for sub-formulas

p q

True True

True False

False True

False False

Another example

Example: (p q)

3) Add formula itself in last column

p q (p q)

True True

True False

False True

False False

Another example

Example: (p q)

4) Fill in the truth values

p q (p q)

True True True

True False False

False True True

False False True

Another example

Example: (p q)

5) Check values in last column

p q (p q)

True True True

True False False

False True True

False False True

Not all true in this column, hence no tautology

Which of the following are tautologies?

1) (p(pq))

2) (p(qr))

3) ((pq)p)

4) ((pq)(pq))

Tautologies and inference

• We are now ready to formalise the notions of– Entailment– Paraphrase– Contradiction

• Some notational convention– If S is a sentence, then we will write S'

meaning the logical translation of S.

Entailment

• Let S be a sentence and S' the logical translation of S. Then:

If (S1'S2') is a tautology, then S1 entails S2

Paraphrase

• Let S be a sentence and S' the logical translation of S. Then:

– Note: If S1 entails S2, and S2 entails S1, then S1 and S2 are paraphrases

If (S1'S2') is a tautology, then S1 and S2 are paraphrases

Contradiction

• Let S be a sentence and S' the logical translation of S. Then:

– Note: If a set of a sentences is not contradictory, they are called consistent

If (S1' S2') is a tautology, then S1 and S2 are contradictory or

inconsistent

Entailment, example 1

• Translate into propositional logic and check if entailment holds:

Diabolik found the treasure.

Eva will be happy if Diabolik found the treasure.

-----------------------------------------------------

Eva will be happy.

Entailment, example 2

• Translate into propositional logic and check if entailment holds:

Diabolik found the treasure.

Eva will be disappointed if Diabolik didn’t find the treasure.

-----------------------------------------------------

Eva won’t be disappointed.

More about truth

• This is what logicians claim– In any situation, a declarative sentence is

true or false– In other words: it has one truth-value

• But does this make sense?– Life seems to be full of half-truths, grey

areas, and borderline cases– Logic divides the world into two parts: the

True and the False

Is logic an illusion?

• Maybe there are grades of truth?

• Can something be more true than something else?

• We will explore this question by looking at scaling and non-scaling adjectives– Scaling: small, big, fat, happy– Non-scaling: straight, silent, perfect

Scaling adjective: small

• If you pick a really small doll, it is still possible to pick an even smaller doll

• There can be two small dolls, one smaller than the other

Non-scaling adjective: straight

• Line (a) is straighter then line (b)

• This means line (b) is not really straight

• Line (a) could be straight, but not necessarily so

(a)

(b)

Is “true” a scalar adjective?

• It is not: if your statement is “truer” than mine, then mine is not wholly true

• “more true” can only mean “nearer the truth”– There are no degrees of truth– Truth is absolute

Borderline cases

• There is no precise cut-off point between small and not small

• Both scaling and non-scaling adjectives can have borderline cases

What about “truth”?

• Although “truth” doesn’t have degrees, it does have borderline cases

• Look at the dolls and ask whether it is true this doll is small.

What about “truth”?

• Although “truth” doesn’t have degrees, it does have borderline cases

• Look at the dolls and ask whether it is true this doll is small.

What about “truth”?

• Although “truth” doesn’t have degrees, it does have borderline cases

• Look at the dolls and ask whether it is true this doll is small.

The truth about “truth”

• Logicians are forced to admit that:

where borderline cases may arise, logic is not an exact science

• Logicians therefore stick to matter-of-fact notions, and leave the vague matters to philosophers

Misleading statements

• Some common English words like and, some and all can give rise to misleading statements

• Often the choice is to go for a weak or strong reading

• Logicians normally opt for a weak reading, but there are good arguments to opt for strong readings too

Misleading statement 1

• A witness in a case:

The poiliceman hit Mr Unlucky three times with the stick, and Mr Unlucky fell to the floor

• What the witness actually saw was that Mr Unlucky fell to the floor just before the policeman came into the room, and the policeman hit him three times with the stick before he could get up

Misleading statement 2

• After a dinner party, Diabolik admits to Eva:

I did kiss some of the girls…

• In fact, Diabolik kissed all nineteen girls that were are the party.

Misleading statement 3

• Groucho boasts to Dylan Dog:

All the girls at the party kissed me!

• In fact, there were no girls at this particular party

Misleading statements

• All of these three statements are misleading

• But are they true or false?

• There are two views here:– All of these statements were false

(the strong readings of the sentences)– The statements expressed the truth but

not the whole truth (weak readings)

Strong readings

• and implies and then in narratives

• some implies not all

• all implies at least one

Weak readings

• Omitting to mention something which any honest person would have mentioned, but not by saying something untrue

• Imagine Diabolik decided to be completely honest to Eva:

I did kiss some of the girls, in fact I kissed all nineteen of them

• Does Diabolik contradicts himself or not?

Entailment or not?

• Milan is more expensive city than Rome.• Rome is an expensive city.

• Pisa is a small town with a leaning tower.• Pisa is a town with a leaning tower.

• Bologna is the cultural capital of Italy.• Bologna is the capital of Italy.

• Milan is a smaller city than Rome.• Milan is a small city.

Entailment or not?

• All churches in Rome are beautiful.• All old churches in Rome are beautiful.

• Some churches in Rome are beautiful.• Some old churches in Rome are beautiful.

• Turin has the highest tower of Italy.• Turin has the highest leaning tower of Italy.

• Pisa has the highest leaning tower of Italy.• Pisa has the highest tower of Italy.

Entailment Test Suites

• Fracas Deliverable D16• Pascal Recognising Textual Entailment

– RTE-1– RTE-2– RTE-3

• Microsoft Research Paraphrase Corpus

• See:http://homepages.inf.ed.ac.uk/jbos/rte/

Further reading

• Cann (1993): Formal Semantics; An introduction, Chapter 7

• Hodges (1977): Logic. An introduction to elementary logic.

• Hurford & Heasley (1983): Semantics. A coursebook, Unit 10

• Lyons (1977): Semantics, Volume 1, Chapter 6

top related