File size: 8,961 Bytes
59d1c80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import OAI.Geometry.IsometricImmersion.Energy.DirectedCutoffBalance

namespace OAI

noncomputable section
open Set Filter
open scoped ContDiff Topology

namespace SmoothLocal.Weighted
open SmoothLocal.Geometry

def directedGradientEnergy (chi I u : Coord → ℝ) (edge lambda : ℝ) (p : Coord) : ℝ :=
  chi p * directedWeight edge lambda I p * ((coordPartial 0 u p)^2 + (coordPartial 1 u p)^2)

def directedForcingEnergy (chi I f : Coord → ℝ) (edge lambda : ℝ) (p : Coord) : ℝ :=
  chi p * directedWeight edge lambda I p * (f p)^2

def directedCutoffError (A chi I u : Coord → ℝ) (edge lambda epsilon : ℝ) : Coord → ℝ :=
  multiplierCutoffError A chi (directedM edge lambda I) (directedN edge lambda epsilon I) u

def directedCoercivityDefect (A B C chi I u : Coord → ℝ) (edge lambda epsilon c : ℝ) (p : Coord) : ℝ :=
  chi p * max 0 (c * directedWeight edge lambda I p *
    ((coordPartial 0 u p)^2 + (coordPartial 1 u p)^2) -
      multiplierQuadratic A B C (directedM edge lambda I) (directedN edge lambda epsilon I) u p)

theorem directedCoercivityDefect_zero
    (A B C chi I u : Coord → ℝ) (edge lambda epsilon c : ℝ) (p : Coord)
    (hcoercive : c * directedWeight edge lambda I p *
      ((coordPartial 0 u p)^2 + (coordPartial 1 u p)^2) ≤
        multiplierQuadratic A B C (directedM edge lambda I) (directedN edge lambda epsilon I) u p) :
    directedCoercivityDefect A B C chi I u edge lambda epsilon c p = 0 := by
  simp only [directedCoercivityDefect, max_eq_left (sub_nonpos.mpr hcoercive), mul_zero]

theorem directedCoercivityDefect_domination
    (A B C chi I u : Coord → ℝ) (edge lambda epsilon c : ℝ) (p : Coord) (hchi : 0 ≤ chi p) :
    c * directedGradientEnergy chi I u edge lambda p ≤
      chi p * multiplierQuadratic A B C (directedM edge lambda I) (directedN edge lambda epsilon I) u p +
        directedCoercivityDefect A B C chi I u edge lambda epsilon c p := by
  have hh := mul_le_mul_of_nonneg_left
    (le_max_right (0 : ℝ) (c * directedWeight edge lambda I p *
      ((coordPartial 0 u p)^2 + (coordPartial 1 u p)^2) -
        multiplierQuadratic A B C (directedM edge lambda I) (directedN edge lambda epsilon I) u p)) hchi
  dsimp [directedGradientEnergy, directedCoercivityDefect]
  nlinarith only [hh]

theorem integrated_directed_energy_with_explicit_costs
    {A B C chi I u f : Coord → ℝ} {U : Set Coord} {tl tr sb st : ℝ}
    (ht : tl ≤ tr) (hs : sb ≤ st) (hU : IsOpen U)
    (hA : ContDiffOn ℝ ∞ A U) (hB : ContDiffOn ℝ ∞ B U) (hC : ContDiffOn ℝ ∞ C U)
    (hchi : ContDiffOn ℝ ∞ chi U) (hI : ContDiffOn ℝ ∞ I U) (hu : ContDiffOn ℝ ∞ u U)
    (hbox : closedRectangle tl tr sb st ⊆ U)
    (hchiSides : ∀ s ∈ Icc sb st, chi (boxPoint tl s) = 0 ∧ chi (boxPoint tr s) = 0)
    (hchiBottom : ∀ t ∈ Icc tl tr, chi (boxPoint t sb) = 0)
    (hEq : ∀ p ∈ U, multiplierOperator A B C u p = f p)
    (hchin : ∀ p ∈ closedRectangle tl tr sb st, 0 ≤ chi p)
    (lambda epsilon R c : ℝ) (hc : 0 < c) (heps : 0 ≤ epsilon) (heps1 : epsilon ≤ 1)
    (hR : ∀ p ∈ closedRectangle tl tr sb st, |p 0| ≤ R) :
    (c / 2) * rectangleIntegral tl tr sb st (directedGradientEnergy chi I u st lambda) ≤
      ((1 + R^2) / (2 * c)) * rectangleIntegral tl tr sb st (directedForcingEnergy chi I f st lambda) +
      rectangleIntegral tl tr sb st (fun p => |directedCutoffError A chi I u st lambda epsilon p|) +
      rectangleIntegral tl tr sb st (directedCoercivityDefect A B C chi I u st lambda epsilon c) := by
  let m := directedM st lambda I
  let n := directedN st lambda epsilon I
  let Q := multiplierQuadratic A B C m n u
  let E := directedGradientEnergy chi I u st lambda
  let F := directedForcingEnergy chi I f st lambda
  let Err := directedCutoffError A chi I u st lambda epsilon
  let Def := directedCoercivityDefect A B C chi I u st lambda epsilon c
  let Source := fun p => f p * multiplierTest (cutoffM chi st lambda I) (cutoffN chi st lambda epsilon I) u p
  have hW := directedWeight_contDiffOn st lambda hI
  have hm : ContDiffOn ℝ ∞ m U := hW.neg
  have hn : ContDiffOn ℝ ∞ n U :=
    (contDiffOn_const.mul (contDiffOn_apply ℝ ℝ 0 U)).mul hW
  have hcm := hchi.mul hm
  have hcn := hchi.mul hn
  have hut := partial_contDiffOn hu hU 0
  have hus := partial_contDiffOn hu hU 1
  have hgrad := (hut.pow 2).add (hus.pow 2)
  have hf : ContDiffOn ℝ ∞ f U :=
    (ellipticOperator_contDiffOn hU hA hB hC hu).congr (fun p hp => (hEq p hp).symm)
  have hEc : ContinuousOn E (closedRectangle tl tr sb st) :=
    (((hchi.mul hW).mul hgrad).continuousOn.mono hbox)
  have hFc : ContinuousOn F (closedRectangle tl tr sb st) :=
    (((hchi.mul hW).mul (hf.pow 2)).continuousOn.mono hbox)
  have hQ := multiplierQuadratic_contDiffOn hU hA hB hC hm hn hu
  have hchiQ : ContinuousOn (fun p => chi p * Q p) (closedRectangle tl tr sb st) :=
    (hchi.mul hQ).continuousOn.mono hbox
  have hErr := multiplierCutoffError_contDiffOn hU hA hchi hm hn hu
  have hErrc : ContinuousOn Err (closedRectangle tl tr sb st) := hErr.continuousOn.mono hbox
  have hDef : ContinuousOn Def (closedRectangle tl tr sb st) :=
    (hchi.continuousOn.mul ((continuousOn_const (c := (0 : ℝ))).sup
      ((((contDiffOn_const (c := c)).mul hW).mul hgrad).sub hQ).continuousOn)).mono hbox
  have htest : ContDiffOn ℝ ∞ (multiplierTest (cutoffM chi st lambda I) (cutoffN chi st lambda epsilon I) u) U :=
    (hcm.mul hus).add (hcn.mul hut)
  have hSource : ContinuousOn Source (closedRectangle tl tr sb st) := (hf.mul htest).continuousOn.mono hbox
  have hsplit : rectangleIntegral tl tr sb st Source =
      rectangleIntegral tl tr sb st (fun p => chi p * Q p) - rectangleIntegral tl tr sb st Err := by
    calc
      _ = rectangleIntegral tl tr sb st (fun p => multiplierOperator A B C u p *
          multiplierTest (cutoffM chi st lambda I) (cutoffN chi st lambda epsilon I) u p) := by
        apply rectangleIntegral_congr ht hs
        intro p hp
        change f p * multiplierTest (cutoffM chi st lambda I) (cutoffN chi st lambda epsilon I) u p =
          multiplierOperator A B C u p *
            multiplierTest (cutoffM chi st lambda I) (cutoffN chi st lambda epsilon I) u p
        rw [hEq p (hbox hp)]
      _ = rectangleIntegral tl tr sb st
          (multiplierQuadratic A B C (cutoffM chi st lambda I) (cutoffN chi st lambda epsilon I) u) :=
        integrated_cutoff_directed_identity ht hs hU hA hB hC hchi hI hu hbox hchiSides hchiBottom lambda epsilon
      _ = rectangleIntegral tl tr sb st (fun p => chi p * Q p - Err p) := by
        apply rectangleIntegral_congr ht hs
        intro p hp
        exact multiplierQuadratic_cutoff_split hU hA hchi hm hn hu (hbox hp)
      _ = _ := rectangleIntegral_sub ht hs hchiQ hErrc
  have hdom := rectangleIntegral_mono ht hs (continuousOn_const.mul hEc) (hchiQ.add hDef)
    (fun p hp => directedCoercivityDefect_domination A B C chi I u st lambda epsilon c p (hchin p hp))
  change rectangleIntegral tl tr sb st (fun p => c * E p) ≤
    rectangleIntegral tl tr sb st (fun p => chi p * Q p + Def p) at hdom
  rw [rectangleIntegral_const_mul, rectangleIntegral_add ht hs hchiQ hDef] at hdom
  have hsourceBound (p : Coord) (hp : p ∈ closedRectangle tl tr sb st) :
      Source p ≤ (c / 2) * E p + ((1 + R^2) / (2 * c)) * F p := by
    have hWn : 0 ≤ directedWeight st lambda I p :=
      mul_nonneg (pow_nonneg (sub_nonneg.mpr hp.2.2) 8) (Real.exp_pos _).le
    have hpoint := directed_source_young_scalar (mul_nonneg (hchin p hp) hWn) hc heps heps1 (hR p hp)
      (f := f p) (ut := coordPartial 0 u p) (us := coordPartial 1 u p)
    have hfac := cutoff_test_factor chi I u st lambda epsilon p
    dsimp [Source]
    rw [hfac]
    exact (le_abs_self _).trans (by
      convert hpoint using 1
      dsimp [E, F, directedGradientEnergy, directedForcingEnergy]
      ring)
  have hsourceIntegral := rectangleIntegral_mono ht hs hSource
    ((continuousOn_const.mul hEc).add (continuousOn_const.mul hFc)) hsourceBound
  change rectangleIntegral tl tr sb st Source ≤ rectangleIntegral tl tr sb st
    (fun p => (c / 2) * E p + ((1 + R^2) / (2 * c)) * F p) at hsourceIntegral
  have hcE : ContinuousOn (fun p => (c / 2) * E p) (closedRectangle tl tr sb st) :=
    continuousOn_const.mul hEc
  have hcF : ContinuousOn (fun p => ((1 + R^2) / (2 * c)) * F p) (closedRectangle tl tr sb st) :=
    continuousOn_const.mul hFc
  rw [rectangleIntegral_add ht hs hcE hcF,
    rectangleIntegral_const_mul, rectangleIntegral_const_mul] at hsourceIntegral
  have herrorIntegral := rectangleIntegral_mono ht hs hErrc hErrc.abs (fun p hp => le_abs_self (Err p))
  change (c / 2) * rectangleIntegral tl tr sb st E ≤
    ((1 + R^2) / (2 * c)) * rectangleIntegral tl tr sb st F +
    rectangleIntegral tl tr sb st (fun p => |Err p|) + rectangleIntegral tl tr sb st Def
  nlinarith only [hdom, hsplit, hsourceIntegral, herrorIntegral]

end SmoothLocal.Weighted

end

end OAI