lambdaclass / lambdaclass/lambda_compiler_kit

style: proof style improvements in RegexSpec.lean

オープン
#24 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Lean
スター
2
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

説明

Items

Low-priority style items flagged by AI code review on PR #9.

1. Unused dr binding in regex_match_sound

regex_match_sound destructs the regex_match_correct result with obtain ⟨ast, _, h_parse, _, h_match⟩ — the _ discarding dr is fine. However, a comment noting why dr is intentionally discarded (we only need the AST-level match) would help readers understand the relationship.

2. Fragile DecidableEq instance comparison

Some proof branches use pattern matching on DecidableEq results that could be made more robust with cases, simp, and Subsingleton.elim to avoid depending on instance resolution order.

3. Specialized lemmas that could use general ones

Some lemmas in the Glushkov submodule have specialized proofs for things that general mathlib lemmas already cover. Replace with calls to general lemmas from Matcher.lean.

References

  • Flagged by AI code review on PR #9

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

RegexSpec.lean を読み、regex_match_sound と Glushkov の証明から始めて、その後、特殊化された補題と Matcher.lean の一般的な補題を比較してください。DecidableEq の分岐と破棄された dr binding を確認してください。コメント、堅牢な証明ケース、一般的な補題の再利用を、証明の挙動を変更せずに適用できていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

領域
compilers
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。