An extension of Mercer theorem to matrix-valued measurable kernels