Skip to content

Commit d8666fe

Browse files
fixes
1 parent f66f694 commit d8666fe

3 files changed

Lines changed: 21 additions & 36 deletions

File tree

ArkLib/Commitments/Functional/Hachi/RingSwitch/Reduction.lean

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -165,22 +165,10 @@ theorem vecLInftyNorm_le_of_liftShort (s : RlinStatement Φ n μ) (w : LiftedWit
165165
vecLInftyNorm Φ w.z ≤ s.bound :=
166166
le_trans hshort.1 hside
167167

168-
/-! ### Why the CWSS certificate is exposed only as `liftPackage.isCWSS`
169-
170-
We deliberately do **not** provide a standalone `lift_coordinateWiseSpecialSound` restated in
171-
Hachi's `relRlinE`/`relLiftE` relation vocabulary. Doing so forces the elaborator to check a
172-
`whnf` defeq between that vocabulary and the generic `Lift.relLin`/`Lift.relOutE`/`Lift.verifier`
173-
*inside the full `coordinateWiseSpecialSound` proposition* — which unfolds `Rq`'s computable layer
174-
(via the `verifier`) and times out (`maximum number of heartbeats` at `whnf`). The certificate is
175-
therefore `liftPackage.isCWSS` (generic `Lift.coordinateWiseSpecialSound` specialized). Crucially,
176-
the `▷` seams in `Composition.lean` still close by `rfl`: that `rfl` compares only the two relations
177-
(structurally identical after β-reduction — same `*ᵥ` subterms), never the verifier. -/
178-
179-
/-- Hachi's `Lift` instance as a composable CWSS package, **assembled wholesale from generic
180-
`Lift.package`** at the cyclotomic presentation: the verifier, structure, purity witness, and
181-
CWSS certificate are all the generic layer's. Hachi supplies only the presentation data
168+
/-- Hachi's `Lift` instance as a composable CWSS package, reusing the generic ring-switching
169+
`Lift.package` at the cyclotomic presentation. Hachi supplies only the presentation data
182170
(`cyclotomicPresentation`/`isPresentation_cyclotomic`) and the norm implication
183-
(`vecLInftyNorm_le_of_liftShort`). -/
171+
(`vecLInftyNorm_le_of_liftShort`); the CWSS certificate is `liftPackage.isCWSS`. -/
184172
noncomputable def liftPackage (init : ProbComp σ) (impl : QueryImpl oSpec (StateT σ ProbComp))
185173
(hd : 0 < Φ.φ.natDegree) :
186174
CWSSPackage init impl

ArkLib/Data/Lattices/CyclotomicRing/QuotientLift.lean

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ import ArkLib.Data.Lattices.Vectors
2121
`Commitments/Functional/Hachi/RingSwitch/Reduction.lean`, since `Data` does not import
2222
`ProofSystem`):
2323
24-
* `Rq.natDegree_val_toPoly_lt'` — representatives are degree-reduced (any modulus of
25-
positive degree, generalizing the `powTwoCyclotomic`-pinned version);
2624
* `val_toPoly_injective` — representatives are injective;
2725
* `modulus_dvd_toPoly_add_sub` / `modulus_dvd_toPoly_mul_sub` — the coset laws: reduction
2826
changes the representative of a sum/product by a multiple of the modulus, via the
2927
semantic quotient bridge `quotientHom`.
3028
29+
The remaining presentation law — representatives are degree-reduced — is
30+
`Rq.natDegree_val_toPoly_lt'` in `Rq.lean`, next to the other `Rq` degree lemmas.
31+
3132
## References
3233
3334
* [Huang, M.-Y. M., Mao, X., and Zhang, J., *Sublinear Proofs over Polynomial Rings*][HMZ25]
@@ -43,17 +44,7 @@ variable {R : Type*} [Field R]
4344

4445
variable [BEq R] [LawfulBEq R] (Φ : CyclotomicModulus R) [IsCyclotomic Φ]
4546

46-
/-! ## Degree bound and injectivity of canonical representatives -/
47-
48-
/-- A reduced representative has `natDegree` below `d = deg φ` — the any-modulus version of
49-
`Rq.natDegree_val_toPoly_lt` (which is pinned to `powTwoCyclotomic`), with the dimension
50-
positivity `0 < d` as an explicit hypothesis. -/
51-
theorem Rq.natDegree_val_toPoly_lt' (hd : 0 < Φ.φ.natDegree) (a : Rq Φ) :
52-
a.1.toPoly.natDegree < Φ.φ.natDegree := by
53-
rcases eq_or_ne a.1.toPoly 0 with h0 | hne
54-
· rw [h0, Polynomial.natDegree_zero]; exact hd
55-
· rw [CompPoly.CPolynomial.natDegree_toPoly]
56-
exact Polynomial.natDegree_lt_natDegree hne (Φ.degree_toPoly_lt_of_reduced a.2)
47+
/-! ## Injectivity of canonical representatives -/
5748

5849
omit [IsCyclotomic Φ] in
5950
/-- Canonical representatives are injective: `Rq` elements with equal representative

ArkLib/Data/Lattices/CyclotomicRing/Rq.lean

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,16 +293,22 @@ theorem mk_sum {ι : Type*} (s : Finset ι) (f : ι → CPolynomial R) :
293293
· intro a s ha ih
294294
rw [Finset.sum_insert ha, Finset.sum_insert ha, mk_add, ih]
295295

296-
/-- A reduced representative of the power-of-two cyclotomic ring has `natDegree` below the ring
297-
dimension `2^α`. -/
298-
theorem natDegree_val_toPoly_lt (α : ℕ) (a : Rq (powTwoCyclotomic (R := R) α)) :
299-
a.1.toPoly.natDegree < (powTwoCyclotomic (R := R) α).φ.natDegree := by
296+
/-- A reduced representative has `natDegree` below `d = deg φ`, for **any** modulus of positive
297+
degree (the dimension positivity `0 < d` is an explicit hypothesis). The `powTwoCyclotomic`-pinned
298+
`Rq.natDegree_val_toPoly_lt` below is derived from this general version. -/
299+
theorem natDegree_val_toPoly_lt' (hd : 0 < Φ.φ.natDegree) (a : Rq Φ) :
300+
a.1.toPoly.natDegree < Φ.φ.natDegree := by
300301
rcases eq_or_ne a.1.toPoly 0 with h0 | hne
301-
· rw [h0, Polynomial.natDegree_zero, powTwoCyclotomic_natDegree]
302-
exact pow_pos (by norm_num) α
302+
· rw [h0, Polynomial.natDegree_zero]; exact hd
303303
· rw [CompPoly.CPolynomial.natDegree_toPoly]
304-
exact Polynomial.natDegree_lt_natDegree hne
305-
((powTwoCyclotomic (R := R) α).degree_toPoly_lt_of_reduced a.2)
304+
exact Polynomial.natDegree_lt_natDegree hne (Φ.degree_toPoly_lt_of_reduced a.2)
305+
306+
/-- A reduced representative of the power-of-two cyclotomic ring has `natDegree` below the ring
307+
dimension `2^α` — the special case of `Rq.natDegree_val_toPoly_lt'` for `φ = X^{2^α} + 1`. -/
308+
theorem natDegree_val_toPoly_lt (α : ℕ) (a : Rq (powTwoCyclotomic (R := R) α)) :
309+
a.1.toPoly.natDegree < (powTwoCyclotomic (R := R) α).φ.natDegree :=
310+
natDegree_val_toPoly_lt' (powTwoCyclotomic (R := R) α)
311+
(by rw [powTwoCyclotomic_natDegree]; exact pow_pos (by norm_num) α) a
306312

307313
/-! ## Constant embedding and coefficient-vanishing facts
308314

0 commit comments

Comments
 (0)