File size: 4,284 Bytes
cead56f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Geometry.ProjectionVolume.ProductNormals
import OAI.Geometry.ProjectionVolume.ProductCoefficients
import OAI.Geometry.ProjectionVolume.ProductFacetAreaValues
import OAI.Geometry.ProjectionVolume.ProjectionJacobian

namespace OAI

noncomputable section

open Set MeasureTheory
open scoped RealInnerProductSpace

namespace Paper092

theorem productFacet_brightness (a : ProductFacetIndex) (u : Euclidean 20) :
    brightness (productFacet a) u =
      |productVelocity u a| / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by
  have hsqrt : 0 < Real.sqrt (10 : ℝ) := Real.sqrt_pos.mpr (by norm_num)
  cases a with
  | inl a =>
    cases a with
    | none =>
      have hn : ‖liftFirst (diagonalUnitNormal 10)‖ = 1 := by
        rw [liftFirst_norm]
        exact diagonalUnitNormal_norm 10 (by norm_num)
      rw [brightness_of_subset_affine_hyperplane u (liftFirst (diagonalUnitNormal 10))
        hn (Real.sqrt 10)⁻¹ _ productFacet_left_diagonal_plane]
      rw [show 20 - 1 = 19 by rfl, productFacet_inl_none_area,
        ENNReal.toReal_ofReal (by positivity), inner_liftFirst, inner_diagonalUnitNormal]
      simp only [productVelocity, simplexVelocity, abs_neg, abs_div, Nat.cast_ofNat,
        abs_of_pos hsqrt]
      field_simp
    | some i =>
      have hn : ‖liftFirst (EuclideanSpace.single i (1 : ℝ))‖ = 1 := by
        rw [liftFirst_norm, coordinate_normal_norm]
      rw [brightness_of_subset_affine_hyperplane u (liftFirst (EuclideanSpace.single i 1))
        hn 0 _ (productFacet_left_coordinate_plane i)]
      rw [show 20 - 1 = 19 by rfl, productFacet_inl_some_area,
        ENNReal.toReal_ofReal (by positivity)]
      simp [inner_liftFirst, EuclideanSpace.inner_single_right, productVelocity,
        simplexVelocity, div_eq_mul_inv]
  | inr a =>
    cases a with
    | none =>
      have hn : ‖liftSecond (diagonalUnitNormal 10)‖ = 1 := by
        rw [liftSecond_norm]
        exact diagonalUnitNormal_norm 10 (by norm_num)
      rw [brightness_of_subset_affine_hyperplane u (liftSecond (diagonalUnitNormal 10))
        hn (Real.sqrt 10)⁻¹ _ productFacet_right_diagonal_plane]
      rw [show 20 - 1 = 19 by rfl, productFacet_inr_none_area,
        ENNReal.toReal_ofReal (by positivity), inner_liftSecond, inner_diagonalUnitNormal]
      simp only [productVelocity, simplexVelocity, abs_neg, abs_div, Nat.cast_ofNat,
        abs_of_pos hsqrt]
      field_simp
    | some i =>
      have hn : ‖liftSecond (EuclideanSpace.single i (1 : ℝ))‖ = 1 := by
        rw [liftSecond_norm, coordinate_normal_norm]
      rw [brightness_of_subset_affine_hyperplane u (liftSecond (EuclideanSpace.single i 1))
        hn 0 _ (productFacet_right_coordinate_plane i)]
      rw [show 20 - 1 = 19 by rfl, productFacet_inr_some_area,
        ENNReal.toReal_ofReal (by positivity)]
      simp [inner_liftSecond, EuclideanSpace.inner_single_right, productVelocity,
        simplexVelocity, div_eq_mul_inv]

theorem productWitness_brightness (u : Euclidean 20) :
    brightness productWitness u =
      ((∑ i, |firstBlock u i|) + |∑ i, firstBlock u i| +
        (∑ i, |secondBlock u i|) + |∑ i, secondBlock u i|) /
          (2 * (Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by
  by_cases hu : u = 0
  · simp [hu, brightness, firstBlock, secondBlock]
  calc
    brightness productWitness u =
        ∑ a : {a : ProductFacetIndex // productVelocity u a < 0},
          brightness (productFacet a.val) u := by
      rw [brightness_product_eq_front_sum u hu, Finset.mul_sum]
      rfl
    _ = ∑ a : {a : ProductFacetIndex // productVelocity u a < 0},
          -productVelocity u a.val / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by
      apply Finset.sum_congr rfl
      intro a _
      rw [productFacet_brightness, abs_of_neg a.property]
    _ = (∑ a : {a : ProductFacetIndex // productVelocity u a < 0},
          -productVelocity u a.val) / ((Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by
      rw [Finset.sum_div]
    _ = ((∑ i, |firstBlock u i|) + |∑ i, firstBlock u i| +
        (∑ i, |secondBlock u i|) + |∑ i, secondBlock u i|) /
          (2 * (Nat.factorial 9 : ℝ) * (Nat.factorial 10 : ℝ)) := by
      rw [product_front_coefficient]
      ring

end Paper092

end

end OAI