File size: 5,035 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import Mathlib

namespace OAI

/-!
Finite polyhedra, local perturbations, and quotient dimension bounds.
-/

noncomputable section

open scoped BigOperators Topology
open Filter

namespace MatchingEntropy

section PolyhedralPrelude
variable {I J : Type*} [Fintype I] [Fintype J]

def finitePolyhedron (L : I β†’ (J β†’ ℝ) β†’β‚—[ℝ] ℝ) (b : I β†’ ℝ) : Set (J β†’ ℝ) :=
  {x | βˆ€ i, L i x ≀ b i}

/-- Finite slack, with every active equation preserved, permits both signs. -/
theorem finitePolyhedron_eventually_line (L : I β†’ (J β†’ ℝ) β†’β‚—[ℝ] ℝ) (b : I β†’ ℝ)
    {x : J β†’ ℝ} (hx : x ∈ finitePolyhedron L b) (u : J β†’ ℝ)
    (hu : βˆ€ i, L i x = b i β†’ L i u = 0) :
    βˆ€αΆ  t : ℝ in 𝓝 0, x+t β€’ u ∈ finitePolyhedron L b := by
  apply Filter.eventually_all.mpr
  intro i
  by_cases hi : L i x=b i
  Β· apply Filter.Eventually.of_forall
    intro t
    rw [map_add, map_smul, hu i hi, smul_zero, add_zero, hi]
  Β· have hlt : L i x < b i := lt_of_le_of_ne (hx i) hi
    have hc : Continuous (fun t : ℝ => L i (x+t β€’ u)) :=
      (L i).continuous_of_finiteDimensional.comp (by fun_prop)
    have hh : βˆ€αΆ  t : ℝ in 𝓝 0, L i (x+t β€’ u) < b i :=
      (isOpen_lt hc continuous_const).mem_nhds (by simpa using hlt : L i (x+(0:ℝ) β€’ u) < b i)
    exact hh.mono fun t ht => le_of_lt ht

/-- Radial expansion about x preserves every active inequality for arbitrary
nearby feasible points. Inactive inequalities are handled by finite slack. -/
theorem finitePolyhedron_eventually_expand (L : I β†’ (J β†’ ℝ) β†’β‚—[ℝ] ℝ) (b : I β†’ ℝ)
    {x : J β†’ ℝ} (hx : x ∈ finitePolyhedron L b) {t : ℝ} (ht : 0 < t) :
    βˆ€αΆ  y in 𝓝[finitePolyhedron L b] x, x+t⁻¹ β€’ (y-x) ∈ finitePolyhedron L b := by
  apply Filter.eventually_all.mpr
  intro i
  by_cases hi : L i x=b i
  Β· filter_upwards [eventually_mem_nhdsWithin] with y hy
    rw [map_add, map_smul, map_sub, hi]
    change b i+t⁻¹ * (L i y-b i) ≀ b i
    have hh := mul_nonpos_of_nonneg_of_nonpos (inv_nonneg.mpr ht.le) (sub_nonpos.mpr (hy i))
    linarith
  Β· have hlt : L i x < b i := lt_of_le_of_ne (hx i) hi
    have hc : Continuous (fun y : J β†’ ℝ => L i (x+t⁻¹ β€’ (y-x))) :=
      (L i).continuous_of_finiteDimensional.comp (by fun_prop)
    have hh : βˆ€αΆ  y : J β†’ ℝ in 𝓝 x, L i (x+t⁻¹ β€’ (y-x)) < b i :=
      (isOpen_lt hc continuous_const).mem_nhds (by simpa using hlt : L i (x+t⁻¹ β€’ (x-x)) < b i)
    exact (hh.filter_mono nhdsWithin_le_nhds).mono fun y hy => le_of_lt hy

omit [Fintype J] in
theorem extreme_point_direction_zero (P : Set (J β†’ ℝ)) {x : J β†’ ℝ}
    (hx : x ∈ Set.extremePoints ℝ P) (u : J β†’ ℝ)
    (hu : βˆ€αΆ  t : ℝ in 𝓝 0, x+t β€’ u ∈ P) : u=0 := by
  have hu' : βˆ€αΆ  t : ℝ in 𝓝 0, x+(-t) β€’ u ∈ P := by
    have hc : Tendsto (fun t : ℝ => -t) (𝓝 0) (𝓝 0) := by simpa using (continuous_neg.tendsto (0:ℝ))
    exact hc.eventually hu
  -- choose a strictly positive point using the right-hand punctured neighborhood
  have hh : βˆ€αΆ  t : ℝ in 𝓝[>] 0, (x+t β€’ u ∈ P ∧ x+(-t) β€’ u ∈ P) ∧ 0<t :=
    ((hu.and hu').filter_mono nhdsWithin_le_nhds).and eventually_mem_nhdsWithin
  obtain ⟨a,⟨ha,hna⟩,ha0⟩ := hh.exists
  have hseg : x ∈ openSegment ℝ (x+a β€’ u) (x+(-a) β€’ u) := by
    refine ⟨1/2,1/2,by norm_num,by norm_num,by norm_num,?_⟩
    ext j
    simp only [Pi.add_apply, Pi.smul_apply, smul_eq_mul]
    ring
  have he := (mem_extremePoints.mp hx).2 _ ha _ hna hseg |>.1
  ext j
  have hj := congrFun he j
  change x j+a*u j=x j at hj
  change u j=0
  exact (mul_eq_zero.mp (by linarith : a*u j=0)).resolve_left (ne_of_gt ha0)


section LinearHelper
open Module
variable {A B C : Type*} [AddCommGroup A] [AddCommGroup B] [AddCommGroup C]
  [Module ℝ A] [Module ℝ B] [Module ℝ C]
  [FiniteDimensional ℝ A] [FiniteDimensional ℝ B] [FiniteDimensional ℝ C]

theorem quotient_finrank_le_of_ker_le (U : Submodule ℝ A) (f : A β†’β‚—[ℝ] B)
    (h : f.ker ≀ U) : finrank ℝ (A β§Έ U) ≀ finrank ℝ B := by
  have h1 := U.finrank_quotient_add_finrank
  have h2 := f.finrank_range_add_finrank_ker
  have h3 := Submodule.finrank_mono h
  have h4 : finrank ℝ f.range ≀ finrank ℝ B := Submodule.finrank_le _
  omega

theorem quotient_finrank_le_pair (U : Submodule ℝ A) (W : Submodule ℝ B) (Z : Submodule ℝ C)
    (f : A β†’β‚—[ℝ] B) (g : A β†’β‚—[ℝ] C)
    (h : βˆ€ u, f u ∈ W β†’ g u ∈ Z β†’ u ∈ U) :
    finrank ℝ (A β§Έ U) ≀ finrank ℝ (B β§Έ W)+finrank ℝ (C β§Έ Z) := by
  let F := (W.mkQ.comp f).prod (Z.mkQ.comp g)
  have hk : F.ker ≀ U := by
    intro u hu
    have hh : (W.mkQ (f u), Z.mkQ (g u))=0 := hu
    have hW : f u ∈ W := by
      have hq := congrArg Prod.fst hh
      simpa using hq
    have hZ : g u ∈ Z := by
      have hq := congrArg Prod.snd hh
      simpa using hq
    exact h u hW hZ
  simpa using quotient_finrank_le_of_ker_le U F hk

end LinearHelper
end PolyhedralPrelude

end MatchingEntropy

end

end OAI