theoremrowCirculant_gram_apply [NeZero n] {R : Type uR} [CommRingR]
(h : Fin n →R) (i a : Fin n) :
(rowCirculant h * (rowCirculant h).transpose) i a =
∑ j, h j * h (j - (a - i)) :=by
proof · 11
lines
classical
lete : Fin n ≃ Fin n :=
{ toFun :=fun j => j - i
invFun :=fun j => j + i
left_inv :=fun j => sub_add_cancel j i
right_inv :=fun j => add_sub_cancel_right j i }
simp only [Matrix.mul_apply, Matrix.transpose_apply, rowCirculant_apply]
apply Fintype.sum_equiv e
intro j
change h (j - i) * h (j - a) = h (j - i) * h ((j - i) - (a - i))
simp only [sub_sub_sub_cancel_right]
The full Gram equation is exactly the cyclic autocorrelation system.
theoremgram_eq_iff_autocorrelation [NeZero n] {R : Type uR} [CommRingR]
(h : Fin n →R) :
rowCirculant h * (rowCirculant h).transpose =
(n : R) • (1 : Matrix (Fin n) (Fin n) R) ↔∀a : Fin n, ∑ j, h j * h (j - a) = if a = 0then (n : R) else0:=by
proof · 14
lines
classical
constructor
· intro hGram a
have ha := congrArg (funM : Matrix (Fin n) (Fin n) R=>M0 a) hGram
rw [rowCirculant_gram_apply] at ha
simpa [Matrix.smul_apply, Matrix.one_apply, eq_comm] using ha
· intro hCorr
ext i a
rw [rowCirculant_gram_apply, hCorr]
by_cases hia : i = a
· subst a
simp
· havehai : a - i ≠0:= sub_ne_zero.mpr (Ne.symm hia)
simp [hia, hai, Matrix.smul_apply]
Casting the integer Gram matrix agrees entry by entry with taking the
Gram matrix after casting the row.
theoremintCast_gram_apply (h : Fin n →ℤ) (i j : Fin n) :
((rowCirculant h * (rowCirculant h).transpose) i j : ℝ) =
(rowCirculant (fun a => (h a : ℝ)) *
(rowCirculant (fun a => (h a : ℝ))).transpose) i j :=by
theoremexistsReal_iff_integer_autocorrelation [NeZero n] :
ExistsRealCirculantHadamard n ↔∃h : Fin n →ℤ, (∀ j, IsSign (h j)) ∧∀a : Fin n, ∑ j, h j * h (j - a) = if a = 0then (n : ℤ) else0:=by
proof · 2
lines
rw [← integerSignRow_iff_real]
simp only [IsIntegerSignRow, gram_eq_iff_autocorrelation]