Documentation

Atlas.IntroductionToPartialDifferentialEquations.code.CM12.Wave3D

@[reducible, inline]

Shorthand for $3$-dimensional Euclidean space $\mathbb{R}^3$ used as the spatial domain for the wave equation.

Instances For
    structure WaveEquation3D.IsWaveSolution3D (u : E3) :

    Predicate stating that $u : \mathbb{R} \times \mathbb{R}^3 \to \mathbb{R}$ is a $C^2$ solution of the $3$-dimensional wave equation $-\partial_t^2 u + \Delta u = 0$.

    Instances For

      Cauchy data for the $3$D wave equation: an initial position $f \in C^3(\mathbb{R}^3)$ and an initial velocity $g \in C^2(\mathbb{R}^3)$.

      Instances For
        noncomputable def WaveEquation3D.sphericalToCart (θ φ : ) :

        Conversion from spherical coordinates $(\theta, \varphi)$ on the unit sphere $S^2 \subset \mathbb{R}^3$ to Cartesian coordinates $(\sin\theta\cos\varphi, \sin\theta\sin\varphi, \cos\theta)$.

        Instances For
          @[irreducible]
          noncomputable def WaveEquation3D.SphericalMean (h : E3) (x : E3) (r : ) :

          The spherical mean of $h : \mathbb{R}^3 \to \mathbb{R}$ over the sphere $\partial B_r(x)$ of radius $r$ centred at $x$, defined via the spherical parametrization $\frac{1}{4\pi}\int_0^\pi\!\!\int_0^{2\pi} h(x + r\,\omega(\theta,\varphi))\sin\theta\,d\varphi\,d\theta$.

          Instances For

            Elementary computation: $\int_0^\pi \sin\theta\, d\theta = 2$.

            theorem WaveEquation3D.sphericalMean_at_zero (h : E3) (x : E3) :
            SphericalMean h x 0 = h x

            The spherical mean over a sphere of radius zero equals the value at the centre: $\mathrm{SphericalMean}\,h\,x\,0 = h(x)$.

            The spherical-to-Cartesian map (viewed as a function of an outer parameter and the angles $(\theta, \varphi)$) is continuous.

            theorem WaveEquation3D.sphericalMean_continuous (h : E3) (hh : Continuous h) (x : E3) :
            Continuous fun (r : ) => SphericalMean h x r

            If $h$ is continuous, then $r \mapsto \mathrm{SphericalMean}\,h\,x\,r$ is continuous in the radius $r$.

            theorem WaveEquation3D.SphericalMean_eq (h : E3) (x : E3) (r : ) :
            SphericalMean h x r = 1 / (4 * Real.pi) * (θ : ) in 0..Real.pi, (φ : ) in 0..2 * Real.pi, h (x + r sphericalToCart θ φ) * Real.sin θ

            Definitional unfolding of SphericalMean as a parametric integral in spherical coordinates. Used to expose the integral form after the definition is marked irreducible.

            noncomputable def WaveEquation3D.SphereIntegral (h : E3) (x : E3) (r : ) :

            The surface integral $\int_{\partial B_r(x)} h\,d\sigma = 4\pi r^2 \cdot \mathrm{SphericalMean}\,h\,x\,r$ on the sphere of radius $r$ around $x$.

            Instances For
              noncomputable def WaveEquation3D.SphereIntegralNormalDeriv (h : E3) (x : E3) (r : ) :

              The integral over $\partial B_r(x)$ of the radial (outward normal) derivative of $h$, expressed as $4\pi r^2$ times the radial derivative of the spherical mean.

              Instances For
                theorem WaveEquation3D.leibniz_sphericalCoord_iteratedDeriv2 (u : E3) (s r : ) (x : E3) (hsmooth : ContDiff 2 fun (p : × E3) => u p.1 p.2) :
                iteratedDeriv 2 (fun (s' : ) => (θ : ) in 0..Real.pi, (φ : ) in 0..2 * Real.pi, u s' (x + r sphericalToCart θ φ) * Real.sin θ) s = (θ : ) in 0..Real.pi, (φ : ) in 0..2 * Real.pi, iteratedDeriv 2 (fun (s' : ) => u s' (x + r sphericalToCart θ φ)) s * Real.sin θ

                Leibniz / differentiation-under-the-integral for the second time derivative: the iterated derivative of order $2$ commutes with the spherical integral.

                theorem WaveEquation3D.contDiffAt_sphericalCoord_integral (u : E3) (s r : ) (x : E3) (hsmooth : ContDiff 2 fun (p : × E3) => u p.1 p.2) :
                ContDiffAt 2 (fun (s' : ) => (θ : ) in 0..Real.pi, (φ : ) in 0..2 * Real.pi, u s' (x + r sphericalToCart θ φ) * Real.sin θ) s

                Smoothness of the spherical-coordinate integral in the time parameter $s'$: the map $s' \mapsto \int_{S^2} u(s', x + r\omega)\,d\sigma(\omega)$ is $C^2$.

                theorem WaveEquation3D.sphericalMean_leibniz_deriv2 (u : E3) (s r : ) (x : E3) (hu : IsWaveSolution3D u) :
                iteratedDeriv 2 (fun (s' : ) => SphericalMean (u s') x r) s = SphericalMean (fun (y : E3) => iteratedDeriv 2 (fun (s' : ) => u s' y) s) x r

                The second time derivative passes inside the spherical mean: $\partial_t^2 \mathrm{SphericalMean}(u(t,\cdot))(x, r) = \mathrm{SphericalMean}(\partial_t^2 u(t,\cdot))(x, r)$.

                theorem WaveEquation3D.sphericalMean_differentiable_time (u : E3) (r : ) (x : E3) (hu : IsWaveSolution3D u) (s : ) :
                DifferentiableAt (fun (s' : ) => SphericalMean (u s') x r) s

                For a wave solution $u$, the spherical mean $s' \mapsto \mathrm{SphericalMean}(u(s',\cdot))(x,r)$ is differentiable at every time $s$.

                theorem WaveEquation3D.sphericalMean_deriv_differentiable_time (u : E3) (r : ) (x : E3) (hu : IsWaveSolution3D u) (s : ) :
                DifferentiableAt (fun (s' : ) => deriv (fun (s'' : ) => SphericalMean (u s'') x r) s') s

                The first time derivative of the spherical mean is itself differentiable in time when $u$ is a $C^2$ wave solution.

                theorem WaveEquation3D.leibniz_sphericalCoord_deriv1 (u : E3) (s r : ) (x : E3) (hsmooth : ContDiff 2 fun (p : × E3) => u p.1 p.2) :
                deriv (fun (s' : ) => (θ : ) in 0..Real.pi, (φ : ) in 0..2 * Real.pi, u s' (x + r sphericalToCart θ φ) * Real.sin θ) s = (θ : ) in 0..Real.pi, (φ : ) in 0..2 * Real.pi, deriv (fun (s' : ) => u s' (x + r sphericalToCart θ φ)) s * Real.sin θ

                Leibniz / differentiation-under-the-integral for the first time derivative of the parametric spherical integral.

                theorem WaveEquation3D.sphericalMean_leibniz_deriv1 (u : E3) (s r : ) (x : E3) (hu : IsWaveSolution3D u) :
                fderiv (fun (s' : ) => SphericalMean (u s') x r) s = ContinuousLinearMap.smulRight 1 (SphericalMean (fun (y : E3) => (fderiv (fun (s' : ) => u s' y) s) 1) x r)

                Fréchet-derivative form of differentiation under the spherical mean in time: $\partial_t \mathrm{SphericalMean}(u(t,\cdot))(x,r) = \mathrm{SphericalMean}(\partial_t u(t,\cdot))(x,r)$.

                theorem WaveEquation3D.sphericalMean_radius_hasDerivAt (f : E3) (x : E3) (r : ) (_hr : 0 < r) (hf : ContDiff 2 f) :
                HasDerivAt (fun (ρ : ) => SphericalMean f x ρ) (deriv (fun (ρ : ) => SphericalMean f x ρ) r) r

                For a $C^2$ function $f$, the spherical mean $\rho \mapsto \mathrm{SphericalMean}\,f\,x\,\rho$ has a derivative at every positive radius $r$.

                theorem WaveEquation3D.leibniz_sphericalMean_tt (u : E3) (hu : IsWaveSolution3D u) (r : ) (_hr : 0 r) (x : E3) :
                (∀ (s : ), DifferentiableAt (fun (s' : ) => SphericalMean (u s') x r) s) (∀ (s : ), DifferentiableAt (fun (s' : ) => (fderiv (fun (s'' : ) => SphericalMean (u s'') x r) s') 1) s) ∀ (t : ), (fderiv (fun (s : ) => (fderiv (fun (s' : ) => SphericalMean (u s') x r) s) 1) t) 1 = SphericalMean (fun (y : E3) => (fderiv (fun (s : ) => (fderiv (fun (s' : ) => u s' y) s) 1) t) 1) x r

                Packaged Leibniz statement for second time derivatives of the spherical mean: $\mathrm{SphericalMean}(u(\cdot,\cdot))$ is twice differentiable in $t$ and the second derivative commutes with the spherical mean.

                theorem WaveEquation3D.iteratedDeriv_two_mul_id (f : ) (hf : ContDiff 2 f) (x : ) :
                iteratedDeriv 2 (fun (ρ : ) => ρ * f ρ) x = x * iteratedDeriv 2 f x + 2 * deriv f x

                Product-rule identity: for $f \in C^2$, $\frac{d^2}{d\rho^2}(\rho f(\rho))\big|_{\rho = x} = x f''(x) + 2 f'(x)$.

                theorem WaveEquation3D.sphericalMean_contDiff_radius (u : E3) (hu : IsWaveSolution3D u) (t : ) (x : E3) :

                For a wave solution $u$, the spherical mean $\rho \mapsto \mathrm{SphericalMean}(u(t,\cdot))(x, \rho)$ is $C^2$ as a function of the radius.

                theorem WaveEquation3D.divergence_coarea_darboux_identity (f : E3) (x : E3) (r : ) (hf : ContDiff 2 f) :
                r * SphericalMean (fun (y : E3) => i : Fin 3, (fderiv (fun (z : E3) => (fderiv f z) (EuclideanSpace.single i 1)) y) (EuclideanSpace.single i 1)) x r = r * iteratedDeriv 2 (SphericalMean f x) r + 2 * deriv (SphericalMean f x) r

                Darboux-type identity (via divergence theorem and the coarea formula): $r \cdot \mathrm{SphericalMean}(\Delta f)(x, r) = r M_f''(r) + 2 M_f'(r)$, where $M_f(r) = \mathrm{SphericalMean}\,f\,x\,r$.

                theorem WaveEquation3D.darboux_sphericalMean_expanded (u : E3) (hu : IsWaveSolution3D u) (t : ) (x : E3) (r : ) :
                r * SphericalMean (fun (y : E3) => i : Fin 3, (fderiv (fun (z : E3) => (fderiv (fun (z' : E3) => u t z') z) (EuclideanSpace.single i 1)) y) (EuclideanSpace.single i 1)) x r = r * iteratedDeriv 2 (SphericalMean (u t) x) r + 2 * deriv (SphericalMean (u t) x) r

                Specialisation of the Darboux identity to a slice $u(t, \cdot)$ of a wave solution.

                theorem WaveEquation3D.darboux_sphericalMean_core (u : E3) (hu : IsWaveSolution3D u) (t : ) (x : E3) (r : ) :
                r * SphericalMean (fun (y : E3) => i : Fin 3, (fderiv (fun (z : E3) => (fderiv (fun (z' : E3) => u t z') z) (EuclideanSpace.single i 1)) y) (EuclideanSpace.single i 1)) x r = iteratedDeriv 2 (fun (ρ : ) => ρ * SphericalMean (u t) x ρ) r

                Compact form of the Darboux identity, rewriting the right-hand side as $\partial_\rho^2(\rho \cdot \mathrm{SphericalMean}(u(t,\cdot))(x,\rho))$.

                theorem WaveEquation3D.sphericalMean_laplacian_decomp (u : E3) (hu : IsWaveSolution3D u) (t : ) (x : E3) (r : ) :
                r * SphericalMean (fun (y : E3) => i : Fin 3, (fderiv (fun (z : E3) => (fderiv (fun (z' : E3) => u t z') z) (EuclideanSpace.single i 1)) y) (EuclideanSpace.single i 1)) x r = r * iteratedDeriv 2 (SphericalMean (u t) x) r + 2 * deriv (SphericalMean (u t) x) r

                Decomposition relating the spherical mean of the Laplacian of $u(t,\cdot)$ to the radial second derivative of the spherical mean (expanded version).

                theorem WaveEquation3D.darboux_sphericalMean_eq (u : E3) (hu : IsWaveSolution3D u) (t : ) (x : E3) (r : ) :
                r * SphericalMean (fun (y : E3) => i : Fin 3, (fderiv (fun (z : E3) => (fderiv (fun (z' : E3) => u t z') z) (EuclideanSpace.single i 1)) y) (EuclideanSpace.single i 1)) x r = iteratedDeriv 2 (fun (ρ : ) => ρ * SphericalMean (u t) x ρ) r

                Equivalent compact form of the Darboux identity for $u(t,\cdot)$.

                theorem WaveEquation3D.divergence_darboux_sphericalMean (u : E3) (hu : IsWaveSolution3D u) (t r : ) (_hr : 0 r) (x : E3) :
                r * SphericalMean (fun (y : E3) => i : Fin 3, (fderiv (fun (z : E3) => (fderiv (fun (z' : E3) => u t z') z) (EuclideanSpace.single i 1)) y) (EuclideanSpace.single i 1)) x r = (fderiv (fun (ρ : ) => (fderiv (fun (ρ' : ) => ρ' * SphericalMean (u t) x ρ') ρ) 1) r) 1

                The Darboux identity rewritten with the second radial derivative expressed via fderiv: $r \cdot \mathrm{SphericalMean}(\Delta u(t,\cdot))(x,r) = \partial_\rho^2(\rho \cdot M(\rho))|_{\rho=r}$.

                theorem WaveEquation3D.sphericalMean_commute_with_tt (u : E3) (hu : IsWaveSolution3D u) (t r : ) (hr : 0 r) (x : E3) :
                (fderiv (fun (s : ) => (fderiv (fun (s' : ) => r * SphericalMean (u s') x r) s) 1) t) 1 = r * SphericalMean (fun (y : E3) => (fderiv (fun (s : ) => (fderiv (fun (s' : ) => u s' y) s) 1) t) 1) x r

                The second time derivative commutes with multiplication by $r$ and with the spherical mean: $\partial_t^2 (r \cdot \mathrm{SphericalMean}(u(\cdot,\cdot))(x,r)) = r \cdot \mathrm{SphericalMean}(\partial_t^2 u(\cdot,\cdot))(x,r)$.

                theorem WaveEquation3D.sphericalMean_laplacian_radial (u : E3) (hu : IsWaveSolution3D u) (t r : ) (hr : 0 r) (x : E3) :
                r * SphericalMean (fun (y : E3) => i : Fin 3, (fderiv (fun (z : E3) => (fderiv (fun (z' : E3) => u t z') z) (EuclideanSpace.single i 1)) y) (EuclideanSpace.single i 1)) x r = (fderiv (fun (ρ : ) => (fderiv (fun (ρ' : ) => ρ' * SphericalMean (u t) x ρ') ρ) 1) r) 1

                Restates the Darboux identity in fderiv notation, identifying the spherical mean of the Laplacian with a radial second-derivative expression.

                theorem WaveEquation3D.sphericalMean_wave_reduction (u : E3) (hu : IsWaveSolution3D u) (t r : ) (hr : 0 r) (x : E3) :
                (fderiv (fun (s : ) => (fderiv (fun (s' : ) => r * SphericalMean (u s') x r) s) 1) t) 1 = (fderiv (fun (ρ : ) => (fderiv (fun (ρ' : ) => ρ' * SphericalMean (u t) x ρ') ρ) 1) r) 1

                Key reduction: $w(t,r) := r \cdot \mathrm{SphericalMean}(u(t,\cdot))(x,r)$ satisfies the $1+1$-dimensional wave equation $\partial_t^2 w = \partial_r^2 w$.

                theorem WaveEquation3D.sphericalMean_time_deriv (u : E3) (hu : IsWaveSolution3D u) (r : ) (_hr : 0 < r) (x : E3) :
                (fderiv (fun (t : ) => r * SphericalMean (u t) x r) 0) 1 = r * SphericalMean (fun (y : E3) => (fderiv (fun (t : ) => u t y) 0) 1) x r

                Initial time derivative of $t \mapsto r \cdot \mathrm{SphericalMean}(u(t,\cdot))(x,r)$ at $t=0$ equals $r \cdot \mathrm{SphericalMean}(\partial_t u(0,\cdot))(x,r)$.

                theorem WaveEquation3D.sphericalMean_limit_zero (h : E3) (hh : Continuous h) (x : E3) :
                Filter.Tendsto (fun (r : ) => SphericalMean h x r) (nhdsWithin 0 (Set.Ioi 0)) (nhds (h x))

                For a continuous $h$, the spherical mean tends to the centre value as the radius shrinks to $0^+$: $\lim_{r \to 0^+} \mathrm{SphericalMean}\,h\,x\,r = h(x)$.

                theorem WaveEquation3D.dalembert_halfline_representation (w : ) (F G : ) (hF : ContDiff 2 F) (hG : ContDiff 1 G) (hF0 : F 0 = 0) (hG0 : G 0 = 0) (hw_reg : ContDiff 2 fun (p : × ) => w p.1 p.2) (hw_wave : ∀ (t r : ), 0 rderiv (fun (t' : ) => deriv (fun (t'' : ) => w t'' r) t') t = deriv (fun (r' : ) => deriv (fun (r'' : ) => w t r'') r') r) (hw_boundary : ∀ (t : ), w t 0 = 0) (hw_initial_pos : ∀ (r : ), 0 rw 0 r = F r) (hw_initial_vel : ∀ (r : ), 0 < rHasDerivAt (fun (t : ) => w t r) (G r) 0) (t r : ) (ht : 0 t) (hr : 0 r) (hrt : r t) :
                w t r = 1 / 2 * (F (r + t) - F (t - r)) + 1 / 2 * (ρ : ) in t - r..r + t, G ρ

                D'Alembert-style formula for the wave equation on the half-line $\{r \ge 0\}$ with Dirichlet boundary $w(t,0) = 0$, vanishing odd-extended initial data $F, G$ with $F(0) = G(0) = 0$. For $r \le t$, $w(t, r) = \tfrac12(F(r+t) - F(t-r)) + \tfrac12 \int_{t-r}^{r+t} G(\rho)\,d\rho$.

                noncomputable def WaveEquation3D.F_tilde (data : CauchyData3D) (r : ) (x : E3) :

                The "tilde" initial position: $\tilde F(r, x) := r \cdot \mathrm{SphericalMean}(f)(x, r)$, the spatial profile of the auxiliary $1+1$-dimensional wave problem associated with $u$.

                Instances For
                  noncomputable def WaveEquation3D.G_tilde (data : CauchyData3D) (r : ) (x : E3) :

                  The "tilde" initial velocity: $\tilde G(r, x) := r \cdot \mathrm{SphericalMean}(g)(x, r)$.

                  Instances For

                    The surface integral equals the area of the sphere times the spherical mean: $\int_{\partial B_r(x)} h\,d\sigma = 4\pi r^2 \cdot \mathrm{SphericalMean}\,h\,x\,r$.

                    theorem WaveEquation3D.sphericalMean_normal_deriv_relation (f : E3) (x : E3) (t : ) (_ht : 0 < t) :
                    SphereIntegralNormalDeriv f x t = 4 * Real.pi * t ^ 2 * deriv (fun (r : ) => SphericalMean f x r) t

                    The integral of the outward normal derivative is $4\pi t^2$ times the radial derivative of the spherical mean.

                    theorem WaveEquation3D.F_tilde_hasDerivAt (f : E3) (x : E3) (t : ) (ht : 0 < t) (hf : ContDiff 2 f) :
                    HasDerivAt (fun (r : ) => r * SphericalMean f x r) (SphericalMean f x t + t * deriv (fun (r : ) => SphericalMean f x r) t) t

                    Product-rule derivative of $\tilde F$: at $t > 0$, $\frac{d}{dr}\big(r \cdot \mathrm{SphericalMean}\,f\,x\,r\big)\big|_{r=t} = \mathrm{SphericalMean}\,f\,x\,t + t \cdot \partial_r\mathrm{SphericalMean}\,f\,x\,t$.

                    theorem WaveEquation3D.symmetric_derivative_tendsto (f : ) (t d : ) (hf : HasDerivAt f d t) :
                    Filter.Tendsto (fun (h : ) => (f (t + h) - f (t - h)) / (2 * h)) (nhdsWithin 0 (Set.Ioi 0)) (nhds d)

                    The symmetric difference quotient $(f(t+h) - f(t-h))/(2h)$ tends to the derivative $f'(t)$ as $h \to 0^+$, provided $f$ has a derivative $d$ at $t$.

                    theorem WaveEquation3D.integral_average_tendsto (g : ) (t : ) (hg : Continuous g) :
                    Filter.Tendsto (fun (h : ) => ( (ρ : ) in t - h..h + t, g ρ) / (2 * h)) (nhdsWithin 0 (Set.Ioi 0)) (nhds (g t))

                    For a continuous $g$, the integral average over a shrinking symmetric interval $\frac{1}{2h}\int_{t-h}^{t+h} g(\rho)\,d\rho$ tends to $g(t)$ as $h \to 0^+$.

                    The spherical-to-Cartesian map $(\theta, \varphi) \mapsto \omega(\theta, \varphi)$ is $C^\infty$ smooth.

                    theorem WaveEquation3D.contDiff_parametric_spherical_integral {H : Type u_1} [NormedAddCommGroup H] [NormedSpace H] (F : H) {n : ℕ∞} (hF : ContDiff n fun (p : H × × ) => F p.1 p.2.1 p.2.2) :
                    ContDiff n fun (x : H) => (θ : ) in 0..Real.pi, (φ : ) in 0..2 * Real.pi, F x θ φ

                    If $F(x, \theta, \varphi)$ is jointly $C^n$ in all three arguments, then the parametric spherical integral $x \mapsto \int_0^\pi\!\!\int_0^{2\pi} F(x, \theta, \varphi)\,d\varphi\,d\theta$ is also $C^n$.

                    theorem WaveEquation3D.sphericalMean_contDiff_of_contDiff (h : E3) (x : E3) {n : ℕ∞} (hh : ContDiff (↑n) h) :

                    If $h$ is $C^n$, then $r \mapsto \mathrm{SphericalMean}\,h\,x\,r$ is $C^n$ in the radius.

                    theorem WaveEquation3D.sphericalMean_contDiff_pair (u : E3) (hu : IsWaveSolution3D u) (x : E3) :
                    ContDiff 2 fun (p : × ) => SphericalMean (u p.1) x p.2

                    Joint $C^2$ smoothness in $(t, r)$ of $(t, r) \mapsto \mathrm{SphericalMean}(u(t,\cdot))(x, r)$ when $u$ is a $C^2$ wave solution.

                    theorem WaveEquation3D.F_tilde_contDiff (data : CauchyData3D) (x : E3) :
                    ContDiff 2 fun (r' : ) => F_tilde data r' x

                    $\tilde F(\cdot, x)$ is $C^2$ in the radial variable, using $f \in C^3$.

                    theorem WaveEquation3D.G_tilde_contDiff (data : CauchyData3D) (x : E3) :
                    ContDiff 1 fun (r' : ) => G_tilde data r' x

                    $\tilde G(\cdot, x)$ is $C^1$ in the radial variable, using $g \in C^2$.

                    theorem WaveEquation3D.limit_sphericalMean_dalembert (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (hf : ∀ (x : E3), u 0 x = data.f x) (hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (t : ) (ht : 0 < t) (x : E3) :
                    u t x = (fderiv (fun (r : ) => F_tilde data r x) t) 1 + G_tilde data t x

                    Taking $r \to 0^+$ in the d'Alembert formula for the auxiliary $1+1$-dimensional problem recovers $u(t, x)$: $u(t, x) = \partial_r \tilde F(t, x) + \tilde G(t, x)$.

                    theorem WaveEquation3D.limit_gives_derivative_plus_G (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (hf : ∀ (x : E3), u 0 x = data.f x) (hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (t : ) (ht : 0 < t) (x : E3) :
                    u t x = (fderiv (fun (r : ) => F_tilde data r x) t) 1 + G_tilde data t x

                    Restatement of limit_sphericalMean_dalembert: $u(t, x) = \partial_r \tilde F(t, x) + \tilde G(t, x)$.

                    theorem WaveEquation3D.differentiation_under_integral_kirchhoff (data : CauchyData3D) (t : ) (ht : 0 < t) (x : E3) :
                    (fderiv (fun (r : ) => F_tilde data r x) t) 1 = 1 / (4 * Real.pi * t ^ 2) * SphereIntegral data.f x t + 1 / (4 * Real.pi * t) * SphereIntegralNormalDeriv data.f x t

                    Differentiation under the integral sign yields the two surface-integral terms appearing in Kirchhoff's formula: $\partial_r \tilde F(t, x) = \frac{1}{4\pi t^2}\int_{\partial B_t(x)} f,d\sigma

                    • \frac{1}{4\pi t}\int_{\partial B_t(x)} \nabla_{\hat N} f,d\sigma$.
                    theorem WaveEquation3D.G_tilde_equals_sphere_integral (data : CauchyData3D) (t : ) (ht : 0 < t) (x : E3) :
                    G_tilde data t x = 1 / (4 * Real.pi * t) * SphereIntegral data.g x t

                    $\tilde G(t, x) = \frac{1}{4\pi t}\int_{\partial B_t(x)} g\,d\sigma$, the last term of Kirchhoff's formula.

                    theorem WaveEquation3D.kirchhoff_formula (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (hf : ∀ (x : E3), u 0 x = data.f x) (hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (t : ) (ht : 0 < t) (x : E3) :
                    u t x = 1 / (4 * Real.pi * t ^ 2) * SphereIntegral data.f x t + 1 / (4 * Real.pi * t) * SphereIntegralNormalDeriv data.f x t + 1 / (4 * Real.pi * t) * SphereIntegral data.g x t

                    Kirchhoff's formula (Class Meeting #12, Theorem 1.1). The unique $C^2$ solution of the $3$-dimensional Cauchy problem $-\partial_t^2 u + \Delta u = 0$, $u(0,x) = f(x)$, $\partial_t u(0,x) = g(x)$ admits the representation $u(t, x) = \frac{1}{4\pi t^2}\int_{\partial B_t(x)} f,d\sigma

                    • \frac{1}{4\pi t}\int_{\partial B_t(x)} \nabla_{\hat N} f,d\sigma
                    • \frac{1}{4\pi t}\int_{\partial B_t(x)} g,d\sigma$ for $t > 0$.
                    noncomputable def WaveEquation3D.sphericalAverage (u : E3) (t r : ) (x : E3) :

                    The spherical average $\mathrm{SphericalMean}(u(t,\cdot))(x, r)$ of a wave solution $u$ at time $t$, centred at $x$ with radius $r$.

                    Instances For
                      noncomputable def WaveEquation3D.sphericalAverage_tilde (u : E3) (t r : ) (x : E3) :

                      The radius-weighted spherical average $r \cdot \mathrm{SphericalMean}(u(t,\cdot))(x, r)$, which solves a $1+1$-dimensional half-line wave equation in $(t, r)$.

                      Instances For
                        theorem WaveEquation3D.sphericalAverage_solves_1d_wave (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (_hf : ∀ (x : E3), u 0 x = data.f x) (_hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (t r : ) (hr : 0 r) (x : E3) :
                        (fderiv (fun (s : ) => (fderiv (fun (s' : ) => sphericalAverage_tilde u s' r x) s) 1) t) 1 = (fderiv (fun (ρ : ) => (fderiv (fun (ρ' : ) => sphericalAverage_tilde u t ρ' x) ρ) 1) r) 1

                        The weighted spherical average $\tilde A(t, r) := r \cdot \mathrm{SphericalMean}(u(t,\cdot))(x, r)$ solves the $1+1$-dimensional wave equation $\partial_t^2 \tilde A = \partial_r^2 \tilde A$.

                        theorem WaveEquation3D.sphericalAverage_tilde_initial_position (data : CauchyData3D) (u : E3) (_hu : IsWaveSolution3D u) (hf : ∀ (x : E3), u 0 x = data.f x) (_hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (r : ) (_hr : 0 < r) (x : E3) :

                        Initial position of the weighted spherical average: $\tilde A(0, r, x) = \tilde F(r, x)$.

                        theorem WaveEquation3D.sphericalAverage_tilde_initial_velocity (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (_hf : ∀ (x : E3), u 0 x = data.f x) (hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (r : ) (hr : 0 < r) (x : E3) :
                        (fderiv (fun (t : ) => sphericalAverage_tilde u t r x) 0) 1 = G_tilde data r x

                        Initial velocity of the weighted spherical average: $\partial_t \tilde A(0, r, x) = \tilde G(r, x)$.

                        theorem WaveEquation3D.sphericalAverage_tilde_contDiff (u : E3) (hu : IsWaveSolution3D u) (x : E3) :
                        ContDiff 2 fun (p : × ) => sphericalAverage_tilde u p.1 p.2 x

                        The map $(t, r) \mapsto \tilde A(t, r, x) = r \cdot \mathrm{SphericalMean}(u(t,\cdot))(x, r)$ is $C^2$.

                        theorem WaveEquation3D.sphericalAverage_tilde_wave_deriv (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (hf : ∀ (x : E3), u 0 x = data.f x) (hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (x : E3) (t r : ) :
                        0 rderiv (fun (t' : ) => deriv (fun (t'' : ) => sphericalAverage_tilde u t'' r x) t') t = deriv (fun (r' : ) => deriv (fun (r'' : ) => sphericalAverage_tilde u t r'' x) r') r

                        The weighted spherical average $\tilde A$ satisfies the $1+1$-dimensional wave equation $\partial_t^2 \tilde A = \partial_r^2 \tilde A$ (stated in deriv form).

                        theorem WaveEquation3D.sphericalAverage_tilde_hasDerivAt_initial (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (hf : ∀ (x : E3), u 0 x = data.f x) (hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (x : E3) (r : ) :
                        0 < rHasDerivAt (fun (t : ) => sphericalAverage_tilde u t r x) (G_tilde data r x) 0

                        At time $t = 0$, the weighted spherical average has time derivative equal to $\tilde G(r, x)$.

                        theorem WaveEquation3D.sphericalAverage_tilde_dalembert (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (hf : ∀ (x : E3), u 0 x = data.f x) (hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (t r : ) (ht : 0 t) (hr : 0 r) (hrt : r t) (x : E3) :
                        sphericalAverage_tilde u t r x = 1 / 2 * (F_tilde data (r + t) x - F_tilde data (t - r) x) + 1 / 2 * (ρ : ) in t - r..r + t, G_tilde data ρ x

                        D'Alembert representation for the weighted spherical average: for $0 \le r \le t$, $\tilde A(t, r, x) = \tfrac12(\tilde F(r+t, x) - \tilde F(t-r, x)) + \tfrac12 \int_{t-r}^{r+t} \tilde G(\rho, x)\,d\rho$.

                        theorem WaveEquation3D.corollary_1_0_2 (data : CauchyData3D) (u : E3) (hu : IsWaveSolution3D u) (hf : ∀ (x : E3), u 0 x = data.f x) (hg : ∀ (x : E3), (fderiv (fun (t : ) => u t x) 0) 1 = data.g x) (t r : ) (ht : 0 t) (hr : 0 r) (hrt : r t) (x : E3) :
                        sphericalAverage_tilde u t r x = 1 / 2 * (F_tilde data (r + t) x - F_tilde data (t - r) x) + 1 / 2 * (ρ : ) in t - r..r + t, G_tilde data ρ x

                        Corollary 1.0.2: explicit d'Alembert representation for the weighted spherical average $\tilde A(t, r, x)$ in terms of the initial data $\tilde F$ and $\tilde G$.

                        def WaveEquation3D.minkowskiMetric (n : ) :
                        Matrix (Fin (n + 1)) (Fin (n + 1))

                        The Minkowski metric $m_{\mu\nu} = \mathrm{diag}(-1, 1, \dots, 1)$ on $\mathbb{R}^{1+n}$ as a matrix indexed by Fin (n + 1).

                        Instances For
                          def WaveEquation3D.minkowskiInner (n : ) (X Y : Fin (n + 1)) :

                          The Minkowski inner product $m(X, Y) = X^\alpha m_{\alpha\beta} Y^\beta$ on $\mathbb{R}^{1+n}$.

                          Instances For
                            theorem WaveEquation3D.minkowskiInner_comm (n : ) (X Y : Fin (n + 1)) :

                            The Minkowski inner product is symmetric: $m(X, Y) = m(Y, X)$.

                            def WaveEquation3D.IsTimelike (n : ) (X : Fin (n + 1)) :

                            A vector $X \in \mathbb{R}^{1+n}$ is timelike if $m(X, X) < 0$ (Definition 2.0.1, case (1)).

                            Instances For
                              def WaveEquation3D.IsSpacelike (n : ) (X : Fin (n + 1)) :

                              A vector $X \in \mathbb{R}^{1+n}$ is spacelike if $m(X, X) > 0$ (Definition 2.0.1, case (2)).

                              Instances For
                                def WaveEquation3D.IsNull (n : ) (X : Fin (n + 1)) :

                                A vector $X \in \mathbb{R}^{1+n}$ is null if $m(X, X) = 0$ (Definition 2.0.1, case (3)).

                                Instances For
                                  def WaveEquation3D.IsCausal (n : ) (X : Fin (n + 1)) :

                                  A vector $X \in \mathbb{R}^{1+n}$ is causal if it is timelike or null, equivalently $m(X, X) \le 0$ (Definition 2.0.1, case (4)).

                                  Instances For
                                    def WaveEquation3D.IsFutureDirected (n : ) (X : Fin (n + 1)) :

                                    A vector $X \in \mathbb{R}^{1+n}$ is future-directed if its time component satisfies $X^0 > 0$ (Definition 2.0.2).

                                    Instances For
                                      def WaveEquation3D.IsLorentzTransformation (n : ) (Λ : Matrix (Fin (n + 1)) (Fin (n + 1)) ) :

                                      A matrix $\Lambda$ is a Lorentz transformation if it preserves the Minkowski metric: $\Lambda^T m \Lambda = m$ (Definition 2.1.1).

                                      Instances For
                                        theorem WaveEquation3D.lorentz_preserves_inner {n : } {Λ : Matrix (Fin (n + 1)) (Fin (n + 1)) } ( : IsLorentzTransformation n Λ) (X Y : Fin (n + 1)) :

                                        A Lorentz transformation preserves the Minkowski inner product: $m(\Lambda X, \Lambda Y) = m(X, Y)$.

                                        theorem WaveEquation3D.lorentz_preserves_timelike {n : } {Λ : Matrix (Fin (n + 1)) (Fin (n + 1)) } ( : IsLorentzTransformation n Λ) {X : Fin (n + 1)} (hX : IsTimelike n X) :

                                        Corollary 2.1.1 (timelike case): Lorentz transformations preserve timelike vectors.

                                        theorem WaveEquation3D.lorentz_preserves_spacelike {n : } {Λ : Matrix (Fin (n + 1)) (Fin (n + 1)) } ( : IsLorentzTransformation n Λ) {X : Fin (n + 1)} (hX : IsSpacelike n X) :

                                        Corollary 2.1.1 (spacelike case): Lorentz transformations preserve spacelike vectors.

                                        theorem WaveEquation3D.lorentz_preserves_null {n : } {Λ : Matrix (Fin (n + 1)) (Fin (n + 1)) } ( : IsLorentzTransformation n Λ) {X : Fin (n + 1)} (hX : IsNull n X) :
                                        IsNull n (Λ.mulVec X)

                                        Corollary 2.1.1 (null case): Lorentz transformations preserve null vectors.

                                        theorem WaveEquation3D.lorentz_preserves_causal {n : } {Λ : Matrix (Fin (n + 1)) (Fin (n + 1)) } ( : IsLorentzTransformation n Λ) {X : Fin (n + 1)} (hX : IsCausal n X) :
                                        IsCausal n (Λ.mulVec X)

                                        Corollary 2.1.1 (causal case): Lorentz transformations preserve causal vectors.

                                        A null frame on $\mathbb{R}^{1+n}$ (Definition 2.2.1): a basis $\{L, \underline L, e_{(1)}, \dots, e_{(n-1)}\}$ where $L, \underline L$ are null with $m(L, \underline L) = -2$, and the $e_{(i)}$ are $m$-orthonormal vectors $m$-orthogonal to both $L$ and $\underline L$. The completeness field records the resulting expansion $X = -\tfrac12 m(\underline L, X) L - \tfrac12 m(L, X)\underline L + \sum_i m(e_{(i)}, X) e_{(i)}$.

                                        Instances For
                                          def WaveEquation3D.angularMetric (n : ) (nf : NullFrame n) (X Y : Fin (n + 1)) :

                                          The angular metric $h(X, Y) := \sum_i m(e_{(i)}, X) m(e_{(i)}, Y)$ associated with a null frame; it is positive-definite on the $m$-orthogonal complement of $\mathrm{span}(L, \underline L)$ and vanishes on $\mathrm{span}(L, \underline L)$.

                                          Instances For
                                            theorem WaveEquation3D.nullFrame_decomposition {n : } (nf : NullFrame n) (X Y : Fin (n + 1)) :
                                            minkowskiInner n X Y = -(1 / 2) * minkowskiInner n nf.L X * minkowskiInner n nf.Lb Y - 1 / 2 * minkowskiInner n nf.Lb X * minkowskiInner n nf.L Y + angularMetric n nf X Y

                                            Proposition 2.2.1 (null-frame decomposition of $m$): $m(X, Y) = -\tfrac12 m(L, X) m(\underline L, Y) - \tfrac12 m(\underline L, X) m(L, Y) + h(X, Y)$ where $h$ is the angular metric of the null frame.

                                            theorem WaveEquation3D.angularMetric_vanish_L {n : } (nf : NullFrame n) (Y : Fin (n + 1)) :
                                            angularMetric n nf nf.L Y = 0

                                            The angular metric vanishes on $L$ in the first argument: $h(L, Y) = 0$.

                                            theorem WaveEquation3D.angularMetric_vanish_Lb {n : } (nf : NullFrame n) (Y : Fin (n + 1)) :
                                            angularMetric n nf nf.Lb Y = 0

                                            The angular metric vanishes on $\underline L$ in the first argument: $h(\underline L, Y) = 0$.

                                            theorem WaveEquation3D.angularMetric_comm {n : } (nf : NullFrame n) (X Y : Fin (n + 1)) :
                                            angularMetric n nf X Y = angularMetric n nf Y X

                                            The angular metric is symmetric: $h(X, Y) = h(Y, X)$.

                                            theorem WaveEquation3D.angularMetric_vanish_L_right {n : } (nf : NullFrame n) (X : Fin (n + 1)) :
                                            angularMetric n nf X nf.L = 0

                                            The angular metric vanishes on $L$ in the second argument: $h(X, L) = 0$.

                                            theorem WaveEquation3D.angularMetric_vanish_Lb_right {n : } (nf : NullFrame n) (X : Fin (n + 1)) :
                                            angularMetric n nf X nf.Lb = 0

                                            The angular metric vanishes on $\underline L$ in the second argument: $h(X, \underline L) = 0$.

                                            theorem WaveEquation3D.angularMetric_on_e {n : } (nf : NullFrame n) (i j : Fin (n - 1)) :
                                            angularMetric n nf (nf.e i) (nf.e j) = if i = j then 1 else 0

                                            Values of the angular metric on the angular basis: $h(e_{(i)}, e_{(j)}) = \delta_{ij}$.

                                            theorem WaveEquation3D.angularMetric_nonneg {n : } (nf : NullFrame n) (X : Fin (n + 1)) :
                                            0 angularMetric n nf X X

                                            The angular metric is positive semidefinite: $h(X, X) \ge 0$.

                                            theorem WaveEquation3D.angularMetric_pos_def {n : } (nf : NullFrame n) (X : Fin (n + 1)) (hL : minkowskiInner n nf.L X = 0) (hLb : minkowskiInner n nf.Lb X = 0) (hX : X 0) :
                                            0 < angularMetric n nf X X

                                            The angular metric is positive-definite on the $m$-orthogonal complement of $\mathrm{span}(L, \underline L)$: if $X \ne 0$ with $m(L, X) = m(\underline L, X) = 0$, then $h(X, X) > 0$.

                                            The Minkowski metric is an involution: $m \cdot m = I$.

                                            The Minkowski metric is its own inverse: $m^{-1} = m$.

                                            "Index-raising cancellation": $m(V, m \cdot W) = V \cdot W$ (Euclidean dot product).

                                            theorem WaveEquation3D.nullFrame_inverse_decomposition {n : } (nf : NullFrame n) (μ ν : Fin (n + 1)) :
                                            (minkowskiMetric n)⁻¹ μ ν = -(1 / 2) * nf.L μ * nf.Lb ν - 1 / 2 * nf.Lb μ * nf.L ν + i : Fin (n - 1), nf.e i μ * nf.e i ν

                                            Proposition 2.2.1 (raised-index version): the inverse Minkowski metric admits the null-frame decomposition $(m^{-1})^{\mu\nu} = -\tfrac12 L^\mu \underline L^\nu - \tfrac12 \underline L^\mu L^\nu + \sum_i e_{(i)}^\mu e_{(i)}^\nu$.