All proofs
Project-declaredLean 4.31.0 · mathlib@fabf563a7c95

T sdh cond of two valid openings

KZG.CommitmentScheme.t_sdh_cond_of_two_valid_openings

Project documentation

The algebraic core of evaluation binding: two valid KZG openings of the same commitment at the same point, but to different values, yield a t-SDH solution with challenge c = -query. This lemma is intentionally isolated from the probabilistic (game-based) binding game. The proof of binding_cond_le_t_sdh_cond only needs to extract hsrs and the two `ve...

Exact Lean statement

lemma t_sdh_cond_of_two_valid_openings
    (τ query resp₁ resp₂ : ZMod p) (cm proof₁ proof₂ : G₁)
    (srs : Vector G₁ (n + 1) × Vector G₂ 2)
    (hsrs : srs = Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n τ)
    (hresp : resp₁ ≠ resp₂) (hg₁ : g₁ ≠ 1) (hpair : pairing g₁ g₂ ≠ 0)
    (hverify₁ : KZG.verifyOpening (g₁ := g₁) (g₂ := g₂) (pairing := pairing)
      srs.2 cm proof₁ query resp₁)
    (hverify₂ : KZG.verifyOpening (g₁ := g₁) (g₂ := g₂) (pairing := pairing)
      srs.2 cm proof₂ query resp₂) :
    Groups.tSdhCondition (p := p) (g₁ := g₁)
      (τ, -query, (proof₁ / proof₂) ^ (1 / (resp₂ - resp₁)).val)

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma t_sdh_cond_of_two_valid_openings    (τ query resp₁ resp₂ : ZMod p) (cm proof₁ proof₂ : G₁)    (srs : Vector G₁ (n + 1) × Vector G₂ 2)    (hsrs : srs = Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n τ)    (hresp : resp₁  resp₂) (hg₁ : g₁  1) (hpair : pairing g₁ g₂  0)    (hverify₁ : KZG.verifyOpening (g₁ := g₁) (g₂ := g₂) (pairing := pairing)      srs.2 cm proof₁ query resp₁)    (hverify₂ : KZG.verifyOpening (g₁ := g₁) (g₂ := g₂) (pairing := pairing)      srs.2 cm proof₂ query resp₂) :    Groups.tSdhCondition (p := p) (g₁ := g₁)      (τ, -query, (proof₁ / proof₂) ^ (1 / (resp₂ - resp₁)).val) := by  have hpG1 : Nat.card G₁ = p := PrimeOrderWith.hCard  have hord : orderOf g₁ = p := binding_order_of_eq_prime_of_ne_one g₁ hg₁  obtain cm', hcm := binding_exists_zmod_power_of_generator hpG1 hg₁ hord cm  obtain prf₁, hprf₁ :=    binding_exists_zmod_power_of_generator hpG1 hg₁ hord proof₁  obtain prf₂, hprf₂ :=    binding_exists_zmod_power_of_generator hpG1 hg₁ hord proof₂  have hEq₁ : cm' - resp₁ = prf₁ *- query) :=    verify_opening_equation pairing query resp₁ τ cm' prf₁ cm proof₁ srs hsrs hpair hcm      hprf₁ hverify₁  have hEq₂ : cm' - resp₂ = prf₂ *- query) :=    verify_opening_equation pairing query resp₂ τ cm' prf₂ cm proof₂ srs hsrs hpair hcm      hprf₂ hverify₂  have hdenom : τ + -query  0 :=    t_sdh_denominator_ne_zero_of_opening_equations τ query resp₁ resp₂ cm' prf₁ prf₂      hresp hEq₁ hEq₂  refine hdenom, ?_  have hfield_conflict : prf₁ *- query) + resp₁ = prf₂ *- query) + resp₂ := by    linear_combination hEq₂ - hEq₁  have hfield_solution : (prf₁ - prf₂) / (resp₂ - resp₁) = 1 /- query) := by    have hresp_ne : resp₂ - resp₁  0 := sub_ne_zero.mpr (Ne.symm hresp)    have hτq_ne : τ - query  0 := by simpa [sub_eq_add_neg] using hdenom    rw [div_eq_div_iff hresp_ne hτq_ne]    linear_combination hfield_conflict  rw [hprf₁, hprf₂, Groups.gpow_div_eq hord,  pow_mul, pow_eq_pow_iff_modEq, hord]  change (prf₁ - prf₂).val * (1 / (resp₂ - resp₁)).val % p =    (1 /+ -query)).val % p  rw [Nat.mod_eq_of_lt (ZMod.val_lt _)]  have hcast : (((prf₁ - prf₂).val * (1 / (resp₂ - resp₁)).val : ) : ZMod p)      = (1 /+ -query) : ZMod p) := by    push_cast [ZMod.natCast_zmod_val]    rw [mul_one_div, hfield_solution]    ring  have := congr_arg ZMod.val hcast  rwa [ZMod.val_natCast] at this
Project
ArkLib
License
Apache-2.0
Commit
fad5cbf80877
Source
ArkLib/Commitments/Functional/KZG/Binding.lean:181-226

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