Split a list at an entry: by position, in a filtered image, and against the fold before it
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 44/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 領域
- backend
研究方向
Start in Probability.List, then read the related issue #369 and the core lemmas filterMap_eq_append_iff and filterMap_eq_cons_iff. Add the requested split, prefix, and ForallScan lemmas, using the acceptance examples to check them. Done means all four list examples in the acceptance criteria can be proved.
由索引模型根據 Issue 內容生成。
描述
Background
Predicates on transcripts speak of an entry together with the entries before it: a split $l=p\mathbin{+!!+}e::s$. Four facts about such splits are used again and again.
A split is a position, so a property of the splits is decided at the finitely many positions:
\big(\exists\,p\ e\ s,\ l=p\mathbin{+\!\!+}e::s\ \land\ P\,p\,e\big)\iff\big(\exists\,i<|l|,\ P\,(\mathrm{take}\ i\ l)\ l_i\big),
\qquad
\big(\forall\,p\ e,\ p\mathbin{+\!\!+}[e]\ \text{prefix of}\ l\ \to\ Q\,p\,e\big)\iff\big(\forall\,i<|l|,\ Q\,(\mathrm{take}\ i\ l)\ l_i\big).
An entry of a filtered image has a place in the list:
\mathrm{filterMap}\,f\,l=\mathit{pre}\mathbin{+\!\!+}d::\mathit{post}\ \Longrightarrow\ \exists\,l_a\,a\,l_b,\quad l=l_a\mathbin{+\!\!+}a::l_b,\quad \mathrm{filterMap}\,f\,l_a=\mathit{pre},\quad f\,a=\mathrm{some}\ d,
and the same for filter. Last, say that $P$ holds along $l$ from $b$ when every entry $a$ satisfies $P(c,a)$, with $c$ the fold of a step $f$ from $b$ over the entries before $a$. "Each query is valid for the state reached before it" is of this form:
\mathrm{ForallScan}\ b\ l\ \land\ \mathrm{ForallScan}\ (\mathrm{foldl}\,f\,b\,l)\ m\ \Longrightarrow\ \mathrm{ForallScan}\ b\ (l\mathbin{+\!\!+}m),
\qquad
\mathrm{ForallScan}\ b\ (l\mathbin{+\!\!+}a::m)\ \Longrightarrow\ P(\mathrm{foldl}\,f\,b\,l,\ a).
Proposed change
In Probability.List, add List.exists_eq_append_cons_iff, List.forall_prefix_concat_iff_forall_take, List.exists_split_of_filterMap_eq, List.exists_split_of_filter_eq (from core's filterMap_eq_append_iff and filterMap_eq_cons_iff), and List.ForallScan with ForallScan.append and ForallScan.of_append_cons. Related to #369.
Acceptance criteria
Decide whether some entry of [1, 2, 4] is larger than the sum of the entries before it. Split [1, 2, 3, 4] at an entry of its even entries, in the filterMap and the filter form. With a running sum as the fold, check a predicate at each entry of a list split in two.
- 主要語言
- Lean
- 星號
- 3
- 分支
- 0
- 平均合併
- 1 天 2 小時
- 30 天內合併 PR
- 159
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
trailofbits/constructive-cryptography 的其他 Issue
-
RFC: Budget-free dependent Interface, cumulative CR18 Systems/Converters, and endomorphism Filters未關閉
難度 5/5 一週以上 新手友好度 12/100
trailofbits/constructive-cryptography#504 ·
維護者通常 1 天內回覆
-
needs-format
難度 5/5 一週以上 新手友好度 12/100
trailofbits/constructive-cryptography#471 ·
維護者通常 1 天內回覆
-
Exclude all approximate ideal witnesses with separating tests可能已有人在做 @MarcIlunga 於 1 天前認領。 未關閉
難度 5/5 一週以上 新手友好度 15/100
trailofbits/constructive-cryptography#449 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 12/100
trailofbits/constructive-cryptography#430 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 15/100
trailofbits/constructive-cryptography#429 ·
維護者通常 1 天內回覆
查看 trailofbits/constructive-cryptography 的全部 Issue
相似的 Issue
-
oncoref MappingProxyType in proteome.layers breaks deepcopy in reference_coverage._inventory可能已有人在做 @iskandr 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
HE-Arc/le-panier-du-coin#49 ·
維護者通常 1 天內回覆
-
Modern `HttpServletMcpTransport` does not check `Mcp-Name` when `params.name` or `params.uri` is not a JSON string可能已有人在做 @starryeye 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
modelcontextprotocol/java-sdk#1352 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
ClockGU/clockwork-backend#189 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100