Documentation

Mathlib.Topology.LocallyConstant.Basic

Locally constant functions #

This file sets up the theory of locally constant function from a topological space to a type.

Main definitions and constructions #

def IsLocallyConstant {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : X โ†’ Y) :

A function between topological spaces is locally constant if the preimage of any set is open.

Equations
    Instances For
      theorem IsLocallyConstant.tfae {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : X โ†’ Y) :
      [IsLocallyConstant f, โˆ€ (x : X), โˆ€แถ  (x' : X) in nhds x, f x' = f x, โˆ€ (x : X), IsOpen {x' : X | f x' = f x}, โˆ€ (y : Y), IsOpen (f โปยน' {y}), โˆ€ (x : X), โˆƒ (U : Set X), IsOpen U โˆง x โˆˆ U โˆง โˆ€ x' โˆˆ U, f x' = f x].TFAE
      theorem IsLocallyConstant.isOpen_fiber {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) (y : Y) :
      IsOpen {x : X | f x = y}
      theorem IsLocallyConstant.isClosed_fiber {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) (y : Y) :
      IsClosed {x : X | f x = y}
      theorem IsLocallyConstant.isClopen_fiber {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) (y : Y) :
      IsClopen {x : X | f x = y}
      theorem IsLocallyConstant.iff_exists_open {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : X โ†’ Y) :
      IsLocallyConstant f โ†” โˆ€ (x : X), โˆƒ (U : Set X), IsOpen U โˆง x โˆˆ U โˆง โˆ€ x' โˆˆ U, f x' = f x
      theorem IsLocallyConstant.iff_eventually_eq {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : X โ†’ Y) :
      IsLocallyConstant f โ†” โˆ€ (x : X), โˆ€แถ  (y : X) in nhds x, f y = f x
      theorem IsLocallyConstant.exists_open {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) (x : X) :
      โˆƒ (U : Set X), IsOpen U โˆง x โˆˆ U โˆง โˆ€ x' โˆˆ U, f x' = f x
      theorem IsLocallyConstant.eventually_eq {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) (x : X) :
      โˆ€แถ  (y : X) in nhds x, f y = f x
      theorem IsLocallyConstant.of_constant {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : X โ†’ Y) (h : โˆ€ (x y : X), f x = f y) :
      theorem IsLocallyConstant.comp {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) (g : Y โ†’ Z) :
      theorem IsLocallyConstant.prodMk {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {Y' : Type u_5} {f : X โ†’ Y} {f' : X โ†’ Y'} (hf : IsLocallyConstant f) (hf' : IsLocallyConstant f') :
      IsLocallyConstant fun (x : X) => (f x, f' x)
      theorem IsLocallyConstant.compโ‚‚ {X : Type u_1} [TopologicalSpace X] {Yโ‚ : Type u_5} {Yโ‚‚ : Type u_6} {Z : Type u_7} {f : X โ†’ Yโ‚} {g : X โ†’ Yโ‚‚} (hf : IsLocallyConstant f) (hg : IsLocallyConstant g) (h : Yโ‚ โ†’ Yโ‚‚ โ†’ Z) :
      IsLocallyConstant fun (x : X) => h (f x) (g x)
      theorem IsLocallyConstant.comp_continuous {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] {g : Y โ†’ Z} {f : X โ†’ Y} (hg : IsLocallyConstant g) (hf : Continuous f) :
      theorem IsLocallyConstant.apply_eq_of_isPreconnected {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) {s : Set X} (hs : IsPreconnected s) {x y : X} (hx : x โˆˆ s) (hy : y โˆˆ s) :
      f x = f y

      A locally constant function is constant on any preconnected set.

      theorem IsLocallyConstant.apply_eq_of_preconnectedSpace {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [PreconnectedSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) (x y : X) :
      f x = f y
      theorem IsLocallyConstant.eq_const {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [PreconnectedSpace X] {f : X โ†’ Y} (hf : IsLocallyConstant f) (x : X) :
      f = Function.const X (f x)
      theorem IsLocallyConstant.exists_eq_const {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [PreconnectedSpace X] [Nonempty Y] {f : X โ†’ Y} (hf : IsLocallyConstant f) :
      โˆƒ (y : Y), f = Function.const X y
      theorem IsLocallyConstant.iff_is_const {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [PreconnectedSpace X] {f : X โ†’ Y} :
      IsLocallyConstant f โ†” โˆ€ (x y : X), f x = f y
      theorem IsLocallyConstant.inv {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [Inv Y] โฆƒf : X โ†’ Yโฆ„ (hf : IsLocallyConstant f) :
      theorem IsLocallyConstant.neg {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [Neg Y] โฆƒf : X โ†’ Yโฆ„ (hf : IsLocallyConstant f) :
      theorem IsLocallyConstant.mul {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [Mul Y] โฆƒf g : X โ†’ Yโฆ„ (hf : IsLocallyConstant f) (hg : IsLocallyConstant g) :
      theorem IsLocallyConstant.add {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [Add Y] โฆƒf g : X โ†’ Yโฆ„ (hf : IsLocallyConstant f) (hg : IsLocallyConstant g) :
      theorem IsLocallyConstant.div {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [Div Y] โฆƒf g : X โ†’ Yโฆ„ (hf : IsLocallyConstant f) (hg : IsLocallyConstant g) :
      theorem IsLocallyConstant.sub {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [Sub Y] โฆƒf g : X โ†’ Yโฆ„ (hf : IsLocallyConstant f) (hg : IsLocallyConstant g) :
      theorem IsLocallyConstant.desc {X : Type u_1} [TopologicalSpace X] {ฮฑ : Type u_5} {ฮฒ : Type u_6} (f : X โ†’ ฮฑ) (g : ฮฑ โ†’ ฮฒ) (h : IsLocallyConstant (g โˆ˜ f)) (inj : Function.Injective g) :

      If a composition of a function f followed by an injection g is locally constant, then the locally constant property descends to f.

      theorem IsLocallyConstant.of_constant_on_connected_components {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [LocallyConnectedSpace X] {f : X โ†’ Y} (h : โˆ€ (x y : X), y โˆˆ connectedComponent x โ†’ f y = f x) :
      theorem IsLocallyConstant.of_constant_on_connected_clopens {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [LocallyConnectedSpace X] {f : X โ†’ Y} (h : โˆ€ (U : Set X), IsConnected U โ†’ IsClopen U โ†’ โˆ€ x โˆˆ U, โˆ€ y โˆˆ U, f y = f x) :
      theorem IsLocallyConstant.of_constant_on_preconnected_clopens {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [LocallyConnectedSpace X] {f : X โ†’ Y} (h : โˆ€ (U : Set X), IsPreconnected U โ†’ IsClopen U โ†’ โˆ€ x โˆˆ U, โˆ€ y โˆˆ U, f y = f x) :
      structure LocallyConstant (X : Type u_5) (Y : Type u_6) [TopologicalSpace X] :
      Type (max u_5 u_6)

      A (bundled) locally constant function from a topological space X to a type Y.

      • toFun : X โ†’ Y

        The underlying function.

      • isLocallyConstant : IsLocallyConstant self.toFun

        The map is locally constant.

      Instances For
        def LocallyConstant.Simps.apply {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : LocallyConstant X Y) :
        X โ†’ Y

        See Note [custom simps projections].

        Equations
          Instances For
            @[simp]
            theorem LocallyConstant.toFun_eq_coe {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : LocallyConstant X Y) :
            f.toFun = โ‡‘f
            @[simp]
            theorem LocallyConstant.coe_mk {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : X โ†’ Y) (h : IsLocallyConstant f) :
            โ‡‘{ toFun := f, isLocallyConstant := h } = f
            theorem LocallyConstant.congr_fun {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f g : LocallyConstant X Y} (h : f = g) (x : X) :
            f x = g x
            theorem LocallyConstant.congr_arg {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : LocallyConstant X Y) {x y : X} (h : x = y) :
            f x = f y
            theorem LocallyConstant.coe_inj {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f g : LocallyConstant X Y} :
            โ‡‘f = โ‡‘g โ†” f = g
            theorem LocallyConstant.ext {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] โฆƒf g : LocallyConstant X Yโฆ„ (h : โˆ€ (x : X), f x = g x) :
            f = g
            theorem LocallyConstant.ext_iff {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] {f g : LocallyConstant X Y} :
            f = g โ†” โˆ€ (x : X), f x = g x

            We can turn a locally-constant function into a bundled ContinuousMap.

            Equations
              Instances For

                As a shorthand, LocallyConstant.toContinuousMap is available as a coercion

                Equations
                  @[simp]
                  theorem LocallyConstant.coe_continuousMap {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [TopologicalSpace Y] (f : LocallyConstant X Y) :
                  โ‡‘โ†‘f = โ‡‘f
                  def LocallyConstant.const (X : Type u_5) {Y : Type u_6} [TopologicalSpace X] (y : Y) :

                  The constant locally constant function on X with value y : Y.

                  Equations
                    Instances For
                      @[simp]
                      theorem LocallyConstant.coe_const {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (y : Y) :
                      โ‡‘(const X y) = Function.const X y
                      def LocallyConstant.eval {ฮน : Type u_5} {X : ฮน โ†’ Type u_6} [(i : ฮน) โ†’ TopologicalSpace (X i)] (i : ฮน) [DiscreteTopology (X i)] :
                      LocallyConstant ((i : ฮน) โ†’ X i) (X i)

                      Evaluation/projection as a locally constant function.

                      Equations
                        Instances For
                          @[simp]
                          theorem LocallyConstant.eval_apply {ฮน : Type u_5} {X : ฮน โ†’ Type u_6} [(i : ฮน) โ†’ TopologicalSpace (X i)] (i : ฮน) [DiscreteTopology (X i)] (f : (i : ฮน) โ†’ X i) :
                          (eval i) f = f i
                          def LocallyConstant.ofIsClopen {X : Type u_5} [TopologicalSpace X] {U : Set X} [(x : X) โ†’ Decidable (x โˆˆ U)] (hU : IsClopen U) :

                          The locally constant function to Fin 2 associated to a clopen set.

                          Equations
                            Instances For
                              @[simp]
                              theorem LocallyConstant.ofIsClopen_fiber_zero {X : Type u_5} [TopologicalSpace X] {U : Set X} [(x : X) โ†’ Decidable (x โˆˆ U)] (hU : IsClopen U) :
                              @[simp]
                              theorem LocallyConstant.ofIsClopen_fiber_one {X : Type u_5} [TopologicalSpace X] {U : Set X} [(x : X) โ†’ Decidable (x โˆˆ U)] (hU : IsClopen U) :
                              theorem LocallyConstant.apply_eq_of_isPreconnected {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] (f : LocallyConstant X Y) {s : Set X} (hs : IsPreconnected s) {x y : X} (hx : x โˆˆ s) (hy : y โˆˆ s) :
                              f x = f y
                              theorem LocallyConstant.eq_const {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [PreconnectedSpace X] (f : LocallyConstant X Y) (x : X) :
                              f = const X (f x)
                              theorem LocallyConstant.exists_eq_const {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [PreconnectedSpace X] [Nonempty Y] (f : LocallyConstant X Y) :
                              โˆƒ (y : Y), f = const X y
                              def LocallyConstant.map {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] (f : Y โ†’ Z) (g : LocallyConstant X Y) :

                              Push forward of locally constant maps under any map, by post-composition.

                              Equations
                                Instances For
                                  @[simp]
                                  theorem LocallyConstant.map_apply {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] (f : Y โ†’ Z) (g : LocallyConstant X Y) :
                                  โ‡‘(map f g) = f โˆ˜ โ‡‘g
                                  @[simp]
                                  theorem LocallyConstant.map_comp {X : Type u_1} [TopologicalSpace X] {Yโ‚ : Type u_5} {Yโ‚‚ : Type u_6} {Yโ‚ƒ : Type u_7} (g : Yโ‚‚ โ†’ Yโ‚ƒ) (f : Yโ‚ โ†’ Yโ‚‚) :
                                  def LocallyConstant.flip {X : Type u_5} {ฮฑ : Type u_6} {ฮฒ : Type u_7} [TopologicalSpace X] (f : LocallyConstant X (ฮฑ โ†’ ฮฒ)) (a : ฮฑ) :

                                  Given a locally constant function to ฮฑ โ†’ ฮฒ, construct a family of locally constant functions with values in ฮฒ indexed by ฮฑ.

                                  Equations
                                    Instances For
                                      def LocallyConstant.unflip {X : Type u_5} {ฮฑ : Type u_6} {ฮฒ : Type u_7} [Finite ฮฑ] [TopologicalSpace X] (f : ฮฑ โ†’ LocallyConstant X ฮฒ) :
                                      LocallyConstant X (ฮฑ โ†’ ฮฒ)

                                      If ฮฑ is finite, this constructs a locally constant function to ฮฑ โ†’ ฮฒ given a family of locally constant functions with values in ฮฒ indexed by ฮฑ.

                                      Equations
                                        Instances For
                                          @[simp]
                                          theorem LocallyConstant.unflip_flip {X : Type u_5} {ฮฑ : Type u_6} {ฮฒ : Type u_7} [Finite ฮฑ] [TopologicalSpace X] (f : LocallyConstant X (ฮฑ โ†’ ฮฒ)) :
                                          @[simp]
                                          theorem LocallyConstant.flip_unflip {X : Type u_5} {ฮฑ : Type u_6} {ฮฒ : Type u_7} [Finite ฮฑ] [TopologicalSpace X] (f : ฮฑ โ†’ LocallyConstant X ฮฒ) :
                                          (unflip f).flip = f
                                          def LocallyConstant.comap {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] (f : C(X, Y)) (g : LocallyConstant Y Z) :

                                          Pull back of locally constant maps under a continuous map, by pre-composition.

                                          Equations
                                            Instances For
                                              @[simp]
                                              theorem LocallyConstant.coe_comap {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] (f : C(X, Y)) (g : LocallyConstant Y Z) :
                                              โ‡‘(comap f g) = โ‡‘g โˆ˜ โ‡‘f
                                              theorem LocallyConstant.coe_comap_apply {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] (f : C(X, Y)) (g : LocallyConstant Y Z) (x : X) :
                                              (comap f g) x = g (f x)
                                              theorem LocallyConstant.comap_comp {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] {W : Type u_5} [TopologicalSpace W] (f : C(W, X)) (g : C(X, Y)) :
                                              theorem LocallyConstant.comap_comap {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] {W : Type u_5} [TopologicalSpace W] (f : C(W, X)) (g : C(X, Y)) (x : LocallyConstant Y Z) :
                                              comap f (comap g x) = comap (g.comp f) x
                                              theorem LocallyConstant.comap_const {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] (f : C(X, Y)) (y : Y) (h : โˆ€ (x : X), f x = y) :
                                              comap f = fun (g : LocallyConstant Y Z) => const X (g y)
                                              def LocallyConstant.desc {X : Type u_5} {ฮฑ : Type u_6} {ฮฒ : Type u_7} [TopologicalSpace X] {g : ฮฑ โ†’ ฮฒ} (f : X โ†’ ฮฑ) (h : LocallyConstant X ฮฒ) (cond : g โˆ˜ f = โ‡‘h) (inj : Function.Injective g) :

                                              If a locally constant function factors through an injection, then it factors through a locally constant function.

                                              Equations
                                                Instances For
                                                  @[simp]
                                                  theorem LocallyConstant.coe_desc {X : Type u_5} {ฮฑ : Type u_6} {ฮฒ : Type u_7} [TopologicalSpace X] (f : X โ†’ ฮฑ) (g : ฮฑ โ†’ ฮฒ) (h : LocallyConstant X ฮฒ) (cond : g โˆ˜ f = โ‡‘h) (inj : Function.Injective g) :
                                                  โ‡‘(desc f h cond inj) = f
                                                  noncomputable def LocallyConstant.mulIndicator {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [One R] {U : Set X} (f : LocallyConstant X R) (hU : IsClopen U) :

                                                  Given a clopen set U and a locally constant function f, LocallyConstant.mulIndicator returns the locally constant function that is f on U and 1 otherwise.

                                                  Equations
                                                    Instances For
                                                      noncomputable def LocallyConstant.indicator {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [Zero R] {U : Set X} (f : LocallyConstant X R) (hU : IsClopen U) :

                                                      Given a clopen set U and a locally constant function f, LocallyConstant.indicator returns the locally constant function that is f on U and 0 otherwise.

                                                      Equations
                                                        Instances For
                                                          @[simp]
                                                          theorem LocallyConstant.mulIndicator_apply {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [One R] {U : Set X} (f : LocallyConstant X R) (hU : IsClopen U) (x : X) :
                                                          (f.mulIndicator hU) x = U.mulIndicator (โ‡‘f) x
                                                          @[simp]
                                                          theorem LocallyConstant.indicator_apply {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [Zero R] {U : Set X} (f : LocallyConstant X R) (hU : IsClopen U) (x : X) :
                                                          (f.indicator hU) x = U.indicator (โ‡‘f) x
                                                          theorem LocallyConstant.mulIndicator_apply_eq_if {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [One R] {U : Set X} (f : LocallyConstant X R) (a : X) (hU : IsClopen U) :
                                                          (f.mulIndicator hU) a = if a โˆˆ U then f a else 1
                                                          theorem LocallyConstant.indicator_apply_eq_if {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [Zero R] {U : Set X} (f : LocallyConstant X R) (a : X) (hU : IsClopen U) :
                                                          (f.indicator hU) a = if a โˆˆ U then f a else 0
                                                          theorem LocallyConstant.mulIndicator_of_mem {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [One R] {U : Set X} (f : LocallyConstant X R) {a : X} (hU : IsClopen U) (h : a โˆˆ U) :
                                                          (f.mulIndicator hU) a = f a
                                                          theorem LocallyConstant.indicator_of_mem {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [Zero R] {U : Set X} (f : LocallyConstant X R) {a : X} (hU : IsClopen U) (h : a โˆˆ U) :
                                                          (f.indicator hU) a = f a
                                                          theorem LocallyConstant.mulIndicator_of_notMem {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [One R] {U : Set X} (f : LocallyConstant X R) {a : X} (hU : IsClopen U) (h : a โˆ‰ U) :
                                                          (f.mulIndicator hU) a = 1
                                                          theorem LocallyConstant.indicator_of_notMem {X : Type u_1} [TopologicalSpace X] {R : Type u_5} [Zero R] {U : Set X} (f : LocallyConstant X R) {a : X} (hU : IsClopen U) (h : a โˆ‰ U) :
                                                          (f.indicator hU) a = 0

                                                          The equivalence between LocallyConstant X Z and LocallyConstant Y Z given a homeomorphism X โ‰ƒโ‚œ Y

                                                          Equations
                                                            Instances For
                                                              @[simp]
                                                              theorem LocallyConstant.congrLeft_apply {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] (e : X โ‰ƒโ‚œ Y) (g : LocallyConstant X Z) :
                                                              (congrLeft e) g = comap (โ†‘e.symm) g
                                                              @[simp]
                                                              theorem LocallyConstant.congrLeft_symm_apply {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] [TopologicalSpace Y] (e : X โ‰ƒโ‚œ Y) (g : LocallyConstant Y Z) :
                                                              (congrLeft e).symm g = comap (โ†‘e) g

                                                              The equivalence between LocallyConstant X Y and LocallyConstant X Z given an equivalence Y โ‰ƒ Z

                                                              Equations
                                                                Instances For
                                                                  @[simp]
                                                                  theorem LocallyConstant.congrRight_symm_apply {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] (e : Y โ‰ƒ Z) (g : LocallyConstant X Z) :
                                                                  (congrRight e).symm g = map (โ‡‘e.symm) g
                                                                  @[simp]
                                                                  theorem LocallyConstant.congrRight_apply {X : Type u_1} {Y : Type u_2} {Z : Type u_3} [TopologicalSpace X] (e : Y โ‰ƒ Z) (g : LocallyConstant X Y) :
                                                                  (congrRight e) g = map (โ‡‘e) g

                                                                  The set of clopen subsets of a topological space is equivalent to the locally constant maps to a two-element set

                                                                  Equations
                                                                    Instances For
                                                                      def LocallyConstant.piecewise {X : Type u_1} {Z : Type u_3} [TopologicalSpace X] {Cโ‚ Cโ‚‚ : Set X} (hโ‚ : IsClosed Cโ‚) (hโ‚‚ : IsClosed Cโ‚‚) (h : Cโ‚ โˆช Cโ‚‚ = Set.univ) (f : LocallyConstant (โ†‘Cโ‚) Z) (g : LocallyConstant (โ†‘Cโ‚‚) Z) (hfg : โˆ€ (x : X) (hx : x โˆˆ Cโ‚ โˆฉ Cโ‚‚), f โŸจx, โ‹ฏโŸฉ = g โŸจx, โ‹ฏโŸฉ) [DecidablePred fun (x : X) => x โˆˆ Cโ‚] :

                                                                      Given two closed sets covering a topological space, and locally constant maps on these two sets, then if these two locally constant maps agree on the intersection, we get a piecewise defined locally constant map on the whole space.

                                                                      TODO: Generalise this construction to ContinuousMap.

                                                                      Equations
                                                                        Instances For
                                                                          @[simp]
                                                                          theorem LocallyConstant.piecewise_apply_left {X : Type u_1} {Z : Type u_3} [TopologicalSpace X] {Cโ‚ Cโ‚‚ : Set X} (hโ‚ : IsClosed Cโ‚) (hโ‚‚ : IsClosed Cโ‚‚) (h : Cโ‚ โˆช Cโ‚‚ = Set.univ) (f : LocallyConstant (โ†‘Cโ‚) Z) (g : LocallyConstant (โ†‘Cโ‚‚) Z) (hfg : โˆ€ (x : X) (hx : x โˆˆ Cโ‚ โˆฉ Cโ‚‚), f โŸจx, โ‹ฏโŸฉ = g โŸจx, โ‹ฏโŸฉ) [DecidablePred fun (x : X) => x โˆˆ Cโ‚] (x : X) (hx : x โˆˆ Cโ‚) :
                                                                          (piecewise hโ‚ hโ‚‚ h f g hfg) x = f โŸจx, hxโŸฉ
                                                                          @[simp]
                                                                          theorem LocallyConstant.piecewise_apply_right {X : Type u_1} {Z : Type u_3} [TopologicalSpace X] {Cโ‚ Cโ‚‚ : Set X} (hโ‚ : IsClosed Cโ‚) (hโ‚‚ : IsClosed Cโ‚‚) (h : Cโ‚ โˆช Cโ‚‚ = Set.univ) (f : LocallyConstant (โ†‘Cโ‚) Z) (g : LocallyConstant (โ†‘Cโ‚‚) Z) (hfg : โˆ€ (x : X) (hx : x โˆˆ Cโ‚ โˆฉ Cโ‚‚), f โŸจx, โ‹ฏโŸฉ = g โŸจx, โ‹ฏโŸฉ) [DecidablePred fun (x : X) => x โˆˆ Cโ‚] (x : X) (hx : x โˆˆ Cโ‚‚) :
                                                                          (piecewise hโ‚ hโ‚‚ h f g hfg) x = g โŸจx, hxโŸฉ
                                                                          def LocallyConstant.piecewise' {X : Type u_1} {Z : Type u_3} [TopologicalSpace X] {Cโ‚€ Cโ‚ Cโ‚‚ : Set X} (hโ‚€ : Cโ‚€ โІ Cโ‚ โˆช Cโ‚‚) (hโ‚ : IsClosed Cโ‚) (hโ‚‚ : IsClosed Cโ‚‚) (fโ‚ : LocallyConstant (โ†‘Cโ‚) Z) (fโ‚‚ : LocallyConstant (โ†‘Cโ‚‚) Z) [DecidablePred fun (x : X) => x โˆˆ Cโ‚] (hf : โˆ€ (x : X) (hx : x โˆˆ Cโ‚ โˆฉ Cโ‚‚), fโ‚ โŸจx, โ‹ฏโŸฉ = fโ‚‚ โŸจx, โ‹ฏโŸฉ) :
                                                                          LocallyConstant (โ†‘Cโ‚€) Z

                                                                          A variant of LocallyConstant.piecewise where the two closed sets cover a subset.

                                                                          TODO: Generalise this construction to ContinuousMap.

                                                                          Equations
                                                                            Instances For
                                                                              @[simp]
                                                                              theorem LocallyConstant.piecewise'_apply_left {X : Type u_1} {Z : Type u_3} [TopologicalSpace X] {Cโ‚€ Cโ‚ Cโ‚‚ : Set X} (hโ‚€ : Cโ‚€ โІ Cโ‚ โˆช Cโ‚‚) (hโ‚ : IsClosed Cโ‚) (hโ‚‚ : IsClosed Cโ‚‚) (fโ‚ : LocallyConstant (โ†‘Cโ‚) Z) (fโ‚‚ : LocallyConstant (โ†‘Cโ‚‚) Z) [DecidablePred fun (x : X) => x โˆˆ Cโ‚] (hf : โˆ€ (x : X) (hx : x โˆˆ Cโ‚ โˆฉ Cโ‚‚), fโ‚ โŸจx, โ‹ฏโŸฉ = fโ‚‚ โŸจx, โ‹ฏโŸฉ) (x : โ†‘Cโ‚€) (hx : โ†‘x โˆˆ Cโ‚) :
                                                                              (piecewise' hโ‚€ hโ‚ hโ‚‚ fโ‚ fโ‚‚ hf) x = fโ‚ โŸจโ†‘x, hxโŸฉ
                                                                              @[simp]
                                                                              theorem LocallyConstant.piecewise'_apply_right {X : Type u_1} {Z : Type u_3} [TopologicalSpace X] {Cโ‚€ Cโ‚ Cโ‚‚ : Set X} (hโ‚€ : Cโ‚€ โІ Cโ‚ โˆช Cโ‚‚) (hโ‚ : IsClosed Cโ‚) (hโ‚‚ : IsClosed Cโ‚‚) (fโ‚ : LocallyConstant (โ†‘Cโ‚) Z) (fโ‚‚ : LocallyConstant (โ†‘Cโ‚‚) Z) [DecidablePred fun (x : X) => x โˆˆ Cโ‚] (hf : โˆ€ (x : X) (hx : x โˆˆ Cโ‚ โˆฉ Cโ‚‚), fโ‚ โŸจx, โ‹ฏโŸฉ = fโ‚‚ โŸจx, โ‹ฏโŸฉ) (x : โ†‘Cโ‚€) (hx : โ†‘x โˆˆ Cโ‚‚) :
                                                                              (piecewise' hโ‚€ hโ‚ hโ‚‚ fโ‚ fโ‚‚ hf) x = fโ‚‚ โŸจโ†‘x, hxโŸฉ