Buckets:
| import Mathlib | |
| import OAI.Computability.VertexCover.PCP.PreprocessingGuarantees | |
| import OAI.Computability.VertexCover.PCP.PoweringTableSemantics | |
| import OAI.Computability.VertexCover.PCP.AlphabetTableBounds | |
| import OAI.Computability.VertexCover.PCP.RawInitialTables | |
| import OAI.Computability.VertexCover.PCP.FinalConstants | |
| namespace OAI | |
| namespace UniqueGames.Foundations.PCP.RoundTables | |
| abbrev BaseTable := PreprocessingTables.BaseTable | |
| opaque fixedWalkParameter : {n : Nat // n = 2 * FinalConstants.endpointLength} := | |
| ⟨2 * FinalConstants.endpointLength, rfl⟩ | |
| def walkParameter : Nat := fixedWalkParameter.val | |
| theorem walkParameter_eq : walkParameter = 2 * FinalConstants.endpointLength := | |
| fixedWalkParameter.property | |
| def alphabet : Nat := PoweringTables.labelCount PreprocessingTables.degree walkParameter | |
| theorem alphabet_positive : 0 < alphabet := by | |
| unfold alphabet PoweringTables.labelCount | |
| exact Nat.pow_pos (by decide) | |
| def powered (H : BaseTable) (table : GraphTables.Table) : GenericGraphTables.Table alphabet := | |
| PoweringTables.table (PreprocessingTables.preprocess H table) walkParameter | |
| def build (H : BaseTable) (table : GraphTables.Table) : GraphTables.Table := | |
| AlphabetTable.Table.build (powered H table) | |
| def sizeFactor : Nat := AlphabetGraphBounds.sizeFactor alphabet * | |
| (ExpanderFamily.growth ^ 2 * (1 + 2 * PreprocessingTables.degree ^ (walkParameter + 1))) | |
| theorem degree_positive : 0 < PreprocessingTables.degree := by | |
| unfold PreprocessingTables.degree | |
| omega | |
| theorem dartFactor_positive (q : Nat) : 0 < AlphabetGraphBounds.dartFactor q := by | |
| unfold AlphabetGraphBounds.dartFactor AlphabetGraphBounds.localEventFactor | |
| positivity | |
| theorem sizeFactor_positive : 0 < sizeFactor := by | |
| unfold sizeFactor | |
| apply Nat.mul_pos (AlphabetGraphBounds.sizeFactor_positive alphabet) | |
| apply Nat.mul_pos | |
| · exact Nat.pow_pos (Nat.zero_lt_one.trans ExpanderFamily.growth_gt_one) | |
| · omega | |
| theorem powered_vertices (H : BaseTable) (table : GraphTables.Table) : | |
| (powered H table).vertices = PreprocessingTables.vertices table := rfl | |
| theorem powered_darts (H : BaseTable) (table : GraphTables.Table) : | |
| (powered H table).darts = 2 * PreprocessingTables.vertices table * | |
| PreprocessingTables.degree ^ (walkParameter + 1) := rfl | |
| theorem build_darts_positive (H : BaseTable) (table : GraphTables.Table) : | |
| 0 < (build H table).darts := by | |
| change 0 < (AlphabetTable.Table.build (powered H table)).darts | |
| rw [AlphabetTableBounds.build_darts, powered_darts] | |
| exact Nat.mul_pos (Nat.mul_pos | |
| (Nat.mul_pos (by decide) (PreprocessingTables.vertices_positive table)) | |
| (Nat.pow_pos degree_positive)) (dartFactor_positive alphabet) | |
| theorem build_size_le (H : BaseTable) (table : GraphTables.Table) | |
| (ht : 0 < table.darts) : | |
| (build H table).vertices + (build H table).darts ≤ | |
| sizeFactor * (table.vertices + table.darts) := by | |
| have hv := PreprocessingTables.vertices_le_of_positive table ht | |
| have he : (powered H table).vertices + (powered H table).darts = | |
| PreprocessingTables.vertices table * | |
| (1 + 2 * PreprocessingTables.degree ^ (walkParameter + 1)) := by | |
| rw [powered_vertices, powered_darts] | |
| ring | |
| have hp := Nat.mul_le_mul_right | |
| (1 + 2 * PreprocessingTables.degree ^ (walkParameter + 1)) hv | |
| calc | |
| _ ≤ AlphabetGraphBounds.sizeFactor alphabet * | |
| ((powered H table).vertices + (powered H table).darts) := | |
| AlphabetTableBounds.build_total_le (powered H table) | |
| _ = AlphabetGraphBounds.sizeFactor alphabet * | |
| (PreprocessingTables.vertices table * | |
| (1 + 2 * PreprocessingTables.degree ^ (walkParameter + 1))) := by rw [he] | |
| _ ≤ AlphabetGraphBounds.sizeFactor alphabet * | |
| ((ExpanderFamily.growth ^ 2 * table.darts) * | |
| (1 + 2 * PreprocessingTables.degree ^ (walkParameter + 1))) := | |
| Nat.mul_le_mul_left _ hp | |
| _ = sizeFactor * table.darts := by unfold sizeFactor; ring | |
| _ ≤ sizeFactor * (table.vertices + table.darts) := | |
| Nat.mul_le_mul_left _ (Nat.le_add_left _ _) | |
| theorem build_completeness (H : BaseTable) (table : GraphTables.Table) | |
| (sat : (GraphTables.semantics table).Satisfiable) : | |
| (GraphTables.semantics (build H table)).Satisfiable := by | |
| let : Nonempty (Fin alphabet) := ⟨⟨0, alphabet_positive⟩⟩ | |
| exact AlphabetTable.Table.perfect_completeness (powered H table) | |
| (PoweringTableSemantics.preserves_satisfiability | |
| (PreprocessingTables.preprocess H table) walkParameter | |
| (PreprocessingGuarantees.completeness H table sat)) | |
| abbrev Input := {table : GraphTables.Table // 0 < table.darts} | |
| instance (input : Input) : Nonempty (Fin input.val.darts) := ⟨⟨0, input.property⟩⟩ | |
| def step (H : BaseTable) (input : Input) : Input := | |
| ⟨build H input.val, build_darts_positive H input.val⟩ | |
| def initial (F : Target.Formula) : Input := | |
| ⟨RawInitialTables.table F, RawInitialTables.table_darts_positive F⟩ | |
| def size (input : Input) : Nat := input.val.vertices + input.val.darts | |
| def Satisfiable (input : Input) : Prop := (GraphTables.semantics input.val).Satisfiable | |
| noncomputable def gap (input : Input) : ℝ := (GraphTables.semantics input.val).gap | |
| theorem size_positive (input : Input) : 0 < size input := | |
| input.property.trans_le (Nat.le_add_left _ _) | |
| theorem gap_nonnegative (input : Input) : 0 ≤ gap input := | |
| (GraphTables.semantics input.val).gap_nonnegative | |
| theorem gap_eq_zero_iff (input : Input) : gap input = 0 ↔ Satisfiable input := | |
| (GraphTables.semantics input.val).gap_eq_zero_iff | |
| theorem one_le_size_mul_gap (input : Input) (unsat : ¬ Satisfiable input) : | |
| 1 ≤ (size input : ℝ) * gap input := by | |
| have h := (GraphTables.semantics input.val).inverse_card_le_gap_of_unsatisfiable unsat | |
| have hp : (0 : ℝ) < input.val.darts := Nat.cast_pos.mpr input.property | |
| simp only [Fintype.card_fin] at h | |
| have hd := (div_le_iff₀ hp).mp h | |
| have hsize : (input.val.darts : ℝ) ≤ (size input : ℝ) := by | |
| exact_mod_cast (Nat.le_add_left input.val.darts input.val.vertices) | |
| exact (show 1 ≤ (input.val.darts : ℝ) * gap input by | |
| simpa only [gap, mul_comm] using hd).trans | |
| (mul_le_mul_of_nonneg_right hsize (gap_nonnegative input)) | |
| theorem initial_satisfiable_iff (F : Target.Formula) : Satisfiable (initial F) ↔ F.Satisfiable := | |
| RawInitialTables.table_satisfiable_iff F | |
| theorem step_completeness (H : BaseTable) (input : Input) : | |
| Satisfiable input → Satisfiable (step H input) := build_completeness H input.val | |
| theorem step_size (H : BaseTable) (input : Input) : | |
| size (step H input) ≤ sizeFactor * size input := build_size_le H input.val input.property | |
| end UniqueGames.Foundations.PCP.RoundTables | |
| end OAI | |
Xet Storage Details
- Size:
- 6.78 kB
- Xet hash:
- f69cd2663c0f5aa3a68283fbd151b224ee8f4bf2f0c83597fec7faf7afe3ff55
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.