Documentation

Mathlib.Topology.LocallyFinsupp

Type of functions with locally finite support #

This file defines functions with locally finite support, provides supporting API. For suitable targets, it establishes functions with locally finite support as an instance of a lattice ordered commutative group.

Throughout the present file, X denotes a topologically space and U a subset of X.

Definition, coercion to functions and basic extensionality lemmas #

A function with locally finite support within U is a function X โ†’ Y whose support is locally finite within U and entirely contained in U. For T1-spaces, the theorem supportDiscreteWithin_iff_locallyFiniteWithin shows that the first condition is equivalent to the condition that the support f is discrete within U.

structure Function.locallyFinsuppWithin {X : Type u_1} [TopologicalSpace X] (U : Set X) (Y : Type u_2) [Zero Y] :
Type (max u_1 u_2)

A function with locally finite support within U is a triple as specified below.

  • toFun : X โ†’ Y

    A function X โ†’ Y

  • supportWithinDomain' : Function.support self.toFun โІ U

    A proof that the support of toFun is contained in U

  • supportLocallyFiniteWithinDomain' (z : X) : z โˆˆ U โ†’ โˆƒ t โˆˆ nhds z, (t โˆฉ Function.support self.toFun).Finite

    A proof that the support is locally finite within U

Instances For
    @[reducible, inline]
    abbrev Function.locallyFinsupp (X : Type u_1) [TopologicalSpace X] (Y : Type u_2) [Zero Y] :
    Type (max u_1 u_2)

    A function with locally finite support is a function with locally finite support within โŠค : Set X.

    Instances For
      @[implicit_reducible]
      instance instZeroLocallyFinsuppWithin {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] :

      Function with locally finite support have a zero.

      theorem supportDiscreteWithin_iff_locallyFiniteWithin {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [T1Space X] [Zero Y] {f : X โ†’ Y} (h : Function.support f โІ U) :
      f =แถ [Filter.codiscreteWithin U] 0 โ†” โˆ€ z โˆˆ U, โˆƒ t โˆˆ nhds z, (t โˆฉ Function.support f).Finite

      For T1 spaces, the condition supportLocallyFiniteWithinDomain' is equivalent to saying that the support is codiscrete within U.

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

      A function f : X โ†’ Y has locally finite support if for every z : X, there is a neighbourhood t around z such that t โˆฉ f.support is finite.

      Instances For
        theorem LocallyFiniteSupport.iff_locallyFinite_support {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [Zero Y] (f : X โ†’ Y) :
        (LocallyFinite fun (s : โ†‘(Function.support f)) => {โ†‘s}) โ†” LocallyFiniteSupport f
        theorem LocallyFiniteSupport.locallyFinite_support {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [Zero Y] (f : X โ†’ Y) (h : LocallyFiniteSupport f) :
        LocallyFinite fun (s : โ†‘(Function.support f)) => {โ†‘s}
        theorem LocallyFiniteSupport.finite_inter_support_of_isCompact {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} {W : Set X} [Zero Y] {f : X โ†’ Y} (h : LocallyFiniteSupport f) (hW : IsCompact W) :
        (W โˆฉ Function.support f).Finite
        @[implicit_reducible]
        instance Function.locallyFinsuppWithin.instFunLike {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] :

        Functions with locally finite support within U are FunLike: the coercion to functions is injective.

        @[reducible, inline]
        abbrev Function.locallyFinsuppWithin.support {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] (D : locallyFinsuppWithin U Y) :
        Set X

        This allows writing D.support instead of Function.support D

        Instances For
          theorem Function.locallyFinsuppWithin.supportLocallyFiniteWithinDomain {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] (D : locallyFinsuppWithin U Y) (z : X) :
          z โˆˆ U โ†’ โˆƒ t โˆˆ nhds z, (t โˆฉ D.support).Finite
          theorem Function.locallyFinsuppWithin.ext {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] {Dโ‚ Dโ‚‚ : locallyFinsuppWithin U Y} (h : โˆ€ (a : X), Dโ‚ a = Dโ‚‚ a) :
          Dโ‚ = Dโ‚‚
          theorem Function.locallyFinsuppWithin.ext_iff {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] {Dโ‚ Dโ‚‚ : locallyFinsuppWithin U Y} :
          Dโ‚ = Dโ‚‚ โ†” โˆ€ (a : X), Dโ‚ a = Dโ‚‚ a
          theorem Function.locallyFinsuppWithin.coe_injective {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] :
          Injective fun (x : locallyFinsuppWithin U Y) => โ‡‘x

          Singleton Indicators as Functions with Locally Finite Support #

          noncomputable def Function.locallyFinsuppWithin.single {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [DecidableEq X] [Zero Y] (x : X) (y : Y) :

          Is analogy to Finsupp.single, this definition presents the indicator function of a single point as a function with locally finite support.

          Instances For
            @[simp]
            theorem Function.locallyFinsuppWithin.single_apply {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [DecidableEq X] [Zero Y] {xโ‚ xโ‚‚ : X} {y : Y} :
            (single xโ‚ y) xโ‚‚ = if xโ‚‚ = xโ‚ then y else 0

            Simplifier lemma: single x y takes the value y at x and is zero otherwise.

            @[simp]
            theorem Function.locallyFinsuppWithin.single_zero {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [DecidableEq X] [Zero Y] {x : X} :
            single x 0 = 0

            Simplifier lemma: single x 0 is zero.

            @[simp]
            theorem Function.locallyFinsuppWithin.coe_single {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [DecidableEq X] [Zero Y] {x : X} {y : Y} :
            โ‡‘(single x y) = Pi.single x y

            Simplifier lemma: coercion of single x y to a function.

            Elementary properties of the support #

            @[simp]
            theorem Function.locallyFinsuppWithin.apply_eq_zero_of_notMem {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] {z : X} (D : locallyFinsuppWithin U Y) (hz : z โˆ‰ U) :
            D z = 0

            Simplifier lemma: Functions with locally finite support within U evaluate to zero outside of U.

            On a T1 space, the support of a function with locally finite support within U is discrete within U.

            On a T1 space, the support of a function with locally finite support within U is discrete.

            theorem Function.locallyFinsuppWithin.closedSupport {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [T1Space X] [Zero Y] (D : locallyFinsuppWithin U Y) (hU : IsClosed U) :

            If X is T1 and if U is closed, then the support of support of a function with locally finite support within U is also closed.

            theorem Function.locallyFinsuppWithin.finiteSupport {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [T2Space X] [Zero Y] (D : locallyFinsuppWithin U Y) (hU : IsCompact U) :

            If X is T2 and if U is compact, then the support of a function with locally finite support within U is finite.

            Lattice ordered group structure #

            If X is a suitable instance, this section equips functions with locally finite support within U with the standard structure of a lattice ordered group, where addition, comparison, min and max are defined pointwise.

            def Function.locallyFinsuppWithin.addSubmonoid {X : Type u_1} [TopologicalSpace X] (U : Set X) {Y : Type u_2} [AddMonoid Y] :
            AddSubmonoid (X โ†’ Y)

            Functions with locally finite support within U form an additive submonoid of functions X โ†’ Y.

            Instances For
              def Function.locallyFinsuppWithin.addSubgroup {X : Type u_1} [TopologicalSpace X] (U : Set X) {Y : Type u_2} [AddGroup Y] :
              AddSubgroup (X โ†’ Y)

              Functions with locally finite support within U form an additive subgroup of functions X โ†’ Y.

              Instances For

                Assign a function with locally finite support within U to a function in the subgroup.

                Instances For
                  @[simp]
                  theorem Function.locallyFinsuppWithin.mk_of_mem_addSubmonoid_toFun {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddMonoid Y] (f : X โ†’ Y) (hf : f โˆˆ locallyFinsuppWithin.addSubmonoid U) (aโœ : X) :
                  (mk_of_mem_addSubmonoid f hf) aโœ = f aโœ
                  @[implicit_reducible]
                  instance Function.locallyFinsuppWithin.instZero {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddMonoid Y] :
                  @[implicit_reducible]
                  instance Function.locallyFinsuppWithin.instAdd {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddMonoid Y] :
                  @[implicit_reducible]
                  instance Function.locallyFinsuppWithin.instSMulNat {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddMonoid Y] :
                  SMul โ„• (locallyFinsuppWithin U Y)

                  Assign a function with locally finite support within U to a function in the subgroup.

                  Instances For
                    @[simp]
                    theorem Function.locallyFinsuppWithin.mk_of_mem_addSubgroup_toFun {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddGroup Y] (f : X โ†’ Y) (hf : f โˆˆ locallyFinsuppWithin.addSubgroup U) (aโœ : X) :
                    (mk_of_mem_addSubgroup f hf) aโœ = f aโœ
                    @[deprecated Function.locallyFinsuppWithin.mk_of_mem_addSubgroup (since := "2026-03-06")]
                    def Function.locallyFinsuppWithin.mk_of_mem {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddGroup Y] (f : X โ†’ Y) (hf : f โˆˆ locallyFinsuppWithin.addSubgroup U) :

                    Alias of Function.locallyFinsuppWithin.mk_of_mem_addSubgroup.


                    Assign a function with locally finite support within U to a function in the subgroup.

                    Instances For
                      @[implicit_reducible]
                      instance Function.locallyFinsuppWithin.instNeg {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddGroup Y] :
                      @[implicit_reducible]
                      instance Function.locallyFinsuppWithin.instSub {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddGroup Y] :
                      @[implicit_reducible]
                      instance Function.locallyFinsuppWithin.instSMulInt {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddGroup Y] :
                      SMul โ„ค (locallyFinsuppWithin U Y)
                      @[simp]
                      theorem Function.locallyFinsuppWithin.coe_zero {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddMonoid Y] :
                      โ‡‘0 = 0
                      @[simp]
                      theorem Function.locallyFinsuppWithin.coe_add {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddMonoid Y] (Dโ‚ Dโ‚‚ : locallyFinsuppWithin U Y) :
                      โ‡‘(Dโ‚ + Dโ‚‚) = โ‡‘Dโ‚ + โ‡‘Dโ‚‚
                      @[simp]
                      theorem Function.locallyFinsuppWithin.coe_neg {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddGroup Y] (D : locallyFinsuppWithin U Y) :
                      โ‡‘(-D) = -โ‡‘D
                      @[simp]
                      theorem Function.locallyFinsuppWithin.coe_sub {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddGroup Y] (Dโ‚ Dโ‚‚ : locallyFinsuppWithin U Y) :
                      โ‡‘(Dโ‚ - Dโ‚‚) = โ‡‘Dโ‚ - โ‡‘Dโ‚‚
                      @[simp]
                      theorem Function.locallyFinsuppWithin.coe_nsmul {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddMonoid Y] (D : locallyFinsuppWithin U Y) (n : โ„•) :
                      โ‡‘(n โ€ข D) = n โ€ข โ‡‘D
                      @[simp]
                      theorem Function.locallyFinsuppWithin.coe_zsmul {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddGroup Y] (D : locallyFinsuppWithin U Y) (n : โ„ค) :
                      โ‡‘(n โ€ข D) = n โ€ข โ‡‘D
                      @[simp]
                      theorem Function.locallyFinsuppWithin.coe_sum {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommMonoid Y] {ฮน : Type u_3} {s : Finset ฮน} {F : ฮน โ†’ locallyFinsuppWithin U Y} :
                      โ‡‘(โˆ‘ n โˆˆ s, F n) = โˆ‘ n โˆˆ s, โ‡‘(F n)
                      @[simp]
                      theorem Function.locallyFinsuppWithin.coe_finsum {X : Type u_1} [TopologicalSpace X] {U : Set X} {ฮน : Type u_3} {F : ฮน โ†’ locallyFinsuppWithin U โ„ค} :
                      โ‡‘(โˆ‘แถ  (i : ฮน), F i) = โˆ‘แถ  (i : ฮน), โ‡‘(F i)
                      @[implicit_reducible]
                      instance Function.locallyFinsuppWithin.instLE {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [LE Y] [Zero Y] :
                      theorem Function.locallyFinsuppWithin.le_def {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [LE Y] [Zero Y] {Dโ‚ Dโ‚‚ : locallyFinsuppWithin U Y} :
                      Dโ‚ โ‰ค Dโ‚‚ โ†” โ‡‘Dโ‚ โ‰ค โ‡‘Dโ‚‚
                      theorem Function.locallyFinsuppWithin.single_nonneg {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [DecidableEq X] [Zero Y] [Preorder Y] {x : X} {y : Y} :
                      0 โ‰ค single x y โ†” 0 โ‰ค y
                      @[implicit_reducible]
                      instance Function.locallyFinsuppWithin.instLTOfPreorder {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Preorder Y] [Zero Y] :
                      theorem Function.locallyFinsuppWithin.lt_def {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Preorder Y] [Zero Y] {Dโ‚ Dโ‚‚ : locallyFinsuppWithin U Y} :
                      Dโ‚ < Dโ‚‚ โ†” โ‡‘Dโ‚ < โ‡‘Dโ‚‚
                      theorem Function.locallyFinsuppWithin.single_pos {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [DecidableEq X] [Zero Y] [Preorder Y] {x : X} {y : Y} :
                      0 < single x y โ†” 0 < y
                      @[simp]
                      theorem Function.locallyFinsuppWithin.single_pos_nat_one {X : Type u_1} [TopologicalSpace X] [DecidableEq X] {x : X} :
                      0 < single x 1
                      @[simp]
                      theorem Function.locallyFinsuppWithin.single_pos_int_one {X : Type u_1} [TopologicalSpace X] [DecidableEq X] {x : X} :
                      0 < single x 1
                      @[implicit_reducible]
                      @[simp]
                      theorem Function.locallyFinsuppWithin.max_apply {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [SemilatticeSup Y] [Zero Y] {Dโ‚ Dโ‚‚ : locallyFinsuppWithin U Y} {x : X} :
                      (Dโ‚ โŠ” Dโ‚‚) x = Dโ‚ x โŠ” Dโ‚‚ x
                      @[implicit_reducible]
                      @[simp]
                      theorem Function.locallyFinsuppWithin.min_apply {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [SemilatticeInf Y] [Zero Y] {Dโ‚ Dโ‚‚ : locallyFinsuppWithin U Y} {x : X} :
                      (Dโ‚ โŠ“ Dโ‚‚) x = Dโ‚ x โŠ“ Dโ‚‚ x
                      @[implicit_reducible]
                      instance Function.locallyFinsuppWithin.instLattice {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Lattice Y] [Zero Y] :

                      Functions with locally finite support within U form an ordered commutative group.

                      theorem Function.locallyFinsuppWithin.posPart_add {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommGroup Y] [LinearOrder Y] [IsOrderedAddMonoid Y] (fโ‚ fโ‚‚ : locallyFinsuppWithin U Y) :
                      (fโ‚ + fโ‚‚)โบ โ‰ค fโ‚โบ + fโ‚‚โบ

                      The positive part of a sum is less than or equal to the sum of the positive parts.

                      theorem Function.locallyFinsuppWithin.negPart_add {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommGroup Y] [LinearOrder Y] [IsOrderedAddMonoid Y] (fโ‚ fโ‚‚ : locallyFinsuppWithin U Y) :
                      (fโ‚ + fโ‚‚)โป โ‰ค fโ‚โป + fโ‚‚โป

                      The negative part of a sum is less than or equal to the sum of the negative parts.

                      @[simp]
                      theorem Function.locallyFinsuppWithin.nsmul_posPart {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommGroup Y] [LinearOrder Y] [IsOrderedAddMonoid Y] (n : โ„•) (f : locallyFinsuppWithin U Y) :
                      (n โ€ข f)โบ = n โ€ข fโบ

                      Taking the positive part of a function with locally finite support commutes with scalar multiplication by a natural number.

                      @[simp]
                      theorem Function.locallyFinsuppWithin.nsmul_negPart {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommGroup Y] [LinearOrder Y] [IsOrderedAddMonoid Y] (n : โ„•) (f : locallyFinsuppWithin U Y) :
                      (n โ€ข f)โป = n โ€ข fโป

                      Taking the negative part of a function with locally finite support commutes with scalar multiplication by a natural number.

                      theorem Function.locallyFinsuppWithin.exists_single_le_pos {X : Type u_1} [TopologicalSpace X] [DecidableEq X] {D : locallyFinsupp X โ„ค} (h : 0 < D) :
                      โˆƒ (e : X), single e 1 โ‰ค D

                      Every positive function with locally finite supports dominates a singleton indicator.

                      Restriction #

                      noncomputable def Function.locallyFinsuppWithin.restrict {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] {V : Set X} (D : locallyFinsuppWithin U Y) (h : V โІ U) :

                      If V is a subset of U, then functions with locally finite support within U restrict to functions with locally finite support within V, by setting their values to zero outside of V.

                      Instances For
                        theorem Function.locallyFinsuppWithin.restrict_apply {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] {V : Set X} (D : locallyFinsuppWithin U Y) (h : V โІ U) (z : X) :
                        (D.restrict h) z = if z โˆˆ V then D z else 0
                        theorem Function.locallyFinsuppWithin.restrict_eqOn {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] {V : Set X} (D : locallyFinsuppWithin U Y) (h : V โІ U) :
                        Set.EqOn (โ‡‘(D.restrict h)) (โ‡‘D) V
                        theorem Function.locallyFinsuppWithin.restrict_eqOn_compl {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [Zero Y] {V : Set X} (D : locallyFinsuppWithin U Y) (h : V โІ U) :
                        Set.EqOn (โ‡‘(D.restrict h)) 0 Vแถœ
                        @[simp]
                        theorem Function.locallyFinsuppWithin.restrict_zero {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [Zero Y] {U V : Set X} (hV : V โІ U) :
                        restrict 0 hV = 0

                        Restriction of the zero function is the zero function.

                        noncomputable def Function.locallyFinsuppWithin.restrictMonoidHom {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommGroup Y] {V : Set X} (h : V โІ U) :

                        Restriction as a group morphism

                        Instances For
                          @[simp]
                          theorem Function.locallyFinsuppWithin.restrictMonoidHom_apply {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommGroup Y] {V : Set X} (D : locallyFinsuppWithin U Y) (h : V โІ U) :
                          @[simp]
                          theorem Function.locallyFinsuppWithin.sum_apply_smul_single_eq_self {X : Type u_1} [TopologicalSpace X] {Y : Type u_2} [DecidableEq X] [AddCommMonoid Y] {U : Set X} {F : locallyFinsuppWithin U Y} (h : F.support.Finite) :
                          โˆ‘แถ  (x : X), restrict (single x (F x)) โ‹ฏ = F

                          Present a function with with finite support as a finsum of singleton indicator functions.

                          noncomputable def Function.locallyFinsuppWithin.restrictLatticeHom {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommGroup Y] [Lattice Y] {V : Set X} (h : V โІ U) :

                          Restriction as a lattice morphism

                          Instances For
                            @[simp]
                            theorem Function.locallyFinsuppWithin.restrictLatticeHom_apply {X : Type u_1} [TopologicalSpace X] {U : Set X} {Y : Type u_2} [AddCommGroup Y] [Lattice Y] {V : Set X} (D : locallyFinsuppWithin U Y) (h : V โІ U) :
                            theorem Function.locallyFinsuppWithin.restrict_posPart {X : Type u_1} [TopologicalSpace X] {U V : Set X} (D : locallyFinsuppWithin U โ„ค) (h : V โІ U) :

                            Restriction commutes with taking positive parts.

                            theorem Function.locallyFinsuppWithin.restrict_negPart {X : Type u_1} [TopologicalSpace X] {U V : Set X} (D : locallyFinsuppWithin U โ„ค) (h : V โІ U) :

                            Restriction commutes with taking negative parts.