An Introduction to Propositional Logic Adequacy

Intro

Last time, we built a computer system that can prove propositional formulas using a set of 3 axioms and MP. It was proven that it was sound, and then I claimed that it was complete without actually proving it. Let’s continue, and then also cover adequacy, inconsistency, compactness, decidability. Go back and read the post on propositional logic proofs if you need a reminder of our proof system or the Deduction Theorem. I will keep using Γ⊢ϕ\Gamma\vdash\phi for “there is a formal proof of ϕ\phi from Γ\Gamma” and Γ⊨ϕ\Gamma\models\phi for “every assignment satisfying Γ\Gamma also satisfies ϕ\phi.”

Math

Inconsistency

Before we can prove completeness, let’s define inconsistency

Definition (Inconsistent): A set of formulas Γ\Gamma is inconsistent if there is some formula ψ\psi for which both Γ⊢ψ\Gamma\vdash\psi and Γ⊢¬ψ\Gamma\vdash\neg\psi. Otherwise, Γ\Gamma is consistent.

This is about what our computer can prove. Recall that Γ\Gamma is unsatisfiable if there is no truth assignment that makes every formula in Γ\Gamma true. That is about what the formulas mean.

We know from soundness that an inconsistent set of formulas must be unsatisfiable, because there exists no assignment that can make both ψ\psi and ¬ψ\neg\psi true at the same time. Adequacy is the reverse idea, eg: if a set of formulas is unsatisfiable, then it is inconsistent. This is the hard part of completeness, and we will prove it in the next section.

First, let’s quickly show that an inconsistent set of formulas can prove any formula. Suppose Γ⊢ψ\Gamma\vdash\psi and Γ⊢¬ψ\Gamma\vdash\neg\psi, and we want to prove χ\chi. Axiom (A1) gives us ψ→(¬χ→ψ)\psi\to(\neg\chi\to\psi) and ¬ψ→(¬χ→¬ψ)\neg\psi\to(\neg\chi\to\neg\psi). Using MP, we therefore get both ¬χ→ψ\neg\chi\to\psi and ¬χ→¬ψ\neg\chi\to\neg\psi. Axiom (A3), with ϕ=χ\phi=\chi, says

(¬χ→¬ψ)→((¬χ→ψ)→χ).(\neg\chi\to\neg\psi)\to((\neg\chi\to\psi)\to\chi).

Two more uses of MP give us Γ⊢χ\Gamma\vdash\chi. This is our formal version of “from a contradiction, anything follows.”

Adequacy

This is a different use of adequacy from the adequacy of connectives in the first propositional logic post. There, adequacy meant “a small collection of connectives could express every truth function”. Here, it means that our proof system can detect an impossible collection of formulas. Confusing, I know

Theorem (Adequacy): If Γ\Gamma is unsatisfiable, then Γ\Gamma is inconsistent.

Another perspective: if Γ\Gamma is consistent, then it should have a satisfying truth assignment. This is the contrapositive of the theorem, and it is easier to prove. We will build a truth assignment from a consistent set of formulas.

Proof: There are only countably many formulas, since each formula is a finite string made from countably many variables and finitely many symbols. List them as ϕ1,ϕ2,…\phi_1,\phi_2,\ldots, and set Γ0=Γ\Gamma_0=\Gamma. For each n≥1n\geq 1, choose

Γn={Γn−1∪{ϕn},if this set is consistent,Γn−1∪{¬ϕn},otherwise.\Gamma_n= \begin{cases} \Gamma_{n-1}\cup\{\phi_n\}, & \text{if this set is consistent},\\ \Gamma_{n-1}\cup\{\neg\phi_n\}, & \text{otherwise}. \end{cases}

We should check that the second choice is always safe. Suppose Γn−1∪{ϕn}\Gamma_{n-1}\cup\{\phi_n\} and Γn−1∪{¬ϕn}\Gamma_{n-1}\cup\{\neg\phi_n\} were inconsistent. The latter would prove some ψ\psi and ¬ψ\neg\psi. By the Deduction Theorem, Γn−1\Gamma_{n-1} would prove both ¬ϕn→ψ\neg\phi_n\to\psi and ¬ϕn→¬ψ\neg\phi_n\to\neg\psi. Axiom (A3) and MP would then give Γn−1⊢ϕn\Gamma_{n-1}\vdash\phi_n. But if ϕn\phi_n can be proven by Γn−1\Gamma_{n-1}, any contradiction proven after adding ϕn\phi_n was also provable before adding ϕn\phi_n. That is a contradiction because it would make Γn−1\Gamma_{n-1} inconsistent. Thus, all Γn\Gamma_n stay consistent.

Now let Γ∗=⋃n≥0Γn\Gamma^*=\bigcup_{n\geq 0}\Gamma_n. This union is still consistent. Any proof is finite, so a proof of a contradiction from Γ∗\Gamma^* would use only finitely many assumptions. All of them would already occur in some one Γn\Gamma_n, which we know is consistent.

Thus for all formula ϕ\phi, only one of ϕ\phi and ¬ϕ\neg\phi belongs to Γ∗\Gamma^*. Thus, when we consider ϕ\phi, add one of them, and consistency prevents us from adding both.

Another useful consequence: if Γ∗⊢ϕ\Gamma^*\vdash\phi, then ϕ∈Γ∗\phi\in\Gamma^*. Otherwise ¬ϕ∈Γ∗\neg\phi\in\Gamma^*, giving a contradiction. We have made a set that contains every formula it proves.

Define a truth assignment A\mathcal{A} by saying that a propositional variable PP is true exactly when P∈Γ∗P\in\Gamma^*. The part we need to prove is

valA(ϕ)=Tif and only ifϕ∈Γ∗.\mathtt{val}_{\mathcal{A}}(\phi)=T\quad\text{if and only if}\quad\phi\in\Gamma^*.

We can do this by structural induction on ϕ\phi.

  • Variable: This holds by definition of A\mathcal{A}.
  • Negation: ψ\psi is true when ψ∈Γ∗\psi\in\Gamma^* by induction. Since exactly one of ψ\psi and ¬ψ\neg\psi is in Γ∗\Gamma^*, ¬ψ\neg\psi is true exactly when ¬ψ∈Γ∗\neg\psi\in\Gamma^*.
  • Implication: Suppose ψ→χ∈Γ∗\psi\to\chi\in\Gamma^*. If ψ\psi is true, then ψ∈Γ∗\psi\in\Gamma^* by induction, so MP gives Γ∗⊢χ\Gamma^*\vdash\chi. Thus χ∈Γ∗\chi\in\Gamma^* and χ\chi is true. This means ψ→χ\psi\to\chi is true. In the converse, let ψ→χ\psi\to\chi be true. If χ\chi is true, then χ∈Γ∗\chi\in\Gamma^*, and (A1) gives Γ∗⊢ψ→χ\Gamma^*\vdash\psi\to\chi. If ψ\psi is false, then ¬ψ∈Γ∗\neg\psi\in\Gamma^*. Assuming ψ\psi as well would give a contradiction, and that would let us prove χ\chi; by the Deduction Theorem Γ∗⊢ψ→χ\Gamma^*\vdash\psi\to\chi. Either way, our earlier observation concludes ψ→χ\psi\to\chi in Γ∗\Gamma^*.

That’s the induction; we have shown that A\mathcal{A} makes exactly the formulas in Γ∗\Gamma^* true, thus Γ\Gamma is satisfiable, and we have proven adequacy.

Completeness

Now the theorem from last time finally has a proof.

Theorem (Completeness of Propositional Logic): If Γ⊨ϕ\Gamma\models\phi, then Γ⊢ϕ\Gamma\vdash\phi.

Proof: If every model of Γ\Gamma satisfies ϕ\phi, then Γ∪{¬ϕ}\Gamma\cup\{\neg\phi\} has no model. Adequacy says this set is inconsistent, so for some ψ\psi it proves both ψ\psi and ¬ψ\neg\psi. Apply the Deduction Theorem to both proofs. We get

Γ⊢(¬ϕ→ψ)andΓ⊢(¬ϕ→¬ψ).\Gamma\vdash(\neg\phi\to\psi) \qquad\text{and}\qquad \Gamma\vdash(\neg\phi\to\neg\psi).

But (A3) is (¬ϕ→¬ψ)→((¬ϕ→ψ)→ϕ)(\neg\phi\to\neg\psi)\to((\neg\phi\to\psi)\to\phi). Two applications of MP give Γ⊢ϕ\Gamma\vdash\phi. So our “computer” can prove everything that is true under every assignment satisfying its assumptions.

Compactness

A clean consequence of the fact that formal proofs only use finitely many assumptions:

Theorem (Propositional Compactness): A set of propositional formulas Γ\Gamma is satisfiable iff. every finite subset of Γ\Gamma is satisfiable.

Proof: If one assignment satisfies all of Γ\Gamma, it obviously satisfies every subset.

For the other direction, suppose all finite subsets are not satisfiable. If Γ\Gamma were inconsistent, its proof of some ψ\psi and ¬ψ\neg\psi would together use finitely many assumptions from Γ\Gamma. That finite subset would be inconsistent, and soundness would make it unsatisfiable, a contradiction. Thus Γ\Gamma is consistent, and adequacy admits a model of Γ\Gamma.

You will frequently cite this theorem to show that a set of formulas is unsatisfiable. If you can find a finite subset that is unsatisfiable, then the whole set is unsatisfiable.

Decidability

The last major idea for propositional logic is decidability.

Theorem (Decidability of Propositional Logic): Given a finite set of formulas Γ\Gamma and a formula ϕ\phi, there is an algorithm that determines whether Γ⊢ϕ\Gamma\vdash\phi.

This is useful because it means we can write some program for our “computer” that will stop and tell us if the proof exists, eg Γ⊢ϕ\Gamma\vdash\phi.

Proof: List the variables appearing in Γ\Gamma or ϕ\phi. Since there are finitely many, we can make a truth table with a row for all assignments, to those variables. Check all rows where all formulas in Γ\Gamma are true. If ϕ\phi is true in all of them, then Γ⊨ϕ\Gamma\models\phi, and by completeness Γ⊢ϕ\Gamma\vdash\phi. If there is a row where Γ\Gamma is true and ϕ\phi is false, by soundness Γ⊬ϕ\Gamma\nvdash\phi. Regardless of which case, we are done.

End

Next time: FOL!