
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















Slides byVenkatesanGuruswami In mathematics, sometimes your intuitioncan be quite wrong.Here’s atheorem (calledBanach -Tarski paradox):A solid ball in 3-dimensions can be cut up into6 non-overlapping pieces, so that these piecescan be moved around & assembled into twoidentical copies of the original ball.
So it is important to:Formalize concepts, give precise definitionsMake implicit assumptions explicitWrite careful proofs, where every step canbe checked carefully.Even “mechanically”using a “computing machine”, if you will Part 1: Axiomatic systems.Part 2: Propositional logic.Part 3: First order logic.
(just some basics)
AXIOMATIC SYSTEMS
An ATM has $2 bills and $5 billsWhat dollar amounts can it dispense?^25 7 = 2+54 = 2+210 = 5+56 = 4+28 = 6+210 = 8+212 = 10+2 …all even amounts
9 = 4+511 = 6+513 = 8+515 = 10+5 …any odd amount at least 5 Cannot^ make 1 or 3 All m in N except 0, 1, 3.
“deduction rule”.” The quantities you can make:
“theorems”x is a “theorem”֞^ x ≠ 0,1, Initial amounts (2 & 5):
“axioms” In^ this^ axiomatic system:
Claim:^ ()))^ is NOT a theorem. Claim: Any theorem has equally many
(^ and^ ) Proof sketch:^ True for the axiom.WRAP:^ If S has equally many, so does
Follows from:^ CONCAT: If S, T have equal, so does ST Formal proof:^ structural induction(or strong induction on # of steps in deduction)For k^ ≥^ 1, let Fbe the statement “any theorem derived in exactly k lines has equally manyk^
( , ) ”.
The base case is k = 1. Fis true because a 1-line deduction must be an axiom, and the only axiom,^1
() , has
equally many^ ( , ). For general k > 1, let us suppose that F
is true for all 1^ ≤^ i < k. For the induction step, we must show that Fi^
k
is true.So suppose W is a theorem derived at the end of a k-line deduction.The final line of this deduction (which derives W) is an axiom
OR^ an application of WRAP to some previous line j < k^ OR^ an application of CONCAT to some two previous lines j
, j< k. We verify that W has equally 12 many^ ( , )^ in all three cases.th^ In case the k^ line is an axiom, W must be
() , which has equally many^ ( ,
). th^ In case the k line is WRAP applied to line j < k, we have W =
( S ) , where S is the theorem on line j. Since F
j
is true by assumption, S has the same number of
( , )^ —^ say c each.^ Then W has c+1 many
(^ and c+1 many^ ) ,
an equal number.th^ In case the k^ line is CONCAT applied to lines j
, j^ < k, we have W = TTwhere T 12 12
is the theorem on line j^1 and Tis the theorem on line j^2
. Since Fis true by assumption, T 2 j^
has the same number of^ ( , )^ 1
—^ say d^1
each. Similarly Thas the same number of^2
( , )^ —^ say deach. Hence W has d^2
+dmany^ (^ and d+dmany^12 ) ,
an equal number.In each of the three cases we have shown W has an equal number of
( , ). Thus Fis indeed true. Thek^ Exercise: Write a formal proof using structural induction.For comparison, here is a proof by strong induction:induction is complete.
sound , namely:
-^ All theorems are true.But is it also^ “complete”
, namely
true stuff^ is: “all strings with an equal
numbers of ( and
Answer: No.^ ---For example, consider: ())(
Claim:^ a string of
( , )^ is a theorem in this system^ if and only if it’s a sequence of “balanced parentheses
Proof: Exercise
(or ask one of the course staff) That is, this axiomatic system is
for the truth concept:
-^ Vocabulary^ Axiomatic systems: summary(or Universe)^ (numbers, strings, tiles, graphs, …) Elements called^ expressions. -^ Axioms: initial set of expressions. •^ Deduction rules: rules for obtaining new
expressions from old ones.
-^ Theorem: an obtainable expression. •^ Typical problems: Show X is a theorem.Show Y is not a theorem. Is the system sound/complete for some “truth” concept?^ “Characterize” the set of all theorems.^ PROPOSITIONAL LOGIC
(Zero-Order Logic)
from A,^ can obtain ¬Afrom A, B^ can obtain (A
axioms:^ deduction rules:
x^ , x^ , x^ , …^1 2 Definition:^ A formula is a
p ropositional formula (aka “well-formed” formula (WFF)) if and only if^ it is a
(A V B)^ “A or B” true if both A and Bare true^ A^ “not A”
true if at least one ofA and B is true A^ B^ A^ ^ B T^ T^ T T^ F^ F F^ T^ F F^ F^ F true if A is false
A^ B^ A^ ^ B T^ T^ T T^ F^ T F^ T^ T F^ F^ F A A T F F T
A^ B^ AoB T^ T^ T T^ F^ F^ F^ T^ T F^ F^ T “A implies B” same as (A o B) and (B o
B^ AlB T T^ T T F^ F F T^ F F F^ T Equivalent to (
A V B)
carbon and hydrogen are also observed.”
(k→(cרh)) Q: Is this statement true? A: Depends. The question is ill specified.
Whether this statement/formula is true/falsedepends on whether the variables are true/false^ (“state of the world”). If k =^ T , c =^ T , h =^
F …^ … the formula
is^ False.
“If potassium is observed thencarbon and hydrogen are also observed.”(k→(
cרh)) If k =^ F , c =^ F , h =
T …^ … the formula
is^ True.
Extends to give a truth value
α^ [S] for any formula S by (recursively) applying these rules:A^ B^
¬A^ (AרB)^ (A
שB)^ (A→B)^ (A↔B) F^ F^
T^ F^
F^ T^
T
F^ T^
T^ F^
T^ T^
F
T^ F^
F^ F^
T^ F^
F
T^ T^
F^ T^
T^ T^
T
Example: S = (p
&^ (p^ o^ q))^ o^
q p^ q^ p^ o
q^ p^ &^ (p^ o^ q))^
(p^ &^ (p^ oq))^ oq T^ T T^ F F^ T F^ F
p^ q^ p^ o
q^ p^ &^ (p^ o^ q))^
(p^ &^ (p^ o^ q))^ o^ q T^ T^
T^ T^
T T^ F^
F^ F^
T F^ T^
T^ F^
T F^ F^
T^ F^
T
Example: S = (p
&^ (p^ o^ q))^ o^
q
S = ((x→(y→z))↔((
xרy)→z)) Truth table x^ y^ z^
((x→(y→z))↔((x ר
y)→z)) F^ F^ F F^ F^ T F^ T^ F F^ T^ T T^ F^ F T^ F^ T T^ T^ F T^ T^ T
S is^ satisfiable
S = ((x→(y→z))↔((
xרy)→z)) Truth table
x^ y^ z^
((x→(y→z))↔((x ר
y)→z)) F^ F^ F^
T F^ F^ T^
T F^ T^ F^
T F^ T^ T^
T T^ F^ F^
T T^ F^ T^
T T^ T^ F^
T T^ T^ T^
T S is valid! Deciding Satisfiability (or Validity)Truth table method:Pro:^ Always works Con: If S has n variables, takes ≈
n^2 time
But for a^ given^
formula, sometimes you canprove/disprove satisfiability cleverly. There is^ no^ O(1.
n^ ) time algorithm that works for every formula.
propositional formulasn-variable formula maps eachpossible “world” in {T,F}
n^ into either T or F Some formulas are “truths” (tautologies):they are true in all possible 2
n^ worlds Can check if a formula is a tautology in ~
n^ time
by truth table method.
Proof of new expansion ruleA
(hypothesis) B^ V^ A^
(expansion rule) A^ V^ B^
A A V^ B (commutativity)
Proof of “modus ponens”
A, A^ o^ B B A^
(hypothesis) A^ o^ B^
(hypothesis) A^ V^ B^
(def. of^ o ) A^ V^ B^
(apply expansion to 1) B^ V^ B^
(cut rule to 2,3) B^
(contraction) Since the logical system does not have “
o ” we define it to be^
A^ V^ B
(1) (2) (3)
A A
A B V^ A ( A^ V^ A) (A^ V^ B), ( A^ V^ C)(B^ V^ C) associativity
contraction
expansion cut rule
(well-formed) propositional formulassome formulas are“theorems”p V^ ^ p (p & (p^ o^ q))^ o^ q these are formulasfor which wecan give proofs
some formulas aretautologies (“truths”)p^ V^ ^ p (p^ &^ (p^ o^ q))
o^ q can check bytruth-table Are all theorems “true” (i.e., tautologies)?Are all tautologies theorems?
Yes. (easy proof by induction)Yes. (proof lot more involved) For this logical system and propositional formulasYay! Our logical system is “sound”.We only prove truths.Double yay! Our logical system is “complete”.We can prove all the truths via inference rules.
This logical system issoundand completefor propositional truths (tautologies)
FIRST-ORDER LOGICA model for
pretty much all mathematical reasoning “Not, And, Or, Implies, If And Only If” Plus: Quantifiers: For All (
), There Exists (
Equals (=) “constants”, “relations”, “functions”^ Variables like x now represent^ objects , not truth-values.
“Ben is taller than everyone”:^ x IsTaller(
Ben ,x) relation name
constant name : stands for a mapping,objects հ T / F variable : stands for anobject (person): stands for aparticular object “Ben is taller than everyone”:^ x IsTaller(
Ben ,x) “Ben is taller than everyone else”:^ x (¬(x= Ben
)→^ IsTaller( Ben
,x)) th (^0) equality (of objects) order logic , as usual
“Ben’s dad is taller than everyone else’s dad”:^ x (¬(x= Ben
)→^ IsTaller(Father(
Ben ),Father(x))) function name
: stands for a mapping,objects հ object “Ben is taller than everyone”:^ x IsTaller(
Ben ,x) “Ben is taller than everyone else”:^ x (¬(x= Ben
)→^ IsTaller( Ben
,x) Vocabulary:^ A collection of constant-names,
function-names,relation-names. Vocabulary from the previous slide:one constant-name:
Ben one function-name:
Father( ∙ ) one relation-name:
IsTaller( ∙ ,^ ∙
Vocabulary:^ A collection of constant-names,
function-names,relation-names. Another example of a vocabulary:^ one constant-name: Example “sentences”:
a two function-names:
Next( ∙ ),^ Combine(
one relation-name:
IsPrior( ∙ ,^ ∙ ) x (Next(x)= a ) x^ y (IsPrior(x,Combine(
a ,y)) → (Next(x)=y)) (x IsPrior(x,Next
(x))) → (Next( a
)=Next( a ))
x (Next(x)=Combine(
a , a ))
…False
S is unsatisfiable:^ ,^ [S] =^ F^ for all
S is^ valid :^ ,^ [S] =^ T^ for all
All sentences in a given vocabulary^ unsatisfiable satisfiable x ¬(Next(x)=Next(x))^ x (Next(x)=Combine(valid
a , a )) (x(x= a ))→(Next(
a )= a )
(y^ x (x=Next(y))) → ( Problem 1:^ Show this is satisfiable.
w^ z (w=z)) Now (y^ x (x=Next(y))) means^ “there’s an integer y such^ that every integer = y+
Let’s pick this interpretation: Universe = integers,
Next(y) = y+1. That’s False! So the whole sentence becomes
True. Hence the sentence
is satisfiable. (y^ x (x=Next(y))) → ( Problem 2:^ Is it valid?
w^ z (w=z)) There is no “truth table method”.You can’t enumerate all possible interpretations! You have to use some cleverness.
(y^ x (x=Next(y))) → ( Problem 2:^ Is it valid?
w^ z (w=z))
Solution:^ Yes, it
is valid! Proof:^ Let^ ,^
be any interpretation.If , [y^ x (x=Next(y))] =
then the sentence is
True. If^ ,^ [y^ x (x=Next(y))] =
then every object equals Next(y).In that case,^ ,^ [w^
z (w=z)] =^ T. So no matter what,
,^ [the sentence] =
Axiomatic System for Validity?Can we find axioms & deduction rules so thatset of theorems = set of valid sentences ?A ridiculous way: Let axioms = “set of all valid sentences”. That is dumb because we at least want an^ algorithmic
way to check ifa given expression is an axiom.