Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions ArkLib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,10 @@ import ArkLib.ProofSystem.ConstraintSystem.R1CS
import ArkLib.ProofSystem.Fri.RoundConsistency
import ArkLib.ProofSystem.Fri.Spec.General
import ArkLib.ProofSystem.Fri.Spec.SingleRound
import ArkLib.ProofSystem.Logup.Common
import ArkLib.ProofSystem.Logup.Algebra
import ArkLib.ProofSystem.Logup.Protocol
import ArkLib.ProofSystem.Logup.Security.Completeness
import ArkLib.ProofSystem.Logup.Security.Soundness
import ArkLib.ProofSystem.Logup.Sumcheck.SumcheckBridge
import ArkLib.ProofSystem.Logup.Sumcheck.SumcheckPolynomial
import ArkLib.ProofSystem.Plonk.Basic
import ArkLib.ProofSystem.Spartan.Basic
import ArkLib.ProofSystem.Stir.Combine
Expand Down
873 changes: 873 additions & 0 deletions ArkLib/ProofSystem/Logup/Algebra.lean

Large diffs are not rendered by default.

421 changes: 0 additions & 421 deletions ArkLib/ProofSystem/Logup/Common.lean

This file was deleted.

752 changes: 628 additions & 124 deletions ArkLib/ProofSystem/Logup/Protocol.lean

Large diffs are not rendered by default.

945 changes: 934 additions & 11 deletions ArkLib/ProofSystem/Logup/Security/Completeness.lean

Large diffs are not rendered by default.

25 changes: 17 additions & 8 deletions ArkLib/ProofSystem/Logup/Security/Soundness.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import ArkLib.ProofSystem.Logup.Protocol
/-!
# LogUp Soundness

Main soundness statement for Protocol 2 of `paper.txt`.
Soundness target for Protocol 2 of Haböck's LogUp lookup argument (Cryptology ePrint Archive,
Paper 2022/1530, <https://eprint.iacr.org/2022/1530>).
-/

open scoped NNReal
Expand All @@ -14,22 +15,30 @@ namespace Logup
section Soundness

variable {ι : Type} (oSpec : OracleSpec ι)
variable (F : Type) [Field F] [Fintype F] [DecidableEq F] [Fact ((-1 : F) ≠ 1)]
[SampleableType F]
variable (F : Type) [Field F] [Fintype F] [DecidableEq F] [SampleableType F]
variable (n M : ℕ)
variable (params : ProtocolParams M)
variable {σ : Type} (init : ProbComp σ) (impl : QueryImpl oSpec (StateT σ ProbComp))

/-- Paper-shaped soundness error for the LogUp outer checks plus the embedded sumcheck error. -/
/-- Paper-shaped soundness error for the LogUp outer checks plus the embedded sumcheck error.

The first term divides by `|F| - |H|`, the number of non-pole field elements a good challenge can
be sampled from. This expression is only meaningful when `|H| < |F|` (see `logup_soundness`);
otherwise the natural-number subtraction truncates to `0` and the term silently vanishes. -/
noncomputable def logupSoundnessError (F : Type) [Fintype F] (n M : ℕ) (params : ProtocolParams M)
(sumcheckSoundnessError : ℝ≥0) : ℝ≥0 :=
((((M + 1) * Fintype.card (Hypercube n) - 1 : ℕ) : ℝ≥0) /
((Fintype.card F - Fintype.card (Hypercube n) : ℕ) : ℝ≥0)) +
((((M + 1) * Fintype.card (Fin n → Fin 2) - 1 : ℕ) : ℝ≥0) /
((Fintype.card F - Fintype.card (Fin n → Fin 2) : ℕ) : ℝ≥0)) +
(((params.numGroups + 1 : ℕ) : ℝ≥0) / (Fintype.card F : ℝ≥0)) +
sumcheckSoundnessError

/-- Main ArkLib soundness theorem for LogUp Protocol 2. -/
theorem logup_soundness (sumcheckSoundnessError : ℝ≥0) :
/-- Main ArkLib soundness theorem for LogUp Protocol 2.

The hypothesis `hcard : |H| < |F|` guarantees there exist non-pole field elements to sample a
challenge from, and makes the `|F| - |H|` denominator of `logupSoundnessError` positive (so the
natural-number subtraction equals the true difference rather than truncating to `0`). -/
theorem logup_soundness (sumcheckSoundnessError : ℝ≥0)
(hcard : Fintype.card (Fin n → Fin 2) < Fintype.card F) :
(logupVerifier oSpec F n M params).soundness init impl
(inputRelation F n M).language outputRelation.language
(logupSoundnessError F n M params sumcheckSoundnessError) := by
Expand Down
278 changes: 0 additions & 278 deletions ArkLib/ProofSystem/Logup/Sumcheck/SumcheckBridge.lean

This file was deleted.

Loading
Loading