leanprover-community / leanprover-community/lean
neither computable nor noncomputable
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 433
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
(Unfortunately I haven't minimised this to the point we can avoid mathlib.)
import set_theory.ordinal
inductive G : Type 1
| mk : ∀ α : Type, (α → G) → G
noncomputable def N : ordinal → G
| O₁ := ⟨ O₁.out.α,
λ O₂, have hwf : (ordinal.typein O₁.out.r O₂) < O₁ := sorry,
N (ordinal.typein O₁.out.r O₂) ⟩
using_well_founded {dec_tac := tactic.assumption}
gives a warning definition 'N' was incorrectly marked as noncomputable, while
import set_theory.ordinal
inductive G : Type 1
| mk : ∀ α : Type, (α → G) → G
def N : ordinal → G
| O₁ := ⟨ O₁.out.α,
λ O₂, have hwf : (ordinal.typein O₁.out.r O₂) < O₁ := sorry,
N (ordinal.typein O₁.out.r O₂) ⟩
using_well_founded {dec_tac := tactic.assumption}
gives an error rec_fn_macro only allowed in meta definitions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two definitions using the set_theory.ordinal import and compare the handling of noncomputable definitions, recursive definitions, and using_well_founded. Start at the rec_fn_macro and noncomputable checks mentioned by the diagnostics; done means the example has consistent, tested behavior rather than conflicting warnings and errors.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100