Zulip Chat Archive

Stream: new members

Topic: Choosing a point from a set


Dominic Steinitz (Sep 27 2024 at 07:42):

As an exercise, I have defined a smooth map on manifolds as

def smooth_map (f : M β†’ N) : Prop :=
  βˆ€ (x : M), Smooth (𝓑 m) (𝓑 n)
    ((chartAt (EuclideanSpace ℝ (Fin n)) (f x)).toFun ∘ f ∘ (chartAt (EuclideanSpace ℝ (Fin m)) x).invFun)

and am trying to prove

theorem smooth_is_continuous {f : M -> N} (hf : smooth_map m n f) : Continuous f := by
sorry

The proof will take any open U in N then since Smooth (in the Mathlib sense) implies Continuous (Ο•βˆ˜fβˆ˜Οˆβˆ’1)βˆ’1(Ο•(U))(\phi \circ f \circ \psi^{-1})^{-1}(\phi(U)) is open and using the homeo properties of charts and the continuity of functions show that fβˆ’1(U)f^{-1}(U) is open.

So now my question: as far as I can see, I can define chartAt (EuclideanSpace ℝ (Fin n)) p but how do I get a p from U? This does not work:

theorem smooth_is_continuous {f : M -> N} (hf : smooth_map m n f) : Continuous f := by
  rw [continuous_def] at *
  intro U hU
  let p := Classical.choice U.Nonempty
  let Ο† := chartAt (EuclideanSpace ℝ (Fin n)) p
  sorry

BjΓΈrn Kjos-Hanssen (Sep 27 2024 at 07:58):

Can you post a #mwe please?

Dominic Steinitz (Sep 27 2024 at 08:06):

I don't have a working example which is why I am asking for help. Here's my full code so far

import Mathlib

open Manifold

variable
  (m : β„•) {M : Type*}
  [TopologicalSpace M]
  [ChartedSpace (EuclideanSpace ℝ (Fin m)) M]
  [SmoothManifoldWithCorners (𝓑 m) M]

variable
  (n : β„•) {N : Type*}
  [TopologicalSpace N]
  [ChartedSpace (EuclideanSpace ℝ (Fin n)) N]
  [SmoothManifoldWithCorners (𝓑 n) N]

variable
  (p : β„•) {P : Type*}
  [TopologicalSpace P]
  [ChartedSpace (EuclideanSpace ℝ (Fin p)) P]
  [SmoothManifoldWithCorners (𝓑 p) P]

def smooth_map (f : M β†’ N) : Prop :=
  βˆ€ (x : M), Smooth (𝓑 m) (𝓑 n)
    ((chartAt (EuclideanSpace ℝ (Fin n)) (f x)).toFun ∘ f ∘ (chartAt (EuclideanSpace ℝ (Fin m)) x).invFun)

theorem smooth_is_continuous {f : M -> N} (hf : smooth_map m n f) : Continuous f := by

  rw [continuous_def] at *
  intro U hU
  let p := Classical.choice U.Nonempty
  let Ο† := chartAt (EuclideanSpace ℝ (Fin n)) p
  sorry

Luigi Massacci (Sep 27 2024 at 09:11):

It doesn’t work because as lean is telling you, you don’t know that it is nonempty

Luigi Massacci (Sep 27 2024 at 09:12):

You can do something like by_cases (hnu : Set.Nonempty U)

Luigi Massacci (Sep 27 2024 at 09:18):

and then handle the two cases separately

Michael Rothgang (Sep 27 2024 at 11:30):

Side note: mathlib already has a proof of this fact. It is fine to re-prove things as an exercise, though!


Last updated: May 02 2025 at 03:31 UTC