Missing order instances for `Bool`

Aperta
#16,450 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
devtools

Direzione di ricerca

Start from the five failing #synth lines in the issue and find where the existing LE, LT, Ord, Min and Max instances for Bool are defined in the core Lean library's Init sources. The targets are the Std.IsLinearOrder and Std.LawfulOrder* classes. Done when all five #synth checks succeed and the new instances compile with their proofs, which requires some familiarity with Lean theorem proving.

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

Descrizione

bug
Prerequisites
  • Check that your issue is not already filed:
    https://github.com/leanprover/lean4/issues
  • Reduce the issue to a minimal, self-contained, reproducible test case.
    Avoid dependencies to Mathlib or Batteries.
  • Test your test case against the latest nightly release, for example on
    https://live.lean-lang.org/#project=lean-nightly
    (You can also use the settings there to switch to “Lean nightly”)
  • When reporting a perceived soundness bug: Does it affect lake check --paranoid?
    If in doubt, please reach out on [email protected] for responsible disclosure.
Description

There are some order instances for Bool, but most of the order properties are missing. This is not the case for other types such as Nat, String, List, etc.

Context

Mathlib has a LinearOrder instance for Bool which needs to be defined manually. If we had these instances, then it could be defined using LinearOrder.ofStd.

Steps to Reproduce
-- These work
#synth LE Bool
#synth LT Bool
#synth Ord Bool
#synth Min Bool
#synth Max Bool

-- These fail
#synth Std.IsLinearOrder Bool
#synth Std.LawfulOrderLT Bool
#synth Std.LawfulOrderOrd Bool
#synth Std.LawfulOrderMin Bool
#synth Std.LawfulOrderMax Bool

Expected behavior: All the instances above exist.

Actual behavior: The instances don't exist.

Versions

Lean 4.37.0-nightly-2026-11-11

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.3k
Fork
1.1k
Merge medio
19h 8m
PR unite (30g)
421

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 DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.