Verify opening equation
KZG.verify_opening_equation
Plain-language statement
Extract the exponent equation enforced by a successful KZG opening verification.
Exact Lean statement
lemma verify_opening_equation (α₁ β₁ τ cm prf₁ : ZMod p) (c pf₁ : G₁)
(srs : Vector G₁ (n + 1) × Vector G₂ 2)
(hsrs : srs = Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n τ)
(hpair : pairing g₁ g₂ ≠ 0) (hcm : c = g₁ ^ cm.val)
(hprf : pf₁ = g₁ ^ prf₁.val)
(hverify₁ : KZG.verifyOpening (g₁ := g₁) (g₂ := g₂) (pairing := pairing)
srs.2 c pf₁ α₁ β₁) :
cm - β₁ = prf₁ * (τ - α₁)Formal artifact
Lean source
lemma verify_opening_equation (α₁ β₁ τ cm prf₁ : ZMod p) (c pf₁ : G₁) (srs : Vector G₁ (n + 1) × Vector G₂ 2) (hsrs : srs = Groups.PowerSrs.generate (g₁ := g₁) (g₂ := g₂) n τ) (hpair : pairing g₁ g₂ ≠ 0) (hcm : c = g₁ ^ cm.val) (hprf : pf₁ = g₁ ^ prf₁.val) (hverify₁ : KZG.verifyOpening (g₁ := g₁) (g₂ := g₂) (pairing := pairing) srs.2 c pf₁ α₁ β₁) : cm - β₁ = prf₁ * (τ - α₁) := by simp only [verifyOpening, decide_eq_true_eq] at hverify₁ rw [hsrs] at hverify₁ simp only [Groups.PowerSrs.generate, Groups.PowerSrs.tower, Nat.reduceAdd, Vector.getElem_ofFn, pow_zero, pow_one] at hverify₁ rw [hcm, hprf] at hverify₁ simp_rw [← zpow_natCast_sub_natCast, ← zpow_natCast, ← lin_snd, ← lin_fst, smul_smul] at hverify₁ have hne : Additive.toMul (pairing g₁ g₂ : Additive Gₜ) ≠ 1 := hpair have hordE : orderOf (Additive.toMul (pairing g₁ g₂ : Additive Gₜ)) = p := by have hdvd := orderOf_dvd_natCard (G := Gₜ) (Additive.toMul (pairing g₁ g₂ : Additive Gₜ)) rw [PrimeOrderWith.hCard] at hdvd rcases (Nat.dvd_prime Fact.out).1 hdvd with h1 | hp' · exact absurd (orderOf_eq_one_iff.1 h1) hne · exact hp' have hdvd : (↑(orderOf (Additive.toMul (pairing g₁ g₂ : Additive Gₜ))) : ℤ) ∣ ((↑cm.val - ↑β₁.val : ℤ) - ((↑τ.val - ↑α₁.val) * ↑prf₁.val)) := orderOf_dvd_sub_iff_zpow_eq_zpow.mpr (congrArg Additive.toMul hverify₁) rw [hordE] at hdvd have hcast := ((ZMod.intCast_eq_intCast_iff_dvd_sub ((↑τ.val - ↑α₁.val) * ↑prf₁.val : ℤ) (↑cm.val - ↑β₁.val : ℤ) p).mpr hdvd).symm push_cast [ZMod.natCast_zmod_val] at hcast rw [_root_.mul_comm] at hcast exact hcast- Project
- ArkLib
- License
- Apache-2.0
- Commit
- fad5cbf80877
- Source
- ArkLib/Commitments/Functional/KZG/Basic.lean:161-192
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
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...
Source project: ArkLib
Person-level attribution pending.
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.
Source project: ArkLib
Person-level attribution pending.
Gadget Decompose lawful
ArkLib.Lattices.Ajtai.gadgetDecompose_lawful
Plain-language statement
The base-b gadget decomposition is a lawful gadget decomposition.
Source project: ArkLib
Person-level attribution pending.