01 Propositional Logic
Propositional Symbols¶
Symbol | Meaning |
---|---|
\(\top\) | True |
\(\bot\) | False |
\(\land, \lor\) | and, or (whichever comes first) |
\(\to\) | implies |
\(\vdash\) | Conclusion |
Natural Deduction¶
\(\phi_1, \phi_2, \dots\) are Premises
\(\psi\) is Conclusion
\(\phi_1, \phi_2, \dots, \phi_n \vdash\psi\) is called sequent
Rules¶
- \(\frac{\phi \quad \psi}{\phi \land \psi} \quad (\land i)\)
- \(\frac{\phi \land \psi}{\phi}, \frac{\phi \land \psi}{\psi} \quad (\land e_1, \land e_2)\)
- \(\frac{\phi}{\lnot \lnot \phi} \quad(\lnot \lnot i)\)
- \(\frac{\lnot \lnot \phi}{\phi} \quad(\lnot \lnot e)\)
- \(\frac{ \begin{bmatrix} \phi \\ \vdots \\ \psi \end{bmatrix} }{\phi \to \psi} \quad (\to i)\)
- \(\frac{\phi \quad \phi \to \psi}{\psi} \quad (\to e)\)
- \(\frac{\lnot \psi \quad \phi \to \psi}{\lnot \phi}\) (MT)
- \(\frac{\phi}{\phi \lor \psi}, \frac{\psi}{\phi \lor \psi} \quad (\lor i_1, \lor i_2)\)
- \(\frac{\phi \lor \psi \quad \begin{bmatrix} \phi \\ \vdots \\ \chi \end{bmatrix} \begin{bmatrix} \psi \\ \vdots \\ \chi \end{bmatrix} }{\chi} \quad (\lor e)\)
- Copy rule
- \(\frac{\begin{bmatrix} \phi \\ \vdots \\ \bot \end{bmatrix} }{\lnot \phi} \quad (\lnot i)\)
- \(\frac{\begin{bmatrix} \lnot \phi \\ \vdots \\ \bot \end{bmatrix} }{\phi}\) PBC
- \(\frac{\phi \quad \lnot \phi}{\bot} \quad (\lnot e)\)
- \(\frac{\bot}{\phi} \quad (\bot e)\)
- \(\frac{}{\phi \lor \lnot \phi}\)(LEM)
Equivalence Relation¶
If a formula can be proved in both directions, then it is called as an equivalence relation.
Denoted by \(\dashv \vdash\)
WFF¶
Well-formed formula
There's brackets for every operation
\((p \land (\lnot q)) \to (p \lor (q \lor (\lnot r) ))\)
Parse Tree¶
Shows the order at which the terms and operations are parsed
Semantic entailment¶
\(\phi \models \psi\)
this means that whenever\(\phi\) is true, \(\psi\) is true
ie \(\phi \to \psi\) is true for all cases
Soundness¶
if ND is true, then even semantic entailment is true
\(\phi \vdash \psi \implies \phi \models \psi\)
Completeness¶
if semantic entailment is true, then even ND is true
\(\phi \models \psi \implies \phi \vdash \psi\)
Semantic equivalence¶
\(\phi \equiv \psi\)
\(\phi \models \psi\) and \(\psi \models \phi\)
both have the same truth table
Interpretation¶
assigning values (putting inputs)
Valuation¶
getting outputs
Tautology¶
function whose output is always true
Valid¶
true for all interpretations
Satisfiable¶
true for at least one interpretation
Conclusions¶
- A is valid \(\iff \lnot A\) is un-satisfiable
- A is satisfiable \(\iff \lnot A\) is invalid
CNF¶
basically POS
- literal - variable
- clause
- formula
\(\underbrace{ ( \underbrace{p}_\text{literal} \lor q) \land \underbrace{(r \lor s)}_\text{clause} }_\text{formula}\)
if \(p\) and \(pā\) both exist within all clauses, all clauses are true then formula is valid
Implies Conversion¶
\(p \to q = \lnot p \lor q\)
Horn Clauses¶
useful for checking satisfiability
only contains \(\land\) and \(\to\)
every clause contains \(\to\)
cannot contain
- \(\lor\)
- \(\lnot\)
Checking Satisfiability¶
we just have to check if there exists atleast one combination of variables such that the entire formula is true.
if nothing is possible, then it is false.