Skip to content

Support multi-line PARI formulas for multiple functions#582

Draft
Copilot wants to merge 8 commits intomainfrom
copilot/support-multi-line-pari-formulas
Draft

Support multi-line PARI formulas for multiple functions#582
Copilot wants to merge 8 commits intomainfrom
copilot/support-multi-line-pari-formulas

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 5, 2025

  • Explore repository structure and understand PARI/LEAN formula generation
  • Build project and run existing tests to verify current state
  • Identify the required changes in PariFormula::toString()
  • Modify PariFormula::toString() to split multi-function formulas into multiple lines
  • Update test expectations in tests/formula/pari-function.txt
  • Build and test changes
  • Verify formula generation with example programs
  • Run full test suite to ensure no regressions
  • Document the change in CHANGELOG.md
  • Address code review feedback
  • Update branch with latest changes from main
  • Move changelog entry to the top
  • Fix failing PARI formula tests after merge
  • Simplify code by removing unnecessary semicolon separator for single functions
Original prompt

This section details on the original issue you should resolve

<issue_title>Multi-line PARI formulas</issue_title>
<issue_description>Similarly to the LEAN formula generation, it would be nice to split the generated formula code for PARI/GP into multiple lines if there are multiple functions.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits November 5, 2025 20:08
Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for multi-line PARI formula generation Support multi-line PARI formulas for multiple functions Nov 5, 2025
Copilot AI requested a review from ckrause November 5, 2025 20:13
@ckrause
Copy link
Copy Markdown
Contributor

ckrause commented Feb 16, 2026

@copilot update the branch and move the changelog message to the top.

Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 16, 2026

@copilot update the branch and move the changelog message to the top.

Done. The branch is already up to date with main (merged in commit 38086b8), and I've moved the changelog entry to the top in commit bf70cf9.

@ckrause
Copy link
Copy Markdown
Contributor

ckrause commented Mar 14, 2026

@copilot I updated the branch. Fix the failing pari formula tests (fast tests). Question to your change: why do we still need to keep the old code path with semicolon separator? Isn't this for 1 function only, where we don't need a separator anyway?

- Update A001715, A002944, A077849, and A215020 to use multi-line format
- Remove unnecessary semicolon separator for single functions (no separator needed when there's only one entry)

Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 14, 2026

@copilot I updated the branch. Fix the failing pari formula tests (fast tests). Question to your change: why do we still need to keep the old code path with semicolon separator? Isn'...

Fixed the failing tests in commit 88377bf. The merge incorrectly reverted some test entries (A001715, A002944, A077849, A215020) back to the old single-line format.

Regarding your question about the semicolon separator: You're absolutely right! For single functions, there's no need for a separator since the formula generator produces a single entry. I've simplified the code to use an empty separator for single functions instead of the semicolon.

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.

Multi-line PARI formulas

2 participants