File size: 3,030 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
import Mathlib
import OAI.Computability.VertexCover.Reduction.Soundness
import OAI.Computability.VertexCover.Reduction.GraphSoundness

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

theorem coverNumber_witness (G : ExplicitGraph) :
    ∃ S : Finset (Fin G.n), G.Cover S ∧ S.card = G.coverNumber := by
  have hex : ∃ k : ℕ, ∃ S : Finset (Fin G.n), G.Cover S ∧ S.card = k :=
    ⟨G.n, Finset.univ, by simp [Cover], by simp⟩
  exact Nat.find_spec hex

theorem materialize_cover_reflects {V : Type*} [Fintype V] (G : SimpleGraph V)
    (S : Finset (Fin (materialize G).n)) (hS : (materialize G).Cover S) :
    ∃ C : Finset V, G.IsVertexCover (C : Set V) ∧ C.card = S.card := by
  classical
  let e := Fintype.equivFin V
  let C := S.map e.symm.toEmbedding
  have hmem (v : V) : v ∈ C ↔ e v ∈ S := by
    exact Finset.mem_map_equiv
  refine ⟨C, ?_, Finset.card_map _⟩
  intro v w hvw
  have hne : e v ≠ e w := fun he => G.ne_of_adj hvw (e.injective he)
  rcases lt_or_gt_of_ne hne with hlt | hgt
  · have hp := hS (e v, e w) ((materialize_mem_edges G (e v) (e w)).mpr
      ⟨hlt, by simpa only [e, Equiv.symm_apply_apply] using hvw⟩)
    exact hp.imp (hmem v).mpr (hmem w).mpr
  · have hp := hS (e w, e v) ((materialize_mem_edges G (e w) (e v)).mpr
      ⟨hgt, by simpa only [e, Equiv.symm_apply_apply] using hvw.symm⟩)
    exact hp.symm.imp (hmem v).mpr (hmem w).mpr

theorem materialize_coverNumber_gt {V : Type*} [Fintype V] (G : SimpleGraph V)
    (ρ : ℝ) (h : ∀ C : Finset V, G.IsVertexCover (C : Set V) →
      ρ * Fintype.card V < (C.card:ℝ)) :
    ρ * (materialize G).n < ((materialize G).coverNumber:ℝ) := by
  obtain ⟨S, hS, hmin⟩ := coverNumber_witness (materialize G)
  obtain ⟨C, hC, hcard⟩ := materialize_cover_reflects G S hS
  have hc := h C hC
  rw [hcard, hmin] at hc
  exact hc

end VertexCover.ExplicitGraph

namespace VertexCover.LabelCover

theorem explicitGraph_sound (Φ : LabelCover) (m : ℕ) (hm : 4 ≤ m)
    (hval : Φ.value ≤ Parameters.σ m) :
    (1-1/(m:ℝ))*(Φ.explicitGraph m).n < ((Φ.explicitGraph m).coverNumber:ℝ) := by
  exact ExplicitGraph.materialize_coverNumber_gt _ _ (Φ.graph_soundness_cover m hm hval)

end VertexCover.LabelCover

namespace VertexCover
noncomputable section

theorem rawGraph_soundness (m : ℕ) (hm : 4 ≤ m) (input : List Bool)
    (h : ¬ ThreeSAT input) :
    (1 - 1 / (m : ℝ)) * (rawGraph m hm input).n <
      ((rawGraph m hm input).coverNumber : ℝ) := by
  exact LabelCover.explicitGraph_sound _ m hm
    (le_of_lt (rawLabelCover_soundness m hm input h))

end
end VertexCover
end

section
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