Imports
/- Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhi Kai Pong, Joseph Tooby-Smith, Lode Vermeulen -/ module public import Physlib.SpaceAndTime.Space.Derivatives.Laplacian public import Mathlib.MeasureTheory.Integral.CurveIntegral.Poincare public import Physlib.SpaceAndTime.Space.CrossProduct public import Mathlib.Analysis.Calculus.ParametricIntervalIntegral

Curl on Space

i. Overview

In this module we define the curl of functions and distributions on 3-dimensional space Space 3.

We also prove some basic vector-identities involving of the curl operator.

ii. Key results

    curl : The curl operator on functions from Space 3 to EuclideanSpace ℝ (Fin 3).

    distCurl : The curl operator on distributions from Space 3 to EuclideanSpace ℝ (Fin 3).

    div_of_curl_eq_zero : The divergence of the curl of a function is zero.

    distCurl_distGrad_eq_zero : The curl of the gradient of a distribution is zero.

iii. Table of contents

    A. The curl on functions

      A.1. The curl on the zero function

      A.2. The curl on a constant function

      A.3. Basic operations on curl

      A.4. The curl of a linear map is a linear map

      A.5. Preliminary lemmas about second derivatives

      A.6. The div of a curl is zero

      A.7. The curl of a grad is zero

      A.8. The curl of a curl

      A.9. A divergence-free field is a curl

      A.10. A curl-free field is a gradient

    B. The curl on distributions

      B.1. The components of the curl

      B.2. Basic equalities

      B.3. The curl of a grad is zero

iv. References

@[expose] public section

A. The curl on functions

@[inherit_doc curl] macro (name := curlNotation) "∇" "⨯" f:term:100 : term => `(curl $f)

A.1. The curl on the zero function

@[simp] lemma curl_zero : (0 : Space EuclideanSpace (Fin 3)) = 0 := curl 0 = 0 (fun x => have fi := fun i x => (0 x).ofLp i; WithLp.toLp 2 fun i => (fderiv (fi (i + 2)) x) (basis (i + 1)) - (fderiv (fi (i + 1)) x) (basis (i + 2))) = 0 (fun x => WithLp.toLp 2 fun i => 0) = 0 All goals completed! 🐙

A.2. The curl on a constant function

@[simp] lemma curl_const : (fun _ : Space => v₃) = 0 := v₃:EuclideanSpace (Fin 3)(curl fun x => v₃) = 0 v₃:EuclideanSpace (Fin 3)(fun x => have fi := fun i x => ((fun x => v₃) x).ofLp i; WithLp.toLp 2 fun i => (fderiv (fi (i + 2)) x) (basis (i + 1)) - (fderiv (fi (i + 1)) x) (basis (i + 2))) = 0 v₃:EuclideanSpace (Fin 3)(fun x => WithLp.toLp 2 fun i => 0) = 0 All goals completed! 🐙

A.3. Basic operations on curl

f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:Space((deriv (2, + 1) fun x => (f1 x).ofLp (2, + 2)) + deriv (2, + 1) fun x => (f2 x).ofLp (2, + 2)) x - ((deriv (2, + 2) fun x => (f1 x).ofLp (2, + 1)) + deriv (2, + 2) fun x => (f2 x).ofLp (2, + 1)) x = deriv (2, + 1) (fun x => (f1 x).ofLp (2, + 2)) x - deriv (2, + 2) (fun x => (f1 x).ofLp (2, + 1)) x + (deriv (2, + 1) (fun x => (f2 x).ofLp (2, + 2)) x - deriv (2, + 2) (fun x => (f2 x).ofLp (2, + 1)) x)f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f1f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f2f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f1f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f2 f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:Spacederiv (2, + 1) (fun x => (f1 x).ofLp (2, + 2)) x + deriv (2, + 1) (fun x => (f2 x).ofLp (2, + 2)) x - (deriv (2, + 2) (fun x => (f1 x).ofLp (2, + 1)) x + deriv (2, + 2) (fun x => (f2 x).ofLp (2, + 1)) x) = deriv (2, + 1) (fun x => (f1 x).ofLp (2, + 2)) x - deriv (2, + 2) (fun x => (f1 x).ofLp (2, + 1)) x + (deriv (2, + 1) (fun x => (f2 x).ofLp (2, + 2)) x - deriv (2, + 2) (fun x => (f2 x).ofLp (2, + 1)) x)f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f1f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f2f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f1f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f2 f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f1f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f2f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f1f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2x:SpaceDifferentiable f2 repeat All goals completed! 🐙f:Space EuclideanSpace (Fin 3)k:hf:Differentiable fx:Spacei:Fin 3Differentiable ff:Space EuclideanSpace (Fin 3)k:hf:Differentiable fx:Spacei:Fin 3Differentiable f repeat All goals completed! 🐙All goals completed! 🐙f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2Differentiable f2f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2Differentiable f1f1:Space EuclideanSpace (Fin 3)f2:Space EuclideanSpace (Fin 3)hf1:Differentiable f1hf2:Differentiable f2Differentiable (-f2) repeat All goals completed! 🐙

A.4. The curl of a linear map is a linear map

W:Type u_1inst✝¹:NormedAddCommGroup Winst✝:NormedSpace Wf:W Space EuclideanSpace (Fin 3)hf: (w : W), Differentiable (f w)hf':IsLinearMap fk:w:WDifferentiable (f w) All goals completed! 🐙

A.5. Preliminary lemmas about second derivatives

Second derivatives distribute coordinate-wise over addition (all three components for div).

i:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:Space(fderiv (fun x => (fderiv (fun x => (f x).ofLp u) x) (basis u)) x + (fderiv (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) x + fderiv (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) x)) (basis i) = (((fun x => (fderiv (fun x => (fderiv (fun x => (f x).ofLp u) x) (basis u)) x) (basis i)) + fun x => (fderiv (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) x) (basis i)) + fun x => (fderiv (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) x) (basis i)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp u) x) (basis u)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) x + (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) x) x i:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:Space(fderiv (fun x => (fderiv (fun x => (f x).ofLp u) x) (basis u)) x) (basis i) + ((fderiv (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) x) (basis i) + (fderiv (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) x) (basis i)) = (fderiv (fun x => (fderiv (fun x => (f x).ofLp u) x) (basis u)) x) (basis i) + (fderiv (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) x) (basis i) + (fderiv (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) x) (basis i)i:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp u) x) (basis u)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) x + (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) x) x i:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp u) x) (basis u)) xi:Fin 3u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis v)) x + (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis w)) x) x repeat All goals completed! 🐙

Second derivatives distribute coordinate-wise over subtraction (two components for curl).

u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:Space(fderiv (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis v)) x - fderiv (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis w)) x) (basis u) = (fderiv (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis v)) x) (basis u) - (fderiv (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis w)) x) (basis u)u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis v)) xu:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis w)) x u:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp w) x) (basis v)) xu:Fin 3v:Fin 3w:Fin 3f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceDifferentiableAt (fun x => (fderiv (fun x => (f x).ofLp v) x) (basis w)) x repeat All goals completed! 🐙

A.6. The div of a curl is zero

f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:Spacederiv 1 (deriv 0 fun x => (f x).ofLp 2) x - deriv 2 (deriv 0 fun x => (f x).ofLp 1) x + (deriv 2 (deriv 1 fun x => (f x).ofLp 0) x - deriv 1 (deriv 0 fun x => (f x).ofLp 2) x + (deriv 2 (deriv 0 fun x => (f x).ofLp 1) x - deriv 2 (deriv 1 fun x => (f x).ofLp 0) x)) = 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 2f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 1f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 f f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 2f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 1f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 f repeat try f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 f All goals completed! 🐙

A.7. The curl of a grad is zero

f:Space hf:ContDiff 2 fx:Spacei:Fin 3deriv (i + 2) (deriv (i + 1) f) x - deriv (i + 2) (fun x => deriv (i + 1) f x) x = 0 All goals completed! 🐙

A.8. The curl of a curl

f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:Spacederiv 2 (deriv 0 fun x => (f x).ofLp 0) x - deriv 0 (deriv 0 fun x => (f x).ofLp 2) x - (deriv 1 (deriv 1 fun x => (f x).ofLp 2) x - deriv 2 (deriv 1 fun x => (f x).ofLp 1) x) = (deriv 2 (deriv 0 fun x => (f x).ofLp 0) + deriv 2 (deriv 1 fun x => (f x).ofLp 1) + deriv 2 (deriv 2 fun x => (f x).ofLp 2)) x - (deriv 0 (deriv 0 fun x => (f x).ofLp 2) x + (deriv 1 (fun x => deriv 1 (fun x => (f x).ofLp 2) x) x + deriv 2 (fun x => deriv 2 (fun x => (f x).ofLp 2) x) x))f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 2f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 1f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 f f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:Spacederiv 2 (deriv 0 fun x => (f x).ofLp 0) x - deriv 0 (deriv 0 fun x => (f x).ofLp 2) x - (deriv 1 (deriv 1 fun x => (f x).ofLp 2) x - deriv 2 (deriv 1 fun x => (f x).ofLp 1) x) = deriv 2 (deriv 0 fun x => (f x).ofLp 0) x + deriv 2 (deriv 1 fun x => (f x).ofLp 1) x + deriv 2 (deriv 2 fun x => (f x).ofLp 2) x - (deriv 0 (deriv 0 fun x => (f x).ofLp 2) x + (deriv 1 (fun x => deriv 1 (fun x => (f x).ofLp 2) x) x + deriv 2 (fun x => deriv 2 (fun x => (f x).ofLp 2) x) x))f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 2f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 1f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 f f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 2f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 1f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 fun x => (f x).ofLp 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 ff:Space EuclideanSpace (Fin 3)hf:ContDiff 2 fx:SpaceContDiff 2 f repeat All goals completed! 🐙

### A.9. A divergence-free field is a curl

We now prove that if the divergence of a function is zero, then it is equal to the curl of some function.

This proof is involved, thus we have split it up into private definitions and lemmas. The proof is by explicit construction. If f has divergence zero, then we construct

∫ t in 0..1, (t • x) ⨯ f (t • x)

and show that the curl of this is equal to f.

We call the integrand of this function the homotopyOperatorIntegrand. We build API around this to help in our proof.

The homotopy operator is defined as ∫ t in 0..1, (t • x) ⨯ f (t • x). This is the integrand of that function.

private noncomputable def homotopyOperatorIntegrand (f : Space EuclideanSpace (Fin 3)) : Space EuclideanSpace (Fin 3) := fun x t => (t basis.repr x) ⨯ₑ₃ f (t x)
private lemma homotopyOperatorIntegrand_eq (f : Space EuclideanSpace (Fin 3)) : homotopyOperatorIntegrand f = fun x t => (t basis.repr x) ⨯ₑ₃ f (t x) := f:Space EuclideanSpace (Fin 3)homotopyOperatorIntegrand f = fun x t => (fun a b => (WithLp.equiv 2 (Fin 3 )).symm ((crossProduct ((WithLp.equiv 2 (Fin 3 )) a)) ((WithLp.equiv 2 (Fin 3 )) b))) (t basis.repr x) (f (t x)) All goals completed! 🐙@[fun_prop] private lemma differentiable_homotopyOperatorIntegrand_space {f : Space EuclideanSpace (Fin 3)} (hf : Differentiable f) (t : ) : Differentiable (homotopyOperatorIntegrand f · t) := f:Space EuclideanSpace (Fin 3)hf:Differentiable ft:Differentiable fun x => homotopyOperatorIntegrand f x t f:Space EuclideanSpace (Fin 3)hf:Differentiable ft:Differentiable fun x => t WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp) f:Space EuclideanSpace (Fin 3)hf:Differentiable ft: (i : Fin 3), Differentiable fun x => (t WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)).ofLp i f:Space EuclideanSpace (Fin 3)hf:Differentiable ft:i:Fin 3Differentiable fun x => (t WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)).ofLp i f:Space EuclideanSpace (Fin 3)hf:Differentiable ft:Differentiable fun x => (t WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)).ofLp ((fun i => i) 0, )f:Space EuclideanSpace (Fin 3)hf:Differentiable ft:Differentiable fun x => (t WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)).ofLp ((fun i => i) 1, )f:Space EuclideanSpace (Fin 3)hf:Differentiable ft:Differentiable fun x => (t WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)).ofLp ((fun i => i) 2, ) all_goals f:Space EuclideanSpace (Fin 3)hf:Differentiable ft:Differentiable fun x => (t WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)).ofLp ((fun i => i) 2, ) f:Space EuclideanSpace (Fin 3)hf:Differentiable ft:Differentiable fun x => t * (x.val 3 0 * (f (t x)).ofLp 1 - x.val 3 1 * (f (t x)).ofLp 0) All goals completed! 🐙f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun x_1 => x_1 WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (x_1 x)).ofLp) refine Continuous.comp' (f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous (WithLp.toLp 2) All goals completed! 🐙) ?_ f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp i (i : Fin 3), Continuous fun a => (a (WithLp.equiv 2 (Fin 3 )).toFun (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (a x)).ofLp))) i f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp ii:Fin 3Continuous fun a => (a (WithLp.equiv 2 (Fin 3 )).toFun (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (a x)).ofLp))) i f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => (a (WithLp.equiv 2 (Fin 3 )).toFun (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (a x)).ofLp))) ((fun i => i) 0, )f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => (a (WithLp.equiv 2 (Fin 3 )).toFun (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (a x)).ofLp))) ((fun i => i) 1, )f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => (a (WithLp.equiv 2 (Fin 3 )).toFun (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (a x)).ofLp))) ((fun i => i) 2, ) all_goals f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => (a (WithLp.equiv 2 (Fin 3 )).toFun (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (a x)).ofLp))) ((fun i => i) 2, ) f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => a * (x.val 3 0 * (f (a x)).ofLp 1 - x.val 3 1 * (f (a x)).ofLp 0) refine Continuous.fun_mul (f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => a All goals completed! 🐙) ?_ f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => x.val 3 0 * (f (a x)).ofLp 1f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => x.val 3 1 * (f (a x)).ofLp 0 all_goals f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => x.val 3 1 * (f (a x)).ofLp 0 f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => x.val 3 1f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => (f (a x)).ofLp 0 f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => x.val 3 1 All goals completed! 🐙 f:Space EuclideanSpace (Fin 3)hf✝:Differentiable fx:Spacehf: (i : Fin 3), Continuous fun t => (f (t x)).ofLp iContinuous fun a => (f (a x)).ofLp 0 All goals completed! 🐙private lemma intervalIntegrable_homotopyOperatorIntegrand {f : Space EuclideanSpace (Fin 3)} (hf : Differentiable f) (x : Space) : IntervalIntegrable (homotopyOperatorIntegrand f x ·) volume (0 : ) 1 := Continuous.intervalIntegrable (f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:SpaceContinuous fun x_1 => homotopyOperatorIntegrand f x x_1 All goals completed! 🐙) 0 1f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacei:Fin 3cross_diff: (t : ), Differentiable fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)t ((fderiv (fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)) x) y).ofLp i = t (fderiv (⇑(EuclideanSpace.proj i)) (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)) ∘SL fderiv (fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)) x) yf:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacei:Fin 3cross_diff: (t : ), Differentiable fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)DifferentiableAt (⇑(EuclideanSpace.proj i)) (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp))f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacei:Fin 3cross_diff: (t : ), Differentiable fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)DifferentiableAt (fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacei:Fin 3cross_diff: (t : ), Differentiable fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)DifferentiableAt (⇑(EuclideanSpace.proj i)) (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp))f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacei:Fin 3cross_diff: (t : ), Differentiable fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)DifferentiableAt (fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacei:Fin 3cross_diff: (t : ), Differentiable fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)DifferentiableAt (⇑(EuclideanSpace.proj i)) (WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)) All goals completed! 🐙 f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacei:Fin 3cross_diff: (t : ), Differentiable fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)DifferentiableAt (fun x => WithLp.toLp 2 ((crossProduct (basis.repr x).ofLp) (f (t x)).ofLp)) x All goals completed! 🐙 All goals completed! 🐙f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacefderiv_f: (x : Space) (t : ) (y : Space) (i : Fin 3), (fderiv (fun x => (f (t x)).ofLp i) x) y = t * ((fderiv f (t x)) y).ofLp i(x.val 3 0 fderiv (fun x => (f (t x)).ofLp 1) x + (f (t x)).ofLp 1 fderiv (fun x => x.val 3 0) x - (x.val 3 1 fderiv (fun x => (f (t x)).ofLp 0) x + (f (t x)).ofLp 0 fderiv (fun x => x.val 3 1) x)) y = x.val 3 0 * t * ((fderiv f (t x)) y).ofLp 1 + (f (t x)).ofLp 1 * y.val 3 0 - (x.val 3 1 * t * ((fderiv f (t x)) y).ofLp 0 + (f (t x)).ofLp 0 * y.val 3 1) t = 0f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacefderiv_f: (x : Space) (t : ) (y : Space) (i : Fin 3), (fderiv (fun x => (f (t x)).ofLp i) x) y = t * ((fderiv f (t x)) y).ofLp iDifferentiable f f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacefderiv_f: (x : Space) (t : ) (y : Space) (i : Fin 3), (fderiv (fun x => (f (t x)).ofLp i) x) y = t * ((fderiv f (t x)) y).ofLp ix.val 3 0 * (t * ((fderiv f (t x)) y).ofLp 1) + (f (t x)).ofLp 1 * y.val 3 0 - (x.val 3 1 * (t * ((fderiv f (t x)) y).ofLp 0) + (f (t x)).ofLp 0 * y.val 3 1) = x.val 3 0 * t * ((fderiv f (t x)) y).ofLp 1 + (f (t x)).ofLp 1 * y.val 3 0 - (x.val 3 1 * t * ((fderiv f (t x)) y).ofLp 0 + (f (t x)).ofLp 0 * y.val 3 1) t = 0f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacefderiv_f: (x : Space) (t : ) (y : Space) (i : Fin 3), (fderiv (fun x => (f (t x)).ofLp i) x) y = t * ((fderiv f (t x)) y).ofLp iDifferentiable f f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacefderiv_f: (x : Space) (t : ) (y : Space) (i : Fin 3), (fderiv (fun x => (f (t x)).ofLp i) x) y = t * ((fderiv f (t x)) y).ofLp iTrue t = 0f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacefderiv_f: (x : Space) (t : ) (y : Space) (i : Fin 3), (fderiv (fun x => (f (t x)).ofLp i) x) y = t * ((fderiv f (t x)) y).ofLp iDifferentiable f f:Space EuclideanSpace (Fin 3)hf:Differentiable fx:Spacet:y:Spacefderiv_f: (x : Space) (t : ) (y : Space) (i : Fin 3), (fderiv (fun x => (f (t x)).ofLp i) x) y = t * ((fderiv f (t x)) y).ofLp iDifferentiable f All goals completed! 🐙f:Space EuclideanSpace (Fin 3)hf✝:ContDiff 1 fy:Spacei:Fin 3hf:Differentiable fContinuous fun p => ((fderiv (fun x => homotopyOperatorIntegrand f x p.2) p.1) y).ofLp i f:Space EuclideanSpace (Fin 3)hf✝:ContDiff 1 fy:Spacehf:Differentiable fContinuous fun p => ((fderiv (fun x => homotopyOperatorIntegrand f x p.2) p.1) y).ofLp ((fun i => i) 0, )f:Space EuclideanSpace (Fin 3)hf✝:ContDiff 1 fy:Spacehf:Differentiable fContinuous fun p => ((fderiv (fun x => homotopyOperatorIntegrand f x p.2) p.1) y).ofLp ((fun i => i) 1, )f:Space EuclideanSpace (Fin 3)hf✝:ContDiff 1 fy:Spacehf:Differentiable fContinuous fun p => ((fderiv (fun x => homotopyOperatorIntegrand f x p.2) p.1) y).ofLp ((fun i => i) 2, ) all_goals f:Space EuclideanSpace (Fin 3)hf✝:ContDiff 1 fy:Spacehf:Differentiable fContinuous fun p => ((fderiv (fun x => homotopyOperatorIntegrand f x p.2) p.1) y).ofLp ((fun i => i) 2, ) f:Space EuclideanSpace (Fin 3)hf✝:ContDiff 1 fy:Spacehf:Differentiable fContinuous fun p => p.2 * (p.1.val 3 0 * p.2 * ((fderiv f (p.2 p.1)) y).ofLp 1 + (f (p.2 p.1)).ofLp 1 * y.val 3 0 - (p.1.val 3 1 * p.2 * ((fderiv f (p.2 p.1)) y).ofLp 0 + (f (p.2 p.1)).ofLp 0 * y.val 3 1)) All goals completed! 🐙f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) at:h:t Set.uIoc 0 1x:Spacehx:x s x₀hx2: x s x₀ ×ˢ Set.Icc 0 1, F' x.1 x.2 F' a.1 a.2F' x t F' a.1 a.2 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) at:h:t Set.uIoc 0 1x:Spacehx:x s x₀hx2: x s x₀ ×ˢ Set.Icc 0 1, F' x.1 x.2 F' a.1 a.2(x, t) s x₀ ×ˢ Set.Icc 0 1 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) at:x:Spacehx:x s x₀hx2: x s x₀ ×ˢ Set.Icc 0 1, F' x.1 x.2 F' a.1 a.2h:0 < t t 1(x, t) s x₀ ×ˢ Set.Icc 0 1 All goals completed! 🐙 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) aIntervalIntegrable (fun t => F' a.1 a.2) volume 0 1 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) aContinuous fun t => F' a.1 a.2 All goals completed! 🐙 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) a∀ᵐ (t : ), t Set.uIoc 0 1 x s x₀, HasFDerivAt (fun x => F x t) (F' x t) x f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) at:t Set.uIoc 0 1 x s x₀, HasFDerivAt (fun x => F x t) (F' x t) x f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) at:h:t Set.uIoc 0 1x:Spacehx:x s x₀HasFDerivAt (fun x => F x t) (F' x t) x f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) at:h:t Set.uIoc 0 1x:Spacehx:x s x₀HasFDerivAt (fun x => homotopyOperatorIntegrand f x t) (fderiv (fun x => homotopyOperatorIntegrand f x t) x) x f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) at:h:t Set.uIoc 0 1x:Spacehx:x s x₀Differentiable f exact hf.differentiable (f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fx₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xs:Space Set Space := fun x₀ => Metric.closedBall x₀ 1a:Space × ha:a s x₀ ×ˢ Set.Icc 0 1 IsMaxOn (fun a => F' a.1 a.2) (s x₀ ×ˢ Set.Icc 0 1) at:h:t Set.uIoc 0 1x:Spacehx:x s x₀1 0 All goals completed! 🐙)f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fi:Fin 3j:Fin 3k:Fin 3m:Fin 3x₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xF'_continuous:Continuous (Function.uncurry F')hfderiv: (x₀ : Space), HasFDerivAt (fun x => (t : ) in 0..1, F x t) ( (t : ) in 0..1, F' x₀ t) x₀F'_apply_apply: (x₀ y : Space) (i : Fin 3), (( (t : ) in 0..1, F' x₀ t) y).ofLp i = (t : ) in 0..1, ((F' x₀ t) y).ofLp iIntervalIntegrable (fun t => ((F' x₀ t) (basis i)).ofLp k) volume 0 1f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fi:Fin 3j:Fin 3k:Fin 3m:Fin 3x₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xF'_continuous:Continuous (Function.uncurry F')hfderiv: (x₀ : Space), HasFDerivAt (fun x => (t : ) in 0..1, F x t) ( (t : ) in 0..1, F' x₀ t) x₀F'_apply_apply: (x₀ y : Space) (i : Fin 3), (( (t : ) in 0..1, F' x₀ t) y).ofLp i = (t : ) in 0..1, ((F' x₀ t) y).ofLp iIntervalIntegrable (fun t => ((F' x₀ t) (basis j)).ofLp m) volume 0 1 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fi:Fin 3j:Fin 3k:Fin 3m:Fin 3x₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xF'_continuous:Continuous (Function.uncurry F')hfderiv: (x₀ : Space), HasFDerivAt (fun x => (t : ) in 0..1, F x t) ( (t : ) in 0..1, F' x₀ t) x₀F'_apply_apply: (x₀ y : Space) (i : Fin 3), (( (t : ) in 0..1, F' x₀ t) y).ofLp i = (t : ) in 0..1, ((F' x₀ t) y).ofLp iIntervalIntegrable (fun t => ((F' x₀ t) (basis i)).ofLp k) volume 0 1 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fi:Fin 3j:Fin 3k:Fin 3m:Fin 3x₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xF'_continuous:Continuous (Function.uncurry F')hfderiv: (x₀ : Space), HasFDerivAt (fun x => (t : ) in 0..1, F x t) ( (t : ) in 0..1, F' x₀ t) x₀F'_apply_apply: (x₀ y : Space) (i : Fin 3), (( (t : ) in 0..1, F' x₀ t) y).ofLp i = (t : ) in 0..1, ((F' x₀ t) y).ofLp iContinuous fun t => ((F' x₀ t) (basis i)).ofLp k All goals completed! 🐙 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fi:Fin 3j:Fin 3k:Fin 3m:Fin 3x₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xF'_continuous:Continuous (Function.uncurry F')hfderiv: (x₀ : Space), HasFDerivAt (fun x => (t : ) in 0..1, F x t) ( (t : ) in 0..1, F' x₀ t) x₀F'_apply_apply: (x₀ y : Space) (i : Fin 3), (( (t : ) in 0..1, F' x₀ t) y).ofLp i = (t : ) in 0..1, ((F' x₀ t) y).ofLp iIntervalIntegrable (fun t => ((F' x₀ t) (basis j)).ofLp m) volume 0 1 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fi:Fin 3j:Fin 3k:Fin 3m:Fin 3x₀:SpaceF:Space EuclideanSpace (Fin 3) := homotopyOperatorIntegrand fF':Space Space →L[] EuclideanSpace (Fin 3) := fun x t => fderiv (fun x => F x t) xF'_continuous:Continuous (Function.uncurry F')hfderiv: (x₀ : Space), HasFDerivAt (fun x => (t : ) in 0..1, F x t) ( (t : ) in 0..1, F' x₀ t) x₀F'_apply_apply: (x₀ y : Space) (i : Fin 3), (( (t : ) in 0..1, F' x₀ t) y).ofLp i = (t : ) in 0..1, ((F' x₀ t) y).ofLp iContinuous fun t => ((F' x₀ t) (basis j)).ofLp m All goals completed! 🐙f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv: i, ((fderiv f (t x)) (basis i)).ofLp i = 0t * (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 2 + (f (t x)).ofLp 2 - x.val 3 2 * t * ((fderiv f (t x)) (basis 1)).ofLp 1) - t * (x.val 3 2 * t * ((fderiv f (t x)) (basis 0)).ofLp 0 - (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 2 + (f (t x)).ofLp 2)) = t * (f (t x)).ofLp 2 * 2 - t * (-(fderiv f (t x)) (t x)).ofLp 2 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0t * (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 2 + (f (t x)).ofLp 2 - x.val 3 2 * t * ((fderiv f (t x)) (basis 1)).ofLp 1) - t * (x.val 3 2 * t * ((fderiv f (t x)) (basis 0)).ofLp 0 - (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 2 + (f (t x)).ofLp 2)) = t * (f (t x)).ofLp 2 * 2 - t * (-(fderiv f (t x)) (t x)).ofLp 2 f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 2 + (f (t x)).ofLp 2 - x.val 3 2 * t * ((fderiv f (t x)) (basis 1)).ofLp 1) - t * (x.val 3 2 * t * ((fderiv f (t x)) (basis 0)).ofLp 0 - (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 2 + (f (t x)).ofLp 2)) = t * (f (t x)).ofLp 2 * 2 - t * (-(fderiv f (t x)) (t x)).ofLp 2 conv_rhs => f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis i| t x f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis i| t i, (basis.repr x).ofLp i basis i f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 2 * t * ((fderiv f (t x)) (basis 2)).ofLp 0 + (f (t x)).ofLp 0 - x.val 3 0 * t * ((fderiv f (t x)) (basis 2)).ofLp 2) - t * (x.val 3 0 * t * ((fderiv f (t x)) (basis 1)).ofLp 1 - (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 0 + (f (t x)).ofLp 0)) = t * (f (t x)).ofLp 0 * 2 - t * (-(fderiv f (t x)) (t i, (basis.repr x).ofLp i basis i)).ofLp 0 linear_combination (norm := f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 2 * t * ((fderiv f (t x)) (basis 2)).ofLp 0 + (f (t x)).ofLp 0 - x.val 3 0 * t * ((fderiv f (t x)) (basis 2)).ofLp 2) - t * (x.val 3 0 * t * ((fderiv f (t x)) (basis 1)).ofLp 1 - (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 0 + (f (t x)).ofLp 0)) + -t ^ 2 * x.val 3 0 * 0 - (t * (f (t x)).ofLp 0 * 2 - t * (-(fderiv f (t x)) (t i, (basis.repr x).ofLp i basis i)).ofLp 0 + -t ^ 2 * x.val 3 0 * (((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2)) = 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 2 * t * ((fderiv f (t x)) (basis 2)).ofLp 0 + (f (t x)).ofLp 0 - x.val 3 0 * t * ((fderiv f (t x)) (basis 2)).ofLp 2) - t * (x.val 3 0 * t * ((fderiv f (t x)) (basis 1)).ofLp 1 - (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 0 + (f (t x)).ofLp 0)) - (t * (f (t x)).ofLp 0 * 2 - t * (-(t * (x.val 3 2 * ((fderiv f (t x)) (basis 2)).ofLp 0)) + (-(t * (x.val 3 1 * ((fderiv f (t x)) (basis 1)).ofLp 0)) + -(t * (x.val 3 0 * ((fderiv f (t x)) (basis 0)).ofLp 0)))) + -(t ^ 2 * x.val 3 0 * (((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2))) = 0; All goals completed! 🐙}) - t ^ 2 * x 0 * hdiv f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 1 + (f (t x)).ofLp 1 - x.val 3 1 * t * ((fderiv f (t x)) (basis 0)).ofLp 0) - t * (x.val 3 1 * t * ((fderiv f (t x)) (basis 2)).ofLp 2 - (x.val 3 2 * t * ((fderiv f (t x)) (basis 2)).ofLp 1 + (f (t x)).ofLp 1)) = t * (f (t x)).ofLp 1 * 2 - t * (-(fderiv f (t x)) (t i, (basis.repr x).ofLp i basis i)).ofLp 1 linear_combination (norm := f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 1 + (f (t x)).ofLp 1 - x.val 3 1 * t * ((fderiv f (t x)) (basis 0)).ofLp 0) - t * (x.val 3 1 * t * ((fderiv f (t x)) (basis 2)).ofLp 2 - (x.val 3 2 * t * ((fderiv f (t x)) (basis 2)).ofLp 1 + (f (t x)).ofLp 1)) + -t ^ 2 * x.val 3 1 * 0 - (t * (f (t x)).ofLp 1 * 2 - t * (-(fderiv f (t x)) (t i, (basis.repr x).ofLp i basis i)).ofLp 1 + -t ^ 2 * x.val 3 1 * (((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2)) = 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 1 + (f (t x)).ofLp 1 - x.val 3 1 * t * ((fderiv f (t x)) (basis 0)).ofLp 0) - t * (x.val 3 1 * t * ((fderiv f (t x)) (basis 2)).ofLp 2 - (x.val 3 2 * t * ((fderiv f (t x)) (basis 2)).ofLp 1 + (f (t x)).ofLp 1)) - (t * (f (t x)).ofLp 1 * 2 - t * (-(t * (x.val 3 2 * ((fderiv f (t x)) (basis 2)).ofLp 1)) + (-(t * (x.val 3 1 * ((fderiv f (t x)) (basis 1)).ofLp 1)) + -(t * (x.val 3 0 * ((fderiv f (t x)) (basis 0)).ofLp 1)))) + -(t ^ 2 * x.val 3 1 * (((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2))) = 0; All goals completed! 🐙}) - t ^ 2 * x 1 * hdiv f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 2 + (f (t x)).ofLp 2 - x.val 3 2 * t * ((fderiv f (t x)) (basis 1)).ofLp 1) - t * (x.val 3 2 * t * ((fderiv f (t x)) (basis 0)).ofLp 0 - (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 2 + (f (t x)).ofLp 2)) = t * (f (t x)).ofLp 2 * 2 - t * (-(fderiv f (t x)) (t i, (basis.repr x).ofLp i basis i)).ofLp 2 linear_combination (norm := f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 2 + (f (t x)).ofLp 2 - x.val 3 2 * t * ((fderiv f (t x)) (basis 1)).ofLp 1) - t * (x.val 3 2 * t * ((fderiv f (t x)) (basis 0)).ofLp 0 - (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 2 + (f (t x)).ofLp 2)) + -t ^ 2 * x.val 3 2 * 0 - (t * (f (t x)).ofLp 2 * 2 - t * (-(fderiv f (t x)) (t i, (basis.repr x).ofLp i basis i)).ofLp 2 + -t ^ 2 * x.val 3 2 * (((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2)) = 0f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv✝:div f = 0f_differentiable:Differentiable ffderiv_f_t: (x : Space) (t : ) (i : Fin 3), (fderiv (fun t => (f (t x)).ofLp i) t) 1 = ((fderiv f (t x)) x).ofLp ihi: (x : Space) (i : Fin 3), (t : ) in 0..1, t * (f (t x)).ofLp i * 2 - t * (-(fderiv f (t x)) (t x)).ofLp i = (f x).ofLp ix:Spacet:hdiv:((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2 = 0hx:x = i, (basis.repr x).ofLp i basis it * (x.val 3 1 * t * ((fderiv f (t x)) (basis 1)).ofLp 2 + (f (t x)).ofLp 2 - x.val 3 2 * t * ((fderiv f (t x)) (basis 1)).ofLp 1) - t * (x.val 3 2 * t * ((fderiv f (t x)) (basis 0)).ofLp 0 - (x.val 3 0 * t * ((fderiv f (t x)) (basis 0)).ofLp 2 + (f (t x)).ofLp 2)) - (t * (f (t x)).ofLp 2 * 2 - t * (-(t * (x.val 3 2 * ((fderiv f (t x)) (basis 2)).ofLp 2)) + (-(t * (x.val 3 1 * ((fderiv f (t x)) (basis 1)).ofLp 2)) + -(t * (x.val 3 0 * ((fderiv f (t x)) (basis 0)).ofLp 2)))) + -(t ^ 2 * x.val 3 2 * (((fderiv f (t x)) (basis 0)).ofLp 0 + ((fderiv f (t x)) (basis 1)).ofLp 1 + ((fderiv f (t x)) (basis 2)).ofLp 2))) = 0; All goals completed! 🐙}) - t ^ 2 * x 2 * hdivf:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv:div f = 0 g, f = -curl g Differentiable g f:Space EuclideanSpace (Fin 3)hf:ContDiff 1 fhdiv:div f = 0(f = -curl fun x => (t : ) in 0..1, homotopyOperatorIntegrand f x t) Differentiable fun x => (t : ) in 0..1, homotopyOperatorIntegrand f x t All goals completed! 🐙TODO "Generalize the statement that a div-free field is a curl to time-dependent fields."

### A.10. A curl-free field is a gradient

We show that if the curl of a function is zero, then it is equal to the gradient of some function. The key lemma here is Convex.exists_forall_hasFDerivAt_of_fderiv_symmetric, which is a more general version of this result in Mathlib. We turn this here into something more familiar, to the physicists via deriv_comm_of_curl_zero.

f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl': (i : Fin 3), (curl f x).ofLp i = 0deriv 2 (fun x => (f x).ofLp 1) x = deriv 1 (fun x => (f x).ofLp 2) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl': (i : Fin 3), (curl f x).ofLp i = 0deriv 0 (fun x => (f x).ofLp 1) x = deriv 1 (fun x => (f x).ofLp 0) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':(curl f x).ofLp 2 = 0deriv 0 (fun x => (f x).ofLp 1) x = deriv 1 (fun x => (f x).ofLp 0) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':deriv 0 (fun x => (f x).ofLp 1) x - deriv 1 (fun x => (f x).ofLp 0) x = 0deriv 0 (fun x => (f x).ofLp 1) x = deriv 1 (fun x => (f x).ofLp 0) x linear_combination (norm := All goals completed! 🐙) hcurl' f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl': (i : Fin 3), (curl f x).ofLp i = 0deriv 0 (fun x => (f x).ofLp 2) x = deriv 2 (fun x => (f x).ofLp 0) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':(curl f x).ofLp 1 = 0deriv 0 (fun x => (f x).ofLp 2) x = deriv 2 (fun x => (f x).ofLp 0) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':deriv 2 (fun x => (f x).ofLp 0) x - deriv 0 (fun x => (f x).ofLp 2) x = 0deriv 0 (fun x => (f x).ofLp 2) x = deriv 2 (fun x => (f x).ofLp 0) x linear_combination (norm := All goals completed! 🐙) -hcurl' f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl': (i : Fin 3), (curl f x).ofLp i = 0deriv 1 (fun x => (f x).ofLp 0) x = deriv 0 (fun x => (f x).ofLp 1) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':(curl f x).ofLp 2 = 0deriv 1 (fun x => (f x).ofLp 0) x = deriv 0 (fun x => (f x).ofLp 1) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':deriv 0 (fun x => (f x).ofLp 1) x - deriv 1 (fun x => (f x).ofLp 0) x = 0deriv 1 (fun x => (f x).ofLp 0) x = deriv 0 (fun x => (f x).ofLp 1) x linear_combination (norm := All goals completed! 🐙) -hcurl' f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl': (i : Fin 3), (curl f x).ofLp i = 0deriv 1 (fun x => (f x).ofLp 2) x = deriv 2 (fun x => (f x).ofLp 1) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':(curl f x).ofLp 0 = 0deriv 1 (fun x => (f x).ofLp 2) x = deriv 2 (fun x => (f x).ofLp 1) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':deriv 1 (fun x => (f x).ofLp 2) x - deriv 2 (fun x => (f x).ofLp 1) x = 0deriv 1 (fun x => (f x).ofLp 2) x = deriv 2 (fun x => (f x).ofLp 1) x linear_combination (norm := All goals completed! 🐙) hcurl' f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl': (i : Fin 3), (curl f x).ofLp i = 0deriv 2 (fun x => (f x).ofLp 0) x = deriv 0 (fun x => (f x).ofLp 2) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':(curl f x).ofLp 1 = 0deriv 2 (fun x => (f x).ofLp 0) x = deriv 0 (fun x => (f x).ofLp 2) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':deriv 2 (fun x => (f x).ofLp 0) x - deriv 0 (fun x => (f x).ofLp 2) x = 0deriv 2 (fun x => (f x).ofLp 0) x = deriv 0 (fun x => (f x).ofLp 2) x linear_combination (norm := All goals completed! 🐙) hcurl' f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl': (i : Fin 3), (curl f x).ofLp i = 0deriv 2 (fun x => (f x).ofLp 1) x = deriv 1 (fun x => (f x).ofLp 2) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':(curl f x).ofLp 0 = 0deriv 2 (fun x => (f x).ofLp 1) x = deriv 1 (fun x => (f x).ofLp 2) x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0x:Spacehcurl':deriv 1 (fun x => (f x).ofLp 2) x - deriv 2 (fun x => (f x).ofLp 1) x = 0deriv 2 (fun x => (f x).ofLp 1) x = deriv 1 (fun x => (f x).ofLp 2) x linear_combination (norm := All goals completed! 🐙) -hcurl'f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0s:Set Space := Set.univhs:Convex shso:IsOpen sω:Space Space →L[] := fun a => (toDual Space) (basis.repr.symm (f a)):DifferentiableOn ω shω_fderiv: (a x y : Space), ((fderiv ω a) x) y = basis.repr.symm ((fderiv f a) x), y⟫_hdω: a s, (x y : Space), ((fderiv ω a) x) y = ((fderiv ω a) y) x g, f = g Differentiable g f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0s:Set Space := Set.univhs:Convex shso:IsOpen sω:Space Space →L[] := fun a => (toDual Space) (basis.repr.symm (f a)):DifferentiableOn ω shω_fderiv: (a x y : Space), ((fderiv ω a) x) y = basis.repr.symm ((fderiv f a) x), y⟫_hdω: a s, (x y : Space), ((fderiv ω a) x) y = ((fderiv ω a) y) xg:Space hg: a s, HasFDerivAt g (ω a) a g, f = g Differentiable g f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0s:Set Space := Set.univhs:Convex shso:IsOpen sω:Space Space →L[] := fun a => (toDual Space) (basis.repr.symm (f a)):DifferentiableOn ω shω_fderiv: (a x y : Space), ((fderiv ω a) x) y = basis.repr.symm ((fderiv f a) x), y⟫_hdω: a s, (x y : Space), ((fderiv ω a) x) y = ((fderiv ω a) y) xg:Space hg: a s, HasFDerivAt g (ω a) af = g Differentiable g f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0s:Set Space := Set.univhs:Convex shso:IsOpen sω:Space Space →L[] := fun a => (toDual Space) (basis.repr.symm (f a)):DifferentiableOn ω shω_fderiv: (a x y : Space), ((fderiv ω a) x) y = basis.repr.symm ((fderiv f a) x), y⟫_hdω: a s, (x y : Space), ((fderiv ω a) x) y = ((fderiv ω a) y) xg:Space hg: (a : Space), HasGradientAt g (basis.repr.symm (f a)) af = g Differentiable g f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0s:Set Space := Set.univhs:Convex shso:IsOpen sω:Space Space →L[] := fun a => (toDual Space) (basis.repr.symm (f a)):DifferentiableOn ω shω_fderiv: (a x y : Space), ((fderiv ω a) x) y = basis.repr.symm ((fderiv f a) x), y⟫_hdω: a s, (x y : Space), ((fderiv ω a) x) y = ((fderiv ω a) y) xg:Space hg: (a : Space), HasGradientAt g (basis.repr.symm (f a)) af = g f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0s:Set Space := Set.univhs:Convex shso:IsOpen sω:Space Space →L[] := fun a => (toDual Space) (basis.repr.symm (f a)):DifferentiableOn ω shω_fderiv: (a x y : Space), ((fderiv ω a) x) y = basis.repr.symm ((fderiv f a) x), y⟫_hdω: a s, (x y : Space), ((fderiv ω a) x) y = ((fderiv ω a) y) xg:Space hg: (a : Space), HasGradientAt g (basis.repr.symm (f a)) ax:Spacef x = g x f:Space EuclideanSpace (Fin 3)hf:Differentiable fhcurl:curl f = 0s:Set Space := Set.univhs:Convex shso:IsOpen sω:Space Space →L[] := fun a => (toDual Space) (basis.repr.symm (f a)):DifferentiableOn ω shω_fderiv: (a x y : Space), ((fderiv ω a) x) y = basis.repr.symm ((fderiv f a) x), y⟫_hdω: a s, (x y : Space), ((fderiv ω a) x) y = ((fderiv ω a) y) xg:Space x:Spacehg:HasGradientAt g (basis.repr.symm (f x)) xf x = g x All goals completed! 🐙

A constructive form of the statement that if the curl of a function is zero, then it is equal to the grad of another function.

In the context of e.g. electromagnetism the potential given by this lemma corresponds to that defined by the work done to move a unit charge from the origin to the point x along a straight line.

g:Space hg:Differentiable ghf:ContDiff 1 ( g)hcurl:curl ( g) = 0 f', Continuous f' (x : Space), HasFDerivAt g (f' x) x refine fun x => ((toDual Space) (basis.repr.symm ( g x))), g:Space hg:Differentiable ghf:ContDiff 1 ( g)hcurl:curl ( g) = 0Continuous fun x => (toDual Space) (basis.repr.symm ( g x)) All goals completed! 🐙, fun x => ?_ All goals completed! 🐙
TODO "Generalize the statement that a curl-free field is a gradient to time-dependent fields."

B. The curl on distributions

@[inherit_doc distCurl] macro (name := distCurlNotation) "∇ᵈ" "⨯" f:term:100 : term => `(distCurl $f)

B.1. The components of the curl

lemma distCurl_coord_apply {i : Fin 3} (f : Space →d[] (EuclideanSpace (Fin 3))) (η : 𝓢(Space, )) : (∇ᵈ f) η i = - f (SchwartzMap.evalCLM Space (basis (i+2)) (fderivCLM Space η)) (i+1) + f (SchwartzMap.evalCLM Space (basis (i+1)) (fderivCLM Space η)) (i+2) := i:Fin 3f:Space→d[] EuclideanSpace (Fin 3)η:𝓢(Space, )((distCurl f) η).ofLp i = -(f ((SchwartzMap.evalCLM Space (basis (i + 2))) ((fderivCLM Space ) η))).ofLp (i + 1) + (f ((SchwartzMap.evalCLM Space (basis (i + 1))) ((fderivCLM Space ) η))).ofLp (i + 2) All goals completed! 🐙lemma distCurl_apply_one (f : Space →d[] (EuclideanSpace (Fin 3))) (η : 𝓢(Space, )) : (∇ᵈ f) η 1 = - f (SchwartzMap.evalCLM Space (basis 0) (fderivCLM Space η)) 2 + f (SchwartzMap.evalCLM Space (basis 2) (fderivCLM Space η)) 0 := f:Space→d[] EuclideanSpace (Fin 3)η:𝓢(Space, )((distCurl f) η).ofLp 1 = -(f ((SchwartzMap.evalCLM Space (basis 0)) ((fderivCLM Space ) η))).ofLp 2 + (f ((SchwartzMap.evalCLM Space (basis 2)) ((fderivCLM Space ) η))).ofLp 0 All goals completed! 🐙lemma distCurl_apply_two (f : Space →d[] (EuclideanSpace (Fin 3))) (η : 𝓢(Space, )) : (∇ᵈ f) η 2 = - f (SchwartzMap.evalCLM Space (basis 1) (fderivCLM Space η)) 0 + f (SchwartzMap.evalCLM Space (basis 0) (fderivCLM Space η)) 1 := f:Space→d[] EuclideanSpace (Fin 3)η:𝓢(Space, )((distCurl f) η).ofLp 2 = -(f ((SchwartzMap.evalCLM Space (basis 1)) ((fderivCLM Space ) η))).ofLp 0 + (f ((SchwartzMap.evalCLM Space (basis 0)) ((fderivCLM Space ) η))).ofLp 1 All goals completed! 🐙

B.2. Basic equalities

lemma distCurl_apply (f : Space →d[] (EuclideanSpace (Fin 3))) (η : 𝓢(Space, )) : (∇ᵈ f) η = WithLp.toLp 2 fun i => - f (SchwartzMap.evalCLM Space (basis (i+2)) (fderivCLM Space η)) (i+1) + f (SchwartzMap.evalCLM Space (basis (i+1)) (fderivCLM Space η)) (i+2) := f:Space→d[] EuclideanSpace (Fin 3)η:𝓢(Space, )(distCurl f) η = WithLp.toLp 2 fun i => -(f ((SchwartzMap.evalCLM Space (basis (i + 2))) ((fderivCLM Space ) η))).ofLp (i + 1) + (f ((SchwartzMap.evalCLM Space (basis (i + 1))) ((fderivCLM Space ) η))).ofLp (i + 2) f:Space→d[] EuclideanSpace (Fin 3)η:𝓢(Space, )i:Fin 3((distCurl f) η).ofLp i = (WithLp.toLp 2 fun i => -(f ((SchwartzMap.evalCLM Space (basis (i + 2))) ((fderivCLM Space ) η))).ofLp (i + 1) + (f ((SchwartzMap.evalCLM Space (basis (i + 1))) ((fderivCLM Space ) η))).ofLp (i + 2)).ofLp i All goals completed! 🐙

B.3. The curl of a grad is zero

The curl of a grad is equal to zero.

f:Space→d[] η:𝓢(Space, )i:Fin 3x:Space((SchwartzMap.evalCLM Space (basis (i + 2))) ((fderivCLM Space ) ((SchwartzMap.evalCLM Space (basis (i + 1))) ((fderivCLM Space ) η)))) x + -((SchwartzMap.evalCLM Space (basis (i + 2))) ((fderivCLM Space ) ((SchwartzMap.evalCLM Space (basis (i + 1))) ((fderivCLM Space ) η)))) x = 0 All goals completed! 🐙