File size: 4,198 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 152 153 154 155 156 157 158 159 160 161 | import Mathlib
import OAI.Computability.VertexCover.Analysis.PowerValueRepetition
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.ClauseProjection
open UniqueGames.Foundations
open LabelCover
noncomputable section
def baseGap : ℝ := (PCP.PCPIteration.finalClauseGap : ℝ) / 3
theorem baseGap_pos : 0 < baseGap := by
exact div_pos (Rat.cast_pos.mpr PCP.PCPIteration.finalClauseGap_positive) (by norm_num)
theorem baseGap_le_third : baseGap ≤ 1/3 := by
exact div_le_div_of_nonneg_right
(by exact_mod_cast PCP.TableGapReduction.finalClauseGap_le_one) (by norm_num)
def repetitionAlphabetBudget : ℝ := max 1 (Repetition.logTwo 14)
theorem repetitionAlphabetBudget_pos : 0 < repetitionAlphabetBudget :=
lt_of_lt_of_le zero_lt_one (le_max_left _ _)
def repetitionBase : ℝ := 1 - baseGap ^ 3 / 6000
theorem repetitionBase_mem : 0 < repetitionBase ∧ repetitionBase < 1 := by
have hp := baseGap_pos
have hu := baseGap_le_third
have hc : baseGap ^ 3 ≤ 1 := by
calc
_ ≤ (1 : ℝ)^3 := pow_le_pow_left₀ hp.le (by linarith) 3
_ = 1 := by norm_num
constructor
· unfold repetitionBase; linarith
· unfold repetitionBase; have : 0 < baseGap^3 / 6000 := by positivity
linarith
theorem exists_repetition_length (σ : ℝ) (hσ : 0 < σ) :
∃ n : ℕ, repetitionBase ^ ((n : ℝ) / repetitionAlphabetBudget) < σ := by
have hr := Real.rpow_lt_one repetitionBase_mem.1.le repetitionBase_mem.2
(one_div_pos.mpr repetitionAlphabetBudget_pos)
obtain ⟨n, hn⟩ := exists_pow_lt_of_lt_one hσ hr
refine ⟨n, ?_⟩
have he : (n : ℝ) / repetitionAlphabetBudget =
(1 / repetitionAlphabetBudget) * (n : ℝ) := by ring
rw [he, Real.rpow_mul repetitionBase_mem.1.le, Real.rpow_natCast]
exact hn
def repetitionLength (σ : ℝ) (hσ : 0 < σ) : ℕ :=
(exists_repetition_length σ hσ).choose
def reduction (σ : ℝ) (hσ : 0 < σ) (F : Target.Formula) : LabelCover :=
(baseReduction F).parallelPower (repetitionLength σ hσ)
theorem reduction_alphabets (σ : ℝ) (hσ : 0 < σ) (F : Target.Formula) :
(reduction σ hσ F).qU = 7 ^ repetitionLength σ hσ ∧
(reduction σ hσ F).qV = 2 ^ repetitionLength σ hσ := ⟨rfl, rfl⟩
theorem reduction_complete (σ : ℝ) (hσ : 0 < σ) (F : Target.Formula)
(hF : F.Satisfiable) :
∃ A : (reduction σ hσ F).Labeling, ∀ e, (reduction σ hσ F).Satisfies A e := by
obtain ⟨A, hA⟩ := baseReduction_complete F hF
exact ⟨_, LabelCover.repeat_perfect _ _ A hA⟩
theorem reduction_sound (σ : ℝ) (hσ : 0 < σ) (F : Target.Formula)
(hF : ¬F.Satisfiable) : (reduction σ hσ F).value < σ := by
let Φ := baseReduction F
let n := repetitionLength σ hσ
let : Nonempty (Fin Φ.qU) := ⟨⟨0, Φ.qU_pos⟩⟩
let : Nonempty (Fin Φ.qV) := ⟨⟨0, Φ.qV_pos⟩⟩
have hv : Φ.asGame.value ≤ 1 - baseGap := by
change Φ.asGameValue ≤ 1 - baseGap
rw [LabelCover.asGameValue_eq Φ (baseReduction_coherent F)]
exact baseReduction_sound F hF
have hb := Repetition.holenstein_repetition_value Φ.asGame n hv
(by have := baseGap_pos; linarith : 1 - baseGap < 1)
(le_max_left 1 (Repetition.logTwo 14))
(show Repetition.logTwo ((Fintype.card (Fin Φ.qU) : ℝ) *
(Fintype.card (Fin Φ.qV) : ℝ)) ≤ repetitionAlphabetBudget from by
change Repetition.logTwo ((7 : ℝ) * 2) ≤ repetitionAlphabetBudget
norm_num only [show (7 : ℝ) * 2 = 14 by norm_num]
exact le_max_right _ _)
have he : 1 - (1 - (1 - baseGap)) ^ 3 / 6000 = repetitionBase := by
unfold repetitionBase; ring
rw [he] at hb
exact lt_of_le_of_lt ((LabelCover.power_value_le_repetition Φ
(baseReduction_coherent F) n).trans hb)
(exists_repetition_length σ hσ).choose_spec
end
end VertexCover.ClauseProjection
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
|