Buckets:
| import OAI.Geometry.Convex.GeneralMahler.Transform | |
| namespace OAI | |
| /-! The cone over the affine section t=1. Coordinates here ordered t,x. -/ | |
| noncomputable section | |
| open Filter Set MeasureTheory Real WithLp | |
| open scoped ENNReal NNReal Topology Pointwise RealInnerProductSpace | |
| namespace GeneralMahler | |
| /-- Paper K is a real convex body *with interior*. -/ | |
| structure Body (n : ℕ) extends ConvexBody (Rn n) where | |
| solid : (interior carrier).Nonempty | |
| namespace Body | |
| variable {n : ℕ} | |
| instance : SetLike (Body n) (Rn n) where | |
| coe K := K.carrier | |
| coe_injective A B h := by cases A; cases B; congr; exact ConvexBody.ext h | |
| protected theorem isCompact (K : Body n) : IsCompact (K : Set (Rn n)) := K.isCompact' | |
| protected theorem isClosed (K : Body n) : IsClosed (K : Set (Rn n)) := K.isCompact.isClosed | |
| protected theorem convex (K : Body n) : Convex ℝ (K : Set (Rn n)) := K.convex' | |
| protected theorem has_interior (K : Body n) : (interior (K : Set (Rn n))).Nonempty := K.solid | |
| protected theorem nonempty (K : Body n) : (K : Set (Rn n)).Nonempty := K.nonempty' | |
| end Body | |
| abbrev LiftSpace (n : ℕ) := WithLp 2 (ℝ × Rn n) | |
| variable {n : ℕ} | |
| def pair (s : ℝ) (x : Rn n) : LiftSpace n := WithLp.toLp 2 (s,x) | |
| def hgt (p : LiftSpace n) : ℝ := p.fst | |
| def horiz (p : LiftSpace n) : Rn n := p.snd | |
| @[simp] theorem pair_hgt (s : ℝ) (x : Rn n) : hgt (pair s x) = s := rfl | |
| @[simp] theorem pair_horiz (s : ℝ) (x : Rn n) : horiz (pair s x) = x := rfl | |
| @[simp] theorem hgt_horiz_pair (p : LiftSpace n) : pair (hgt p) (horiz p) = p := rfl | |
| @[simp] theorem pair_zero : pair 0 (0:Rn n) = 0 := rfl | |
| @[simp] theorem pair_inner (s t : ℝ) (x y : Rn n) : | |
| ⟪pair s x, pair t y⟫ = t*s + ⟪x,y⟫ := rfl | |
| @[simp] theorem hgt_add (p q : LiftSpace n) : hgt (p+q) = hgt p + hgt q := rfl | |
| @[simp] theorem horiz_add (p q : LiftSpace n) : horiz (p+q) = horiz p + horiz q := rfl | |
| @[simp] theorem hgt_smul (a : ℝ) (p : LiftSpace n) : hgt (a • p) = a * hgt p := rfl | |
| @[simp] theorem horiz_smul (a : ℝ) (p : LiftSpace n) : | |
| horiz (a • p) = a • horiz p := rfl | |
| theorem smul_pair (a t : ℝ) (x : Rn n) : | |
| a • pair t x = pair (a*t) (a • x) := rfl | |
| @[fun_prop] theorem continuous_pair : Continuous (fun p : ℝ × Rn n => pair p.1 p.2) := | |
| WithLp.prod_continuous_toLp .. | |
| @[fun_prop] theorem continuous_pair' {X : Type*} [TopologicalSpace X] {a : X → ℝ} | |
| {b : X → Rn n} (ha : Continuous a) (hb : Continuous b) : | |
| Continuous (fun x => pair (a x) (b x)) := continuous_pair.comp (ha.prodMk hb) | |
| @[fun_prop] theorem continuous_hgt : Continuous (@hgt n) := | |
| continuous_fst.comp (WithLp.prod_continuous_ofLp ..) | |
| @[fun_prop] theorem continuous_horiz : Continuous (@horiz n) := | |
| continuous_snd.comp (WithLp.prod_continuous_ofLp ..) | |
| namespace Body | |
| /-- The solid pointed cone generated by (1,K). -/ | |
| def cone (K : Body n) : ProperCone ℝ (LiftSpace n) where | |
| carrier := {p | 0 ≤ hgt p ∧ ∃ x ∈ (K:Set (Rn n)), horiz p = hgt p • x} | |
| zero_mem' := by simpa [hgt,horiz, Set.Nonempty] using K.nonempty | |
| add_mem' := by | |
| rintro p q ⟨hp, x, hx, he⟩ ⟨hq, y, hy, hf⟩ | |
| change 0 ≤ hgt (p+q) ∧ _ | |
| simp only [hgt_add,horiz_add, he,hf] | |
| refine ⟨add_nonneg hp hq,?_⟩ | |
| set t := hgt p + hgt q | |
| by_cases ht : t = 0 | |
| · have ha : hgt p = 0 := by dsimp [t] at ht; linarith | |
| have hb : hgt q = 0 := by dsimp [t] at ht; linarith | |
| exact ⟨x,hx,by simp [ha,hb,ht]⟩ | |
| · have ht' : 0 < t := lt_of_le_of_ne (add_nonneg hp hq) (Ne.symm ht) | |
| refine ⟨(hgt p/t) • x + (hgt q/t) • y, K.convex hx hy | |
| (div_nonneg hp ht'.le) (div_nonneg hq ht'.le) (by rw [← add_div]; exact div_self ht),?_⟩ | |
| rw [smul_add, smul_smul, smul_smul, mul_div_cancel₀ _ ht, mul_div_cancel₀ _ ht] | |
| smul_mem' := by | |
| rintro ⟨r,hr⟩ p ⟨hp,x,hx,he⟩ | |
| change 0 ≤ hgt (r • p) ∧ _ | |
| change 0 ≤ r * hgt p ∧ ∃ x ∈ (K:Set (Rn n)), r • horiz p = (r * hgt p) • x | |
| exact ⟨mul_nonneg hr hp, x,hx,by rw [he,smul_smul]⟩ | |
| isClosed' := by | |
| let : CompactSpace ↥(K : Set (Rn n)) := isCompact_iff_compactSpace.mp K.isCompact | |
| let S := {u : LiftSpace n × ↥(K:Set (Rn n)) | | |
| 0 ≤ hgt u.1 ∧ horiz u.1 = hgt u.1 • u.2.val} | |
| have hu : IsClosed S := by | |
| change IsClosed ({u : LiftSpace n × ↥(K:Set (Rn n)) | 0 ≤ hgt u.1} ∩ {u | horiz u.1 = hgt u.1 • u.2.val}) | |
| apply IsClosed.inter | |
| · exact isClosed_le continuous_const (by fun_prop) | |
| · exact isClosed_eq (by fun_prop) (by fun_prop) | |
| have h := isClosedMap_fst_of_compactSpace _ hu | |
| convert h using 1 | |
| ext p | |
| simp [S] | |
| @[simp] theorem pair_mem_cone (K : Body n) (s : ℝ) (v : Rn n) : | |
| pair s v ∈ K.cone ↔ 0 ≤ s ∧ ∃ x ∈ K, v = s • x := Iff.rfl | |
| theorem pair_mem_interior_cone_iff (K : Body n) (s : ℝ) (hs : 0 < s) | |
| (x : Rn n) : | |
| pair s (s • x) ∈ interior (K.cone : Set (LiftSpace n)) ↔ x ∈ interior (K : Set (Rn n)) := by | |
| constructor | |
| · intro h | |
| let f := fun y : Rn n => pair s (s • y) | |
| have he : f ⁻¹' (K.cone : Set (LiftSpace n)) = K := by | |
| ext y | |
| simp only [f, mem_preimage, SetLike.mem_coe, pair_mem_cone, hs.le, true_and] | |
| simp [smul_right_injective _ hs.ne' |>.eq_iff] | |
| have hfc : Continuous f := by dsimp [f]; fun_prop | |
| rw [mem_interior_iff_mem_nhds, ← he] | |
| exact (hfc.tendsto x) (mem_interior_iff_mem_nhds.mp h) | |
| · intro hx | |
| rw [mem_interior_iff_mem_nhds] | |
| let p := pair s (s • x) | |
| change ∀ᶠ t in 𝓝 p, t ∈ (K.cone : Set (LiftSpace n)) | |
| let f := fun t : LiftSpace n => (hgt t)⁻¹ • horiz t | |
| have hfc : ContinuousAt f p := (continuous_hgt.continuousAt.inv₀ (show hgt p ≠ 0 from hs.ne')).smul | |
| continuous_horiz.continuousAt | |
| have he : f p = x := by simp [p,f,hs.ne'] | |
| have ha : ∀ᶠ t in 𝓝 p, f t ∈ (K : Set (Rn n)) := | |
| hfc (by rw [he]; exact mem_interior_iff_mem_nhds.mp hx) | |
| have hb : ∀ᶠ t in 𝓝 p, 0 < hgt t := continuous_hgt.continuousAt (Ioi_mem_nhds hs) | |
| filter_upwards [ha,hb] with t ht hy | |
| change 0 ≤ hgt t ∧ _ | |
| exact ⟨hy.le, f t, ht, by simp [f,hy.ne']⟩ | |
| theorem solid_cone (K : Body n) : | |
| (interior (K.cone : Set (LiftSpace n))).Nonempty := by | |
| obtain ⟨x,hx⟩ := K.has_interior | |
| exact ⟨_,(pair_mem_interior_cone_iff K 1 zero_lt_one x).mpr hx⟩ | |
| theorem axis_dual_interior (K : Body n) (s : ℝ) (hs : 0 < s) : | |
| pair s 0 ∈ interior (posDual K.cone : Set (LiftSpace n)) := by | |
| by_contra h | |
| obtain ⟨p,hp,hpq,hr⟩ := exists_ray_of_not_interior_dual h | |
| rw [← hgt_horiz_pair p] at hp hr hpq | |
| obtain ⟨hu,x,hx,he⟩ := (pair_mem_cone ..).mp hp | |
| rw [pair_inner, inner_zero_left, add_zero] at hr | |
| have h₀ : hgt p = 0 := by nlinarith | |
| rw [he,h₀,zero_smul,pair_zero,norm_zero] at hpq | |
| norm_num at hpq | |
| end Body | |
| end GeneralMahler | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 6.8 kB
- Xet hash:
- a4324355f028be5c54dfd780efad45546c46d3207d884cc25ccc479e8150657f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.