Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

verify() rejects a not-equal written in the other order

Aperta
#100 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@chetana1410 ci sta già lavorando.

Dal 24/10/2026.

  • #101 di @chetana1410 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start by tracing verify() and the relation lookup that uses INVERSE_RELATIONS, then inspect the existing tests for inverse relations. Add coverage for swapped Ne comparisons with and without raise_on_error=True; done means equivalent inequalities match in both orders, while comparisons with different values remain false.

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

Descrizione

verify() returns False when the two sides of a not-equal are swapped. With raise_on_error=True the same comparison raises KeyError.

from math_verify import parse, verify

verify(parse(r"$1 \neq 2$"), parse(r"$2 \neq 1$"))
# False

verify(parse(r"$x \neq y$"), parse(r"$y \neq x$"), raise_on_error=True)
# KeyError: <class 'sympy.core.relational.Unequality'>

x > 1 matches 1 < x, and x = 1 matches 1 = x. Those relations are listed in INVERSE_RELATIONS. Ne is not, so the flipped comparison looks it up and raises. The default raise_on_error=False turns that into False, so 1 \neq 2 is scored wrong against 2 \neq 1.

The same statement in the same order still matches, and a different value stays wrong: x \neq 1 against x \neq 2 is False.

This is on main (ba3d3aa).

Lingua principale
Python
Stelle
1.2k
Fork
65
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 huggingface/Math-Verify

Tutte le issue di huggingface/Math-Verify

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.