Re: Check the work please (Structural Induction)

Your proof is basically correct after you consider the more general induction hypothesis.

Originally Posted by gomdohri

Therefore, we need to prove a stronger property than the one we is given.

∀ acc. acc * mult t = multb t acc

By induction on t,

Base Case P(Nul)

One flaw is that you don't define P. Often it is not defined explicitly (but then one is not supposed to use the letter P). However, your proof is very detailed (since you even mention the rules of universal introduction and elimination), so it's a good idea to define P explicitly. Moreover, this problem has an issue that often occurs in inductive proofs. The fact that we need to prove is ∀ t. ∀ acc. acc * mult t = multb t acc. There are two options. We can define P(t) as ∀ acc. acc * mult t = multb t acc. Alternatively, we can swap the quantifiers, fix some acc and define P(t) as acc * mult t = multb t acc for that particular acc. In other words, in the second option, acc would be the same throughout the proof. It turns out that the second option does not work.

The reason the second option does not work is that we apply IH4 for acc, but IH3 for x * acc * mult u2. Thus, we need P to be universally quantified over acc. This is an important distinction, which occurs when induction is studied seriously, e.g., in computational complexity and inductive types.

Originally Posted by gomdohri

We have now proved ∀ t. P(t), that is: [is this right? proved that for all t, P(t)? not too sure]