roseking's picture
Add lean source and binary files (part 91)
caec230 verified
Raw History Blame Contribute Delete
5.47 kB
21
theorem scalar_properties_of_C1Tails (hν : 0 < ν) (p : Coord 2) {ρ : ScalarField 2}
    (hρ : ContDiff ℝ ∞ (uncurry ρ)) (hr : C1Tails ρ)
    (hD : ∀ i, ContinuousTails (spatialD i ρ))
    (hDD : ∀ i k, ContinuousTails (spatialD k (spatialD i ρ)))
    (heq : ∀ t ≥ 0, ∀ X, timeD ρ t X + advection (field hb table terminal ν m) ρ t X =
      ν * laplacian ρ t X + impulse p t X)
    (hzero : ∀ X, ρ 0 X = 0) :
    (∀ t ≥ 0, ∀ X, 0 ≤ ρ t X) ∧ (∀ t, Integrable (ρ t)) ∧
      (∀ t ≥ 0, (∫ X, ρ t X) = step t) := by
proof · 25 lines
  have hd (t : ℝ) (ht : 0 ≤ t) (X : Coord 2) : timeD ρ t X = deriv (fun s => ρ s X) t :=
    JointCalculus.timeD_eq_deriv ht X (hρ.differentiable (by simp) (t, X))
  have heq' (t : ℝ) (ht : 0 ≤ t) (X : Coord 2) :
      deriv (fun s => ρ s X) t + advection (field hb table terminal ν m) ρ t X =
        ν * laplacian ρ t X + impulse p t X := by
    rw [← hd t ht X]
    exact heq t ht X
  obtain ⟨F, hFc, hFr⟩ := hr.continuous.C0_rep
  have hF2 : ContDiff ℝ 2 (fun q : ℝ × Coord 2 => F q.1 q.2) := by
    simpa only [hFr, Function.uncurry_def] using hρ.of_le (show (2 : ℕ∞ω) ≤ ∞ by exact WithTop.coe_le_coe.mpr (show (2 : ℕ∞) ≤ ⊤ from le_top))
  have hp := ParabolicComparison.nonnegative_of_continuous_C0 F hν.le hFc hF2
    (by simpa only [hFr] using heq') (fun X => by simpa only [hFr, hzero] using (le_refl (0 : ℝ)))
    (fun t _ X => impulse_nonneg p X t)
  obtain ⟨G, dG, -, -, hGa, hdGa, hGd⟩ := hr.L1_rep
  have hi (t : ℝ) (_ht : 0 ≤ t) (i : Fin 2) : Integrable (SpatialCalculus.partialD i (ρ t)) :=
    (hD i).integrable t
  have hii (t : ℝ) (_ht : 0 ≤ t) (i : Fin 2) :
      Integrable (SpatialCalculus.partialD i (SpatialCalculus.partialD i (ρ t))) :=
    (hDD i i).integrable t
  refine ⟨?_, fun t => hr.continuous.integrable t, ?_⟩
  · simpa only [hFr] using hp
  · apply scalar_mass hb table terminal ν m hν p (hρ.of_le (by exact WithTop.coe_le_coe.mpr (show (2 : ℕ∞) ≤ ⊤ from le_top))) hi hii heq' hGa ?_ hGd hzero
    intro t ht
    have hh := hdGa t ht
    exact hh.trans (Filter.Eventually.of_forall (hd t ht))
56
theorem detection_of_C1Tails (hν : 0 < ν) (c₀ : Configuration (Fin N)) {ρ : ScalarField 2}
    (hρ : ContDiff ℝ ∞ (uncurry ρ)) (hr : C1Tails ρ)
    (hD : ∀ i, ContinuousTails (spatialD i ρ))
    (hDD : ∀ i k, ContinuousTails (spatialD k (spatialD i ρ)))
    (heq : ∀ t ≥ 0, ∀ X, timeD ρ t X + advection (field hb table terminal ν m) ρ t X =
      ν * laplacian ρ t X + impulse (point hb table terminal ν m c₀ 0) t X)
    (hzero : ∀ X, ρ 0 X = 0) (hm : 1 ≤ m)
    (hc₀ : c₀.leftStack < capacity b m 0 ∧ c₀.rightStack < capacity b m 0)
    (hdir : IncomingDirection table) (hin : IncomingRule table)
    (hterm : NoOutgoing table terminal) (hcont : Continues hb table terminal c₀)
    (hinit : c₀.state ≠ terminal) :
    Observation.planeEvent (liftVelocity (field hb table terminal ν m) ρ) ↔
      Reaches hb table terminal c₀ := by
proof · 7 lines
  obtain ⟨hp, hi, hm'⟩ := scalar_properties_of_C1Tails hb table terminal ν m hν
    (point hb table terminal ν m c₀ 0) hρ hr hD hDD heq hzero
  apply scalar_detection hb table terminal ν m c₀ hν (hρ.of_le (by exact WithTop.coe_le_coe.mpr (show (2 : ℕ∞) ≤ ⊤ from le_top))) ?_ hzero
    (fun t _ => hi t) hp hm' hm hc₀ hdir hin hterm hcont hinit
  intro t ht X
  rw [← JointCalculus.timeD_eq_deriv ht X (hρ.differentiable (by simp) (t, X))]
  exact heq t ht X
77
theorem scalar_lift_unique (hν : 0 < ν) (p : Coord 2) {ρ : ScalarField 2}
    (hρ : ContDiff ℝ ∞ (uncurry ρ)) (hr : C1Tails ρ)
    (hD : ∀ i, ContinuousTails (spatialD i ρ))
    (hDD : ∀ i k, ContinuousTails (spatialD k (spatialD i ρ)))
    (heq : ∀ t ≥ 0, ∀ X, timeD ρ t X + advection (field hb table terminal ν m) ρ t X =
      ν * laplacian ρ t X + impulse p t X)
    (hzero : ∀ X, ρ 0 X = 0)
    {v : VectorField 3} {q : ScalarField 3}
    (hv : Cylinder.ComparisonClass (fun t x => v t (Cylinder.join x))
      (fun t x => q t (Cylinder.join x)))
    (hNS : NavierStokes ν v q (force hb table terminal ν m p)) :
    ∀ t ≥ 0, (∀ x, v t x = liftVelocity (field hb table terminal ν m) ρ t x) ∧
      (∀ x, q t x = 0) := by
proof · 3 lines
  exact Cylinder.comparison_unique_coordinates hν.le
    (comparisonClass_of_scalar_tails hb table terminal ν m hν hρ hr hD hDD) hv
    (force_NavierStokes hb table terminal ν m hν p ρ heq hzero) hNS