leanprover / leanprover/reference-manual

Counterexamples for Lean's type system

Open
#266 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

doc-request
Dominant language
Lean
Stars
129
Forks
67
Avg merge
1d 15h
Merged PRs (30d)
16

Description

What question should the reference manual answer?

What theoretically desirable properties of type systems is Lean known not to possess (e.g., subject reduction, canonicity, ?) and what are concrete examples of these violations?

Additional context

Searching for these topics on the Lean Zulip returns various long discussions which are not always easy to follow, not least because they often assume context from elsewhere (e.g., Twitter (which is not easy to access for everyone, the Rocq issue tracker (which assumes that you can read Rocq), or Mario Carneiro's thesis (which assumes that you can read type theoretic notation)). In addition, if there are examples, they are often in Lean 3 or no-longer-compiling old Lean 4.

It would be great to have all of these examples in one place together with good explanations, and given that the reference manual is a place to look up the details and it has a chapter on Lean's type system, I thought that this might be in scope for the reference manual.

Examples of code that I think would be great to keep up-to-date and explain in detail are this and this.

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 reference manual's existing chapter on Lean's type system, then review the two linked Zulip discussions and verify their examples against current Lean 4. The work is done when the relevant missing properties, concrete counterexamples, and explanations are consolidated in one up-to-date reference-manual section.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.