Split a list at an entry: by position, in a filtered image, and against the fold before it
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 44/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Lean
- Star
- 3
- Fork
- 0
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 123
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của trailofbits/constructive-cryptography
-
Automate monoidal whiskering and unitor normalization in cc_normalizeCó thể đã có người làm @MarcIlunga đã nhận hôm nay. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
trailofbits/constructive-cryptography#480 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add MR16 Lemma 5, indifferentiability composition, and specificationCó thể đã có người làm @MarcIlunga đã nhận hôm nay. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
trailofbits/constructive-cryptography#473 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-format
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
trailofbits/constructive-cryptography#471 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
trailofbits/constructive-cryptography#465 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-format
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
trailofbits/constructive-cryptography#462 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của trailofbits/constructive-cryptography
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marketcalls/openalgo#2502 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Security]Unauthenticated WebSocket JSON.parse Without Error Handling Leads to Process TerminationĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
nocobase/nocobase#11711 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
qdrant/qdrant#11723 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
vllm-project/vllm#69791 ·
Maintainer thường phản hồi trong vòng 1 ngày