Logic Lecture Notes
Logic Lecture Notes
LOGIC LECTURE 1:
Formulation rules:
- (Basic rule) Sentence letters of SL are sentences of SL.
- (~-rule) If P is a sentence of SL, then ~P is a sentence of SL.- negation rule does not
require parentheses
- (& -rule) If P and Q are sentences of SL, then (P & Q) is a sentence
- of SL.
- (V -rule) If P and Q are sentences of SL, then (P V Q) is a sentence of
- SL.
- (⊃-rule) If P and Q are sentences of SL, then (P ⊃ Q) is a sentence of
- SL.
- (≡-rule) If P and Q are sentences of SL, then (P ≡ Q) is a sentence of
- SL.
- Nothing else is a sentence of SL.
Formulation rules- how to use them:
- By the Basic rule, sentence letters (i.e. A, B, C, D, E ...) are sentences of SL by
default. They are also called atomic sentences.
- More complex sentences of SL are constructed using the other Rules. They are called
compound sentences.
- First one- A is
sentence and B is a sentence- get the OR rule- procedures that allow you to form
more and more compound sentences in tree like manner. Just breaking down
compound sentences into single letters.
More examples:
Main connective is the connective that has been introduced at the last stage of the
construction tree- the connective that’s introduced last
Translations
Semantics
Semantic notions
Truth-function equivalence:
- Logical equivalence=informal notion- Two sentences are logically equivalent iff it is
impossible for one to be true while the other is false
- Truth-functional equivalence- Two sentences of SL are truth-functionally equivalent
if and only if they have the same truth-value on every assignment, i.e. they have the
same truth table.
Truth-functional consistency:
- Logical consistency- A set Γ of sentences is consistent iff it is possible for all the
members of Γ to be true together.
- Truth-functional consistency- A set Γ of sentences of SL is truth-functionally
consistent iff there is an assignment on which each member of Γ is true.
- Check if there’s a row on truth table where every set is true
Truth-functional entailment:
- A set Γ of sentences of SL truth-functionally entails a sentence P of SL iff there is no
truth-value assignment on which all the members of Γ are true and P is false
Notation for truth-functional entailment:
- An invalidating row would be- T, T, F (false being the conclu) e.g of when
gamma does not truth functionally entail (C)
Validity:
- Validity- A deductive argument is valid iff it is impossible for the premises to be true
while the conclusion is false.
- Truth- functional validity- A deductive argument in SL is truth-functionally valid iff
the set of premises truth-functionally entails the conclusion.
- A deductive argument in SL is truth-functionally valid iff the set of premises truth-
functionally entails the conclusion, i.e. there is no assignment on which all the
premises are true and the conclusion is false.
- Invalidity- A deductive argument is invalid iff it is possible for the premises to be true
while the conclusion is false.
- Truth- functional invalidity- A deductive argument in SL is truth-fucntionally invalid
iff the set of premises does not truth-functionally entail the conclusion, i.e. there is an
assignment on which all the premises are true and the conclusion is false.
- Only rule that has nothing to do with the connectives- special rule
- If we have established P we can just re assert P
- Reiteration can only be applied if P is accessible at line M+N- if you have
established P under some assumptions that are no longer in place- as long as we
are operating below or to right of P we can reiterate.
AND
INTRODUCTION:
Rules for &: introduction:
Example:
- Mary will graduate in 2021 (M)
- Bonnie will graduate in 2021 (B)
- Conclu- Mary will graduate in 2021 AND Bonnie will graduate in 2021
- M and B both need to be accessible at n+m otherwise wouldn’t be able to
conclude M&B
ELIMINATION:
Example:
- Conclu- Mary will graduate in 2021 AND Bonnie will graduate in 2021
- Mary will graduate in 2021
- Bonnie will graduate in 2021
Precise formulation:
Examples:
- in first brackets are primary assumptions
- put line underneath assumptions!!!
Negation
Introduction
- Assume that P. If the assumption leads to contradiction, then it must be false. So, you
may conclude ~P
Elimination
- Assume that~ P. If the assumption leads to contradiction, then it must be false. So you
may conclude that P.
Precise formulation:
- Dash at last step
Examples of negation:
Conditional
Examples:
OR
Precise formulation:
Precise form:
Examples:
- Assume left hand side to prove right
- Then assume right hand side to prove left
Logical notions
Derivation (proof)
- A derivation is a sequence of sentences of SL such that each sentence in the sequence
is either an assumption or is obtained by previous sentences using introduction or
elimination rules or reiteration.
(Deductive) inconsistency
- A set of sentences Γ is (deductively) inconsistent if and only if, for some sentence P, Γ
⊢P& ~P
(Deductive) validity
- An argument whose premises form the set Γ and whose conclusion is P is
(deductively) valid if and only if Γ ⊢ P.
Theorem
- A sentence P of SL is a theorem if and only if ∅ ⊢ P
(Deductive) Equivalence
- Two sentences of SL, P and Q, are (deductively) equivalent if and only if ∅ ⊢ P ≡ Q
Toolbox
Classical logic:
Ex falso:
Few tricks about ⊃:
Flip the
conditional and
add or remove
negation.
LOGIC LECTURE 3: Metatheory
Introduction:
Study the system from the outside- called metatheory- branch of logics
that’s takes proofs systems as objects of study and find interesting features
of the system.
How are ⊨ (entailment) and ⊢ (provability) related?
Soundness:
- Important as it gives us a way to show P is not provable from
gamma- if you can prove P is not truth functionally entailed by
gamma the logical equivalent formulation tells you P is not provable
from gamma.
- If you can show there is a failure of truth functional entailment then
you know there is no proof.
Completeness:
Summary:
The Soundness and Completeness theorems help us answer this
question:
- Given a set of sentences Γ and a sentence P, can we derive P from Γ?
To answer the question, you can use the Soundness and Completeness
theorems as follows:
Use the truth-table method to check if Γ ⊨ P.
- If Γ ⊨ P, then there is a derivation: Γ ⊢ P (by the Completeness theorem).
- If Γ P (no truth functional entailment), then there is no derivation: Γ
(no proof) P (by the Soundness theorem).
Mathematical induction
- Important technique proving the soundness theorem
The principle of mathematical induction:
- The proof of Soundness makes essential use of a key principle in
mathematics: the principle of mathematical induction.
- The proof is a proof by induction.
First formulation:
Weak induction:
Suppose you can show that
1) Base case: F is true of 0;
2) Inductive Case:
If F is true of n, then F is true of n+1
Then you can assert
(showing everything is F)
- Note: step 2 is a conditional. We show that IF F is true of n, THEN it is
also true of n+1
- Note- not weak- v strong principle
Second formulation:
Strong induction:
Suppose you can show that
1) Base Case: F is true of 0;
2) Inductive Case;
If F is true of m for every m<n, then F is true of n- assuming that every
number smaller than the mystery number is F so we show that n is F.
Then you can assert
Weak induction:
Suppose you can show that:
1) Base Case: F is true of K;
2) Inductive case:
If F is true of n with k<n, then F is true of n+1
Then you can assert:
Strong induction:
Suppose you can show that:
1) Base Case: F is true of K;
2) Inductive case:
If F is true of m with k<m, then F is true of n
Then you can assert:
- If want to start from K- assuming that our starting point is K and we assume
that everything before N is F and want to show F is also true of N.
- So every number bigger or equal to K is F.
Example 2:
- Trying to prove- if we take a number from 1 onwards and double it
we get something that’s different from 0
- NOTE- this starts from something other than 0- so might use variant-
one based on arbitrary number. The starting point in this case is 1
- Show base case is strong first- F is true of 1, that is, 2x1 (not zero)
- Proving inductive step:
Simplifying
- Only using not and and- they are both truth functionally complete-
using these two connective can express any truth table
- If want to express disjunction can say not negation of the
conjunction- so can change an or to not (not P and not Q)
- Conditional- changes to not (P and not Q)
We can “recover” the rules for v, ⊃, and ≡ using those for ˜ and &.
Upshot:
- Without loss of generality, we can work in a system in which every step
in a derivation is either an assumption or is obtained by one of the
following four rules:
Soundness theorem:
- Second formulation- Allows us to prove something is not provable
from a certain claim- can look at truth tables and see if a proof does
not exist thanks to the theorem
- Reason they are equivalent 1) formulation is like A ⊃B 2
formulation) is ˜B ⊃ ˜A- these are equivalent
Preliminary notions
Examples:
- Cut proof at line 6- what has been proved?- proved not A. Open
assumptions are A then B and not B.- not including A because A has
been discharged- been given up at line 6- not longer active
Notation:
- Take a proof and let n be a line in the proof.
Let us write
Proof of soundness
Induction (Cont.)
- base case- every proof of length one is such that the assumptions of
that proof truth functionally entail the conclusion.
- Inductive case- assume that for every proof of length Kappa where
Kappa is strictly less than n then the assumptions of the proof truth
functionally entail the conclusion.
- Then we show on the basis on that assumption that that must also be
true for the next length- n. Assumptions at length n truth functionally
entail its conclusion.
- Conclusion we can derive from base and inductive case- for any
proof of P from gamma that has length X or axis greater or equal to
1 then gamma truth functionally entails P.
Notation:
Notation (cont.)
- Notation for union is indicated by a cap (U)
- Note C is not repeated- set ignores repetition- repeating an element of
the set does not change the set- no need to repeat.
- Use fork to represent membership.
- Line through fork if its not a member
Facts:
Useful notation:
- Fact 7- if gamma proves Q and not Q then gamma will also prove A
and not A and B and not B and so on.
- Fact 8- biconditional- proof of this claim- gamma cannot be truth
functionally consistent-left to right- assuming gamma entails a
contradiction and proving its truth-functionally inconsistent- if it
were a contradiction would have to be true on a line of the truth table
and that would be impossible- so we conclude that gamma is not
truth-functionally consistent hence it is truth functionally
inconsistent. From right to left- assuming gamma is truth
functionally inconsistence and proving gamma entails a
contradiction- suppose gamma did not truth functionally entail a
contradiction would have to be row in truth table that invalidates this
claim, an invalidating row where all members of set are true and
contradiction is false. If gamma doesn’t truth functionally entail P
that means there is a row in truth table where all members of gamma
are true therefore gamma is not truth functionally inconsistent
against the assumption.
- ASSUME GAMMA IS TRUTH FUNCTIONALLY
INCONSISTENT THEN ASSUMING GAMMA DOES NOT
TRUTH FUNCTIONALLY ENTAIL A CONTRADICTION AND
THIS LEADS TO CONTRADICTION THUS GAMMA TRUTH
FUNCTIONALLY ENTAILS A CONTRADICTION ON THE
ASSUMPTION THAT GAMMA IS TRUTH FUNCTIONALLY
CONSISTENT.
-
- would have to be line in truth table where gamma is true and
contradiction is false- an invalidating row.
- You start from your assumption, assume negation of what you want
to show, there’s a contradiction and then assume what you want to
show- that gamma truth functionally entails a contradiction.
- Fact 9- if gamma has a superset gamma plus and gamma plus does
not truth functionally entail a contradiction then gamma also does
not truth functionally entail a contradiction.
- If a superset is truth functionally consistent then a subset is truth
functionally consistent- suppose gamma is A,B and C and gamma
plus is A,B,C,D- if gamma plus is consistent- theres a row in truth
table where A,B,C and D is true
- Fact 8 useful for fact 9- if superset has row in truth table where all
members are true then subset will also have a row in truth table
where all members are true.
- If A if and only if B then not A if and only if not B- they are logically
equivalent-fact 8- Gamma does not truth- functionally entail a
contradiction if and only if gamma is truth functionally consistent- 9
says if have set of assumption sand you expand it and if the expanded
set does not truth functionally entail a contradiction, that is gamma
plus is truth functionally consistent then gamma does not entail a
contradiction, it is truth functionally consistent.
- Thanks to fact 8 able to replace the claim about not truth
functionally entailing a contradiction with the claim about
consistency.
- Gamma is a,b and c and gamma plus is a,b,c and d- if gamma plus is
consistent- row in truth table where a,b,c,d are true and also going to
be row where a,b and c is true
Proving Completeness
STEP 1:
Step 2
- Easier to prove the logically equivalent formulation
- Any set of sentences is the triangle symbol- if a set of sentences do not prove a
contradiction then they do not truth functionally entail a contradiction.
Key Lemma
- If delta does not prove a contradiction then delta does not truth functionally
entail a contradiction- the way we will prove it= using intermediary steps
- Fact 9 told us that if we have a set and superset- if superset does not truth
functionally entail a contradiction then initial step doesn’t either.
- First thing to do is build delta plus.
- Take delta- add sentences while keeping it consistent and stop when you can no
longer add something before delta becomes inconsistent.
- Way in which we prove this is by laying out a procedure to expand delta.
- If by adding a sentence I don’t prove a contradiction then I add that sentence
otherwise we leave the set as is and move on to the next sentence.
- Consistent- cannot prove a contradiction from any finite subset of delta plus
- Maximal- something is not in the set that adding it to the set will prove a
contradiction
Maximal consistency and truth-functional consistency:
- Showing maximal consistency implies truth-functional consistency.
- If delta plus is maximally consistent then delta plus does not entail a
contradiction- how this can be shown- assume antecedent and assume
consequent- need to show delta plus does not truth functionally entail a
contradiction.
- Can show that delta plus is truth functionally consistent
- Conclusion is that delta plus does not truth functionally entail a contradiction-
why?- assumed that delta plus is maximally consistent then built an assignment,
A that makes true all and only the members of delta true. If there is an
assignment where all members of delta plus are true then delta plus is truth
functionally consistent then by fact 8 this means delta plus does not truth
functionally entail a contradiction.
- If delta does not prove a contradiction then delta does not truth functionally
entail a contradiction
Process of key lemma:
- 1) start with your assumption
- 2) built a maximally consistent set of sentences, delta plus
- 3) through the consistency lemma we concluded that if delta plus is maximally
consistent we can build an assignment A where all its members are true which
means that delta plus does not truth functionally entail a contradiction
- 4) By fact 9 can conclude that delta does not truth functionally entail a
contradiction.
Completeness theorem
Proof strategy:
Starting from assumption that gamma truth functionally entails P
Step 1- by adding not p to gamma the result is. A set that truth functionally entails a
contradiction
Step 2- Then shown key lemma- if delta is consistent then delta does not truth functionally
entail a contradiction so that any set that does truth functionally entail a contradiction can
prove a contradiction.
The Limits of SL
Why is SL inadequate?
The language of PL
The symbols:
Individual terms (with or without numerical subscripts)
- Individual constants: a, b, c, ...
- Individual variables: x, y, z, w, ...
- Subscripts is like a1, a2, a3…
Predicates (two-place):
- Two-place predicates translate expressions that indicate relations between two
individuals, e.g., ‘loves’, ‘likes’, ‘is taller than’, ‘plays with’ ...
- Requires two expressions on either side
Well-formed formulas in PL
Some terminology
Sentence
- a sentence is a wff without free variables
Scope
- The scope of a quantifier is (are) its immediate subformula(s).
- Third example- question is what is the scope of the y quantifier- would be B2xy
as that’s the immediate subformula after. Scope for first quantifier would be Ey
- Do tree to work it out- tree makes notion v clear
Binding
- A quantifier (∃v) or (∀v) binds every free occurrence of v within its immediate sub
formulas. The variable v is also said to be a bound variable.
- First one- vx binds all variables marked as red
Practice
Substitution: motivation
Every human is mortal
Socrates is human
Socrates is mortal
- We want to find a way of connecting the first premise with the second, so that the
conclusion “Socrates is mortal” is justified.
- That is, we want to instantiate the universal quantifier “every human” to the particular
case of Socrates.
- We introduced the notions of free and bound variables.
Substitution instances:
An easy rule: ∀- elimination
Provided that:
(ii) A does not appear in (∃x)P
(iii) A does not appear in Q
Replacing constants
= Introduction
- line 3- incorrect application of universal introduction- 2nd condition is that a does
not occur in the universal statement that we are deducing- would have had to say
y=y instead of a=y.
= Elimination
Identity is symmetric
Identity is transitive
Toolbox
What ⊢ cannot do
- By defining the notion of derivation in PL (i.e. first-order logic), we have
defined a key logical relation:
Notation: Sets
- Sets are collections of objects that have members or elements.
- We can specify a finite set by listing its members, separated by commas,
within curly brackets.
- Examples: (1; 2; 3) {John, Milly, Debby, Karim} {A V B}, {(A&B),A}
- We will use sets to interpret the universe of discourse and also to interpret
unary predicates.
- We will also use Venn diagrams to help us picture the relations
Notation: n-tuples
- The order of the members of a set does not matter:
- {1, 2, 3} = {2, 3, 1} = {3, 1, 2}matters what’s in the set not the order
- What really matters is which members belong to a set.
- But sometimes we are interested in ordered collections. So we introduce
n-tuples.
- An n-tuple is an ordered set with n members. - ordered sequences of
entities
- We denote n-tuples by using “<” and “>” in place of “” and “”.
Examples of n-tuples:
- < Annie, Bonnie > is a pair. Annie comes first Bonnie comes second
- < 1, 2, 3 > is a triple etc. has to be in this order
- Note that < 1, 2, 3 > is different from < 2, 3, 1 > and < 3, 1, 2 >, etc.
- Two n-tuples will be identical if and only if they contain the same
objects arranged in the same way
- We can also have pairs of the form < 2, 2 > or < Mary, Mary > and triples
of the form < 1, 1, 1 >, etc.
Why do we need n-tuples?:
- We can use n-tuples to represent relation.
- In particular, a binary predicate like love can be represented as a set of
pairs.
- Suppose John loves Mary and Mary loves Mary (herself). Then we can
represent love as: {< John, Mary >,< Mary, Mary >}
- This set is the extension of the predicate love.
Examples
- domain is represented as a box- I1 is domain
- use symbol for entailment
Practice
- Can pick how many objects in it
- There are many possible solutions to this problem
- This interpretation makes the sentence true
- De
pe
nd
in
g on what resources are available you can give alternative
descriptions
Semantic notions
Quantificational entailment:
Example:
- Gamma is the first conjunct and Q is second
- Trying to show gamma does not truth functionally entail Q.
- Trying to show conclusion – that something loves everything is false- easy to
verify- can go through objects and show none of them loves everything
Rigorous formulation
Variable assignment
- Let I= (d, i) be an interpretation. A variable assignment v1 is a function that assigns a
member of d to each variable of PL.
Definitions:
Let Q be a formula of SL, and let I and V1 be an interpretation and a variable assignment,
respectively.
More on semantics
Metatheory
Soundness theorem
Completeness theorem
Compactness theorem
Theory:
- A theory in PL is a set of sentences of PL
Notation:
Glimpses beyond
- With SL mechanical procedure is truth tables don’t have this for PL-
if we want to know if P is provable from gamma we have a
mechanical way of answering the question in SL- doesn’t hold for
PL- not mechanical procedure to decide whether P is
quantificationally entailed by gamma.
Incompleteness theorems
Second-order logic
Modal logic
Exam