termination_by 利用時に rfl / decide が失敗する具体例を TerminationBy に追加#2323
Draft
Copilot wants to merge 3 commits into
Draft
termination_by 利用時に rfl / decide が失敗する具体例を TerminationBy に追加#2323Copilot wants to merge 3 commits into
termination_by 利用時に rfl / decide が失敗する具体例を TerminationBy に追加#2323Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/lean-ja/lean-by-example/sessions/06275766-93cb-4539-a56f-36abb4b035e6 Co-authored-by: Seasawher <47292598+Seasawher@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issue with termination_by causing rfl failure
May 19, 2026
termination_by 利用時に rfl / decide が失敗する具体例を TerminationBy に追加
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.
termination_byを使った整礎再帰定義は、同等の計算をする非再帰定義と比べて還元性が異なり、rflやdecideが通らないケースがあります。この差分が伝わるよう、
TerminationByの解説に対比付きの最小例を追加しました。追加: 整礎再帰版の実例 (
String.padLeftWF)termination_by length - input.lengthを使う左パディング関数を追加rfl/decideが失敗し、native_decideで示せることを明示追加: 非再帰版の対比例 (
String.padLeftSimple)rflで証明できることを並べて提示ドキュメント構成
termination_by解説フロー内に、還元性の違いを示す短い説明とコード例を挿入