Lecture from: 09.12.2024 | Video: Videos ETHZ
Recap: Formalizing Logic and Proof Systems
In previous lectures, we established the framework for formalizing logic and proof systems. Recall that a proof system comprises:
- Statements (): The set of all possible statements, which can be formalized e.g., as bitstrings.
- Proofs (): The set of all possible proofs.
- Semantic Interpretation Function (): Assigns truth values to statements ().
- Proof Verification Function (): Checks the validity of proofs ().
We focused on statements of the form , expressing logical consequence: is derivable from the set of formulas .
Syntax and Semantics of Formulas
We’ve explored the syntax and semantics of formulas, defining how they’re constructed and interpreted.
-
Syntax: Defines the allowed structure of formulas, ensuring well-formedness.
-
Semantics: Assigns meaning to formulas through interpretations.
- Interpretations (): Define a universe () and assign meanings to predicate symbols, function symbols, and free variables.
- Valuation Function ( or ): Determines the truth value of a formula under a given interpretation. It checks if models .
Key Concepts and Properties
We’ve also introduced important logical concepts:
- Satisfiability: A formula is satisfiable if there exists an interpretation that makes it true.
- Insatisfiability: A formula is unsatisfiable if it’s false under every interpretation.
- Tautology: A formula is a tautology if it’s true under every interpretation.
- Logical Consequence (Entailment): means is true under every interpretation where all are true.
Defining Logical Consequence
It’s essential to understand how we define logical consequence. We use natural language (“for all interpretations…”) to define this concept precisely. While we use symbols like to represent logical consequence, the underlying definition relies on natural language.
The Role of Natural Language
We could imagine a “meta-logic” with symbols representing “for all interpretations,” but ultimately, even that meta-logic would need to be grounded in natural language. At some level, we rely on human understanding to interpret the meaning of logical symbols and concepts.
Unsatisfiability and Logical Consequence
Last time we established a connection between unsatisfiability and logical consequence:
If is unsatisfiable, then .
Proof:
This proof relies on our natural language understanding of logical concepts:
- is unsatisfiable: No interpretation makes both and true simultaneously.
- Suppose : For any interpretation that makes true, must be false (due to the unsatisfiability of ).
- Therefore, : If is false, then must be true.
- Hence, : Since any interpretation that makes true also makes true, is a logical consequence of .
Evaluating Predicate Logic Formulas Under Interpretations
Let’s illustrate the process of evaluating predicate logic formulas under specific interpretations using examples.
Example 1: Evaluating a Formula with a Function
Consider the formula . We can represent its structure with a syntax tree:
Now, let’s define an interpretation :
- :
- (natural numbers)
This is a matching interpretation, as it provides meanings for all free variables (the predicate symbol and the function symbol ). To evaluate , we need to determine if there exists an such that is true under .
- Evaluation:
- We are looking for an such that is even.
- .
- If we choose , then , which is even.
- Thus, .
- Since we found an that satisfies the formula, .
Example 2: Proving Logical Consequence
Now, let’s analyze logical consequence. Consider the statement:
Is this statement true? Intuitively, it seems plausible. If there exists an such that is true, then there must exist some value in the universe (namely, ) for which is true. Thus the statement is also true. The left-hand side has a more restricted universe than the right hand side. The universe of the left hand side are values that can result from an application of . Thus, if the LHS is true then surely the RHS which has less restriction on the universe is also true.
Formal Proof
To prove this formally, we need to show that for any interpretation where , it must also be the case that .
- Assume : This means there exists a such that .
- Evaluate the term: This means .
- Let : Since maps elements from the universe to the universe, must also belong to . Furthermore from step 2, .
- Therefore, : This means , which we already know from step 3.
- Hence, : Since we found a such that holds under modified interpretation , this means there exists such a value hence must be true.
Since we’ve shown that if , then for any interpretation , we have proven the logical consequence: .
Equivalences in Predicate Logic and Parameterized Statements
Recall that the valuation function , or , is defined recursively. Evaluating a formula under an interpretation might involve evaluating subformulas under modified interpretations. For example, is determined by evaluating for all .
We’ll now explore and prove some equivalences in predicate logic. These equivalences allow us to manipulate and simplify formulas, which is crucial for automated reasoning and theorem proving.
Lemma 6.7 and Parameterized Statements:
Before diving into the main equivalence, let’s establish a helpful principle regarding parameterized statements. We often encounter statements that depend on a parameter. Let and be statements parameterized by .
Parameterized Statements
If is true for all and is true for all , then the statement ”( and )” is also true for all .
This principle seems obvious but is formally important for our subsequent proof.
Proving an Equivalence (Lemma 6.7.8 Example)
Consider the following equivalence from Lemma 6.7:
where is not a free variable in . Let’s prove this equivalence.
Proof of Equivalence
We’ll show that the two formulas have the same truth value under any interpretation .
- : This means and .
- : This means for all .
- : Since is not free in , the truth value of is unaffected by modifying the interpretation with respect to . Thus, for all .
- Combining (2) and (3): Using the principle of parameterized statements (with and ), we have and for all .
- Semantics of : From (4), we have for all .
- Semantics of : From (5), we have .
Since we’ve shown that if and only if for any interpretation , the two formulas are equivalent.
Transforming Formulas and Equivalences
We often want to transform formulas into equivalent forms for simplification or to apply specific proof techniques. These transformations rely on logical equivalences. For example, consider the equivalence:
We can demonstrate this equivalence using transformations based on Lemma 6.7 and other logical equivalences:
- Implication Elimination:
- Quantifier Negation and De Morgan’s Law:
- Quantifier Distribution (Lemma 6.7 variant): (since is not free in )
- Implication Introduction:
Variable Substitution and Universal Instantiation
Variable Substitution:
We define the notation to represent the formula obtained by replacing all free occurrences of the variable in formula with the term .
- Example: If and , then .
- Quantifier Renaming Another example . The reason this holds is due to how the semantics are defined.
Universal Instantiation:
Universal instantiation is a crucial inference rule. It states:
This means that if a formula holds for all , then it must also hold for any specific term substituted for . This can be viewed as a syntactic derivation rule () in a sound proof system.
Extending Predicate Logic with Equality
We extend predicate logic with the equality symbol ().
- Syntax: If and are terms, then is a formula.
- Semantics: if and only if and are the same element in the universe .
While we use the same symbol () for equality within the logic and equality within the universe of the interpretation, these are conceptually distinct. We assume we have a notion of equality within the universe (e.g., equality of natural numbers, equality of sets). The equality symbol within the logic refers to this underlying equality in the universe. If we base our logic on axiomatic set theory we have a very rigorous notion of equality, two sets are equal if they are subsets of each other.
Example: Group Axioms
Using equality, we can express the group axioms:
- G1 (Associativity):
- G2’ (Right Identity):
- G3’ (Right Inverse):
Let be the set of these group axioms.
Proving Group Properties from Minimal Axioms (Standard Notation)
We will now show how these minimal axioms entail other important group properties. First, we use standard algebraic notation, then we’ll revisit the proof using predicate logic.
1. Left Inverse: We want to show that every element has a left inverse. . Let be an arbitrary element. By G3 we have a right inverse such that . Then, there exists also by G3 such that . Thus: . Multiplying both sides with yields thus . Thus is also a left inverse of .
2. Left Identity: We want to show that the right identity is also a left identity: Let be an arbitrary element. which proves the claim.
3. Uniqueness of Identity: Suppose there exists another identity such that . Since is an identity, we have . But since e is also an identity we also have , thus , proving uniqueness.
4. Uniqueness of Inverse: Let be another inverse of , meaning . Since is an inverse of , we also have . Thus . Multiplying with gives us thus thus , proving uniqueness.
Predicate Logic Proof of Left Identity (Predicate Functions Notation)
Now, we’ll prove the Left Identity property using a more formal approach with predicate logic, assuming only G1, G2’, and G3’. We want to show .
Let be an arbitrary element. Then (right inverse) We multiply both sides with to get . Then, using associativity we also have .
We know there exists for all elements in our universe such that . Likewise such a exists. Multiplying with gives us . Using associativity we get . By G3’ we know and , using this we get .
Since we proved that every element has a left inverse and we know that and , we also know and hence , thus .
Prenex Normal Form (PNF)
In predicate logic, it’s often beneficial to express formulas in a standardized format called Prenex Normal Form (PNF). A formula is in PNF if all its quantifiers appear at the beginning, followed by a quantifier-free part. This structure simplifies many logical operations and is essential for some automated reasoning techniques.
A key question is whether every predicate logic formula can be converted into an equivalent formula in PNF. The answer is yes, and we’ll explore the process of converting formulas to PNF.
Variable Renaming and Clashes
A crucial step in the conversion process is handling potential variable clashes. A clash occurs when the same variable name is used for different purposes (e.g., bound by different quantifiers or appearing both free and bound).
- Example: In the formula , the variable appears both free (in ) and bound (by ). This can lead to ambiguities during transformations.
To avoid clashes, we rename variables. We use the notation to denote the substitution of all free occurrences of variable with a new variable .
Conversion to PNF: An Example
Let’s convert to PNF.
-
Original Formula (with syntax tree):
-
Rename Bound Variables to Eliminate Clashes: We rename the bound in with . And since we also have a on the left branch, which is implicitly also applied on the second conjunct on the right, we replace by in . This gives us: . Note that the on the left and the are distinct and thus are two independent free variables. We have no more clashes. This is the bereinigte (cleaned-up) form. This is just for us to see that we are dealing with completely independent variables.
-
Move Quantifiers to the Front:
We can move the quantifiers and to the front. Since the is not free in the second conjunct we can put it to the left or right. Since the variable names do not clash we can put the quantifiers in any order. One possible PNF is . Note that we have . Thus another way to write this is . Then moving quantifiers to front yields where are free.
Future Directions: Skolem Normal Form
In future lectures, we’ll encounter another normal form called Skolem Normal Form. While converting a formula to Skolem Normal Form doesn’t preserve full equivalence (), it does preserve satisfiability. This means that a formula is satisfiable if and only if its Skolem Normal Form is satisfiable. This weaker notion of equivalence is sufficient for certain proof techniques, particularly those based on resolution. The key transformation in Skolemization is eliminating existential quantifiers () by introducing new function symbols (Skolem functions).
Continue here: 25 Skolem Normal Form, Russell’s Paradox, Cantor’s Diagonalization, Existence of Uncomputable Functions, Higher-Order Logic, Calculi