Compare deterministic converters by their next outputs

未关闭
#386 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃

调研方向

Start in src/RandomSystems/Converter/ beside PDCBehavior.ofDDC, then read the related definitions and proofs for IsDDCFrom, TypedConverter, and tensor_ofDDC. Add the comparison and converse laws, typed forms, and parallel identity closure laws described in the issue; use the acceptance criteria to check reachable history functions and the two composite forms. The issue names no test files or commands.

由索引模型根据 Issue 内容生成。

描述

Background

A deterministic converter from E to F (IsDDCFrom E F b a) is a partial function a from its input history, the outside queries and inside replies received so far, to its next output. After each of its own transcripts it answers exactly the inputs of the converter domain (IsDDCFrom.answers). Two such converters can therefore be compared one output at a time:

\big(\forall\,t\ \text{a transcript of both},\ \forall\,x\ \text{admitted after}\ t:\ \ a(t\cdot x)=c(t\cdot x)\big)
\ \Longrightarrow\ \mathrm{ofDDC}\,a=\mathrm{ofDDC}\,c .

The bounds on consecutive inside queries of a and c may differ. Today two deterministic converters are compared only below a common system (PDCBehavior.ofDDC_eq_of_le). An identity between two composites of converters, with no system attached, has no proof rule of its own.

Proposed change

Beside PDCBehavior.ofDDC in src/RandomSystems/Converter/, add

  • IsDDCFrom.replies_iff_of_next_eq and IsDDCFrom.eq_of_next_eq: under the hypothesis above the two converters have the same transcripts, and are the same partial function;
  • PDCBehavior.ofDDC_eq_of_next_eq: they have the same behavior;
  • the converses PDCBehavior.ofDDC_eq_iff_replies and PDCBehavior.ofDDC_eq_iff: the behaviors ofDDC a and ofDDC c are equal exactly when the transcripts agree, and exactly when a = c.

Add the typed forms TypedConverter.ofDDC_eq_of_next_eq, ofDDC_eq_iff_replies and ofDDC_eq_iff in src/RandomSystems/Typed/. So that composites are again of the form ofDDC, state that two deterministic converters side by side are one:

parallel (ofDDC α hα) (ofDDC γ hγ) = ofDDC (tensorL α γ) (IsDDCFrom.tensorL hα hγ)

This is TypedConverter.parallel_ofDDC, the typed reading of PDCBehavior.tensor_ofDDC. Add the identity as the converter of the forwarding filter (id_eq_ofDDC_filter) and the two forms beside an identity (parallel_ofDDC_id, parallel_id_ofDDC). In series the closure law is the existing TypedConverter.ofDDC_eq_comp.

Acceptance criteria

Take two history functions that agree after every history both have answered so far and differ elsewhere: their reachable parts give one typed converter. Derive PDCBehavior.ofDDC_eq_of_le as an instance of the comparison law. Write (ofDDC α ⊗ ofDDC γ) ≫ ofDDC β and (ofDDC α ≫ ofDDC β) ⊗ ofDDC γ each as one ofDDC.

主要语言
Lean
星标
3
派生
0
平均合并
1 天 7 小时
30 天内合并 PR
123

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

trailofbits/constructive-cryptography 的其他 Issue

查看 trailofbits/constructive-cryptography 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。