Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
import analysis.convex.hull | |
import data.real.basic | |
import topology.connected | |
import topology.path_connected | |
import topology.algebra.affine | |
import linear_algebra.dimension | |
import linear_algebra.affine_space.midpoint | |
import data.matrix.notation | |
import analysis.convex.topology | |
import to_mathlib.topology.misc | |
/-! | |
The definition of ample subset asks for a vector space structure and a topology on the ambiant type | |
without any link between those structures, but we will only be using these for finite dimensional | |
vector spaces with their natural topology. | |
-/ | |
open set affine_map | |
open_locale convex matrix | |
variables {E F : Type*} [add_comm_group F] [module β F] [topological_space F] | |
variables [add_comm_group E] [module β E] [topological_space E] | |
/-- A subset of a topological real vector space is ample if the convex hull of each of its | |
connected components is the full space. -/ | |
def ample_set (s : set F) : Prop := | |
β x β s, convex_hull β (connected_component_in s x) = univ | |
/-- images of ample sets under continuous linear equivalences are ample. -/ | |
lemma ample_set.image {s : set E} (h : ample_set s) (L : E βL[β] F) : ample_set (L '' s) := | |
begin | |
intros x hx, | |
rw [L.image_eq_preimage] at hx, | |
have : L '' connected_component_in s (L.symm x) = connected_component_in (L '' s) x, | |
{ conv_rhs { rw [β L.apply_symm_apply x] }, | |
exact L.to_homeomorph.image_connected_component_in hx }, | |
rw [β this], | |
refine (L.to_linear_equiv.to_linear_map.convex_hull_image _).trans _, | |
rw [h (L.symm x) hx, image_univ], | |
exact L.to_linear_equiv.to_equiv.range_eq_univ, | |
end | |
/-- preimages of ample sets under continuous linear equivalences are ample. -/ | |
lemma ample_set.preimage {s : set F} (h : ample_set s) (L : E βL[β] F) : ample_set (L β»ΒΉ' s) := | |
by { rw [β L.image_symm_eq_preimage], exact h.image L.symm } | |
section lemma_2_13 | |
local notation `Ο` := submodule.linear_proj_of_is_compl _ _ | |
local attribute [instance, priority 100] topological_add_group.path_connected | |
lemma is_path_connected_compl_of_is_path_connected_compl_zero [topological_add_group F] | |
[has_continuous_smul β F] {p q : submodule β F} (hpq : is_compl p q) | |
(hpc : is_path_connected ({0}αΆ : set p)) : is_path_connected (qαΆ : set F) := | |
begin | |
rw is_path_connected_iff at β’ hpc, | |
split, | |
{ rcases hpc.1 with β¨a, haβ©, | |
exact β¨a, mt (submodule.eq_zero_of_coe_mem_of_disjoint hpq.disjoint) haβ© }, | |
{ intros x hx y hy, | |
have : Ο hpq x β 0 β§ Ο hpq y β 0, | |
{ split; | |
intro h; | |
rw submodule.linear_proj_of_is_compl_apply_eq_zero_iff hpq at h; | |
[exact hx h, exact hy h] }, | |
rcases hpc.2 (Ο hpq x) this.1 (Ο hpq y) this.2 with β¨Ξ³β, hΞ³ββ©, | |
let Ξ³β := path_connected_space.some_path (Ο hpq.symm x) (Ο hpq.symm y), | |
let Ξ³β' : path (_ : F) _ := Ξ³β.map continuous_subtype_coe, | |
let Ξ³β' : path (_ : F) _ := Ξ³β.map continuous_subtype_coe, | |
refine β¨(Ξ³β'.add Ξ³β').cast | |
(submodule.linear_proj_add_linear_proj_of_is_compl_eq_self hpq x).symm | |
(submodule.linear_proj_add_linear_proj_of_is_compl_eq_self hpq y).symm, _β©, | |
intros t, | |
rw [path.cast_coe, path.add_apply], | |
change (Ξ³β t : F) + (Ξ³β t : F) β q, | |
rw [β submodule.linear_proj_of_is_compl_apply_eq_zero_iff hpq, linear_map.map_add, | |
submodule.linear_proj_of_is_compl_apply_right hpq, add_zero, | |
submodule.linear_proj_of_is_compl_apply_eq_zero_iff hpq], | |
exact mt (submodule.eq_zero_of_coe_mem_of_disjoint hpq.disjoint) (hΞ³β t) } | |
end | |
lemma mem_span_of_zero_mem_segment {x y : F} (hx : x β 0) (h : (0 : F) β [x -[β] y]) : | |
y β submodule.span β ({x} : set F) := | |
begin | |
rw segment_eq_image at h, | |
rcases h with β¨t, ht, htxyβ©, | |
rw submodule.mem_span_singleton, | |
dsimp only at htxy, | |
use (t-1)/t, | |
have : t β 0, | |
{ intro h, | |
rw h at htxy, | |
refine hx _, | |
simpa using htxy }, | |
rw [β smul_eq_zero_iff_eq' (neg_ne_zero.mpr $ inv_ne_zero this), | |
smul_add, smul_smul, smul_smul, β neg_one_mul, mul_assoc, mul_assoc, | |
inv_mul_cancel this, mul_one, neg_one_smul, add_neg_eq_zero] at htxy, | |
convert htxy, | |
ring | |
end | |
lemma joined_in_compl_zero_of_not_mem_span [topological_add_group F] [has_continuous_smul β F] | |
{x y : F} (hx : x β 0) (hy : y β submodule.span β ({x} : set F)) : | |
joined_in ({0}αΆ : set F) x y := | |
begin | |
refine joined_in.of_line line_map_continuous.continuous_on | |
(line_map_apply_zero _ _) (line_map_apply_one _ _) _, | |
rw β segment_eq_image_line_map, | |
exact Ξ» t ht (h' : t = 0), (mt (mem_span_of_zero_mem_segment hx) hy) (h' βΈ ht) | |
end | |
lemma is_path_connected_compl_zero_of_two_le_dim [topological_add_group F] [has_continuous_smul β F] | |
(hdim : 2 β€ module.rank β F) : is_path_connected ({0}αΆ : set F) := | |
begin | |
rw is_path_connected_iff, | |
split, | |
{ suffices : 0 < module.rank β F, | |
by rwa dim_pos_iff_exists_ne_zero at this, | |
exact lt_of_lt_of_le (by norm_num) hdim }, | |
{ intros x hx y hy, | |
by_cases h : y β submodule.span β ({x} : set F), | |
{ suffices : β z, z β submodule.span β ({x} : set F), | |
{ rcases this with β¨z, hzxβ©, | |
have hzy : z β submodule.span β ({y} : set F), | |
from Ξ» h', hzx (submodule.mem_span_singleton_trans h' h), | |
exact (joined_in_compl_zero_of_not_mem_span hx hzx).trans | |
(joined_in_compl_zero_of_not_mem_span hy hzy).symm }, | |
by_contra h', | |
push_neg at h', | |
rw β submodule.eq_top_iff' at h', | |
rw [β dim_top β, β h'] at hdim, | |
suffices : (2 : cardinal) β€ 1, | |
from not_le_of_lt (by norm_num) this, | |
have := hdim.trans (dim_span_le _), | |
rwa cardinal.mk_singleton at this }, | |
{ exact joined_in_compl_zero_of_not_mem_span hx h } } | |
end | |
lemma is_path_connected_compl_of_two_le_codim [topological_add_group F] [has_continuous_smul β F] | |
{E : submodule β F} (hcodim : 2 β€ module.rank β (Fβ§ΈE)) : | |
is_path_connected (EαΆ : set F) := | |
begin | |
rcases E.exists_is_compl with β¨E', hE'β©, | |
refine is_path_connected_compl_of_is_path_connected_compl_zero hE'.symm _, | |
refine is_path_connected_compl_zero_of_two_le_dim _, | |
rwa β (E.quotient_equiv_of_is_compl E' hE').dim_eq | |
end | |
lemma is_connected_compl_of_two_le_codim [topological_add_group F] [has_continuous_smul β F] | |
{E : submodule β F} (hcodim : 2 β€ module.rank β (Fβ§ΈE)) : | |
is_connected (EαΆ : set F) := | |
(is_path_connected_compl_of_two_le_codim hcodim).is_connected | |
lemma connected_space_compl_of_two_le_codim [topological_add_group F] [has_continuous_smul β F] | |
{E : submodule β F} (hcodim : 2 β€ module.rank β (Fβ§ΈE)) : | |
connected_space (EαΆ : set F) := | |
is_connected_iff_connected_space.mp (is_connected_compl_of_two_le_codim hcodim) | |
lemma ample_of_two_le_codim [topological_add_group F] [has_continuous_smul β F] | |
{E : submodule β F} (hcodim : 2 β€ module.rank β (Fβ§ΈE)) : | |
ample_set (EαΆ : set F) := | |
begin | |
haveI : connected_space (EαΆ : set F) := connected_space_compl_of_two_le_codim hcodim, | |
intros x hx, | |
have : connected_component_in (βE)αΆ x = (βE)αΆ, | |
from is_preconnected.connected_component_in (is_connected_compl_of_two_le_codim hcodim).2 hx, | |
rw [this, eq_univ_iff_forall], | |
intro y, | |
by_cases h : y β E, | |
{ rcases E.exists_is_compl with β¨E', hE'β©, | |
rw (E.quotient_equiv_of_is_compl E' hE').dim_eq at hcodim, | |
have hcodim' : 0 < module.rank β E' := lt_of_lt_of_le (by norm_num) hcodim, | |
rw dim_pos_iff_exists_ne_zero at hcodim', | |
rcases hcodim' with β¨z, hzβ©, | |
have : y β [y+(-z) -[β] y+z], | |
{ rw β sub_eq_add_neg, | |
exact mem_segment_sub_add y z }, | |
refine (convex_convex_hull β (EαΆ : set F)).segment_subset _ _ this ; | |
refine subset_convex_hull β (EαΆ : set F) _; | |
change _ β E; | |
rw submodule.add_mem_iff_right _ h; | |
try {rw submodule.neg_mem_iff}; | |
exact mt (submodule.eq_zero_of_coe_mem_of_disjoint hE'.symm.disjoint) hz }, | |
{ exact subset_convex_hull β (EαΆ : set F) h } | |
end | |
end lemma_2_13 | |