Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
Zhangir Azerbayev
I think it's all done!
fc5e983
raw
history blame
21.4 kB
import analysis.calculus.specific_functions
import topology.metric_space.hausdorff_distance
import to_mathlib.topology.misc
import to_mathlib.topology.nhds_set
import to_mathlib.topology.hausdorff_distance
import to_mathlib.linear_algebra.basic
import local.dual_pair
import local.ample
import notations
/-!
# Local partial differential relations and their formal solutions
This file defines `rel_loc E F`, the type of first order partial differential relations
for maps between two real normed spaces `E` and `F`.
To any `R : rel_loc E F` we associate the type `sol R` of maps `f : E β†’ F` of
solutions of `R`, and its formal counterpart `formal_sol R`.
The h-principle question is whether we can deform any formal solution into a solution.
The type of deformations is `htpy_jet_sec E F` (homotopies of 1-jet sections).
Implementation note: the time parameter `t` is any real number, but all the homotopies we will
construct will be constant for `t ≀ 0` and `t β‰₯ 1`. It looks like this imposes more smoothness
constraints at `t = 0` and `t = 1` (requiring flat functions), but this is needed for smooth
concatenations anyway.
This file also defines the ampleness conditions for these relations. Together with openness,
this will guarantee the h-principle (in some other file).
-/
noncomputable theory
open set function module (dual) real filter
open_locale unit_interval topological_space
variables (E : Type*) [normed_add_comm_group E] [normed_space ℝ E] (F : Type*)
[normed_add_comm_group F] [normed_space ℝ F]
@[derive metric_space]
def one_jet := E Γ— F Γ— (E β†’L[ℝ] F)
/-- A first order relation for maps between real vector spaces. -/
def rel_loc := set (one_jet E F)
instance : has_mem (E Γ— F Γ— (E β†’L[ℝ] F)) (rel_loc E F) := set.has_mem
variables {E F}
namespace rel_loc
/-- The slice of a local relation `R : rel_loc E F` for a dual pair `p` at a jet `ΞΈ` is
the set of `w` in `F` such that updating `ΞΈ` using `p` and `w` leads to a jet in `R`. -/
def slice (R : rel_loc E F) (p : dual_pair' E) (ΞΈ : E Γ— F Γ— (E β†’L[ℝ] F)) : set F :=
{w | (θ.1, θ.2.1, p.update θ.2.2 w) ∈ R}
/-- A relation is ample if all its slices are ample. -/
def is_ample (R : rel_loc E F) : Prop := βˆ€ (p : dual_pair' E) (ΞΈ : E Γ— F Γ— (E β†’L[ℝ] F)),
ample_set (R.slice p ΞΈ)
/- FIXME: the proof below is awful. -/
lemma is_ample.mem_hull {R : rel_loc E F} (h : is_ample R) {ΞΈ : E Γ— F Γ— (E β†’L[ℝ] F)}
(hθ : θ ∈ R) (v : F) (p) : v ∈ hull (connected_component_in (R.slice p θ) (θ.2.2 p.v)) :=
begin
rw h p ΞΈ (ΞΈ.2.2 p.v) _,
exact mem_univ _,
dsimp [rel_loc.slice],
rw p.update_self,
cases ΞΈ,
cases ΞΈ_snd,
exact hΞΈ
end
/-- A solution to a local relation `R`. -/
@[ext] structure sol (R : rel_loc E F) :=
(f : E β†’ F)
(f_diff : π’ž ∞ f)
(is_sol : βˆ€ x, (x, f x, D f x) ∈ R)
variables (E)
@[ext] structure jet_sec (F : Type*) [normed_add_comm_group F] [normed_space ℝ F] :=
(f : E β†’ F)
(f_diff : π’ž ∞ f)
(Ο† : E β†’ E β†’L[ℝ] F)
(Ο†_diff : π’ž ∞ Ο†)
variables {E}
def jet_sec.is_formal_sol (𝓕 : jet_sec E F) (R : rel_loc E F) : Prop :=
βˆ€ x, (x, 𝓕.f x, 𝓕.Ο† x) ∈ R
/-- A formal solution to a local relation `R` over a set `U`. -/
@[ext] structure formal_sol (R : rel_loc E F) extends jet_sec E F :=
(is_sol : βˆ€ x, (x, f x, Ο† x) ∈ R)
instance (R : rel_loc E F) : has_coe (formal_sol R) (jet_sec E F):=
⟨formal_sol.to_jet_sec⟩
@[simp] lemma formal_sol.to_jet_sec_eq_coe {R : rel_loc E F} (𝓕 : formal_sol R) :
𝓕.to_jet_sec = (𝓕 : jet_sec E F) := rfl
@[simp] lemma formal_sol.coe_is_formal_sol {R : rel_loc E F} (𝓕 : formal_sol R) :
(𝓕 : jet_sec E F).is_formal_sol R := 𝓕.is_sol
def jet_sec.is_formal_sol.formal_sol {𝓕 : jet_sec E F} {R : rel_loc E F}
(h : 𝓕.is_formal_sol R) : formal_sol R :=
{is_sol := h, ..𝓕}
/-- Inclusion of solutions into formal solutions. -/
def sol.to_formal_sol {R : rel_loc E F} (𝓕 : sol R) : formal_sol R :=
{ f := 𝓕.f,
f_diff := 𝓕.f_diff,
Ο† := D 𝓕.f,
Ο†_diff := (cont_diff_top_iff_fderiv.mp 𝓕.f_diff).2,
is_sol := 𝓕.is_sol }
end rel_loc
namespace rel_loc.jet_sec
open rel_loc
instance : has_coe_to_fun (jet_sec E F) (Ξ» S, E β†’ F Γ— (E β†’L[ℝ] F)) :=
⟨λ 𝓕, Ξ» x, (𝓕.f x, 𝓕.Ο† x)⟩
instance (R : rel_loc E F) (U : set E) : has_coe_to_fun (formal_sol R) (Ξ» S, E β†’ F Γ— (E β†’L[ℝ] F)) :=
⟨λ 𝓕, Ξ» x, (𝓕.f x, 𝓕.Ο† x)⟩
@[simp] lemma formal_sol.coe_apply {R : rel_loc E F} (𝓕 : formal_sol R) (x : E) :
(𝓕 : jet_sec E F) x = 𝓕 x := rfl
lemma jet_sec.eq_iff {𝓕 𝓕' : jet_sec E F} {x : E} :
𝓕 x = 𝓕' x ↔ 𝓕.f x = 𝓕'.f x ∧ 𝓕.Ο† x = 𝓕'.Ο† x :=
begin
split,
{ intro h,
exact ⟨congr_arg prod.fst h, congr_arg prod.snd h⟩ },
{ rintros ⟨h, h'⟩,
ext1,
exacts [h, h'] }
end
variables {R : rel_loc E F}
lemma formal_sol.eq_iff {𝓕 𝓕' : formal_sol R} {x : E} :
𝓕 x = 𝓕' x ↔ 𝓕.f x = 𝓕'.f x ∧ 𝓕.Ο† x = 𝓕'.Ο† x :=
jet_sec.eq_iff
/-- The slice associated to a jet section and a dual pair at some point. -/
def slice_at (𝓕 : jet_sec E F) (R : rel_loc E F) (p : dual_pair' E) (x : E) : set F :=
R.slice p (x, 𝓕.f x, 𝓕.Ο† x)
/-- The slice associated to a formal solution and a dual pair at some point. -/
def _root_.rel_loc.formal_sol.slice_at (𝓕 : formal_sol R) (p : dual_pair' E) (x : E) : set F :=
R.slice p (x, 𝓕.f x, 𝓕.Ο† x)
/-- A jet section `𝓕` is holonomic if its linear map part at `x`
is the derivative of its function part at `x`. -/
def is_holonomic_at (𝓕 : jet_sec E F) (x : E) : Prop := D 𝓕.f x = 𝓕.Ο† x
def _root_.rel_loc.formal_sol.is_holonomic_at (𝓕 : formal_sol R) (x : E) : Prop := D 𝓕.f x = 𝓕.Ο† x
lemma _root_.rel_loc.formal_sol.is_holonomic_at_congr (𝓕 𝓕' : formal_sol R) {s : set E}
(h : βˆ€αΆ  x near s, 𝓕 x = 𝓕' x) : βˆ€αΆ  x near s, 𝓕.is_holonomic_at x ↔ 𝓕'.is_holonomic_at x :=
begin
apply h.eventually_nhds_set.mono,
intros x hx,
have hf : 𝓕.f =αΆ [𝓝 x] 𝓕'.f,
{ apply hx.mono,
simp_rw formal_sol.eq_iff,
tauto },
unfold rel_loc.formal_sol.is_holonomic_at,
rw [hf.fderiv_eq, (formal_sol.eq_iff.mp hx.self_of_nhds).2]
end
lemma _root_.rel_loc.sol.is_holonomic {R : rel_loc E F} (𝓕 : sol R) (x : E) :
𝓕.to_formal_sol.is_holonomic_at x :=
by simp [rel_loc.sol.to_formal_sol, rel_loc.formal_sol.is_holonomic_at]
/-- A formal solution of `R` over `U` that is holonomic at every point of `U`
comes from a genuine solution. -/
def _root_.rel_loc.formal_sol.to_sol (𝓕 : formal_sol R) (h : βˆ€ x, 𝓕.to_jet_sec.is_holonomic_at x) : sol R :=
{ f := 𝓕.f,
f_diff := 𝓕.f_diff,
is_sol := Ξ» x, ((h x).symm β–Έ (𝓕.is_sol x)) }
lemma to_sol_to_formal_sol (𝓕 : sol R) :
𝓕.to_formal_sol.to_sol (Ξ» x, 𝓕.is_holonomic x) = 𝓕 :=
by { ext x, refl }
/-- A formal solution `𝓕` of `R` is partially holonomic in the direction of some subspace `E'`
if its linear map part at `x` is the derivative of its function part at `x` in restriction to
`E'`. -/
def is_part_holonomic_at (𝓕 : jet_sec E F) (E' : submodule ℝ E) (x : E) :=
βˆ€ v ∈ E', D 𝓕.f x v = 𝓕.Ο† x v
lemma _root_.filter.eventually.is_part_holonomic_at_congr {𝓕 𝓕' : jet_sec E F} {s : set E}
(h : βˆ€αΆ  x near s, 𝓕 x = 𝓕' x) (E' : submodule ℝ E) :
βˆ€αΆ  x near s, 𝓕.is_part_holonomic_at E' x ↔ 𝓕'.is_part_holonomic_at E' x :=
begin
apply h.eventually_nhds_set.mono,
intros x hx,
have hf : 𝓕.f =αΆ [𝓝 x] 𝓕'.f,
{ apply hx.mono,
dsimp only,
simp_rw jet_sec.eq_iff,
tauto },
unfold rel_loc.jet_sec.is_part_holonomic_at,
rw [hf.fderiv_eq, (jet_sec.eq_iff.mp hx.self_of_nhds).2]
end
lemma is_part_holonomic_at.sup (𝓕 : jet_sec E F) {E' E'' : submodule ℝ E} {x : E}
(h' : 𝓕.is_part_holonomic_at E' x) (h'' : 𝓕.is_part_holonomic_at E'' x) :
𝓕.is_part_holonomic_at (E' βŠ” E'') x :=
Ξ» v : E, linear_map.eq_on_sup h' h''
lemma _root_.rel_loc.jet_sec.is_part_holonomic_at.mono {𝓕 : jet_sec E F}
{E' E'' : submodule ℝ E} {x : E} (h : 𝓕.is_part_holonomic_at E' x) (h' : E'' ≀ E') :
𝓕.is_part_holonomic_at E'' x :=
Ξ» v v_in, h v $ set_like.coe_subset_coe.mpr h' v_in
def _root_.rel_loc.formal_sol.is_part_holonomic_at (𝓕 : formal_sol R) (E' : submodule ℝ E) (x : E) :=
βˆ€ v ∈ E', D 𝓕.f x v = 𝓕.Ο† x v
lemma _root_.rel_loc.formal_sol.is_part_holonomic_at.mono {𝓕 : formal_sol R}
{E' E'' : submodule ℝ E} {x : E} (h : 𝓕.is_part_holonomic_at E' x) (h' : E'' ≀ E') :
𝓕.is_part_holonomic_at E'' x :=
Ξ» v v_in, h v $ set_like.coe_subset_coe.mpr h' v_in
lemma _root_.is_part_holonomic_top {𝓕 : jet_sec E F} {x : E} :
is_part_holonomic_at 𝓕 ⊀ x ↔ is_holonomic_at 𝓕 x :=
begin
simp only [is_part_holonomic_at, submodule.mem_top, forall_true_left, is_holonomic_at],
rw [← funext_iff, continuous_linear_map.coe_fn_injective.eq_iff]
end
@[simp] lemma is_part_holonomic_bot (𝓕 : jet_sec E F) :
is_part_holonomic_at 𝓕 βŠ₯ = Ξ» x, true :=
begin
ext x,
simp only [is_part_holonomic_at, submodule.mem_bot, forall_eq, map_zero, eq_self_iff_true]
end
lemma mem_slice (𝓕 : formal_sol R) (p : dual_pair' E) {x : E} :
𝓕.Ο† x p.v ∈ 𝓕.slice_at p x :=
by simpa [rel_loc.formal_sol.slice_at, rel_loc.slice] using 𝓕.is_sol x
/-- A formal solution `𝓕` is short for a dual pair `p` at a point `x` if the derivative of
the function `𝓕.f` at `x` is in the convex hull of the relevant connected component of the
corresponding slice. -/
def is_short_at (𝓕 : jet_sec E F) (R : rel_loc E F) (p : dual_pair' E) (x : E) : Prop :=
D 𝓕.f x p.v ∈ hull (connected_component_in (𝓕.slice_at R p x) $ 𝓕.Ο† x p.v)
def _root_.rel_loc.formal_sol.is_short_at (𝓕 : formal_sol R)(p : dual_pair' E) (x : E) : Prop :=
D 𝓕.f x p.v ∈ hull (connected_component_in (𝓕.slice_at p x) $ 𝓕.Ο† x p.v)
lemma _root_.rel_loc.is_ample.is_short_at {R : rel_loc E F} (hR : is_ample R) (𝓕 : formal_sol R) (p : dual_pair' E)
(x : E) : 𝓕.is_short_at p x :=
hR.mem_hull (𝓕.is_sol x) _ p
end rel_loc.jet_sec
section htpy_jet_sec
open rel_loc
variables (E F)
/-- A homotopy of sections of JΒΉ(E, F). -/
structure htpy_jet_sec :=
(f : ℝ β†’ E β†’ F)
(f_diff : π’ž ∞ β†Ώf)
(Ο† : ℝ β†’ E β†’ E β†’L[ℝ] F)
(Ο†_diff : π’ž ∞ β†ΏΟ†)
variables {E F} {R : rel_loc E F}
instance : has_coe_to_fun (htpy_jet_sec E F) (Ξ» S, ℝ β†’ jet_sec E F) :=
⟨λ S t,
{ f := S.f t,
f_diff := S.f_diff.comp (cont_diff_const.prod cont_diff_id),
Ο† := S.Ο† t,
Ο†_diff := S.Ο†_diff.comp (cont_diff_const.prod cont_diff_id) }⟩
namespace htpy_jet_sec
lemma cont_diff_f (𝓕 : htpy_jet_sec E F) {n : with_top β„•} : π’ž n ↿𝓕.f :=
𝓕.f_diff.of_le le_top
lemma cont_diff_Ο† (𝓕 : htpy_jet_sec E F) {n : with_top β„•} : π’ž n ↿𝓕.Ο† :=
𝓕.Ο†_diff.of_le le_top
end htpy_jet_sec
/-- The constant homotopy of formal solutions at a given formal solution. It will be used
as junk value for constructions of formal homotopies that need additional assumptions and also
for trivial induction initialization. -/
def rel_loc.jet_sec.const_htpy (𝓕 : jet_sec E F) : htpy_jet_sec E F :=
{ f := Ξ» t, 𝓕.f,
f_diff := 𝓕.f_diff.snd',
Ο† := Ξ» t, 𝓕.Ο†,
Ο†_diff := 𝓕.Ο†_diff.snd' }
@[simp] lemma rel_loc.jet_sec.const_htpy_apply (𝓕 : jet_sec E F) :
βˆ€ t, 𝓕.const_htpy t = 𝓕 :=
Ξ» t, by ext x ; refl
/-- A smooth step function on `ℝ`. -/
def smooth_step : ℝ β†’ ℝ := Ξ» t, smooth_transition (2 * t - 1/2)
lemma smooth_step.smooth : π’ž ∞ smooth_step :=
smooth_transition.cont_diff.comp $ (cont_diff_id.const_smul (2 : ℝ)).sub cont_diff_const
@[simp]
lemma smooth_step.zero : smooth_step 0 = 0 :=
begin
apply smooth_transition.zero_of_nonpos,
norm_num
end
@[simp]
lemma smooth_step.one : smooth_step 1 = 1 :=
begin
apply smooth_transition.one_of_one_le,
norm_num
end
lemma smooth_step.mem (t : ℝ) : smooth_step t ∈ I :=
⟨smooth_transition.nonneg _, smooth_transition.le_one _⟩
lemma smooth_step.abs_le (t : ℝ) : |smooth_step t| ≀ 1 :=
abs_le.mpr ⟨by linarith [(smooth_step.mem t).1], smooth_transition.le_one _⟩
lemma smooth_step.of_lt {t : ℝ} (h : t < 1/4) : smooth_step t = 0 :=
begin
apply smooth_transition.zero_of_nonpos,
linarith
end
lemma smooth_step.of_gt {t : ℝ} (h : 3/4 < t) : smooth_step t = 1 :=
begin
apply smooth_transition.one_of_one_le,
linarith
end
lemma htpy_jet_sec_comp_aux {f g : ℝ β†’ E β†’ F} (hf : π’ž ∞ β†Ώf) (hg : π’ž ∞ β†Ώg)
(hfg : f 1 = g 0) :
π’ž ∞ β†Ώ(Ξ» t x, if t ≀ 1/2 then f (smooth_step $ 2*t) x else g (smooth_step $ 2*t - 1) x : ℝ β†’ E β†’ F) :=
begin
have s₁ : π’ž ∞ (Ξ» p : ℝ Γ— E, (smooth_step $ 2*p.1, p.2)),
{ change π’ž ∞ ((prod.map smooth_step id) ∘ (Ξ» p : ℝ Γ— E, (2*p.1, p.2))),
apply (smooth_step.smooth.prod_map cont_diff_id).comp,
apply cont_diff.prod,
apply cont_diff_const.mul cont_diff_fst,
apply cont_diff_snd },
replace hf := hf.comp s₁,
have sβ‚‚ : π’ž ∞ (Ξ» p : ℝ Γ— E, (smooth_step $ 2*p.1 - 1, p.2)),
{ change π’ž ∞ ((prod.map smooth_step id) ∘ (Ξ» p : ℝ Γ— E, (2*p.1 - 1, p.2))),
apply (smooth_step.smooth.prod_map cont_diff_id).comp,
apply cont_diff.prod,
apply cont_diff.sub,
apply cont_diff_const.mul cont_diff_fst,
apply cont_diff_const,
apply cont_diff_snd },
replace hg := hg.comp sβ‚‚,
rw cont_diff_iff_cont_diff_at at *,
rintros ⟨tβ‚€ , xβ‚€βŸ©,
rcases lt_trichotomy tβ‚€ (1/2) with ht|rfl|ht,
{ apply (hf (tβ‚€, xβ‚€)).congr_of_eventually_eq,
have : (Iio (1/2) : set ℝ) Γ—Λ’ univ ∈ 𝓝 (tβ‚€, xβ‚€),
from prod_mem_nhds_iff.mpr ⟨Iio_mem_nhds ht, univ_mem⟩,
filter_upwards [this] with p hp,
cases p with t x,
replace hp : t < 1/2 := (prod_mk_mem_set_prod_eq.mp hp).1,
change ite (t ≀ 1 / 2) (f (smooth_step (2 * t)) x) (g (smooth_step (2 * t - 1)) x) = _,
rw if_pos hp.le,
refl },
{ apply (hf (1/2, xβ‚€)).congr_of_eventually_eq,
have : (Ioo (3/8) (5/8) : set ℝ) Γ—Λ’ univ ∈ 𝓝 (1/(2 : ℝ), xβ‚€),
{ refine prod_mem_nhds_iff.mpr ⟨Ioo_mem_nhds _ _, univ_mem⟩ ; norm_num },
filter_upwards [this] with p hp,
cases p with t x,
cases (prod_mk_mem_set_prod_eq.mp hp).1 with lt_t t_lt,
change ite (t ≀ 1 / 2) (f (smooth_step (2 * t)) x) (g (smooth_step (2 * t - 1)) x) = _,
split_ifs,
{ refl },
{ change g _ x = f (smooth_step $ 2*t) x,
apply congr_fun,
rw [show smooth_step (2 * t - 1) = 0, by { apply smooth_step.of_lt, linarith },
show smooth_step (2 * t) = 1, by { apply smooth_step.of_gt, linarith }, hfg] }, },
{ apply (hg (tβ‚€, xβ‚€)).congr_of_eventually_eq,
have : (Ioi (1/2) : set ℝ) Γ—Λ’ univ ∈ 𝓝 (tβ‚€, xβ‚€),
from prod_mem_nhds_iff.mpr ⟨Ioi_mem_nhds ht, univ_mem⟩,
filter_upwards [this] with p hp,
cases p with t x,
replace hp : Β¬ (t ≀ 1/2) := by push_neg ; exact (prod_mk_mem_set_prod_eq.mp hp).1,
change ite (t ≀ 1 / 2) (f (smooth_step (2 * t)) x) (g (smooth_step (2 * t - 1)) x) = _,
rw if_neg hp,
refl }
end
/- begin
have c3 : βˆ€ {n}, π’ž n (Ξ» t : ℝ, 2 * t) :=
Ξ» n, cont_diff_const.mul cont_diff_id,
have c4 : βˆ€ {n}, π’ž n β†Ώ(Ξ» t : ℝ, 2 * t - 1) :=
Ξ» n, (cont_diff_const.mul cont_diff_id).sub cont_diff_const,
have c5 : βˆ€ {n}, π’ž n (Ξ» t, smooth_step $ 2 * t) :=
Ξ» n, smooth_transition.cont_diff.comp c3,
have c6 : βˆ€ {n}, π’ž n β†Ώ(Ξ» t, smooth_step $ 2*t - 1) :=
Ξ» n, smooth_transition.cont_diff.comp c4,
have h1 : βˆ€ {n}, π’ž n β†Ώ(Ξ» t, f (smooth_step $ 2*t)) :=
Ξ» n, hf.compβ‚‚ c5.fst' cont_diff_snd,
have h2 : βˆ€ {n}, π’ž n β†Ώ(Ξ» t, g (smooth_step $ 2*t - 1)) :=
Ξ» n, hg.compβ‚‚ c6.fst' cont_diff_snd,
refine h1.if_le_of_fderiv h2 cont_diff_fst cont_diff_const _,
rintro ⟨t, x⟩ n ht,
dsimp only at ht,
subst ht,
simp [has_uncurry.uncurry],
cases n,
{ simp [iterated_fderiv_zero_eq_comp, hfg], },
rw [iterated_fderiv_of_partial, iterated_fderiv_of_partial],
{ simp [has_uncurry.uncurry, hfg],
congr' 1,
refine (iterated_fderiv_comp (hf.compβ‚‚ cont_diff_id cont_diff_const) c5 _).trans _,
convert continuous_multilinear_map.comp_zero _,
{ ext1 i, refine (iterated_fderiv_comp smooth_transition.cont_diff c3 _).trans _,
convert continuous_multilinear_map.zero_comp _, simp },
refine (iterated_fderiv_comp (hg.compβ‚‚ cont_diff_id cont_diff_const) c6 _).trans _,
convert continuous_multilinear_map.comp_zero _,
{ ext1 i, refine (iterated_fderiv_comp smooth_transition.cont_diff c4 _).trans _,
convert continuous_multilinear_map.zero_comp _, simp [has_uncurry.uncurry] } },
{ exact Ξ» x, h2.compβ‚‚ cont_diff_const cont_diff_id },
{ exact Ξ» y, h2.compβ‚‚ cont_diff_id cont_diff_const },
{ exact Ξ» x, h1.compβ‚‚ cont_diff_const cont_diff_id },
{ exact Ξ» y, h1.compβ‚‚ cont_diff_id cont_diff_const },
end -/
/-- Concatenation of homotopies of formal solution. The result depend on our choice of
a smooth step function in order to keep smoothness with respect to the time parameter. -/
def htpy_jet_sec.comp (𝓕 𝓖 : htpy_jet_sec E F) (h : 𝓕 1 = 𝓖 0) : htpy_jet_sec E F :=
{ f := Ξ» t x, if t ≀ 1/2 then 𝓕.f (smooth_step $ 2*t) x else 𝓖.f (smooth_step $ 2*t - 1) x,
f_diff :=
htpy_jet_sec_comp_aux 𝓕.f_diff 𝓖.f_diff (show (𝓕 1).f = (𝓖 0).f, by rw h),
Ο† := Ξ» t x, if t ≀ 1/2 then 𝓕.Ο† (smooth_step $ 2*t) x else 𝓖.Ο† (smooth_step $ 2*t - 1) x,
Ο†_diff :=
htpy_jet_sec_comp_aux 𝓕.Ο†_diff 𝓖.Ο†_diff (show (𝓕 1).Ο† = (𝓖 0).Ο†, by rw h) }
@[simp]
lemma htpy_jet_sec.comp_of_le (𝓕 𝓖 : htpy_jet_sec E F) (h) {t : ℝ} (ht : t ≀ 1/2) :
𝓕.comp 𝓖 h t = 𝓕 (smooth_step $ 2*t) :=
begin
dsimp [htpy_jet_sec.comp],
ext x,
change (if t ≀ 1/2 then _ else _) = _,
rw if_pos ht,
refl,
ext1 x,
change (if t ≀ 1 / 2 then _ else _) = (𝓕 _).Ο† x,
rw if_pos ht,
refl
end
@[simp]
lemma htpy_jet_sec.comp_0 (𝓕 𝓖 : htpy_jet_sec E F) (h) : 𝓕.comp 𝓖 h 0 = 𝓕 0 :=
begin
rw htpy_jet_sec.comp_of_le _ _ h (by norm_num : (0 : ℝ) ≀ 1/2),
simp
end
@[simp]
lemma htpy_jet_sec.comp_of_not_le (𝓕 𝓖 : htpy_jet_sec E F) (h) {t : ℝ} (ht : Β¬ t ≀ 1/2) :
𝓕.comp 𝓖 h t = 𝓖 (smooth_step $ 2*t - 1) :=
begin
dsimp [htpy_jet_sec.comp],
ext x,
change (if t ≀ 1/2 then _ else _) = _,
rw if_neg ht,
refl,
ext1 x,
change (if t ≀ 1 / 2 then _ else _) = (𝓖 _).Ο† x,
rw if_neg ht,
refl
end
@[simp]
lemma htpy_jet_sec.comp_1 (𝓕 𝓖 : htpy_jet_sec E F) (h) : 𝓕.comp 𝓖 h 1 = 𝓖 1 :=
begin
rw htpy_jet_sec.comp_of_not_le _ _ h (by norm_num : Β¬ (1 : ℝ) ≀ 1/2),
norm_num
end
end htpy_jet_sec
section immersions
open rel_loc submodule finite_dimensional
local notation `dim` := finrank ℝ
variables (E F)
def rel_immersion_loc : rel_loc E F :=
{p | injective p.2.2}
variables {E F} [finite_dimensional ℝ E] [finite_dimensional ℝ F]
-- TODO: cleanup the next proof
lemma rel_immersion_loc.ample (h : finrank ℝ E < finrank ℝ F): is_ample (rel_immersion_loc E F) :=
begin
rintros p ⟨e, f, Ο†βŸ© w hw,
have : (rel_immersion_loc E F).slice p (e, f, Ο†) = (map Ο†.to_linear_map p.Ο€.ker)ᢜ,
{ ext w',
change injective (p.update Ο† w') ↔ w' βˆ‰ Ο† '' p.Ο€.ker,
split,
{ rintros h ⟨u, hu, rfl⟩,
have : p.update Ο† (Ο† u) p.v = Ο† u,
exact p.update_v Ο† (Ο† u),
conv_rhs at this { rw ← p.update_ker_pi Ο† (Ο† u) hu },
rw ← h this at hu,
simp only [set_like.mem_coe, continuous_linear_map.mem_ker] at hu,
rw p.pairing at hu,
linarith},
{ intros h u u' huu',
rcases p.decomp u with ⟨a, ha, t, rfl⟩,
rcases p.decomp u' with ⟨a', ha', t', rfl⟩,
suffices : (t - t') β€’ p.v = a' - a,
{ rw [sub_smul] at this,
rw eq_add_of_sub_eq' this,
abel },
have : Ο† a + t β€’ w' = Ο† a' + t' β€’ w',
by simpa [(p.update Ο† w').map_add, ha, ha'] using huu',
have hw' : (t -t') β€’ w' = Ο† (a' - a),
{ rw [sub_smul, Ο†.map_sub],
rw eq_sub_of_add_eq this,
abel },
have haa' : a' - a ∈ p.Ο€.ker := p.Ο€.ker.sub_mem ha' ha,
have ht : t - t' = 0,
{ by_contra' ht,
apply h,
refine ⟨(t - t')⁻¹ β€’ (a' - a), p.Ο€.ker.smul_mem _ haa', _⟩,
have := congr_arg (Ξ» u : F, (t - t')⁻¹ β€’ u) hw',
simp [ht] at this,
rwa [← Ο†.map_sub, ← Ο†.map_smul, eq_comm] at this },
rw [eq_comm, ht, zero_smul] at hw' ⊒,
rw [← p.update_ker_pi Ο† w haa', ← (p.update Ο† w).map_zero] at hw',
exact hw hw' } },
rw this at *,
apply ample_of_two_le_codim _ _ hw,
suffices : 2 ≀ dim (F β§Έ map Ο†.to_linear_map p.Ο€.ker),
{ rw ← finrank_eq_dim,
exact_mod_cast this },
have := finrank_quotient_add_finrank (map Ο†.to_linear_map p.Ο€.ker),
apply le_of_add_le_add_right,
rw this,
have := calc
dim (map Ο†.to_linear_map p.Ο€.ker) ≀ dim p.Ο€.ker : finrank_map_le ℝ Ο†.to_linear_map p.Ο€.ker
... < dim E : finrank_lt (le_top.lt_of_ne p.ker_pi_ne_top),
linarith
end
end immersions