Formalizing informal proofs

Goal

The goal of this lecture is to formalize more informal proofs, this time about discrete mathematics (property of sums) and linear algebra (2x2 matrices).

Resources

Exercise 01

Prove as many properties as time permits in the .v file about formalizing summations.

Exercise 02

In the resource file about formalizing summations, Sigma is defined recursively. Define a tail-recursive version of it that uses an accumulator and prove the equivalence of these two implementations.

Exercise 03

The goal of this exercise is to formalize 2-by-2 matrices, based on Section 5 of the accompanying informal lecture note:

Inductive m22 : Type := M22 : nat -> nat -> nat -> nat -> m22.

The idea is evaluating M22 x11 x12 x21 x22 yields a representation of the following 2-by-2 matrix of natural numbers:

+-       -+
| x11 x12 |
|         |
| x21 x22 |
+-       -+
  1. formalize Definition 9 in Coq
  2. formalize and prove Property 10 in Coq
  3. formalize and prove Property 12 in Coq
  4. formalize Definition 13 in Coq
  5. formalize and prove Proposition 14
  6. how does your formalization of Proposition 14 compare with the informal proof of Proposition 14?
  7. solve Exercise 25
  8. formalize Definition 27
  9. are Definitions 13 and 27 equivalent?
  10. formalize Definition 35
  11. formalize and prove Property 36
  12. formalize and prove Proposition 38
  13. solve Exercise 40

Subsidiary but fun point, time permitting: characterize the result of adding F^(n+1) and F^n, for any natural number n, where X^y denotes exponentiating the matrix X with the natural number y.

Exercise 04

The goal of this exercise is to go from matrices of natural numbers to matrices of matrices of natural numbers:

Inductive mm22 : Type := MM22 : m22 -> m22 -> m22 -> m22 -> mm22.
  1. implement addition, multiplication, and exponentiation

  2. what do you make of the following matrix as you exponentiate it:

    +-       -+
    | F^0 F^1 |
    |         |
    | F^1 F^2 |
    +-       -+
    

    where again X^y denotes exponentiating the matrix X with the natural number y and F is from Definition 25.

Resources

Version

Added Exercise 02 [24 Mar 2024]

Created [22 Mar 2024]

Table Of Contents

Previous topic

Lecture Notes, Week 09

Next topic

Exercises for Week 09