leanprover / leanprover/fp-lean

[Typo] 3.1.6.1. Another Representation , Type Signature of `succ`

Open
#261 1 comment 0 reactions 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

Here's the quote:

 An alternative way to represent a positive number is as the successor of some Nat. Replace the definition of Pos with a structure whose constructor is named succ that contains a Nat:

structure Pos where
  succ ::
  pred : Nat

Define instances of Add, Mul, ToString, and OfNat that allow this version of Pos to be used conveniently.

I'm not sure what pred : Nat is for, isn't

structure PosAnswer where
succ : Nat \imp PosAnswer

enough to represent positive natural numbers? Nat starts from zero , the above PosAnswer would start from one.

I saw the constructor :: notation being used in Lean , like

structure And (a b : Prop) : Prop where
  /-- `And.intro : a → b → a ∧ b` is the constructor for the And operation. -/
  intro ::

but I'm not sure what in means in structure Pos

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 documentation section titled “3.1.6.1. Another Representation, Type Signature of succ” and compare the quoted Pos structure with the surrounding explanation. Done means the reported typo or notation issue is resolved and the purpose of pred : Nat is clear to readers.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.