Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#100 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@chetana1410 đang làm issue này rồi.

Từ ngày 24/10/2026.

  • #101 của @chetana1410 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
Python
Star
1.2k
Fork
65
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của huggingface/Math-Verify

Tất cả issue của huggingface/Math-Verify

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.