Skip to content

Answer a family with a whole-number parameter - #2205

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-family-with-an-integer-parameter-is-checked-for-every-integer
Oct 29, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-family-with-an-integer-parameter-is-checked-for-every-integer

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #212: the second of the three items left there, families with an integer parameter.

sin(x) = 1/2 in x and y was declined. Its families come from the periodic root pi/6 + 2 pi n_1, and the check that each family holds pinned n_1 at 1.37, where it does not hold, and asked Simplify, which knows nothing about n_1.

  • The non-square solver pins an n_1 that a family brings at a whole number, and decides the residual as forall n_1 in ZZ : residual = 0.
  • Under that quantifier, a new reader in QuantifierFacts takes a whole number of periods out of a trigonometric function's argument. sin, cos, sec and csc lose a whole multiple of 2 pi, and tan and cot one of pi, as Complex.sin_add_int_mul_two_pi and Complex.tan_add_int_mul_pi have it. It also finds the multiple where the argument is gathered into one product, tan(pi * (1/4 + n)).
  • The reader is consulted only under a quantifier over whole numbers. Outside one nothing changes, and sin(x + pi n) keeps its pi n.
master (7633d18) now
sin(x) - 1/2 in x, y null [[pi / 6 + 2 * pi * n_1, t_1], [pi - pi / 6 + 2 * pi * n_1, t_1]]
cos(x) - 1 in x, y null [[2 * pi * n_1, t_1]]
tan(x) - 1 in x, y null [[pi / 4 + pi * n_1, t_1]]
forall n in ZZ : sin(x + 2 pi n) = sin(x) as written True
forall n in ZZ : tan(pi/4 + pi n) = 1 as written True

Still open on #212: the family of sqrt(y) - x, whose check needs sqrt(t^2) = t under the sector condition, and the parameters' names in the result.

Tests: PeriodByFactsTest (7 decided, 3 not claimed, and nothing assumed outside a quantifier) and AFamilyWithAWholeNumberParameterIsAnswered. The latter checks each family at whole values of n_1 and other values of the rest. Full suite 17838/0, interactive trio, AOT smoke 64/0, all frameworks build.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

sin(x) = 1/2 in x and y was declined. Its families come from the
periodic root pi/6 + 2 pi n_1, and the check that each family holds
pinned n_1 at 1.37, where it does not, and asked Simplify, which knows
nothing about n_1.

The non-square solver now pins an n_1 a family brings at a whole
number, and decides the residual as forall n_1 in ZZ : residual = 0.
The quantifier establishes that n_1 is whole, and a new reader takes a
whole number of periods out of a trigonometric function's argument
under it: sin and cos lose a whole multiple of 2 pi, tan and cot one of
pi, as Complex.sin_add_int_mul_two_pi and Complex.tan_add_int_mul_pi
have it. The reader is asked only under a quantifier over whole
numbers, and outside one nothing changes.

sin(x) - 1/2 in x, y is [[pi/6 + 2 pi n_1, t_1], [pi - pi/6 + 2 pi n_1,
t_1]], and forall n in ZZ : sin(x + 2 pi n) = sin(x) is True.

Part of #212

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.37209% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.57%. Comparing base (7633d18) to head (d5c4335).

Files with missing lines Patch % Lines
...s/AngouriMath/Functions/Boolean/QuantifierFacts.cs 90.00% 0 Missing and 2 partials ⚠️
...uous/Evaluation.Continuous.Trigonometry.Classes.cs 66.66% 0 Missing and 2 partials ⚠️
...us/Solvers/EquationSolver/NonSquareSystemSolver.cs 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2205   +/-   ##
=======================================
  Coverage   86.57%   86.57%           
=======================================
  Files         301      301           
  Lines       66751    66838   +87     
  Branches    19367    19410   +43     
=======================================
+ Hits        57788    57864   +76     
- Misses       4874     4878    +4     
- Partials     4089     4096    +7     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.12% <88.37%> (+<0.01%) ⬆️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...us/Solvers/EquationSolver/NonSquareSystemSolver.cs 88.54% <94.11%> (+0.76%) ⬆️
...s/AngouriMath/Functions/Boolean/QuantifierFacts.cs 88.31% <90.00%> (+0.08%) ⬆️
...uous/Evaluation.Continuous.Trigonometry.Classes.cs 96.29% <66.66%> (-1.14%) ⬇️

... and 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit d9ff463 into master Oct 29, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 29, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-family-with-an-integer-parameter-is-checked-for-every-integer branch October 29, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant