Lean 4 の `native_decide` が `trustEvalAsAxioms` の明示を要求する変更

Open Beginner friendly
#2,672 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
markdown
Domain
documentation

Research direction

Update the existing native_decide chapter linked in the issue. Start by reading its explanation of additional axioms and #print axioms, then check the linked upstream commit for the changed behavior. Show the error without the option and a narrowly scoped set_option trustEvalAsAxioms true in example; make clear that enabling it does not remove the additional axiom.

Written by the indexing model from the issue text.

Description

メモ

Lean 4 の master で、native_decide(decide +native)を使う宣言は、trustEvalAsAxioms が有効でない限り拒否されるようになりました。ネイティブ計算の結果を追加の公理として使うため、コンパイラや @[implemented_by]・@[extern] の実装を信頼する、という選択を明示させる変更です。通常の by decide までこのオプションが必要になるわけではありません。

既存の native_decide 章ではすでに追加公理と #print axioms を説明しているので、対応ツールチェーンに更新する際に、オプションなしのエラーと、必要な宣言だけを set_option trustEvalAsAxioms true in で許可する例を並べるとよさそうです。許可は追加公理を取り除くものではありません。

上流コミットと現行の公開章を確認した記録です。Lean での実行は未確認です。

Dominant language
Lean
Stars
200
Forks
17
Avg merge
20m
Merged PRs (30d)
6

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lean-ja/lean-by-example

All issues in lean-ja/lean-by-example

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.