Goranko
Logic as a Tool Chapter 1: Understanding Propositional Logic 1.4 - - PowerPoint PPT Presentation
Logic as a Tool Chapter 1: Understanding Propositional Logic 1.4 - - PowerPoint PPT Presentation
Logic as a Tool Chapter 1: Understanding Propositional Logic 1.4 Inductive definitions Structural induction and recursion Valentin Goranko Stockholm University October 2016 Goranko Introduction Inductive definitions: a special kind of
Goranko
Introduction
Inductive definitions: a special kind of definitions, which refers to the very notion that is being defining.
Goranko
Introduction
Inductive definitions: a special kind of definitions, which refers to the very notion that is being defining. Very important, especially in logic, when an infinite set of structured
- bjects is to be defined.
Goranko
Introduction
Inductive definitions: a special kind of definitions, which refers to the very notion that is being defining. Very important, especially in logic, when an infinite set of structured
- bjects is to be defined.
Properties of objects defined by inductive definitions can be proved by a uniform method, called proof by structural induction.
Goranko
Introduction
Inductive definitions: a special kind of definitions, which refers to the very notion that is being defining. Very important, especially in logic, when an infinite set of structured
- bjects is to be defined.
Properties of objects defined by inductive definitions can be proved by a uniform method, called proof by structural induction. A well-known special case: mathematical induction used to prove properties of natural numbers.
Goranko
Introduction
Inductive definitions: a special kind of definitions, which refers to the very notion that is being defining. Very important, especially in logic, when an infinite set of structured
- bjects is to be defined.
Properties of objects defined by inductive definitions can be proved by a uniform method, called proof by structural induction. A well-known special case: mathematical induction used to prove properties of natural numbers. Functions on an inductively defined set S can be defined by recursion
- ver the inductive definition of S.
Goranko
Inductive definition
- f the set of all finite words in an alphabet
Consider a set A. Intuitively, a (finite) word in A is any finite string of elements of A.
Goranko
Inductive definition
- f the set of all finite words in an alphabet
Consider a set A. Intuitively, a (finite) word in A is any finite string of elements of A. Formally, the set of (finite) words in the alphabet A is defined inductively as follows:
Goranko
Inductive definition
- f the set of all finite words in an alphabet
Consider a set A. Intuitively, a (finite) word in A is any finite string of elements of A. Formally, the set of (finite) words in the alphabet A is defined inductively as follows:
- 1. The empty string ǫ is a word in A.
Goranko
Inductive definition
- f the set of all finite words in an alphabet
Consider a set A. Intuitively, a (finite) word in A is any finite string of elements of A. Formally, the set of (finite) words in the alphabet A is defined inductively as follows:
- 1. The empty string ǫ is a word in A.
- 2. If w is a word in A and a ∈ A, then wa is word in A.
Goranko
Inductive definition
- f the set of all finite words in an alphabet
Consider a set A. Intuitively, a (finite) word in A is any finite string of elements of A. Formally, the set of (finite) words in the alphabet A is defined inductively as follows:
- 1. The empty string ǫ is a word in A.
- 2. If w is a word in A and a ∈ A, then wa is word in A.
The idea: words in A are those, and only those, objects that can be constructed (in finitely many steps) following the 2 rules above.
Goranko
Inductive definition
- f the set of all finite words in an alphabet
Consider a set A. Intuitively, a (finite) word in A is any finite string of elements of A. Formally, the set of (finite) words in the alphabet A is defined inductively as follows:
- 1. The empty string ǫ is a word in A.
- 2. If w is a word in A and a ∈ A, then wa is word in A.
The idea: words in A are those, and only those, objects that can be constructed (in finitely many steps) following the 2 rules above. Equivalent inductive definition in a Backus-Naur normal form (BNF): w := ǫ | wa where a ∈ A.
Goranko
Inductive definition of the set of natural numbers
Consider the 2-letter alphabet {0, S}, where 0, S are different symbols.
Goranko
Inductive definition of the set of natural numbers
Consider the 2-letter alphabet {0, S}, where 0, S are different symbols. Natural numbers are defined as special words in that alphabet, as follows:
Goranko
Inductive definition of the set of natural numbers
Consider the 2-letter alphabet {0, S}, where 0, S are different symbols. Natural numbers are defined as special words in that alphabet, as follows:
- 1. 0 is a natural number.
Goranko
Inductive definition of the set of natural numbers
Consider the 2-letter alphabet {0, S}, where 0, S are different symbols. Natural numbers are defined as special words in that alphabet, as follows:
- 1. 0 is a natural number.
- 2. If n is a natural number then Sn is a natural number.
Goranko
Inductive definition of the set of natural numbers
Consider the 2-letter alphabet {0, S}, where 0, S are different symbols. Natural numbers are defined as special words in that alphabet, as follows:
- 1. 0 is a natural number.
- 2. If n is a natural number then Sn is a natural number.
The definition above defines the infinite set {0, S0, SS0, SSS0, . . .} .
Goranko
Inductive definition of the set of natural numbers
Consider the 2-letter alphabet {0, S}, where 0, S are different symbols. Natural numbers are defined as special words in that alphabet, as follows:
- 1. 0 is a natural number.
- 2. If n is a natural number then Sn is a natural number.
The definition above defines the infinite set {0, S0, SS0, SSS0, . . .} . Hereafter we denote S · · · n times · · ·S0 by n and identify it with the (intuitive notion of) natural number n.
Goranko
Inductive definition of the set of natural numbers
Consider the 2-letter alphabet {0, S}, where 0, S are different symbols. Natural numbers are defined as special words in that alphabet, as follows:
- 1. 0 is a natural number.
- 2. If n is a natural number then Sn is a natural number.
The definition above defines the infinite set {0, S0, SS0, SSS0, . . .} . Hereafter we denote S · · · n times · · ·S0 by n and identify it with the (intuitive notion of) natural number n. Equivalent inductive definition in a Backus-Naur normal form: n := 0 | Sn
Goranko
Inductive definition (1) of the set of propositional formulae
Goranko
Inductive definition (1) of the set of propositional formulae
Denote the alphabet of symbols used in propositional logic by APL.
Goranko
Inductive definition (1) of the set of propositional formulae
Denote the alphabet of symbols used in propositional logic by APL. Propositional formulae are defined as special words in the alphabet APL by an induction definition as follows:
Goranko
Inductive definition (1) of the set of propositional formulae
Denote the alphabet of symbols used in propositional logic by APL. Propositional formulae are defined as special words in the alphabet APL by an induction definition as follows:
- 1. Every Boolean constant (⊤ or ⊥) is a propositional formula.
Goranko
Inductive definition (1) of the set of propositional formulae
Denote the alphabet of symbols used in propositional logic by APL. Propositional formulae are defined as special words in the alphabet APL by an induction definition as follows:
- 1. Every Boolean constant (⊤ or ⊥) is a propositional formula.
- 2. Every propositional variable is a propositional formula.
Goranko
Inductive definition (1) of the set of propositional formulae
Denote the alphabet of symbols used in propositional logic by APL. Propositional formulae are defined as special words in the alphabet APL by an induction definition as follows:
- 1. Every Boolean constant (⊤ or ⊥) is a propositional formula.
- 2. Every propositional variable is a propositional formula.
- 3. If (the word) A is a propositional formula
then (the word) ¬A is a propositional formula.
Goranko
Inductive definition (1) of the set of propositional formulae
Denote the alphabet of symbols used in propositional logic by APL. Propositional formulae are defined as special words in the alphabet APL by an induction definition as follows:
- 1. Every Boolean constant (⊤ or ⊥) is a propositional formula.
- 2. Every propositional variable is a propositional formula.
- 3. If (the word) A is a propositional formula
then (the word) ¬A is a propositional formula.
- 4. If each of (the words) A and B is a propositional formula
then each of (the words) (A ∧ B), (A ∨ B), (A → B), and (A ↔ B) is a propositional formula.
Goranko
Inductive definition (1) of the set of propositional formulae
Denote the alphabet of symbols used in propositional logic by APL. Propositional formulae are defined as special words in the alphabet APL by an induction definition as follows:
- 1. Every Boolean constant (⊤ or ⊥) is a propositional formula.
- 2. Every propositional variable is a propositional formula.
- 3. If (the word) A is a propositional formula
then (the word) ¬A is a propositional formula.
- 4. If each of (the words) A and B is a propositional formula
then each of (the words) (A ∧ B), (A ∨ B), (A → B), and (A ↔ B) is a propositional formula. Now, to define the set of propositional formulae FOR∗, replace above each “is a propositional formula” with “is in the set FOR∗”.
Goranko
Inductive definition (2) of the set of propositional formulae
Thus, the set of propositional formulae FOR can also be defined as the least set of words in the alphabet of propositional logic such that:
Goranko
Inductive definition (2) of the set of propositional formulae
Thus, the set of propositional formulae FOR can also be defined as the least set of words in the alphabet of propositional logic such that:
- 1. Every Boolean constant is in FOR.
Goranko
Inductive definition (2) of the set of propositional formulae
Thus, the set of propositional formulae FOR can also be defined as the least set of words in the alphabet of propositional logic such that:
- 1. Every Boolean constant is in FOR.
- 2. Every propositional variable is in FOR.
Goranko
Inductive definition (2) of the set of propositional formulae
Thus, the set of propositional formulae FOR can also be defined as the least set of words in the alphabet of propositional logic such that:
- 1. Every Boolean constant is in FOR.
- 2. Every propositional variable is in FOR.
- 3. If A is in FOR then ¬A is in FOR.
Goranko
Inductive definition (2) of the set of propositional formulae
Thus, the set of propositional formulae FOR can also be defined as the least set of words in the alphabet of propositional logic such that:
- 1. Every Boolean constant is in FOR.
- 2. Every propositional variable is in FOR.
- 3. If A is in FOR then ¬A is in FOR.
- 4. If each of A and B is in FOR then each of
(A ∧ B), (A ∨ B), (A → B), and (A ↔ B) is in FOR.
Goranko
Inductive definition (2) of the set of propositional formulae
Thus, the set of propositional formulae FOR can also be defined as the least set of words in the alphabet of propositional logic such that:
- 1. Every Boolean constant is in FOR.
- 2. Every propositional variable is in FOR.
- 3. If A is in FOR then ¬A is in FOR.
- 4. If each of A and B is in FOR then each of
(A ∧ B), (A ∨ B), (A → B), and (A ↔ B) is in FOR. This pattern of converting the inductive definition into explicit one is general and can be applied to every inductive definition.
Goranko
Inductive definition (2) of the set of propositional formulae
Thus, the set of propositional formulae FOR can also be defined as the least set of words in the alphabet of propositional logic such that:
- 1. Every Boolean constant is in FOR.
- 2. Every propositional variable is in FOR.
- 3. If A is in FOR then ¬A is in FOR.
- 4. If each of A and B is in FOR then each of
(A ∧ B), (A ∨ B), (A → B), and (A ↔ B) is in FOR. This pattern of converting the inductive definition into explicit one is general and can be applied to every inductive definition. For correctness of the definition above, it must be proved that the set FOR defined above exists, that it is unique, and that it equals FOR∗.
Goranko
Inductive definition (2) of the set of propositional formulae
Thus, the set of propositional formulae FOR can also be defined as the least set of words in the alphabet of propositional logic such that:
- 1. Every Boolean constant is in FOR.
- 2. Every propositional variable is in FOR.
- 3. If A is in FOR then ¬A is in FOR.
- 4. If each of A and B is in FOR then each of
(A ∧ B), (A ∨ B), (A → B), and (A ↔ B) is in FOR. This pattern of converting the inductive definition into explicit one is general and can be applied to every inductive definition. For correctness of the definition above, it must be proved that the set FOR defined above exists, that it is unique, and that it equals FOR∗. Equivalent inductive definition of FOR∗ in a Backus-Naur normal form: A := p | ⊤ | ⊥ | ¬A | (A ∧ A) | (A ∨ A) | (A → A) | (A ↔ A) where p ∈ PVAR.
Goranko
Induction principles and proofs by induction
With every inductive definition, a scheme for proofs by induction can be associated.
Goranko
Induction principles and proofs by induction
With every inductive definition, a scheme for proofs by induction can be
- associated. The construction of this scheme is uniform from the
inductive definition, as illustrated below.
Goranko
Induction principles and proofs by induction
With every inductive definition, a scheme for proofs by induction can be
- associated. The construction of this scheme is uniform from the
inductive definition, as illustrated below. Principle of induction on the words in an alphabet: Given an alphabet A, let P be a property of words in A such that:
Goranko
Induction principles and proofs by induction
With every inductive definition, a scheme for proofs by induction can be
- associated. The construction of this scheme is uniform from the
inductive definition, as illustrated below. Principle of induction on the words in an alphabet: Given an alphabet A, let P be a property of words in A such that:
- 1. The empty string ǫ has the property P.
Goranko
Induction principles and proofs by induction
With every inductive definition, a scheme for proofs by induction can be
- associated. The construction of this scheme is uniform from the
inductive definition, as illustrated below. Principle of induction on the words in an alphabet: Given an alphabet A, let P be a property of words in A such that:
- 1. The empty string ǫ has the property P.
- 2. If the word w in A has the property P and a ∈ A,
then the word wa has the property P.
Goranko
Induction principles and proofs by induction
With every inductive definition, a scheme for proofs by induction can be
- associated. The construction of this scheme is uniform from the
inductive definition, as illustrated below. Principle of induction on the words in an alphabet: Given an alphabet A, let P be a property of words in A such that:
- 1. The empty string ǫ has the property P.
- 2. If the word w in A has the property P and a ∈ A,
then the word wa has the property P. Then, every word w in A has the property P.
Goranko
Induction on natural numbers
Goranko
Induction on natural numbers
Principle of (mathematical) induction on natural numbers. Let P be a property of natural numbers such that:
Goranko
Induction on natural numbers
Principle of (mathematical) induction on natural numbers. Let P be a property of natural numbers such that:
- 1. 0 has the property P.
Goranko
Induction on natural numbers
Principle of (mathematical) induction on natural numbers. Let P be a property of natural numbers such that:
- 1. 0 has the property P.
- 2. For every natural number n,
if n has the property P then Sn has the property P.
Goranko
Induction on natural numbers
Principle of (mathematical) induction on natural numbers. Let P be a property of natural numbers such that:
- 1. 0 has the property P.
- 2. For every natural number n,
if n has the property P then Sn has the property P. Then, every natural number n has the property P.
Goranko
Induction on natural numbers
Principle of (mathematical) induction on natural numbers. Let P be a property of natural numbers such that:
- 1. 0 has the property P.
- 2. For every natural number n,
if n has the property P then Sn has the property P. Then, every natural number n has the property P. Here is the same principle, stated in set-theoretic terms: Let P be a set of natural numbers such that:
- 1. 0 ∈ P.
- 2. For every natural number n, if n ∈ P then Sn ∈ P.
Then, every natural number n is in P, i.e. P = N.
Goranko
Structural induction on propositional formulae
Goranko
Structural induction on propositional formulae
The general pattern for defining a principle of induction for a set X defined by an inductive definition: replace throughout the definition “is in the set X” with “satisfies the property P”.
Goranko
Structural induction on propositional formulae
The general pattern for defining a principle of induction for a set X defined by an inductive definition: replace throughout the definition “is in the set X” with “satisfies the property P”. Applied to the inductive definition of propositional formulae, it produces the following principle of structural induction on propositional formulae.
Goranko
Structural induction on propositional formulae
The general pattern for defining a principle of induction for a set X defined by an inductive definition: replace throughout the definition “is in the set X” with “satisfies the property P”. Applied to the inductive definition of propositional formulae, it produces the following principle of structural induction on propositional formulae. Let P be a property of propositional formulae such that:
Goranko
Structural induction on propositional formulae
The general pattern for defining a principle of induction for a set X defined by an inductive definition: replace throughout the definition “is in the set X” with “satisfies the property P”. Applied to the inductive definition of propositional formulae, it produces the following principle of structural induction on propositional formulae. Let P be a property of propositional formulae such that:
- 1. Every Boolean constant satisfies the property P.
Goranko
Structural induction on propositional formulae
The general pattern for defining a principle of induction for a set X defined by an inductive definition: replace throughout the definition “is in the set X” with “satisfies the property P”. Applied to the inductive definition of propositional formulae, it produces the following principle of structural induction on propositional formulae. Let P be a property of propositional formulae such that:
- 1. Every Boolean constant satisfies the property P.
- 2. Every propositional variable satisfies the property P.
Goranko
Structural induction on propositional formulae
The general pattern for defining a principle of induction for a set X defined by an inductive definition: replace throughout the definition “is in the set X” with “satisfies the property P”. Applied to the inductive definition of propositional formulae, it produces the following principle of structural induction on propositional formulae. Let P be a property of propositional formulae such that:
- 1. Every Boolean constant satisfies the property P.
- 2. Every propositional variable satisfies the property P.
- 3. If A satisfies the property P then ¬A satisfies the property P.
Goranko
Structural induction on propositional formulae
The general pattern for defining a principle of induction for a set X defined by an inductive definition: replace throughout the definition “is in the set X” with “satisfies the property P”. Applied to the inductive definition of propositional formulae, it produces the following principle of structural induction on propositional formulae. Let P be a property of propositional formulae such that:
- 1. Every Boolean constant satisfies the property P.
- 2. Every propositional variable satisfies the property P.
- 3. If A satisfies the property P then ¬A satisfies the property P.
- 4. If each of A and B satisfies the property P then each of
(A ∧ B), (A ∨ B), (A → B), and (A ↔ B) satisfies the property P.
Goranko
Structural induction on propositional formulae
The general pattern for defining a principle of induction for a set X defined by an inductive definition: replace throughout the definition “is in the set X” with “satisfies the property P”. Applied to the inductive definition of propositional formulae, it produces the following principle of structural induction on propositional formulae. Let P be a property of propositional formulae such that:
- 1. Every Boolean constant satisfies the property P.
- 2. Every propositional variable satisfies the property P.
- 3. If A satisfies the property P then ¬A satisfies the property P.
- 4. If each of A and B satisfies the property P then each of
(A ∧ B), (A ∨ B), (A → B), and (A ↔ B) satisfies the property P. Then every propositional formula satisfies the property P.
Goranko
General framework for inductive definitions and principles
The necessary ingredients for an inductive definition are:
Goranko
General framework for inductive definitions and principles
The necessary ingredients for an inductive definition are:
- A universe U.
In the examples, the universes are sets of words in a given alphabet.
Goranko
General framework for inductive definitions and principles
The necessary ingredients for an inductive definition are:
- A universe U.
In the examples, the universes are sets of words in a given alphabet.
- A subset B ⊆ U of initial (basic) elements.
In the examples, the sets of initial elements are respectively: {ǫ}; {0}; {⊤, ⊥} ∪ PVAR.
Goranko
General framework for inductive definitions and principles
The necessary ingredients for an inductive definition are:
- A universe U.
In the examples, the universes are sets of words in a given alphabet.
- A subset B ⊆ U of initial (basic) elements.
In the examples, the sets of initial elements are respectively: {ǫ}; {0}; {⊤, ⊥} ∪ PVAR.
- A set F of operations (constructors) in U.
Goranko
General framework for inductive definitions and principles
The necessary ingredients for an inductive definition are:
- A universe U.
In the examples, the universes are sets of words in a given alphabet.
- A subset B ⊆ U of initial (basic) elements.
In the examples, the sets of initial elements are respectively: {ǫ}; {0}; {⊤, ⊥} ∪ PVAR.
- A set F of operations (constructors) in U.
In the examples, these are: – the operation of appending a symbol to a word;
Goranko
General framework for inductive definitions and principles
The necessary ingredients for an inductive definition are:
- A universe U.
In the examples, the universes are sets of words in a given alphabet.
- A subset B ⊆ U of initial (basic) elements.
In the examples, the sets of initial elements are respectively: {ǫ}; {0}; {⊤, ⊥} ∪ PVAR.
- A set F of operations (constructors) in U.
In the examples, these are: – the operation of appending a symbol to a word; – the operation of prefixing a natural number by A;
Goranko
General framework for inductive definitions and principles
The necessary ingredients for an inductive definition are:
- A universe U.
In the examples, the universes are sets of words in a given alphabet.
- A subset B ⊆ U of initial (basic) elements.
In the examples, the sets of initial elements are respectively: {ǫ}; {0}; {⊤, ⊥} ∪ PVAR.
- A set F of operations (constructors) in U.
In the examples, these are: – the operation of appending a symbol to a word; – the operation of prefixing a natural number by A; – the propositional connectives regarded as operations on words.
Goranko
The set inductively defined over B by applying the operations in F
Goranko
The set inductively defined over B by applying the operations in F
Intuitively, the set of elements of U inductively defined over B by applying the operations in F, hereby denoted by C(B, F), is the set defined by the following inductive definition:
Goranko
The set inductively defined over B by applying the operations in F
Intuitively, the set of elements of U inductively defined over B by applying the operations in F, hereby denoted by C(B, F), is the set defined by the following inductive definition:
- 1. Every element of B is in C(B, F).
Goranko
The set inductively defined over B by applying the operations in F
Intuitively, the set of elements of U inductively defined over B by applying the operations in F, hereby denoted by C(B, F), is the set defined by the following inductive definition:
- 1. Every element of B is in C(B, F).
- 2. For every operation f ∈ F, such that f : Un −
→ U, if every x1, . . . , xn is in C(B, F) then f (x1, . . . , xn) is in C(B, F).
Goranko
The set inductively defined over B by applying the operations in F
Intuitively, the set of elements of U inductively defined over B by applying the operations in F, hereby denoted by C(B, F), is the set defined by the following inductive definition:
- 1. Every element of B is in C(B, F).
- 2. For every operation f ∈ F, such that f : Un −
→ U, if every x1, . . . , xn is in C(B, F) then f (x1, . . . , xn) is in C(B, F). For a precise mathematical meaning and two equivalent characterisations
- f the set C(B, F), see Section 1.4 in the book.
Goranko
Induction principle for the inductively defined set C(B, F)
Proposition (Induction principle for C(B, F))
Let P be a property of elements of U, such that:
Goranko
Induction principle for the inductively defined set C(B, F)
Proposition (Induction principle for C(B, F))
Let P be a property of elements of U, such that:
- 1. Every element of B has the property P.
Goranko
Induction principle for the inductively defined set C(B, F)
Proposition (Induction principle for C(B, F))
Let P be a property of elements of U, such that:
- 1. Every element of B has the property P.
- 2. For every operation f ∈ F, such that f : Un −
→ U, if every x1, . . . , xn has the property P then f (x1, . . . , xn) has the property P.
Goranko
Induction principle for the inductively defined set C(B, F)
Proposition (Induction principle for C(B, F))
Let P be a property of elements of U, such that:
- 1. Every element of B has the property P.
- 2. For every operation f ∈ F, such that f : Un −
→ U, if every x1, . . . , xn has the property P then f (x1, . . . , xn) has the property P. Then every element of C(B, F) has the property P.
Goranko
Induction principle for the inductively defined set C(B, F)
Proposition (Induction principle for C(B, F))
Let P be a property of elements of U, such that:
- 1. Every element of B has the property P.
- 2. For every operation f ∈ F, such that f : Un −
→ U, if every x1, . . . , xn has the property P then f (x1, . . . , xn) has the property P. Then every element of C(B, F) has the property P. For a proof, see Section 1.4 in the book.
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition?
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition? To idea: first define h on the set B, and then provide rules prescribing how the definition of that function propagates over all operations.
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition? To idea: first define h on the set B, and then provide rules prescribing how the definition of that function propagates over all operations. Formally, in order to define by recursion a mapping h : C(B, F) → X where X is a fixed target set, we need:
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition? To idea: first define h on the set B, and then provide rules prescribing how the definition of that function propagates over all operations. Formally, in order to define by recursion a mapping h : C(B, F) → X where X is a fixed target set, we need:
- 1. A mapping h0 : B → X.
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition? To idea: first define h on the set B, and then provide rules prescribing how the definition of that function propagates over all operations. Formally, in order to define by recursion a mapping h : C(B, F) → X where X is a fixed target set, we need:
- 1. A mapping h0 : B → X.
- 2. For every n-ary operation f ∈ F a mapping Ff : Un × X n → X.
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition? To idea: first define h on the set B, and then provide rules prescribing how the definition of that function propagates over all operations. Formally, in order to define by recursion a mapping h : C(B, F) → X where X is a fixed target set, we need:
- 1. A mapping h0 : B → X.
- 2. For every n-ary operation f ∈ F a mapping Ff : Un × X n → X.
Now the mapping h is defined as follows:
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition? To idea: first define h on the set B, and then provide rules prescribing how the definition of that function propagates over all operations. Formally, in order to define by recursion a mapping h : C(B, F) → X where X is a fixed target set, we need:
- 1. A mapping h0 : B → X.
- 2. For every n-ary operation f ∈ F a mapping Ff : Un × X n → X.
Now the mapping h is defined as follows:
- 1. If a ∈ B then h(a) := h0(a).
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition? To idea: first define h on the set B, and then provide rules prescribing how the definition of that function propagates over all operations. Formally, in order to define by recursion a mapping h : C(B, F) → X where X is a fixed target set, we need:
- 1. A mapping h0 : B → X.
- 2. For every n-ary operation f ∈ F a mapping Ff : Un × X n → X.
Now the mapping h is defined as follows:
- 1. If a ∈ B then h(a) := h0(a).
- 2. For every n-ary operation f ∈ F:
h(f (a1, . . . , an)) := Ff (a1, . . . , an, h(a1), . . . , h(an)).
Goranko
Recursive definitions on inductively definable sets
Given an inductively defined set C(B, F) in a universe U, how to define a function h on that set by using the inductive definition? To idea: first define h on the set B, and then provide rules prescribing how the definition of that function propagates over all operations. Formally, in order to define by recursion a mapping h : C(B, F) → X where X is a fixed target set, we need:
- 1. A mapping h0 : B → X.
- 2. For every n-ary operation f ∈ F a mapping Ff : Un × X n → X.
Now the mapping h is defined as follows:
- 1. If a ∈ B then h(a) := h0(a).
- 2. For every n-ary operation f ∈ F:
h(f (a1, . . . , an)) := Ff (a1, . . . , an, h(a1), . . . , h(an)). Sometimes the mappings Ff only take as arguments h(a1), . . . , h(an).
Goranko
Example: primitive recursion on natural numbers
Goranko
Example: primitive recursion on natural numbers
As a particular case, functions on natural numbers can be defined by primitive recursion, using the inductive definition given earlier.
Goranko
Example: primitive recursion on natural numbers
As a particular case, functions on natural numbers can be defined by primitive recursion, using the inductive definition given earlier.
- 1. Basic scheme of primitive recursion:
h(0) = a; h(n + 1) = h(Sn) = FS(n, h(n))
Goranko
Example: primitive recursion on natural numbers
As a particular case, functions on natural numbers can be defined by primitive recursion, using the inductive definition given earlier.
- 1. Basic scheme of primitive recursion:
h(0) = a; h(n + 1) = h(Sn) = FS(n, h(n)) For example, the scheme h(0) = 1; h(Sn) = (n + 1)h(n) defines the factorial function: h(n) = n!.
Goranko
Example: primitive recursion on natural numbers
As a particular case, functions on natural numbers can be defined by primitive recursion, using the inductive definition given earlier.
- 1. Basic scheme of primitive recursion:
h(0) = a; h(n + 1) = h(Sn) = FS(n, h(n)) For example, the scheme h(0) = 1; h(Sn) = (n + 1)h(n) defines the factorial function: h(n) = n!.
- 2. General scheme of primitive recursion with parameters:
h(m, 0) = F0(m); h(m, Sn) = FS(m, n, h(m, n)).
Goranko
Example: primitive recursion on natural numbers
As a particular case, functions on natural numbers can be defined by primitive recursion, using the inductive definition given earlier.
- 1. Basic scheme of primitive recursion:
h(0) = a; h(n + 1) = h(Sn) = FS(n, h(n)) For example, the scheme h(0) = 1; h(Sn) = (n + 1)h(n) defines the factorial function: h(n) = n!.
- 2. General scheme of primitive recursion with parameters:
h(m, 0) = F0(m); h(m, Sn) = FS(m, n, h(m, n)). For example, the scheme h(m, 0) = m; h(m, n + 1) = h(m, n) + 1 defines the function addition: h(m, n) = m + n.
Goranko
Example: truth valuations of propositional formulae
Recall that the set FOR is built on a set of propositional variables PVAR and a truth assignment is a mapping s : PVAR → {T, F}.
Goranko
Example: truth valuations of propositional formulae
Recall that the set FOR is built on a set of propositional variables PVAR and a truth assignment is a mapping s : PVAR → {T, F}. Now, given any truth assignment s : PVAR → {T, F} we define a mapping α : FOR → {T, F} that extends it to a truth valuation – a function computing the truth values of all formulae in FOR, defined by recursion on the inductive definition of FOR as follows:
Goranko
Example: truth valuations of propositional formulae
Recall that the set FOR is built on a set of propositional variables PVAR and a truth assignment is a mapping s : PVAR → {T, F}. Now, given any truth assignment s : PVAR → {T, F} we define a mapping α : FOR → {T, F} that extends it to a truth valuation – a function computing the truth values of all formulae in FOR, defined by recursion on the inductive definition of FOR as follows:
- 1. α(⊤) = T, α(⊥) = F.
Goranko
Example: truth valuations of propositional formulae
Recall that the set FOR is built on a set of propositional variables PVAR and a truth assignment is a mapping s : PVAR → {T, F}. Now, given any truth assignment s : PVAR → {T, F} we define a mapping α : FOR → {T, F} that extends it to a truth valuation – a function computing the truth values of all formulae in FOR, defined by recursion on the inductive definition of FOR as follows:
- 1. α(⊤) = T, α(⊥) = F.
- 2. α(p) = s(p) for every propositional variable p.
Goranko
Example: truth valuations of propositional formulae
Recall that the set FOR is built on a set of propositional variables PVAR and a truth assignment is a mapping s : PVAR → {T, F}. Now, given any truth assignment s : PVAR → {T, F} we define a mapping α : FOR → {T, F} that extends it to a truth valuation – a function computing the truth values of all formulae in FOR, defined by recursion on the inductive definition of FOR as follows:
- 1. α(⊤) = T, α(⊥) = F.
- 2. α(p) = s(p) for every propositional variable p.
- 3. α(¬A) = F¬(α(A)),
where F¬ : {T, F} → {T, F} is defined as follows: F¬(T) = F, F¬(F) = T.
Goranko
Example: truth valuations of propositional formulae
Recall that the set FOR is built on a set of propositional variables PVAR and a truth assignment is a mapping s : PVAR → {T, F}. Now, given any truth assignment s : PVAR → {T, F} we define a mapping α : FOR → {T, F} that extends it to a truth valuation – a function computing the truth values of all formulae in FOR, defined by recursion on the inductive definition of FOR as follows:
- 1. α(⊤) = T, α(⊥) = F.
- 2. α(p) = s(p) for every propositional variable p.
- 3. α(¬A) = F¬(α(A)),
where F¬ : {T, F} → {T, F} is defined as follows: F¬(T) = F, F¬(F) = T.
- 4. α(A ∧ B) = F∧(α(A), α(B)),
where F¬ : {T, F}2 → {T, F} is defined as follows: F∧(T, T) = T and F∧(T, F) = F∧(F, T) = F∧(F, F) = F. (That is, F∧ computes the truth table of ∧.)
Goranko
Truth valuations of propositional formulae, continued
Goranko
Truth valuations of propositional formulae, continued
- 1. α(A ∨ B) = F∨(α(A), α(B)), where
F∨ : {T, F}2 → {T, F} is defined respectively as follows: F∧(T, T) = F∧(T, F) = F∧(F, T) = T and F∧(F, F) = F.
Goranko
Truth valuations of propositional formulae, continued
- 1. α(A ∨ B) = F∨(α(A), α(B)), where
F∨ : {T, F}2 → {T, F} is defined respectively as follows: F∧(T, T) = F∧(T, F) = F∧(F, T) = T and F∧(F, F) = F.
- 2. α(A → B) = F→(α(A), α(B)), where
F→ : {T, F}2 → {T, F} is defined according to the truth table of →.
Goranko
Truth valuations of propositional formulae, continued
- 1. α(A ∨ B) = F∨(α(A), α(B)), where
F∨ : {T, F}2 → {T, F} is defined respectively as follows: F∧(T, T) = F∧(T, F) = F∧(F, T) = T and F∧(F, F) = F.
- 2. α(A → B) = F→(α(A), α(B)), where
F→ : {T, F}2 → {T, F} is defined according to the truth table of →.
- 3. α(A ↔ B) = F↔(α(A), α(B)), where
F↔ : {T, F}2 → {T, F} is defined according to the truth table of ↔.
Goranko
Truth valuations of propositional formulae, continued
- 1. α(A ∨ B) = F∨(α(A), α(B)), where
F∨ : {T, F}2 → {T, F} is defined respectively as follows: F∧(T, T) = F∧(T, F) = F∧(F, T) = T and F∧(F, F) = F.
- 2. α(A → B) = F→(α(A), α(B)), where
F→ : {T, F}2 → {T, F} is defined according to the truth table of →.
- 3. α(A ↔ B) = F↔(α(A), α(B)), where
F↔ : {T, F}2 → {T, F} is defined according to the truth table of ↔. The so defined mapping α is called the truth-valuation of the propositional formulae generated by the truth assignment s.
Goranko
Truth valuations of propositional formulae, continued
- 1. α(A ∨ B) = F∨(α(A), α(B)), where
F∨ : {T, F}2 → {T, F} is defined respectively as follows: F∧(T, T) = F∧(T, F) = F∧(F, T) = T and F∧(F, F) = F.
- 2. α(A → B) = F→(α(A), α(B)), where
F→ : {T, F}2 → {T, F} is defined according to the truth table of →.
- 3. α(A ↔ B) = F↔(α(A), α(B)), where
F↔ : {T, F}2 → {T, F} is defined according to the truth table of ↔. The so defined mapping α is called the truth-valuation of the propositional formulae generated by the truth assignment s. Using such recursive definitions, various other natural functions associated with propositional formulae can be defined likewise, such as length, number of occurrences of logical connectives, set of occurring propositional variables, etc.
Goranko
Truth valuations of propositional formulae, continued
- 1. α(A ∨ B) = F∨(α(A), α(B)), where
F∨ : {T, F}2 → {T, F} is defined respectively as follows: F∧(T, T) = F∧(T, F) = F∧(F, T) = T and F∧(F, F) = F.
- 2. α(A → B) = F→(α(A), α(B)), where
F→ : {T, F}2 → {T, F} is defined according to the truth table of →.
- 3. α(A ↔ B) = F↔(α(A), α(B)), where
F↔ : {T, F}2 → {T, F} is defined according to the truth table of ↔. The so defined mapping α is called the truth-valuation of the propositional formulae generated by the truth assignment s. Using such recursive definitions, various other natural functions associated with propositional formulae can be defined likewise, such as length, number of occurrences of logical connectives, set of occurring propositional variables, etc. Exercises.
Goranko
Unique generation property
Goranko
Unique generation property
For the correctness of recursive definitions it should be required that every element of C(B, F) can be constructed ‘uniquely’ (up to the order
- f the steps), else they can lead to problems (see example in the book).
Goranko
Unique generation property
For the correctness of recursive definitions it should be required that every element of C(B, F) can be constructed ‘uniquely’ (up to the order
- f the steps), else they can lead to problems (see example in the book).
More formally, the elements of C(B, F) are represented by expressions (‘terms’) built from the elements of B by applying the operations in F.
Goranko
Unique generation property
For the correctness of recursive definitions it should be required that every element of C(B, F) can be constructed ‘uniquely’ (up to the order
- f the steps), else they can lead to problems (see example in the book).
More formally, the elements of C(B, F) are represented by expressions (‘terms’) built from the elements of B by applying the operations in F. The unique generation property means that every element of C(B, F) can be represented by a unique such expression.
Goranko
Unique generation property
For the correctness of recursive definitions it should be required that every element of C(B, F) can be constructed ‘uniquely’ (up to the order
- f the steps), else they can lead to problems (see example in the book).
More formally, the elements of C(B, F) are represented by expressions (‘terms’) built from the elements of B by applying the operations in F. The unique generation property means that every element of C(B, F) can be represented by a unique such expression.
- 1. The standard inductive definition of natural numbers has the unique
generation property.
Goranko
Unique generation property
For the correctness of recursive definitions it should be required that every element of C(B, F) can be constructed ‘uniquely’ (up to the order
- f the steps), else they can lead to problems (see example in the book).
More formally, the elements of C(B, F) are represented by expressions (‘terms’) built from the elements of B by applying the operations in F. The unique generation property means that every element of C(B, F) can be represented by a unique such expression.
- 1. The standard inductive definition of natural numbers has the unique
generation property.
- 2. The inductively defined set FOR of propositional formulae has the
unique generation property, aka unique readability property.
Goranko
Unique generation property
For the correctness of recursive definitions it should be required that every element of C(B, F) can be constructed ‘uniquely’ (up to the order
- f the steps), else they can lead to problems (see example in the book).
More formally, the elements of C(B, F) are represented by expressions (‘terms’) built from the elements of B by applying the operations in F. The unique generation property means that every element of C(B, F) can be represented by a unique such expression.
- 1. The standard inductive definition of natural numbers has the unique
generation property.
- 2. The inductively defined set FOR of propositional formulae has the