Inductive Definitions (our meta-language for specifications) - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Inductive Definitions (our meta-language for specifications)

Description:

Pls inductive Catriel Beeri. 4. 4. Is there just one set in N that satisfies (r1), (r2) ... Pls inductive Catriel Beeri. 13. Example of a proof of ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 27
Provided by: off9
Category:

less

Transcript and Presenter's Notes

Title: Inductive Definitions (our meta-language for specifications)


1
Inductive Definitions(our meta-language for
specifications)
  • Examples
  • Syntax
  • Semantics
  • Proof Trees
  • Rule set as a function
  • Proof by induction
  • Function ( relation) definition by induction
  • Generalizing rule form

2
Examples
  • An inductive definition by
  • one axiom, one proper rule

3
  • Questions
  • Do we know which elements are in S?
  • (at least, can we enumerate them?)
  • 2. Given c, can we answer is c a member of S?
  • 3. Which is the underlying universe here ?
  • A any of N, Z, Q, .
  • It is common to omit the universe, U, since
  • It is often known from the context
  • The rules tell us what it is
  • Even if there are several candidates, the
    defined set is often the same in them

4
  • 4. Is there just one set in N that satisfies
    (r1), (r2)?
  • If not, which one is the one being
    defined?
  • A The intention is
  • the least set that satisfies the
    rules
  • But, least is often omitted
  • Note difference between minimal, least (in
    a collection)
  • There is an abuse of language. It should be
  • Easier to use S for both defined and a set
    variable

5
  • Can we enumerate?
  • Solve membership?
  • Is the defined set independent of the universe?

6
  • A new problem goal resolution
  • Given c, can we find all y s.t. S(c,y)?
  • c a goal (on 1st position)
  • y, such that S(c,y) a solution
  • Can we solve when the goal is on 2nd position?

7
  • Q is the defined set independent of universe?
  • What about goal resolution on either column?

8
Syntax
  • Inductive definition a set R of rules
  • A rule conjunction of premises (?????)
  • implies conclusion
  • or body implies head
  • Our style
    (no commas!)

9
  • Empty body (0 premises) an axiom
  • Otherwise, a proper rule
  • 1st Example
  • Here, x, y are individual variables

10
Semantics
  • Variable assignment
  • maps individual variables to constants
    (in U)
  • Applied to a rule ? a ground (var-free) rule
    instance

S satisfies rule r if for each r-instance,
if body is true in S then head is true
in S (Individual vars are
universally quantified)
S satisfies R, if it satisfies each r in R
11
  • If U (the universe)
  • contains the constants in R,
  • is closed under the operations in R,
  • then it satisfies R satisfying set exists
  • Intersection property
  • If each set satisfies
    R,
  • so does
  • Hence, a (unique) least set that satisfies R
    exists
  • This set is the semantics of R indR

12
Extensions
  • Define several sets simultaneously
  • Can use in rules, for each defined
  • Can assume certain sets are given
    (known)
  • Can use in premises
  • (This is not a real extension, can use these
    in conditions)
  • These enable construction of definition
    hierarchies.

13
Proof Trees
  • Example of a proof of membership in an inductive
    set
  • Each leaf an axiom instance
  • Each internal node inferred from its children
  • a rule instance

14
  • We abbreviate to
  • Element a is inferred from by
    rule r if ...
  • Q What when r is an axiom?

15
Proof Tree
  • A tree in which each node is
  • labeled by
  • a is the element at the node
  • Associated with a rule r such that
  • is inferred from the children of
    the node by r
  • (for a leaf --- associated rule is an
    axiom)
  • (Labels of a node its children rule instance)
  • Proof trees contain only membership
    formulas
  • Proof tree a composition of inferences

16
  • Fact a is in indR iff it has a proof
    tree
  • Proof tree is a proof of membership for its
    root
  • How do we prove this?
  • An arbitrary satisfying set contains every
    element that has a proof tree --- induction on
    depth of tree
  • The set of elements that have proof trees is a
    satisfying set

17
Rule set as a function
Fact closed under r/R satisfies r/R Fact

(same for )
  • Generalize
  • For example 1

18
  • Define Q is closed under r/R if it is closed
    under
  • Fact closed under r/R satisfies r/R
  • Fact
  • same for

19
  • Thm Knaster-Tarski, 1955
  • A monotone function f on sets has the
  • intersection property for its closed sets
  • ? if some set is closed under f, a least closed
    set exists
  • ? for any R, a least set closed under R exists
  • (for a large enough universe)
  • (remember closed under satisfies)

20
Proof by induction
  • Prove for each axiom that P(e) holds
  • Prove for each rule
  • that if (and ) then
    P(e) holds
  • (actually, prove it for each variable
    assignment)
  • proof by rule induction
  • Example prove for Example 1 that each element
    in S is divisible by 4

21
Function ( relation) definition by induction
  • For each axiom , define f(e)
  • For each rule
  • define f(e) in terms of
  • Example
  • fact(0) 1
  • fact(n1) (n1)fact(n)
  • Why is it called definition by induction?
  • Hint What is the domain, and the rules that
    define it?
  • and what is the form of the function definition

22
  • Let rfact be the graph of fact , a binary
    relation.
  • Compare
  • To fact(0) 1
  • fact(n1)
    (n1)fact(n)
  • Inductive has a double meaning
  • the domain is inductively defined
  • The function is inductively defined (in a special
    syntax)
  • and the two rules sets correspond

23
  • Function def. by induction
  • function defined by clauses, one for each rule
    defining the domain
  • Significance
  • One-to-one correspondence ? fact is total
  • Sometimes, we need a partial function
  • we provide clauses for only some of the rules
  • that define the domain
  • Example head and tail on lists

24
  • Consider
  • Define
  • We have
  • What went wrong? (think of proof trees)
  • Function is total, but ill-defined!

25
Function relation definitions, summary
  • Over an inductively defined domain
  • Inductive definition of relation is always ok.
  • Inductive function definition
  • Is always total
  • may fail to be well-defined
  • a sufficient condition for well-defined-ness
  • each value of domain has a unique proof tree

26
Generalizing rule form
  • It is allowed to combine membership formulas by
  • Conjunction in head
  • Disjunction in body
  • But,
  • Disjunction in head, negation in body/head are
  • forbidden
  • Why?
  • As for quantifiers --- see reading material
Write a Comment
User Comments (0)
About PowerShow.com