Download data/lean/OAI/Analysis/HotSpots/Reciprocal.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 94.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HotSpots/Reciprocal.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HotSpots/Reciprocal.lean
-
curl -L -o Reciprocal.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HotSpots/Reciprocal.lean
94.4 kB
import OAI.Analysis.HotSpots.Basic
namespace OAI
section DouglasLipschitzBase
noncomputable section
section FullBoundaryCombinedLayer
section SingularLayer
namespace ReciprocalKernel
open Matrix Filter Topology
open scoped BigOperators
variable {ΞΉ : Type*} [Fintype ΞΉ]
def pairing (A : Matrix ΞΉ ΞΉ β) (x y : ΞΉ β β) : β := x β¬α΅₯ A *α΅₯ y
lemma pairing_symm {A : Matrix ΞΉ ΞΉ β} (hA : A.IsSymm) (x y : ΞΉ β β) :
pairing A x y = pairing A y x := by
simpa only [pairing, hA.eq] using Matrix.dotProduct_transpose_mulVec A x y
lemma pairing_sub_smul (A : Matrix ΞΉ ΞΉ β) (x y : ΞΉ β β) (t : β) :
pairing A (y - t β’ x) (y - t β’ x) =
pairing A y y - t * pairing A y x - t * pairing A x y + t ^ 2 * pairing A x x := by
simp only [pairing, Matrix.mulVec_sub, Matrix.mulVec_smul, sub_dotProduct,
dotProduct_sub, dotProduct_smul, smul_dotProduct, smul_eq_mul]
ring
lemma pairing_sub_smul_right (A : Matrix ΞΉ ΞΉ β) (x y z : ΞΉ β β) (t : β) :
pairing A x (y - t β’ z) = pairing A x y - t * pairing A x z := by
simp only [pairing, Matrix.mulVec_sub, Matrix.mulVec_smul, dotProduct_sub,
dotProduct_smul, smul_eq_mul]
lemma pairing_add_smul_right (A : Matrix ΞΉ ΞΉ β) (x y z : ΞΉ β β) (t : β) :
pairing A x (y + t β’ z) = pairing A x y + t * pairing A x z := by
simp only [pairing, Matrix.mulVec_add, Matrix.mulVec_smul, dotProduct_add,
dotProduct_smul, smul_eq_mul]
lemma pairing_add_smul (A : Matrix ΞΉ ΞΉ β) (x y : ΞΉ β β) (t : β) :
pairing A (y + t β’ x) (y + t β’ x) =
pairing A y y + t * pairing A y x + t * pairing A x y + t ^ 2 * pairing A x x := by
simp only [pairing, Matrix.mulVec_add, Matrix.mulVec_smul, add_dotProduct,
dotProduct_add, dotProduct_smul, smul_dotProduct, smul_eq_mul]
ring
lemma pairing_tendsto {A : β β Matrix ΞΉ ΞΉ β} {B : Matrix ΞΉ ΞΉ β}
(hlim : β i j, Tendsto (fun n => A n i j) atTop (π (B i j))) (x y : ΞΉ β β) :
Tendsto (fun n => pairing (A n) x y) atTop (π (pairing B x y)) := by
unfold pairing dotProduct Matrix.mulVec
exact tendsto_finsetSum _ (fun i _ => tendsto_const_nhds.mul
(tendsto_finsetSum _ fun j _ => (hlim i j).mul tendsto_const_nhds))
def OnePositiveSquare (A : Matrix ΞΉ ΞΉ β) : Prop :=
A.IsSymm β§ β x y : ΞΉ β β, 0 < pairing A x x β pairing A x y = 0 β pairing A y y β€ 0
lemma onePositiveSquare_reverse_cauchy {A : Matrix ΞΉ ΞΉ β} (hA : OnePositiveSquare A)
(x y : ΞΉ β β) (hx : 0 < pairing A x x) :
pairing A x x * pairing A y y β€ (pairing A x y) ^ 2 := by
have hz : pairing A x (y - (pairing A x y / pairing A x x) β’ x) = 0 := by
rw [pairing_sub_smul_right]
field_simp
ring
have hn := hA.2 x _ hx hz
rw [pairing_sub_smul, pairing_symm hA.1 y x] at hn
have he : pairing A y y - (pairing A x y / pairing A x x) * pairing A x y -
(pairing A x y / pairing A x x) * pairing A x y +
(pairing A x y / pairing A x x) ^ 2 * pairing A x x =
pairing A y y - (pairing A x y) ^ 2 / pairing A x x := by
field_simp
ring
rw [he] at hn
have := (le_div_iffβ hx).mp (sub_nonpos.mp hn)
nlinarith
lemma onePositiveSquare_of_entrywise_tendsto {A : β β Matrix ΞΉ ΞΉ β}
{B : Matrix ΞΉ ΞΉ β} (hA : β n, OnePositiveSquare (A n))
(hlim : β i j, Tendsto (fun n => A n i j) atTop (π (B i j))) :
OnePositiveSquare B := by
refine β¨?_, ?_β©
Β· ext i j
exact tendsto_nhds_unique (hlim j i)
((hlim i j).congr fun n => (hA n).1.apply i j |>.symm)
Β· intro x y hx hxy
have hxx := pairing_tendsto hlim x x
have hyy := pairing_tendsto hlim y y
have hxy' := pairing_tendsto hlim x y
have hp : βαΆ n in atTop, 0 < pairing (A n) x x :=
hxx.eventually_const_lt hx
have hn : pairing B x x * pairing B y y - (pairing B x y) ^ 2 β€ 0 := by
apply le_of_tendsto ((hxx.mul hyy).sub (hxy'.pow 2))
filter_upwards [hp] with n hn
exact sub_nonpos.mpr (onePositiveSquare_reverse_cauchy (hA n) x y hn)
rw [hxy] at hn
nlinarith
lemma onePositiveSquare_isotropic_hyperplane {A : Matrix ΞΉ ΞΉ β}
(hA : OnePositiveSquare A) (z : ΞΉ β β) (hz : pairing A z z = 0)
(hnonradical : β y, pairing A z y β 0) :
β x, pairing A z x = 0 β pairing A x x β€ 0 := by
intro x hzx
by_contra hx
have hx : 0 < pairing A x x := lt_of_not_ge hx
obtain β¨y, hyβ© := hnonradical
have hxz : pairing A x z = 0 := (pairing_symm hA.1 x z).trans hzx
let t := ((pairing A x y) ^ 2 / pairing A x x - pairing A y y + 1) /
(2 * pairing A z y)
have hn := onePositiveSquare_reverse_cauchy hA x (y + t β’ z) hx
rw [pairing_add_smul, pairing_add_smul_right, hz, hxz,
pairing_symm hA.1 y z] at hn
dsimp [t] at hn
have he : pairing A y y +
(((pairing A x y) ^ 2 / pairing A x x - pairing A y y + 1) /
(2 * pairing A z y)) * pairing A z y +
(((pairing A x y) ^ 2 / pairing A x x - pairing A y y + 1) /
(2 * pairing A z y)) * pairing A z y =
(pairing A x y) ^ 2 / pairing A x x + 1 := by
field_simp
ring
simp only [mul_zero, add_zero] at hn
rw [he] at hn
have he' : pairing A x x * ((pairing A x y) ^ 2 / pairing A x x + 1) =
(pairing A x y) ^ 2 + pairing A x x := by
field_simp
rw [he'] at hn
linarith
lemma onePositiveSquare_of_nonpos_on_kernel {A : Matrix ΞΉ ΞΉ β}
(hA : A.IsSymm) (l : ΞΉ β β)
(h : β x : ΞΉ β β, l β¬α΅₯ x = 0 β pairing A x x β€ 0) :
OnePositiveSquare A := by
refine β¨hA, ?_β©
intro x y hx hxy
have hlx : l β¬α΅₯ x β 0 := by
intro he
exact (not_le_of_gt hx) (h x he)
have hyx : pairing A y x = 0 := (pairing_symm hA y x).trans hxy
have hz : l β¬α΅₯ (y - ((l β¬α΅₯ y) / (l β¬α΅₯ x)) β’ x) = 0 := by
simp only [dotProduct_sub, dotProduct_smul, smul_eq_mul]
field_simp
ring
have hh := h _ hz
rw [pairing_sub_smul, hxy, hyx] at hh
nlinarith [sq_nonneg ((l β¬α΅₯ y) / (l β¬α΅₯ x))]
lemma onePositiveSquare_rankOne_sub_psd (l : ΞΉ β β) {U : Matrix ΞΉ ΞΉ β}
(hU : U.PosSemidef) :
OnePositiveSquare (Matrix.vecMulVec l l - U) := by
apply onePositiveSquare_of_nonpos_on_kernel (l := l)
Β· apply Matrix.isHermitian_iff_isSymm.mp
exact (Matrix.posSemidef_vecMulVec_self_star l |>.isHermitian).sub hU.isHermitian
Β· intro x hx
have hnon := hU.dotProduct_mulVec_nonneg x
simp only [star_trivial] at hnon
simp [pairing, Matrix.sub_mulVec, Matrix.vecMulVec_mulVec, hx, hnon]
lemma pairing_const (a : β) (x y : ΞΉ β β) :
pairing (Matrix.of (fun _ _ => a)) x y = a * (β i, x i) * (β j, y j) := by
simp only [pairing, Matrix.mulVec, dotProduct, Matrix.of_apply]
simp_rw [β Finset.mul_sum, β Finset.sum_mul]
ring
lemma pairing_scale (A : Matrix ΞΉ ΞΉ β) (l x y : ΞΉ β β) :
pairing (Matrix.of (fun i j => l i * A i j * l j)) x y =
pairing A (l * x) (l * y) := by
simp only [pairing, Matrix.mulVec, dotProduct, Matrix.of_apply, Pi.mul_apply,
Finset.mul_sum]
apply Finset.sum_congr rfl
intro i _
apply Finset.sum_congr rfl
intro j _
ring
lemma onePositiveSquare_scale {A : Matrix ΞΉ ΞΉ β} (hA : OnePositiveSquare A)
(l : ΞΉ β β) :
OnePositiveSquare (Matrix.of (fun i j => l i * A i j * l j)) := by
refine β¨?_, ?_β©
Β· ext i j
simp only [Matrix.transpose_apply, Matrix.of_apply]
rw [hA.1.apply]
ring
Β· intro x y hx hxy
rw [pairing_scale] at hx hxy β’
exact hA.2 _ _ hx hxy
lemma onePositiveSquare_const_sub_psd (a : β) {U : Matrix ΞΉ ΞΉ β}
(hU : U.PosSemidef) :
OnePositiveSquare (Matrix.of (fun _ _ => a) - U) := by
apply onePositiveSquare_of_nonpos_on_kernel (l := fun _ => 1)
Β· ext i j
simp only [Matrix.transpose_apply, Matrix.sub_apply, Matrix.of_apply]
have hij : U j i = U i j := by simpa using hU.isHermitian.apply i j
rw [hij]
Β· intro x hx
have hsum : β i, x i = 0 := by simpa [dotProduct] using hx
have hn := hU.dotProduct_mulVec_nonneg x
simp only [star_trivial] at hn
change pairing (Matrix.of (fun _ _ => a) - U) x x β€ 0
change x β¬α΅₯ (Matrix.of (fun _ _ => a) - U) *α΅₯ x β€ 0
rw [Matrix.sub_mulVec, dotProduct_sub]
change pairing (Matrix.of (fun _ _ => a)) x x - pairing U x x β€ 0
rw [pairing_const, hsum]
simpa only [pairing, mul_zero, zero_sub, neg_nonpos] using hn
lemma normalized_complement_posSemidef {H : Matrix ΞΉ ΞΉ β}
(hH : OnePositiveSquare H) (z : ΞΉ) {a : β} (ha : 0 < a)
(hrow : β j, H z j = a) :
(Matrix.of (fun _ _ => a) - H).PosSemidef := by
classical
have hpair (v : ΞΉ β β) : pairing H (Pi.single z 1) v = a * β i, v i := by
unfold pairing
rw [single_dotProduct, one_mul]
change (β j, H z j * v j) = a * β i, v i
simp only [hrow, Finset.mul_sum]
have he : pairing H (Pi.single z 1) (Pi.single z 1) = a := by
simp [hpair]
apply Matrix.PosSemidef.of_dotProduct_mulVec_nonneg
Β· apply Matrix.isHermitian_iff_isSymm.mpr
apply Matrix.ext
intro i j
simp only [Matrix.transpose_apply, Matrix.sub_apply, Matrix.of_apply]
rw [hH.1.apply]
Β· intro v
have hz : pairing H (Pi.single z 1) (v - (β i, v i) β’ Pi.single z 1) = 0 := by
rw [hpair]
simp only [Pi.sub_apply, Pi.smul_apply, smul_eq_mul, Finset.sum_sub_distrib,
β Finset.mul_sum]
simp
have hyn := hH.2 (Pi.single z 1) _ (he βΈ ha) hz
rw [pairing_sub_smul, he, hpair, pairing_symm hH.1 v (Pi.single z 1), hpair] at hyn
have heval : star v β¬α΅₯ (Matrix.of (fun _ _ => a) - H) *α΅₯ v =
a * (β i, v i) ^ 2 - pairing H v v := by
simp only [star_trivial, Matrix.sub_mulVec, dotProduct_sub]
change pairing (Matrix.of (fun _ _ => a)) v v - pairing H v v = _
rw [pairing_const]
ring
rw [heval]
nlinarith
omit [Fintype ΞΉ] in
lemma posSemidef_entry_sq_le {U : Matrix ΞΉ ΞΉ β} (hU : U.PosSemidef) (i j : ΞΉ) :
(U i j) ^ 2 β€ U i i * U j j := by
have h := (hU.submatrix ![i, j]).det_nonneg
simp only [Matrix.det_fin_two, Matrix.submatrix_apply, Matrix.cons_val_zero,
Matrix.cons_val_one, Matrix.cons_val_fin_one] at h
have hij : U j i = U i j := by simpa using hU.isHermitian.apply i j
rw [hij] at h
nlinarith
omit [Fintype ΞΉ] in
lemma posSemidef_abs_entry_lt {U : Matrix ΞΉ ΞΉ β} (hU : U.PosSemidef)
{a : β} (ha : 0 < a) (hdiag : β i, U i i < a) (i j : ΞΉ) : |U i j| < a := by
have hp : U i i * U j j < a * a := calc
U i i * U j j β€ U i i * a :=
mul_le_mul_of_nonneg_left (hdiag j).le hU.diag_nonneg
_ < a * a := mul_lt_mul_of_pos_right (hdiag i) ha
have hs := posSemidef_entry_sq_le hU i j
nlinarith [sq_abs (U i j), abs_nonneg (U i j)]
lemma posSemidef_entry_pow {A : Matrix ΞΉ ΞΉ β} (hA : A.PosSemidef) (n : β) :
(Matrix.of (fun i j => A i j ^ n)).PosSemidef := by
induction n with
| zero =>
simpa [Matrix.vecMulVec] using
(Matrix.posSemidef_vecMulVec_self_star (fun _ : ΞΉ => (1 : β)))
| succ n ih =>
have he : Matrix.of (fun i j => A i j ^ (n + 1)) =
Matrix.of (fun i j => A i j ^ n) β A := by
ext i j
simp [pow_succ]
rw [he]
exact ih.hadamard hA
lemma posSemidef_of_entrywise_tendsto {A : β β Matrix ΞΉ ΞΉ β} {B : Matrix ΞΉ ΞΉ β}
(hA : β n, (A n).PosSemidef)
(hlim : β i j, Tendsto (fun n => A n i j) atTop (π (B i j))) : B.PosSemidef := by
apply Matrix.PosSemidef.of_dotProduct_mulVec_nonneg
Β· apply Matrix.isHermitian_iff_isSymm.mpr
ext i j
exact tendsto_nhds_unique (hlim j i)
((hlim i j).congr fun n => by simpa using (hA n).isHermitian.apply j i)
Β· intro x
have hlimq : Tendsto (fun n => star x β¬α΅₯ A n *α΅₯ x) atTop
(π (star x β¬α΅₯ B *α΅₯ x)) := by
unfold dotProduct Matrix.mulVec
exact tendsto_finsetSum _ (fun i _ => tendsto_const_nhds.mul
(tendsto_finsetSum _ fun j _ => (hlim i j).mul tendsto_const_nhds))
exact ge_of_tendsto hlimq (Filter.Eventually.of_forall fun n =>
(hA n).dotProduct_mulVec_nonneg x)
lemma posSemidef_entry_resolvent {A : Matrix ΞΉ ΞΉ β} (hA : A.PosSemidef)
(hsmall : β i j, |A i j| < 1) :
(Matrix.of (fun i j => A i j / (1 - A i j))).PosSemidef := by
apply posSemidef_of_entrywise_tendsto
(A := fun n => β k β Finset.range n, Matrix.of (fun i j => A i j ^ (k + 1)))
Β· intro n
exact Matrix.posSemidef_sum _ (fun k _ => posSemidef_entry_pow hA (k + 1))
Β· intro i j
have hs := (hasSum_geometric_of_norm_lt_one (show βA i jβ < 1 by
simpa only [Real.norm_eq_abs] using hsmall i j)).mul_left (A i j)
simpa only [Matrix.sum_apply, Matrix.of_apply, div_eq_mul_inv, pow_succ, mul_comm]
using hs.tendsto_sum_nat
lemma onePositiveSquare_normalized_update {H : Matrix ΞΉ ΞΉ β}
(hH : OnePositiveSquare H) (hpos : β i j, 0 < H i j)
(z : ΞΉ) {a : β} (hrow : β j, H z j = a) {c : β} (hc : 0 β€ c) :
OnePositiveSquare (Matrix.of (fun i j => H i j / (1 + c * H i j))) := by
rcases hc.eq_or_lt with hc | hc
Β· subst c
have he : Matrix.of (fun i j => H i j / (1 + 0 * H i j)) = H := by
ext i j
simp
rwa [he]
have ha : 0 < a := hrow z βΈ hpos z z
let U := Matrix.of (fun _ _ => a) - H
have hU : U.PosSemidef := normalized_complement_posSemidef hH z ha hrow
have hdiag : β i, U i i < a := by
intro i
change a - H i i < a
exact sub_lt_self _ (hpos i i)
have hUa : β i j, |U i j| < a := posSemidef_abs_entry_lt hU ha hdiag
have hd : 0 < 1 + c * a := by positivity
let r := c / (1 + c * a)
have hr : 0 < r := div_pos hc hd
let V := r β’ U
have hV : V.PosSemidef := hU.smul hr.le
have hra : r * a < 1 := by
dsimp [r]
rw [div_mul_eq_mul_div, div_lt_iffβ hd]
linarith
have hsmall : β i j, |V i j| < 1 := by
intro i j
change |r * U i j| < 1
rw [abs_mul, abs_of_pos hr]
exact (mul_lt_mul_of_pos_left (hUa i j) hr).trans hra
have hW := (posSemidef_entry_resolvent hV hsmall).smul
(show 0 β€ (1 / (c * (1 + c * a)) : β) by positivity)
have hP := onePositiveSquare_const_sub_psd (a / (1 + c * a)) hW
have he : Matrix.of (fun i j => H i j / (1 + c * H i j)) =
Matrix.of (fun _ _ => a / (1 + c * a)) -
(1 / (c * (1 + c * a))) β’ Matrix.of (fun i j => V i j / (1 - V i j)) := by
ext i j
have hij := hpos i j
have hden : 0 < 1 + c * H i j := by positivity
have hone : 1 - V i j β 0 := ne_of_gt (sub_pos.mpr (abs_lt.mp (hsmall i j)).2)
simp only [Matrix.of_apply, Matrix.sub_apply, Matrix.smul_apply, smul_eq_mul]
dsimp [V, U, r] at hone β’
field_simp [ne_of_gt hden, ne_of_gt hd, ne_of_gt hc]
ring_nf
field_simp [show 1 + H i j * c β 0 by nlinarith [hden]]
ring
rw [he]
exact hP
theorem reciprocal_rankOne_update {M : Matrix ΞΉ ΞΉ β} (hM : M.IsSymm)
(hpos : β i j, 0 < M i j)
(hrec : OnePositiveSquare (Matrix.of (fun i j => (M i j)β»ΒΉ)))
(z : ΞΉ) {c : β} (hc : 0 β€ c) :
OnePositiveSquare (Matrix.of (fun i j => (M i j + c * M i z * M z j)β»ΒΉ)) := by
let H := Matrix.of (fun i j => M i z * (M i j)β»ΒΉ * M j z)
have hH : OnePositiveSquare H := onePositiveSquare_scale hrec (fun i => M i z)
have hHp : β i j, 0 < H i j := by
intro i j
change 0 < M i z * (M i j)β»ΒΉ * M j z
exact mul_pos (mul_pos (hpos i z) (inv_pos.mpr (hpos i j))) (hpos j z)
have hrow : β j, H z j = M z z := by
intro j
change M z z * (M z j)β»ΒΉ * M j z = M z z
rw [hM.apply j z]
field_simp [ne_of_gt (hpos j z)]
have hnew := onePositiveSquare_normalized_update hH hHp z hrow hc
have hscaled := onePositiveSquare_scale hnew (fun i => (M i z)β»ΒΉ)
have he : Matrix.of (fun i j => (M i j + c * M i z * M z j)β»ΒΉ) =
Matrix.of (fun i j => (M i z)β»ΒΉ * (H i j / (1 + c * H i j)) * (M j z)β»ΒΉ) := by
ext i j
have hij := hpos i j
have hiz := hpos i z
have hjz := hpos j z
have hn : 0 < M i j + c * M i z * M j z := by positivity
simp only [Matrix.of_apply]
dsimp [H]
rw [hM.apply z j]
have hzj := hpos z j
have hn' : 0 < M i j + c * M i z * M z j := by positivity
field_simp [ne_of_gt hzj, ne_of_gt hn']
rw [he]
exact hscaled
def bordered (B : Matrix ΞΉ ΞΉ β) (l : ΞΉ β β) : Matrix (ΞΉ β Unit) (ΞΉ β Unit) β :=
Matrix.fromBlocks B (Matrix.of (fun i _ => l i)) (Matrix.of (fun _ j => l j)) 0
lemma pairing_bordered (B : Matrix ΞΉ ΞΉ β) (l x y : ΞΉ β β) (a b : β) :
pairing (bordered B l) (Sum.elim x (fun _ => a)) (Sum.elim y (fun _ => b)) =
pairing B x y + b * (l β¬α΅₯ x) + a * (l β¬α΅₯ y) := by
simp only [pairing, bordered, Matrix.mulVec, dotProduct, Fintype.sum_sum_type,
Matrix.fromBlocks_applyββ, Matrix.fromBlocks_applyββ, Matrix.fromBlocks_applyββ,
Matrix.fromBlocks_applyββ, Matrix.of_apply, Matrix.zero_apply,
Sum.elim_inl, Sum.elim_inr, Fintype.sum_unique, zero_mul,
mul_add, Finset.sum_add_distrib]
ring_nf
congr 1
rw [Finset.mul_sum]
apply Finset.sum_congr rfl
intro i _
ring
lemma bordered_nonpos_on_kernel {B : Matrix ΞΉ ΞΉ β} {l : ΞΉ β β}
(hB : OnePositiveSquare (bordered B l)) (hl : l β 0) :
β x, l β¬α΅₯ x = 0 β pairing B x x β€ 0 := by
classical
have hz : pairing (bordered B l) (Sum.elim 0 (fun _ => 1))
(Sum.elim 0 (fun _ => 1)) = 0 := by
rw [pairing_bordered]
simp [pairing]
have hrad : β y, pairing (bordered B l) (Sum.elim 0 (fun _ => 1)) y β 0 := by
obtain β¨i, hiβ© := Function.ne_iff.mp hl
refine β¨Sum.elim (Pi.single i 1) (fun _ => 0), ?_β©
rw [pairing_bordered]
simpa [pairing] using hi
have hn := onePositiveSquare_isotropic_hyperplane hB _ hz hrad
intro x hx
have horth : pairing (bordered B l) (Sum.elim 0 (fun _ => 1))
(Sum.elim x (fun _ => 0)) = 0 := by
rw [pairing_bordered]
simp [pairing, hx]
have hh := hn _ horth
simpa [pairing_bordered] using hh
def ConditionallyNegative (D : Matrix ΞΉ ΞΉ β) : Prop :=
D.IsSymm β§ β x : ΞΉ β β, (β i, x i) = 0 β pairing D x x β€ 0
theorem conditionalNegative_scaled_of_bordered {B : Matrix ΞΉ ΞΉ β} (k : ΞΉ β β)
(hk : β i, k i β 0)
(hB : OnePositiveSquare (bordered B (fun i => (k i)β»ΒΉ))) :
ConditionallyNegative (Matrix.of (fun i j => k i * B i j * k j)) := by
have hsym : B.IsSymm := by
ext i j
exact hB.1.apply (Sum.inl i) (Sum.inl j)
refine β¨?_, ?_β©
Β· ext i j
simp only [Matrix.transpose_apply, Matrix.of_apply]
rw [hsym.apply]
ring
Β· intro x hx
rw [pairing_scale]
by_cases hi : IsEmpty ΞΉ
Β· simp [pairing, dotProduct]
Β· have : Nonempty ΞΉ := not_isEmpty_iff.mp hi
have hl : (fun i => (k i)β»ΒΉ) β 0 := by
intro he
obtain β¨iβ© := βΉNonempty ΞΉβΊ
have := congrFun he i
exact (inv_ne_zero (hk i)) this
apply bordered_nonpos_on_kernel hB hl
simpa [dotProduct, hk] using hx
end ReciprocalKernel
namespace ReciprocalKernel
open Matrix
open scoped BigOperators
variable {ΞΉ : Type*} [Fintype ΞΉ] [DecidableEq ΞΉ]
def eliminate (M : Matrix ΞΉ ΞΉ β) (w : ΞΉ β β) (z : ΞΉ) : Matrix ΞΉ ΞΉ β :=
Matrix.of fun i j => M i j + (w z / (1 - w z * M z z)) * M i z * M z j
omit [Fintype ΞΉ] [DecidableEq ΞΉ] in
lemma eliminate_denominator_pos {M : Matrix ΞΉ ΞΉ β} {w f : ΞΉ β β}
(hM : β i j, 0 < M i j) (hw : β i, 0 β€ w i) (hf : β i, 0 < f i)
{S : Finset ΞΉ} {z : ΞΉ} (hz : z β S)
(hb : β i, β j β S, M i j * w j * f j < f i) :
0 < 1 - w z * M z z := by
have hs : M z z * w z * f z β€ β j β S, M z j * w j * f j :=
Finset.single_le_sum (f := fun j => M z j * w j * f j)
(fun i hi => mul_nonneg (mul_nonneg (hM z i).le (hw i)) (hf i).le) hz
have hh := lt_of_le_of_lt hs (hb z)
nlinarith [hf z]
omit [Fintype ΞΉ] [DecidableEq ΞΉ] in
lemma eliminate_symm {M : Matrix ΞΉ ΞΉ β} (hM : M.IsSymm) (w : ΞΉ β β) (z : ΞΉ) :
(eliminate M w z).IsSymm := by
ext i j
simp only [eliminate, Matrix.transpose_apply, Matrix.of_apply]
rw [hM.apply j i, hM.apply j z, hM.apply z i]
ring
omit [Fintype ΞΉ] [DecidableEq ΞΉ] in
lemma eliminate_pos {M : Matrix ΞΉ ΞΉ β} {w : ΞΉ β β} {z : ΞΉ}
(hM : β i j, 0 < M i j) (hw : 0 β€ w z) (hz : 0 < 1 - w z * M z z) :
β i j, 0 < eliminate M w z i j := by
intro i j
dsimp [eliminate]
exact add_pos_of_pos_of_nonneg (hM i j)
(mul_nonneg (mul_nonneg (div_nonneg hw hz.le) (hM i z).le) (hM z j).le)
omit [Fintype ΞΉ] in
lemma eliminate_bound {M : Matrix ΞΉ ΞΉ β} {w f : ΞΉ β β}
(hM : β i j, 0 < M i j) (hw : β i, 0 β€ w i) (hf : β i, 0 < f i)
{S : Finset ΞΉ} {z : ΞΉ} (hz : z β S)
(hb : β i, β j β insert z S, M i j * w j * f j < f i) :
β i, β j β S, eliminate M w z i j * w j * f j < f i := by
have hd := eliminate_denominator_pos hM hw hf (Finset.mem_insert_self z S) hb
have hc : 0 β€ w z / (1 - w z * M z z) := div_nonneg (hw z) hd.le
have hb' : β i, M i z * w z * f z + β j β S, M i j * w j * f j < f i := by
simpa only [Finset.sum_insert hz] using hb
intro i
have he : (β j β S, eliminate M w z i j * w j * f j) =
(β j β S, M i j * w j * f j) +
(w z / (1 - w z * M z z)) * M i z * (β j β S, M z j * w j * f j) := by
simp only [eliminate, Matrix.of_apply, add_mul, Finset.sum_add_distrib,
Finset.mul_sum]
congr 1
apply Finset.sum_congr rfl
intro j hj
ring
rw [he]
have hz' : β j β S, M z j * w j * f j β€ (1 - w z * M z z) * f z := by
linarith [hb' z]
have hmul := mul_le_mul_of_nonneg_left hz' (mul_nonneg hc (hM i z).le)
have he' : w z / (1 - w z * M z z) * M i z * ((1 - w z * M z z) * f z) =
M i z * w z * f z := by field_simp
rw [he'] at hmul
linarith [hb' i]
omit [DecidableEq ΞΉ] in
lemma eliminate_reciprocal {M : Matrix ΞΉ ΞΉ β} {w : ΞΉ β β} {z : ΞΉ}
(hM : M.IsSymm) (hp : β i j, 0 < M i j)
(hP : OnePositiveSquare (Matrix.of fun i j => (M i j)β»ΒΉ))
(hw : 0 β€ w z) (hd : 0 < 1 - w z * M z z) :
OnePositiveSquare (Matrix.of fun i j => (eliminate M w z i j)β»ΒΉ) :=
reciprocal_rankOne_update hM hp hP z (div_nonneg hw hd.le)
theorem finite_resolvent_of_superharmonic {M : Matrix ΞΉ ΞΉ β} {w f : ΞΉ β β}
(hM : M.IsSymm) (hp : β i j, 0 < M i j)
(hP : OnePositiveSquare (Matrix.of fun i j => (M i j)β»ΒΉ))
(hw : β i, 0 β€ w i) (hf : β i, 0 < f i)
(S : Finset ΞΉ) (hb : β i, β j β S, M i j * w j * f j < f i) :
β R : Matrix ΞΉ ΞΉ β, R.IsSymm β§ (β i j, 0 < R i j) β§
OnePositiveSquare (Matrix.of fun i j => (R i j)β»ΒΉ) β§
β i j, R i j = M i j + β k β S, M i k * w k * R k j := by
induction S using Finset.induction_on generalizing M with
| empty => exact β¨M, hM, hp, hP, by simpβ©
| @insert z S hz ih =>
have hd := eliminate_denominator_pos hp hw hf (Finset.mem_insert_self z S) hb
obtain β¨R, hRs, hRp, hRP, hReqβ© := ih (eliminate_symm hM w z)
(eliminate_pos hp (hw z) hd) (eliminate_reciprocal hM hp hP (hw z) hd)
(eliminate_bound hp hw hf hz hb)
refine β¨R, hRs, hRp, hRP, ?_β©
have heq (i j) : R i j = M i j + (β k β S, M i k * w k * R k j) +
(w z / (1 - w z * M z z)) * M i z *
(M z j + β k β S, M z k * w k * R k j) := by
rw [hReq i j]
simp only [eliminate, Matrix.of_apply, add_mul, Finset.sum_add_distrib,
Finset.mul_sum, mul_add]
ring_nf
have hez (j) : (1 - w z * M z z) * R z j =
M z j + β k β S, M z k * w k * R k j := by
have hh := heq z j
field_simp at hh
nlinarith
intro i j
rw [Finset.sum_insert hz, heq i j, β hez j]
field_simp
ring
open scoped Matrix.Norms.L2Operator
lemma matrix_geometric_nonneg {T : Matrix ΞΉ ΞΉ β}
(hT : β i j, 0 β€ T i j) (hn : βTβ < 1) :
β i j, 0 β€ (β' n : β, T ^ n) i j := by
intro i j
have hs := summable_geometric_of_norm_lt_one hn
have ht := ((continuous_id.matrix_elem i j).tendsto (β' n : β, T ^ n)).comp hs.hasSum
apply ge_of_tendsto ht
filter_upwards [] with S
change 0 β€ (β n β S, T ^ n) i j
rw [Matrix.sum_apply]
exact Finset.sum_nonneg fun n _ => Matrix.pow_apply_nonneg hT n i j
lemma exists_superharmonic_of_weighted_norm_lt_one {M : Matrix ΞΉ ΞΉ β} {w : ΞΉ β β}
(hM : β i j, 0 β€ M i j) (hw : β i, 0 β€ w i)
(hn : βMatrix.diagonal (fun i => Real.sqrt (w i)) * M *
Matrix.diagonal (fun i => Real.sqrt (w i))β < 1) :
β f : ΞΉ β β, (β i, 0 < f i) β§
β i, β j, M i j * w j * f j < f i := by
let D : Matrix ΞΉ ΞΉ β := Matrix.diagonal (fun i => Real.sqrt (w i))
let N : Matrix ΞΉ ΞΉ β := M * D
let T : Matrix ΞΉ ΞΉ β := D * N
let B : Matrix ΞΉ ΞΉ β := β' n : β, T ^ n
let Q : Matrix ΞΉ ΞΉ β := N * B * D
have hnorm : βTβ < 1 := by simpa only [T, N, Matrix.mul_assoc] using hn
have hT : β i j, 0 β€ T i j := by
intro i j
simp only [T, N, D, Matrix.diagonal_mul, Matrix.mul_diagonal]
exact mul_nonneg (Real.sqrt_nonneg _)
(mul_nonneg (hM i j) (Real.sqrt_nonneg _))
have hB := matrix_geometric_nonneg hT hnorm
have hQ : β i j, 0 β€ Q i j := by
intro i j
simp only [Q, D, Matrix.mul_diagonal]
rw [Matrix.mul_apply]
simp only [N, D, Matrix.mul_diagonal]
apply mul_nonneg _ (Real.sqrt_nonneg _)
apply Finset.sum_nonneg
intro k hk
exact mul_nonneg (mul_nonneg (hM i k) (Real.sqrt_nonneg _)) (hB k j)
have hB' : (1 : Matrix ΞΉ ΞΉ β) + T * B = B := by
have hh := mul_neg_geom_series T hnorm
change (1 - T) * B = 1 at hh
rw [sub_mul, one_mul] at hh
exact (sub_eq_iff_eq_add.mp hh).symm
have hD : D * D = Matrix.diagonal w := by
dsimp [D]
rw [Matrix.diagonal_mul_diagonal]
congr 1
funext i
exact Real.mul_self_sqrt (hw i)
have hA : (M * Matrix.diagonal w) * (1 + Q) = Q := by
rw [β hD]
change (M * (D * D)) * (1 + N * B * D) = N * B * D
calc
_ = N * (1 + T * B) * D := by dsimp [N, T]; noncomm_ring
_ = _ := by rw [hB']
let f : ΞΉ β β := (1 + Q) *α΅₯ (fun _ => 1)
have hf (i) : f i = 1 + β j, Q i j := by
simp [f, Matrix.add_mulVec, Matrix.mulVec, dotProduct]
refine β¨f, ?_, ?_β©
Β· intro i
rw [hf]
have : 0 β€ β j, Q i j := Finset.sum_nonneg fun j _ => hQ i j
linarith
Β· intro i
have he := congrArg (fun A : Matrix ΞΉ ΞΉ β => (A *α΅₯ (fun _ => 1)) i) hA
change (((M * Matrix.diagonal w) * (1 + Q)) *α΅₯ (fun _ : ΞΉ => (1 : β))) i = _ at he
rw [β Matrix.mulVec_mulVec] at he
change ((M * Matrix.diagonal w) *α΅₯ f) i = _ at he
simp only [Matrix.mulVec, dotProduct, Matrix.mul_diagonal, mul_one] at he
rw [he, hf]
linarith
theorem finite_resolvent {M : Matrix ΞΉ ΞΉ β} {w : ΞΉ β β}
(hM : M.IsSymm) (hp : β i j, 0 < M i j)
(hP : OnePositiveSquare (Matrix.of fun i j => (M i j)β»ΒΉ))
(hw : β i, 0 β€ w i)
(hn : βMatrix.diagonal (fun i => Real.sqrt (w i)) * M *
Matrix.diagonal (fun i => Real.sqrt (w i))β < 1) :
β R : Matrix ΞΉ ΞΉ β, R.IsSymm β§ (β i j, 0 < R i j) β§
OnePositiveSquare (Matrix.of fun i j => (R i j)β»ΒΉ) β§
R = M + M * Matrix.diagonal w * R := by
obtain β¨f, hf, hbβ© := exists_superharmonic_of_weighted_norm_lt_one
(fun i j => (hp i j).le) hw hn
obtain β¨R, hRs, hRp, hRP, hReqβ© := finite_resolvent_of_superharmonic hM hp hP hw hf
Finset.univ (by simpa using hb)
refine β¨R, hRs, hRp, hRP, ?_β©
ext i j
change R i j = M i j + β k, (M * Matrix.diagonal w) i k * R k j
simp only [Matrix.mul_diagonal]
exact hReq i j
def finiteResolventKernel (M : Matrix ΞΉ ΞΉ β) (w : ΞΉ β β) : Matrix ΞΉ ΞΉ β :=
let D := Matrix.diagonal (fun i => Real.sqrt (w i))
M + M * D * (1 - D * M * D)β»ΒΉ * D * M
lemma resolvent_eq_finiteResolventKernel {M R : Matrix ΞΉ ΞΉ β} {w : ΞΉ β β}
(hw : β i, 0 β€ w i)
(hn : βMatrix.diagonal (fun i => Real.sqrt (w i)) * M *
Matrix.diagonal (fun i => Real.sqrt (w i))β < 1)
(hR : R = M + M * Matrix.diagonal w * R) :
R = finiteResolventKernel M w := by
let D : Matrix ΞΉ ΞΉ β := Matrix.diagonal (fun i => Real.sqrt (w i))
let N : Matrix ΞΉ ΞΉ β := M * D
let T : Matrix ΞΉ ΞΉ β := D * N
let B : Matrix ΞΉ ΞΉ β := (1 - T)β»ΒΉ
let U : Matrix ΞΉ ΞΉ β := 1 + N * B * D
have hnorm : βTβ < 1 := by simpa only [T, N, Matrix.mul_assoc] using hn
have hu : IsUnit (1 - T) := isUnit_one_sub_of_norm_lt_one hnorm
have hBinv : (1 - T) * B = 1 :=
Matrix.mul_nonsing_inv _ ((Matrix.isUnit_iff_isUnit_det _).mp hu)
have hD : D * D = Matrix.diagonal w := by
dsimp [D]
rw [Matrix.diagonal_mul_diagonal]
congr 1
funext i
exact Real.mul_self_sqrt (hw i)
have hA : M * Matrix.diagonal w = N * D := by rw [β hD]; exact (Matrix.mul_assoc ..).symm
have hKU : (1 - N * D) * U = 1 := by
calc
_ = 1 + N * ((1 - T) * B - 1) * D := by dsimp [U, T]; noncomm_ring
_ = 1 := by rw [hBinv, sub_self, mul_zero, zero_mul, add_zero]
have hUK : U * (1 - N * D) = 1 := mul_eq_one_comm.mp hKU
have hKR : (1 - N * D) * R = M := by
rw [sub_mul, one_mul]
rw [hA] at hR
exact sub_eq_iff_eq_add.mpr hR
calc
R = (U * (1 - N * D)) * R := by rw [hUK, one_mul]
_ = U * M := by rw [Matrix.mul_assoc, hKR]
_ = finiteResolventKernel M w := by
simp only [U, N, B, T, finiteResolventKernel, D]
noncomm_ring
theorem finite_quadrature_reciprocal {M : Matrix ΞΉ ΞΉ β} {w : ΞΉ β β}
(hM : M.IsSymm) (hp : β i j, 0 < M i j)
(hP : OnePositiveSquare (Matrix.of fun i j => (M i j)β»ΒΉ))
(hw : β i, 0 β€ w i)
(hn : βMatrix.diagonal (fun i => Real.sqrt (w i)) * M *
Matrix.diagonal (fun i => Real.sqrt (w i))β < 1) :
(β i j, 0 < finiteResolventKernel M w i j) β§
OnePositiveSquare (Matrix.of fun i j => (finiteResolventKernel M w i j)β»ΒΉ) := by
obtain β¨R, _, hpos, hrec, hReqβ© := finite_resolvent hM hp hP hw hn
rw [resolvent_eq_finiteResolventKernel hw hn hReq] at hpos hrec
exact β¨hpos, hrecβ©
end ReciprocalKernel
open Filter
open scoped Topology
namespace StrictHotSpots.BanachResolvent
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E]
def resolvent (A : E βL[β] E) : E βL[β] E := β' n : β, A ^ n
lemma resolvent_left (A : E βL[β] E) (hA : βAβ < 1) :
(1 - A) * resolvent A = 1 := mul_neg_geom_series A hA
lemma resolvent_right (A : E βL[β] E) (hA : βAβ < 1) :
resolvent A * (1 - A) = 1 := geom_series_mul_neg A hA
omit [CompleteSpace E] in
lemma resolvent_norm_le (A : E βL[β] E) {d : β} (hA : βAβ β€ d) (hd : d < 1) :
βresolvent Aβ β€ (1 - d)β»ΒΉ := by
have h := tsum_geometric_le_of_norm_lt_one A (hA.trans_lt hd)
have h1 : β(1 : E βL[β] E)β β€ 1 := ContinuousLinearMap.norm_id_le
have hi : (1 - βAβ)β»ΒΉ β€ (1 - d)β»ΒΉ := by
apply inv_antiβ (sub_pos.mpr hd)
linarith
dsimp only [resolvent]
linarith
lemma resolvent_identity (A B : E βL[β] E) (hA : βAβ < 1) (hB : βBβ < 1) :
resolvent B - resolvent A = resolvent B * (B - A) * resolvent A := by
have ht : B - A = (1 - A) - (1 - B) := by abel
rw [ht, mul_sub, sub_mul, mul_assoc, resolvent_left A hA,
resolvent_right B hB, mul_one, one_mul]
lemma resolvent_strong_tendsto (A : E βL[β] E) (Q : β β E βL[β] E)
{d : β} (hd : d < 1) (hA : βAβ < 1)
(hQ : βαΆ n in atTop, βQ nβ β€ d)
(hs : β v, Tendsto (fun n => Q n v) atTop (π (A v))) (v : E) :
Tendsto (fun n => resolvent (Q n) v) atTop (π (resolvent A v)) := by
rw [β tendsto_sub_nhds_zero_iff]
have hz : Tendsto (fun n => (1 - d)β»ΒΉ * β(Q n - A) (resolvent A v)β) atTop (π 0) := by
have ht := ((hs (resolvent A v)).sub (tendsto_const_nhds (x := A (resolvent A v)))).norm.const_mul (1 - d)β»ΒΉ
simpa using ht
apply squeeze_zero_norm' _ hz
filter_upwards [hQ] with n hn
have he := congrArg (fun T : E βL[β] E => T v)
(resolvent_identity A (Q n) hA (hn.trans_lt hd))
simp only [sub_apply, mul_apply_eq_comp] at he
rw [he]
exact (ContinuousLinearMap.le_opNorm _ _).trans
(mul_le_mul_of_nonneg_right (resolvent_norm_le (Q n) hn hd) (norm_nonneg _))
lemma resolvent_solution (A : E βL[β] E) (hA : βAβ < 1) {u f : E}
(hu : u - A u = f) : u = resolvent A f := by
have h := congrArg (fun T : E βL[β] E => T u) (resolvent_right A hA)
simpa only [mul_apply_eq_comp, sub_apply,
one_apply_eq_self, hu] using h.symm
lemma resolvent_nonneg [PartialOrder E] [IsOrderedAddMonoid E] [OrderClosedTopology E]
(A : E βL[β] E) (hA : βAβ < 1)
(hpos : β v, 0 β€ v β 0 β€ A v) {f : E} (hf : 0 β€ f) :
0 β€ resolvent A f := by
have ht : β n : β, 0 β€ (A^n) f := by
intro n
induction n with
| zero => simpa using hf
| succ n ih => simpa only [pow_succ', mul_apply_eq_comp] using hpos _ ih
have hs0 : HasSum (fun n : β => A^n) (resolvent A) :=
(summable_geometric_of_norm_lt_one hA).hasSum
have hs := (ContinuousLinearMap.apply β E f).hasSum hs0
change HasSum (fun n : β => (A^n) f) (resolvent A f) at hs
rw [β hs.tsum_eq]
exact tsum_nonneg ht
lemma resolvent_ge_self [PartialOrder E] [IsOrderedAddMonoid E] [OrderClosedTopology E]
(A : E βL[β] E) (hA : βAβ < 1)
(hpos : β v, 0 β€ v β 0 β€ A v) {f : E} (hf : 0 β€ f) :
f β€ resolvent A f := by
have h := congrArg (fun T : E βL[β] E => T f) (resolvent_left A hA)
simp only [mul_apply_eq_comp, sub_apply, one_apply_eq_self] at h
have hn := hpos _ (resolvent_nonneg A hA hpos hf)
calc
f = resolvent A f - A (resolvent A f) := h.symm
_ β€ resolvent A f := sub_le_self _ hn
end StrictHotSpots.BanachResolvent
open MeasureTheory Filter Set TopologicalSpace
open scoped Topology ENNReal
namespace StrictHotSpots.CompactKernel
variable {X : Type*} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (Ξ½ : Measure X) [IsFiniteMeasure Ξ½]
lemma kernel_integrable (C : C(X Γ X, β)) (f : C(X, β)) :
Integrable (fun z => f z β’ C.curry z) Ξ½ :=
(f.continuous.smul C.curry.continuous).integrable_of_hasCompactSupport
(HasCompactSupport.of_compactSpace _)
def kernelOp (C : C(X Γ X, β)) : C(X, β) βL[β] C(X, β) :=
LinearMap.mkContinuous
{ toFun := fun f => β« z, f z β’ C.curry z βΞ½
map_add' := by
intro f g
simp only [ContinuousMap.add_apply, add_smul]
exact integral_add (kernel_integrable Ξ½ C f) (kernel_integrable Ξ½ C g)
map_smul' := by
intro r f
simp only [ContinuousMap.smul_apply, smul_eq_mul, mul_smul]
exact integral_smul r _ }
(Ξ½.real univ * βCβ) (by
intro f
calc
ββ« z, f z β’ C.curry z βΞ½β β€ β« z, βf z β’ C.curry zβ βΞ½ := norm_integral_le_integral_norm _
_ β€ β« _ : X, βfβ * βCβ βΞ½ := by
apply integral_mono (kernel_integrable Ξ½ C f).norm (integrable_const _)
intro z
dsimp only
rw [norm_smul]
apply mul_le_mul (f.norm_coe_le_norm z) _ (norm_nonneg _) (norm_nonneg _)
exact (ContinuousMap.norm_le _ (norm_nonneg C)).mpr fun x => C.norm_coe_le_norm (z,x)
_ = Ξ½.real univ * βCβ * βfβ := by simp [integral_const]; ring)
lemma kernelOp_apply (C : C(X Γ X, β)) (f : C(X, β)) (x : X) :
kernelOp Ξ½ C f x = β« z, C (z,x) * f z βΞ½ := by
change (β« z, f z β’ C.curry z βΞ½) x = _
rw [ContinuousMap.integral_apply (kernel_integrable Ξ½ C f)]
simp only [ContinuousMap.smul_apply, smul_eq_mul, ContinuousMap.curry_apply, mul_comm]
lemma kernelOp_nonneg (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
{f : C(X, β)} (hf : 0 β€ f) : 0 β€ kernelOp Ξ½ C f := by
intro x
change 0 β€ kernelOp Ξ½ C f x
rw [kernelOp_apply]
exact integral_nonneg fun z => mul_nonneg (hC z x) (hf z)
lemma kernelOp_norm_le (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
{d : β} (hd : 0 β€ d) (hrow : β x, β« z, C (z,x) βΞ½ β€ d) :
βkernelOp Ξ½ Cβ β€ d := by
apply ContinuousLinearMap.opNorm_le_bound _ hd
intro f
apply (ContinuousMap.norm_le _ (mul_nonneg hd (norm_nonneg f))).mpr
intro x
rw [kernelOp_apply]
calc
ββ« z, C (z,x) * f z βΞ½β β€ β« z, βC (z,x) * f zβ βΞ½ := norm_integral_le_integral_norm _
_ β€ β« z, C (z,x) * βfβ βΞ½ := by
apply integral_mono
Β· exact ((C.continuous.comp (continuous_id.prodMk continuous_const)).mul f.continuous).norm.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)
Β· exact ((C.continuous.comp (continuous_id.prodMk continuous_const)).mul continuous_const).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)
Β· intro z
dsimp only
rw [norm_mul, Real.norm_of_nonneg (hC z x)]
exact mul_le_mul_of_nonneg_left (f.norm_coe_le_norm z) (hC z x)
_ = (β« z, C (z,x) βΞ½) * βfβ := integral_mul_const _ _
_ β€ d * βfβ := mul_le_mul_of_nonneg_right (hrow x) (norm_nonneg f)
omit [MetricSpace X] [CompactSpace X] [BorelSpace X] in
lemma integral_comp_simpleFunc {Y : Type*} {E : Type*} [NormedAddCommGroup E]
[NormedSpace β E] [CompleteSpace E] (Ο : SimpleFunc X Y) (F : Y β E) :
β« x, F (Ο x) βΞ½ = β y β Ο.range, Ξ½.real (Ο β»ΒΉ' {y}) β’ F y := by
classical
have he : (fun x => F (Ο x)) = fun x =>
β y β Ο.range, (Ο β»ΒΉ' {y}).indicator (fun _ => F y) x := by
funext x
simp [Set.indicator_apply, eq_comm]
rw [he, integral_finsetSum]
Β· apply Finset.sum_congr rfl
intro y hy
exact integral_indicator_const _ (Ο.measurableSet_fiber y)
Β· intro y hy
exact (integrable_const (F y)).indicator (Ο.measurableSet_fiber y)
def sampleOp (Ο : SimpleFunc X X) (C : C(X Γ X, β)) : C(X, β) βL[β] C(X, β) :=
β z β Ο.range, Ξ½.real (Ο β»ΒΉ' {z}) β’ (ContinuousMap.evalCLM β z).smulRight (C.curry z)
omit [BorelSpace X] in
lemma sampleOp_eq_integral (Ο : SimpleFunc X X) (C : C(X Γ X, β)) (f : C(X, β)) :
sampleOp Ξ½ Ο C f = β« z, f (Ο z) β’ C.curry (Ο z) βΞ½ := by
rw [integral_comp_simpleFunc Ξ½ Ο (fun z => f z β’ C.curry z)]
simp [sampleOp, sum_apply]
omit [BorelSpace X] [IsFiniteMeasure Ξ½] in
lemma sampleOp_apply (Ο : SimpleFunc X X) (C : C(X Γ X, β)) (f : C(X, β)) (x : X) :
sampleOp Ξ½ Ο C f x = β z β Ο.range, Ξ½.real (Ο β»ΒΉ' {z}) * C (z,x) * f z := by
simp only [sampleOp, sum_apply, smul_apply,
ContinuousMap.sum_apply, ContinuousMap.smul_apply, ContinuousLinearMap.smulRight_apply,
ContinuousMap.evalCLM_apply, ContinuousMap.curry_apply, smul_eq_mul]
apply Finset.sum_congr rfl
intro z hz
ring
omit [BorelSpace X] [IsFiniteMeasure Ξ½] in
lemma sampleOp_nonneg (Ο : SimpleFunc X X) (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
{f : C(X, β)} (hf : 0 β€ f) : 0 β€ sampleOp Ξ½ Ο C f := by
intro x
change 0 β€ sampleOp Ξ½ Ο C f x
rw [sampleOp_apply]
exact Finset.sum_nonneg fun z _ => mul_nonneg
(mul_nonneg (measureReal_nonneg) (hC z x)) (hf z)
omit [BorelSpace X] [IsFiniteMeasure Ξ½] in
lemma sampleOp_norm_le (Ο : SimpleFunc X X) (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
{d : β} (hd : 0 β€ d) (hrow : β x, sampleOp Ξ½ Ο C 1 x β€ d) :
βsampleOp Ξ½ Ο Cβ β€ d := by
apply ContinuousLinearMap.opNorm_le_bound _ hd
intro f
apply (ContinuousMap.norm_le _ (mul_nonneg hd (norm_nonneg f))).mpr
intro x
rw [sampleOp_apply]
calc
ββ z β Ο.range, Ξ½.real (Ο β»ΒΉ' {z}) * C (z,x) * f zβ β€
β z β Ο.range, βΞ½.real (Ο β»ΒΉ' {z}) * C (z,x) * f zβ := norm_sum_le _ _
_ β€ β z β Ο.range, Ξ½.real (Ο β»ΒΉ' {z}) * C (z,x) * βfβ := by
apply Finset.sum_le_sum
intro z hz
rw [norm_mul, Real.norm_of_nonneg (mul_nonneg measureReal_nonneg (hC z x))]
exact mul_le_mul_of_nonneg_left (f.norm_coe_le_norm z)
(mul_nonneg measureReal_nonneg (hC z x))
_ = sampleOp Ξ½ Ο C 1 x * βfβ := by simp [sampleOp_apply, Finset.sum_mul]
_ β€ d * βfβ := mul_le_mul_of_nonneg_right (hrow x) (norm_nonneg f)
variable [Nonempty X]
def quantize (n : β) : SimpleFunc X X := SimpleFunc.nearestPt (denseSeq X) n
lemma quantize_tendsto (x : X) : Tendsto (fun n => quantize (X := X) n x) atTop (π x) :=
SimpleFunc.tendsto_nearestPt (by rw [(denseRange_denseSeq X).closure_range]; trivial)
lemma integral_quantize_tendsto {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
[CompleteSpace E] (F : C(X, E)) :
Tendsto (fun n => β« z, F (quantize n z) βΞ½) atTop (π (β« z, F z βΞ½)) := by
apply tendsto_integral_of_dominated_convergence (fun _ => βFβ)
Β· intro n
exact ((quantize n).map F).stronglyMeasurable.aestronglyMeasurable
Β· exact integrable_const _
Β· intro n
exact Filter.Eventually.of_forall fun z => F.norm_coe_le_norm (quantize n z)
Β· exact Filter.Eventually.of_forall fun z => F.continuous.continuousAt.tendsto.comp
(quantize_tendsto z)
lemma sampleOp_strong_tendsto (C : C(X Γ X, β)) (f : C(X, β)) :
Tendsto (fun n => sampleOp Ξ½ (quantize n) C f) atTop (π (kernelOp Ξ½ C f)) := by
simp only [sampleOp_eq_integral]
exact integral_quantize_tendsto Ξ½ β¨_, f.continuous.smul C.curry.continuousβ©
lemma sampleOp_eventually_norm_le (C : C(X Γ X, β))
(hC : β z x, 0 β€ C (z,x)) {d d' : β} (hd : 0 β€ d)
(hdd' : d < d') (hrow : β x, β« z, C (z,x) βΞ½ β€ d) :
βαΆ n in atTop, βsampleOp Ξ½ (quantize n) Cβ β€ d' := by
obtain β¨N,hNβ© := Metric.tendsto_atTop.mp (sampleOp_strong_tendsto Ξ½ C 1)
(d' - d) (sub_pos.mpr hdd')
filter_upwards [eventually_ge_atTop N] with n hn
apply sampleOp_norm_le Ξ½ _ C hC (hd.trans hdd'.le)
intro x
have hh := (sampleOp Ξ½ (quantize n) C 1 - kernelOp Ξ½ C 1).norm_coe_le_norm x
have hk : kernelOp Ξ½ C 1 x β€ d := by simpa [kernelOp_apply] using hrow x
have hc : sampleOp Ξ½ (quantize n) C 1 x - kernelOp Ξ½ C 1 x β€
βsampleOp Ξ½ (quantize n) C 1 - kernelOp Ξ½ C 1β :=
(le_abs_self _).trans hh
have he := hN n hn
rw [dist_eq_norm] at he
linarith
end StrictHotSpots.CompactKernel
namespace ReciprocalKernel
open Matrix
lemma onePositiveSquare_submatrix_sum_inl {ΞΉ ΞΊ : Type*} [Fintype ΞΉ] [Fintype ΞΊ]
{A : Matrix (ΞΉ β ΞΊ) (ΞΉ β ΞΊ) β} (hA : OnePositiveSquare A) :
OnePositiveSquare (A.submatrix Sum.inl Sum.inl) := by
have he (u v : ΞΉ β β) : pairing (A.submatrix Sum.inl Sum.inl) u v =
pairing A (Sum.elim u (fun _ => 0)) (Sum.elim v (fun _ => 0)) := by
simp [pairing, dotProduct, Matrix.mulVec, Fintype.sum_sum_type]
refine β¨?_, ?_β©
Β· ext i j
exact hA.1.apply _ _
Β· intro u v hu huv
rw [he] at hu huv β’
exact hA.2 _ _ hu huv
end ReciprocalKernel
namespace StrictHotSpots.CompactKernel
open MeasureTheory Filter Set TopologicalSpace BanachResolvent ReciprocalKernel
open scoped Topology ENNReal
variable {X : Type} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (Ξ½ : Measure X) [IsFiniteMeasure Ξ½]
def resolvedKernel (C : C(X Γ X, β)) (A : C(X, β) βL[β] C(X, β)) (x y : X) : β :=
resolvent A (C.curry y) x
omit [BorelSpace X] [IsFiniteMeasure Ξ½] in
lemma sampled_reciprocal (Ο : SimpleFunc X X) (C : C(X Γ X, β))
(hC : β z x, 0 < C (z,x)) (hsym : β x y, C (x,y) = C (y,x))
(hP : β (ΞΉ : Type) [Fintype ΞΉ] (s : ΞΉ β X),
OnePositiveSquare (Matrix.of fun i j => (C (s i,s j))β»ΒΉ))
{d : β} (hd : 0 β€ d) (hd1 : d < 1)
(hrow : β x, sampleOp Ξ½ Ο C 1 x β€ d)
{ΞΉ : Type} [Fintype ΞΉ] (s : ΞΉ β X) :
(β i j, 0 < resolvedKernel C (sampleOp Ξ½ Ο C) (s i) (s j)) β§
OnePositiveSquare (Matrix.of fun i j =>
(resolvedKernel C (sampleOp Ξ½ Ο C) (s i) (s j))β»ΒΉ) := by
classical
let t : ΞΉ β Ο.range β X := Sum.elim s Subtype.val
let w : ΞΉ β Ο.range β β := Sum.elim (fun _ => 0) (fun z => Ξ½.real (Ο β»ΒΉ' {z.val}))
let M : Matrix (ΞΉ β Ο.range) (ΞΉ β Ο.range) β := Matrix.of fun i j => C (t j,t i)
have hM : M.IsSymm := by ext i j; exact hsym _ _
have hp : β i j, 0 < M i j := fun i j => hC _ _
have hrec : OnePositiveSquare (Matrix.of fun i j => (M i j)β»ΒΉ) := by
have he : (Matrix.of fun i j => (M i j)β»ΒΉ) =
(Matrix.of fun i j => (C (t i,t j))β»ΒΉ) := by ext i j; simp [M, hsym]
rw [he]
exact hP _ t
have hw : β i, 0 β€ w i := by intro i; cases i <;> simp [w, measureReal_nonneg]
have hsum (i : ΞΉ β Ο.range) (f : C(X, β)) :
β j, M i j * w j * f (t j) = sampleOp Ξ½ Ο C f (t i) := by
simp only [Fintype.sum_sum_type, M, w, t, Sum.elim_inl, Sum.elim_inr,
Matrix.of_apply, mul_zero, zero_mul, Finset.sum_const_zero, zero_add,
sampleOp_apply]
rw [Finset.sum_subtype Ο.range (fun _ => Iff.rfl)]
apply Finset.sum_congr rfl
intro z hz
ring
have hb : β i, β j β Finset.univ, M i j * w j * (1 : β) < 1 := by
intro i
have he := hsum i 1
simp only [ContinuousMap.one_apply] at he
exact (he βΈ hrow (t i)).trans_lt hd1
obtain β¨R,hRs,hRp,hRrec,hReqβ© := finite_resolvent_of_superharmonic
hM hp hrec hw (fun _ => one_pos) Finset.univ hb
have hn : βsampleOp Ξ½ Ο Cβ < 1 :=
(sampleOp_norm_le Ξ½ Ο C (fun z x => (hC z x).le) hd hrow).trans_lt hd1
have hmatch (j : ΞΉ β Ο.range) : β i,
R i j = resolvedKernel C (sampleOp Ξ½ Ο C) (t i) (t j) := by
let u : C(X, β) := C.curry (t j) +
β z : Ο.range, (Ξ½.real (Ο β»ΒΉ' {z.val}) * R (Sum.inr z) j) β’ C.curry z.val
have hu (i : ΞΉ β Ο.range) : u (t i) = R i j := by
rw [hReq i j]
simp only [u, ContinuousMap.add_apply, ContinuousMap.sum_apply,
ContinuousMap.smul_apply, ContinuousMap.curry_apply, smul_eq_mul,
Fintype.sum_sum_type, M, w, t, Sum.elim_inl, Sum.elim_inr,
Matrix.of_apply, mul_zero, zero_mul, Finset.sum_const_zero, zero_add]
congr 1
apply Finset.sum_congr rfl
intro z hz
ring
have he : u - sampleOp Ξ½ Ο C u = C.curry (t j) := by
ext x
simp only [ContinuousMap.sub_apply, sampleOp_apply]
rw [Finset.sum_subtype Ο.range (fun _ => Iff.rfl)]
have hz (z : Ο.range) : u z.val = R (Sum.inr z) j := hu (Sum.inr z)
simp only [hz, u, ContinuousMap.add_apply, ContinuousMap.sum_apply,
ContinuousMap.smul_apply, ContinuousMap.curry_apply, smul_eq_mul]
have hsum' : (β z : Ο.range, (Ξ½.real (Ο β»ΒΉ' {βz}) * R (Sum.inr z) j) * C (βz,x)) =
β z : Ο.range, Ξ½.real (Ο β»ΒΉ' {βz}) * C (βz,x) * R (Sum.inr z) j := by
apply Finset.sum_congr rfl
intro z hz
ring
rw [hsum']
abel
intro i
rw [β hu i, resolvent_solution _ hn he]
rfl
refine β¨fun i j => ?_, ?_β©
Β· simpa only [t, Sum.elim_inl, hmatch] using hRp (Sum.inl i) (Sum.inl j)
Β· have hsub := onePositiveSquare_submatrix_sum_inl hRrec
convert hsub using 1
ext i j
simp only [Matrix.submatrix_apply, Matrix.of_apply, hmatch, t, Sum.elim_inl]
omit [CompactSpace X] [MeasurableSpace X] [BorelSpace X] in
lemma continuousMap_orderClosed : OrderClosedTopology C(X, β) := by
constructor
have he : {p : C(X, β) Γ C(X, β) | p.1 β€ p.2} =
β x : X, {p : C(X, β) Γ C(X, β) | p.1 x β€ p.2 x} := by
ext p
simp only [Set.mem_ofPred_eq, Set.mem_iInter]
rfl
rw [he]
exact isClosed_iInter fun x => isClosed_le
((ContinuousMap.evalCLM β x).continuous.comp continuous_fst)
((ContinuousMap.evalCLM β x).continuous.comp continuous_snd)
omit [MeasurableSpace X] [BorelSpace X] in
lemma continuous_resolvent_nonneg (A : C(X, β) βL[β] C(X, β))
(hA : βAβ < 1) (hpos : β f : C(X, β), 0 β€ f β 0 β€ A f)
{f : C(X, β)} (hf : 0 β€ f) : 0 β€ resolvent A f := by
let : OrderClosedTopology C(X, β) := continuousMap_orderClosed
exact resolvent_nonneg A hA hpos hf
omit [MeasurableSpace X] [BorelSpace X] in
lemma resolvedKernel_ge (C : C(X Γ X, β)) {A : C(X, β) βL[β] C(X, β)}
(hA : βAβ < 1) (hpos : β f : C(X, β), 0 β€ f β 0 β€ A f)
(hC : β z x, 0 β€ C (z,x)) (x y : X) :
C (y,x) β€ resolvedKernel C A x y := by
have hp : 0 β€ C.curry y := fun x => hC y x
have hn := hpos _ (continuous_resolvent_nonneg A hA hpos hp)
have he := congrArg (fun T : C(X, β) βL[β] C(X, β) => T (C.curry y))
(resolvent_left A hA)
simp only [mul_apply_eq_comp, sub_apply, one_apply_eq_self] at he
have hex := congrArg (fun f : C(X, β) => f x) he
change resolvedKernel C A x y - A (resolvent A (C.curry y)) x = C (y,x) at hex
have hnx := hn x
change 0 β€ A (resolvent A (C.curry y)) x at hnx
linarith
lemma resolvedKernel_tendsto [Nonempty X] (C : C(X Γ X, β))
(hC : β z x, 0 β€ C (z,x)) {d : β} (hd : 0 β€ d) (hd1 : d < 1)
(hrow : β x, β« z, C (z,x) βΞ½ β€ d) (x y : X) :
Tendsto (fun n => resolvedKernel C (sampleOp Ξ½ (quantize n) C) x y) atTop
(π (resolvedKernel C (kernelOp Ξ½ C) x y)) := by
have hn := kernelOp_norm_le Ξ½ C hC hd hrow
have hh := BanachResolvent.resolvent_strong_tendsto (kernelOp Ξ½ C)
(fun n => sampleOp Ξ½ (quantize n) C) (d := (1+d)/2) (by linarith)
(hn.trans_lt hd1)
(sampleOp_eventually_norm_le Ξ½ C hC hd (by linarith) hrow)
(sampleOp_strong_tendsto Ξ½ C) (C.curry y)
exact ((ContinuousMap.evalCLM β x).continuous.tendsto _).comp hh
theorem compact_reciprocal_of_row_bound [Nonempty X] (C : C(X Γ X, β))
(hC : β z x, 0 < C (z,x)) (hsym : β x y, C (x,y) = C (y,x))
(hP : β (ΞΉ : Type) [Fintype ΞΉ] (s : ΞΉ β X),
OnePositiveSquare (Matrix.of fun i j => (C (s i,s j))β»ΒΉ))
{d : β} (hd : 0 β€ d) (hd1 : d < 1)
(hrow : β x, β« z, C (z,x) βΞ½ β€ d)
{ΞΉ : Type} [Fintype ΞΉ] (s : ΞΉ β X) :
(β i j, 0 < resolvedKernel C (kernelOp Ξ½ C) (s i) (s j)) β§
OnePositiveSquare (Matrix.of fun i j =>
(resolvedKernel C (kernelOp Ξ½ C) (s i) (s j))β»ΒΉ) := by
have hn := kernelOp_norm_le Ξ½ C (fun z x => (hC z x).le) hd hrow
have hp (x y : X) : 0 < resolvedKernel C (kernelOp Ξ½ C) x y :=
(hC y x).trans_le (resolvedKernel_ge C (hn.trans_lt hd1)
(fun f hf => kernelOp_nonneg Ξ½ C (fun z x => (hC z x).le) hf)
(fun z x => (hC z x).le) x y)
refine β¨fun i j => hp _ _, ?_β©
have he := sampleOp_eventually_norm_le Ξ½ C (fun z x => (hC z x).le) hd
(show d < (1+d)/2 by linarith) hrow
have hr : βαΆ n in atTop, β x, sampleOp Ξ½ (quantize n) C 1 x β€ (1+d)/2 := by
filter_upwards [he] with n hn x
calc
sampleOp Ξ½ (quantize n) C 1 x β€ βsampleOp Ξ½ (quantize n) C 1 xβ := le_abs_self _
_ β€ βsampleOp Ξ½ (quantize n) C 1β := ContinuousMap.norm_coe_le_norm _ _
_ β€ βsampleOp Ξ½ (quantize n) Cβ * β(1 : C(X, β))β := ContinuousLinearMap.le_opNorm _ _
_ β€ (1+d)/2 := by simpa using hn
obtain β¨N,hNβ© := eventually_atTop.mp hr
apply onePositiveSquare_of_entrywise_tendsto
(A := fun n => Matrix.of fun i j =>
(resolvedKernel C (sampleOp Ξ½ (quantize (n+N)) C) (s i) (s j))β»ΒΉ)
Β· intro n
exact (sampled_reciprocal Ξ½ (quantize (n+N)) C hC hsym hP
(show 0 β€ (1+d)/2 by linarith) (by linarith) (hN _ (Nat.le_add_left _ _)) s).2
Β· intro i j
exact ((resolvedKernel_tendsto Ξ½ C (fun z x => (hC z x).le) hd hd1 hrow (s i) (s j)).invβ
(hp _ _).ne').comp (tendsto_add_atTop_nat N)
end StrictHotSpots.CompactKernel
namespace StrictHotSpots.CompactKernel
open MeasureTheory Filter Set TopologicalSpace BanachResolvent
open scoped Topology ENNReal
variable {X : Type*} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (Ξ½ : Measure X) [IsFiniteMeasure Ξ½]
lemma integral_norm_L2_le (f : Lp β 2 Ξ½) :
β« z, βf zβ βΞ½ β€ βfβ * βContinuousMap.toLp 2 Ξ½ β (1 : C(X, β))β := by
have he : β« z, βf zβ βΞ½ =
inner β |f| (ContinuousMap.toLp 2 Ξ½ β (1 : C(X, β))) := by
rw [L2.inner_def]
apply integral_congr_ae
filter_upwards [Lp.coeFn_abs f, ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ (1 : C(X, β))]
with z hz h1
change βf zβ = (ContinuousMap.toLp 2 Ξ½ β (1 : C(X, β))) z * (|f|) z
rw [hz, h1]
simp [Real.norm_eq_abs]
rw [he]
simpa only [norm_abs_eq_norm] using real_inner_le_norm |f| (ContinuousMap.toLp 2 Ξ½ β (1 : C(X, β)))
lemma l2kernel_integrable (C : C(X Γ X, β)) (f : Lp β 2 Ξ½) :
Integrable (fun z => f z β’ C.curry z) Ξ½ := by
apply ((Lp.memLp f).integrable (by norm_num)).norm.mul_const βCβ |>.mono'
((Lp.aestronglyMeasurable f).smul C.curry.continuous.aestronglyMeasurable)
exact Eventually.of_forall fun z => by
change βf z β’ C.curry zβ β€ _
rw [norm_smul]
apply mul_le_mul_of_nonneg_left _ (norm_nonneg _)
exact (ContinuousMap.norm_le _ (norm_nonneg C)).mpr fun x => C.norm_coe_le_norm (z,x)
def l2SectionOp (C : C(X Γ X, β)) : Lp β 2 Ξ½ βL[β] C(X, β) :=
LinearMap.mkContinuous
{ toFun := fun f => β« z, f z β’ C.curry z βΞ½
map_add' := by
intro f g
change (β« z, (f+g) z β’ C.curry z βΞ½) = _
calc
_ = β« z, f z β’ C.curry z + g z β’ C.curry z βΞ½ := by
apply integral_congr_ae
filter_upwards [Lp.coeFn_add f g] with z hz
rw [hz, Pi.add_apply, add_smul]
_ = _ := integral_add (l2kernel_integrable Ξ½ C f) (l2kernel_integrable Ξ½ C g)
map_smul' := by
intro r f
calc
_ = β« z, r β’ (f z β’ C.curry z) βΞ½ := by
apply integral_congr_ae
filter_upwards [Lp.coeFn_smul r f] with z hz
simp [hz, mul_smul]
_ = _ := integral_smul r _ }
(βCβ * βContinuousMap.toLp 2 Ξ½ β (1 : C(X, β))β) (by
intro f
calc
ββ« z, f z β’ C.curry z βΞ½β β€ β« z, βf z β’ C.curry zβ βΞ½ := norm_integral_le_integral_norm _
_ β€ β« z, βf zβ * βCβ βΞ½ := by
apply integral_mono (l2kernel_integrable Ξ½ C f).norm
(((Lp.memLp f).integrable (by norm_num)).norm.mul_const _)
intro z
dsimp only
rw [norm_smul]
apply mul_le_mul_of_nonneg_left _ (norm_nonneg _)
exact (ContinuousMap.norm_le _ (norm_nonneg C)).mpr fun x => C.norm_coe_le_norm (z,x)
_ = (β« z, βf zβ βΞ½) * βCβ := integral_mul_const _ _
_ β€ (βfβ * βContinuousMap.toLp 2 Ξ½ β (1 : C(X, β))β) * βCβ :=
mul_le_mul_of_nonneg_right (integral_norm_L2_le Ξ½ f) (norm_nonneg _)
_ = _ := by ring)
lemma l2SectionOp_apply (C : C(X Γ X, β)) (f : Lp β 2 Ξ½) (x : X) :
l2SectionOp Ξ½ C f x = β« z, C (z,x) * f z βΞ½ := by
change (β« z, f z β’ C.curry z βΞ½) x = _
rw [ContinuousMap.integral_apply (l2kernel_integrable Ξ½ C f)]
simp only [ContinuousMap.smul_apply, smul_eq_mul, ContinuousMap.curry_apply, mul_comm]
lemma l2SectionOp_toLp (C : C(X Γ X, β)) (f : C(X, β)) :
l2SectionOp Ξ½ C (ContinuousMap.toLp 2 Ξ½ β f) = kernelOp Ξ½ C f := by
ext x
rw [kernelOp_apply, l2SectionOp_apply]
apply integral_congr_ae
filter_upwards [ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ f] with z hz
rw [hz]
lemma l2SectionOp_nonneg (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
{f : Lp β 2 Ξ½} (hf : 0 β€ f) : 0 β€ l2SectionOp Ξ½ C f := by
intro x
change 0 β€ l2SectionOp Ξ½ C f x
rw [l2SectionOp_apply]
apply integral_nonneg_of_ae
filter_upwards [(Lp.coeFn_nonneg f).mpr hf] with z hz
exact mul_nonneg (hC z x) hz
def l2Op (C : C(X Γ X, β)) : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½ :=
(ContinuousMap.toLp 2 Ξ½ β).comp (l2SectionOp Ξ½ C)
lemma l2Op_nonneg (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
{f : Lp β 2 Ξ½} (hf : 0 β€ f) : 0 β€ l2Op Ξ½ C f := by
apply (Lp.coeFn_nonneg _).mp
have he := ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ (l2SectionOp Ξ½ C f)
filter_upwards [he] with x hx
exact (l2SectionOp_nonneg Ξ½ C hC hf x).trans_eq hx.symm
theorem exists_superharmonic (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
(hn : βl2Op Ξ½ Cβ < 1) :
β f : C(X, β), (β x, 1 β€ f x) β§ kernelOp Ξ½ C f = f - 1 := by
let a := ContinuousMap.toLp 2 Ξ½ β (1 : C(X, β))
let g := resolvent (l2Op Ξ½ C) a
let f : C(X, β) := 1 + l2SectionOp Ξ½ C g
have ha : 0 β€ a := by
apply (Lp.coeFn_nonneg _).mp
filter_upwards [ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ (1 : C(X, β))] with x hx
change 0 β€ (ContinuousMap.toLp 2 Ξ½ β (1 : C(X, β))) x
rw [hx]
exact zero_le_one
have hg : 0 β€ g := resolvent_nonneg _ hn (fun v hv => l2Op_nonneg Ξ½ C hC hv) ha
have hf : ContinuousMap.toLp 2 Ξ½ β f = g := by
have he := congrArg (fun T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½ => T a)
(resolvent_left (l2Op Ξ½ C) hn)
simp only [mul_apply_eq_comp, sub_apply, one_apply_eq_self] at he
change g - l2Op Ξ½ C g = a at he
dsimp only [f]
rw [map_add]
change a + l2Op Ξ½ C g = g
exact (sub_eq_iff_eq_add.mp he).symm
refine β¨f, ?_, ?_β©
Β· intro x
have hp := l2SectionOp_nonneg Ξ½ C hC hg x
change 0 β€ l2SectionOp Ξ½ C g x at hp
change 1 β€ 1 + l2SectionOp Ξ½ C g x
linarith
Β· rw [β l2SectionOp_toLp, hf]
dsimp only [f]
abel
end StrictHotSpots.CompactKernel
namespace StrictHotSpots.CompactKernel
open MeasureTheory Filter Set TopologicalSpace BanachResolvent
open scoped Topology ENNReal
variable {X : Type} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (Ξ½ : Measure X) [IsFiniteMeasure Ξ½]
def invMap (f : C(X, β)) (hf : β x, 0 < f x) : C(X, β) :=
β¨fun x => (f x)β»ΒΉ, f.continuous.invβ (fun x => (hf x).ne')β©
def scaledKernel (C : C(X Γ X, β)) (f : C(X, β)) (hf : β x, 0 < f x) :
C(X Γ X, β) :=
β¨fun p => C p * f p.1 / f p.2,
(C.continuous.mul (f.continuous.comp continuous_fst)).div
(f.continuous.comp continuous_snd) (fun p => (hf p.2).ne')β©
omit [CompactSpace X] [MeasurableSpace X] [BorelSpace X] in
lemma scaledKernel_pos (C : C(X Γ X, β)) (hC : β z x, 0 < C (z,x))
(f : C(X, β)) (hf : β x, 0 < f x) (z x : X) :
0 < scaledKernel C f hf (z,x) := div_pos (mul_pos (hC z x) (hf z)) (hf x)
lemma kernelOp_scaled (C : C(X Γ X, β)) (f : C(X, β)) (hf : β x, 0 < f x)
(u : C(X, β)) :
kernelOp Ξ½ (scaledKernel C f hf) u = invMap f hf * kernelOp Ξ½ C (f*u) := by
ext x
simp only [kernelOp_apply, ContinuousMap.mul_apply]
change (β« z, (C (z,x) * f z / f x) * u z βΞ½) =
(f x)β»ΒΉ * β« z, C (z,x) * (f z * u z) βΞ½
rw [β integral_const_mul]
apply integral_congr_ae
exact Eventually.of_forall fun z => by ring
omit [BorelSpace X] [IsFiniteMeasure Ξ½] in
lemma sampleOp_scaled (Ο : SimpleFunc X X) (C : C(X Γ X, β))
(f : C(X, β)) (hf : β x, 0 < f x) (u : C(X, β)) :
sampleOp Ξ½ Ο (scaledKernel C f hf) u = invMap f hf * sampleOp Ξ½ Ο C (f*u) := by
ext x
simp only [sampleOp_apply, ContinuousMap.mul_apply]
change (β z β Ο.range, Ξ½.real (Ο β»ΒΉ' {z}) * (C (z,x) * f z / f x) * u z) =
(f x)β»ΒΉ * β z β Ο.range, Ξ½.real (Ο β»ΒΉ' {z}) * C (z,x) * (f z * u z)
rw [Finset.mul_sum]
apply Finset.sum_congr rfl
intro z hz
ring
omit [CompactSpace X] [MeasurableSpace X] [BorelSpace X] in
lemma mul_invMap (f : C(X, β)) (hf : β x, 0 < f x) : f * invMap f hf = 1 := by
ext x
exact mul_inv_cancelβ (hf x).ne'
omit [CompactSpace X] [MeasurableSpace X] [BorelSpace X] in
lemma invMap_mul_cancel (f : C(X, β)) (hf : β x, 0 < f x) (u : C(X, β)) :
f * (invMap f hf * u) = u := by rw [β mul_assoc, mul_invMap, one_mul]
def rescaledKernel (C : C(X Γ X, β)) (f : C(X, β)) (hf : β x, 0 < f x)
(A : C(X, β) βL[β] C(X, β)) (x y : X) : β :=
f x * resolvent A (invMap f hf * C.curry y) x
lemma scaled_row_bound [Nonempty X] (C : C(X Γ X, β))
(f : C(X, β)) (hf : β x, 1 β€ f x) (he : kernelOp Ξ½ C f = f - 1) :
0 β€ 1 - βfββ»ΒΉ β§ 1 - βfββ»ΒΉ < 1 β§
β x, β« z, scaledKernel C f (fun x => (hf x).trans_lt' zero_lt_one) (z,x) βΞ½
β€ 1 - βfββ»ΒΉ := by
have hfn : 1 β€ βfβ := by
obtain β¨xβ© := βΉNonempty XβΊ
exact (hf x).trans ((le_abs_self _).trans (f.norm_coe_le_norm x))
have hfnpos : 0 < βfβ := lt_of_lt_of_le zero_lt_one hfn
refine β¨sub_nonneg.mpr (inv_le_one_of_one_leβ hfn), by linarith [inv_pos.mpr hfnpos], ?_β©
intro x
have hx : 0 < f x := lt_of_lt_of_le zero_lt_one (hf x)
have hfx : f x β€ βfβ := (le_abs_self _).trans (f.norm_coe_le_norm x)
have hxf := inv_antiβ hx hfx
have hr := congrArg (fun u : C(X, β) => u x)
(kernelOp_scaled Ξ½ C f (fun x => lt_of_lt_of_le zero_lt_one (hf x)) 1)
simp only [mul_one, he, ContinuousMap.mul_apply, ContinuousMap.sub_apply,
ContinuousMap.one_apply, kernelOp_apply] at hr
change (β« z, scaledKernel C f _ (z,x) βΞ½) = (f x)β»ΒΉ * (f x - 1) at hr
rw [hr, mul_sub, inv_mul_cancelβ hx.ne', mul_one]
linarith
end StrictHotSpots.CompactKernel
namespace StrictHotSpots.CompactKernel
open MeasureTheory Filter Set TopologicalSpace BanachResolvent ReciprocalKernel
open scoped Topology ENNReal
variable {X : Type} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (Ξ½ : Measure X) [IsFiniteMeasure Ξ½]
def l2ResolvedKernel (C : C(X Γ X, β)) (x y : X) : β :=
C (y,x) + l2SectionOp Ξ½ C
(resolvent (l2Op Ξ½ C) (ContinuousMap.toLp 2 Ξ½ β (C.curry y))) x
omit [MeasurableSpace X] [BorelSpace X] in
lemma scaled_solution (f : C(X, β)) (hf : β x, 0 < f x)
(A B : C(X, β) βL[β] C(X, β)) (hB : βBβ < 1)
(hscale : β u, B u = invMap f hf * A (f * u))
{u v : C(X, β)} (heq : u - A u = v) :
u = f * resolvent B (invMap f hf * v) := by
have h : invMap f hf * u - B (invMap f hf * u) = invMap f hf * v := by
rw [hscale, invMap_mul_cancel, β mul_sub, heq]
have hr := congrArg (fun z : C(X, β) => f * z) (resolvent_solution B hB h)
rwa [invMap_mul_cancel] at hr
lemma rescaledKernel_eq_l2ResolvedKernel (C : C(X Γ X, β))
(f : C(X, β)) (hf : β x, 0 < f x)
(hL : βl2Op Ξ½ Cβ < 1) (hC : βkernelOp Ξ½ (scaledKernel C f hf)β < 1)
(x y : X) :
rescaledKernel C f hf (kernelOp Ξ½ (scaledKernel C f hf)) x y =
l2ResolvedKernel Ξ½ C x y := by
let g := resolvent (l2Op Ξ½ C) (ContinuousMap.toLp 2 Ξ½ β (C.curry y))
let u : C(X, β) := C.curry y + l2SectionOp Ξ½ C g
have hg : ContinuousMap.toLp 2 Ξ½ β u = g := by
have he := congrArg (fun T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½ =>
T (ContinuousMap.toLp 2 Ξ½ β (C.curry y))) (resolvent_left (l2Op Ξ½ C) hL)
simp only [mul_apply_eq_comp, sub_apply, one_apply_eq_self] at he
change g - l2Op Ξ½ C g = ContinuousMap.toLp 2 Ξ½ β (C.curry y) at he
change ContinuousMap.toLp 2 Ξ½ β (C.curry y + l2SectionOp Ξ½ C g) = g
rw [map_add]
exact (sub_eq_iff_eq_add.mp he).symm
have hu : u - kernelOp Ξ½ C u = C.curry y := by
rw [β l2SectionOp_toLp, hg]
dsimp only [u]
abel
have hu' := scaled_solution f hf (kernelOp Ξ½ C)
(kernelOp Ξ½ (scaledKernel C f hf)) hC (kernelOp_scaled Ξ½ C f hf) hu
have h := congrArg (fun v : C(X, β) => v x) hu'
exact h.symm
lemma l2ResolvedKernel_ge (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
(hn : βl2Op Ξ½ Cβ < 1) (x y : X) :
C (y,x) β€ l2ResolvedKernel Ξ½ C x y := by
have hy : 0 β€ ContinuousMap.toLp 2 Ξ½ β (C.curry y) := by
apply (Lp.coeFn_nonneg _).mp
filter_upwards [ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ (C.curry y)] with z hz
rw [hz]
exact hC y z
have hp := l2SectionOp_nonneg Ξ½ C hC
(resolvent_nonneg (l2Op Ξ½ C) hn (fun v hv => l2Op_nonneg Ξ½ C hC hv) hy) x
exact le_add_of_nonneg_right hp
omit [BorelSpace X] [IsFiniteMeasure Ξ½] in
lemma sampled_rescaled_reciprocal (Ο : SimpleFunc X X) (C : C(X Γ X, β))
(hC : β z x, 0 < C (z,x)) (hsym : β x y, C (x,y) = C (y,x))
(hP : β (ΞΉ : Type) [Fintype ΞΉ] (s : ΞΉ β X),
OnePositiveSquare (Matrix.of fun i j => (C (s i,s j))β»ΒΉ))
(f : C(X, β)) (hf : β x, 0 < f x)
{d : β} (hd : 0 β€ d) (hd1 : d < 1)
(hrow : β x, sampleOp Ξ½ Ο (scaledKernel C f hf) 1 x β€ d)
{ΞΉ : Type} [Fintype ΞΉ] (s : ΞΉ β X) :
(β i j, 0 < rescaledKernel C f hf (sampleOp Ξ½ Ο (scaledKernel C f hf)) (s i) (s j)) β§
OnePositiveSquare (Matrix.of fun i j =>
(rescaledKernel C f hf (sampleOp Ξ½ Ο (scaledKernel C f hf)) (s i) (s j))β»ΒΉ) := by
classical
let t : ΞΉ β Ο.range β X := Sum.elim s Subtype.val
let w : ΞΉ β Ο.range β β := Sum.elim (fun _ => 0) (fun z => Ξ½.real (Ο β»ΒΉ' {z.val}))
let M : Matrix (ΞΉ β Ο.range) (ΞΉ β Ο.range) β := Matrix.of fun i j => C (t j,t i)
have hM : M.IsSymm := by ext i j; exact hsym _ _
have hp : β i j, 0 < M i j := fun i j => hC _ _
have hrec : OnePositiveSquare (Matrix.of fun i j => (M i j)β»ΒΉ) := by
have he : (Matrix.of fun i j => (M i j)β»ΒΉ) =
(Matrix.of fun i j => (C (t i,t j))β»ΒΉ) := by ext i j; simp [M, hsym]
rw [he]
exact hP _ t
have hw : β i, 0 β€ w i := by intro i; cases i <;> simp [w, measureReal_nonneg]
have hsum (i : ΞΉ β Ο.range) (v : C(X, β)) :
β j, M i j * w j * v (t j) = sampleOp Ξ½ Ο C v (t i) := by
simp only [Fintype.sum_sum_type, M, w, t, Sum.elim_inl, Sum.elim_inr,
Matrix.of_apply, mul_zero, zero_mul, Finset.sum_const_zero, zero_add,
sampleOp_apply]
rw [Finset.sum_subtype Ο.range (fun _ => Iff.rfl)]
apply Finset.sum_congr rfl
intro z hz
ring
have hb : β i, β j β Finset.univ, M i j * w j * f (t j) < f (t i) := by
intro i
rw [hsum]
have he := congrArg (fun v : C(X, β) => f * v) (sampleOp_scaled Ξ½ Ο C f hf 1)
rw [mul_one, invMap_mul_cancel] at he
have hx := congrArg (fun v : C(X, β) => v (t i)) he
change f (t i) * sampleOp Ξ½ Ο (scaledKernel C f hf) 1 (t i) = sampleOp Ξ½ Ο C f (t i) at hx
rw [β hx]
exact (mul_le_mul_of_nonneg_left (hrow (t i)) (hf _).le).trans_lt
(by simpa using (mul_lt_mul_of_pos_left hd1 (hf (t i))))
obtain β¨R,hRs,hRp,hRrec,hReqβ© := finite_resolvent_of_superharmonic
hM hp hrec hw (fun i => hf (t i)) Finset.univ hb
have hn : βsampleOp Ξ½ Ο (scaledKernel C f hf)β < 1 :=
(sampleOp_norm_le Ξ½ Ο _ (fun z x => (scaledKernel_pos C hC f hf z x).le) hd hrow).trans_lt hd1
have hmatch (j : ΞΉ β Ο.range) : β i,
R i j = rescaledKernel C f hf (sampleOp Ξ½ Ο (scaledKernel C f hf)) (t i) (t j) := by
let u : C(X, β) := C.curry (t j) +
β z : Ο.range, (Ξ½.real (Ο β»ΒΉ' {z.val}) * R (Sum.inr z) j) β’ C.curry z.val
have hu (i : ΞΉ β Ο.range) : u (t i) = R i j := by
rw [hReq i j]
simp only [u, ContinuousMap.add_apply, ContinuousMap.sum_apply,
ContinuousMap.smul_apply, ContinuousMap.curry_apply, smul_eq_mul,
Fintype.sum_sum_type, M, w, t, Sum.elim_inl, Sum.elim_inr,
Matrix.of_apply, mul_zero, zero_mul, Finset.sum_const_zero, zero_add]
congr 1
apply Finset.sum_congr rfl
intro z hz
ring
have he : u - sampleOp Ξ½ Ο C u = C.curry (t j) := by
ext x
simp only [ContinuousMap.sub_apply, sampleOp_apply]
rw [Finset.sum_subtype Ο.range (fun _ => Iff.rfl)]
have hz (z : Ο.range) : u z.val = R (Sum.inr z) j := hu (Sum.inr z)
simp only [hz, u, ContinuousMap.add_apply, ContinuousMap.sum_apply,
ContinuousMap.smul_apply, ContinuousMap.curry_apply, smul_eq_mul]
have hsum' : (β z : Ο.range, (Ξ½.real (Ο β»ΒΉ' {βz}) * R (Sum.inr z) j) * C (βz,x)) =
β z : Ο.range, Ξ½.real (Ο β»ΒΉ' {βz}) * C (βz,x) * R (Sum.inr z) j := by
apply Finset.sum_congr rfl
intro z hz
ring
rw [hsum']
abel
have he' := scaled_solution f hf (sampleOp Ξ½ Ο C)
(sampleOp Ξ½ Ο (scaledKernel C f hf)) hn (sampleOp_scaled Ξ½ Ο C f hf) he
intro i
rw [β hu i, he']
rfl
refine β¨fun i j => ?_, ?_β©
Β· simpa only [t, Sum.elim_inl, hmatch] using hRp (Sum.inl i) (Sum.inl j)
Β· have hsub := onePositiveSquare_submatrix_sum_inl hRrec
convert hsub using 1
ext i j
simp only [Matrix.submatrix_apply, Matrix.of_apply, hmatch, t, Sum.elim_inl]
lemma rescaledKernel_tendsto [Nonempty X] (C : C(X Γ X, β))
(hC : β z x, 0 β€ C (z,x)) (f : C(X, β)) (hf : β x, 0 < f x)
{d : β} (hd : 0 β€ d) (hd1 : d < 1)
(hrow : β x, β« z, scaledKernel C f hf (z,x) βΞ½ β€ d) (x y : X) :
Tendsto (fun n => rescaledKernel C f hf (sampleOp Ξ½ (quantize n) (scaledKernel C f hf)) x y) atTop
(π (rescaledKernel C f hf (kernelOp Ξ½ (scaledKernel C f hf)) x y)) := by
have hp (z x : X) : 0 β€ scaledKernel C f hf (z,x) :=
div_nonneg (mul_nonneg (hC z x) (hf z).le) (hf x).le
have hn := kernelOp_norm_le Ξ½ (scaledKernel C f hf) hp hd hrow
have hh := BanachResolvent.resolvent_strong_tendsto (kernelOp Ξ½ (scaledKernel C f hf))
(fun n => sampleOp Ξ½ (quantize n) (scaledKernel C f hf))
(d := (1+d)/2) (by linarith) (hn.trans_lt hd1)
(sampleOp_eventually_norm_le Ξ½ (scaledKernel C f hf) hp hd (by linarith) hrow)
(sampleOp_strong_tendsto Ξ½ (scaledKernel C f hf)) (invMap f hf * C.curry y)
exact (((ContinuousMap.evalCLM β x).continuous.tendsto _).comp hh).const_mul (f x)
end StrictHotSpots.CompactKernel
namespace StrictHotSpots.CompactKernel
open MeasureTheory Filter Set TopologicalSpace BanachResolvent ReciprocalKernel
open scoped Topology ENNReal
variable {X : Type} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (Ξ½ : Measure X) [IsFiniteMeasure Ξ½]
theorem compact_reciprocal_of_l2_norm_lt_one [Nonempty X] (C : C(X Γ X, β))
(hC : β z x, 0 < C (z,x)) (hsym : β x y, C (x,y) = C (y,x))
(hP : β (ΞΉ : Type) [Fintype ΞΉ] (s : ΞΉ β X),
OnePositiveSquare (Matrix.of fun i j => (C (s i,s j))β»ΒΉ))
(hL : βl2Op Ξ½ Cβ < 1)
{ΞΉ : Type} [Fintype ΞΉ] (s : ΞΉ β X) :
(β i j, 0 < l2ResolvedKernel Ξ½ C (s i) (s j)) β§
OnePositiveSquare (Matrix.of fun i j => (l2ResolvedKernel Ξ½ C (s i) (s j))β»ΒΉ) := by
obtain β¨f,hf,heqβ© := exists_superharmonic Ξ½ C (fun z x => (hC z x).le) hL
let hf' : β x, 0 < f x := fun x => lt_of_lt_of_le zero_lt_one (hf x)
let C' := scaledKernel C f hf'
let d : β := 1 - βfββ»ΒΉ
obtain β¨hd,hd1,hrowβ© := scaled_row_bound Ξ½ C f hf heq
have hp' (z x : X) : 0 β€ C' (z,x) := (scaledKernel_pos C hC f hf' z x).le
have hn : βkernelOp Ξ½ C'β < 1 :=
(kernelOp_norm_le Ξ½ C' hp' hd hrow).trans_lt hd1
have hkernel (x y : X) : rescaledKernel C f hf' (kernelOp Ξ½ C') x y =
l2ResolvedKernel Ξ½ C x y := rescaledKernel_eq_l2ResolvedKernel Ξ½ C f hf' hL hn x y
have hp (x y : X) : 0 < l2ResolvedKernel Ξ½ C x y :=
(hC y x).trans_le (l2ResolvedKernel_ge Ξ½ C (fun z x => (hC z x).le) hL x y)
refine β¨fun i j => hp _ _, ?_β©
have hev := sampleOp_eventually_norm_le Ξ½ C' hp' hd
(show d < (1+d)/2 by dsimp [d]; linarith) hrow
have hr : βαΆ n in atTop, β x, sampleOp Ξ½ (quantize n) C' 1 x β€ (1+d)/2 := by
filter_upwards [hev] with n hnn x
calc
sampleOp Ξ½ (quantize n) C' 1 x β€ βsampleOp Ξ½ (quantize n) C' 1 xβ := le_abs_self _
_ β€ βsampleOp Ξ½ (quantize n) C' 1β := ContinuousMap.norm_coe_le_norm _ _
_ β€ βsampleOp Ξ½ (quantize n) C'β * β(1 : C(X, β))β := ContinuousLinearMap.le_opNorm _ _
_ β€ (1+d)/2 := by simpa using hnn
obtain β¨N,hNβ© := eventually_atTop.mp hr
apply onePositiveSquare_of_entrywise_tendsto
(A := fun n => Matrix.of fun i j =>
(rescaledKernel C f hf' (sampleOp Ξ½ (quantize (n+N)) C') (s i) (s j))β»ΒΉ)
Β· intro n
exact (sampled_rescaled_reciprocal Ξ½ (quantize (n+N)) C hC hsym hP f hf'
(show 0 β€ (1+d)/2 by dsimp [d]; linarith)
(show (1+d)/2 < 1 by dsimp [d]; linarith)
(hN _ (Nat.le_add_left _ _)) s).2
Β· intro i j
have ht := rescaledKernel_tendsto Ξ½ C (fun z x => (hC z x).le) f hf' hd hd1 hrow (s i) (s j)
rw [hkernel] at ht
exact (ht.invβ (hp _ _).ne').comp (tendsto_add_atTop_nat N)
lemma l2ResolvedKernel_eq_inner (C : C(X Γ X, β))
(hsym : β x y, C (x,y) = C (y,x)) (x y : X) :
l2ResolvedKernel Ξ½ C x y = C (x,y) +
inner β (ContinuousMap.toLp 2 Ξ½ β (C.curry x))
(resolvent (l2Op Ξ½ C) (ContinuousMap.toLp 2 Ξ½ β (C.curry y))) := by
unfold l2ResolvedKernel
rw [hsym y x, l2SectionOp_apply, L2.inner_def]
congr 1
apply integral_congr_ae
filter_upwards [ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ (C.curry x)] with z hz
rw [hz]
change C (z,x) * _ = _ * C (x,z)
rw [hsym z x, mul_comm]
end StrictHotSpots.CompactKernel
open MeasureTheory Filter
open scoped Topology ENNReal
namespace StrictHotSpots.L2Limits
variable {X : Type*} [MeasurableSpace X] {Ξ½ : Measure X}
lemma norm_sq_eq_integral_sq (f : Lp β 2 Ξ½) :
βfβ ^ 2 = β« x, (f x)^2 βΞ½ := by
rw [β real_inner_self_eq_norm_sq, L2.inner_def]
change (β« x, f x * f x βΞ½) = _
simp only [pow_two]
lemma norm_toLp_sub_sq {f g : X β β} (hf : MemLp f 2 Ξ½) (hg : MemLp g 2 Ξ½) :
βhf.toLp f - hg.toLp gβ ^ 2 = β« x, (f x - g x)^2 βΞ½ := by
rw [norm_sq_eq_integral_sq]
apply integral_congr_ae
filter_upwards [Lp.coeFn_sub (hf.toLp f) (hg.toLp g), hf.coeFn_toLp, hg.coeFn_toLp]
with x hx hfx hgx
simp only [hx, hfx, hgx, Pi.sub_apply]
lemma tendsto_toLp_of_dominated {ΞΉ : Type*} {l : Filter ΞΉ} [l.IsCountablyGenerated]
{f : ΞΉ β X β β} {g b : X β β}
(hf : β n, MemLp (f n) 2 Ξ½) (hg : MemLp g 2 Ξ½) (hb : MemLp b 2 Ξ½)
(hdom : βαΆ n in l, βα΅ x βΞ½, βf n xβ β€ b x)
(hlim : βα΅ x βΞ½, Tendsto (fun n => f n x) l (π (g x))) :
Tendsto (fun n => (hf n).toLp (f n)) l (π (hg.toLp g)) := by
have ht : Tendsto (fun n => β« x, (f n x - g x)^2 βΞ½) l (π 0) := by
have hm : βαΆ n in l, AEStronglyMeasurable (fun x => (f n x-g x)^2) Ξ½ :=
Eventually.of_forall fun n => ((hf n).sub hg).aestronglyMeasurable.pow 2
have hd : βαΆ n in l, βα΅ x βΞ½, β(f n x-g x)^2β β€ (b x+βg xβ)^2 := by
filter_upwards [hdom] with n hn
filter_upwards [hn] with x hx
have h1 : βf n x-g xβ β€ b x+βg xβ :=
by linarith [norm_sub_le (f n x) (g x)]
rw [Real.norm_eq_abs, abs_pow, β Real.norm_eq_abs]
exact pow_le_pow_leftβ (norm_nonneg _) h1 2
have hl : βα΅ x βΞ½, Tendsto (fun n => (f n x-g x)^2) l (π (0 : β)) := by
filter_upwards [hlim] with x hx
simpa using (hx.sub_const (g x)).pow 2
simpa using tendsto_integral_filter_of_dominated_convergence
(fun x => (b x+βg xβ)^2) hm hd (hb.add hg.norm).integrable_sq hl
have hs : Tendsto (fun n => β(hf n).toLp (f n)-hg.toLp gβ^2) l (π 0) := by
simpa only [norm_toLp_sub_sq] using ht
rw [tendsto_iff_norm_sub_tendsto_zero]
have hr := Real.continuous_sqrt.continuousAt.tendsto.comp hs
simpa only [Function.comp_def, Real.sqrt_sq (norm_nonneg _), Real.sqrt_zero] using hr
lemma tendsto_L2_of_dominated {ΞΉ : Type*} {l : Filter ΞΉ} [l.IsCountablyGenerated]
(f : ΞΉ β Lp β 2 Ξ½) (g b : Lp β 2 Ξ½)
(hdom : βαΆ n in l, βα΅ x βΞ½, βf n xβ β€ b x)
(hlim : βα΅ x βΞ½, Tendsto (fun n => f n x) l (π (g x))) :
Tendsto f l (π g) := by
have ht := tendsto_toLp_of_dominated (fun n => Lp.memLp (f n)) (Lp.memLp g)
(Lp.memLp b) hdom hlim
simpa only [Lp.toLp_coeFn] using ht
end StrictHotSpots.L2Limits
namespace StrictHotSpots.CompactKernel
open MeasureTheory Filter Set BanachResolvent ReciprocalKernel
open scoped Topology ENNReal
variable {X : Type} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (Ξ½ : Measure X) [IsFiniteMeasure Ξ½]
lemma l2Op_ae_integral (C : C(X Γ X, β)) (f : Lp β 2 Ξ½) :
βα΅ x βΞ½, l2Op Ξ½ C f x = β« z, C (z,x) * f z βΞ½ := by
filter_upwards [ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ (l2SectionOp Ξ½ C f)]
with x hx
exact hx.trans (l2SectionOp_apply Ξ½ C f x)
lemma l2Op_abs_domination (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
(G : X β X β β) (hG : β x, MemLp (fun z => G z x) 2 Ξ½)
(hdom : β x, βα΅ z βΞ½, C (z,x) β€ G z x)
(T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½)
(hT : β f : Lp β 2 Ξ½, βα΅ x βΞ½, T f x = β« z, G z x * f z βΞ½)
(f : Lp β 2 Ξ½) : |l2Op Ξ½ C f| β€ T |f| := by
apply (Lp.coeFn_le _ _).mp
filter_upwards [l2Op_ae_integral Ξ½ C f, hT |f|, Lp.coeFn_abs (l2Op Ξ½ C f)]
with x hx htx hax
rw [hax, hx, htx]
calc
|β« z, C (z,x) * f z βΞ½| β€ β« z, βC (z,x) * f zβ βΞ½ :=
by simpa only [Real.norm_eq_abs] using norm_integral_le_integral_norm (fun z => C (z,x) * f z)
_ β€ β« z, G z x * (|f|) z βΞ½ := by
apply integral_mono_ae
Β· exact (ContinuousMap.memLp (p := (2 : ββ₯0β)) Ξ½ β
(β¨fun z => C (z,x), C.continuous.comp (continuous_id.prodMk continuous_const)β© : C(X,β))).integrable_mul (Lp.memLp f) |>.norm
Β· exact (hG x).integrable_mul (Lp.memLp |f|)
Β· filter_upwards [hdom x, Lp.coeFn_abs f] with z hz hfz
rw [hfz, norm_mul, Real.norm_eq_abs, abs_of_nonneg (hC z x), Real.norm_eq_abs]
exact mul_le_mul_of_nonneg_right hz (abs_nonneg _)
lemma norm_l2Op_le_of_domination (C : C(X Γ X, β)) (hC : β z x, 0 β€ C (z,x))
(G : X β X β β) (hG : β x, MemLp (fun z => G z x) 2 Ξ½)
(hdom : β x, βα΅ z βΞ½, C (z,x) β€ G z x)
(T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½)
(hT : β f : Lp β 2 Ξ½, βα΅ x βΞ½, T f x = β« z, G z x * f z βΞ½) :
βl2Op Ξ½ Cβ β€ βTβ := by
apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg T)
intro f
calc
βl2Op Ξ½ C fβ β€ βT |f|β :=
norm_le_norm_of_abs_le_abs ((l2Op_abs_domination Ξ½ C hC G hG hdom T hT f).trans
(le_abs_self _))
_ β€ βTβ * βfβ := by simpa only [norm_abs_eq_norm] using T.le_opNorm |f|
lemma l2Op_strong_tendsto_of_dominated
(C : β β C(X Γ X, β)) (hC : β n z x, 0 β€ C n (z,x))
(G : X β X β β) (hG : β x, MemLp (fun z => G z x) 2 Ξ½)
(hdom : β n x, βα΅ z βΞ½, C n (z,x) β€ G z x)
(hlim : β x, βα΅ z βΞ½, Tendsto (fun n => C n (z,x)) atTop (π (G z x)))
(T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½)
(hT : β f : Lp β 2 Ξ½, βα΅ x βΞ½, T f x = β« z, G z x * f z βΞ½)
(f : Lp β 2 Ξ½) :
Tendsto (fun n => l2Op Ξ½ (C n) f) atTop (π (T f)) := by
apply L2Limits.tendsto_L2_of_dominated _ _ (T |f|)
Β· apply Eventually.of_forall
intro n
have hd := (Lp.coeFn_le _ _).mpr (l2Op_abs_domination Ξ½ (C n) (hC n) G hG
(hdom n) T hT f)
filter_upwards [hd, Lp.coeFn_abs (l2Op Ξ½ (C n) f)] with x hx hax
simpa only [hax, Real.norm_eq_abs] using hx
Β· have he : βα΅ x βΞ½, β n, l2Op Ξ½ (C n) f x = β« z, C n (z,x) * f z βΞ½ :=
ae_all_iff.mpr fun n => l2Op_ae_integral Ξ½ (C n) f
filter_upwards [he, hT f] with x hx htx
simp only [hx, htx]
apply tendsto_integral_of_dominated_convergence (fun z => G z x * βf zβ)
Β· intro n
exact ((C n).continuous.comp (continuous_id.prodMk continuous_const)).aestronglyMeasurable.mul
(Lp.aestronglyMeasurable f)
Β· exact (hG x).integrable_mul (Lp.memLp f).norm
Β· intro n
filter_upwards [hdom n x] with z hz
rw [norm_mul, Real.norm_eq_abs, abs_of_nonneg (hC n z x)]
exact mul_le_mul_of_nonneg_right hz (norm_nonneg _)
Β· filter_upwards [hlim x] with z hz
exact hz.mul_const (f z)
end StrictHotSpots.CompactKernel
namespace StrictHotSpots.BanachResolvent
open Filter
open scoped Topology
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E]
lemma resolvent_strong_tendsto_moving (A : E βL[β] E) (Q : β β E βL[β] E)
{d : β} (hd : d < 1) (hA : βAβ < 1)
(hQ : βαΆ n in atTop, βQ nβ β€ d)
(hs : β v, Tendsto (fun n => Q n v) atTop (π (A v)))
{v : β β E} {w : E} (hv : Tendsto v atTop (π w)) :
Tendsto (fun n => resolvent (Q n) (v n)) atTop (π (resolvent A w)) := by
have hz : Tendsto (fun n => resolvent (Q n) (v n-w)) atTop (π 0) := by
have hb : Tendsto (fun n => (1-d)β»ΒΉ * βv n-wβ) atTop (π 0) := by
simpa using (hv.sub_const w).norm.const_mul (1-d)β»ΒΉ
apply squeeze_zero_norm' _ hb
filter_upwards [hQ] with n hn
exact (ContinuousLinearMap.le_opNorm _ _).trans
(mul_le_mul_of_nonneg_right (resolvent_norm_le (Q n) hn hd) (norm_nonneg _))
have ht := hz.add (resolvent_strong_tendsto A Q hd hA hQ hs w)
simpa only [map_sub, sub_add_cancel, zero_add] using ht
end StrictHotSpots.BanachResolvent
namespace StrictHotSpots.CompactKernel
open MeasureTheory Filter Set BanachResolvent ReciprocalKernel
open scoped Topology ENNReal
variable {X : Type} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (Ξ½ : Measure X) [IsFiniteMeasure Ξ½]
lemma l2Sections_tendsto_of_dominated
(C : β β C(X Γ X, β)) (hC : β n z x, 0 β€ C n (z,x))
(hsym : β n x y, C n (x,y) = C n (y,x))
(G : X β X β β) (hG : β x, MemLp (fun z => G z x) 2 Ξ½)
(hdom : β n x, βα΅ z βΞ½, C n (z,x) β€ G z x)
(hlim : β x, βα΅ z βΞ½, Tendsto (fun n => C n (z,x)) atTop (π (G z x)))
(x : X) :
Tendsto (fun n => ContinuousMap.toLp 2 Ξ½ β ((C n).curry x)) atTop
(π ((hG x).toLp (fun z => G z x))) := by
apply L2Limits.tendsto_L2_of_dominated _ _ ((hG x).toLp (fun z => G z x))
Β· apply Eventually.of_forall
intro n
filter_upwards [ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ ((C n).curry x),
(hG x).coeFn_toLp, hdom n x] with z hz hgz hdz
rw [hz, hgz]
change βC n (x,z)β β€ G z x
rw [hsym n x z, Real.norm_eq_abs, abs_of_nonneg (hC n z x)]
exact hdz
Β· have he : βα΅ z βΞ½, β n,
ContinuousMap.toLp 2 Ξ½ β ((C n).curry x) z = C n (x,z) :=
ae_all_iff.mpr fun n => ContinuousMap.coeFn_toLp (p := 2) (π := β) Ξ½ ((C n).curry x)
filter_upwards [he, (hG x).coeFn_toLp, hlim x] with z hz hgz hlz
simpa only [hz, hgz, hsym] using hlz
def singularResolvedKernel (G : X β X β β)
(hG : β x, MemLp (fun z => G z x) 2 Ξ½)
(T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½) (x y : X) : β :=
G x y + inner β ((hG x).toLp (fun z => G z x))
(resolvent T ((hG y).toLp (fun z => G z y)))
lemma l2ResolvedKernel_tendsto_of_dominated
(C : β β C(X Γ X, β)) (hC : β n z x, 0 β€ C n (z,x))
(hsym : β n x y, C n (x,y) = C n (y,x))
(G : X β X β β) (hG : β x, MemLp (fun z => G z x) 2 Ξ½)
(hdom : β n x, βα΅ z βΞ½, C n (z,x) β€ G z x)
(hlim : β x, βα΅ z βΞ½, Tendsto (fun n => C n (z,x)) atTop (π (G z x)))
(T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½)
(hT : β f : Lp β 2 Ξ½, βα΅ x βΞ½, T f x = β« z, G z x * f z βΞ½)
(hsub : βTβ < 1) (x y : X)
(hxy : Tendsto (fun n => C n (x,y)) atTop (π (G x y))) :
Tendsto (fun n => l2ResolvedKernel Ξ½ (C n) x y) atTop
(π (singularResolvedKernel Ξ½ G hG T x y)) := by
have hs := l2Sections_tendsto_of_dominated Ξ½ C hC hsym G hG hdom hlim
have hop := l2Op_strong_tendsto_of_dominated Ξ½ C hC G hG hdom hlim T hT
have hb : βαΆ n in atTop, βl2Op Ξ½ (C n)β β€ βTβ :=
Eventually.of_forall fun n => norm_l2Op_le_of_domination Ξ½ (C n) (hC n) G hG
(hdom n) T hT
have hr := resolvent_strong_tendsto_moving T (fun n => l2Op Ξ½ (C n))
hsub hsub hb hop (hs y)
have ht := hxy.add ((hs x).inner hr)
simpa only [singularResolvedKernel, l2ResolvedKernel_eq_inner Ξ½ _ (hsym _)] using ht
lemma singularResolvedKernel_ge
(C : β β C(X Γ X, β)) (hC : β n z x, 0 β€ C n (z,x))
(hsym : β n x y, C n (x,y) = C n (y,x))
(G : X β X β β) (hG : β x, MemLp (fun z => G z x) 2 Ξ½)
(hdom : β n x, βα΅ z βΞ½, C n (z,x) β€ G z x)
(hlim : β x, βα΅ z βΞ½, Tendsto (fun n => C n (z,x)) atTop (π (G z x)))
(T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½)
(hT : β f : Lp β 2 Ξ½, βα΅ x βΞ½, T f x = β« z, G z x * f z βΞ½)
(hsub : βTβ < 1) (x y : X)
(hxy : Tendsto (fun n => C n (x,y)) atTop (π (G x y))) :
G x y β€ singularResolvedKernel Ξ½ G hG T x y := by
apply le_of_tendsto_of_tendsto hxy
(l2ResolvedKernel_tendsto_of_dominated Ξ½ C hC hsym G hG hdom hlim T hT hsub x y hxy)
exact Eventually.of_forall fun n => by
dsimp only
rw [hsym n x y]
exact l2ResolvedKernel_ge Ξ½ (C n) (hC n)
((norm_l2Op_le_of_domination Ξ½ (C n) (hC n) G hG (hdom n) T hT).trans_lt hsub) x y
theorem singular_reciprocal_of_regularization [Nonempty X] [DecidableEq X]
(C : β β C(X Γ X, β)) (hC : β n z x, 0 < C n (z,x))
(hsym : β n x y, C n (x,y) = C n (y,x))
(hP : β n (ΞΉ : Type) [Fintype ΞΉ] (s : ΞΉ β X),
OnePositiveSquare (Matrix.of fun i j => (C n (s i,s j))β»ΒΉ))
(G : X β X β β) (hG : β x, MemLp (fun z => G z x) 2 Ξ½)
(hpos : β x y, x β y β 0 < G x y)
(hdom : β n x, βα΅ z βΞ½, C n (z,x) β€ G z x)
(hlim : β x, βα΅ z βΞ½, Tendsto (fun n => C n (z,x)) atTop (π (G z x)))
(hoff : β x y, x β y β Tendsto (fun n => C n (x,y)) atTop (π (G x y)))
(hdiag : β x, Tendsto (fun n => C n (x,x)) atTop atTop)
(T : Lp β 2 Ξ½ βL[β] Lp β 2 Ξ½)
(hT : β f : Lp β 2 Ξ½, βα΅ x βΞ½, T f x = β« z, G z x * f z βΞ½)
(hsub : βTβ < 1) {ΞΉ : Type} [Fintype ΞΉ] (s : ΞΉ β X) :
OnePositiveSquare (Matrix.of fun i j =>
if s i = s j then 0 else (singularResolvedKernel Ξ½ G hG T (s i) (s j))β»ΒΉ) := by
classical
have hCn : β n z x, 0 β€ C n (z,x) := fun n z x => (hC n z x).le
have hb (n : β) : βl2Op Ξ½ (C n)β < 1 :=
(norm_l2Op_le_of_domination Ξ½ (C n) (hCn n) G hG (hdom n) T hT).trans_lt hsub
apply onePositiveSquare_of_entrywise_tendsto
(A := fun n => Matrix.of fun i j => (l2ResolvedKernel Ξ½ (C n) (s i) (s j))β»ΒΉ)
Β· intro n
exact (compact_reciprocal_of_l2_norm_lt_one Ξ½ (C n) (hC n) (hsym n) (hP n) (hb n) s).2
Β· intro i j
dsimp only [Matrix.of_apply]
split_ifs with hij
Β· have ht : Tendsto (fun n => l2ResolvedKernel Ξ½ (C n) (s i) (s j)) atTop atTop := by
apply tendsto_atTop_mono _ (hdiag (s i))
intro n
simpa only [β hij] using l2ResolvedKernel_ge Ξ½ (C n) (hCn n) (hb n) (s i) (s i)
exact tendsto_inv_atTop_zero.comp ht
Β· have hp := (hpos (s i) (s j) hij).trans_le
(singularResolvedKernel_ge Ξ½ C hCn hsym G hG hdom hlim T hT hsub
(s i) (s j) (hoff (s i) (s j) hij))
exact (l2ResolvedKernel_tendsto_of_dominated Ξ½ C hCn hsym G hG hdom hlim T hT hsub
(s i) (s j) (hoff (s i) (s j) hij)).invβ hp.ne'
end StrictHotSpots.CompactKernel
end SingularLayer
end FullBoundaryCombinedLayer
end
end DouglasLipschitzBase
section DouglasLipschitzBase
noncomputable section
section FullBoundaryCombinedLayer
section SquaredDistanceKernelLayer
noncomputable section
open Set Filter Topology
open scoped BigOperators InnerProductSpace
open scoped NNReal
namespace SquaredDistanceKernel
universe u
variable {X : Type u}
def ConditionallyNegative (D : Matrix X X β) : Prop :=
D.IsHermitian β§ (β x, D x x = 0) β§
β c : X ββ β, c.sum (fun _ a => a) = 0 β
c.sum (fun x a => c.sum (fun y b => a * D x y * b)) β€ 0
def anchored (D : Matrix X X β) (o : X) : Matrix X X β :=
Matrix.of fun x y => (D x o + D y o - D x y) / 2
lemma anchor_sum_identity (D : X β X β β) (o : X) (c : X ββ β) : (c.sum (fun x a => c.sum (fun y b => a * ((D x o + D y o - D x y) / 2) * b))) =
((c.sum (fun x a => a * D x o * (c.sum fun _ b => b))) +
(c.sum (fun y b => (c.sum fun _ a => a) * D y o * b)) -
(c.sum (fun x a => c.sum (fun y b => a * D x y * b)))) / 2 := by
calc
_ = c.sum (fun x a => c.sum (fun y b =>
(a * D x o * b + a * D y o * b - a * D x y * b) / 2)) := by
apply Finsupp.sum_congr
intro x hx
apply Finsupp.sum_congr
intro y hy
ring
_ = _ := by
simp only [Finsupp.sum]
simp only [β Finset.sum_div, Finset.sum_add_distrib, Finset.sum_sub_distrib]
congr 2
congr 1
Β· simp only [β Finset.mul_sum]
Β· rw [Finset.sum_comm]
simp only [β Finset.sum_mul]
lemma anchored_posSemidef {D : Matrix X X β} (hD : ConditionallyNegative D) (o : X) :
(anchored D o).PosSemidef := by
classical
have hs (x y : X) : D x y = D y x := by
simpa using (hD.1.apply x y).symm
refine β¨?_, ?_β©
Β· ext x y
simp [Matrix.conjTranspose_apply, anchored, hs y x, add_comm]
Β· intro c
change 0 β€ c.sum (fun x a => c.sum (fun y b => a * ((D x o + D y o - D x y) / 2) * b))
let m := c.sum (fun _ a => a)
have hm : (c - Finsupp.single o m).sum (fun _ a => a) = 0 := by
simp [Finsupp.sum_sub_index, m]
have hh := hD.2.2 (c - Finsupp.single o m) hm
simp [Finsupp.sum_sub_index, sub_mul, mul_sub, Finsupp.sum_sub,
zero_mul, mul_zero, Finsupp.sum_single_index,
hD.2.1, hs o, sub_zero] at hh
dsimp [m] at hh
rw [anchor_sum_identity (fun x y => D x y) o c]
linarith
def lifted (G : Matrix X X β) : Matrix X X (β βL[β] β) :=
Matrix.of fun x y => G x y β’ ContinuousLinearMap.id β β
lemma lifted_posSemidef {G : Matrix X X β} (hG : G.PosSemidef) :
(lifted G).PosSemidef := by
have hs (x y : X) : G y x = G x y := by simpa using hG.1.apply x y
apply (RKHS.posSemidef_tfae.out 1 3).mpr
refine β¨?_, ?_β©
Β· ext x y
simp [Matrix.conjTranspose_apply, lifted, star_smul,
ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.adjoint_id, hs]
Β· intro c
simpa [lifted, RCLike.inner_apply, hs, mul_comm, mul_left_comm, mul_assoc] using hG.2 c
lemma positive_kernel_realization {G : Matrix X X β} (hG : G.PosSemidef) :
β (H : Type u) (_ : NormedAddCommGroup H) (_ : InnerProductSpace β H)
(_ : CompleteSpace H) (b : X β H), β x y, inner β (b x) (b y) = G x y := by
let K := lifted G
let : Fact K.PosSemidef := β¨lifted_posSemidef hGβ©
let H := RKHS.OfKernel K
refine β¨H, inferInstance, inferInstance, inferInstance, fun x => RKHS.kerFun H x 1, ?_β©
intro x y
rw [β RKHS.kernel_inner]
change inner β (RKHS.kernel (RKHS.OfKernel K) y x 1) 1 = G x y
rw [RKHS.OfKernel.kernel_ofKernel (K := K)]
simp [K, lifted, RCLike.inner_apply,
show G y x = G x y by simpa using hG.1.apply x y]
lemma squared_distance_realization {D : Matrix X X β}
(hD : ConditionallyNegative D) (o : X) :
β (H : Type u) (_ : NormedAddCommGroup H) (_ : InnerProductSpace β H)
(_ : CompleteSpace H) (b : X β H), β x y, βb x - b yβ ^ 2 = D x y := by
obtain β¨H, hn, hi, hc, b, hbβ© := positive_kernel_realization (anchored_posSemidef hD o)
let := hn
let := hi
let := hc
refine β¨H, hn, hi, hc, b, ?_β©
intro x y
rw [norm_sub_sq_real, β real_inner_self_eq_norm_sq, β real_inner_self_eq_norm_sq,
hb, hb, hb]
simp only [anchored, Matrix.of_apply, hD.2.1]
ring
lemma injective_of_distance_positive {H : Type*} [NormedAddCommGroup H]
{D : Matrix X X β} {b : X β H} (hb : β x y, βb x - b yβ ^ 2 = D x y)
(hpos : β x y, x β y β 0 < D x y) : Function.Injective b := by
intro x y heq
by_contra hne
have hh := hpos x y hne
rw [β hb x y, heq, sub_self, norm_zero, zero_pow (by decide)] at hh
exact lt_irrefl _ hh
lemma lipschitz_of_distance_bound [PseudoMetricSpace X] {H : Type*}
[NormedAddCommGroup H] {D : Matrix X X β} {b : X β H} {C : ββ₯0}
(hb : β x y, βb x - b yβ ^ 2 = D x y)
(hbound : β x y, D x y β€ C ^ 2 * dist x y ^ 2) : LipschitzWith C b := by
apply LipschitzWith.of_dist_le_mul
intro x y
rw [dist_eq_norm]
apply (sq_le_sqβ (norm_nonneg _) (mul_nonneg C.coe_nonneg dist_nonneg)).mp
rw [mul_pow, hb]
exact hbound x y
lemma separable_lipschitz_embedding [PseudoMetricSpace X]
[TopologicalSpace.SeparableSpace X] {D : Matrix X X β}
(hD : ConditionallyNegative D) (o : X) {C : ββ₯0}
(hpos : β x y, x β y β 0 < D x y)
(hbound : β x y, D x y β€ (C : β) ^ 2 * dist x y ^ 2) :
β (H : Type u) (_ : NormedAddCommGroup H) (_ : InnerProductSpace β H)
(_ : CompleteSpace H) (_ : TopologicalSpace.SeparableSpace H) (b : X β H),
Function.Injective b β§ LipschitzWith C b β§ β x y, βb x - b yβ ^ 2 = D x y := by
obtain β¨H, hn, hi, hc, b, hbβ© := squared_distance_realization hD o
let := hn
let := hi
let := hc
have hl := lipschitz_of_distance_bound hb hbound
let S := (Submodule.span β (Set.range b)).topologicalClosure
have hsep : TopologicalSpace.IsSeparable (S : Set H) := by
rw [Submodule.topologicalClosure_coe]
exact ((TopologicalSpace.isSeparable_range hl.continuous).span (R := β)).closure
let := hsep.separableSpace
let b' : X β S := fun x => β¨b x,
(Submodule.span β (Set.range b)).le_topologicalClosure (Submodule.subset_span β¨x, rflβ©)β©
have hb' (x y : X) : βb' x - b' yβ ^ 2 = D x y := hb x y
refine β¨S, inferInstance, inferInstance, inferInstance, inferInstance, b',
injective_of_distance_positive hb' hpos, lipschitz_of_distance_bound hb' hbound, hb'β©
end SquaredDistanceKernel
end
end SquaredDistanceKernelLayer
end FullBoundaryCombinedLayer
end
end DouglasLipschitzBase
end OAI
import OAI.Analysis.HotSpots.Basic
namespace OAI
section DouglasLipschitzBase
noncomputable section
section FullBoundaryCombinedLayer
section SingularLayer
namespace ReciprocalKernel
open Matrix Filter Topology
open scoped BigOperators
variable {ΞΉ : Type*} [Fintype ΞΉ]
def pairing (A : Matrix ΞΉ ΞΉ β) (x y : ΞΉ β β) : β := x β¬α΅₯ A *α΅₯ y
lemma pairing_symm {A : Matrix ΞΉ ΞΉ β} (hA : A.IsSymm) (x y : ΞΉ β β) :
pairing A x y = pairing A y x := by
simpa only [pairing, hA.eq] using Matrix.dotProduct_transpose_mulVec A x y
lemma pairing_sub_smul (A : Matrix ΞΉ ΞΉ β) (x y : ΞΉ β β) (t : β) :
pairing A (y - t β’ x) (y - t β’ x) =
pairing A y y - t * pairing A y x - t * pairing A x y + t ^ 2 * pairing A x x := by
simp only [pairing, Matrix.mulVec_sub, Matrix.mulVec_smul, sub_dotProduct,
dotProduct_sub, dotProduct_smul, smul_dotProduct, smul_eq_mul]
ring
lemma pairing_sub_smul_right (A : Matrix ΞΉ ΞΉ β) (x y z : ΞΉ β β) (t : β) :
pairing A x (y - t β’ z) = pairing A x y - t * pairing A x z := by
simp only [pairing, Matrix.mulVec_sub, Matrix.mulVec_smul, dotProduct_sub,
dotProduct_smul, smul_eq_mul]
lemma pairing_add_smul_right (A : Matrix ΞΉ ΞΉ β) (x y z : ΞΉ β β) (t : β) :
pairing A x (y + t β’ z) = pairing A x y + t * pairing A x z := by
simp only [pairing, Matrix.mulVec_add, Matrix.mulVec_smul, dotProduct_add,
dotProduct_smul, smul_eq_mul]
lemma pairing_add_smul (A : Matrix ΞΉ ΞΉ β) (x y : ΞΉ β β) (t : β) :
pairing A (y + t β’ x) (y + t β’ x) =
pairing A y y + t * pairing A y x + t * pairing A x y + t ^ 2 * pairing A x x := by
simp only [pairing, Matrix.mulVec_add, Matrix.mulVec_smul, add_dotProduct,
dotProduct_add, dotProduct_smul, smul_dotProduct, smul_eq_mul]
ring
lemma pairing_tendsto {A : β β Matrix ΞΉ ΞΉ β} {B : Matrix ΞΉ ΞΉ β}
(hlim : β i j, Tendsto (fun n => A n i j) atTop (π (B i j))) (x y : ΞΉ β β) :
Tendsto (fun n => pairing (A n) x y) atTop (π (pairing B x y)) := by
unfold pairing dotProduct Matrix.mulVec
exact tendsto_finsetSum _ (fun i _ => tendsto_const_nhds.mul
(tendsto_finsetSum _ fun j _ => (hlim i j).mul tendsto_const_nhds))
def OnePositiveSquare (A : Matrix ΞΉ ΞΉ β) : Prop :=
A.IsSymm β§ β x y : ΞΉ β β, 0 < pairing A x x β pairing A x y = 0 β pairing A y y β€ 0
lemma onePositiveSquare_reverse_cauchy {A : Matrix ΞΉ ΞΉ β} (hA : OnePositiveSquare A)
(x y : ΞΉ β β) (hx : 0 < pairing A x x) :
pairing A x x * pairing A y y β€ (pairing A x y) ^ 2 := by
have hz : pairing A x (y - (pairing A x y / pairing A x x) β’ x) = 0 := by
rw [pairing_sub_smul_right]
field_simp
ring
have hn := hA.2 x _ hx hz
rw [pairing_sub_smul, pairing_symm hA.1 y x] at hn
have he : pairing A y y - (pairing A x y / pairing A x x) * pairing A x y -
(pairing A x y / pairing A x x) * pairing A x y +
(pairing A x y / pairing A x x) ^ 2 * pairing A x x =
pairing A y y - (pairing A x y) ^ 2 / pairing A x x := by
field_simp
ring
rw [he] at hn
have := (le_div_iffβ hx).mp (sub_nonpos.mp hn)
nlinarith
lemma onePositiveSquare_of_entrywise_tendsto {A : β β Matrix ΞΉ ΞΉ β}
{B : Matrix ΞΉ ΞΉ β} (hA : β n, OnePositiveSquare (A n))
(hlim : β i j, Tendsto (fun n => A n i j) atTop (π (B i j))) :
OnePositiveSquare B := by
refine β¨?_, ?_β©
Β· ext i j
exact tendsto_nhds_unique (hlim j i)
((hlim i j).congr fun n => (hA n).1.apply i j |>.symm)
Β· intro x y hx hxy
have hxx := pairing_tendsto hlim x x
have hyy := pairing_tendsto hlim y y
have hxy' := pairing_tendsto hlim x y
have hp : βαΆ n in atTop, 0 < pairing (A n) x x :=
hxx.eventually_const_lt hx
have hn : pairing B x x * pairing B y y - (pairing B x y) ^ 2 β€ 0 := by
apply le_of_tendsto ((hxx.mul hyy).sub (hxy'.pow 2))
filter_upwards [hp] with n hn
exact sub_nonpos.mpr (onePositiveSquare_reverse_cauchy (hA n) x y hn)