leanprover-community / leanprover-community/mathlib4

`Zero ℕ` instance breaks `acyclic` tactic

Open
#7,631 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lean
Stars
4.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

import Mathlib

inductive Foo
| mk (t s : Foo)

-- `Lean.MVarId.acyclic` failed:
example (h: Foo.mk s s = s): False := nomatch h  -- missing cases

-- because of `simp_arith` can't solve this goal:
example: sizeOf s < sizeOf (Foo.mk s s) := by simp_arith  -- unsolved goals

-- problem arises there:
example {n: Nat}: Zero.zero ≤ n := by simp  -- simp made no progress

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 three minimal Lean examples in the issue, especially the Zero.zero ≤ n goal and the uses of Lean.MVarId.acyclic and simp_arith. Reproduce the failures in a small file, then trace the relevant Zero ℕ instance and confirm that simplification, arithmetic, and acyclicity work without unsolved goals.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.