Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Lean/Mathlib/Mathlib/Analysis/Normed/Operator/Fredholm/     Datei vom 15.10.2026 mit Größe 29 kB image not shown  

SSL Basic.lean   Sprache: Lean

 

/-
Copyright (c) 2026 Anatole Dedecker. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jon Bannon, Anatole Dedecker, Yongxi Lin, Patrick Massot, Oliver Nash, Filippo A. E. Nuccio
-/

module

public import Mathlib.Algebra.Module.LinearMap.Index
public import Mathlib.Analysis.Normed.Operator.Perturbation.StrictByFinite
public import Mathlib.Topology.Algebra.Module.ContinuousLinearMap.Invertible

/-!
# Fredholm operators between topological vector spaces

Fix `��` a complete `NontriviallyNormedField`, and let `E`, `F` be two Hausdorff topological vector
spaces over `��`.

We say that a continuous linear map `T : E →L[��] F` is a **Fredholm operator** if it satisfies
the following four equivalent conditions:

1. `T` is strict, its range is closed and has finite codimension, and its kernel is (topologically)
  complemented and has finite dimension. This is chosen as the definition, see `IsFredholm`.
2. `T` admits a continuous **quasi-inverse**, in the sense of `LinearMap.IsQuasiInverse`.
3. There are closed finite-codimension subspaces `E₁` and `F₁` of `E` and `F` between which `T`
  induces an isomorphism.
4. `T` admits a `FredholmPackage`: there are topological decompositions `E = E₁ ⊕ E₀`,
  `F = F₁ ⊕ F₀`, where `E₀` and `F₀` are finite dimensional, and an isomorphism `Φ : E₁ ≃L[��] F₁`
  such that `T` is zero on `E₀` and coincides with `Φ` on `E₁`; in other words, in these
  decompositions, `T` is given by the matrix $\begin{pmatrix} Φ & 0 \cr 0 & 0 \end{pmatrix}$.

## Main definitions

* `ContinuousLinearMap.IsFredholm`: a continuous linear map `u : E →L[��] F` is a
  **Fredholm operator** if it is strict, its range is closed and has finite codimension, and its
  kernel is (topologically) complemented and has finite dimension.
* `FredholmDecomposition`: a **Fredholm decomposition** of a topological vector space `E` is the
  data of two subspaces `X₀` and `X₁` which are topological complements, and where `X₀` is finite
  dimensional.
* `ContinuousLinearMap.FredholmPackage`: a **Fredholm package** for `u : E →L[��] F` is the data of
  Fredholm decompositions `decDom` and `decCodom` of `E` and `F` respectively, together with
  a continuous linear equivalence `equiv : decDom.X₁ ≃L[��] decCodom.X₁` between the "essential"
  (i.e. finite codimension) parts of these decompositions, such that `u` equals the composition
  `decCodom.X₁.subtypeL ∘L equiv ∘L decDom.proj`.

Note that the data of a `FredholmPackage` for an operator is morally the strongest of the
equivalent ways to assume that `u` is Fredholm (for example, it is clear how to build a canonical
continuous quasi-inverse of `u` from such a package).

Hence, you should not typically prove that an operator is Fredholm by building a Fredholm package
(consider using `IsFredholm.of_isInvertible_restrict`); instead, when you know that an operator is
Fredholm, you can obtain a `FredholmPackage` from `IsFredholm.nonempty_fredholmPackage`
in order to conveniently use the full strength of Fredholmness.

## Main statements

### Equivalent criteria

* `ContinuousLinearMap.isFredholm_tfae`: the equivalence between conditions 1, 2, 3 and 4 above.
  In practice, most of the interesting directions should be covered by specific API lemmas.
* `ContinuousLinearMap.FredholmPackage.isQuasiInverse`: given a `FredholmPackage` for `u`,
  one can build a canonical continuous quasi-inverse of `u`.
* `ContinuousLinearMap.IsFredholm.of_isInvertible_restrict`: if a continuous linear map induces
  an isomorphism between finite codimension subspaces, then it is Fredholm.
* `ContinuousLinearMap.IsFredholm.of_restrict` is a generalization
  of the above: if a continuous linear map induces a Fredholm operator between finite codimension
  subspaces, then the original map is Fredholm as well.
* `IsFredholm.nonempty_fredholmPackage`: every Fredholm operator admits a Fredholm package.
  This is the primary way to obtain Fredholm packages.

## Implementation details

We largely follow [N. Bourbaki, *Théories Spectrales*, Chapitre III, § 3, n° 2][bourbaki2023],
in particular for the proof of equivalence of the four conditions above.
Here are some notable changes:

* Bourbaki restricts itself to locally convex spaces over `ℝ` or `ℂ`. Yet, under close inspection,
  this assumption plays very little role in the beginning of the theory. In fact, at the very mild
  cost of assuming that the kernel is complemented in the definition of `IsFredholm` (which follows
  from the finiteness assumption if Hahn-Banach is available), we generalize the beginning of the
  theory to topological vector spaces over any complete nontrivially normed field. In particular,
  our theory naturally captures p-adic Fredholm operators.
* Bourbaki chooses the existence of a continuous quasi-inverse as the definition of being Fredholm.
  Our choice differs for a very practical reason: it is much simpler to spell out formally
  "`u` has a continuous quasi-inverse" than "`u` is strict, its range is closed and has finite
  codimension, and its kernel is complemented and has finite dimension". Hence we prefer to give
  a name to the latter.

## References

* [N. Bourbaki, *Théories Spectrales*, Chapitre III, § 3, n° 2][bourbaki2023]
-/

@[expose] public noncomputable section

open Topology Submodule LinearMap Function
open Set (MapsTo)
open LinearMap.FiniteRangeSetoid

namespace ContinuousLinearMap
section TVS

variable {�� E F G : Type*} [NontriviallyNormedField ��]
    [AddCommGroup E] [AddCommGroup F] [AddCommGroup G]
    [Module �� E] [Module �� F] [Module �� G]
    [TopologicalSpace E] [TopologicalSpace F] [TopologicalSpace G]

/-!
## Definition and equivalent conditions
-/


section DefTFAE

section IsFredholm

/-- A continuous linear map `u : E →L[��] F` is a **Fredholm operator** if it is strict,
its range is closed and has finite codimension, and its kernel is (topologically) complemented and
has finite dimension.

See also `isFredholm_tfae` for other equivalent characterizations.
We will also prove later (not in Mathlib yet) that for maps between Banach (or even Fréchet)
spaces over `ℝ` or `ℂ`, all the conditions follow from the kernel and cokernel having finite
dimension. -/

structure IsFredholm (u : E →L[��] F) : Prop where
  isStrictMap : IsStrictMap u
  isClosed_range : IsClosed (u.range : Set F)
  finite_ker : FiniteDimensional �� u.ker
  finite_coker : u.range.CoFG
  closedComplemented_ker : u.ker.ClosedComplemented

variable [CompleteSpace ��] [IsTopologicalAddGroup F] [ContinuousSMul �� F] in
/-- A Fredholm operator has (topologically) complemented range. -/
lemma IsFredholm.closedComplemented_range {u : E →L[��] F} (u_fred : IsFredholm u) :
    u.range.ClosedComplemented :=
  have := u_fred.finite_coker
  ClosedComplemented.of_finiteDimensional_quotient u_fred.isClosed_range

end IsFredholm

section FredholmPackage

variable (�� E) in
/-- A **Fredholm decomposition** of a topological vector space `E` is the data of two subspaces
`X₀` and `X₁` which are topological complements, and where `X₀` is finite dimensional.

Note that we purposefully use the index `₀` for the "inessential" (i.e. finite dimensional)
part of the decomposition. -/

structure _root_.FredholmDecomposition where
  /-- The inessential (i.e. finite dimensional) part of a Fredholm decomposition. -/
  X₀ : Submodule �� E
  /-- The essential (i.e. finite codimensional) part of a Fredholm decomposition. -/
  X₁ : Submodule �� E
  isTopCompl : IsTopCompl X₁ X₀
  finite_X₀ : FiniteDimensional �� X₀

/-- Given a Fredholm decomposition `dec` of the space `E`, `dec.proj` is the (continuous linear)
projection onto the "essential part" `dec.X₁` along the "inessential part" `dec.X₀`.
This is a Fredholm operator, see `FredholmDecomposition.isFredholm_proj`. -/

abbrev _root_.FredholmDecomposition.proj (dec : FredholmDecomposition �� E) :
    E →L[��] dec.X₁ := dec.X₁.projectionOntoL dec.X₀ dec.isTopCompl

lemma _root_.FredholmDecomposition.cofg_X₁ (dec : FredholmDecomposition �� E) :
    dec.X₁.CoFG :=
  have := dec.finite_X₀
  FG.cofg_of_isCompl dec.isTopCompl.isCompl.symm .of_finite

/-- Let `u : E →L[��] F` be a continuous linear map. A **Fredholm package** for `u` is the data of
Fredholm decompositions `decDom` and `decCodom` of `E` and `F` respectively, together with
a continuous linear equivalence `equiv : decDom.X₁ ≃L[��] decCodom.X₁` between the "essential"
(i.e. finite codimension) parts of these decompositions, such that `u` equals the composition
`decCodom.X₁.subtypeL ∘L equiv ∘L decDom.proj`. In other words, in these
"essential ⊕ inessential" decompositions, the matrix of `u` is
$\begin{pmatrix} \texttt{equiv} & 0 \cr 0 & 0 \end{pmatrix}$.

We will show in `isFredholm_tfae` that an operator is Fredholm if and only if it admits
a Fredholm package. In practice, the condition that `u` is Fredholm (`IsFredholm`) is always easier
to prove, so if you need a Fredholm package you should probably get it from
`IsFredholm.nonempty_fredholmPackage` or `IsFredholm.fredholmPackage`. -/

structure FredholmPackage (u : E →L[��] F) where
  /-- A `FredholmDecomposition` of the domain. -/
  decDom : FredholmDecomposition �� E
  /-- A `FredholmDecomposition` of the codomain. -/
  decCodom : FredholmDecomposition �� F
  /-- An isomorphism between the essential parts of `decDom` and `decCodom`. -/
  equiv : decDom.X₁ ≃L[��] decCodom.X₁
  eq_equiv : u = decCodom.X₁.subtypeL ∘L equiv ∘L decDom.proj

lemma FredholmPackage.ker_eq {u : E →L[��] F} (pkg : FredholmPackage u) :
    u.ker = pkg.decDom.X₀ := by simp [pkg.eq_equiv, ker_comp]

lemma FredholmPackage.range_eq {u : E →L[��] F} (pkg : FredholmPackage u) :
    u.range = pkg.decCodom.X₁ := by
  simp [pkg.eq_equiv, range_comp]

lemma FredholmPackage.mapsTo {u : E →L[��] F} (pkg : FredholmPackage u) :
    MapsTo u pkg.decDom.X₁ pkg.decCodom.X₁ := by
  simpa [← FredholmPackage.range_eq, LinearMap.coe_range] using Set.mapsTo_range _ _

lemma FredholmPackage.equiv_eq_restrict {u : E →L[��] F} (pkg : FredholmPackage u) :
    pkg.equiv = u.restrict pkg.mapsTo := by
  ext x
  simp [pkg.eq_equiv]

lemma FredholmPackage.isInvertible_restrict {u : E →L[��] F} (pkg : FredholmPackage u) :
    u.restrict pkg.mapsTo |>.IsInvertible :=
  ⟨pkg.equiv, pkg.equiv_eq_restrict⟩

/-- The data of a Fredholm package for `u` determines a canonical quasi-inverse of `u`. -/
def FredholmPackage.quasiInverse {u : E →L[��] F} (pkg : FredholmPackage u) :
    F →L[��] E :=
  pkg.decDom.X₁.subtypeL ∘L pkg.equiv.symm ∘L pkg.decCodom.proj

/-- The data of a Fredholm package for `u` determines a canonical quasi-inverse of `u`. -/
lemma FredholmPackage.isQuasiInverse {u : E →L[��] F} (pkg : FredholmPackage u) :
    pkg.quasiInverse.IsQuasiInverse u := by
  nth_rw 2 [pkg.eq_equiv]
  have hdom : IsQuasiInverse pkg.decDom.X₁.subtype pkg.decDom.proj :=
    have := pkg.decDom.finite_X₀
    isQuasiInverse_subtype_projectionOnto _
  have hcodom : IsQuasiInverse pkg.decCodom.X₁.subtype pkg.decCodom.proj :=
    have := pkg.decCodom.finite_X₀
    isQuasiInverse_subtype_projectionOnto _
  -- For some reason `exact` and `refine` are slow here!
  apply hdom.comp (pkg.equiv.isQuasiInverse.comp hcodom.symm)

end FredholmPackage

variable [T2Space E] [T2Space F] in
/-- Assume that `u : E →L[��] F` has a continuous quasi-inverse. Then there are closed
subspaces of finite codimensions `E₁` and `F₁` between which `u` induces an isomorphism.

This statement is private because it is superseded by later results: using `isFredholm_tfae`,
you can build a `FredholmPackage` for `u`, and then apply `FredholmPackage.isInvertible_restrict`.
-/

private theorem exists_restrict_isInvertible_of_isQuasiInverse {u : E →L[��] F}
    {v : F →L[��] E} (hvu : v.IsQuasiInverse u) :
    ∃ (E₁ : Submodule �� E) (F₁ : Submodule �� F),
      IsClosed (E₁ : Set E) ∧ IsClosed (F₁ : Set F) ∧
      E₁.CoFG ∧ F₁.CoFG ∧
      ∃ h : MapsTo u E₁ F₁, (u.restrict h).IsInvertible := by
  obtain ⟨hvu, huv⟩ := hvu
  rw [IsRightQuasiInverse, Setoid.comm, equiv_iff_eqLocus_coFG] at huv
  rw [IsLeftQuasiInverse, Setoid.comm, equiv_iff_eqLocus_coFG] at hvu
  set E₁ := (ContinuousLinearMap.id �� E).eqLocus (v ∘L u)
  set F₁ := (ContinuousLinearMap.id �� F).eqLocus (u ∘L v)
  have u_mapsto : MapsTo u E₁ F₁ := fun x hx ↦ congr(u $hx)
  have v_mapsto : MapsTo v F₁ E₁ := fun x hx ↦ congr(v $hx)
  refine ⟨E₁, F₁, isClosed_eqLocus _ _, isClosed_eqLocus _ _, hvu, huv, u_mapsto, ?_⟩
  refine .of_inverse (g := v.restrict v_mapsto) ?_ ?_
  · ext ⟨x, hx : x = u (v x)⟩
    simp [coe_restrict_apply u_mapsto, coe_restrict_apply v_mapsto, ← hx]
  · ext ⟨x, hx : x = v (u x)⟩
    simp [coe_restrict_apply u_mapsto, coe_restrict_apply v_mapsto, ← hx]

variable [CompleteSpace ��]
  [IsTopologicalAddGroup E] [ContinuousSMul �� E]
  [IsTopologicalAddGroup F] [ContinuousSMul �� F]

/-- Assume that `u : E →L[��] F` restricts to an isomorphism between closed finite codimension
subspaces `E₁` and `F₁`. Then `u` is Fredholm.

In fact it is enough to assume that the restriction `E₁ →L[��] F₁` is Fredholm, see
`IsFredholm.of_restrict`. -/

theorem IsFredholm.of_isInvertible_restrict {u : E →L[��] F}
    {E₁ : Submodule �� E} (E₁_closed : IsClosed (E₁ : Set E)) [E₁_coFG : E₁.CoFG]
    {F₁ : Submodule �� F} (F₁_closed : IsClosed (F₁ : Set F)) [F₁_coFG : F₁.CoFG]
    (h_mapsto : MapsTo u E₁ F₁) (h_inv : (u.restrict h_mapsto).IsInvertible) :
    IsFredholm u := by
  obtain ⟨e, he⟩ := h_inv
  have eqL : u.domRestrict E₁ = F₁.subtypeL ∘L e := congr(F₁.subtypeL ∘L $he).symm
  have eqₗ : u.toLinearMap.domRestrict E₁ = F₁.subtype ∘ₗ e := congr(($eqL).toLinearMap)
  have h : Topology.IsStrictMap u ∧ IsClosed (u.range : Set F) := by
    rw [u.isStrictMap_isClosed_range_iff_restrict E₁ E₁_closed, eqL]
    exact ⟨F₁.isEmbedding_subtype.comp e.isHomeomorph.isEmbedding |>.isStrictMap, by simpa⟩
  have disj : Disjoint E₁ u.ker := by
    rw [disjoint_iff_comap_eq_bot, ← LinearMap.ker_domRestrict, eqₗ,
      LinearMap.ker_comp, ker_subtype, comap_bot, LinearEquiv.ker]
  refine ⟨h.1, h.2, ?_, ?_, ?_⟩
  · rw [← Submodule.fg_iff_finiteDimensional]
    exact E₁_coFG.fg_of_disjoint disj.symm
  · refine F₁_coFG.of_le (le_trans ?_ (u.range_domRestrict_le_range E₁))
    rw [eqₗ, LinearMap.range_comp, LinearEquiv.range, Submodule.map_top, range_subtype]
  · exact .of_disjoint_of_finiteDimensional_quotient E₁_closed disj.symm

omit [ContinuousSMul �� E] in
/-- Let `u : E →L[��] F` be a Fredholm operator. Given `dom₁` (resp. `codom₀`) an arbitrary
topological complement of `u.ker` (resp. `u.range`), we get a `FredholmPackage` for `u`
by considering the decompositions `E = dom₁ ⊕ u.ker`, `F = u.range ⊕ codom₀`, and the isomorphism
`dom₁ ≃L[��] u.range` induced by `u`.

If you need control over the decompositions, this is the primary way to get a `FredholmPackage`.
Otherwise, see `IsFredholm.nonempty_fredholmPackage`. -/

def IsFredholm.fredholmPackage {u : E →L[��] F}
    (u_fred : IsFredholm u) {dom₁ : Submodule �� E} {codom₀ : Submodule �� F}
    (h_dom : IsTopCompl u.ker dom₁) (h_codom : IsTopCompl u.range codom₀) :
    FredholmPackage u where
  decDom :=
    { X₀ := u.ker
      X₁ := dom₁
      isTopCompl := h_dom.symm
      finite_X₀ := u_fred.finite_ker }
  decCodom :=
    { X₀ := codom₀
      X₁ := u.range
      isTopCompl := h_codom
      finite_X₀ := .of_fg <| u_fred.finite_coker.fg_of_isCompl h_codom.isCompl }
  equiv :=
    letI Φ : dom₁ ≃L[��] E ⧸ u.ker := u.ker.quotientEquivOfIsTopCompl dom₁ h_dom |>.symm
    letI Ψ : (E ⧸ u.ker) ≃L[��] u.range := .quotKerEquivRange u_fred.isStrictMap
    Φ.trans Ψ
  eq_equiv := by
    refine LinearMap.ext_on_codisjoint h_dom.isCompl.codisjoint ?_ ?_
    · intro x (hx : u x = 0)
      simp [hx, projection_apply_of_mem_right]
    · intro x (hx : x ∈ dom₁)
      simp [hx, projection_apply_of_mem_left, ContinuousLinearEquiv.quotKerEquivRange]

omit [ContinuousSMul �� E] in
/-- Every Fredholm operator admits a `FredholmPackage`.

This is the primary way to get a `FredholmPackage` if you don't need control of the decompositions.
If you do, see `IsFredholm.fredholmPackage`. -/

theorem IsFredholm.nonempty_fredholmPackage {u : E →L[��] F}
    (u_fred : IsFredholm u) : Nonempty (FredholmPackage u) := by
  obtain ⟨codom₀, h_codom⟩ := u_fred.closedComplemented_range.exists_isTopCompl
  obtain ⟨dom₁, h_dom⟩ := u_fred.closedComplemented_ker.exists_isTopCompl
  exact ⟨u_fred.fredholmPackage h_dom h_codom⟩

variable [T2Space E] [T2Space F]

/--
Let `E`, `F` be two Hausdorff topological vector spaces over a complete `NontriviallyNormedField`
denoted `��`, and `u : E →L[��] F` a continuous linear map. The following conditions are equivalent:

1. `u` is a **Fredholm operator**, in the sense of `ContinuousLinearMap.IsFredholm`.
2. `u` admits a continuous **quasi-inverse**, in the sense of `LinearMap.IsQuasiInverse`.
3. There are closed finite-codimension subspaces `E₁` and `F₁` of `E` and `F` between which `u`
  induces an isomorphism.
4. `u` admits a `FredholmPackage`.

In practice, condition `4` is the "strongest", so you should probably not use it to *prove* that an
operator is Fredholm.
-/

theorem isFredholm_tfae (u : E →L[��] F) :
    [ IsFredholm u,
      ∃ v : F →L[��] E, v.IsQuasiInverse u,
      ∃ (E₁ : Submodule �� E) (F₁ : Submodule �� F),
        IsClosed (E₁ : Set E) ∧ IsClosed (F₁ : Set F) ∧
        E₁.CoFG ∧ F₁.CoFG ∧
        ∃ h : MapsTo u E₁ F₁, (u.restrict h).IsInvertible,
      Nonempty (FredholmPackage u) ].TFAE := by
  tfae_have 1 → 4 := IsFredholm.nonempty_fredholmPackage
  tfae_have 4 → 2 := by
    rintro ⟨dec⟩
    exact ⟨dec.quasiInverse, dec.isQuasiInverse⟩
  tfae_have 2 → 3 := by
    rintro ⟨v, huv⟩
    exact exists_restrict_isInvertible_of_isQuasiInverse huv
  tfae_have 3 → 1 := by
    rintro ⟨E₁, F₁, E₁_closed, F₁_closed, E₁_coFG, F₁_coFG, u_mapsto, u_invertible⟩
    exact .of_isInvertible_restrict E₁_closed F₁_closed u_mapsto u_invertible
  tfae_finish

/-- If `u` has a Fredholm package, it is Fredholm. -/
theorem FredholmPackage.isFredholm {u : E →L[��] F} (pkg : FredholmPackage u) :
    IsFredholm u :=
  isFredholm_tfae u |>.out 4 1 |>.mp (Nonempty.intro pkg)

theorem isFredholm_iff_exists_isQuasiInverse {u : E →L[��] F} :
    IsFredholm u ↔ ∃ v : F →L[��] E, v.IsQuasiInverse u :=
  isFredholm_tfae u |>.out 1 2

alias ⟨IsFredholm.exists_isQuasiInverse, _⟩ := isFredholm_iff_exists_isQuasiInverse

theorem IsFredholm.of_isQuasiInverse {u : E →L[��] F} {v : F →L[��] E} (h : v.IsQuasiInverse u) :
    IsFredholm u :=
  isFredholm_iff_exists_isQuasiInverse.mpr ⟨v, h⟩

end DefTFAE

section Constructions

/-!
## Constructions of Fredholm operators
-/


theorem _root_.Topology.IsClosedEmbedding.isFredholm {f : E →L[��] F}
    (hf : IsClosedEmbedding f) (h_cofg : f.range.CoFG) :
    IsFredholm f where
  isStrictMap := hf.isStrictMap
  isClosed_range := hf.isClosed_range
  finite_ker := by
    rw [LinearMap.ker_eq_bot.2 hf.injective]
    infer_instance
  finite_coker := h_cofg
  closedComplemented_ker := by
    rw [LinearMap.ker_eq_bot.2 hf.injective]
    exact closedComplemented_bot

theorem _root_.Function.Injective.isFredholm_iff (f : E →L[��] F)
    (f_inj : Injective f) :
    IsFredholm f ↔ IsClosedEmbedding f ∧ f.range.CoFG := by
  refine ⟨fun hf ↦ ⟨⟨?_, hf.isClosed_range⟩, hf.finite_coker⟩,
    fun ⟨hf, h_cofg⟩ ↦ hf.isFredholm h_cofg⟩
  simpa [isEmbedding_iff_isStrictMap_injective, f_inj] using hf.isStrictMap

theorem _root_.Submodule.isFredholm_subtypeL_iff {p : Submodule �� E} :
    IsFredholm p.subtypeL ↔ IsClosed (p : Set E) ∧ p.CoFG := by
  simp [p.subtype_injective.isFredholm_iff p.subtypeL, isClosedEmbedding_iff,
    IsEmbedding.subtypeVal]

theorem _root_.Submodule.isFredholm_subtypeL {p : Submodule �� E}
    (hp : IsClosed (p : Set E)) [p.CoFG] :
    IsFredholm p.subtypeL :=
  isFredholm_subtypeL_iff.mpr ⟨hp, inferInstance⟩

theorem _root_.ContinuousLinearEquiv.isFredholm (e : E ≃L[��] F) :
    IsFredholm (e : E →L[��] F) :=
  e.isHomeomorph.isClosedEmbedding.isFredholm (by simp)

protected theorem IsFredholm.id : IsFredholm (.id �� E) :=
  ContinuousLinearEquiv.refl �� E |>.isFredholm

theorem IsInvertible.isFredholm {f : E →L[��] F} (hf : f.IsInvertible) :
    IsFredholm f := by
  rcases hf with ⟨e, rfl⟩
  exact e.isFredholm

theorem _root_.Function.Bijective.isFredholm_iff (f : E →L[��] F)
    (f_bij : Function.Bijective f) :
    IsFredholm f ↔ f.IsInvertible := by
  refine ⟨fun hf ↦ ?_, fun hf ↦ hf.isFredholm⟩
  simpa [isInvertible_iff_isHomeomorph, isHomeomorph_iff_isStrictMap_bijective, f_bij]
    using hf.isStrictMap

theorem isInvertible_iff_isFredholm_and_bijective {f : E →L[��] F} :
    f.IsInvertible ↔ IsFredholm f ∧ Bijective f := by
  grind [Function.Bijective.isFredholm_iff, IsInvertible.bijective]

theorem _root_.Topology.IsQuotientMap.isFredholm {f : E →L[��] F} (hq : IsQuotientMap f)
    (hcompl : f.ker.ClosedComplemented) (hfg : FiniteDimensional �� f.ker) :
    IsFredholm f where
  isStrictMap := hq.isStrictMap
  isClosed_range := by
    rw [LinearMap.range_eq_top.2 hq.surjective]
    exact isClosed_univ
  finite_ker := hfg
  finite_coker := by
    rw [LinearMap.range_eq_top.2 hq.surjective]
    exact Submodule.CoFG.top
  closedComplemented_ker := hcompl

theorem _root_.Function.Surjective.isFredholm_iff (f : E →L[��] F) (f_surj : Surjective f) :
    IsFredholm f ↔ IsQuotientMap f ∧ f.ker.ClosedComplemented ∧ FiniteDimensional �� f.ker := by
  refine ⟨fun hf ↦ ⟨?_, hf.closedComplemented_ker, hf.finite_ker⟩,
    fun ⟨h_quot, h_comp, h_fin⟩ ↦ h_quot.isFredholm h_comp h_fin⟩
  simpa [isQuotientMap_iff_isStrictMap_surjective, f_surj] using hf.isStrictMap

theorem _root_.Submodule.isFredholm_mkQL_iff {p : Submodule �� E} :
    IsFredholm p.mkQL ↔ p.ClosedComplemented ∧ FiniteDimensional �� p := by
  -- Technical note: we go through `Submodule.FG` because otherwise we have to rewrite types,
  -- which is just painful.
  rw [p.mkQ_surjective.isFredholm_iff p.mkQL, ← fg_iff_finiteDimensional,
    ← fg_iff_finiteDimensional]
  simp [isQuotientMap_mkQ]

theorem _root_.Submodule.isFredholm_mkQL {p : Submodule �� E} (hcompl : p.ClosedComplemented)
    [FiniteDimensional �� p] :
    IsFredholm p.mkQL :=
  isFredholm_mkQL_iff.mpr ⟨hcompl, inferInstance⟩

theorem _root_.Submodule.isFredholm_projectionOntoL_iff [ContinuousSub E] {p q : Submodule �� E}
    (hcompl : IsTopCompl p q) :
    IsFredholm (p.projectionOntoL q hcompl) ↔ FiniteDimensional �� q := by
  rw [(projectionOntoL_surjective hcompl).isFredholm_iff _, ← fg_iff_finiteDimensional,
    ← fg_iff_finiteDimensional]
  simp [isQuotientMap_projectionOnto hcompl, hcompl.symm.closedComplemented]

theorem _root_.Submodule.isFredholm_projectionOntoL [ContinuousSub E] {p q : Submodule �� E}
    (hcompl : IsTopCompl p q)
    [FiniteDimensional �� q] :
    IsFredholm (p.projectionOntoL q hcompl) :=
  isFredholm_projectionOntoL_iff hcompl |>.mpr inferInstance

theorem _root_.FredholmDecomposition.isFredholm_proj [ContinuousSub E]
    (dec : FredholmDecomposition �� E) :
    IsFredholm dec.proj :=
  have := dec.finite_X₀
  isFredholm_projectionOntoL dec.isTopCompl

theorem _root_.Submodule.isFredholm_projectionL [ContinuousSub E] {p q : Submodule �� E} [T1Space q]
    (hcompl : IsTopCompl p q)
    [FiniteDimensional �� q] :
    IsFredholm (p.projectionL q hcompl) where
  isStrictMap := by simp [projection, ← IsEmbedding.subtypeVal.isStrictMap_iff,
    (isQuotientMap_projectionOnto hcompl).isStrictMap]
  isClosed_range := by simp [hcompl.isClosed]
  finite_ker := by rw [← fg_iff_finiteDimensional]; simpa using FG.of_finite
  finite_coker := by simpa using FG.cofg_of_isCompl hcompl.isCompl.symm .of_finite
  closedComplemented_ker := by simpa using hcompl.symm.closedComplemented

theorem _root_.Submodule.isFredholm_projectionL_iff [ContinuousSub E]
    {p q : Submodule �� E} [T1Space q] (hcompl : IsTopCompl p q) :
    IsFredholm (p.projectionL q hcompl) ↔ FiniteDimensional �� q := by
  refine ⟨fun h ↦ ?_, fun _ ↦ isFredholm_projectionL hcompl⟩
  simpa [← fg_iff_finiteDimensional, -toLinearMap_projectionL, ker_projectionL] using h.finite_ker

open ContinuousLinearMap in
theorem IsIdempotentElem.isFredholm_iff [ContinuousSub E] {f : E →L[��] E} [T1Space f.ker]
    (hf : IsIdempotentElem f) :
    IsFredholm f ↔ FiniteDimensional �� f.ker := by
  conv_lhs => rw [hf.eq_projectionL]
  rw [isFredholm_projectionL_iff]

open ContinuousLinearMap in
theorem IsIdempotentElem.isFredholm [ContinuousSub E] {f : E →L[��] E} [T1Space f.ker]
    (hf : IsIdempotentElem f)
    [FiniteDimensional �� f.ker] :
    IsFredholm f :=
  hf.isFredholm_iff.mpr inferInstance

variable [CompleteSpace ��] [IsTopologicalAddGroup E] [IsTopologicalAddGroup F]
  [IsTopologicalAddGroup G] [ContinuousSMul �� E] [ContinuousSMul �� F] [ContinuousSMul �� G]
  [T2Space E] [T2Space F] [T2Space G]

theorem isFredholm_congr {u u' : E →L[��] F} (h : u.toLinearMap ≈ u'.toLinearMap) :
    IsFredholm u ↔ IsFredholm u' := by
  simp_rw [isFredholm_iff_exists_isQuasiInverse]
  exact exists_congr fun _ ↦ isQuasiInverse_congr (Setoid.refl _) (Setoid.symm h)

theorem IsFredholm.congr {u u' : E →L[��] F} (hu : IsFredholm u)
    (h : u.toLinearMap ≈ u'.toLinearMap) :
    IsFredholm u' := (isFredholm_congr h).mp hu

theorem IsFredholm.add_hasFiniteRange {u v : E →L[��] F} (hu : IsFredholm u)
    (hv : HasFiniteRange v.toLinearMap) :
    IsFredholm (u + v) :=
  hu.congr (by simpa [equiv_iff_hasFiniteRange] using hv.neg)

theorem IsFredholm.hasFiniteRange_add {u v : E →L[��] F} (hu : IsFredholm u)
    (hv : HasFiniteRange v.toLinearMap) :
    IsFredholm (v + u) :=
  add_comm u v ▸ hu.add_hasFiniteRange hv

theorem IsFredholm.comp {f' : F →L[��] G} {f : E →L[��] F} (hf' : IsFredholm f')
    (hf : IsFredholm f) : IsFredholm (f' ∘L f) := by
  obtain ⟨g, hg⟩ := hf.exists_isQuasiInverse
  obtain ⟨g', hg'⟩ := hf'.exists_isQuasiInverse
  exact .of_isQuasiInverse (mod_cast hg.comp hg')

theorem IsFredholm.comp_iff_left {f : E →L[��] F} {f' : F →L[��] G} (hf : IsFredholm f) :
    IsFredholm (f' ∘L f) ↔ IsFredholm f' := by
  refine ⟨fun hcomp ↦ ?_, fun hf' ↦ hf'.comp hf⟩
  obtain ⟨g, hg⟩ := hf.exists_isQuasiInverse
  obtain ⟨w, hw⟩ := hcomp.exists_isQuasiInverse
  exact .of_isQuasiInverse (mod_cast hg.of_comp_left hw)

theorem IsFredholm.comp_iff_right {f : E →L[��] F} {f' : F →L[��] G} (hf' : IsFredholm f') :
    IsFredholm (f' ∘L f) ↔ IsFredholm f := by
  refine ⟨fun hcomp ↦ ?_, fun hf ↦ hf'.comp hf⟩
  obtain ⟨g', hg'⟩ := hf'.exists_isQuasiInverse
  obtain ⟨w, hw⟩ := hcomp.exists_isQuasiInverse
  exact .of_isQuasiInverse (mod_cast hg'.of_comp_right hw)

@[simp]
theorem isFredholm_comp_equiv {f : E ≃L[��] F} {f' : F →L[��] G} :
    IsFredholm (f' ∘L (f : E →L[��] F)) ↔ IsFredholm f' :=
  f.isFredholm.comp_iff_left

@[simp]
theorem isFredholm_equiv_comp {f : E →L[��] F} {f' : F ≃L[��] G} :
    IsFredholm ((f' : F →L[��] G) ∘L f) ↔ IsFredholm f :=
  f'.isFredholm.comp_iff_right

theorem isFredholm_restrict_iff {f : E →L[��] F} {A : Submodule �� E} {B : Submodule �� F}
    (hA : IsClosed (A : Set E)) [A.CoFG] (hB : IsClosed (B : Set F)) [B.CoFG] (hf : MapsTo f A B) :
    IsFredholm (f.restrict hf) ↔ IsFredholm f := by
  rw [← (isFredholm_subtypeL hA).comp_iff_left, ← (isFredholm_subtypeL hB).comp_iff_right,
    subtypeL_comp_restrict hf, domRestrict]

alias ⟨IsFredholm.of_restrict, IsFredholm.restrict⟩ := isFredholm_restrict_iff

theorem isFredholm_domRestrict_iff {f : E →L[��] F} {A : Submodule �� E}
    (hA : IsClosed (A : Set E)) [A.CoFG] :
    IsFredholm (f.domRestrict A) ↔ IsFredholm f := by
  rw [← (isFredholm_subtypeL hA).comp_iff_left, domRestrict]

alias ⟨IsFredholm.of_domRestrict, IsFredholm.domRestrict⟩ := isFredholm_domRestrict_iff

theorem isFredholm_codRestrict_iff {f : E →L[��] F} {B : Submodule �� F}
    (hB : IsClosed (B : Set F)) [B.CoFG] (hf : ∀ x, f x ∈ B) :
    IsFredholm (f.codRestrict B hf) ↔ IsFredholm f := by
  rw [← (isFredholm_subtypeL hB).comp_iff_right, subtypeL_comp_codRestrict]

alias ⟨IsFredholm.of_codRestrict, IsFredholm.codRestrict⟩ := isFredholm_codRestrict_iff

end Constructions

section Index

/-!
## Specific index computations for Fredholm operators

In this section, we restate for Fredholm operators some general algebraic results about
`LinearMap.index`. Ideally we wouldn't need such a section at all, but as of August 2026
it is easier to work with the API for `IsFredholm` than with the specific finiteness assumptions
used, for example, in `LinearMap.index_comp`.

This suggests that we may want an algebraic version of the `IsFredholm` predicate to express
"this linear map has finite dimensional kernel and cokernel", or equivalently "this linear map
admits a quasi-inverse". The API would then mimic that of `IsFredholm`.
-/


lemma IsFredholm.index_comp {g : F →L[��] G} {f : E →L[��] F}
    (hg : IsFredholm g) (hf : IsFredholm f) :
    (g ∘L f).index = g.index + f.index :=
  have := hf.finite_ker
  have := hf.finite_coker
  have := hg.finite_ker
  have := hg.finite_coker
  LinearMap.index_comp _ _

end Index

end TVS
end ContinuousLinearMap

end

Messung
CHZG
100100100100

¤ Dauer der Verarbeitung: 0.72 Sekunden  ¤

*© Formatika GbR, Deutschland