roseking's picture
Add lean source and binary files (part 91)
caec230 verified
Raw History Blame Contribute Delete
7.02 kB
17
theorem gate_jet_zero_outside (hν : 0 < ν) (n d : ℕ)
    (c : Active hb table (capacity b m n)) (q : ℝ × Coord 2) (i : Fin 2)
    (hq : ∃ j, 3 * radius ν (K₀ N b m) (D b) n <
      |q.2 j - path hb table terminal ν m n c q.1 j|) :
    iteratedFDeriv ℝ d (fun q => gate hb table terminal ν m n c q i) q = 0 := by
proof · 13 lines
  obtain ⟨j, hj⟩ := hq
  have hcont : Continuous (fun p : ℝ × Coord 2 =>
      |p.2 j - path hb table terminal ν m n c p.1 j|) :=
    ((continuous_apply j).comp continuous_snd |>.sub
      ((continuous_apply j).comp ((contDiff_path hb table terminal ν m n c).continuous.comp
        continuous_fst))).abs
  have heq : (fun p => gate hb table terminal ν m n c p i) =ᶠ[𝓝 q] 0 := by
    filter_upwards [(isOpen_lt continuous_const hcont).mem_nhds hj] with p hp
    have h := TranslationGates.field_zero_outside
      (lt_of_lt_of_le zero_lt_one (radius_ge_one hν (K₀_nonneg N b m) (D_ge_one hb) n))
      (path hb table terminal ν m n c p.1) (deriv (path hb table terminal ν m n c) p.1) p.2 ⟨j, hp.le⟩
    exact congrFun h i
  simpa using (heq.iteratedFDeriv ℝ d).eq_of_nhds
36
theorem gate_jets_disjoint (hν : 0 < ν) (hm : 1 ≤ m)
    (hdir : IncomingDirection table) (hin : IncomingRule table) (n d : ℕ)
    (c e : Active hb table (capacity b m n)) (hce : c ≠ e) (q : ℝ × Coord 2) (i : Fin 2) :
    iteratedFDeriv ℝ d (fun q => gate hb table terminal ν m n c q i) q = 0 ∨
      iteratedFDeriv ℝ d (fun q => gate hb table terminal ν m n e q i) q = 0 := by
proof · 16 lines
  obtain ⟨j, hj⟩ := paths_separated hb table terminal ν m hν hm hdir hin n c e hce q.1
  have hR : 0 < radius ν (K₀ N b m) (D b) n :=
    lt_of_lt_of_le zero_lt_one (radius_ge_one hν (K₀_nonneg N b m) (D_ge_one hb) n)
  by_cases hc : 3 * radius ν (K₀ N b m) (D b) n <
      |q.2 j - path hb table terminal ν m n c q.1 j|
  · exact Or.inl (gate_jet_zero_outside hb table terminal ν m hν n d c q i ⟨j, hc⟩)
  · right
    apply gate_jet_zero_outside hb table terminal ν m hν n d e q i
    refine ⟨j, ?_⟩
    have htri : |path hb table terminal ν m n c q.1 j - path hb table terminal ν m n e q.1 j| ≤
        |q.2 j - path hb table terminal ν m n c q.1 j| +
          |q.2 j - path hb table terminal ν m n e q.1 j| := by
      simpa only [abs_sub_comm (path hb table terminal ν m n c q.1 j) (q.2 j)]
        using abs_sub_le (path hb table terminal ν m n c q.1 j) (q.2 j)
          (path hb table terminal ν m n e q.1 j)
    linarith
58
theorem stages_uniformly_bounded (hν : 0 < ν) (hm : 1 ≤ m)
    (hdir : IncomingDirection table) (hin : IncomingRule table) (i : Fin 2) :
    Bounded (fun n (q : ℝ × Coord 2) => stage hb table terminal ν m n q.1 q.2 i) := by
proof · 17 lines
  intro d
  obtain ⟨C, hC, hc⟩ := gates_uniformly_bounded hb table terminal ν m hν hm i d
  refine ⟨C, hC, fun n q => ?_⟩
  have heq : (fun q : ℝ × Coord 2 => stage hb table terminal ν m n q.1 q.2 i) =
      ∑ c : Active hb table (capacity b m n), fun q => gate hb table terminal ν m n c q i := by
    ext q
    simp only [stage, gate, Finset.sum_apply]
  change ‖iteratedFDeriv ℝ d (fun q : ℝ × Coord 2 => stage hb table terminal ν m n q.1 q.2 i) q‖ ≤ C
  rw [heq, iteratedFDeriv_sum_apply]
  · apply norm_sum_le_sparse _ _ hC
    · intro c _
      exact hc ⟨n, c⟩ q
    · intro c _ e _ hce
      exact gate_jets_disjoint hb table terminal ν m hν hm hdir hin n d c e hce q i
  · intro c _
    exact (contDiff_infty.mp ((contDiff_apply ℝ ℝ i).comp
      (contDiff_gate hb table terminal ν m n c)) d).contDiffAt
79
theorem stage_jet_zero_before (hν : 0 < ν) (n d : ℕ) (q : ℝ × Coord 2) (i : Fin 2)
    (hq : q.1 ≤ startTime ν (K₀ N b m) (D b) n) :
    iteratedFDeriv ℝ d (fun q => stage hb table terminal ν m n q.1 q.2 i) q = 0 := by
proof · 2 lines
  exact jet_zero_before ((contDiff_apply ℝ ℝ i).comp (contDiff_stage hb table terminal ν m n))
    (fun t ht X => congrFun (stage_zero_before hb table terminal ν m hν n ht X) i) d hq q.2
85
theorem stage_jet_zero_after (hν : 0 < ν) (n d : ℕ) (q : ℝ × Coord 2) (i : Fin 2)
    (hq : startTime ν (K₀ N b m) (D b) (n + 1) ≤ q.1) :
    iteratedFDeriv ℝ d (fun q => stage hb table terminal ν m n q.1 q.2 i) q = 0 := by
proof · 2 lines
  exact jet_zero_after ((contDiff_apply ℝ ℝ i).comp (contDiff_stage hb table terminal ν m n))
    (fun t ht X => congrFun (stage_zero_after hb table terminal ν m hν n ht X) i) d hq q.2
91
theorem stage_jets_disjoint (hν : 0 < ν) (n k d : ℕ) (hnk : n ≠ k) (q : ℝ × Coord 2) (i : Fin 2) :
    iteratedFDeriv ℝ d (fun q => stage hb table terminal ν m n q.1 q.2 i) q = 0 ∨
      iteratedFDeriv ℝ d (fun q => stage hb table terminal ν m k q.1 q.2 i) q = 0 := by
proof · 8 lines
  wlog hnk' : n < k generalizing n k
  · exact (this k n hnk.symm (by omega)).symm
  by_cases hq : q.1 ≤ startTime ν (K₀ N b m) (D b) k
  · exact Or.inr (stage_jet_zero_before hb table terminal ν m hν k d q i hq)
  · left
    apply stage_jet_zero_after hb table terminal ν m hν n d q i
    have hm := (startTime_strictMono hν (K₀_nonneg N b m) (D_ge_one hb)).monotone (show n + 1 ≤ k by omega)
    linarith
103
theorem field_uniformly_bounded (hν : 0 < ν) (hm : 1 ≤ m)
    (hdir : IncomingDirection table) (hin : IncomingRule table) (i : Fin 2) :
    Bounded (fun _ : Unit => fun q : ℝ × Coord 2 => field hb table terminal ν m q.1 q.2 i) := by
proof · 17 lines
  intro d
  obtain ⟨C, hC, hc⟩ := stages_uniformly_bounded hb table terminal ν m hν hm hdir hin i d
  refine ⟨C, hC, fun _ q => ?_⟩
  obtain ⟨Q, hQ⟩ := exists_nat_gt q.1
  have heq : (fun q : ℝ × Coord 2 => field hb table terminal ν m q.1 q.2 i) =ᶠ[𝓝 q]
      ∑ n ∈ Finset.range Q, fun q => stage hb table terminal ν m n q.1 q.2 i := by
    filter_upwards [(isOpen_lt continuous_fst continuous_const).mem_nhds hQ] with p hp
    simpa only [Finset.sum_apply] using congrFun (field_eq_finite hb table terminal ν m hν hp p.2) i
  rw [(heq.iteratedFDeriv ℝ d).eq_of_nhds, iteratedFDeriv_sum_apply]
  · apply norm_sum_le_sparse _ _ hC
    · intro n _
      exact hc n q
    · intro n _ k _ hnk
      exact stage_jets_disjoint hb table terminal ν m hν n k d hnk q i
  · intro n _
    exact (contDiff_infty.mp ((contDiff_apply ℝ ℝ i).comp
      (contDiff_stage hb table terminal ν m n)) d).contDiffAt