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 x↦f(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: Feb 28 2026 at 14:05 UTC