Skip to content

Conversation

@MohanadAhmed
Copy link
Contributor

@MohanadAhmed MohanadAhmed commented May 11, 2023

Main Changes

DFT Matrix properties

Equations 403 through 412 and definitions necessary to state these lemmas such as DFT/IDFT on vectors, the DFT and Inverse DFT matrices.

We define three main matrices $W_n, sW_n = W_n^*, iW_n = \frac{1}{N}sW_n$, the DFT matrix the conjugated DFT matrix and the inverse DFT matrix as a scaled conjugated DFT matrix. Other than the equations themselves there are supporting lemmas:

The comment between eq_411 and eq_412 stating that the DFT matrix is a vandermonde matrix is also formalized.

  • Wkn_dot_iWKn_offdiag: which shows that the product of the DFT matrix and its conjugate (or inverse) has zero of diagonal entries. This requires a lot of casting around!!
  • Wₙ_mul_sWₙ:
  • inverse_Wₙ :
  • Wₙ_mul_iWₙ_eq_one:
  • Wₙ_symmetric
  • sWₙ_symmetric
  • iWₙ_mul_Wₙ_eq_one
  • inv_Wₙ
  • twiddle_comm'
  • twiddle_sum
  • conj_Wₙ
  • two_pi_I_by_N_piInt_pos: the imaginary part of $2 \pi i / N$ is less than $\pi$ only if N is greater than 2.
  • two_pi_I_by_N_piInt_neg: the imaginary part of $2 \pi i / N$ is greater than $-\pi$
  • twiddle_neg_half_cycle_eq_neg' raising a root of unity of denominator 2 or more to half its denominator gives minus 1
  • shiftk and shiftk_equiv allows shifting the summation over fin N by arbitrary k.
  • dft_idft and idft_dft shows that the dft and idft are inverse operations.
  • notice_between_411_412 the comment that the DFT matrix is a vandermonde matrix

Trace and Determinant as Sum of Eigenavalues in closed fields

Added a file mat_eigs_lib.lean that contains definition of the eigenvalues set for finite matrices as the roots of the characteristic polynomial. Then we show that the sum and prod of these (possibly repeated eigenvalues) are the trace and determinant.

We then use these to prove eq_12 and eq_18

Minor Changes

Style

As you can see it is mostly rewrites. If you have pointers on how to improve my style and make it more efficient and varied in techniques, please share them!


-- `matrix.is_hermitian.det_eq_prod_eigenvalues` is close, but needs `A` to be hermitian which is too strong
lemma eq_18 {A : matrix m m R} (eigvals : m → R) : det A = ∏ i, eigvals i := sorry
lemma eq_18 {A : matrix m m R} [is_alg_closed R] : det A = (eigs A).prod := det_eq_prod_eigs A
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@MohanadAhmed MohanadAhmed marked this pull request as draft May 19, 2023 09:12
@eric-wieser eric-wieser added the lean3 This PR needs converting to Lean 4 if it is not already merged label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lean3 This PR needs converting to Lean 4 if it is not already merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants