cfahlgren1's picture
download
raw
2.34 kB
import OAI.Combinatorics.SphericalRamsey.Model
import OAI.Combinatorics.SphericalRamsey.DerivationCoordinates
import Mathlib.Tactic.FinCases
import Mathlib.Tactic.Ring
namespace OAI
noncomputable section
open scoped BigOperators
namespace GrahamSpherical
theorem rotation_norm_sq : u ^ 2 + v ^ 2 = 1 := by
have hden : (1 + parameter ^ 2 : ℝ) ≠ 0 := by positivity
unfold u v
field_simp [hden]
ring
theorem derivation_u_v (D : Derivation ℤ ℝ ℝ)
(hD : D parameter = (1 + parameter ^ 2) / 2) :
D u = -v ∧ D v = u :=
derivation_rotation_coordinates D parameter hD
/-- The translation and orientation-derivative coefficients are arbitrary. -/
theorem weighted_coordinate_square (D : Derivation ℤ ℝ ℝ)
(hD : D parameter = (1 + parameter ^ 2) / 2)
(p a b c d : ℝ) :
∑ i : Label, (weight i : ℝ) *
(p + a * coordinates i 0 + b * coordinates i 1 +
c * D (coordinates i 0) + d * D (coordinates i 1)) ^ 2 =
4 * (c ^ 2 + d ^ 2) := by
obtain ⟨hu, hv⟩ := derivation_u_v D hD
calc
_ = 4 * (u ^ 2 + v ^ 2) * (c ^ 2 + d ^ 2) +
4 * (u ^ 2 + v ^ 2 - 1) * (a ^ 2 + b ^ 2) := by
simp [Fintype.sum_prod_type, Fin.sum_univ_succ, coordinates,
squareCoordinate, weight, map_neg, hu, hv]
ring
_ = _ := by rw [rotation_norm_sq]; ring
/-- Weighted derivative energy for an actual affine placement. The mixed
orthogonality condition is not needed after the exact moment cancellation. -/
theorem weighted_affine_derivation_energy {n : ℕ}
(D : Derivation ℤ ℝ ℝ)
(hD : D parameter = (1 + parameter ^ 2) / 2)
(z A B : Fin n → ℝ)
(hA : ∑ j, A j ^ 2 = 1) (hB : ∑ j, B j ^ 2 = 1) :
∑ i : Label, (weight i : ℝ) * ∑ j : Fin n,
(D (z j + coordinates i 0 * A j + coordinates i 1 * B j)) ^ 2 = 8 := by
simp_rw [Finset.mul_sum]
rw [Finset.sum_comm]
have he (i : Label) (j : Fin n) :
D (z j + coordinates i 0 * A j + coordinates i 1 * B j) =
D (z j) + D (A j) * coordinates i 0 + D (B j) * coordinates i 1 +
A j * D (coordinates i 0) + B j * D (coordinates i 1) := by
simp only [map_add, Derivation.leibniz, smul_eq_mul]
ring
simp_rw [he, weighted_coordinate_square D hD]
rw [← Finset.mul_sum, Finset.sum_add_distrib, hA, hB]
norm_num
end GrahamSpherical
end
end OAI

Xet Storage Details

Size:
2.34 kB
·
Xet hash:
e1bdac370979f5166eea1f0f1c1f2b52e54b15e7c652588b0bb62dc9186d98a8

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.