File size: 14,883 Bytes
785c727
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
import OAI.Geometry.CylinderCovering.Physical.ProjectionDictionary
import OAI.Geometry.CylinderCovering.Radial.PartitionAffine

namespace OAI

open Set
noncomputable section
namespace RadialPhysical
open CylinderCovering

lemma halfheight_upperLocal_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (i : Fin N) :
    mapToCanonical b '' upperSweepOn false b eta T (RadialRiemann.cell (-b) b N i) =
      upperSweepOn true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
        (RadialRiemann.cell (-1) 1 N i) := by
  have hb0 := ne_of_gt hb
  ext z
  constructor
  · rintro ⟨v, ⟨s, hs, rho, hrho, x, hx, rfl⟩, rfl⟩
    have hbs : b*(s/b)=s := by field_simp
    refine ⟨s/b, (RadialRiemann.div_mem_symmetric_cell_iff hb N i s).2 hs,
      2*rho, ⟨by linarith [hrho.1], ?_⟩, 2*x/b, ?_, ?_⟩
    · change 2*rho ≤ 2*T (b*(s/b))
      rw [hbs]
      linarith [hrho.2]
    · change |x| ≤ b at hx
      norm_num only [axialBound, Bool.true_eq, ite_true, mul_one]
      rw [abs_div, abs_mul, abs_of_pos hb]
      norm_num
      apply (div_le_iff₀ hb).mpr
      linarith
    · ext j
      fin_cases j <;> simp [mapToCanonical, upperPoint, point, height,
        effectiveTilt] <;> field_simp
      ring
  · rintro ⟨r, hr, rho, hrho, x, hx, hz⟩
    refine ⟨upperPoint b eta (rho/2) (b*r) (b*x/2), ?_, ?_⟩
    · refine ⟨b*r, ?_, (rho/2), ⟨by linarith [hrho.1], by linarith [hrho.2]⟩, (b*x/2), ?_, rfl⟩
      · apply (RadialRiemann.div_mem_symmetric_cell_iff hb N i (b*r)).1
        simpa [hb0] using hr
      · norm_num only [axialBound, Bool.true_eq, ite_true, mul_one] at hx
        change |(b*x/2)| ≤ b
        rw [abs_div, abs_mul, abs_of_pos hb]
        norm_num
        nlinarith
    · rw [hz]
      ext j
      fin_cases j <;> simp [mapToCanonical, upperPoint, point, height,
        effectiveTilt] <;> field_simp
      ring

lemma halfheight_lowerLocal_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (i : Fin N) :
    mapToCanonical b '' lowerSweepOn false b eta T (RadialRiemann.cell (-b) b N i) =
      lowerSweepOn true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
        (RadialRiemann.cell (-1) 1 N i) := by
  have hb0 := ne_of_gt hb
  ext z
  constructor
  · rintro ⟨v, ⟨s, hs, rho, hrho, x, hx, rfl⟩, rfl⟩
    have hbs : b*(s/b)=s := by field_simp
    refine ⟨s/b, (RadialRiemann.div_mem_symmetric_cell_iff hb N i s).2 hs,
      2*rho, ⟨by linarith [hrho.1], ?_⟩, 2*x/b, ?_, ?_⟩
    · change 2*rho ≤ 2*T (b*(s/b))
      rw [hbs]
      linarith [hrho.2]
    · change |x| ≤ b at hx
      norm_num only [axialBound, Bool.true_eq, ite_true, mul_one]
      rw [abs_div, abs_mul, abs_of_pos hb]
      norm_num
      apply (div_le_iff₀ hb).mpr
      linarith
    · ext j
      fin_cases j <;> simp [mapToCanonical, lowerPoint, point, height,
        effectiveTilt] <;> field_simp
      ring
  · rintro ⟨r, hr, rho, hrho, x, hx, hz⟩
    refine ⟨lowerPoint false b eta (rho/2) (b*r) (b*x/2), ?_, ?_⟩
    · refine ⟨b*r, ?_, (rho/2), ⟨by linarith [hrho.1], by linarith [hrho.2]⟩, (b*x/2), ?_, rfl⟩
      · apply (RadialRiemann.div_mem_symmetric_cell_iff hb N i (b*r)).1
        simpa [hb0] using hr
      · norm_num only [axialBound, Bool.true_eq, ite_true, mul_one] at hx
        change |(b*x/2)| ≤ b
        rw [abs_div, abs_mul, abs_of_pos hb]
        norm_num
        nlinarith
    · rw [hz]
      ext j
      fin_cases j <;> simp [mapToCanonical, lowerPoint, point, height,
        effectiveTilt] <;> field_simp
      ring

lemma centered_upperLocal_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (i : Fin N) :
    mapCenteredToCanonical b '' upperSweepOn true b eta T (RadialRiemann.cell (-b) b N i) =
      upperSweepOn true 1 (effectiveTilt b eta) (fun r => T (b*r))
        (RadialRiemann.cell (-1) 1 N i) := by
  have hb0 := ne_of_gt hb
  ext z
  constructor
  · rintro ⟨v, ⟨s, hs, rho, hrho, x, hx, rfl⟩, rfl⟩
    have hbs : b*(s/b)=s := by field_simp
    refine ⟨s/b, (RadialRiemann.div_mem_symmetric_cell_iff hb N i s).2 hs,
      rho, ⟨hrho.1, ?_⟩, x/b, ?_, ?_⟩
    · change rho ≤ T (b*(s/b))
      rw [hbs]
      linarith [hrho.2]
    · change |x| ≤ 2*b at hx
      norm_num only [axialBound, Bool.true_eq, ite_true, mul_one]
      rw [abs_div, abs_of_pos hb]
      apply (div_le_iff₀ hb).mpr
      linarith
    · ext j
      fin_cases j <;> simp [mapCenteredToCanonical, upperPoint, point, height,
        effectiveTilt] <;> field_simp
  · rintro ⟨r, hr, rho, hrho, x, hx, hz⟩
    refine ⟨upperPoint b eta rho (b*r) (b*x), ?_, ?_⟩
    · refine ⟨b*r, ?_, rho, hrho, (b*x), ?_, rfl⟩
      · apply (RadialRiemann.div_mem_symmetric_cell_iff hb N i (b*r)).1
        simpa [hb0] using hr
      · norm_num only [axialBound, Bool.true_eq, ite_true, mul_one] at hx
        change |(b*x)| ≤ 2*b
        rw [abs_mul, abs_of_pos hb]
        nlinarith
    · rw [hz]
      ext j
      fin_cases j <;> simp [mapCenteredToCanonical, upperPoint, point, height,
        effectiveTilt] <;> field_simp

lemma centered_lowerLocal_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (i : Fin N) :
    mapCenteredToCanonical b '' lowerSweepOn true b eta T (RadialRiemann.cell (-b) b N i) =
      lowerSweepOn true 1 (effectiveTilt b eta) (fun r => T (b*r))
        (RadialRiemann.cell (-1) 1 N i) := by
  have hb0 := ne_of_gt hb
  ext z
  constructor
  · rintro ⟨v, ⟨s, hs, rho, hrho, x, hx, rfl⟩, rfl⟩
    have hbs : b*(s/b)=s := by field_simp
    refine ⟨s/b, (RadialRiemann.div_mem_symmetric_cell_iff hb N i s).2 hs,
      rho, ⟨hrho.1, ?_⟩, x/b, ?_, ?_⟩
    · change rho ≤ T (b*(s/b))
      rw [hbs]
      linarith [hrho.2]
    · change |x| ≤ 2*b at hx
      norm_num only [axialBound, Bool.true_eq, ite_true, mul_one]
      rw [abs_div, abs_of_pos hb]
      apply (div_le_iff₀ hb).mpr
      linarith
    · ext j
      fin_cases j <;> simp [mapCenteredToCanonical, lowerPoint, point, height,
        effectiveTilt] <;> field_simp
  · rintro ⟨r, hr, rho, hrho, x, hx, hz⟩
    refine ⟨lowerPoint true b eta rho (b*r) (b*x), ?_, ?_⟩
    · refine ⟨b*r, ?_, rho, hrho, (b*x), ?_, rfl⟩
      · apply (RadialRiemann.div_mem_symmetric_cell_iff hb N i (b*r)).1
        simpa [hb0] using hr
      · norm_num only [axialBound, Bool.true_eq, ite_true, mul_one] at hx
        change |(b*x)| ≤ 2*b
        rw [abs_mul, abs_of_pos hb]
        nlinarith
    · rw [hz]
      ext j
      fin_cases j <;> simp [mapCenteredToCanonical, lowerPoint, point, height,
        effectiveTilt] <;> field_simp

lemma upperPhysicalAxis_normalized {b : ℝ} (hb : 0 < b) (eta s : ℝ) :
    upperPhysicalAxis b eta s =
      upperPhysicalAxis 1 (effectiveTilt b eta) (s/b) := by
  rw [upperPhysicalAxis_canonical (ne_of_gt hb),
    upperPhysicalAxis_canonical (show (1 : ℝ) ≠ 0 by norm_num)]
  simp [effectiveTilt]

lemma lowerPhysicalAxis_normalized {b : ℝ} (hb : 0 < b) (eta s : ℝ) :
    lowerPhysicalAxis b eta s =
      lowerPhysicalAxis 1 (effectiveTilt b eta) (s/b) := by
  rw [lowerPhysicalAxis_canonical (ne_of_gt hb),
    lowerPhysicalAxis_canonical (show (1 : ℝ) ≠ 0 by norm_num)]
  simp [effectiveTilt]

lemma halfheight_upperBase_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    (fun z => (2/b) • z -
        TriangularCovering.projection (upperPhysicalAxis b eta (tag i))
          (!₂[0,0,Real.sqrt 2] : Space)) ''
      upperPhysicalBase false b eta T N tag i =
        upperPhysicalBase true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
          N (fun j => tag j/b) i := by
  unfold upperPhysicalBase
  rw [← projected_image_mapToCanonical, halfheight_upperLocal_image hb,
    upperPhysicalAxis_normalized hb]

lemma halfheight_upperBase_area {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    TriangularCovering.area
      (upperPhysicalBase true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
        N (fun j => tag j/b) i) =
      (2/b)^2 * TriangularCovering.area (upperPhysicalBase false b eta T N tag i) := by
  unfold upperPhysicalBase
  rw [← upperPhysicalAxis_normalized hb eta (tag i),
    ← halfheight_upperLocal_image hb eta T N i]
  exact projected_area_mapToCanonical (ne_of_gt hb) _ _

lemma halfheight_lowerBase_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    (fun z => (2/b) • z -
        TriangularCovering.projection (lowerPhysicalAxis b eta (tag i))
          (!₂[0,0,Real.sqrt 2] : Space)) ''
      lowerPhysicalBase false b eta T N tag i =
        lowerPhysicalBase true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
          N (fun j => tag j/b) i := by
  unfold lowerPhysicalBase
  rw [← projected_image_mapToCanonical, halfheight_lowerLocal_image hb,
    lowerPhysicalAxis_normalized hb]

lemma halfheight_lowerBase_area {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    TriangularCovering.area
      (lowerPhysicalBase true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
        N (fun j => tag j/b) i) =
      (2/b)^2 * TriangularCovering.area (lowerPhysicalBase false b eta T N tag i) := by
  unfold lowerPhysicalBase
  rw [← lowerPhysicalAxis_normalized hb eta (tag i),
    ← halfheight_lowerLocal_image hb eta T N i]
  exact projected_area_mapToCanonical (ne_of_gt hb) _ _

lemma centered_upperBase_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    (fun z => (1/b) • z) ''
      upperPhysicalBase true b eta T N tag i =
        upperPhysicalBase true 1 (effectiveTilt b eta) (fun r => T (b*r))
          N (fun j => tag j/b) i := by
  unfold upperPhysicalBase
  rw [← projected_image_mapCenteredToCanonical, centered_upperLocal_image hb,
    upperPhysicalAxis_normalized hb]

lemma centered_upperBase_area {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    TriangularCovering.area
      (upperPhysicalBase true 1 (effectiveTilt b eta) (fun r => T (b*r))
        N (fun j => tag j/b) i) =
      (1/b)^2 * TriangularCovering.area (upperPhysicalBase true b eta T N tag i) := by
  unfold upperPhysicalBase
  rw [← upperPhysicalAxis_normalized hb eta (tag i),
    ← centered_upperLocal_image hb eta T N i]
  exact projected_area_mapCenteredToCanonical (ne_of_gt hb) _ _

lemma centered_lowerBase_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    (fun z => (1/b) • z) ''
      lowerPhysicalBase true b eta T N tag i =
        lowerPhysicalBase true 1 (effectiveTilt b eta) (fun r => T (b*r))
          N (fun j => tag j/b) i := by
  unfold lowerPhysicalBase
  rw [← projected_image_mapCenteredToCanonical, centered_lowerLocal_image hb,
    lowerPhysicalAxis_normalized hb]

lemma centered_lowerBase_area {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    TriangularCovering.area
      (lowerPhysicalBase true 1 (effectiveTilt b eta) (fun r => T (b*r))
        N (fun j => tag j/b) i) =
      (1/b)^2 * TriangularCovering.area (lowerPhysicalBase true b eta T N tag i) := by
  unfold lowerPhysicalBase
  rw [← lowerPhysicalAxis_normalized hb eta (tag i),
    ← centered_lowerLocal_image hb eta T N i]
  exact projected_area_mapCenteredToCanonical (ne_of_gt hb) _ _

lemma halfheight_actualCost_scale {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tagU tagL : Fin N → ℝ) :
    physicalActualCost true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
      N (fun j => tagU j/b) (fun j => tagL j/b) =
      (2/b)^2 * physicalActualCost false b eta T N tagU tagL := by
  unfold physicalActualCost
  simp only [halfheight_upperBase_area hb, halfheight_lowerBase_area hb,
    ← Finset.mul_sum, mul_add]

lemma centered_actualCost_scale {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tagU tagL : Fin N → ℝ) :
    physicalActualCost true 1 (effectiveTilt b eta) (fun r => T (b*r))
      N (fun j => tagU j/b) (fun j => tagL j/b) =
      (1/b)^2 * physicalActualCost true b eta T N tagU tagL := by
  unfold physicalActualCost
  simp only [centered_upperBase_area hb, centered_lowerBase_area hb,
    ← Finset.mul_sum, mul_add]

lemma halfheight_upperCylinder_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    mapToCanonical b ''
      RadialSweep.cylinder (upperPhysicalAxis b eta (tag i))
        (upperPhysicalBase false b eta T N tag i) =
      RadialSweep.cylinder (upperPhysicalAxis 1 (effectiveTilt b eta) (tag i/b))
        (upperPhysicalBase true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
          N (fun j => tag j/b) i) := by
  rw [cylinder_mapToCanonical (ne_of_gt hb), halfheight_upperBase_image hb,
    upperPhysicalAxis_normalized hb]

lemma halfheight_lowerCylinder_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    mapToCanonical b ''
      RadialSweep.cylinder (lowerPhysicalAxis b eta (tag i))
        (lowerPhysicalBase false b eta T N tag i) =
      RadialSweep.cylinder (lowerPhysicalAxis 1 (effectiveTilt b eta) (tag i/b))
        (lowerPhysicalBase true 1 (effectiveTilt b eta) (fun r => 2*T (b*r))
          N (fun j => tag j/b) i) := by
  rw [cylinder_mapToCanonical (ne_of_gt hb), halfheight_lowerBase_image hb,
    lowerPhysicalAxis_normalized hb]

lemma centered_upperCylinder_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    mapCenteredToCanonical b ''
      RadialSweep.cylinder (upperPhysicalAxis b eta (tag i))
        (upperPhysicalBase true b eta T N tag i) =
      RadialSweep.cylinder (upperPhysicalAxis 1 (effectiveTilt b eta) (tag i/b))
        (upperPhysicalBase true 1 (effectiveTilt b eta) (fun r => T (b*r))
          N (fun j => tag j/b) i) := by
  rw [cylinder_mapCenteredToCanonical (ne_of_gt hb), centered_upperBase_image hb,
    upperPhysicalAxis_normalized hb]

lemma centered_lowerCylinder_image {b : ℝ} (hb : 0 < b) (eta : ℝ) (T : ℝ → ℝ)
    (N : ℕ) (tag : Fin N → ℝ) (i : Fin N) :
    mapCenteredToCanonical b ''
      RadialSweep.cylinder (lowerPhysicalAxis b eta (tag i))
        (lowerPhysicalBase true b eta T N tag i) =
      RadialSweep.cylinder (lowerPhysicalAxis 1 (effectiveTilt b eta) (tag i/b))
        (lowerPhysicalBase true 1 (effectiveTilt b eta) (fun r => T (b*r))
          N (fun j => tag j/b) i) := by
  rw [cylinder_mapCenteredToCanonical (ne_of_gt hb), centered_lowerBase_image hb,
    lowerPhysicalAxis_normalized hb]

end RadialPhysical

end

end OAI