cfahlgren1's picture
download
raw
2.1 kB
import OAI.Probability.PosteriorReplicas.Model
namespace OAI
open MeasureTheory ProbabilityTheory Set Filter
open scoped ENNReal NNReal RealInnerProductSpace
noncomputable section
universe u
namespace PosteriorRegression
open scoped Topology
section FiniteNets
variable {E : Type*} [PseudoMetricSpace E]
theorem exists_net_of_finite_packing_bound (A : Set E) {r : ℝ} (hr : 0 ≤ r) (N : ℕ)
(hcard : ∀ s : Finset E, (∀ x ∈ s, x ∈ A) →
(∀ x ∈ s, ∀ y ∈ s, x ≠ y → r < dist x y) → s.card ≤ N) :
∃ s : Finset E, (∀ x ∈ s, x ∈ A) ∧
(∀ x ∈ s, ∀ y ∈ s, x ≠ y → r < dist x y) ∧
∀ x ∈ A, ∃ y ∈ s, dist x y ≤ r := by
classical
let S : Set ℕ := {n | ∃ s : Finset E, (∀ x ∈ s, x ∈ A) ∧
(∀ x ∈ s, ∀ y ∈ s, x ≠ y → r < dist x y) ∧ s.card = n}
have hS : S.Finite := (Set.finite_Iic N).subset (by
rintro n ⟨s, hs, hsep, rfl⟩
exact hcard s hs hsep)
have hS0 : S.Nonempty := ⟨0, ∅, by simp⟩
obtain ⟨n, hn, hmax⟩ := Set.exists_max_image S id hS hS0
obtain ⟨s, hs, hsep, rfl⟩ := hn
refine ⟨s, hs, hsep, ?_⟩
intro x hx
by_contra! hnot
have hxs : x ∉ s := by
intro h
have := hnot x h
simpa using lt_of_le_of_lt hr this
have hins : ∀ y ∈ insert x s, y ∈ A := by
intro y hy
rcases Finset.mem_insert.mp hy with rfl | hy
· exact hx
· exact hs y hy
have hsep' : ∀ y ∈ insert x s, ∀ z ∈ insert x s, y ≠ z → r < dist y z := by
intro y hy z hz hne
rcases Finset.mem_insert.mp hy with hxy | hys
· subst y
rcases Finset.mem_insert.mp hz with hxz | hzs
· exact (hne hxz.symm).elim
· exact hnot z hzs
· rcases Finset.mem_insert.mp hz with hxz | hzs
· subst z
simpa [dist_comm] using hnot y hys
· exact hsep y hys z hzs hne
have hinS : (insert x s).card ∈ S := ⟨insert x s, hins, hsep', rfl⟩
have hh := hmax _ hinS
simp only [id_eq, Finset.card_insert_of_notMem hxs] at hh
omega
end FiniteNets
end PosteriorRegression
end
end OAI

Xet Storage Details

Size:
2.1 kB
·
Xet hash:
130c9e66969c39f80117a61e270764c4b13fd1022e59b0b96d9ba1eae694b935

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