roseking's picture
Add lean source and binary files (part 66)
8e4d533 verified
Raw History Blame Contribute Delete
4.51 kB
29
def extend (e : X → Y) (f : X → ℝ) : Y → ℝ := Function.extend e f (fun _ => 0)
31
lemma extend_apply (e : X → Y) (he : Function.Injective e) (f : X → ℝ) (x : X) :
    extend e f (e x) = f x := he.extend_apply f (fun _ => 0) x
34
lemma extend_image (e : X → Y) (he : Function.Injective e) (f : X → ℝ)
    (A : Set Y) (hA : A ⊆ range e) :
    extend e f '' A = f '' (e ⁻¹' A) := by
proof · 7 lines
  ext t
  constructor
  · rintro ⟨y,hy,rfl⟩
    obtain ⟨x,rfl⟩ := hA hy
    exact ⟨x,hy,(extend_apply e he f x).symm⟩
  · rintro ⟨x,hx,rfl⟩
    exact ⟨e x,hx,extend_apply e he f x⟩
45
lemma continuousOn_extend [TopologicalSpace X] [TopologicalSpace Y] (e : X → Y) (he : IsEmbedding e) (f : X → ℝ)
    (hf : Continuous f) : ContinuousOn (extend e f) (range e) := by
proof · 9 lines
  rw [continuousOn_iff_continuous_domRestrict]
  have hc := hf.comp he.toHomeomorph.symm.continuous
  convert hc using 1
  funext y
  obtain ⟨x,hx⟩ := y.property
  have hy : y = he.toHomeomorph x := Subtype.ext hx.symm
  subst y
  simp only [Set.domRestrict, Function.comp_apply, Homeomorph.symm_apply_apply]
  exact extend_apply e he.injective f x
63
theorem exists_chart_lateral_diameter {X : Type*} [MetricSpace X]
    (e : CannonGrid.Square → X) (he : Topology.IsEmbedding e) :
    ∃ d₁ : ℝ, 0 < d₁ ∧ ∀ A : Set CannonGrid.Square, IsCompact A →
      (∃ x ∈ A, x.1 = 0) → (∃ x ∈ A, x.1 = 1) → d₁ ≤ diam (e '' A) := by
proof · 21 lines
  let l : Set CannonGrid.Square := {z | z.1 = 0}
  let r : Set CannonGrid.Square := {z | z.1 = 1}
  have hl : IsCompact l := (isClosed_eq continuous_fst continuous_const).isCompact
  have hr : IsCompact r := (isClosed_eq continuous_fst continuous_const).isCompact
  have hdis : Disjoint (e '' l) (e '' r) := by
    apply Set.disjoint_left.mpr
    rintro z ⟨x,hx,hxz⟩ ⟨y,hy,hyz⟩
    have hxy := he.injective (hxz.trans hyz.symm)
    have h01 : (0 : unitInterval) = 1 := hx.symm.trans ((congrArg Prod.fst hxy).trans hy)
    exact zero_ne_one h01
  obtain ⟨d,hd,hsep⟩ := Metric.exists_pos_forall_lt_edist
    (hl.image he.continuous) (hr.image he.continuous).isClosed hdis
  refine ⟨d,by exact_mod_cast hd,?_⟩
  intro A hA hAl hAr
  obtain ⟨x,hx,hxl⟩ := hAl
  obtain ⟨y,hy,hyr⟩ := hAr
  have hh := hsep (e x) ⟨x,hxl,rfl⟩ (e y) ⟨y,hyr,rfl⟩
  rw [edist_nndist] at hh
  have hdist : (d : ℝ) ≤ dist (e x) (e y) := by exact_mod_cast hh.le
  exact hdist.trans (dist_le_diam_of_mem (hA.image he.continuous).isBounded
    (mem_image_of_mem e hx) (mem_image_of_mem e hy))
89
theorem scalar_ambient_level {X : Type*} [MetricSpace X]
    (e : CannonGrid.Square → X) (he : Topology.IsEmbedding e)
    {ι : Type*} [Fintype ι] (C : ι → Set CannonGrid.Square) (ρ : ι → ℝ)
    (hρ : ∀ i, 0 ≤ ρ i) (hadm : Admissible C ρ) (n : ℕ) (hn : 0 < n)
    (d₁ : ℝ) (hd₁ : ∀ A : Set CannonGrid.Square, IsCompact A →
      (∃ x ∈ A, x.1 = 0) → (∃ x ∈ A, x.1 = 1) → d₁ ≤ diam (e '' A))
    (t : ℝ) (ht : t ∈ Ioo (0:ℝ) 1) :
    ∃ A : Set X, IsCompact A ∧ IsConnected A ∧ A ⊆ e '' centralRectangle ∧
      d₁ ≤ diam A ∧ (∀ z ∈ A, extend e (scalar C ρ n hn) z = t) ∧
      (∀ {a b : CannonGrid.Square} (p : Path (e a) (e b)),
        (∀ s, p s ∈ range e) → scalar C ρ n hn a < t → t < scalar C ρ n hn b →
        ∃ s, p s ∈ A) := by
proof · 11 lines
  obtain ⟨A,hA,hcon,hcentral,hf,hl,hr,hhit⟩ := scalar_level C ρ hρ hadm n hn ht
  refine ⟨e '' A,hA.image he.continuous,hcon.image e he.continuous.continuousOn,
    image_mono hcentral,hd₁ A hA hl hr,?_,?_⟩
  · rintro z ⟨x,hx,rfl⟩
    rw [extend_apply e he.injective]
    exact hf x hx
  · intro a b p hp ha hb
    obtain ⟨s,hs⟩ := hhit (liftPath e he p hp) ha hb
    refine ⟨s,?_⟩
    rw [← liftPath_apply e he p hp s]
    exact mem_image_of_mem e hs