[Programming Languages And Lambda calculi] 2.2 ~ 2.3 Omission in the definition, the induction in the proof tree

2.2 Omission in definition

Be careful to include omission (or asterisk) definitions, because they contain implicit recursion.

For example,
Insert picture description here
in the second element, any number of W is allowed. The following is a more precise definition:
Insert picture description here
After expanding like this, we can find that when proving examples of W, we must mutually prove the inductive elements of Y. In practice, the inductive element of Y is usually so obvious that we often omit it and focus on the proof of the original definition.

Theorem 2.3 Every W contains α

Proof :

  • Basic elements:

    • Element α

      The argument is established

  • Inductive elements:

    • Elements (βW0W1... Wn)

      Every W i contains α, and every W contains at least one W i , so the argument holds.

The following theorem is also easy to prove and does not need to be re-expanded into the form of mutual conduction.

Theorem 2.4 For any W, there is a parenthesis in front of each β

Exercise 2.2

Prove Theorem 2.4

answer
  • Basic elements:

    • Element α

      There is no β in the element

  • Inductive elements:

    • Elements (βW0W1... Wn)

      There are parentheses before β, and if β exists in W0 ~ Wn, there are parentheses before β, so the argument still holds.

    The certificate is complete.

2.3 Induction in the proof tree

The following definition defines the set
△ P \bigtriangleup PP is
pronounced as "P is pointy" (P is pointy)
Insert picture description here
As usual, the set ΔP is defined as the smallest set that satisfies the above rules. The first rule defines a basic element, and the second rule is self-referential.

Another way to define ΔP is similar to a proof tree:
Insert picture description here
notice that ΔP appears above the line, and there is a Δ proof tree of ΔP at the bottom of the line. This Δ proof tree represents the second self-referential definition.

These two ways of defining sets define two sets at the same time: the set indicating ΔP and the set of Δ proof trees.
Both of these sets are just simple symbolic patterns defined recursively.

The following is an example of the Δ proof tree:
Insert picture description here
Now we can write the proof about ΔP and the Δ proof tree:

Theorem 2.5 : If the P set is Δ, then its proof tree contains an odd number of
△ s \bigtriangleup ss
The proof set of the argument proves that P set is the same, using structural induction:

  • Basic elements

    • Factor Δα

      The complete tree contains Δα, a line and a tick, for a total of Δα, so the argument holds

  • Inductive elements

    • Element Δ(P1 O・ P2)

      The complete tree contains Δ(P1 O・ P2), plus the tree of ΔP1 ΔP2. In recursion, the ΔP1 tree is a substructure of the Δ(P1 O・ P2) tree, and the number of Δs is odd. Similarly, the number of ΔP2 trees Δs is odd. Add two odd numbers to get even Δs. But the complete Δ(P1 O・ P2) tree still needs to add a Δs, and the final total of Δs is an odd number, and the argument is still valid.

Guess you like

Origin blog.csdn.net/qq_35714301/article/details/113792312