Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2020 Yury Kudryashov. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Yury Kudryashov | |
-/ | |
import analysis.calculus.inverse | |
import analysis.normed_space.complemented | |
/-! | |
# Implicit function theorem | |
We prove three versions of the implicit function theorem. First we define a structure | |
`implicit_function_data` that holds arguments for the most general version of the implicit function | |
theorem, see `implicit_function_data.implicit_function` | |
and `implicit_function_data.to_implicit_function`. This version allows a user to choose | |
a specific implicit function but provides only a little convenience over the inverse function | |
theorem. | |
Then we define `implicit_function_of_complemented`: implicit function defined by `f (g z y) = z`, | |
where `f : E β F` is a function strictly differentiable at `a` such that its derivative `f'` | |
is surjective and has a `complemented` kernel. | |
Finally, if the codomain of `f` is a finite dimensional space, then we can automatically prove | |
that the kernel of `f'` is complemented, hence the only assumptions are `has_strict_fderiv_at` | |
and `f'.range = β€`. This version is named `implicit_function`. | |
## TODO | |
* Add a version for a function `f : E Γ F β G` such that $$\frac{\partial f}{\partial y}$$ is | |
invertible. | |
* Add a version for `f : π Γ π β π` proving `has_strict_deriv_at` and `deriv Ο = ...`. | |
* Prove that in a real vector space the implicit function has the same smoothness as the original | |
one. | |
* If the original function is differentiable in a neighborhood, then the implicit function is | |
differentiable in a neighborhood as well. Current setup only proves differentiability at one | |
point for the implicit function constructed in this file (as opposed to an unspecified implicit | |
function). One of the ways to overcome this difficulty is to use uniqueness of the implicit | |
function in the general version of the theorem. Another way is to prove that *any* implicit | |
function satisfying some predicate is strictly differentiable. | |
## Tags | |
implicit function, inverse function | |
-/ | |
noncomputable theory | |
open_locale topological_space | |
open filter | |
open continuous_linear_map (fst snd smul_right ker_prod) | |
open continuous_linear_equiv (of_bijective) | |
/-! | |
### General version | |
Consider two functions `f : E β F` and `g : E β G` and a point `a` such that | |
* both functions are strictly differentiable at `a`; | |
* the derivatives are surjective; | |
* the kernels of the derivatives are complementary subspaces of `E`. | |
Note that the map `x β¦ (f x, g x)` has a bijective derivative, hence it is a local homeomorphism | |
between `E` and `F Γ G`. We use this fact to define a function `Ο : F β G β E` | |
(see `implicit_function_data.implicit_function`) such that for `(y, z)` close enough to `(f a, g a)` | |
we have `f (Ο y z) = y` and `g (Ο y z) = z`. | |
We also prove a formula for $$\frac{\partial\varphi}{\partial z}.$$ | |
Though this statement is almost symmetric with respect to `F`, `G`, we interpret it in the following | |
way. Consider a family of surfaces `{x | f x = y}`, `y β π (f a)`. Each of these surfaces is | |
parametrized by `Ο y`. | |
There are many ways to choose a (differentiable) function `Ο` such that `f (Ο y z) = y` but the | |
extra condition `g (Ο y z) = z` allows a user to select one of these functions. If we imagine | |
that the level surfaces `f = const` form a local horizontal foliation, then the choice of | |
`g` fixes a transverse foliation `g = const`, and `Ο` is the inverse function of the projection | |
of `{x | f x = y}` along this transverse foliation. | |
This version of the theorem is used to prove the other versions and can be used if a user | |
needs to have a complete control over the choice of the implicit function. | |
-/ | |
/-- Data for the general version of the implicit function theorem. It holds two functions | |
`f : E β F` and `g : E β G` (named `left_fun` and `right_fun`) and a point `a` (named `pt`) | |
such that | |
* both functions are strictly differentiable at `a`; | |
* the derivatives are surjective; | |
* the kernels of the derivatives are complementary subspaces of `E`. -/ | |
@[nolint has_inhabited_instance] | |
structure implicit_function_data (π : Type*) [nontrivially_normed_field π] | |
(E : Type*) [normed_add_comm_group E] [normed_space π E] [complete_space E] | |
(F : Type*) [normed_add_comm_group F] [normed_space π F] [complete_space F] | |
(G : Type*) [normed_add_comm_group G] [normed_space π G] [complete_space G] := | |
(left_fun : E β F) | |
(left_deriv : E βL[π] F) | |
(right_fun : E β G) | |
(right_deriv : E βL[π] G) | |
(pt : E) | |
(left_has_deriv : has_strict_fderiv_at left_fun left_deriv pt) | |
(right_has_deriv : has_strict_fderiv_at right_fun right_deriv pt) | |
(left_range : left_deriv.range = β€) | |
(right_range : right_deriv.range = β€) | |
(is_compl_ker : is_compl left_deriv.ker right_deriv.ker) | |
namespace implicit_function_data | |
variables {π : Type*} [nontrivially_normed_field π] | |
{E : Type*} [normed_add_comm_group E] [normed_space π E] [complete_space E] | |
{F : Type*} [normed_add_comm_group F] [normed_space π F] [complete_space F] | |
{G : Type*} [normed_add_comm_group G] [normed_space π G] [complete_space G] | |
(Ο : implicit_function_data π E F G) | |
/-- The function given by `x β¦ (left_fun x, right_fun x)`. -/ | |
def prod_fun (x : E) : F Γ G := (Ο.left_fun x, Ο.right_fun x) | |
@[simp] lemma prod_fun_apply (x : E) : Ο.prod_fun x = (Ο.left_fun x, Ο.right_fun x) := rfl | |
protected lemma has_strict_fderiv_at : | |
has_strict_fderiv_at Ο.prod_fun | |
(Ο.left_deriv.equiv_prod_of_surjective_of_is_compl Ο.right_deriv Ο.left_range Ο.right_range | |
Ο.is_compl_ker : E βL[π] F Γ G) Ο.pt := | |
Ο.left_has_deriv.prod Ο.right_has_deriv | |
/-- Implicit function theorem. If `f : E β F` and `g : E β G` are two maps strictly differentiable | |
at `a`, their derivatives `f'`, `g'` are surjective, and the kernels of these derivatives are | |
complementary subspaces of `E`, then `x β¦ (f x, g x)` defines a local homeomorphism between | |
`E` and `F Γ G`. In particular, `{x | f x = f a}` is locally homeomorphic to `G`. -/ | |
def to_local_homeomorph : local_homeomorph E (F Γ G) := | |
Ο.has_strict_fderiv_at.to_local_homeomorph _ | |
/-- Implicit function theorem. If `f : E β F` and `g : E β G` are two maps strictly differentiable | |
at `a`, their derivatives `f'`, `g'` are surjective, and the kernels of these derivatives are | |
complementary subspaces of `E`, then `implicit_function_of_is_compl_ker` is the unique (germ of a) | |
map `Ο : F β G β E` such that `f (Ο y z) = y` and `g (Ο y z) = z`. -/ | |
def implicit_function : F β G β E := function.curry $ Ο.to_local_homeomorph.symm | |
@[simp] lemma to_local_homeomorph_coe : β(Ο.to_local_homeomorph) = Ο.prod_fun := rfl | |
lemma to_local_homeomorph_apply (x : E) : | |
Ο.to_local_homeomorph x = (Ο.left_fun x, Ο.right_fun x) := | |
rfl | |
lemma pt_mem_to_local_homeomorph_source : | |
Ο.pt β Ο.to_local_homeomorph.source := | |
Ο.has_strict_fderiv_at.mem_to_local_homeomorph_source | |
lemma map_pt_mem_to_local_homeomorph_target : | |
(Ο.left_fun Ο.pt, Ο.right_fun Ο.pt) β Ο.to_local_homeomorph.target := | |
Ο.to_local_homeomorph.map_source $ Ο.pt_mem_to_local_homeomorph_source | |
lemma prod_map_implicit_function : | |
βαΆ (p : F Γ G) in π (Ο.prod_fun Ο.pt), Ο.prod_fun (Ο.implicit_function p.1 p.2) = p := | |
Ο.has_strict_fderiv_at.eventually_right_inverse.mono $ Ξ» β¨z, yβ© h, h | |
lemma left_map_implicit_function : | |
βαΆ (p : F Γ G) in π (Ο.prod_fun Ο.pt), Ο.left_fun (Ο.implicit_function p.1 p.2) = p.1 := | |
Ο.prod_map_implicit_function.mono $ Ξ» z, congr_arg prod.fst | |
lemma right_map_implicit_function : | |
βαΆ (p : F Γ G) in π (Ο.prod_fun Ο.pt), Ο.right_fun (Ο.implicit_function p.1 p.2) = p.2 := | |
Ο.prod_map_implicit_function.mono $ Ξ» z, congr_arg prod.snd | |
lemma implicit_function_apply_image : | |
βαΆ x in π Ο.pt, Ο.implicit_function (Ο.left_fun x) (Ο.right_fun x) = x := | |
Ο.has_strict_fderiv_at.eventually_left_inverse | |
lemma map_nhds_eq : map Ο.left_fun (π Ο.pt) = π (Ο.left_fun Ο.pt) := | |
show map (prod.fst β Ο.prod_fun) (π Ο.pt) = π (Ο.prod_fun Ο.pt).1, | |
by rw [β map_map, Ο.has_strict_fderiv_at.map_nhds_eq_of_equiv, map_fst_nhds] | |
lemma implicit_function_has_strict_fderiv_at | |
(g'inv : G βL[π] E) (hg'inv : Ο.right_deriv.comp g'inv = continuous_linear_map.id π G) | |
(hg'invf : Ο.left_deriv.comp g'inv = 0) : | |
has_strict_fderiv_at (Ο.implicit_function (Ο.left_fun Ο.pt)) g'inv (Ο.right_fun Ο.pt) := | |
begin | |
have := Ο.has_strict_fderiv_at.to_local_inverse, | |
simp only [prod_fun] at this, | |
convert this.comp (Ο.right_fun Ο.pt) | |
((has_strict_fderiv_at_const _ _).prod (has_strict_fderiv_at_id _)), | |
simp only [continuous_linear_map.ext_iff, continuous_linear_map.coe_comp', function.comp_app] | |
at hg'inv hg'invf β’, | |
simp [continuous_linear_equiv.eq_symm_apply, *] | |
end | |
end implicit_function_data | |
namespace has_strict_fderiv_at | |
section complemented | |
/-! | |
### Case of a complemented kernel | |
In this section we prove the following version of the implicit function theorem. Consider a map | |
`f : E β F` and a point `a : E` such that `f` is strictly differentiable at `a`, its derivative `f'` | |
is surjective and the kernel of `f'` is a complemented subspace of `E` (i.e., it has a closed | |
complementary subspace). Then there exists a function `Ο : F β ker f' β E` such that for `(y, z)` | |
close to `(f a, 0)` we have `f (Ο y z) = y` and the derivative of `Ο (f a)` at zero is the | |
embedding `ker f' β E`. | |
Note that a map with these properties is not unique. E.g., different choices of a subspace | |
complementary to `ker f'` lead to different maps `Ο`. | |
-/ | |
variables {π : Type*} [nontrivially_normed_field π] | |
{E : Type*} [normed_add_comm_group E] [normed_space π E] [complete_space E] | |
{F : Type*} [normed_add_comm_group F] [normed_space π F] [complete_space F] | |
{f : E β F} {f' : E βL[π] F} {a : E} | |
section defs | |
variables (f f') | |
/-- Data used to apply the generic implicit function theorem to the case of a strictly | |
differentiable map such that its derivative is surjective and has a complemented kernel. -/ | |
@[simp] def implicit_function_data_of_complemented (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
implicit_function_data π E F f'.ker := | |
{ left_fun := f, | |
left_deriv := f', | |
right_fun := Ξ» x, classical.some hker (x - a), | |
right_deriv := classical.some hker, | |
pt := a, | |
left_has_deriv := hf, | |
right_has_deriv := (classical.some hker).has_strict_fderiv_at.comp a | |
((has_strict_fderiv_at_id a).sub_const a), | |
left_range := hf', | |
right_range := linear_map.range_eq_of_proj (classical.some_spec hker), | |
is_compl_ker := linear_map.is_compl_of_proj (classical.some_spec hker) } | |
/-- A local homeomorphism between `E` and `F Γ f'.ker` sending level surfaces of `f` | |
to vertical subspaces. -/ | |
def implicit_to_local_homeomorph_of_complemented (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
local_homeomorph E (F Γ f'.ker) := | |
(implicit_function_data_of_complemented f f' hf hf' hker).to_local_homeomorph | |
/-- Implicit function `g` defined by `f (g z y) = z`. -/ | |
def implicit_function_of_complemented (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
F β f'.ker β E := | |
(implicit_function_data_of_complemented f f' hf hf' hker).implicit_function | |
end defs | |
@[simp] lemma implicit_to_local_homeomorph_of_complemented_fst (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) (x : E) : | |
(hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker x).fst = f x := | |
rfl | |
lemma implicit_to_local_homeomorph_of_complemented_apply | |
(hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) | |
(hker : f'.ker.closed_complemented) (y : E) : | |
hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker y = | |
(f y, classical.some hker (y - a)) := | |
rfl | |
@[simp] lemma implicit_to_local_homeomorph_of_complemented_apply_ker | |
(hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) | |
(hker : f'.ker.closed_complemented) (y : f'.ker) : | |
hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker (y + a) = (f (y + a), y) := | |
by simp only [implicit_to_local_homeomorph_of_complemented_apply, add_sub_cancel, | |
classical.some_spec hker] | |
@[simp] lemma implicit_to_local_homeomorph_of_complemented_self | |
(hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker a = (f a, 0) := | |
by simp [hf.implicit_to_local_homeomorph_of_complemented_apply] | |
lemma mem_implicit_to_local_homeomorph_of_complemented_source (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
a β (hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker).source := | |
mem_to_local_homeomorph_source _ | |
lemma mem_implicit_to_local_homeomorph_of_complemented_target (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
(f a, (0 : f'.ker)) β (hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker).target := | |
by simpa only [implicit_to_local_homeomorph_of_complemented_self] using | |
((hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker).map_source $ | |
(hf.mem_implicit_to_local_homeomorph_of_complemented_source hf' hker)) | |
/-- `implicit_function_of_complemented` sends `(z, y)` to a point in `f β»ΒΉ' z`. -/ | |
lemma map_implicit_function_of_complemented_eq (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
βαΆ (p : F Γ f'.ker) in π (f a, 0), | |
f (hf.implicit_function_of_complemented f f' hf' hker p.1 p.2) = p.1 := | |
((hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker).eventually_right_inverse $ | |
hf.mem_implicit_to_local_homeomorph_of_complemented_target hf' hker).mono $ Ξ» β¨z, yβ© h, | |
congr_arg prod.fst h | |
/-- Any point in some neighborhood of `a` can be represented as `implicit_function` | |
of some point. -/ | |
lemma eq_implicit_function_of_complemented (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
βαΆ x in π a, hf.implicit_function_of_complemented f f' hf' hker (f x) | |
(hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker x).snd = x := | |
(implicit_function_data_of_complemented f f' hf hf' hker).implicit_function_apply_image | |
@[simp] lemma implicit_function_of_complemented_apply_image (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
hf.implicit_function_of_complemented f f' hf' hker (f a) 0 = a := | |
begin | |
convert (hf.implicit_to_local_homeomorph_of_complemented f f' hf' hker).left_inv | |
(hf.mem_implicit_to_local_homeomorph_of_complemented_source hf' hker), | |
exact congr_arg prod.snd (hf.implicit_to_local_homeomorph_of_complemented_self hf' hker).symm | |
end | |
lemma to_implicit_function_of_complemented (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (hker : f'.ker.closed_complemented) : | |
has_strict_fderiv_at (hf.implicit_function_of_complemented f f' hf' hker (f a)) | |
f'.ker.subtypeL 0 := | |
by convert (implicit_function_data_of_complemented f f' hf hf' | |
hker).implicit_function_has_strict_fderiv_at f'.ker.subtypeL _ _; | |
[skip, ext, ext]; simp [classical.some_spec hker] | |
end complemented | |
/-! | |
### Finite dimensional case | |
In this section we prove the following version of the implicit function theorem. Consider a map | |
`f : E β F` from a Banach normed space to a finite dimensional space. | |
Take a point `a : E` such that `f` is strictly differentiable at `a` and its derivative `f'` | |
is surjective. Then there exists a function `Ο : F β ker f' β E` such that for `(y, z)` | |
close to `(f a, 0)` we have `f (Ο y z) = y` and the derivative of `Ο (f a)` at zero is the | |
embedding `ker f' β E`. | |
This version deduces that `ker f'` is a complemented subspace from the fact that `F` is a finite | |
dimensional space, then applies the previous version. | |
Note that a map with these properties is not unique. E.g., different choices of a subspace | |
complementary to `ker f'` lead to different maps `Ο`. | |
-/ | |
section finite_dimensional | |
variables {π : Type*} [nontrivially_normed_field π] [complete_space π] | |
{E : Type*} [normed_add_comm_group E] [normed_space π E] [complete_space E] | |
{F : Type*} [normed_add_comm_group F] [normed_space π F] [finite_dimensional π F] | |
(f : E β F) (f' : E βL[π] F) {a : E} | |
/-- Given a map `f : E β F` to a finite dimensional space with a surjective derivative `f'`, | |
returns a local homeomorphism between `E` and `F Γ ker f'`. -/ | |
def implicit_to_local_homeomorph (hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) : | |
local_homeomorph E (F Γ f'.ker) := | |
by haveI := finite_dimensional.complete π F; exact | |
hf.implicit_to_local_homeomorph_of_complemented f f' hf' | |
f'.ker_closed_complemented_of_finite_dimensional_range | |
/-- Implicit function `g` defined by `f (g z y) = z`. -/ | |
def implicit_function (hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) : | |
F β f'.ker β E := | |
function.curry $ (hf.implicit_to_local_homeomorph f f' hf').symm | |
variables {f f'} | |
@[simp] lemma implicit_to_local_homeomorph_fst (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) (x : E) : | |
(hf.implicit_to_local_homeomorph f f' hf' x).fst = f x := | |
rfl | |
@[simp] lemma implicit_to_local_homeomorph_apply_ker | |
(hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) (y : f'.ker) : | |
hf.implicit_to_local_homeomorph f f' hf' (y + a) = (f (y + a), y) := | |
by apply implicit_to_local_homeomorph_of_complemented_apply_ker | |
@[simp] lemma implicit_to_local_homeomorph_self | |
(hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) : | |
hf.implicit_to_local_homeomorph f f' hf' a = (f a, 0) := | |
by apply implicit_to_local_homeomorph_of_complemented_self | |
lemma mem_implicit_to_local_homeomorph_source (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) : | |
a β (hf.implicit_to_local_homeomorph f f' hf').source := | |
mem_to_local_homeomorph_source _ | |
lemma mem_implicit_to_local_homeomorph_target (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) : | |
(f a, (0 : f'.ker)) β (hf.implicit_to_local_homeomorph f f' hf').target := | |
by apply mem_implicit_to_local_homeomorph_of_complemented_target | |
lemma tendsto_implicit_function (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) {Ξ± : Type*} {l : filter Ξ±} {gβ : Ξ± β F} {gβ : Ξ± β f'.ker} | |
(hβ : tendsto gβ l (π $ f a)) (hβ : tendsto gβ l (π 0)) : | |
tendsto (Ξ» t, hf.implicit_function f f' hf' (gβ t) (gβ t)) l (π a) := | |
begin | |
refine ((hf.implicit_to_local_homeomorph f f' hf').tendsto_symm | |
(hf.mem_implicit_to_local_homeomorph_source hf')).comp _, | |
rw [implicit_to_local_homeomorph_self], | |
exact hβ.prod_mk_nhds hβ | |
end | |
alias tendsto_implicit_function β _root_.filter.tendsto.implicit_function | |
/-- `implicit_function` sends `(z, y)` to a point in `f β»ΒΉ' z`. -/ | |
lemma map_implicit_function_eq (hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) : | |
βαΆ (p : F Γ f'.ker) in π (f a, 0), f (hf.implicit_function f f' hf' p.1 p.2) = p.1 := | |
by apply map_implicit_function_of_complemented_eq | |
@[simp] lemma implicit_function_apply_image (hf : has_strict_fderiv_at f f' a) | |
(hf' : f'.range = β€) : | |
hf.implicit_function f f' hf' (f a) 0 = a := | |
by apply implicit_function_of_complemented_apply_image | |
/-- Any point in some neighborhood of `a` can be represented as `implicit_function` | |
of some point. -/ | |
lemma eq_implicit_function (hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) : | |
βαΆ x in π a, hf.implicit_function f f' hf' (f x) | |
(hf.implicit_to_local_homeomorph f f' hf' x).snd = x := | |
by apply eq_implicit_function_of_complemented | |
lemma to_implicit_function (hf : has_strict_fderiv_at f f' a) (hf' : f'.range = β€) : | |
has_strict_fderiv_at (hf.implicit_function f f' hf' (f a)) | |
f'.ker.subtypeL 0 := | |
by apply to_implicit_function_of_complemented | |
end finite_dimensional | |
end has_strict_fderiv_at | |