Repository navigation
refactor(Crypto/VOLE): derive native share and view encodings with enc_structure - #4975
SamuelSchlesinger wants to merge 1 commit into
Conversation
…c_structure Replace the hand-written encShare/encView embeddings and their eleven projection and constructor polynomial-time rules in VOLE/NativePPT with parameterized enc_structure declarations, now that enc_structure accepts explicit command parameters (#4874). The encoded words are unchanged: tests check by rfl that both encodings equal the former nested encPair tuples. Part of #4817.
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Agent review (homo, session 792037e3) of c7f48c3: APPROVE. This is an agent review, not human approval. I reviewed git diff 72a0132ad c7f48c3ec (2 files).
- The words are unchanged.
encShare eFandencView eF eResultnow come from the parameterizedenc_structure(#4874). Their field order matches the structures and the former hand-written tuples:key, tagsandshare, corrections, weights, reply, result, nested right. The two newrfltests pin the oldencPairwords, so the layout is checked, not just asserted. - The rules have the same strength. The generated
_key/_tags/_share/…/_result_polyTimeand_mk_polyTimerules state the sameComputableInPolyTimefacts as the 11 hand-written ones. The only difference is thateF/eResultare explicit, and the one library caller (isPPTOn_simulate) is updated. The globalattribute [fun_prop]matches how this file already registersencGate/encInput, and the existingfun_proptests in VOLENative still discharge through them. No theorem statements or bounds change. - No literal uses in
guide/ormanual/(#667), and both manual assessments are reasonable.
Non-blocking, edit the body only, no push: the body says encShare_apply, encView_apply and encViewFields "are gone". In fact enc_structure regenerates all three (plus encShareFields), now with explicit encoding parameters. They're simp and rfl as before, so what changed is their signatures.
Queue: 0 threads. ci-checks and guide are pending, so I'll run queue_pr.py --wait for this head and confirm that guide is green before it queues.
|
Final-review hold cleared at Native43369417870/job131701434962 is terminal SUCCESS. I read all six strict Lean gates, stock changed-file checks, hygiene/ratchets, tidy/compiled registry and all complete actual notices: 4 definitions/types, 41 theorem statements and 4 proof blocks have no candidates or matches. The scans supplement source review and do not establish uniqueness. Actual native checkout Another lane already queued this exact head; root made no enqueue, source edit or local Lean/build/compiled-query action. This clears the earlier pending-notice hold. Actual landing remains to be monitored. Agent review, not human approval. |
|
Focused advisory disposition — independent non-author worker
I checked the exact Actual native CI passes all six gates, stock changed-file lints, tidy and result-registry checks. I read all three complete notices: 4 examined definitions/no candidates, 41 theorem statements/no matches, 4 source proofs/no repeated blocks. Their usual limits remain: same-module definition pairs excluded, statement-key equality cannot find specialization, and an empty report is not uniqueness evidence. API commit records confirm the tested |
Index explicit encoders and their stable Fields/apply names, including names with parameters or a continued header. Locate command sources for companion-only queries and keep comments, literals, fields and real removals distinct. Validated with 21 checker tests and the five actual #4975 source names; a deliberate typo remains reported. Source-only checking does not establish compiled visibility. Refs #5027. AI assistance: Codex implementation for Samuel Schlesinger.
Part of #4817 (crypto readability, mpc lane item mpc-4).
VOLE/NativePPTdefinedNative.encShareandNative.encViewby hand.enc_structureused to require unparameterized structures, so each record had its own embedding, anencViewFieldstuple abbreviation, and eleven projection and constructorComputableInPolyTimerules built fromfst/sndchains. Since #4874,enc_structureaccepts explicit command parameters. Both encodings are now oneenc_structuredeclaration each, parameterized by the scalar (and result) encodings, and the generated rules are registered globally withattribute [fun_prop], the same way the file already handlesencGate/encInput. Net change: −132/+27 lines.Encoded words are unchanged. Two
rfltests inCslibFrontierTests/Crypto/VOLENative.leancheck thatencShare eF sisencPair eF (encList eF) (s.key, s.tags)and thatencView eF eResult vis the former nestedencPairtuple of its five fields. The rule names and statements are the same, except that the encoding parameters are now explicit arguments. The one in-library caller changes toencShare_mk_polyTime eF hdelta hq.encShare_apply,encView_applyandencViewFieldsare still there:enc_structureregenerates them with the same meaning, taking the encoding parameters explicitly. No theorem statement or resource bound changes.Manuals: I checked both. The Operator's Manual entry for
NativePPT(protocols-and-privacy) describes the simulator and its runtime contract, not the encoding layout, so it needs no edit. The Agent Operator's Manual already documents parameterizedenc_structure(#4874), so it needs no edit either.Validation: these all pass locally:
lake build --wfail --iofail CslibFrontier.Crypto.Protocols.VOLE.NativePPT CslibFrontierTests.Crypto.VOLENativecheck_changed_files.py --source-onlycheck_hygiene.pycheck_operator_manual.pyCI covers the rest.
AI disclosure: written by an AI agent (mpc, Jetski swarm) for Samuel Schlesinger. Review is by a separate agent, not a human.