Repository navigation
A piecewise's condition under a reading asks only the case it takes - #2262
Merged
Rafael-SOWNet merged 1 commit intoOct 30, 2026
Merged
Conversation
DomainCondition reads a piecewise as defined where the case it takes is defined (#1817), but DomainConditionIn conjoined every case's condition. piecewise(sqrt(x) provided x > 0, 1) is 1 at -4, and its condition over the reals, x >= 0 and x in RR, failed there; so did tan(piecewise(pi / x provided x > 0, x / 2)) at 0, where it is 0. Over the complex numbers the two disagreed too. WhereTheCaseItTakesIsDefined now takes the condition it asks of a predicate and a case, and DomainConditionIn passes its own reading through it. PiecewiseConditionInAReadingTest takes four piecewise expressions at seven points over the reals, and three over the complex numbers, where the reading must agree with DomainCondition; four fail on master. Found by work/domaincheck. Part of #2256. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2262 +/- ##
=======================================
Coverage 86.71% 86.71%
=======================================
Files 310 310
Lines 67815 67833 +18
Branches 19676 19684 +8
=======================================
+ Hits 58806 58824 +18
+ Misses 4895 4894 -1
- Partials 4114 4115 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Rafael-SOWNet
deleted the
a-piecewise-is-defined-in-a-reading-where-its-case-is
branch
October 30, 2026 21:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DomainConditionreads a piecewise as defined where the case it takes is defined (#1817).DomainConditionInconjoined every case's condition instead. Sopiecewise(sqrt(x) provided x > 0, 1)is 1 at -4 while its condition over the reals failed there, andtan(piecewise(pi / x provided x > 0, x / 2))is 0 at 0 while its condition failed there too. Over the complex numbers,DomainConditionInandDomainConditiondisagreed as well.WhereTheCaseItTakesIsDefinednow takes the condition to ask of a predicate and a case, andDomainConditionInpasses its reading through it."piecewise(sqrt(x) provided x > 0, 1)".ToEntity().DomainConditionIn(Domain.Real)x >= 0 and x in RRx > 0 and x >= 0 or not x > 0 or not x in RRPiecewiseConditionInAReadingTest: four cases fail on master, and six pass on both. Suite: 18210 passed and 1 failed,SaturationAblationTest.EachOfTheFourRulesIsLoadBearingForTheRunaway. Its budget includesTime = 1 sand the suite ran for 15 minutes under load; it passes four times out of four alone, and the change does not touch saturation. The F# wrapper suite, the Mcp, Terminal and InteractiveWrapper suites and the AOT smoke test pass. BoundCheck, RootCheck, CasBench, PropCheck, SimpSweep, RuleCheck, CanonCheck and Confluence are unchanged. Found bywork/domaincheck.Part of #2256.
🤖 Generated with Claude Code