Pilot prep: simplex schema, projection, alignment, lint, stats, pilot scripts, protocol v1
ci / python (pull_request) Successful in 17s
ci / lean (pull_request) Successful in 1m10s
ci / image (pull_request) Has been skipped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYqwNMyPUHeTbFWg83GQq6
This commit is contained in:
2026-10-22 05:52:28 +00:00
parent 3e0782c62a
commit ca98703538
19 changed files with 2024 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
from leanbench.lint import lint
from leanbench.project import project
def found(code):
return lint(project(code))
def test_clean_statement_has_no_findings():
code = "theorem t (G : Type*) [Group G] (g : G) : g * 1 = g := by sorry"
assert found(code) == []
def test_unused_binder():
assert "unused_binder:k" in found("theorem t (n k : ℕ) : n = n := by rfl")
def test_carrier_type_is_not_flagged_as_unused():
assert not any(f.startswith("unused") for f in found(
"theorem t (G : Type*) [Group G] (g : G) : g = g := by rfl"))
def test_natural_subtraction_hazard():
assert "nat_subtraction" in found("theorem t (a b : ℕ) : a - b + b = a := by sorry")
assert "nat_subtraction" not in found("theorem t (a b : ℤ) : a - b + b = a := by ring")
def test_integer_division_hazard():
assert "integer_division" in found("theorem t (a : ℕ) : a / 2 * 2 = a := by sorry")
def test_trivial_goal_and_degenerate():
assert "trivial_goal" in found("theorem t (n : ℕ) : True := by trivial")
assert "degenerate" in found("theorem t : 2 + 2 = 4 := by norm_num")