Skip to content

Fix to test case (problem_103) and formatting issues in sample_examples#71

Open
barabbs wants to merge 3 commits intotrishullab:mainfrom
barabbs:main
Open

Fix to test case (problem_103) and formatting issues in sample_examples#71
barabbs wants to merge 3 commits intotrishullab:mainfrom
barabbs:main

Conversation

@barabbs
Copy link
Copy Markdown
Contributor

@barabbs barabbs commented Mar 28, 2026

Hi @amit9oct,

It's me again :)

Opening this PR to address issues #69 and #70

Copilot AI review requested due to automatic review settings March 28, 2026 12:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses two reported issues by correcting a failing/incorrect test case in the Lean human-eval suite and normalizing section-tag formatting in sample example Lean files (used by the repo’s extraction/parsing tooling).

Changes:

  • Fix the expected output for the (185, 546) test case in human_eval/problem_103.lean.
  • Add missing generated_spec_body section markers in sample_examples/problem_3.lean and sample_examples/problem_5.lean.
  • Remove an extra by token in sample_examples/problem_1.lean to match the surrounding sectioned-proof style.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/lean4/sample_examples/problem_5.lean Splits generated_spec vs generated_spec_body with explicit section markers.
src/lean4/sample_examples/problem_3.lean Splits generated_spec vs generated_spec_body with explicit section markers.
src/lean4/sample_examples/problem_1.lean Removes extra by after spec_isomorphism signature to standardize formatting.
src/lean4/human_eval/problem_103.lean Updates one test expected output for the average/binary conversion task.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

-- #test implementation 964 977 = some "0b1111001010"
-- #test implementation 996 997 = some "0b1111100100"
-- #test implementation 185 546 = some "0b101101110"
-- #test implementation 185 546 = some "0b101101101"
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated expected output matches the current implementation/problem_spec behavior (it uses xs.sum / xs.length, i.e., integer division/floor). However, the problem docstring still says "Round the answer to the nearest integer", which conflicts with the floor-rounding used by all existing tests (e.g., (964, 977) → 970.5 → 970). Please update the docstring to reflect floor rounding (or change the spec/implementation to do nearest-integer rounding and update the tests accordingly).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants