Skip to content

Fix evaluation when the input involves only constants#9

Draft
wegank wants to merge 6 commits intoalgebraic-solving:mainfrom
wegank:raglib-constant-fix
Draft

Fix evaluation when the input involves only constants#9
wegank wants to merge 6 commits intoalgebraic-solving:mainfrom
wegank:raglib-constant-fix

Conversation

@wegank
Copy link
Copy Markdown
Contributor

@wegank wegank commented Apr 23, 2026

This PR adds ConstantSolveFamily to handle the case where all polynomials are constant. It returns [[]] when the constant polynomials have the desired signs, and [] otherwise.

While this fixes RAG:-PointsPerComponents([], pos, ineq), it doesn't resolve the issue where the equations are a list of zeros. To address the issue, this PR adds preliminary checks on the inputs of SemiAlgebraicSolve and only passes filtered Equations to SemiAlgebraicSolveIterateOnFamilies.

@wegank wegank force-pushed the raglib-constant-fix branch from 043a8da to 735b759 Compare April 23, 2026 16:57
@wegank wegank marked this pull request as draft April 24, 2026 12:40
@wegank wegank force-pushed the raglib-constant-fix branch from 346655f to 85306a7 Compare April 24, 2026 12:48
Comment thread src/rag-subroutines.mm Outdated
Comment thread src/rag-subroutines.mm Outdated
return [];
end if;

NewEquations := select(_pol -> not type(_pol, constant), Equations):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
NewEquations := select(_pol -> not type(_pol, constant), Equations):
NewEquations := select(_pol -> not type(_pol, constant), Equations);

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