This mini-project is a spinoff of Exercise 12 in Chapter Induction principles: from first-order to higher-order induction, in Week 11 (Task 1 below). The goal of Task 0 to Task 4 is to study a sequence of properties, and the goal of Task 5 is to generalize these properties.
Prove the following property using fourth-order induction:
Property fours_and_threes :
forall n : nat,
exists a b : nat,
6 + n = 4 * a + 3 * b.
Does your proof need the full power of nat_ind4 or would a tailored version of it suffice?
Prove the following property using fourth-order induction:
Property fours_and_fives :
forall n : nat,
exists a b : nat,
12 + n = 4 * a + 5 * b.
Prove the following property using fourth-order induction:
Property fours_and_sevens :
forall n : nat,
exists a b : nat,
18 + n = 4 * a + 7 * b.
How does your proof, in this task, compare to the proofs in Task 0 and in Task 1?
If your three proofs are not aligned, revisit them and align them.
Based on the alignment that was identified in Task 2, write an aligned proof the following property:
Property fours_and_nines :
forall n : nat,
exists a b : nat,
24 + n = 4 * a + 9 * b.
Just to make sure, and based on the previous tasks, complete the statement of the following property and prove it in a aligned way:
Property fours_and_elevens :
forall n : nat,
exists a b : nat,
?? + n = 4 * a + 11 * b.
The goal of this task is to generalize the previous properties, based on the observation that the second factor is an odd number that is larger than 1:
Property fours_and_an_odd_number_that_is_larger_than_1 :
forall m n : nat,
exists a b : nat,
?? + n = 4 * a + S (2 * S m) * b.
Complete the statement in a way that is compatible with the statements in the previous tasks.
Verify that your completed statement is compatible with the previous proofs by completing the following proof:
Proof.
intros [ | [ | [ | [ | [ | m']]]]] n.
- simpl (...).
simpl (S (2 * 1)).
exact (fours_and_threes n).
- simpl (...).
simpl (S (2 * 2)).
exact (fours_and_fives n).
- simpl (...).
simpl (S (2 * 3)).
exact (fours_and_sevens n).
- simpl (...).
simpl (S (2 * 4)).
exact (fours_and_nines n).
- simpl (...).
simpl (S (2 * 5)).
exact (fours_and_elevens n).
-
Prove Property fours_and_an_odd_number_that_is_larger_than_1 by mathematical induction over m. In the induction step, conduct a fourth-order induction over n:
To answer the questions in Task 5.3.b, you might want to first state and prove some more properties in the sequence:
Property fours_and_thirteens :
forall n : nat,
exists a b : nat,
?? + n = 4 * a + 13 * b.
Property fours_and_fifteens :
forall n : nat,
exists a b : nat,
?? + n = 4 * a + 15 * b.
Property fours_and_seventeens :
forall n : nat,
exists a b : nat,
?? + n = 4 * a + 17 * b.
Property fours_and_nineteens :
forall n : nat,
exists a b : nat,
?? + n = 4 * a + 19 * b.
Created [04 Jun 2025]