File size: 4,087 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import Mathlib

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.Parameters

noncomputable section

def a (m : ℕ) : ℝ := 1 / (4*m)
def b₀ (m : ℕ) : ℝ := 1 / (2*m)
def ν (m : ℕ) : ℝ := 1 / (2^7 * (m:ℝ)^3)
def β (m : ℕ) : ℝ := 1 / (2^10 * (m:ℝ)^3)
def ell (m : ℕ) : ℕ := 2^11*m^3
def h (m : ℕ) : ℕ := 2^12*m^3
def d (m : ℕ) : ℕ := 2^38*m^10
def σ (m : ℕ) : ℝ := 1 / (2^46 * (m:ℝ)^12)
def p (m : ℕ) : ℕ := 2*d m+1
def t (m : ℕ) : ℕ := 2^17*m^4

theorem d_square (m : ℕ) : d m = (2^19*m^5)^2 := by
  unfold d
  ring

theorem sqrt_d (m : ℕ) : Real.sqrt (d m) = 2^19*(m:ℝ)^5 := by
  rw [d_square]
  simp only [Nat.cast_pow, Nat.cast_mul, Nat.cast_ofNat, Real.sqrt_sq_eq_abs]
  exact abs_of_nonneg (by positivity)

theorem t_eq (m : ℕ) (hm : 0 < m) : (t m : ℝ) = a m * Real.sqrt (d m) := by
  rw [sqrt_d]
  have hp : (m:ℝ) ≠ 0 := by positivity
  simp only [t, a, Nat.cast_mul, Nat.cast_pow, Nat.cast_ofNat]
  field_simp
  ring

theorem positive (m : ℕ) (hm : 0 < m) :
    0 < ν m ∧ 0 < β m ∧ 0 < ell m ∧ 0 < h m ∧ 0 < d m ∧ 0 < σ m := by
  dsimp [ν, β, ell, h, d, σ]
  constructor <;> try positivity
  constructor <;> try positivity
  constructor <;> try positivity
  constructor <;> try positivity
  constructor <;> positivity

theorem dimensions (m : ℕ) (hm : 4 ≤ m) :
    4 ≤ d m ∧ 2 ≤ h m ∧ h m < d m ∧ Even (d m) := by
  have h1 : 1 ≤ m := by omega
  have h3 : 1 ≤ m^3 := one_le_pow₀ h1
  have h310 : m^3 ≤ m^10 := Nat.pow_le_pow_right (by omega) (by decide)
  have h10 : 1 ≤ m^10 := one_le_pow₀ h1
  dsimp [d, h]
  refine ⟨by omega, by omega, ?_, ?_⟩
  · omega
  · exact ⟨137438953472*m^10, by omega⟩

theorem restriction_budget (m : ℕ) (hm : 4 ≤ m) :
    16*(h m : ℝ)+32*(h m : ℝ)^2 ≤ ν m*(d m : ℝ)/2 := by
  have hm1 : (1:ℝ) ≤ m := by exact_mod_cast (show 1 ≤ m by omega)
  have hp : (m:ℝ) ≠ 0 := by exact_mod_cast (show m ≠ 0 by omega)
  have h36 : (m:ℝ)^3 ≤ (m:ℝ)^6 := pow_le_pow_right₀ hm1 (by decide)
  have h67 : (m:ℝ)^6 ≤ (m:ℝ)^7 := pow_le_pow_right₀ hm1 (by decide)
  have h6 : (0:ℝ) ≤ (m:ℝ)^6 := by positivity
  have heq : ν m*(d m : ℝ)/2 = 2^30*(m:ℝ)^7 := by
    simp only [ν, d, Nat.cast_mul, Nat.cast_pow, Nat.cast_ofNat]
    field_simp
  rw [heq]
  simp only [h, Nat.cast_mul, Nat.cast_pow, Nat.cast_ofNat]
  nlinarith [sq_nonneg ((m:ℝ)^3)]

theorem β_h (m : ℕ) (hm : 0 < m) : β m*(h m : ℝ)/2 = 2 := by
  have hp : (m:ℝ) ≠ 0 := by positivity
  simp only [β, h, Nat.cast_mul, Nat.cast_pow, Nat.cast_ofNat]
  field_simp

theorem ell_eq (m : ℕ) (hm : 0 < m) : (ell m : ℝ) = 2/β m := by
  have hp : (m:ℝ) ≠ 0 := by positivity
  simp only [ell, β, Nat.cast_mul, Nat.cast_pow, Nat.cast_ofNat]
  field_simp

theorem σ_eq (m : ℕ) : σ m = 1 / ((h m : ℝ)^2*(ell m : ℝ)^2) := by
  unfold σ h ell
  push_cast
  congr 1
  ring

theorem grid_budget (m : ℕ) (hm : 4 ≤ m) :
    (d m : ℝ)/(p m : ℝ) < 1/2 ∧ (1:ℝ)/2 < (t m : ℝ)/2 ∧ 2*m < p m := by
  have hd := (dimensions m hm).1
  have hm1 : 1 ≤ m := by omega
  have hm4 : 1 ≤ m^4 := one_le_pow₀ hm1
  have hmd : m ≤ d m := by
    have hpow : m^1 ≤ m^10 := Nat.pow_le_pow_right (by omega) (by decide)
    simp only [pow_one] at hpow
    dsimp [d]
    omega
  refine ⟨?_, ?_, ?_⟩
  · have hp : (0:ℝ) < p m := by unfold p; positivity
    apply (div_lt_iff₀ hp).mpr
    simp only [p, Nat.cast_add, Nat.cast_mul, Nat.cast_ofNat, Nat.cast_one]
    linarith
  · have ht : 1 < t m := by dsimp [t]; omega
    have ht' : (1:ℝ) < t m := by exact_mod_cast ht
    linarith
  · dsimp [p]; omega

end

end VertexCover.Parameters

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