All proofs
Project-declaredLean 4.31.0 · mathlib@fabf563a7c95

Filter map conflict nodup

KZG.CommitmentScheme.filter_map_conflict_nodup

Plain-language statement

The filtered list used by chooseSConflict has no duplicate field elements.

Exact Lean statement

lemma filter_map_conflict_nodup
    (αᵢ : ZMod p) (srs : Vector G₁ (n + 1) × Vector G₂ 2) (hn : 1 ≤ n) :
    ((Array.range p).filterMap fun i =>
      if h : i < p then
        let x : ZMod p := (⟨i, h⟩ : Fin p)
        if srs.1[0] ^ x.val ≠ srs.1[1]'(Nat.lt_add_of_pos_left hn) ∧ x ≠ αᵢ then some x
        else none
      else none).toList.Nodup

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma filter_map_conflict_nodup    (αᵢ : ZMod p) (srs : Vector G₁ (n + 1) × Vector G₂ 2) (hn : 1  n) :    ((Array.range p).filterMap fun i =>      if h : i < p then        let x : ZMod p := (i, h : Fin p)        if srs.1[0] ^ x.val  srs.1[1]'(Nat.lt_add_of_pos_left hn)  x  αᵢ then some x        else none      else none).toList.Nodup := by  rw [Array.toList_filterMap, Array.toList_range]  apply List.Nodup.filterMap _ List.nodup_range  intro a a' b hb hb'  simp only [Option.mem_def] at hb hb'  -- Extract a < p from hb (outer dite must take the then-branch)  have ha : a < p := by    by_contra h; push Not at h; rw [dif_neg (by omega)] at hb; simp at hb  have ha' : a' < p := by    by_contra h; push Not at h; rw [dif_neg (by omega)] at hb'; simp at hb'  -- Both branches must hit `some x`, giving `b = ↑↑⟨a, ha⟩` and `b = ↑↑⟨a', ha'⟩`.  simp only [ha, ha', dite_true] at hb hb'  split at hb <;> simp at hb  split at hb' <;> simp at hb'  -- hb : ↑↑⟨a, ha⟩ = b, hb' : ↑↑⟨a', ha'⟩ = b  have hval := congr_arg ZMod.val (hb.trans hb'.symm)  simp only [ZMod.val_natCast, Nat.mod_eq_of_lt ha, Nat.mod_eq_of_lt ha'] at hval  exact hval
Project
ArkLib
License
Apache-2.0
Commit
fad5cbf80877
Source
ArkLib/Commitments/Functional/KZG/FunctionBinding/EvaluationBindingConflict.lean:80-104

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.31.0

Affine gaps lifted to interleaved codes

affine_gaps_lifted_to_interleaved_codes

Project documentation

This lemma proves the final algebraic step in the DG25 Theorem 3.1 proof. It shows that if R > e + 1, then e * (R / (R - 1)) < e + 1. The intuition is that the fraction R / (R - 1) is always greater than 1, but as R gets larger, it gets closer to 1. The hypothesis R > e + 1 provides a strong enough bound to ensure the product e * (fraction) do...

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose coeff

ArkLib.Lattices.Ajtai.gadgetDecompose_coeff

Plain-language statement

The k-th coefficient (k < deg φ) of a gadget-decomposition block is exactly the corresponding digit of the corresponding input coefficient.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose lawful

ArkLib.Lattices.Ajtai.gadgetDecompose_lawful

Plain-language statement

The base-b gadget decomposition is a lawful gadget decomposition.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record