File size: 3,794 Bytes
92416a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import Mathlib
import OAI.Computability.VertexCover.Basic
import OAI.Computability.VertexCover.PCP.PreprocessingOverlayTables
import OAI.Computability.VertexCover.Analysis.GraphCompleteness

namespace OAI

section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
namespace VertexCover.ExplicitGraph
noncomputable section

def materialize {V : Type*} [Fintype V] (G : SimpleGraph V) : ExplicitGraph := by
  classical
  let e : V ≃ Fin (Fintype.card V) := Fintype.equivFin V
  let E : Finset (Fin (Fintype.card V) × Fin (Fintype.card V)) :=
    Finset.univ.filter (fun p => p.1 < p.2 ∧ G.Adj (e.symm p.1) (e.symm p.2))
  exact ⟨Fintype.card V, E.toList,
    fun p hp => (Finset.mem_filter.mp (Finset.mem_toList.mp hp)).2.1,
    E.nodup_toList⟩

 theorem materialize_n {V : Type*} [Fintype V] (G : SimpleGraph V) :
    (materialize G).n = Fintype.card V := rfl

 theorem materialize_mem_edges {V : Type*} [Fintype V] (G : SimpleGraph V)
    (v w : Fin (Fintype.card V)) :
    (v,w) ∈ (materialize G).edges ↔
      v < w ∧ G.Adj ((Fintype.equivFin V).symm v) ((Fintype.equivFin V).symm w) := by
  classical
  change (v,w) ∈ (Finset.univ.filter (fun p : Fin (Fintype.card V) × Fin (Fintype.card V) =>
    p.1 < p.2 ∧ G.Adj ((Fintype.equivFin V).symm p.1)
      ((Fintype.equivFin V).symm p.2))).toList ↔ _
  exact Finset.mem_toList.trans (by simp only [Finset.mem_filter, Finset.mem_univ, true_and])

 theorem coverNumber_le {G : ExplicitGraph} (C : Finset (Fin G.n)) (hC : G.Cover C) :
    G.coverNumber ≤ C.card := Nat.find_min' _ ⟨C,hC,rfl⟩

 theorem materialize_cover {V : Type*} [Fintype V] (G : SimpleGraph V)
    (C : Finset V) (hC : G.IsVertexCover (C : Set V)) :
    ∃ S : Finset (Fin (materialize G).n), (materialize G).Cover S ∧ S.card = C.card := by
  classical
  let e := Fintype.equivFin V
  refine ⟨C.map e.toEmbedding, ?_, Finset.card_map _⟩
  intro p hp
  have h := ((materialize_mem_edges G p.1 p.2).mp hp).2
  have hh := hC h
  rcases hh with hv | hw
  · left
    exact Finset.mem_map.mpr ⟨e.symm p.1, hv, e.apply_symm_apply _⟩
  · right
    exact Finset.mem_map.mpr ⟨e.symm p.2, hw, e.apply_symm_apply _⟩

 theorem materialize_coverNumber_lt {V : Type*} [Fintype V] (G : SimpleGraph V)
    (C : Finset V) (hC : G.IsVertexCover (C : Set V)) (ρ : ℝ)
    (hcard : (C.card : ℝ) < ρ * Fintype.card V) :
    ((materialize G).coverNumber : ℝ) < ρ * (materialize G).n := by
  obtain ⟨S, hS, hScard⟩ := materialize_cover G C hC
  have hle := coverNumber_le S hS
  rw [hScard] at hle
  exact (Nat.cast_le.mpr hle).trans_lt hcard

end
end VertexCover.ExplicitGraph

namespace VertexCover.LabelCover
noncomputable section

def explicitGraph (Φ : LabelCover) (m : ℕ) : ExplicitGraph :=
  ExplicitGraph.materialize (Φ.graph (Parameters.d m) (Parameters.t m))

 theorem explicitGraph_vertices (Φ : LabelCover) (m : ℕ) :
    (Φ.explicitGraph m).n = Φ.M^((Parameters.d m).choose 2) *
      (2*Parameters.d m+1)^(Φ.WeightDimension (Parameters.d m) * Parameters.d m) :=
  Φ.vertex_card _

 theorem explicitGraph_complete (Φ : LabelCover) (m : ℕ) (hm : 4 ≤ m)
    (A : Φ.Labeling) (hA : ∀ e, Φ.Satisfies A e) :
    ((Φ.explicitGraph m).coverNumber : ℝ) <
      ((1:ℝ)/2+1/(m:ℝ)) * (Φ.explicitGraph m).n := by
  obtain ⟨C, hC, hcard⟩ := Φ.graph_completeness_cover m hm A hA
  exact ExplicitGraph.materialize_coverNumber_lt _ C hC _ hcard

end
end VertexCover.LabelCover


end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end

end OAI