File size: 3,133 Bytes
e5a97c6 | 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 | import OAI.Combinatorics.MatchingEntropy.Coupling
namespace OAI
noncomputable section
open scoped BigOperators Topology
open Filter
universe uV uE uI uJ uA uB uC uW uF uD uι
namespace MatchingEntropyBounds.LooplessGraph
variable {V : Type uV} {E : Type uE} [Fintype V] [Fintype E] [DecidableEq V] [DecidableEq E]
omit [Fintype V] [Fintype E] [DecidableEq V] in
@[simp] theorem indicator_nonneg (G : LooplessGraph V E) (M : G.Matching) (e : E) :
0 ≤ G.indicator M e := by
simp only [indicator]
split <;> norm_num
omit [Fintype V] [Fintype E] [DecidableEq V] in
@[simp] theorem indicator_le_one (G : LooplessGraph V E) (M : G.Matching) (e : E) :
G.indicator M e ≤ 1 := by
simp only [indicator]
split <;> norm_num
omit [Fintype V] [DecidableEq V] in
theorem continuous_mean (G : LooplessGraph V E) : Continuous G.mean := by
unfold mean
fun_prop
def meanLinear (G : LooplessGraph V E) : (G.Matching → ℝ) →ₗ[ℝ] (E → ℝ) where
toFun := G.mean
map_add' p q := by
ext e
simp [mean, add_mul, Finset.sum_add_distrib]
map_smul' a p := by
ext e
simp [mean, mul_assoc, Finset.mul_sum]
omit [Fintype V] [DecidableEq V] in
theorem mean_mem_polytope (G : LooplessGraph V E) {p : G.Matching → ℝ}
(hp : p ∈ probabilitySimplex G.Matching) : G.mean p ∈ G.polytope := by
have h := (convex_convexHull ℝ (Set.range G.indicator)).sum_mem
(fun M _ ↦ hp.1 M) hp.2 (fun M _ ↦ subset_convexHull ℝ _ (Set.mem_range_self M))
have he : G.mean p = ∑ M, p M • G.indicator M := by
ext e
simp [mean]
rw [he]
exact h
omit [Fintype V] [DecidableEq V] in
@[simp] theorem mean_single (G : LooplessGraph V E) (M : G.Matching) :
G.mean (Pi.single M 1) = G.indicator M := by
classical
ext e
simp [mean, Pi.single_apply, ite_mul]
omit [Fintype V] [DecidableEq V] in
theorem mem_polytope_iff (G : LooplessGraph V E) (y : E → ℝ) :
y ∈ G.polytope ↔ (G.feasibleLaws y).Nonempty := by
classical
constructor
· intro hy
have hc : Convex ℝ (G.mean '' probabilitySimplex G.Matching) :=
(convex_probabilitySimplex G.Matching).linear_image G.meanLinear
have hs : Set.range G.indicator ⊆ G.mean '' probabilitySimplex G.Matching := by
rintro _ ⟨M, rfl⟩
exact ⟨Pi.single M 1, single_mem_probabilitySimplex M, G.mean_single M⟩
obtain ⟨p, hp, rfl⟩ := convexHull_min hs hc hy
exact ⟨p, hp, rfl⟩
· rintro ⟨p, hp, rfl⟩
exact G.mean_mem_polytope hp
omit [Fintype V] [DecidableEq V] in
theorem compact_feasibleLaws (G : LooplessGraph V E) (y : E → ℝ) :
IsCompact (G.feasibleLaws y) := by
exact (isCompact_probabilitySimplex G.Matching).inter_right
(isClosed_eq G.continuous_mean continuous_const)
omit [Fintype V] [DecidableEq V] in
theorem compact_polytope (G : LooplessGraph V E) : IsCompact G.polytope := by
have heq : G.polytope = G.mean '' probabilitySimplex G.Matching := by
ext y
rw [G.mem_polytope_iff]
rfl
rw [heq]
exact (isCompact_probabilitySimplex G.Matching).image G.continuous_mean
end MatchingEntropyBounds.LooplessGraph
end
end OAI
|