Logic as a Tool Chapter 1: Understanding Propositional Logic 1.4 - - PowerPoint PPT Presentation

logic as a tool chapter 1 understanding propositional
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Goranko

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.4 Inductive definitions Structural induction and recursion

Valentin Goranko Stockholm University October 2016

slide-2
SLIDE 2

Goranko

Introduction

Inductive definitions: a special kind of definitions, which refers to the very notion that is being defining.

slide-3
SLIDE 3

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.
slide-4
SLIDE 4

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.

slide-5
SLIDE 5

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.

slide-6
SLIDE 6

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.
slide-7
SLIDE 7

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.

slide-8
SLIDE 8

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:

slide-9
SLIDE 9

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.
slide-10
SLIDE 10

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.
slide-11
SLIDE 11

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.

slide-12
SLIDE 12

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.

slide-13
SLIDE 13

Goranko

Inductive definition of the set of natural numbers

Consider the 2-letter alphabet {0, S}, where 0, S are different symbols.

slide-14
SLIDE 14

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:

slide-15
SLIDE 15

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.
slide-16
SLIDE 16

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.
slide-17
SLIDE 17

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, . . .} .

slide-18
SLIDE 18

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.

slide-19
SLIDE 19

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

slide-20
SLIDE 20

Goranko

Inductive definition (1) of the set of propositional formulae

slide-21
SLIDE 21

Goranko

Inductive definition (1) of the set of propositional formulae

Denote the alphabet of symbols used in propositional logic by APL.

slide-22
SLIDE 22

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:

slide-23
SLIDE 23

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.
slide-24
SLIDE 24

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.
slide-25
SLIDE 25

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.

slide-26
SLIDE 26

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.

slide-27
SLIDE 27

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∗”.

slide-28
SLIDE 28

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:

slide-29
SLIDE 29

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.
slide-30
SLIDE 30

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.
slide-31
SLIDE 31

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.
slide-32
SLIDE 32

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.

slide-33
SLIDE 33

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.

slide-34
SLIDE 34

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∗.

slide-35
SLIDE 35

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.

slide-36
SLIDE 36

Goranko

Induction principles and proofs by induction

With every inductive definition, a scheme for proofs by induction can be associated.

slide-37
SLIDE 37

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.

slide-38
SLIDE 38

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:

slide-39
SLIDE 39

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.
slide-40
SLIDE 40

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.

slide-41
SLIDE 41

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.

slide-42
SLIDE 42

Goranko

Induction on natural numbers

slide-43
SLIDE 43

Goranko

Induction on natural numbers

Principle of (mathematical) induction on natural numbers. Let P be a property of natural numbers such that:

slide-44
SLIDE 44

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.
slide-45
SLIDE 45

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.

slide-46
SLIDE 46

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.

slide-47
SLIDE 47

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.

slide-48
SLIDE 48

Goranko

Structural induction on propositional formulae

slide-49
SLIDE 49

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”.

slide-50
SLIDE 50

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.

slide-51
SLIDE 51

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:

slide-52
SLIDE 52

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.
slide-53
SLIDE 53

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.
slide-54
SLIDE 54

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.
slide-55
SLIDE 55

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.

slide-56
SLIDE 56

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.

slide-57
SLIDE 57

Goranko

General framework for inductive definitions and principles

The necessary ingredients for an inductive definition are:

slide-58
SLIDE 58

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.

slide-59
SLIDE 59

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.

slide-60
SLIDE 60

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.
slide-61
SLIDE 61

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;

slide-62
SLIDE 62

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;

slide-63
SLIDE 63

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.

slide-64
SLIDE 64

Goranko

The set inductively defined over B by applying the operations in F

slide-65
SLIDE 65

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:

slide-66
SLIDE 66

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).
slide-67
SLIDE 67

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).

slide-68
SLIDE 68

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.
slide-69
SLIDE 69

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:

slide-70
SLIDE 70

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.
slide-71
SLIDE 71

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.

slide-72
SLIDE 72

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.

slide-73
SLIDE 73

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.

slide-74
SLIDE 74

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?

slide-75
SLIDE 75

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.

slide-76
SLIDE 76

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:

slide-77
SLIDE 77

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.
slide-78
SLIDE 78

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.
slide-79
SLIDE 79

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:

slide-80
SLIDE 80

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).
slide-81
SLIDE 81

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)).

slide-82
SLIDE 82

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).

slide-83
SLIDE 83

Goranko

Example: primitive recursion on natural numbers

slide-84
SLIDE 84

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.

slide-85
SLIDE 85

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))

slide-86
SLIDE 86

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!.

slide-87
SLIDE 87

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)).

slide-88
SLIDE 88

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.

slide-89
SLIDE 89

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}.

slide-90
SLIDE 90

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:

slide-91
SLIDE 91

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.
slide-92
SLIDE 92

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.
slide-93
SLIDE 93

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.

slide-94
SLIDE 94

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 ∧.)

slide-95
SLIDE 95

Goranko

Truth valuations of propositional formulae, continued

slide-96
SLIDE 96

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.

slide-97
SLIDE 97

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 →.

slide-98
SLIDE 98

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 ↔.

slide-99
SLIDE 99

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.

slide-100
SLIDE 100

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.

slide-101
SLIDE 101

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.

slide-102
SLIDE 102

Goranko

Unique generation property

slide-103
SLIDE 103

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).
slide-104
SLIDE 104

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.

slide-105
SLIDE 105

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.

slide-106
SLIDE 106

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.

slide-107
SLIDE 107

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.

slide-108
SLIDE 108

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.

Theorem

If C(B, F) satisfies the unique generation property then for every mapping h0 : B → X and mappings {Ff : X 2n → X | f ∈ F} there exists a unique mapping h : C(B, F) → X defined by the recursive definition scheme.