File size: 4,425 Bytes
4a56cd6 | 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 | import OAI.Computability.DepthThree.HardSliceProbability
import OAI.Computability.DepthThree.HardSliceSelection
namespace OAI
noncomputable section
open scoped BigOperators Classical
namespace DepthThreeLowerBound
theorem actual_hash_coefficient_window_failure_le {d r h b : β}
(p : Fin r β Bool) [Fact (Irreducible (BinaryAlgebra.inputPolynomialBits p))]
(hr : 0 < r) (hb : 1 β€ b) (hh : 0 < h) (q : β)
(Ο : Restriction (Fin d)) (hΟ : restrictionWindow q Ο)
(hbound :
(2 : β) ^ Fintype.card (Live Ο) / (2 : β) ^ r +
sparseMomentBound (Fintype.card (Live Ο)) b
(hardSliceSparseConstant b hb * Fintype.card (Live Ο)) h
((2 : β) ^ (-(Fintype.card (Live Ο) : β) / 4)) β€
2 * (2 : β) ^ (-(q * d) / 16)) :
finiteProb (fun Ο : (Fin (d + r - 1) β Bool) Γ
(Fin (2 * h) β BinaryAlgebra.BitQuotient p) =>
Β¬ corr b (fun z => sign (hashAcceptance p (2 * h) Ο.1 Ο.2 (fill Ο z))) β€
(2 : β) ^ (-(q * d) / 16)) β€
2 * (2 : β) ^ (-(q * d) / 16) := by
have hlow : (q * d) / 2 β€ (Fintype.card (Live Ο) : β) := by
simpa only [restrictionWindow, Fintype.card_fin] using hΟ.1
have hthreshold : (2 : β) ^ (-(Fintype.card (Live Ο) : β) / 8) β€
(2 : β) ^ (-(q * d) / 16) :=
Real.rpow_le_rpow_of_exponent_le (by norm_num) (by linarith)
apply le_trans _ ((actual_hash_coefficient_failure_le p hr Ο b hb h hh).trans hbound)
apply finiteProb_mono
intro Ο hΟ hsmall
exact hΟ (hsmall.trans hthreshold)
theorem exists_good_hash_coefficients {d r h b : β}
(p : Fin r β Bool) [Fact (Irreducible (BinaryAlgebra.inputPolynomialBits p))]
(hr : 0 < r) (hb : 1 β€ b) (hh : 0 < h) (q : β)
(hq : 0 β€ q) (hq1 : q β€ 1)
(hbound : β m : β, (q * d) / 2 β€ (m : β) β (m : β) β€ 2 * (q * d) β
(2 : β) ^ m / (2 : β) ^ r +
sparseMomentBound m b (hardSliceSparseConstant b hb * m) h
((2 : β) ^ (-(m : β) / 4)) β€ 2 * (2 : β) ^ (-(q * d) / 16)) :
β (u : Fin (d + r - 1) β Bool) (Ξ² : Fin (2 * h) β BinaryAlgebra.BitQuotient p),
restrictionAvg q (fun Ο => if Β¬ goodRestriction q
((2 : β) ^ (-(q * d) / 16)) b (hashAcceptance p (2 * h) u Ξ²) Ο
then 1 else 0) β€ 4 * (2 : β) ^ (-(q * d) / 16) := by
have hfixed (Ο : Restriction (Fin d)) (hΟ : restrictionWindow q Ο) :
finiteProb (fun Ο : (Fin (d + r - 1) β Bool) Γ
(Fin (2 * h) β BinaryAlgebra.BitQuotient p) =>
Β¬ corr b (fun z => sign (hashAcceptance p (2 * h) Ο.1 Ο.2 (fill Ο z))) β€
(2 : β) ^ (-(q * d) / 16)) β€
2 * (2 : β) ^ (-(q * d) / 16) := by
apply actual_hash_coefficient_window_failure_le p hr hb hh q Ο hΟ
apply hbound
Β· simpa only [restrictionWindow, Fintype.card_fin] using hΟ.1
Β· simpa only [restrictionWindow, Fintype.card_fin] using hΟ.2
obtain β¨Ο, hΟβ© := exists_good_parameter hq hq1 b
(fun Ο : (Fin (d + r - 1) β Bool) Γ (Fin (2 * h) β BinaryAlgebra.BitQuotient p) =>
hashAcceptance p (2 * h) Ο.1 Ο.2)
(by simpa only [Fintype.card_fin] using hfixed)
exact β¨Ο.1, Ο.2, by simpa only [Fintype.card_fin] using hΟβ©
def coefficientInputBits {r t : β} (p : Fin r β Bool)
(Ξ² : Fin t β BinaryAlgebra.BitQuotient p) : Fin t β Fin r β Bool :=
fun j i => BinaryAlgebra.fieldBit
(BinaryAlgebra.coordinates (fun i => BinaryAlgebra.bitValue (p i)) (Ξ² j) i)
@[simp] theorem encode_coefficientInputBits {r t : β} (p : Fin r β Bool)
(Ξ² : Fin t β BinaryAlgebra.BitQuotient p) (j : Fin t) :
BinaryAlgebra.encode (fun i => BinaryAlgebra.bitValue (p i))
(fun i => BinaryAlgebra.bitValue (coefficientInputBits p Ξ² j i)) = Ξ² j := by
simp only [coefficientInputBits, BinaryAlgebra.bitValue_fieldBit]
exact BinaryAlgebra.encode_coordinates _ _
theorem hashAcceptance_coefficientInputBits {d r t : β} (p : Fin r β Bool)
[Fact (Irreducible (BinaryAlgebra.inputPolynomialBits p))]
(u : Fin (d + r - 1) β Bool) (Ξ² : Fin t β BinaryAlgebra.BitQuotient p) :
hashAcceptance p t u
(fun j => BinaryAlgebra.encode (fun i => BinaryAlgebra.bitValue (p i))
(fun i => BinaryAlgebra.bitValue (coefficientInputBits p Ξ² j i))) =
hashAcceptance p t u Ξ² := by
simp only [encode_coefficientInputBits]
end DepthThreeLowerBound
end
end OAI
|