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() returns True for any two equations with no free symbols

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

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

Từ ngày 24/10/2026.

  • #94 của @pfolex — đang mở

Đánh giá

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

Hướng nghiên cứu

Start by running the two reproduction snippets in the issue: verify(gold=parse("$3 = 4$"), target=parse("$1 = 2$")) should return False but currently returns True. The bug is in the equation fallback of verify, which solves each side over an empty symbol set and treats the resulting empty solution lists as a match. Done means symbol-free equations that are not identical no longer verify equal, and the existing tests still pass.

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

Mô tả

verify reports two equations as equivalent whenever both parse to relations with no free symbols. The equation fallback solves each side over an empty symbol set, obtains two empty solution lists, and treats the empty pairwise comparison as a match, so any symbol-free pair compares equal, including outright false equations.

Reproduce (math-verify 0.9.0, current PyPI release, Python 3.12):

from math_verify import parse, verify

gold = parse("$I_{e}(0)=\\gamma I_{i}(0)$")
target = parse("$I_{i}(0) = I_{e}(0)$")
print(verify(gold=gold, target=target))  # True

print(verify(gold=parse("$3 = 4$"), target=parse("$1 = 2$")))  # True

Both parses are sympy Equality objects whose free_symbols set is empty: the terms are undefined-function applications such as I_i(0), which do not count as free symbols. verify returns True for both pairs.

Expected: an empty solution list should not satisfy the equation comparison; symbol-free relations that are not trivially identical should not verify equal.

Impact: this inflated benchmark scores in an LLM evaluation harness that grades extracted LaTeX answers through parse/verify — a candidate equation and a structurally different reference equation, both without free symbols, always received deterministic credit. Evidence and the downstream guard:

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.