Zulip Chat Archive

Stream: Is there code for X?

Topic: Continuity of composition with subtypes


Gareth Ma (May 20 2024 at 00:36):

import Mathlib.Topology.Covering
import Mathlib.Topology.UnitInterval

open Int Topology Metric Set Filter AddSubgroup

example {f :   } {A : Set } (hf : ContinuousOn f A) :
    ContinuousOn (fun x  (⟨f x, 0, True.intro⟩⟩ :  × { x :  // True })) A := by
  sorry

How should I prove something like this? continuity fails. If it's just <f x, 0> then I can prove by writing it as xf(x)(f(x),0)x \mapsto f(x) \mapsto (f(x), 0)

Gareth Ma (May 20 2024 at 00:41):

Nevermind, I thin I just use ContinuousOn.prod... oops

Gareth Ma (May 20 2024 at 00:52):

example {f :   } {A : Set } (hf : ContinuousOn f A) :
    ContinuousOn (fun x  (⟨f x, 0, True.intro⟩⟩ :  × { _x :  // True })) A := by
  apply ContinuousOn.prod hf
  change ContinuousOn ((fun d  (⟨d, True.intro : { _x :  // True }))  (fun _  0)) A
  exact ContinuousOn.comp (t := {0}) (by simp) continuousOn_const (by simp [MapsTo])

Gareth Ma (May 20 2024 at 01:05):

example {f :   } {A : Set } (hf : ContinuousOn f A) :
    ContinuousOn (fun x  (⟨f x, 0, True.intro⟩⟩ :  × { _x :  // True })) A :=
  hf.prod continuousOn_const

I guess this is what overthinking looks like in Lean
(Of course Lean knows 0 = <0, ...>...)

Gareth Ma (May 20 2024 at 04:22):

(deleted)


Last updated: May 02 2025 at 03:31 UTC