grind_pattern ドキュメントに _ ワイルドカード必須の利用例を追加#2342
Draft
Copilot wants to merge 5 commits into
Draft
Conversation
Agent-Logs-Url: https://github.com/lean-ja/lean-by-example/sessions/3749ba0d-3ac0-4eaa-a246-c80b3b06a19e Co-authored-by: Seasawher <47292598+Seasawher@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix documentation to clarify grind_pattern accepts underscores
May 21, 2026
grind_pattern ドキュメントに _ ワイルドカード利用例を追加
Member
|
@copilot ワイルドカードを「使わなければいけない」ようなシチュエーションを考案し、それをコード例にしてください |
Agent-Logs-Url: https://github.com/lean-ja/lean-by-example/sessions/161765a1-01be-4465-be63-40d56967a3f6 Co-authored-by: Seasawher <47292598+Seasawher@users.noreply.github.com>
Contributor
Author
|
Copilot
AI
changed the title
May 21, 2026
grind_pattern ドキュメントに _ ワイルドカード利用例を追加grind_pattern ドキュメントに _ ワイルドカード必須の利用例を追加
Member
|
@copilot 存在量化されている箇所とか、引数じゃない変数が入ってるところを埋めるのに、ワイルドカードは役立つのでは? |
Agent-Logs-Url: https://github.com/lean-ja/lean-by-example/sessions/85c495d7-c534-4048-881e-329f2e911da5 Co-authored-by: Seasawher <47292598+Seasawher@users.noreply.github.com>
Contributor
Author
はい、その理解で合っています。該当箇所の説明コメントを更新して、「定理の引数に現れない位置を埋めるときに |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
grind_patternのパターン指定でワイルドカード_を使える点に加えて、_を使わないと書けないケースを明示する例に更新しました。「未登録では失敗し、
_を含むパターン登録後に成功する」ことを同一文脈で示しています。変更内容
LeanByExample/Declarative/GrindPattern.leanの_例を、_が必須になるシナリオに差し替えlocal axiom RfSuccを使い、grind_pattern未設定時はgrindが通らない例を維持local grind_pattern RfSucc => R (f z) yはunknown identifier 'z'で失敗することを#guard_msgsで明示local grind_pattern RfSucc => R (f _) yなら登録でき、grindが通ることを対比で提示追加した例(抜粋)