Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  Distribution.lean   Sprache: Lean

 

/-
Copyright (c) 2025 Anatole Dedecker. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anatole Dedecker, Luigi Massacci
-/

module

public import Mathlib.Analysis.Distribution.TestFunction
public import Mathlib.Topology.Algebra.Module.Spaces.CompactConvergenceCLM

import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff

/-!
# Distributions

Let `E` be a real **finite-dimensional normed space**, `Ω` an open subset of `E`,
and `F` a real **locally convex topological vector space**.

An **`F`-valued distribution on `Ω`** is a continuous `ℝ`-linear map `T : ��(Ω, ℝ) →L[ℝ] F`,
defined on the space `��(Ω, ℝ)` of real-valued test functions, and taking values in `F`.
In particular, if `��` is an `RCLike` field, `��'(Ω, ��)` is the usual notion of real or complex
distribution on `Ω`.

We denote the space of `F`-valued distributions on `Ω` by `��'(Ω, F)`. Topologically,
it is defined as `��(Ω, ℝ) →L_c[ℝ] F`, meaning that we endow it with the topology of uniform
convergence on compact subsets of `��(Ω, ℝ)`. In this particular case, this happens to coincide
with the topology of `��(Ω, ℝ) →L[ℝ] F`, namely that of uniform convergence on bounded subsets.
See the implementation notes below for more details.

Right now, this file contains very few mathematical statements.
The theory will be expanded in future PRs.

## Main Declarations

* `��'^{n}(Ω, F) = Distribution Ω F n` is the space of `F`-valued distributions on `Ω` with
  order at most `n`. See the implementation notes below for more information about the parameter
  `n : ℕ∞`; in most cases you want to use the space `��'(Ω, F) = Distribution Ω F ⊤`.
* `Distribution.mapCLM`: any continuous linear map `A : F →L[ℝ] G` induces a continuous linear
  map `��'(Ω, F) →L[ℝ] ��'(Ω, G)`. On locally integrable functions, this corresponds to applying `A`
  pointwise.
* `Distribution.ofFun Ω f μ n`: the distribution induced by a function `f : E → F`,
  sending a test function `φ` to `∫ x, φ x • f x ∂μ`. This is the zero map if
  `f` is not locally integrable on `Ω`.

## Notation

In the `Distributions` scope, we introduce the following notations:
* `��'^{n}(Ω, F)`: the space of `F`-valued distributions on the open set `Ω` with order at most
  `n : ℕ∞`.
* `��'(Ω, F)`: the space of `F`-valued distributions on the open set `Ω`, i.e `��'^{⊤}(Ω, F)`.

Note that the parameter `n` here lives in `ℕ∞`, unlike the parameter for `ContDiff` which lives
in `WithTop ℕ∞` (to incorporate analytic functions). This means that we can't use the notation
`∞` introduced for `ContDiff` for our regularity, because it denotes an element of `WithTop ℕ∞`.
We could introduce another notation `∞` for `⊤ : ℕ∞`, but we believe it would be confusing.

## Implementation Notes

### `abbrev` or `def`

At this point in time, it is not clear whether we should enforce a separation between the API
for `��'(Ω, F)` and the more generic API about `��(Ω, ℝ) →L_c[ℝ] F`.
For now, we have made the "default" choice to implement `Distribution` as an `abbrev`, which means
that we get a lot of instances for free, but also that there is no such separation of APIs.

If this happens to be a bad decision, which will become clear while developing the theory,
do not hesitate to refactor to a `def` instead.

### Vector-valued distributions

The theory of vector-valued distributions is not as well-known as its scalar-valued analog. The
definition we choose is studied in
[L. Schwartz, *Théorie des distributions à valeurs vectorielles*][schwartz1957].

Let us give two examples of how we plan to use this level of generality:
* In the short term, this will allow us to define the *Fréchet derivative* of a distribution,
  as a continuous linear map `��'(Ω, F) →L[ℝ] ��'(Ω, E →L[ℝ] F)`. Note that, even if `F = ℝ`,
  the derivative is naturally vector-valued.
* On a longer timescale, we should aim to prove the
  [Schwartz Kernel Theorem](https://en.wikipedia.org/wiki/Schwartz_kernel_theorem), which is
  formulated nicely in terms of vector-valued distributions. Indeed, it says precisely that one
  can (algebraically, at least) identify the spaces `��'(Ω₁ ×ˢ Ω₂, ℝ)` and `��'(Ω₁, ��'(Ω₂, ℝ))`.

### Choice of scalar field

In the literature, it is common to define complex-valued distributions as continuous `ℂ`-linear
forms `T : ��(Ω, ℂ) →L[ℂ] ℂ`. We use `��(Ω, ℝ) →L[ℝ] ℂ` instead, that is, we only ever test
against *real-valued* test functions.

This makes no difference mathematically, since `��(Ω, ℂ)` is the complexification of `��(Ω, ℝ)`,
hence there is a topological isomorphism between `��(Ω, ℝ) →L[ℝ] F` and `��(Ω, ℂ) →L[ℂ] F`
whenever `F` is a complex vector space.

We choose this definition because it avoids adding a base field as an extra parameter.
Instead, we use the generality of vector-valued distributions to our advantage: a complex-valued
distribution is nothing more than a distribution taking values in the real vector-space `ℂ`.

### Order of distributions

Based on established practice in the literature, a natural way to express the order of a
distribution would be to introduce a predicate `Distribution.HasOrderAtMost` on the space of all
distributions. Here though, we define a separate space `��'^{n}(Ω, F)` whose elements are precisely
distributions of order at most `n`.

This is not incompatible with the predicate approach: in fact, we think that such a predicate
should eventually become the primary interface for the order of a distribution. However, we believe
that being able to talk about the space `��'^{n}(Ω, F)` is also quite important, for the following
reasons:
* if `T : ��'(Ω,F)` is a distribution whose order is at most `n`, it is natural to test it against
  a `C^n` test function (especially if `n = 0`). This means that we naturally want to consider its
  extension `T'` as an element of `��'^{n}(Ω, F)`.
* it is often quite easy to keep track of the regularities while *defining* an operation on
  distributions (e. g. differentiation). On the other hand, once you have defined an operation on
  `��'^(Ω, F)`, it can be quite painful to study its relation to order *a posteriori*.

Note that the topology on `��'^{n}(Ω, F)` has no reason to be the subspace topology coming from
`��'(Ω, F)`.

### Choice of topology

Our choice of the compact convergence topology on `��'^{n}(Ω, F)` follows
[L. Schwartz, *Théorie des distributions à valeurs vectorielles*, §2, p. 49][schwartz1957].

Note that, since `��(Ω, ℝ)` is a Montel space, the topology on `��'(Ω, F)` is also that of
bounded convergence. Hence, our definition also agrees with
[L. Schwartz, *Théorie des distributions*, Chapitre III, §3][schwartz1950].

When `n` is finite, however, `��^{n}(Ω, ℝ)` is no longer a Montel space
(see [L. Schwartz, *Théorie des distributions*, Chapitre III, §2, p. 71][schwartz1950]), hence
these two topologies have no reason to be the same. Schwartz uses compact convergence as a default
(see [L. Schwartz, *Théorie des distributions à valeurs vectorielles*, §2, p. 50][schwartz1957]),
which we follow here.

Finally, note that a **sequence** of distributions converges in `��'(Ω, F)` if and only if it
converges pointwise
(see [L. Schwartz, *Théorie des distributions*, Chapitre III, §3, Théorème XIII][schwartz1950]).
Due to this fact, some texts endow `��'(Ω, F)` with the pointwise convergence topology. While this
gives the same converging sequences as the topology of bounded/compact convergence, this is no
longer true for general filters.

## References

* [L. Schwartz, *Théorie des distributions*][schwartz1950]
* [L. Schwartz, *Théorie des distributions à valeurs vectorielles*][schwartz1957]
* [L. Hörmander, *The Analysis of Linear Partial Differential Operators I*][hormander2003]
-/


@[expose] public section

open Set TopologicalSpace
open scoped Distributions CompactConvergenceCLM

variable
  {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {Ω : Opens E}
  {F : Type*} [AddCommGroup F] [Module ℝ F] [TopologicalSpace F]
  {F' : Type*} [AddCommGroup F'] [Module ℝ F'] [TopologicalSpace F']
  {n k : ℕ∞}

-- TODO: def or abbrev?
variable (Ω F n) in
/-- `��'^{n}(Ω, F) = Distribution Ω F n` is the space of `F`-valued distributions on `Ω` with
order at most `n`.

In most cases you want to use the space `��'(Ω, F) = Distribution Ω F ⊤`. -/

abbrev Distribution := ��^{n}(Ω, ℝ) →L_c[ℝ] F

/-- We denote `��'^{n}(Ω, F)` the space of `F`-valued distributions on `Ω` with order at most
`n : ℕ∞`. Note that using `��'` is a bit abusive since this is no longer a dual space unless
`F = ��`. -/

scoped[Distributions] notation "��'^{" n "}(" Ω ", " F ")" => Distribution Ω F n

/-- We denote `��'(Ω, F)` the space of `F`-valued distributions on `Ω`. Note that using `��'`
is a bit abusive since this is no longer a dual space unless `F = ��`. -/

scoped[Distributions] notation "��'(" Ω ", " F ")" => Distribution Ω F ⊤

variable [IsTopologicalAddGroup F] [ContinuousSMul ℝ F]
variable [IsTopologicalAddGroup F'] [ContinuousSMul ℝ F']

namespace Distribution

section mapCLM
-- TODO: generalize this section to `��` linear maps (or even semilinear maps)
-- by generalizing `ContinuousLinearMap.postcompCompactConvergenceCLM`

/-- Any continuous linear map `A : F →L[ℝ] G` induces a continuous linear map
`��'(Ω, F) →L[ℝ] ��'(Ω, G)`. On locally integrable functions, this corresponds to applying `A`
pointwise. -/

noncomputable def mapCLM (A : F →L[ℝ] F') : ��'^{n}(Ω, F) →L[ℝ] ��'^{n}(Ω, F') :=
  A.postcompCompactConvergenceCLM _

@[simp]
lemma mapCLM_apply {A : F →L[ℝ] F'} {T : ��'^{n}(Ω, F)} {f : ��^{n}(Ω, ℝ)} :
    mapCLM A T f = A (T f) := rfl

end mapCLM

section DiracDelta

/-- The Dirac delta distribution. This is zero if `x` does not belong to `Ω`. -/
@[wikidata Q209675]
noncomputable def delta (x : E) : ��'^{n}(Ω, ℝ) where
  toFun f := f x
  map_add' _ _ := rfl
  map_smul' _ _ := rfl
  cont := continuous_eval_const _

@[simp]
theorem delta_apply (x : E) (f : ��^{n}(Ω, ℝ)) : delta x f = f x := by
  rfl

@[simp]
theorem delta_eq_zero_of_notMem (x : E) (hx : x ∉ Ω) : (delta x : ��'^{n}(Ω, ℝ)) = 0 := by
  ext f
  change f x = 0
  have hx_support : x ∉ tsupport f := by
    intro hx_mem
    exact hx (f.tsupport_subset hx_mem)
  exact image_eq_zero_of_notMem_tsupport hx_support

end DiracDelta

section LineDerivCLM
-- TODO: generalize this section to `��` linearity
-- by generalizing `ContinuousLinearMap.precompCompactConvergenceCLM`

/-- `lineDerivCLM �� v` is the continuous `��`-linear-map sending a distribution
`T : ��'^{k}_{K}(E, F)` to its derivative along the vector `v`, which is a
distribution in `��^{n}_{K}(E, F)`. Because differentiating increases the order, this only makes
sense if `k + 1 ≤ n`, otherwise we define it as the zero map.

The parameters `n` and `k` are implicit as they can often be inferred from context, or
specified by a type ascription. For `n = k = ⊤`, we also provide instances of the `LineDeriv`
notation typeclass. -/

noncomputable def lineDerivCLM (v : E) :
    ��'^{k}(Ω, F) →L[ℝ] ��'^{n}(Ω, F) :=
  - (TestFunction.lineDerivCLM ℝ v).precompCompactConvergenceCLM _

lemma lineDerivCLM_apply {v : E} {T : ��'^{k}(Ω, F)} {f : ��^{n}(Ω, ℝ)} :
    lineDerivCLM v T f = - T (TestFunction.lineDerivCLM ℝ v f) :=
  rfl

lemma lineDerivCLM_add {v₁ v₂ : E} :
    (lineDerivCLM (v₁ + v₂) : ��'^{k}(Ω, F) →L[ℝ] ��'^{n}(Ω, F)) =
      lineDerivCLM v₁ + lineDerivCLM v₂ := by
  ext T f
  simp [lineDerivCLM_apply, TestFunction.lineDerivCLM_add, neg_add, -neg_add_rev]

lemma lineDerivCLM_smul {c : ℝ} {v : E} :
    (lineDerivCLM (c • v) : ��'^{k}(Ω, F) →L[ℝ] ��'^{n}(Ω, F)) =
      c • lineDerivCLM v := by
  ext T f
  simp [lineDerivCLM_apply, TestFunction.lineDerivCLM_smul]

open LineDeriv

/-- Note: we cannot express the full generality of `lineDerivCLM` purely in terms of this typeclass,
because (by design) the target type `��^{k}_{K}(E, F)` is not determined by the input type
`��^{n}_{K}(E, F)`. -/

noncomputable instance : LineDeriv E ��'(Ω, F) ��'(Ω, F) where
  lineDerivOp v := lineDerivCLM v

variable (��) in
lemma lineDerivOp_eq_lineDerivCLM {v : E} {T : ��'(Ω, F)} :
    ∂_{v} T = lineDerivCLM v T :=
  rfl

@[simp]
theorem lineDerivOp_apply_apply (f : ��'(Ω, F)) (g : ��(Ω, ℝ)) (m : E) :
    ∂_{m} f g = f (- ∂_{m} g) := by
  rw [map_neg]; rfl

noncomputable instance : LineDerivAdd E ��'(Ω, F) ��'(Ω, F) where
  lineDerivOp_add v := map_add (lineDerivCLM v)
  lineDerivOp_left_add _ _ T := congr($lineDerivCLM_add T)

noncomputable instance : LineDerivSMul ℝ E ��'(Ω, F) ��'(Ω, F) where
  lineDerivOp_smul v := map_smul (lineDerivCLM v)

noncomputable instance : LineDerivLeftSMul ℝ E ��'(Ω, F) ��'(Ω, F) where
  lineDerivOp_left_smul _ _ T := congr($lineDerivCLM_smul T)

noncomputable instance : ContinuousLineDeriv E ��'(Ω, F) ��'(Ω, F) where
  continuous_lineDerivOp v := (lineDerivCLM v).continuous

lemma lineDerivOpCLM_eq_lineDerivCLM {v : E} :
    lineDerivOpCLM ℝ ��'(Ω, F) v = lineDerivCLM v :=
  rfl

end LineDerivCLM

section ofFun

open MeasureTheory

variable [MeasurableSpace E] [OpensMeasurableSpace E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]

variable (Ω) in
/-- The distribution induced by a function `f : E → F` and a measure `μ`,
sending a test function `φ` to `∫ x, φ x • f x ∂μ`. This is the zero map if `f` is not locally
integrable on `Ω`. -/

noncomputable def ofFun (f : E → F) (μ : Measure E := by volume_tac) (n : ℕ∞) :
    ��'^{n}(Ω, F) :=
  TestFunction.integralAgainstBilinCLM (ContinuousLinearMap.lsmul ℝ ℝ) μ f

theorem ofFun_apply {f : E → F} {μ : Measure E} (hf : LocallyIntegrableOn f Ω μ)
    {φ : ��^{n}(Ω, ℝ)} :
    ofFun Ω f μ n φ = ∫ x, φ x • f x ∂μ :=
  TestFunction.integralAgainstBilinCLM_eq_integral hf

theorem ofFun_eq_zero {f : E → F} {μ : Measure E}
    (hf : ¬ LocallyIntegrableOn f Ω μ) : ofFun Ω f μ n = 0 :=
  TestFunction.integralAgainstBilinCLM_eq_zero hf

open Classical in
@[grind =]
theorem ofFun_apply_eq_ite {f : E → F} {μ : Measure E} {φ : ��^{n}(Ω, ℝ)} :
    ofFun Ω f μ n φ = if LocallyIntegrableOn f Ω μ then ∫ x, φ x • f x ∂μ else 0 := by
  grind [ofFun_eq_zero, ofFun_apply]

@[simp, grind =]
theorem ofFun_zero {μ : Measure E} : ofFun Ω (0 : E → F) μ n = 0 := by
  have h0 : LocallyIntegrableOn (0 : E → F) Ω μ := locallyIntegrableOn_zero
  ext; simp [ofFun_apply h0]

theorem ofFun_congr_ae {f f' : E → F} {μ : Measure E} (h : f =ᵐ[μ.restrict Ω] f') :
    ofFun Ω f μ n = ofFun Ω f' μ n := by
  ext φ
  by_cases hf : LocallyIntegrableOn f Ω μ
  · have hf' : LocallyIntegrableOn f' Ω μ := hf.congr h
    rw [ofFun_apply hf, ofFun_apply hf']
    have h' : ∀ x ∉ Ω, φ x • f x = 0 ∧ φ x • f' x = 0 := fun x hx ↦ by simp [φ.zero_on_compl hx]
    obtain ⟨h₁, h₂⟩ := forall₂_and.mp h'
    rw [← setIntegral_eq_integral_of_ae_compl_eq_zero (.of_forall h₁),
      ← setIntegral_eq_integral_of_ae_compl_eq_zero (.of_forall h₂)]
    refine integral_congr_ae <| ae_eq_rfl.smul h
  · grind [locallyIntegrableOn_congr]

@[simp]
theorem ofFun_add {f g : E → F} {μ : Measure E}
    (hf : LocallyIntegrableOn f Ω μ) (hg : LocallyIntegrableOn g Ω μ) :
    ofFun Ω (f + g) μ n = ofFun Ω f μ n + ofFun Ω g μ n := by
  ext φ
  rw [add_apply, ofFun_apply hf, ofFun_apply hg,
    ofFun_apply (hf.add hg),
    ← integral_add (φ.integrable_smul hf) (φ.integrable_smul hg)]
  simp

@[simp]
theorem ofFun_neg {f : E → F} {μ : Measure E} :
    ofFun Ω (-f) μ n = -ofFun Ω f μ n := by
  by_cases hf : LocallyIntegrableOn f Ω μ
  · ext; simp [ofFun_apply hf, ofFun_apply hf.neg, integral_neg]
  · rw [ofFun_eq_zero hf, ofFun_eq_zero (by simpa), neg_zero]

@[simp]
theorem ofFun_smul {f : E → F} {μ : Measure E} (c : ℝ) :
    ofFun Ω (c • f) μ n = c • ofFun Ω f μ n := by
  ext φ
  by_cases hf : LocallyIntegrableOn f Ω μ
  · rw [ofFun_apply (hf.smul c), smul_apply, ofFun_apply hf, ← integral_smul]
    refine integral_congr_ae (ae_of_all _ fun x ↦ ?_)
    simp [smul_comm c]
  · grind [zero_smul, locallyIntegrableOn_smul_iff, smul_zero]

@[simp] theorem ofFun_dirac_eq_delta (x : E) :
    ofFun Ω (1 : E → ℝ) (Measure.dirac x) n = delta x := by
  ext; simp [ofFun_apply_eq_ite, Pi.one_def, locallyIntegrableOn_const]

variable [BorelSpace E] [FiniteDimensional ℝ E] [CompleteSpace F]

theorem ofFun_injective {f f' : E → F} {μ : Measure E}
    (hf : LocallyIntegrableOn f Ω μ) (hf' : LocallyIntegrableOn f' Ω μ)
    (h : ofFun Ω f μ n = ofFun Ω f' μ n) :
    f =ᵐ[μ.restrict Ω] f' := by
  suffices h' : ∀ᵐ x ∂μ, x ∈ Ω → (f - f') x = 0 by
    rw [← sub_ae_eq_zero]
    exact (ae_restrict_iff' Ω.isOpen.measurableSet).mpr h'
  refine Ω.isOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero (hf.sub hf')
    fun g g_diff g_compact g_tsupp ↦ ?_
  let φ : ��^{n}(Ω, ℝ) := ⟨g, g_diff.of_le (mod_cast le_top), g_compact, g_tsupp⟩
  have : ∫ x, φ x • (f - f') x ∂μ = 0:= by
    simp_rw [Pi.sub_apply, smul_sub]
    rw [integral_sub (φ.integrable_smul hf) (φ.integrable_smul hf'), sub_eq_zero]
    rw [← ofFun_apply hf, ← ofFun_apply hf', h]
  congr

end ofFun

end Distribution

Messung
CHZG
9410010097

¤ Dauer der Verarbeitung: 0.34 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,114
#Domains=863,575