Buckets:
| import OAI.Probability.RadialTransition.GrandPartition | |
| namespace OAI | |
| universe uIndex | |
| noncomputable section | |
| open scoped BigOperators NNReal ContDiff ENNReal | |
| open Filter MeasureTheory Set | |
| namespace RadialTransition | |
| theorem volume_translateSet (A : Set Position) (a : Position) (hA : MeasurableSet A) : | |
| volume (translateSet a A) = volume A := by | |
| exact (measurePreserving_sub_right volume a).measure_preimage hA.nullMeasurableSet | |
| def boxOrigin {n : ℕ} (s : ℝ) (j : Fin 3 → Fin n) : Position := | |
| WithLp.toLp 2 (fun k => (j k : ℝ) * (s + 2)) | |
| def boxRegion {n : ℕ} (s : ℝ) (j : Fin 3 → Fin n) : Set Position := | |
| translateSet (boxOrigin s j) (cube s) | |
| theorem measurableSet_boxRegion {n : ℕ} (s : ℝ) (j : Fin 3 → Fin n) : | |
| MeasurableSet (boxRegion s j) := measurableSet_translate (measurableSet_cube s) | |
| theorem volume_boxRegion {n : ℕ} (s : ℝ) (j : Fin 3 → Fin n) : | |
| volume (boxRegion s j) = ENNReal.ofReal s ^ 3 := by | |
| rw [boxRegion, volume_translateSet _ _ (measurableSet_cube s), volume_cube] | |
| theorem boxRegion_subset_cube {n : ℕ} {s L : ℝ} (hs : 0 ≤ s) | |
| (hn : (n : ℝ) * (s + 2) ≤ L) (j : Fin 3 → Fin n) : boxRegion s j ⊆ cube L := by | |
| intro x hx k | |
| have hxx : ∀ k, 0 ≤ x k - (j k : ℝ) * (s + 2) ∧ | |
| x k - (j k : ℝ) * (s + 2) ≤ s := hx | |
| have hj : (j k : ℝ) + 1 ≤ n := by exact_mod_cast (j k).isLt | |
| have hj0 : 0 ≤ (j k : ℝ) := by positivity | |
| have hp := mul_le_mul_of_nonneg_right hj (show 0 ≤ s + 2 by linarith) | |
| have hp0 : 0 ≤ (j k : ℝ) * (s + 2) := mul_nonneg hj0 (by linarith) | |
| exact ⟨by linarith [(hxx k).1], by linarith [(hxx k).2]⟩ | |
| theorem boxRegion_dist {n : ℕ} {s : ℝ} (hs : 0 ≤ s) {j k : Fin 3 → Fin n} | |
| (hjk : j ≠ k) {x y : Position} (hx : x ∈ boxRegion s j) (hy : y ∈ boxRegion s k) : | |
| 2 ≤ dist x y := by | |
| have hc {j k : Fin 3 → Fin n} {x y : Position} (q : Fin 3) (hq : j q < k q) | |
| (hx : x ∈ boxRegion s j) (hy : y ∈ boxRegion s k) : 2 ≤ dist x y := by | |
| have hq' : (j q : ℝ) + 1 ≤ (k q : ℝ) := by exact_mod_cast hq | |
| have hp := mul_le_mul_of_nonneg_right hq' (show 0 ≤ s + 2 by linarith) | |
| have hx' : x q - (j q : ℝ) * (s + 2) ≤ s := (hx q).2 | |
| have hy' : 0 ≤ y q - (k q : ℝ) * (s + 2) := (hy q).1 | |
| have hh : 2 ≤ y q - x q := by linarith | |
| calc | |
| 2 ≤ y q - x q := hh | |
| _ ≤ |y q - x q| := le_abs_self _ | |
| _ ≤ ‖y - x‖ := by simpa only [PiLp.sub_apply, Real.norm_eq_abs] using PiLp.norm_apply_le (y - x) q | |
| _ = dist x y := by rw [← dist_eq_norm, dist_comm] | |
| obtain ⟨q, hq⟩ := Function.ne_iff.mp hjk | |
| rcases lt_or_gt_of_ne hq with h | h | |
| · exact hc q h hx hy | |
| · simpa only [dist_comm] using hc q h hy hx | |
| theorem boxRegion_disjoint {n : ℕ} {s : ℝ} (hs : 0 ≤ s) {j k : Fin 3 → Fin n} | |
| (hjk : j ≠ k) : Disjoint (boxRegion s j) (boxRegion s k) := by | |
| rw [Set.disjoint_left] | |
| intro x hx hy | |
| have hh := boxRegion_dist hs hjk hx hy | |
| norm_num at hh | |
| theorem grandOn_biUnion_lower {ι : Type uIndex} [DecidableEq ι] | |
| {φ : Potential} (hφ : Continuous φ) (hb : IsBoundedPotential φ) | |
| {B β : ℝ} (hstable : StableWith φ B) (hβ : 0 ≤ β) | |
| (S : Finset ι) (A : ι → Set Position) (z : ℝ) | |
| (hA : ∀ i ∈ S, MeasurableSet (A i)) (hAfin : ∀ i ∈ S, volume (A i) ≠ ⊤) | |
| (hdisj : ∀ i ∈ S, ∀ j ∈ S, i ≠ j → Disjoint (A i) (A j)) | |
| (hc : ∀ i ∈ S, ∀ j ∈ S, i ≠ j → ∀ x ∈ A i, ∀ y ∈ A j, φ (nndist x y) ≤ 0) : | |
| (∏ i ∈ S, grandOn φ (A i) β z) ≤ grandOn φ (⋃ i ∈ S, A i) β z := by | |
| induction S using Finset.induction_on with | |
| | empty => | |
| simpa using (grandOn_bounds hφ hb hstable hβ (by simp : volume (∅ : Set Position) ≠ ⊤) z).1 | |
| | @insert i S hi ih => | |
| have hAs : ∀ j ∈ S, MeasurableSet (A j) := fun j hj => hA j (Finset.mem_insert_of_mem hj) | |
| have hfins : ∀ j ∈ S, volume (A j) ≠ ⊤ := fun j hj => hAfin j (Finset.mem_insert_of_mem hj) | |
| have hU : MeasurableSet (⋃ j ∈ S, A j) := Finset.measurableSet_biUnion S hAs | |
| have hUfin : volume (⋃ j ∈ S, A j) ≠ ⊤ := | |
| ne_top_of_le_ne_top (ENNReal.sum_ne_top.mpr hfins) (measure_biUnion_finset_le S A) | |
| have hdU : Disjoint (A i) (⋃ j ∈ S, A j) := by | |
| simp only [Set.disjoint_iUnion_right] | |
| intro j hj | |
| exact hdisj i (Finset.mem_insert_self _ _) j (Finset.mem_insert_of_mem hj) | |
| (by rintro rfl; exact hi hj) | |
| have hcU : ∀ x ∈ A i, ∀ y ∈ ⋃ j ∈ S, A j, φ (nndist x y) ≤ 0 := by | |
| intro x hx y hy | |
| obtain ⟨j, hj, hy⟩ := Set.mem_iUnion₂.mp hy | |
| exact hc i (Finset.mem_insert_self _ _) j (Finset.mem_insert_of_mem hj) | |
| (by rintro rfl; exact hi hj) x hx y hy | |
| have hi' := ih hAs hfins | |
| (fun j hj k hk hne => hdisj j (Finset.mem_insert_of_mem hj) k (Finset.mem_insert_of_mem hk) hne) | |
| (fun j hj k hk hne => hc j (Finset.mem_insert_of_mem hj) k (Finset.mem_insert_of_mem hk) hne) | |
| rw [Finset.prod_insert hi] | |
| have hnn := (grandOn_bounds hφ hb hstable hβ (hAfin i (Finset.mem_insert_self _ _)) z).1 | |
| have hprod := mul_le_mul_of_nonneg_left hi' (show 0 ≤ grandOn φ (A i) β z by linarith) | |
| refine hprod.trans ?_ | |
| have hu : (⋃ j ∈ insert i S, A j) = A i ∪ ⋃ j ∈ S, A j := by ext x; simp | |
| rw [hu] | |
| exact grandOn_union_lower hφ hb hstable hβ | |
| (hA i (Finset.mem_insert_self _ _)) hU hdU (hAfin i (Finset.mem_insert_self _ _)) hUfin hcU z | |
| theorem partition_replication {φ : Potential} (hφ : Continuous φ) (hb : IsBoundedPotential φ) | |
| {β s L : ℝ} (hβ : 0 ≤ β) (hs : 0 ≤ s) | |
| (hc : ∀ r : ℝ≥0, 2 ≤ (r : ℝ) → φ r ≤ 0) (n : ℕ) | |
| (hn : (n : ℝ) * (s + 2) ≤ L) (m : (Fin 3 → Fin n) → ℕ) : | |
| (∏ j, partition φ s (m j) β) ≤ partition φ L (∑ j, m j) β := by | |
| classical | |
| have hh := partitionOn_biUnion_lower Finset.univ (boxRegion s) hφ hb hβ | |
| (fun j _ => measurableSet_boxRegion s j) | |
| (fun j _ => by rw [volume_boxRegion]; finiteness) | |
| (fun _ _ _ _ hne => boxRegion_disjoint hs hne) | |
| (fun _ _ _ _ hne _ hx _ hy => hc _ (boxRegion_dist hs hne hx hy)) m | |
| have hsub : (⋃ j ∈ (Finset.univ : Finset (Fin 3 → Fin n)), boxRegion s j) ⊆ cube L := by | |
| intro x hx | |
| obtain ⟨j, _, hx⟩ := Set.mem_iUnion₂.mp hx | |
| exact boxRegion_subset_cube hs hn j hx | |
| have hh' := hh.trans (partitionOn_mono hφ hb β _ hsub (by rw [volume_cube]; finiteness)) | |
| simpa only [boxRegion, partitionOn_translate, partitionOn_cube] using hh' | |
| theorem grandPartition_replication {φ : Potential} (hφ : Continuous φ) (hb : IsBoundedPotential φ) | |
| {B β s L : ℝ} (hstable : StableWith φ B) (hβ : 0 ≤ β) (hs : 0 ≤ s) | |
| (hc : ∀ r : ℝ≥0, 2 ≤ (r : ℝ) → φ r ≤ 0) (n : ℕ) | |
| (hn : (n : ℝ) * (s + 2) ≤ L) (t h : ℝ) : | |
| grandPartition φ t s β h ^ (n ^ 3) ≤ grandPartition φ t L β h := by | |
| classical | |
| have hh := grandOn_biUnion_lower hφ hb hstable hβ Finset.univ (boxRegion s) (t * h) | |
| (fun j _ => measurableSet_boxRegion s j) | |
| (fun j _ => by rw [volume_boxRegion]; finiteness) | |
| (fun _ _ _ _ hne => boxRegion_disjoint hs hne) | |
| (fun _ _ _ _ hne _ hx _ hy => hc _ (boxRegion_dist hs hne hx hy)) | |
| have hsub : (⋃ j ∈ (Finset.univ : Finset (Fin 3 → Fin n)), boxRegion s j) ⊆ cube L := by | |
| intro x hx | |
| obtain ⟨j, _, hx⟩ := Set.mem_iUnion₂.mp hx | |
| exact boxRegion_subset_cube hs hn j hx | |
| have hh' := hh.trans (grandOn_mono hφ hb hstable hβ hsub (by rw [volume_cube]; finiteness) (t * h)) | |
| simpa only [boxRegion, grandOn_translate, grandOn_cube, Finset.prod_const, | |
| Finset.card_univ, Fintype.card_fun, Fintype.card_fin] using hh' | |
| end RadialTransition | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 7.71 kB
- Xet hash:
- 3ba32f479d36951c5ef0f4cac537bf6062bc7cf8f328439a5b99a442c2f98c4e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.