leanprover / leanprover/fp-lean

[Typo] Sect 9 exercise error: "'List.append_assoc' has already been declared"

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

Nobody has claimed this yet.

Typo
Dominant language
Lean
Stars
192
Forks
73
PR merge metrics
No merged PRs in 30d

Description

January 2024 FPIL sect 9--not exactly a typo, but "technical error" seems too grand.

Prove that appending lists is associative using induction on lists: theorem List.append_assoc (xs ys zs : List α) : xs ++ (ys ++ zs) = (xs ++ ys) ++ zs

List.append_assoc is defined in Basic.lean, so theorem List.append_assoc generates

error:
'List.append_assoc' has already been declared

Perhaps it's better to use a different name in the exercise. Easy enough to rename it though.

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 January 2024 FPIL section 9 exercise and inspect Basic.lean to confirm that List.append_assoc is already defined. Rename the theorem in the exercise so it no longer conflicts, then verify that the exercise no longer produces the duplicate-declaration error.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.