The specification document doc/specs/stdlib_specialmatrices.md currently omits two critical technical details present in the module's implementation. First, the Syntax section for the tridiagonal constructors fails to document the optional state argument (of type linalg_state_type), which is actively used in the test suite for non-fatal error handling (e.g., A = tridiagonal(dl, dv, du, state)). Second, under the Operator overloading section specifies that matrices involved in addition and subtraction must share the same type and kind, but it omits the strict requirement that their spatial dimensions must also identically match to prevent runtime shape mismatch faults. Updating these sections will properly align the formal specification with the codebase's existing API and safety constraints.
The specification document doc/specs/stdlib_specialmatrices.md currently omits two critical technical details present in the module's implementation. First, the Syntax section for the tridiagonal constructors fails to document the optional state argument (of type linalg_state_type), which is actively used in the test suite for non-fatal error handling (e.g., A = tridiagonal(dl, dv, du, state)). Second, under the Operator overloading section specifies that matrices involved in addition and subtraction must share the same type and kind, but it omits the strict requirement that their spatial dimensions must also identically match to prevent runtime shape mismatch faults. Updating these sections will properly align the formal specification with the codebase's existing API and safety constraints.