grind builds a kernel-rejected proof if typeclass instantiation fails

Aperta
#16,899 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
testing

Direzione di ricerca

Start by reproducing the provided Lean example with the reported nightly version and inspect the grind proof generation path where failed typeclass synthesis is handled. Trace how the generated proof is checked by the kernel. Done means the example reports the expected typeclass synthesis error without a kernel type mismatch.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Prerequisites
Description

If we set up a proof with grind where typeclass instantiation fails (here ofNat), then we pass decide (42 = 42#64) = false → (42 = 42#64) = False to the kernel which is not reduced and therefore fails in the kernel.

Context

Discovered whilst random testing (initial input was fuzzer generated and then manually reduced).

Steps to Reproduce
example (h : x = 42#64) : 0 >>> 0#64 <<< 1 = 84#64 := by grind

Expected behavior: failed to synthesize instance of type class error

Actual behavior: typeclass error followed by

bug.lean:1:57: error: (kernel) application type mismatch
  eq_false_of_decide (eagerReduce (Eq.refl false))
argument has type
  false = false
but function has type
  decide (42 = 42#64) = false → (42 = 42#64) = False
Versions

4.38.0-nightly-2026-11-30

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Lingua principale
Lean
Stelle
10.5k
Fork
1.2k
Merge medio
19h 36m
PR unite (30g)
323

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di leanprover/lean4

Tutte le issue di leanprover/lean4

Issue simili

Altre issue su Testing & QA

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.