Zulip Chat Archive

Stream: sphere eversion

Topic: Rotation around a vector by an angle


Heather Macbeth (Jul 26 2022 at 05:36):

@Patrick Massot I was able to construct the rotation around a vector by an angle as an element of O(3)O(3), in the following form (using the constructions unit_quaternions and unit_quaternions.to_matrix_hom from my polyrith tutorial):

local notation `²` := euclidean_space  (fin 2)
local notation `³` := euclidean_space  (fin 3)

local notation `𝕊¹` := metric.sphere (0 : ²) 1
local notation `𝕊²` := metric.sphere (0 : ³) 1

def rotate_around (x : 𝕊²) (y : 𝕊¹) : unit_quaternions :=
 (y : ²) 0 + (y : ²) 1  (quaternion_algebra.mk 0 ((x : ³) 0) ((x : ³) 1) ((x : ³) 2)), sorry 

local notation `↑ₘ` := @coe (matrix.orthogonal_group (fin 3) ) (matrix (fin 3) (fin 3) ) _

example (x : 𝕊²) (y : 𝕊¹) :
  matrix.mul_vec (↑ₘ(unit_quaternions.to_matrix_hom (rotate_around x y))) (x : ³) = (x : ³) :=
sorry

I can go up or down in level of generality, let me know -- just wanted to run the first version past you.

Heather Macbeth (Jul 28 2022 at 05:39):

@Patrick Massot I have a co-ordinate-free version now, but I didn't try to Lean it yet :). Let VV be a three-dimensional oriented inner product space, with the inner product denoted ,\langle \cdot,\cdot\rangle and the volume form denoted Ω\Omega.

We have the Hodge isomorphism between VV and Λ2(V)\Lambda^2(V^*), and the further isomorphism between Λ2(V)\Lambda^2(V^*) and
so(V)={AEnd(V):At+A=0}.\mathfrak{so}(V)=\{A\in\operatorname{End}(V) : A^t+A=0\}.

The composition of these two isomorphisms can be written explicitly as sending vVv\in V to the element AvEnd(V)A_v\in\operatorname{End}(V) defined as follows: for wVw\in V, Av(w)A_v(w) is the unique element of VV such that for all uVu\in V,
Av(w),u=Ω(v,w,u).\langle A_v(w),u\rangle=\Omega(v,w,u).
One needs to check that in fact Avt+Av=0A_v^t+A_v=0, so that Avso(V)A_v\in\mathfrak{so}(V).

Now denote by S2(v)S^2(v) the 2-sphere in VV, and define a map from S2(V)×RS^2(V)\times \mathbb{R} to SO(V)SO(V) by the endomorphism exponential
(v,t)exp(tAv).(v,t)\mapsto \exp(tA_v).
It can be checked that this is 2π2\pi-periodic, so descends to a map
S2(V)×S1SO(V).S^2(V)\times S^1 \to SO(V).

Patrick Massot (Jul 28 2022 at 12:59):

Thanks Heather! I answer late because I took a break after coming back from Providence. Of course the coordinate-free version looks nice but, as I told you in Providence, the test case for us is to make you can easily prove that the map sending (v,t,w)(v, t, w) to exp(tAv)w\exp(tA_v)w is smooth.

Patrick Massot (Jul 28 2022 at 13:00):

Note that I don't really need that the version where tt is in $\mathbb{S}^1$$ is smooth. Our tt will naturally be a real number.

Heather Macbeth (Jul 28 2022 at 19:56):

Patrick Massot said:

Of course the coordinate-free version looks nice but, as I told you in Providence, the test case for us is to make you can easily prove that the map sending (v,t,w)(v, t, w) to exp(tAv)w\exp(tA_v)w is smooth.

OK, this sounds like a challenge :). For the quaternion version the smoothness looks pretty doable, for the co-ordinate-free version the hard part (modulo current mathlib) seems to be the smoothness of the endomorphism exponential.

Do you have written down somewhere the other properties you need it confirmed to satisfy? E.g. I imagine you need that t=0t=0 gives the identity and that for all vv it fixes vv? What else?

Heather Macbeth (Jul 28 2022 at 20:00):

Heather Macbeth said:

for the co-ordinate-free version the hard part (modulo current mathlib) seems to be the smoothness of the endomorphism exponential.

I think there's also a bit of a trick available, some formula like
exp(tAv)=Projv+cos(t)Projv+sin(t)Av\exp(tA_v)=\operatorname{Proj}_v+\cos(t)\operatorname{Proj}_{v^\perp}+\sin(t)A_v
should hold and it is likely easier to prove smoothness in this representation.

Patrick Massot (Jul 28 2022 at 21:03):

I also need that for t=π t=\pi you get -id on vv^\perp.

Patrick Massot (Jul 28 2022 at 21:46):

I also found https://en.m.wikipedia.org/wiki/Euler%E2%80%93Rodrigues_formula which a more elementary version of the quaternion story.

Joseph Myers (Jul 29 2022 at 00:53):

In oriented two dimensions we already have docs#orientation.rotation - my inclination for how to go from two dimensions to higher (not just three) dimensions (with only the two-dimensional subspace needing to have an orientation specified) would be to define the operation that goes from a linear_isometry_equiv of a subspace of an inner product space to a subspace of a possibly different inner product space, and another linear_isometry_equiv of their orthogonal complements, to a linear_isometry_equiv of the whole space (and then apply that operation with one isometry being two-dimensional rotation and the other being the identity to produce a higher-dimensional rotation). I don't know how readily that would give whatever smoothness properties you need, but we do have docs#orientation.rotation_pi saying what rotation by pi does.

Heather Macbeth (Jul 29 2022 at 07:05):

@Patrick Massot I pushed the construction, the smoothness, and the three facts you identified.

(For the smoothness, so far I proved smoothness of the operation considered as of type

(E × )  (E L[] E)

But it should be a one-liner to deduce the smoothness of the version

(E ×  × E)  E

if that's what you need.)

Heather Macbeth (Jul 29 2022 at 07:07):

But I'm a bit suspicious. So far I barely used anything -- I didn't even need that the space was three-dimensional, or that the "orientation" three-form was nonzero (let alone compatible with the metric). Maybe there are other properties you need which will require these facts?

Patrick Massot (Jul 29 2022 at 09:43):

Nice! The real test is to build the homotopy of formal immersion defined in the last proof of the blueprint.

Heather Macbeth (Aug 03 2022 at 06:41):

@Patrick Massot I've been looking at this. It seems to me that to make the homotopy of formal immersions, I need three ingredients:

  1. for the unit sphere S(E)S(E) in EE, there is a canonical smooth section of the bundle whose fibre over xx is Hom(TxS(E),E)\operatorname{Hom}(T_xS(E), E), which comes from thinking of the tangent spaces of the embedding as living in EE
  2. The discussion about rotations gives a smooth map from S(E)×RS(E)\times \mathbb{R} to Hom(E,E)\operatorname{Hom}(E, E)
  3. for a manifold MM and normed spaces EE, FF, and a smooth section of the bundle whose fibre over xx is Hom(TxM,E)\operatorname{Hom}(T_xM, E), and a smooth map from M×RM\times\mathbb{R} to Hom(E,F)\operatorname{Hom}(E, F), these can be composed to give a homotopy of 1-jet sections from MM to FF.

Sound right? I have started thinking about building (1), so far just have the statement,

def hyperplane_map (v : sphere (0:E) 1) :
  ((tangent_bundle_core (𝓡 n) (sphere (0:E) 1)).hom
    (trivial_basic_smooth_vector_bundle_core (𝓡 n)
      (sphere (0:E) 1) E)).to_topological_vector_bundle_core.total_space :=
v, (submodule.subtypeL _) L
    ((orthonormal_basis.from_orthogonal_span_singleton n
    (ne_zero_of_mem_unit_sphere (-v))).repr.symm.to_continuous_linear_equiv
      : euclidean_space  (fin n) L[] (  ((-v):E)))⟩

example : smooth (𝓡 n) ((𝓡 n).prod 𝓘(, euclidean_space  (fin n) L[] E)) (hyperplane_map E n) :=
sorry

Heather Macbeth (Aug 03 2022 at 06:42):

Note: This is just to build it as a homotopy of 1-jet sections, not yet to make it a homotopy of formal immersions.

Patrick Massot (Aug 03 2022 at 09:50):

For 1, we are indeed punished for not having submanifolds in mathlib. However I think of this map as the derivative Tvι:TvS(E)Tι(v)ET_v\iota : T_vS(E) \to T_{\iota(v)}E of the inclusion map ι\iota composed with the canonical identification of TeET_eE with EE for all ee. There shouldn't be anything specific to spheres. Also I don't understand why -v enters your code here.

Patrick Massot (Aug 25 2022 at 12:44):

@Heather Macbeth do you have any update here?

Heather Macbeth (Aug 31 2022 at 09:21):

Hi, @Patrick Massot and all. After the helpful message of Patrick, I hit decision paralysis a few weeks ago when looking a little more closely at @Floris van Doorn's work on constructing the pullback as a smooth bundle in certain situations (when the charts line up properly).

I agree with Patrick's suggested approach here :light_bulb:
Patrick Massot said:

However I think of this map as the derivative Tvι:TvS(E)Tι(v)ET_v\iota : T_vS(E) \to T_{\iota(v)}E of the inclusion map ι\iota composed with the canonical identification of TeET_eE with EE for all ee.

but does that mean I should explicitly construct another special-case instance of the pullback, analogous to the ones for prod_fst and prod_snd, with my instance being (say) the one where the target of the map has a single chart? Or is there maybe a way of avoiding such a construction and instead re-using the prod_fst/prod_snd ones, by some other clever exploitation of the "product trick"?

Anyway, sorry it took so long for me to summarize my thoughts here; looking forward to hearing others' thoughts.

Heather Macbeth (Aug 31 2022 at 09:25):

Patrick Massot said:

Also I don't understand why -v enters your code here.

By the way, this was a consequence of working too specifically with the charts of the sphere, rather than charts of a general source manifold. The charts of the sphere are stereographic projections centred around the antipodes of the base point.

Patrick Massot (Aug 31 2022 at 09:30):

I don't know what is the best construction from a library building point of view, but I would welcome any hack that can get us this map as soon as possible.

Floris van Doorn (Aug 31 2022 at 10:28):

I tried to read up on what you're trying to do here, so I might be misunderstanding.
I'm not sure why you would need to construct another pullback of smooth vector bundles. For TvιT_v\iota you can write mfderiv _ _ subtype.val, and the corresponding section is just one_jet_ext or one_jet_ext_sec applied to subtype.val, or am I misunderstanding what you're trying to do?

Heather Macbeth (Sep 02 2022 at 07:28):

@Floris van Doorn Thanks for the quick reply, I tried to write out what I wanted more explicitly, see this branch:
https://github.com/leanprover-community/sphere-eversion/tree/naive-homotopy
Effectively, for maps with target in a normed space V, I am writing glue between your point of view (one-jet sections considered as sections of the product manifold etc. etc.) and an alternative point of view (sections of the smooth vector bundle of endomorphisms from the tangent space to V).

Are the three sorries in global/twist_one_jet_sec things you've thought about/already proved somewhere? Effectively these are stating the fact "tangent bundle of V is canonically trivialized" in convenient ways.

Heather Macbeth (Sep 02 2022 at 07:29):

note: everything is type-correct, but because of the exploitation of defeq for fibres of bundles throughout the manifolds library, I'm only about 75% sure that I have written what I mean ...

Sebastien Gouezel (Sep 02 2022 at 08:24):

Heather Macbeth said:

note: everything is type-correct, but because of the exploitation of defeq for fibres of bundles throughout the manifolds library, I'm only about 75% sure that I have written what I mean ...

That's a very interesting point! The library was written to avoid dependent type hell as much as possible, and now it's backfiring :-)

Floris van Doorn (Sep 05 2022 at 08:28):

Thanks Heather. These sorry's are not something I have proven, but they should be easily provable from tools I wrote for the 1-jet bundles. For 1-jet bundles I proved smooth_at_one_jet_bundle, which precisely characterizes the smooth functions into a 1-jet bundle (in_coordinates is an appropriate pre- and post-composition with coordinate changes)

Floris van Doorn (Sep 05 2022 at 08:30):

If you want, I can work on these tools and prove these sorry's. I think it will not be too hard.

Floris van Doorn (Sep 05 2022 at 08:39):

Heather Macbeth said:

note: everything is type-correct, but because of the exploitation of defeq for fibres of bundles throughout the manifolds library, I'm only about 75% sure that I have written what I mean ...

This is very normal. I've written a couple of lemma statements that I had to modify during the proof, and even the original definition of 1-jet bundle that Patrick wrote down was wrong (it missed a coordinate change function).

I don't think the solution is to make it harder to write down these non-sensical things, since I'm greatly enjoying the freedom that tangent spaces are definitionally equal to the underlying vector space. It allowsme to write down lemmas like this: mfderiv (I.prod I') I prod.fst x = continuous_linear_map.fst 𝕜 E E'. Sometimes Lean is still confused because it thinks tangent_space is a dependent type, and refused to rewrite subexpressions, which is all very frustrating.
I think your family_twist might be missing a coordinate change function in the condition i_smooth. I'm not sure, since the codomain has trivial coordinate changes, but the domain doesn't...

Floris van Doorn (Sep 05 2022 at 12:34):

You had the correct formulation of family_twist (there was a coordinate change that showed up in the proof, but that was exactly the coordinate change needed to use the fact that s is smooth).

Floris van Doorn (Sep 05 2022 at 12:34):

I proved all three sorry's. The file twist_one_jet_sec is now sorry-free.

Floris van Doorn (Sep 05 2022 at 12:35):

I pushed your and my commits to master.

Patrick Massot (Sep 05 2022 at 13:07):

What is the current status of the formal sphere eversion then?

Patrick Massot (Sep 05 2022 at 13:08):

It seems that right now it is holonomic only at time 0 and 1, which isn't quite enough, but this can easily (on paper) be arranged after the fact, simply precomposing it by a time cutoff function).

Patrick Massot (Sep 05 2022 at 13:09):

I mean we need to prove this lemma which doesn't seem to hold with the current definition.

Floris van Doorn (Sep 05 2022 at 15:44):

I hope that Heather can do the remaining part.
From looking over the file, it seems like we still need to
(1) add a cut-off-function, and prove that this is still smooth
(2) prove that rotations are immersions - and I guess that the cut-off function is also an immersion, which probably needs that the derivatives of a rotation at vv is orthogonal to vv
(3) prove that the base map is smooth (which is easy)

Patrick Massot (Sep 05 2022 at 15:47):

What do you mean by "the cut-off function is also an immersion"?

Patrick Massot (Sep 05 2022 at 15:49):

Maybe I should clarify that cut-off thing.

Floris van Doorn (Sep 05 2022 at 15:49):

Oh, sorry, I meant "the cut-off function is also injective"

Patrick Massot (Sep 05 2022 at 15:55):

A formal eversion is F:R×S2J1(S2,R3)F : \R \times \mathbb{S}^2 \to J^1(\mathbb{S}^2, \R^3) where Ft(x)=(x,ft(x),φt(x))F_t(x) = (x, f_t(x), \varphi_t(x)) with each φt(x):TxS2Tft(x)R3\varphi_t(x) : T_x\mathbb{S}^2 \to T_{f_t(x)}\R^3 is an injective linear map, for all xx f0(x)=xf_0(x) = x and f1(x)=xf_1(x) = -x and φt(x)=Txft\varphi_t(x) = T_xf_t when tt is zero or one. This is what we can do with a nice explicit formula involving rotations. But we want to ensure a slightly stronger last condition, going from "when tt is zero or one" to "when tt is close to zero or one". Given a formal sphere eversion FF we can get the stronger version by setting F(t,x)=F(ρ(t),x)F'(t, x) = F(\rho(t), x) where ρ:RR\rho : \R \to \R is a smooth non-decreasing function which equals zero on a neighborhood of zero and one on a neighborhood of one.

Floris van Doorn (Sep 05 2022 at 15:57):

Ah, I see. That makes that part immediate, indeed.

Patrick Massot (Sep 05 2022 at 15:57):

This ρ\rho is what I call the cutoff function.

Patrick Massot (Sep 05 2022 at 15:57):

There is no injectivity condition on ρ\rho

Floris van Doorn (Sep 05 2022 at 15:59):

I indeed had a different construction in mind (a smooth transition between TxftT_xf_t and rotations). Sorry for the confusion.

Heather Macbeth (Sep 05 2022 at 18:32):

@Floris van Doorn Awesome! Thanks! And I am gratified to hear that I stated the sorries right :)

I'll take a stab now at proving it's a formal immersion. Moment of truth ...

Heather Macbeth (Sep 06 2022 at 08:20):

OK, done! I proved that the construction:

  • gives a formal immersion at each tRt\in\mathbb{R}
  • is holonomic at 0 and 1

Heather Macbeth (Sep 06 2022 at 08:24):

This is modulo some theory which ought to be in mathlib, which I've sorried for now:

  1. the tangent space of the sphere considered in the ambient space
  2. interaction of orientations and inner products
  3. finrank lemmas

Heather Macbeth (Sep 06 2022 at 08:25):

I also didn't implement the "fiddle with the endpoints" argument.

Heather Macbeth (Sep 06 2022 at 21:29):

Heather Macbeth said:

This is modulo some theory which ought to be in mathlib, which I've sorried for now:

  1. the tangent space of the sphere considered in the ambient space
  2. interaction of orientations and inner products
  3. finrank lemmas

Just pushed (1). This also gives as a corollary that the identity and antipodal embeddings of the sphere are immersions.

Heather Macbeth (Sep 10 2022 at 17:25):

Heather Macbeth said:

This is modulo some theory which ought to be in mathlib, which I've sorried for now:

  1. the tangent space of the sphere considered in the ambient space
  2. interaction of orientations and inner products
  3. finrank lemmas

(2) is now done.

I've also extracted explicitly what was previously implicit, that I have built a basis-free construction of the cross product for an oriented real inner product space. (The rotation by angle tt about a vector vv is realized as the endomorphism exponential of the endomorphism tv×tv\times \cdot.). We should figure out whether this should supersede or coexist with the co-ordinate cross product constructed in
https://leanprover-community.github.io/mathlib_docs/linear_algebra/cross_product.html

Patrick Massot (Sep 10 2022 at 17:27):

Great, thanks!

Yaël Dillies (Sep 10 2022 at 17:29):

Just wondering, did you construct the cross product the same way we define the dimension (namely, use trunc on bases)?

Heather Macbeth (Sep 11 2022 at 02:26):

I don't know what trunc is.

Heather Macbeth (Sep 11 2022 at 02:29):

I wrote a canonical definition of the cross-product: let ω\omega be the unique "volume" 3-form compatible with the orientation and inner product; then we define ×\times so that for all uu, vv, ww we have u×v,w=ω(u,v,w)\langle u \times v, w\rangle = \omega(u,v,w).

Kevin Buzzard (Sep 11 2022 at 09:05):

trunc is a way of saying "we define this by making an arbitrary choice (eg picking a basis and counting it) and then proving the answer is independent of the choice", without actually applying the axiom of choice to pick a basis. It's the quotient of a type by the "always true" equivalence relation, so assuming the original type is nonempty it's got one element, and you can define maps from it to other types (like nat) using quotient.lift. So I think Yael's question mathematically is "did you pick a basis and if so then how exactly?" and your answer is "I didn't need to pick a basis at all!"

Heather Macbeth (Sep 11 2022 at 14:27):

Heather Macbeth said:

This is modulo some theory which ought to be in mathlib, which I've sorried for now:

  1. the tangent space of the sphere considered in the ambient space
  2. interaction of orientations and inner products
  3. finrank lemmas

The homotopy of formal immersions and its to_mathlib prerequisites are now finished. I found some lemmas to replace (3) in mathlib already.

Patrick Massot (Sep 11 2022 at 15:36):

Thank you very much for all this rotation work Heather!

Heather Macbeth (Sep 12 2022 at 05:00):

I opened #16466, #16474, #16475, #16476, #16477, #16478, #16479; more to come!

Patrick Massot (Sep 12 2022 at 08:32):

It's great to also take the trouble to immediately open mathlib PRs


Last updated: Dec 20 2023 at 11:08 UTC