SlideShare a Scribd company logo
1 of 38
LOGIC
True But Unprovable
Goal
Logicians sometimes talk about sentences being “true but unprovable”
Our goal: Understand what they mean by this.
“Gödel’s first incompleteness theorem states that no consistent system of axioms
whose theorems can be listed by an algorithm is capable of proving all truths
about the arithmetic of natural numbers.”
“For any such consistent formal system, there will always be statements about
natural numbers that are true, but that are unprovable within the system.”
An Illustration
There’s an island on which there lives two types
of people: truthers and liars. Truthers always
speak the truth, liars always say falsehoods.
A logician that knows all of this visits the island.
He is a perfectly sound reasoner, i.e. he never
proves anything that is false.
The logician encounters an individual named Jal
living on the island.
Jal makes some statement to the logician, after
which the following two things are true:
(1) Jal’s statement logically entails that Jal is a
truther.
(2) The logician can never possibly prove that
Jal is a truther.
The question: What did Jal say?
A solution
Jal’s statement to the logician:
“You can not prove that I am a
truther.”
Only a truther could say this sentence.
A solution
Jal’s statement to the logician:
“You can not prove that I am a
truther.”
Only a truther could say this sentence.
But if Jal is a truther, then his
statement is true.
So the logician can not prove that Jal is
a truther.
Suppose Jal is a liar.
Then the sentence “You can not prove
that I am a truther” is false.
So the logician can prove that Jal is a
truther.
But the logician cannot prove a
falsehood.
Contradiction
But...
Why can’t the logician make this
exact argument, therefore proving
just as we did that Jal is a liar?
Suppose Jal is a liar.
Then the sentence “You can not prove
that I am a truther” is false.
So the logician can prove that Jal is a
truther.
But the logician cannot prove a
falsehood.
Contradiction
But...
Why can’t the logician make this
exact argument, therefore proving
just as we did that Jal is a liar?
Because to do so, he would have
to assert his own soundness.
Gödel’s second incompleteness
theorem tells us that no sound
reasoner can assert this of
himself.
Suppose Jal is a liar.
Then the sentence “You can not prove
that I am a truther” is false.
So the logician can prove that Jal is a
truther.
But the logician cannot prove a
falsehood.
Contradiction
Example 2: Busy beavers
The busy beaver numbers are a well-defined
sequence BB(n).
Run all n-state Turing machines. Some never
halt, the rest eventually do. BB(n) is the halt time
of the longest-running machine.
BB(n) is a measure of how complex a program
you can run on an n-state Turing machine.
We will now prove that no effective and
consistent proof system can enumerate all its
values.
Example 2: Busy beavers
Take any consistent formal proof system F whose
theorems can be listed by a Turing machine.
Construct an n-state Turing machine that
enumerates the theorems of F, halting only if it
reaches a contradiction.
Whether this Turing machine halts depends on if
F is consistent. BB(n) tells us how long we have
to wait to know for sure if it halts.
So if F could prove the value of BB(n), F could
prove its own consistency. Violation of Gödel’s
second!
(F can’t even upper bound BB(n)! Why?)
The busy beaver numbers are a well-defined
sequence BB(n).
Run all n-state Turing machines. Some never
halt, the rest eventually do. BB(n) is the halt time
of the longest-running machine.
BB(n) is a measure of how complex a program
you can run on an n-state Turing machine.
We will now prove that no effective and
consistent proof system can determine all its
values.
Example 2: Busy beavers
Different proof systems will have different
thresholds for unprovability.
The “standard proof system” for mathematics is
ZFC set theory.
We know ZFC can only prove at most 7,918
values of BB(n), and probably much fewer.
Final Example: Goldbach Conjecture
Every even integer greater than 2 is the sum of
two primes.
4 = 2 + 2
6 = 3 + 3
8 = 5 + 3
10 = 5 + 5
12 = 7 + 5
Etc...
Final Example: Goldbach Conjecture
Every even integer greater than 2 is the sum of
two primes.
4 = 2 + 2
6 = 3 + 3
8 = 5 + 3
10 = 5 + 5
12 = 7 + 5
Etc...
Know to be true for values up to 4×1018.
Goldbach: "I regard as a completely certain
theorem, although I cannot prove it."
What if it cannot be proven true or false?
Then it must be true!
Final Example: Goldbach Conjecture
Every even integer greater than 2 is the sum of
two primes.
4 = 2 + 2
6 = 3 + 3
8 = 5 + 3
10 = 5 + 5
12 = 7 + 5
Etc...
Know to be true for values up to 4×1018.
Goldbach: "I regard as a completely certain
theorem, although I cannot prove it."
What if it cannot be proven true or false?
Then it must be true!
If the conjecture were false, that would mean
that there’s a counterexample. So we could
eventually find that counterexample and prove
the conjecture false. So if it’s unprovable, then it
must be true.
So, what is it to be “true but unprovable”?
Logicians distinguish between syntax, semantics, and proof.
SYNTAX SEMANTICS PROOF
Defines an alphabet of symbols.
Defines a grammar: some subset
of the set of all finite strings of
symbols.
Defines the meaning of each symbol.
Defines a “valuation function” from
grammatical sentences to truth
values, consistent with the meanings
of the symbols.
Defines a deductive calculus.
Gives a set of axioms (sentences)
and inference rules (functions
from sentences to other
sentences) from which you can
derive theorems.
Propositional Logic
SYNTAX SEMANTICS PROOF
Alphabet
( ) ∧ ∨ → ¬
p1 p2 p3 …
Grammar
> pn is grammatical for each n
> If a is grammatical, so is (¬a)
> If a and b are grammatical, so
are (a∧b), (a∨b), (a→b)
We want to define a truth valuation
function V from grammatical
sentences to truth values. But not
just any function will do. The
allowed functions must respect our
intended meaning of the symbols ∧,
∨, →, and ¬.
(There’s a possible function from grammatical sentences to truth values that assigns V(p) = F, V(q) = F,
and V(p∧q) = T. We don’t want to say that this is a valid “truth valuation.” Thus our set of truth valuation
functions will be restricted to only those that align nicely with our intended semantics.)
Propositional Logic
SYNTAX SEMANTICS PROOF
Alphabet
( ) ∧ ∨ → ¬
p1 p2 p3 …
Grammar
> pn is grammatical for each n
> If a is grammatical, so is (¬a)
> If a and b are grammatical, so
are (a∧b), (a∨b), (a→b)
V: Atomic Propositions → {T,F}
V’: Grammatical Sentences → {T,F}
V’(pn) = V(pn)
V’(¬a) = T iff V’(a) = F
V’(a∧b) = T iff V’(a) = V’(b) = T
V’(a∨b) = F iff V’(a) = V’(b) = F
V’(a→b) = F iff V’(a) ≠ V’(b) = F
With our truth functions defined,
we want a purely mechanical
procedure for deriving theorems
without having to look directly at
the semantics.
We define a set of axioms and
inference rules that will blindly
churn out new sentences, and
choose them to align as best as
we can with our semantics.
Say I want to prove that a certain sentence p is a tautology. One way I could do this would be to look at all
possible valuation functions, and see that each of them assigns p the value T. But what if I want to prove it
without looking at the semantics?
Propositional Logic
SYNTAX SEMANTICS PROOF
Alphabet
( ) ∧ ∨ → ¬
p1 p2 p3 …
Grammar
> pn is grammatical for each n
> If a is grammatical, so is (¬a)
> If a and b are grammatical, so
are (a∧b), (a∨b), (a→b)
V: Atomic Propositions → {T,F}
V’: Grammatical Sentences → {T,F}
V’(pn) = V(pn)
V’(¬a) = T iff V’(a) = F
V’(a∧b) = T iff V’(a) = V’(b) = T
V’(a∨b) = F iff V’(a) = V’(b) = F
V’(a→b) = F iff V’(a) ≠ V’(b) = F
Axioms
1. a→(b→a)
2. (a→(b→c))→((a→b)→(a→c))
3. ((¬b)→(¬a))→(a→b)
Inference Rules
MP(a, a→b) = b
Notice that truth and proof are distinct!
A sentence a is a logical truth if for every function V, V’(a) = T.
A sentence is provable if it follows from the axioms via repeated use of the inference rules.
Proof of a→a
Two proofs that a→a is a logical truth:
Semantic Proof Syntactic Proof
For any V, either V’(a) = T or V’(a) = F
- If V’(a) = T, V’(a→a) = T
- If V’(a) = F, V’(a→a) = T
So for any V, V’(a→a) = T.
So a→a is a logical truth.
1. (a→((a→a)→a)) → ((a→(a→a))→(a→a)) Axiom 2
2. a→((a→a)→a) Axiom 1
3. (a→(a→a))→(a→a) MP(1,2)
4. a→(a→a) Axiom 1
5. a→a MP(3,4)
a (a→a)
T T
F T
(Reminders)
V’(a→b) = F iff V’(a) =T and V’(b) = F
Axiom 1: a→(b→a)
Axiom 2: (a→(b→c))→((a→b)→(a→c))
Semantic and Syntactic Entailment
More generally:
- A set of sentences B semantically entails (or logically entails) a sentence a (written B ⊨ a) if for every
function V such that V’ assigns T to all sentences in B, V’ also assigns T to a.
- A set of sentences B syntactically entails a sentence a (written B ⊢ a) if a follows from the axioms
AND the sentences in B via repeated use of the inference rules.
It so happens that these concepts perfectly coincide for propositional logic.
- The logical truths of propositional logic are exactly the provable sentences.
- B ⊨ a exactly when B ⊢ a
Some important logical concepts:
- Soundness: If B ⊢ a then B ⊨ a
- Completeness: If B ⊨ a then B ⊢ a
- Propositional logic is both sound and complete.
Soundness, Completeness, and Decidability
For logics with more expressive power, semantics and syntax come apart.
In particular, there is no proof system that is both sound and complete for second order logic.
Sound and Complete Proof
System
Decidable
Propositional Logic ✔ ✔
First Order Logic ✔ ✘
Second Order Logic ✘ ✘
First Order Logic
Let’s see how this plays out for first order logic! Buckle up, things are going to get a lot more complicated.
Outline
Syntax
- Terms
- Atomic Formulas
- Grammatical Formulas
Semantics
- Structures
- Variable assignments
- Valuation function
First Order Logic: Alphabet
First difference: First order logic is a collection of languages, not a single language.
All first order languages share a certain set of symbols, but also contain a set of language-specific symbols.
Shared Alphabet
( ) , ∧ ∨ → ¬ ∀ ∃ =
Variables: x1 x2 x3 …
Language-Specific Alphabet
Constant symbols: c1 c2 c3 …
Relation symbols: R1 R2 R3 …
Function symbols: f1 f2 f3 …
Arity function
Arity: (Relation symbols ∪ Function symbols) → ℕ
First Order Logic: Grammar
Grammar is a bit trickier than ‘twas for propositional logic. We do it in three steps.
Terms
All variables and constants are terms.
f(t1, t2, …, tn) is a term for any function symbol f with Arity(f) = n, and for any terms t1, t2, …, tn.
Atomic Formulas
For any terms t1, t2, (t1=t2) is an atomic formula.
R(t1, …, tn) is an atomic formula for any relation symbol R with Arity(R) = n, and for any terms t1,
…, tn.
Grammatical Formulas
Every atomic formula is grammatical.
If a is grammatical, so is (¬a).
If a and b are grammatical, so are (a∧b), (a∨b), (a→b).
If a is grammatical, x is a variable, and a doesn’t contain ∀x or ∃x, then ∀xa and ∃xa are both grammatical.
First Order Logic: Semantics
We define a structure M= <U, I> for a first order language.
U is a set: it is the set of all objects in the domain of discourse.
I is an interpretation function: it “interprets” every constant, relation, and function symbol.
Constants: I(c) = cM ∈ U
Relations: I(R) = RM: UArity(R) → {T,F}
Functions: I(f) = fM: UArity(f) → U
U
c1
M
c2
M
c3
M
R1
M
c4
M
f1
M
R2
M
R3
M
First Order Logic: Semantics
Now we define a variable assignment for our structure M = <U,I>.
s: Variables → U
We extend this to all terms as follows:
s’: Terms → U
s’(x) = s(x) for variables x
s’(c) = cM for constants c
s’(f(t1, t2,...,tn)) = fM(s’(t1), s’(t2), …, s’(tn)), for any function symbol f with Arity(f) = n.
U
c1
M
c2
M
c3
M
R1
M
c4
M
f1
M
R2
M
R3
M
First Order Logic: Semantics
With our structure M and our variable assignment s, we are finally ready to construct a valuation function!
First for atomic formulas.
VM,s: Atomic Formulas → {T,F}
VM,s(t1=t2) = T iff t1
M = t2
M
VM,s(R(t1,t2,...,tn)) = T iff RM(t1
M,t2
M,...,tn
M) = T
U
c1
M
c2
M
c3
M
R1
M
c4
M
f1
M
R2
M
R3
M
First Order Logic: Semantics
Now for the rest of the language!
V’M,s: Grammatical Formulas → {T,F}
V’M,s(a) = VM,s(a) if a is atomic
V’M,s(¬a) = T iff V’M,s(a) = F
V’(a∧b) = T iff V’M,s(a) = V’M,s(b) = T
V’M,s(a∨b) = F iff V’M,s(a) = V’M,s(b) = F
V’M,s(a→b) = F iff V’M,s(a) =T and V’M,s(b) = F
V’M,s(∀xa) = T iff V’M, s(x/d)(a) = T for all d ∈ U
V’M,s(∃xa) = T iff V’M, s(x/d)(a) = T for some d ∈ U
For the last two, we used the concept of a variant variable assignment:
sx/d(y) = s(y) if y ≠ x, otherwise d
First Order Logic: Proof System
Axioms
Every propositional tautology with atomic propositions substituted for first order sentences.
A(t) → ∃xA(x)
∀xA(x) → A(t), where t is not bound by A
(A→B) → (A→∀xB), where x is not free in A
(A→B) → (∃xA→B), where x is not free in A
x = x
(x = y) → (A → A’), where A’ is obtained by replacing any number of free occurrences of x with
y
Inference Rules
Modus Ponens: MP(A, A→B) = B
First Order Logic: Semantics
The structure M = <U,I> and the variable assignment s together uniquely determine the truth values of all
the grammatical sentences.
Notation: M,s ⊨ a iff V’M,s(a) = T
A sentence a is a logical truth if for all structures M and variable assignments s, M,s ⊨ a
Semantic entailment: B ⊨ a iff for all M and s, if M,s ⊨ b for every b in B, then it’s also the case that M,s ⊨ a.
Examples
∀x(x=x) is a logical truth
(R(x)∨(¬R(x))) is a logical truth
∀xR(x) ⊨ ∃xR(x)
∀x∀yR(x,y) ⊨ ∀y∀xR(x,y)
∀x∃yR(x,y) ⊭ ∃y∀xR(x,y)
First Order Logic: The Limitations
This proof system for first order logic is both sound and complete, but not decidable!
Decidability: there’s a decision procedure which determines whether arbitrary formulas are logical truths.
If a first-order language has at least one predicate of arity at least 2, then it is undecidable!
Expressive limitations:
- Not capable of expressing the notion that “there are finitely many things”
- Doesn’t have the expressive power to distinguish between different cardinalities of infinity
- There is no first order language in which you can uniquely pin down the natural numbers. No set of
sentences is consistent with the structure of the natural numbers and no other structures.
Second Order Logic
Second order logic fixes these problems! Second order logic is what you get when you add the ability to
quantify over predicates and functions to first order logic.
Second order logic is capable of expressing finiteness, talking about specific cardinalities, and uniquely
pinning down the natural numbers.
But as we’ll see, it has problems of its own.
Second Order Logic: Alphabet
Almost the same as with first order logic, but now we have extra variables and remove =.
Shared Alphabet
( ) , ∧ ∨ → ¬ ∀ ∃
Individual variables: x1 x2 x3 …
Relation variables: X1 X2 X3 … (actually an infinite store for each possible arity)
Function variables: F1 F2 F3 … (actually an infinite store for each possible arity)
Language-Specific Alphabet
Constant symbols: c1 c2 c3 …
Relation symbols: R1 R2 R3 …
Function symbols: f1 f2 f3 …
Arity function
Arity: (Relation symbols ∪ Function symbols) → ℕ
Second Order Logic: Grammar
Almost the same as with first order logic, but now we also allow the following grammatical constructions:
If a is grammatical and x is an individual variable, then so is ∀xa and ∃xa
If a is grammatical and X is a relation variable, then so is ∀Xa and ∃Xa
If a is grammatical and F is a function variable, then so is ∀Fa and ∃Fa
Second Order Logic: Standard Semantics
There are actually several different “second order logics” with different semantics. We’ll spend most our
time on standard semantics.
Like in first order logic, we have a structure M = <U,I>. Now, though, our variable assignment function
has to assign values to all the relation and function variables as well as the individual variables.
s1: Individual Variables → U
s2: n-ary Relation Variables → {f: Un → {T,F}}
s3: n-ary Function Variables → {f: Un → U}
Second Order Logic: Standard Semantics
Together, M, s1, s2, and s3 uniquely pin down a truth value for every sentence of second order logic. The
semantics for all the non-quantified formulas are identical to first-order logic. For quantified formulas we
have the following:
V’M,s1,s2,s3(∀xa) = T iff V’M,s1(x/d),s2,s3(a) = T for all d ∈ U
V’M,s1,s2,s3(∃xa) = T iff V’M,s1(x/d),s2,s3(a) = T for some d ∈ U
V’M,s1,s2,s3(∀Xa) = T iff V’M,s1,s2(X/D),s3(a) = T for all D ⊆ Un, for n-ary X
V’M,s1,s2,s3(∃Xa) = T iff V’M,s1,s2(X/D),s3(a) = T for some D ⊆ Un, for n-ary X
V’M,s1,s2,s3(∀Fa) = T iff V’M,s1,s2,s3(F/G)(a) = T for all G ∈ {f: Un → U}, for n-ary F
V’M,s1,s2,s3(∃Fa) = T iff V’M,s1,s2,s3(F/G)(a) = T for some G ∈ {f: Un → U}, for n-ary F
Second Order Logic: Proof System
The drawback of all this expressive power we now have…
There is no sound and complete proof system for second order logic!
For any sound proof system you choose for second order logic, and for any second-order language, there
will be logical truths in that language that the proof system will fail to prove.
Second Order Logic and Complexity Theory
- REG (the set of regular languages) is definable by monadic, second-order formulas.
- NP is the set of languages definable by existential, second-order formulas.
- co-NP is the set of languages definable by universal, second-order formulas.
- PH is the set of languages definable by second-order formulas.
Summary
Logical truth is fundamentally about semantics.
We define the truth of a sentence based off of our intended meaning for the symbols in use.
SYNTAX SEMANTICS PROOF
Defines an alphabet
of symbols.
Defines a grammar:
some subset of the
set of all finite
strings of symbols.
Defines the meaning of
each symbol.
Defines a “valuation
function” from
grammatical sentences
to truth values,
consistent with the
meanings of the
symbols.
Defines a deductive
calculus.
Gives a set of axioms
and inference rules
from which you can
derive more
sentences.
Sound and
Complete
Proof System
Decidable
Propositional
Logic
✔ ✔
First Order
Logic
✔ ✘
Second Order
Logic
✘ ✘

More Related Content

What's hot

Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicIT Engineering Department
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicUniversity of Potsdam
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicManjula V
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalencesallyn joy calcaben
 
Unit I discrete mathematics lecture notes
Unit I  discrete mathematics lecture notesUnit I  discrete mathematics lecture notes
Unit I discrete mathematics lecture notesGIRIM8
 
chapter 1 (part 2)
chapter 1 (part 2)chapter 1 (part 2)
chapter 1 (part 2)Raechel Lim
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic Junya Tanaka
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logicAmey Kerkar
 
Godels First Incompleteness Theorem
Godels First Incompleteness TheoremGodels First Incompleteness Theorem
Godels First Incompleteness Theoremmmanning02474
 
S2 1
S2 1S2 1
S2 1IIUM
 
Gödel’s incompleteness theorems
Gödel’s incompleteness theoremsGödel’s incompleteness theorems
Gödel’s incompleteness theoremsSérgio Souza Costa
 

What's hot (20)

Chapter 4 (final)
Chapter 4 (final)Chapter 4 (final)
Chapter 4 (final)
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
 
Unit I discrete mathematics lecture notes
Unit I  discrete mathematics lecture notesUnit I  discrete mathematics lecture notes
Unit I discrete mathematics lecture notes
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
chapter 1 (part 2)
chapter 1 (part 2)chapter 1 (part 2)
chapter 1 (part 2)
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Per3 logika&amp;pembuktian
Per3 logika&amp;pembuktianPer3 logika&amp;pembuktian
Per3 logika&amp;pembuktian
 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
Godels First Incompleteness Theorem
Godels First Incompleteness TheoremGodels First Incompleteness Theorem
Godels First Incompleteness Theorem
 
S2 1
S2 1S2 1
S2 1
 
Gödel’s incompleteness theorems
Gödel’s incompleteness theoremsGödel’s incompleteness theorems
Gödel’s incompleteness theorems
 
Logic agent
Logic agentLogic agent
Logic agent
 

Similar to True but Unprovable

Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicPalGov
 
Mathreasoning
MathreasoningMathreasoning
MathreasoningAza Alias
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxPriyalMayurManvar
 
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Ashish Duggal
 
Contradiction
ContradictionContradiction
ContradictionUsman Rj
 
Contradiction
ContradictionContradiction
ContradictionUsman Rj
 
Propositions - Discrete Structures
Propositions - Discrete Structures Propositions - Discrete Structures
Propositions - Discrete Structures Drishti Bhalla
 
Deductive and Inductive Arguments
Deductive and Inductive ArgumentsDeductive and Inductive Arguments
Deductive and Inductive ArgumentsJanet Stemwedel
 
Introduction to set theory by william a r weiss professor
Introduction to set theory by william a r weiss professorIntroduction to set theory by william a r weiss professor
Introduction to set theory by william a r weiss professormanrak
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicTaymoor Nazmy
 
Ilja state2014expressivity
Ilja state2014expressivityIlja state2014expressivity
Ilja state2014expressivitymaartenmarx
 

Similar to True but Unprovable (20)

Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logic
 
Mathreasoning
MathreasoningMathreasoning
Mathreasoning
 
lect14-semantics.ppt
lect14-semantics.pptlect14-semantics.ppt
lect14-semantics.ppt
 
Logic
LogicLogic
Logic
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
 
4AMT122-PART 1-SLIDES.pptx
4AMT122-PART 1-SLIDES.pptx4AMT122-PART 1-SLIDES.pptx
4AMT122-PART 1-SLIDES.pptx
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
 
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
 
Contradiction
ContradictionContradiction
Contradiction
 
Contradiction
ContradictionContradiction
Contradiction
 
Logic.pptx
Logic.pptxLogic.pptx
Logic.pptx
 
Propositions - Discrete Structures
Propositions - Discrete Structures Propositions - Discrete Structures
Propositions - Discrete Structures
 
Deductive and Inductive Arguments
Deductive and Inductive ArgumentsDeductive and Inductive Arguments
Deductive and Inductive Arguments
 
Introduction to set theory by william a r weiss professor
Introduction to set theory by william a r weiss professorIntroduction to set theory by william a r weiss professor
Introduction to set theory by william a r weiss professor
 
3 computing truth tables
3   computing truth tables3   computing truth tables
3 computing truth tables
 
Logic
LogicLogic
Logic
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
 
01bkb04p.ppt
01bkb04p.ppt01bkb04p.ppt
01bkb04p.ppt
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logic
 
Ilja state2014expressivity
Ilja state2014expressivityIlja state2014expressivity
Ilja state2014expressivity
 

Recently uploaded

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 

Recently uploaded (20)

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 

True but Unprovable

  • 2. Goal Logicians sometimes talk about sentences being “true but unprovable” Our goal: Understand what they mean by this. “Gödel’s first incompleteness theorem states that no consistent system of axioms whose theorems can be listed by an algorithm is capable of proving all truths about the arithmetic of natural numbers.” “For any such consistent formal system, there will always be statements about natural numbers that are true, but that are unprovable within the system.”
  • 3. An Illustration There’s an island on which there lives two types of people: truthers and liars. Truthers always speak the truth, liars always say falsehoods. A logician that knows all of this visits the island. He is a perfectly sound reasoner, i.e. he never proves anything that is false. The logician encounters an individual named Jal living on the island. Jal makes some statement to the logician, after which the following two things are true: (1) Jal’s statement logically entails that Jal is a truther. (2) The logician can never possibly prove that Jal is a truther. The question: What did Jal say?
  • 4. A solution Jal’s statement to the logician: “You can not prove that I am a truther.” Only a truther could say this sentence.
  • 5. A solution Jal’s statement to the logician: “You can not prove that I am a truther.” Only a truther could say this sentence. But if Jal is a truther, then his statement is true. So the logician can not prove that Jal is a truther. Suppose Jal is a liar. Then the sentence “You can not prove that I am a truther” is false. So the logician can prove that Jal is a truther. But the logician cannot prove a falsehood. Contradiction
  • 6. But... Why can’t the logician make this exact argument, therefore proving just as we did that Jal is a liar? Suppose Jal is a liar. Then the sentence “You can not prove that I am a truther” is false. So the logician can prove that Jal is a truther. But the logician cannot prove a falsehood. Contradiction
  • 7. But... Why can’t the logician make this exact argument, therefore proving just as we did that Jal is a liar? Because to do so, he would have to assert his own soundness. Gödel’s second incompleteness theorem tells us that no sound reasoner can assert this of himself. Suppose Jal is a liar. Then the sentence “You can not prove that I am a truther” is false. So the logician can prove that Jal is a truther. But the logician cannot prove a falsehood. Contradiction
  • 8. Example 2: Busy beavers The busy beaver numbers are a well-defined sequence BB(n). Run all n-state Turing machines. Some never halt, the rest eventually do. BB(n) is the halt time of the longest-running machine. BB(n) is a measure of how complex a program you can run on an n-state Turing machine. We will now prove that no effective and consistent proof system can enumerate all its values.
  • 9. Example 2: Busy beavers Take any consistent formal proof system F whose theorems can be listed by a Turing machine. Construct an n-state Turing machine that enumerates the theorems of F, halting only if it reaches a contradiction. Whether this Turing machine halts depends on if F is consistent. BB(n) tells us how long we have to wait to know for sure if it halts. So if F could prove the value of BB(n), F could prove its own consistency. Violation of Gödel’s second! (F can’t even upper bound BB(n)! Why?) The busy beaver numbers are a well-defined sequence BB(n). Run all n-state Turing machines. Some never halt, the rest eventually do. BB(n) is the halt time of the longest-running machine. BB(n) is a measure of how complex a program you can run on an n-state Turing machine. We will now prove that no effective and consistent proof system can determine all its values.
  • 10. Example 2: Busy beavers Different proof systems will have different thresholds for unprovability. The “standard proof system” for mathematics is ZFC set theory. We know ZFC can only prove at most 7,918 values of BB(n), and probably much fewer.
  • 11. Final Example: Goldbach Conjecture Every even integer greater than 2 is the sum of two primes. 4 = 2 + 2 6 = 3 + 3 8 = 5 + 3 10 = 5 + 5 12 = 7 + 5 Etc...
  • 12. Final Example: Goldbach Conjecture Every even integer greater than 2 is the sum of two primes. 4 = 2 + 2 6 = 3 + 3 8 = 5 + 3 10 = 5 + 5 12 = 7 + 5 Etc... Know to be true for values up to 4×1018. Goldbach: "I regard as a completely certain theorem, although I cannot prove it." What if it cannot be proven true or false? Then it must be true!
  • 13. Final Example: Goldbach Conjecture Every even integer greater than 2 is the sum of two primes. 4 = 2 + 2 6 = 3 + 3 8 = 5 + 3 10 = 5 + 5 12 = 7 + 5 Etc... Know to be true for values up to 4×1018. Goldbach: "I regard as a completely certain theorem, although I cannot prove it." What if it cannot be proven true or false? Then it must be true! If the conjecture were false, that would mean that there’s a counterexample. So we could eventually find that counterexample and prove the conjecture false. So if it’s unprovable, then it must be true.
  • 14. So, what is it to be “true but unprovable”? Logicians distinguish between syntax, semantics, and proof. SYNTAX SEMANTICS PROOF Defines an alphabet of symbols. Defines a grammar: some subset of the set of all finite strings of symbols. Defines the meaning of each symbol. Defines a “valuation function” from grammatical sentences to truth values, consistent with the meanings of the symbols. Defines a deductive calculus. Gives a set of axioms (sentences) and inference rules (functions from sentences to other sentences) from which you can derive theorems.
  • 15. Propositional Logic SYNTAX SEMANTICS PROOF Alphabet ( ) ∧ ∨ → ¬ p1 p2 p3 … Grammar > pn is grammatical for each n > If a is grammatical, so is (¬a) > If a and b are grammatical, so are (a∧b), (a∨b), (a→b) We want to define a truth valuation function V from grammatical sentences to truth values. But not just any function will do. The allowed functions must respect our intended meaning of the symbols ∧, ∨, →, and ¬. (There’s a possible function from grammatical sentences to truth values that assigns V(p) = F, V(q) = F, and V(p∧q) = T. We don’t want to say that this is a valid “truth valuation.” Thus our set of truth valuation functions will be restricted to only those that align nicely with our intended semantics.)
  • 16. Propositional Logic SYNTAX SEMANTICS PROOF Alphabet ( ) ∧ ∨ → ¬ p1 p2 p3 … Grammar > pn is grammatical for each n > If a is grammatical, so is (¬a) > If a and b are grammatical, so are (a∧b), (a∨b), (a→b) V: Atomic Propositions → {T,F} V’: Grammatical Sentences → {T,F} V’(pn) = V(pn) V’(¬a) = T iff V’(a) = F V’(a∧b) = T iff V’(a) = V’(b) = T V’(a∨b) = F iff V’(a) = V’(b) = F V’(a→b) = F iff V’(a) ≠ V’(b) = F With our truth functions defined, we want a purely mechanical procedure for deriving theorems without having to look directly at the semantics. We define a set of axioms and inference rules that will blindly churn out new sentences, and choose them to align as best as we can with our semantics. Say I want to prove that a certain sentence p is a tautology. One way I could do this would be to look at all possible valuation functions, and see that each of them assigns p the value T. But what if I want to prove it without looking at the semantics?
  • 17. Propositional Logic SYNTAX SEMANTICS PROOF Alphabet ( ) ∧ ∨ → ¬ p1 p2 p3 … Grammar > pn is grammatical for each n > If a is grammatical, so is (¬a) > If a and b are grammatical, so are (a∧b), (a∨b), (a→b) V: Atomic Propositions → {T,F} V’: Grammatical Sentences → {T,F} V’(pn) = V(pn) V’(¬a) = T iff V’(a) = F V’(a∧b) = T iff V’(a) = V’(b) = T V’(a∨b) = F iff V’(a) = V’(b) = F V’(a→b) = F iff V’(a) ≠ V’(b) = F Axioms 1. a→(b→a) 2. (a→(b→c))→((a→b)→(a→c)) 3. ((¬b)→(¬a))→(a→b) Inference Rules MP(a, a→b) = b Notice that truth and proof are distinct! A sentence a is a logical truth if for every function V, V’(a) = T. A sentence is provable if it follows from the axioms via repeated use of the inference rules.
  • 18. Proof of a→a Two proofs that a→a is a logical truth: Semantic Proof Syntactic Proof For any V, either V’(a) = T or V’(a) = F - If V’(a) = T, V’(a→a) = T - If V’(a) = F, V’(a→a) = T So for any V, V’(a→a) = T. So a→a is a logical truth. 1. (a→((a→a)→a)) → ((a→(a→a))→(a→a)) Axiom 2 2. a→((a→a)→a) Axiom 1 3. (a→(a→a))→(a→a) MP(1,2) 4. a→(a→a) Axiom 1 5. a→a MP(3,4) a (a→a) T T F T (Reminders) V’(a→b) = F iff V’(a) =T and V’(b) = F Axiom 1: a→(b→a) Axiom 2: (a→(b→c))→((a→b)→(a→c))
  • 19. Semantic and Syntactic Entailment More generally: - A set of sentences B semantically entails (or logically entails) a sentence a (written B ⊨ a) if for every function V such that V’ assigns T to all sentences in B, V’ also assigns T to a. - A set of sentences B syntactically entails a sentence a (written B ⊢ a) if a follows from the axioms AND the sentences in B via repeated use of the inference rules. It so happens that these concepts perfectly coincide for propositional logic. - The logical truths of propositional logic are exactly the provable sentences. - B ⊨ a exactly when B ⊢ a Some important logical concepts: - Soundness: If B ⊢ a then B ⊨ a - Completeness: If B ⊨ a then B ⊢ a - Propositional logic is both sound and complete.
  • 20. Soundness, Completeness, and Decidability For logics with more expressive power, semantics and syntax come apart. In particular, there is no proof system that is both sound and complete for second order logic. Sound and Complete Proof System Decidable Propositional Logic ✔ ✔ First Order Logic ✔ ✘ Second Order Logic ✘ ✘
  • 21. First Order Logic Let’s see how this plays out for first order logic! Buckle up, things are going to get a lot more complicated. Outline Syntax - Terms - Atomic Formulas - Grammatical Formulas Semantics - Structures - Variable assignments - Valuation function
  • 22. First Order Logic: Alphabet First difference: First order logic is a collection of languages, not a single language. All first order languages share a certain set of symbols, but also contain a set of language-specific symbols. Shared Alphabet ( ) , ∧ ∨ → ¬ ∀ ∃ = Variables: x1 x2 x3 … Language-Specific Alphabet Constant symbols: c1 c2 c3 … Relation symbols: R1 R2 R3 … Function symbols: f1 f2 f3 … Arity function Arity: (Relation symbols ∪ Function symbols) → ℕ
  • 23. First Order Logic: Grammar Grammar is a bit trickier than ‘twas for propositional logic. We do it in three steps. Terms All variables and constants are terms. f(t1, t2, …, tn) is a term for any function symbol f with Arity(f) = n, and for any terms t1, t2, …, tn. Atomic Formulas For any terms t1, t2, (t1=t2) is an atomic formula. R(t1, …, tn) is an atomic formula for any relation symbol R with Arity(R) = n, and for any terms t1, …, tn. Grammatical Formulas Every atomic formula is grammatical. If a is grammatical, so is (¬a). If a and b are grammatical, so are (a∧b), (a∨b), (a→b). If a is grammatical, x is a variable, and a doesn’t contain ∀x or ∃x, then ∀xa and ∃xa are both grammatical.
  • 24. First Order Logic: Semantics We define a structure M= <U, I> for a first order language. U is a set: it is the set of all objects in the domain of discourse. I is an interpretation function: it “interprets” every constant, relation, and function symbol. Constants: I(c) = cM ∈ U Relations: I(R) = RM: UArity(R) → {T,F} Functions: I(f) = fM: UArity(f) → U U c1 M c2 M c3 M R1 M c4 M f1 M R2 M R3 M
  • 25. First Order Logic: Semantics Now we define a variable assignment for our structure M = <U,I>. s: Variables → U We extend this to all terms as follows: s’: Terms → U s’(x) = s(x) for variables x s’(c) = cM for constants c s’(f(t1, t2,...,tn)) = fM(s’(t1), s’(t2), …, s’(tn)), for any function symbol f with Arity(f) = n. U c1 M c2 M c3 M R1 M c4 M f1 M R2 M R3 M
  • 26. First Order Logic: Semantics With our structure M and our variable assignment s, we are finally ready to construct a valuation function! First for atomic formulas. VM,s: Atomic Formulas → {T,F} VM,s(t1=t2) = T iff t1 M = t2 M VM,s(R(t1,t2,...,tn)) = T iff RM(t1 M,t2 M,...,tn M) = T U c1 M c2 M c3 M R1 M c4 M f1 M R2 M R3 M
  • 27. First Order Logic: Semantics Now for the rest of the language! V’M,s: Grammatical Formulas → {T,F} V’M,s(a) = VM,s(a) if a is atomic V’M,s(¬a) = T iff V’M,s(a) = F V’(a∧b) = T iff V’M,s(a) = V’M,s(b) = T V’M,s(a∨b) = F iff V’M,s(a) = V’M,s(b) = F V’M,s(a→b) = F iff V’M,s(a) =T and V’M,s(b) = F V’M,s(∀xa) = T iff V’M, s(x/d)(a) = T for all d ∈ U V’M,s(∃xa) = T iff V’M, s(x/d)(a) = T for some d ∈ U For the last two, we used the concept of a variant variable assignment: sx/d(y) = s(y) if y ≠ x, otherwise d
  • 28. First Order Logic: Proof System Axioms Every propositional tautology with atomic propositions substituted for first order sentences. A(t) → ∃xA(x) ∀xA(x) → A(t), where t is not bound by A (A→B) → (A→∀xB), where x is not free in A (A→B) → (∃xA→B), where x is not free in A x = x (x = y) → (A → A’), where A’ is obtained by replacing any number of free occurrences of x with y Inference Rules Modus Ponens: MP(A, A→B) = B
  • 29. First Order Logic: Semantics The structure M = <U,I> and the variable assignment s together uniquely determine the truth values of all the grammatical sentences. Notation: M,s ⊨ a iff V’M,s(a) = T A sentence a is a logical truth if for all structures M and variable assignments s, M,s ⊨ a Semantic entailment: B ⊨ a iff for all M and s, if M,s ⊨ b for every b in B, then it’s also the case that M,s ⊨ a. Examples ∀x(x=x) is a logical truth (R(x)∨(¬R(x))) is a logical truth ∀xR(x) ⊨ ∃xR(x) ∀x∀yR(x,y) ⊨ ∀y∀xR(x,y) ∀x∃yR(x,y) ⊭ ∃y∀xR(x,y)
  • 30. First Order Logic: The Limitations This proof system for first order logic is both sound and complete, but not decidable! Decidability: there’s a decision procedure which determines whether arbitrary formulas are logical truths. If a first-order language has at least one predicate of arity at least 2, then it is undecidable! Expressive limitations: - Not capable of expressing the notion that “there are finitely many things” - Doesn’t have the expressive power to distinguish between different cardinalities of infinity - There is no first order language in which you can uniquely pin down the natural numbers. No set of sentences is consistent with the structure of the natural numbers and no other structures.
  • 31. Second Order Logic Second order logic fixes these problems! Second order logic is what you get when you add the ability to quantify over predicates and functions to first order logic. Second order logic is capable of expressing finiteness, talking about specific cardinalities, and uniquely pinning down the natural numbers. But as we’ll see, it has problems of its own.
  • 32. Second Order Logic: Alphabet Almost the same as with first order logic, but now we have extra variables and remove =. Shared Alphabet ( ) , ∧ ∨ → ¬ ∀ ∃ Individual variables: x1 x2 x3 … Relation variables: X1 X2 X3 … (actually an infinite store for each possible arity) Function variables: F1 F2 F3 … (actually an infinite store for each possible arity) Language-Specific Alphabet Constant symbols: c1 c2 c3 … Relation symbols: R1 R2 R3 … Function symbols: f1 f2 f3 … Arity function Arity: (Relation symbols ∪ Function symbols) → ℕ
  • 33. Second Order Logic: Grammar Almost the same as with first order logic, but now we also allow the following grammatical constructions: If a is grammatical and x is an individual variable, then so is ∀xa and ∃xa If a is grammatical and X is a relation variable, then so is ∀Xa and ∃Xa If a is grammatical and F is a function variable, then so is ∀Fa and ∃Fa
  • 34. Second Order Logic: Standard Semantics There are actually several different “second order logics” with different semantics. We’ll spend most our time on standard semantics. Like in first order logic, we have a structure M = <U,I>. Now, though, our variable assignment function has to assign values to all the relation and function variables as well as the individual variables. s1: Individual Variables → U s2: n-ary Relation Variables → {f: Un → {T,F}} s3: n-ary Function Variables → {f: Un → U}
  • 35. Second Order Logic: Standard Semantics Together, M, s1, s2, and s3 uniquely pin down a truth value for every sentence of second order logic. The semantics for all the non-quantified formulas are identical to first-order logic. For quantified formulas we have the following: V’M,s1,s2,s3(∀xa) = T iff V’M,s1(x/d),s2,s3(a) = T for all d ∈ U V’M,s1,s2,s3(∃xa) = T iff V’M,s1(x/d),s2,s3(a) = T for some d ∈ U V’M,s1,s2,s3(∀Xa) = T iff V’M,s1,s2(X/D),s3(a) = T for all D ⊆ Un, for n-ary X V’M,s1,s2,s3(∃Xa) = T iff V’M,s1,s2(X/D),s3(a) = T for some D ⊆ Un, for n-ary X V’M,s1,s2,s3(∀Fa) = T iff V’M,s1,s2,s3(F/G)(a) = T for all G ∈ {f: Un → U}, for n-ary F V’M,s1,s2,s3(∃Fa) = T iff V’M,s1,s2,s3(F/G)(a) = T for some G ∈ {f: Un → U}, for n-ary F
  • 36. Second Order Logic: Proof System The drawback of all this expressive power we now have… There is no sound and complete proof system for second order logic! For any sound proof system you choose for second order logic, and for any second-order language, there will be logical truths in that language that the proof system will fail to prove.
  • 37. Second Order Logic and Complexity Theory - REG (the set of regular languages) is definable by monadic, second-order formulas. - NP is the set of languages definable by existential, second-order formulas. - co-NP is the set of languages definable by universal, second-order formulas. - PH is the set of languages definable by second-order formulas.
  • 38. Summary Logical truth is fundamentally about semantics. We define the truth of a sentence based off of our intended meaning for the symbols in use. SYNTAX SEMANTICS PROOF Defines an alphabet of symbols. Defines a grammar: some subset of the set of all finite strings of symbols. Defines the meaning of each symbol. Defines a “valuation function” from grammatical sentences to truth values, consistent with the meanings of the symbols. Defines a deductive calculus. Gives a set of axioms and inference rules from which you can derive more sentences. Sound and Complete Proof System Decidable Propositional Logic ✔ ✔ First Order Logic ✔ ✘ Second Order Logic ✘ ✘

Editor's Notes

  1. Quote from wiki
  2. On (1): Given the information in the setup, it is not logically possible for Jal to have made the statement he made if he were not a truther. If any individual from the island makes the statement that Jal made to the logician, in any possible world, that individual must be a truther. On (2): Remember that we never asserted that the logician proves ALL true things, just that the logician proves only true things. I.e. the logician is sound but not necessarily complete.
  3. It’s fine for us to know that he is a sound reasoner, but no sufficiently advanced sound reasoner can know this about himself. F can’t prove F’s consistency F+Cons(F) can prove F’s consistency, but not the consistency of “F+Cons(F)”
  4. Most important slide!
  5. (Not in general feasible.)
  6. Examples of logical truths: (p ∨ ¬p), (p→(q→p)), (p→p)
  7. (Propositional logic is not sufficiently expressively powerful to talk about arithmetic, so Gödel’s incompleteness theorems don’t apply.)
  8. Decidable: There’s an algorithm for determining whether any given sentence is or is not a tautology.
  9. Suppose we have a set of sentences A that pick out all and only the finite structures. We construct a new set of sentences A + “There’s at least 1 thing” + “There’s at least 2 things” + … Models of a set of sentences A = The set of structures that satisfy every sentence in A Lowenheim-Skolem Theorem: If a set of sentences A has a model of some infinite cardinality, it also has models of every infinite cardinality.