Repository navigation
Decide a symbolic pivot before choosing it - #2350
Merged
Rafael-SOWNet merged 1 commit intoNov 3, 2026
Merged
Conversation
The row echelon forms were GenericTensor's, whose elimination asked whether a pivot was the literal 0. An entry the elimination had made itself, like c + -c / a * a, is 0 without being written so: it was chosen and divided by, so the reduced form of [[a, b], [c, d]] simplified to NaN, and the rank of [[a, b], [2a, 2b]], whose second row is twice the first, was 2. 2.6.0 does the same. The elimination is written over the entries, with GenericTensor's steps: the first entry of a column that is not 0, from the current row down, for its pivot, rows swapped up, and the reduced form's pivot rows divided by their pivot. Each entry it makes is normalised, a rational function over the rationals to RationalFunction's canonical quotient, where 0 is the literal 0, and anything else is simplified when asked whether it is 0. A symbolic matrix's rank is its rank for general values of its symbols: [[a, b], [2a, 2b]] has rank 1, and [[a, b, c], [d, f, g], [a + d, b + f, c + g]] rank 2. Matrices of numbers come out as they did: the 177 matrix tests pass unchanged, and matrixcheck is clean on 1200 random ones. Part of #2345 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2350 +/- ##
==========================================
- Coverage 86.79% 86.79% -0.01%
==========================================
Files 312 312
Lines 68664 68709 +45
Branches 19987 20006 +19
==========================================
+ Hits 59595 59633 +38
- Misses 4902 4907 +5
- Partials 4167 4169 +2
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-symbolic-pivot-is-simplified-before-it-is-chosen
branch
November 3, 2026 13:54
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.
Closes #2345.
The row echelon forms were GenericTensor's, whose elimination asks whether a pivot is the literal 0. An entry the elimination makes itself, like
c + -c / a * a, is 0 without being written so. It was chosen and divided by.[[a, b], [2a, 2b]].Rank21[[a, b, c], [d, f, g], [a + d, b + f, c + g]].Rank32[[x, x^2], [1, x]].Rank21[[sin(t)^2 + cos(t)^2, 1], [1, 1]].Rank21[[a, b], [c, d]].ReducedRowEchelonForm.Simplify()NaN[[1, 0], [0, 1]][[a, b], [2a, 2b]].ReducedRowEchelonForm.Simplify()NaN[[1, b / a], [0, 0]]RationalFunction's canonical quotient, where 0 is the literal 0. Anything else (sin,pi, more than 8 symbols) is simplified when asked whether it is 0, with aprovidedon the zero set aside.0wherea = b = 0" is not something anintcan say, and the doc comment states which rank it is.[[x, x^2], [1, x]]reduces to[[1, x provided not x = 0], [0, 0]]). Whether the reduced form should instead carry the conditions as a whole, or decline, as the issue's second bullet raises, is left open; NaN is gone either way.Tests:
ASymbolicPivotIsDecidedBeforeItIsChosenTest, 13 cases. 11 fail on master; the two independent ranks pass on both. The full suite, AOT and the nine harnesses pass. There is a BREAKING-CHANGES entry, measured on 2.6.0.🤖 Generated with Claude Code