lean-ja / lean-ja/lean-by-example

Type が実行時に消去される

Open
#1,452 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

コード例 型システム
Dominant language
Lean
Stars
188
Forks
15
Avg merge
9h 8m
Merged PRs (30d)
6

Description

https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/.E2.9C.94.20Can.20we.20define.20.60BEq.60.20instance.20for.20.60Type.60.3F/near/484056821

Eric Wieser: Also, == is usually used for runtime concepts, not for proving; but at runtime, all types are erased and therefore all have the same representation in memory
You can see this with #eval unsafe ptrAddrUnsafe Nat; all the types refer to the dummy address 1, and so there is no data to distinguish them by

#eval unsafe ptrAddrUnsafe Nat

Contributor guide

Open the contributing guide

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.

Research direction

Start with the linked Zulip discussion and run the issue's #eval unsafe ptrAddrUnsafe Nat example to understand the reported behavior. The issue names no repository file or test; done would require identifying the relevant learning material and documenting the runtime type-erasure explanation with a clear example.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.