Zulip Chat Archive

Stream: Is there code for X?

Topic: pointwise curl operator in Mathlib?


Ali Bekheet (Feb 10 2026 at 23:19):

Is there a pointwise curl operator in Mathlib?

I'd like to contribute curl : ((Fin 3 → ℝ) → (Fin 3 → ℝ)) → (Fin 3 → ℝ) → (Fin 3 → ℝ) defined via fderiv and Pi.single, following the crossProduct pattern. I have a working draft with linearity lemmas. Is anyone else working on this, and would it be welcome?

Eric Wieser (Feb 10 2026 at 23:27):

Putnambench uses

    (curl : ((Fin 3  )  (Fin 3  ))  ((Fin 3  )  (Fin 3  )))
    (curl_def :  f x, curl f x = ![
      fderiv  f x (Pi.single 1 1) 2 - fderiv  f x (Pi.single 2 1) 1,
      fderiv  f x (Pi.single 2 1) 0 - fderiv  f x (Pi.single 0 1) 2,
      fderiv  f x (Pi.single 0 1) 1 - fderiv  f x (Pi.single 1 1) 0])

Eric Wieser (Feb 10 2026 at 23:29):

PhysLean also has a definition

Weiyi Wang (Feb 10 2026 at 23:31):

I guess Mathlib would want a more generic definition?

Eric Wieser (Feb 10 2026 at 23:31):

I would guess it wants the differential form instead

Eric Wieser (Feb 10 2026 at 23:37):

(which I guess docs#extDeriv helps with)

Yury G. Kudryashov (Feb 10 2026 at 23:47):

I think that it makes sense to have the curl too. It should be possible to define it in an inner product space of dimension 3.


Last updated: Feb 28 2026 at 14:05 UTC