SE 500 (Math for SE)   Fall 2022
HW #1: Textual Substitution, Inference Rule Substitution, Inference Systems
Due: 2:00pm, Friday, Sept. 9

The exercises referred to by number come from pages 21-22 of the Gries & Schneider textbook.

1. Do Exercise 1.2, parts (b) through (f). The answer to (a) is b+2. Don't forget that textual substitution has higher precedence than any other operator.

2. Do Exercise 1.3, parts (b) through (f). The answer to (a) is y*x + 2 .

3. Do Exercise 1.6. Specifically, show two different instantiations of Inference Rule Substitution (1.1)

E
E[v:=F]

in each case taking E to be the expression  x=y ∨ x≠y  and v to be the list of variables x,y. (So all that is left for you is to instantiate F in two different ways. Make sure that at least one of them involves compound expressions.)

4. Let F be the formal system whose set of well-formed formulas (wff's) includes precisely those strings of the form xΔyΔz, where each of x, y, and z is a string composed of ∗'s and whose axioms and inference rules are as follows:

Axiom R1 R2
ΔΔ
uΔvΔw∗

uΔv∗Δw
uΔvΔw

∗uΔvΔw∗

A wff is, in other words, a string of ∗'s with two Δ's thrown in, and the wff that includes no ∗'s is accepted, without proof, as a theorem.

Rule 1 says, informally, that if we take a theorem and transfer one ∗ from the end to the region lying between the two Δ's, what we get is another theorem.

Rule 2 says, informally, that if we take a theorem and insert one ∗ at the beginning and another at the end, what we get is another theorem.

As an example, here is a proof of ∗∗Δ∗Δ∗:
(1) ΔΔ (axiom)
(2) ∗ΔΔ∗ R2, with u,v,w := λ, λ, λ applied to (1)
(3) ∗∗ΔΔ∗∗ R2, with u,v,w := ∗, λ ,∗ applied to (2)
(4) ∗∗Δ∗Δ∗ R1, with u,v,w := ∗∗, λ, ∗ applied to (3)

Note that λ refers to the empty string.

(a) Show a proof of ∗∗∗∗Δ∗∗Δ∗∗

(b) Argue for the following claim:

If k ≥ m ≥ 0, then ∗kΔ∗mΔ∗k−m is a theorem.
By ∗r we mean a string of ∗'s of length r. (For example, ∗4 = ∗∗∗∗.)

Suggested Approach: Provide informal instructions (i.e., an algorithm) for writing a proof of ∗kΔ∗mΔ∗k−m for arbitrarily chosen values of k and m that satisfy k ≥ m ≥ 0.

(c) Argue for the following claim:

If ∗kΔ∗mΔ∗n is a theorem, then k−m = n.

Suggested approach: Explain why it must be that every line of every proof is such that the wff on that line satisfies the stated condition. For one-line proofs, this is easy. For multiple-line proofs, you need only show that the wff on the last line satisfies the stated condition, under the assumption that the wff's on all previous lines do.