Logic

#folder

Summary

  • "Entails"
    • means whenever is true, is also true
  • "Provable"
    • means there exists a proof from the premise to the conclusion
  • Soundness
    • Anything that you prove is right
  • Completeness
    • You can prove anything that's right

Important

Try not to get too caught-up in your present understanding of proofs and logic. Note that similar to how you went from geometric vectors to abstract vectors, you will have to discard some previous biases/knowledge of logic. What we are doing in formal proofs is a lot more like programming, where proofs have strict syntax that needs formal specification.

Also note that each type of logic is its own "world" or "programming language" (or "space" in mathematics).

Elements of a Logic

Info

Any logic has three parts to it:

  1. Syntax
    • Symbols to encode logic
  2. Semantics
    • Meanings of symbols
  3. Proof theories (aka deductive systems)
    • Proving statements

Syntax, Well-Formed Formula (WFF)

Definition

The syntax of a logic defines how to arrange symbols into a well-formed formula (wff)

Think about code. The words if, for are just words in a text file (syntax). But the semantics of the programming language will give them meaning.

Semantics

The purpose of the semantics of a logic is to define the "" (logical implication) and "" (logical equivalence) for the logic.

Definition

""" (entails) for a logic describes what it means for an argument to be "true" in that logic

Info

For a WFF , depending on the context, we call :

  • an argument
  • a valid argument (if it has been determined to be valid)
  • a goal (if it is something we want to prove to be valid)
  • entails
  • logically/semantically implies

is not part of the wff, but is a "meta-level symbol" that creates and arrangement of formulas that tells you something about a goal with respect to its semantics.

Intuition

  • : from the premises , we may conclude
    • I.e there is no valuation which makes true and the conclusion false
  • : whenever is true, is true
  • : is always true (a theorem, valid)

Remember that is not the same as . For example, , but .

Proof Theories (Deductive Systems)

Proof theories provide the meaning of "calculating" things about the logic. They perform mechanical manipulations on strings of symbols to prove a formula.

Definition

A proof theory defines "" (proves)

Info

means using , we can prove using a proof theory.

That is, in some relevant deductive system, there exists a proof from the premises to the conclusion .

Intuition

  • If , we can conclude that
  • If , we can conclude that

Soundness and Completeness

Abstract

  • Soundness:
    • you can only prove valid arguments
    • if you prove something, it's right
    • if something is wrong, you can't prove it
  • Completeness:
    • you can prove all valid arguments
    • if you can't prove something, it's wrong
    • if something is right, you can prove it

Diagram

Sound

Definition

A proof theory is sound whenever , then

Intuition

Soundness states that

That is, if you can prove from , then is true given . The contrapositive of this is if is false given , then you cannot prove from .
In other words, you can't prove something that's wrong, and if you prove something, it's right.

Complete

Definition

A proof theory is complete whenever , then

Intuition

Completeness states that

That is, if is true given , then you can prove from . The contrapositive of this is if you cannot prove from , then is false given .
In other words, you can prove anything that's right, and if you can't prove something, it's wrong.

Paradoxes

Definition

A paradox is a valid argument leading to a contradiction

Example

If the barber of Seville is a man in Seville who shaves all men in Seville who don't shave themselves, and only those men, what man in seville shaves the barber?

Answering this question results in a contradiction.

The barber cannot shave himself since he only shaves those who do not shave themselves. As such, if he shaves himself, he ceases to be the barber.

Conversely, if the barber does not shave himself, then he fits into the group of people who would be shaved by the barber, and thus, as the barber, he must shave himself.

Decidability

Decision Problem

Definition

A decision problem is a subset of problems, which have yes or no answers

Decidability

Definition

Unsolvable (undecidable) problems are decision problems for which no algorithm can exist to solve it

There are problems computers cannot solve.

To show no algorithm exists, we need a precise definition of "algorithm"

Example

  • Propositional logic is decidable. For any argument, in propositional logic, there exist an algorithm/computer program to determine if it is valid or not
  • Predicate logic is undecidable. There cannot exist an algorithm that will always determine if an argument in predicate logic is valid or not.
    • Subsets of predicate logic are decidable, SMT solvers can determine the validity of many arguments (but not all)
    • Predicate logic is semi-decidable

Church-Turing Thesis

The intuitive notion of algorithms is equal to the algorithms that can be represented using the -calculus/Turing machines.