cfahlgren1/math / lean /OAI /Probability /SpanningForest /CoordinateTruncation.lean
cfahlgren1's picture
download
raw
5.73 kB
import Mathlib
namespace OAI
noncomputable section
open Filter
open scoped BigOperators Topology ENNReal
namespace Problem336.CoordinateTruncation
variable {ฮน ๐•œ : Type*} [DecidableEq ฮน] [RCLike ๐•œ]
abbrev Space (ฮน ๐•œ : Type*) [RCLike ๐•œ] := lp (fun _ : ฮน => ๐•œ) 2
def truncate (s : Finset ฮน) : Space ฮน ๐•œ โ†’L[๐•œ] Space ฮน ๐•œ :=
โˆ‘ i โˆˆ s, (lp.singleContinuousLinearMap ๐•œ (fun _ : ฮน => ๐•œ) 2 i).comp
(lp.evalCLM ๐•œ (fun _ : ฮน => ๐•œ) 2 i)
lemma truncate_eq_sum (s : Finset ฮน) (x : Space ฮน ๐•œ) :
truncate s x = โˆ‘ i โˆˆ s, lp.single 2 i (x i) := by
simp only [truncate, sum_apply, ContinuousLinearMap.comp_apply,
lp.singleContinuousLinearMap_apply]
rfl
@[simp] theorem truncate_apply (s : Finset ฮน) (x : Space ฮน ๐•œ) (i : ฮน) :
truncate s x i = if i โˆˆ s then x i else 0 := by
rw [truncate_eq_sum]
simp only [lp.coeFn_sum, Finset.sum_apply, lp.single_apply, Finset.sum_pi_single]
theorem tendsto_truncate (s : โ„• โ†’ Finset ฮน) (hmono : Monotone s)
(hcover : โˆ€ i, โˆƒ n, i โˆˆ s n) (x : Space ฮน ๐•œ) :
Tendsto (fun n => truncate (s n) x) atTop (๐“ x) := by
simpa only [truncate_eq_sum, Function.comp_def] using
(lp.hasSum_single (by norm_num : (2 : โ„โ‰ฅ0โˆž) โ‰  โŠค) x).comp
(hmono.tendsto_atTop_finset hcover)
def supported (s : Set ฮน) : Submodule ๐•œ (Space ฮน ๐•œ) where
carrier := {x | โˆ€ i, i โˆ‰ s โ†’ x i = 0}
zero_mem' := by simp
add_mem' := by intro x y hx hy i hi; simp [hx i hi, hy i hi]
smul_mem' := by intro c x hx i hi; simp [hx i hi]
omit [DecidableEq ฮน] in
@[simp] theorem mem_supported (s : Set ฮน) (x : Space ฮน ๐•œ) :
x โˆˆ supported s โ†” โˆ€ i, i โˆ‰ s โ†’ x i = 0 := Iff.rfl
omit [DecidableEq ฮน] in
theorem supported_mono {s t : Set ฮน} (h : s โІ t) :
supported (๐•œ := ๐•œ) s โ‰ค supported t := by
intro x hx i hi
exact hx i (fun hs => hi (h hs))
instance supported_isClosed (s : Set ฮน) :
IsClosed (supported (๐•œ := ๐•œ) s : Set (Space ฮน ๐•œ)) := by
change IsClosed {x : Space ฮน ๐•œ | โˆ€ i, i โˆ‰ s โ†’ x i = 0}
simp only [Set.ofPred_forall]
apply isClosed_iInter
intro i
apply isClosed_iInter
intro hi
exact isClosed_eq ((continuous_apply i).comp lp.uniformContinuous_coe.continuous)
continuous_const
instance supported_completeSpace (s : Set ฮน) :
CompleteSpace (supported (๐•œ := ๐•œ) s) := IsClosed.completeSpace_coe
instance supported_hasOrthogonalProjection (s : Set ฮน) :
(supported (๐•œ := ๐•œ) s).HasOrthogonalProjection := inferInstance
theorem single_mem_supported {s : Set ฮน} {i : ฮน} (hi : i โˆˆ s) (a : ๐•œ) :
lp.single 2 i a โˆˆ supported s := by
intro j hj
have hji : j โ‰  i := by intro h; subst j; exact hj hi
simp [lp.single_apply, Pi.single_eq_of_ne hji]
theorem supported_starProjection_apply (s : Set ฮน) [DecidablePred (ยท โˆˆ s)] (x : Space ฮน ๐•œ) (i : ฮน) :
(supported s).starProjection x i = if i โˆˆ s then x i else 0 := by
classical
by_cases hi : i โˆˆ s
ยท rw [ite_eq_left hi]
have ho := (supported s).sub_starProjection_mem_orthogonal x
(lp.single 2 i (1 : ๐•œ)) (single_mem_supported hi 1)
rw [lp.inner_single_left] at ho
simpa using (sub_eq_zero.mp (by simpa using ho) :
x i = (supported s).starProjection x i).symm
ยท rw [ite_eq_right hi]
exact (supported s).starProjection_apply_mem x i hi
theorem truncate_mem_supported (s : Finset ฮน) (x : Space ฮน ๐•œ) :
truncate s x โˆˆ supported (s : Set ฮน) := by
intro i hi
simp only [Finset.mem_coe] at hi
simp [hi]
theorem sub_truncate_mem_orthogonal (s : Finset ฮน) (x : Space ฮน ๐•œ) :
x - truncate s x โˆˆ (supported (s : Set ฮน))แ—ฎ := by
intro y hy
rw [lp.inner_eq_tsum]
have hz : โˆ€ i, inner ๐•œ (y i) ((x - truncate s x) i) = 0 := by
intro i
by_cases hi : i โˆˆ s
ยท simp [hi]
ยท have hyi : y i = 0 := hy i hi
simp [hyi]
simp only [hz, tsum_zero]
theorem starProjection_supported (s : Finset ฮน) :
(supported (๐•œ := ๐•œ) (s : Set ฮน)).starProjection = truncate s := by
apply ContinuousLinearMap.ext
intro x
exact Submodule.eq_starProjection_of_mem_orthogonal
(truncate_mem_supported s x) (sub_truncate_mem_orthogonal s x)
theorem closure_iSup_supported (s : โ„• โ†’ Finset ฮน) (S : Set ฮน)
(hcover : โˆ€ i, i โˆˆ S โ†” โˆƒ n, i โˆˆ s n) :
(โจ† n, supported (๐•œ := ๐•œ) (s n : Set ฮน)).topologicalClosure = supported S := by
apply le_antisymm
ยท apply Submodule.topologicalClosure_minimal
ยท apply iSup_le
intro n
apply supported_mono
intro i hi
exact (hcover i).mpr โŸจn, hiโŸฉ
ยท exact supported_isClosed S
ยท intro x hx
rw [โ† SetLike.mem_coe, Submodule.topologicalClosure_coe]
apply mem_closure_of_tendsto
(lp.hasSum_single (by norm_num : (2 : โ„โ‰ฅ0โˆž) โ‰  โŠค) x)
apply Eventually.of_forall
intro t
apply Submodule.sum_mem
intro i hi
by_cases his : i โˆˆ S
ยท obtain โŸจn, hinโŸฉ := (hcover i).mp his
exact Submodule.mem_iSup_of_mem n (single_mem_supported hin (x i))
ยท simp only [hx i his, lp.single_zero]
exact Submodule.zero_mem _
theorem tendsto_truncate_supported (s : โ„• โ†’ Finset ฮน) (hmono : Monotone s)
(S : Set ฮน) (hcover : โˆ€ i, i โˆˆ S โ†” โˆƒ n, i โˆˆ s n) (x : Space ฮน ๐•œ) :
Tendsto (fun n => truncate (s n) x) atTop
(๐“ ((supported S).starProjection x)) := by
have h := Submodule.starProjection_tendsto_closure_iSup
(fun n => supported (๐•œ := ๐•œ) (s n : Set ฮน))
(fun m n hmn => supported_mono (hmono hmn)) x
simpa only [starProjection_supported, closure_iSup_supported s S hcover] using h
end Problem336.CoordinateTruncation
end
end OAI

Xet Storage Details

Size:
5.73 kB
ยท
Xet hash:
45f438062274821da63f63f54653d097ff8565d51aa69ce9bda54c274d29b989

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.