Parma Polyhedra Library requirements
Internal octagonal matrix records, diagnostics and entry distances
1. Pseudo-triangular mathematical-value records PPL-SPEC-000791

For a valid matrix of admitted finite or positive-infinite coefficients, ascii_dump shall emit its space dimension, a space and a newline, followed by each physical row in 🔗 1. Pseudo-triangular matrix values and physical coordinates order. Each row shall contain its coefficient values in increasing column order, with a space after each coefficient and a newline after the row. A zero-dimensional record shall contain only the dimension line. Coefficient output shall retain 🔗 5. Mathematical numeric output and stream delivery status and 🔗 6. Checked numeric stream policy integration for the selected profile; finite native values shall retain their exact mathematical value independently of caller precision. These records shall not promise preservation of native zero signs or object representations.

The matrix shall remain unchanged. Dumping shall not consume following stream data or promise a checksum, a trailing delimiter beyond its own frame, or an interchange guarantee across incompatible scalar profiles. The no-argument form shall write the same record to std::cerr. Stream failures shall retain the stream's selected reporting mechanism.

2. Exact value-record loading and rejection states PPL-SPEC-000792

The decoded space dimension shall not exceed max_num_rows()/2. ascii_load shall return false for a greater dimension before resizing, computing its storage size or requesting storage for that extent. For a valid admitted record under 🔗 1. Pseudo-triangular matrix values and physical coordinates, it shall read exactly the physical row-major coefficient count required by its shape. It shall return true only after every coefficient has been accepted exactly by the selected scalar profile and every stored value is finite or positive infinity. True shall establish the specified dimension and values in independently owned coefficients and leave any following frame token available after permitted separating whitespace.

The packed matrix shall be allocated after its coefficient payload has been read. Missing, nonnumeric or negative-signed dimension tokens, truncated or invalid coefficient tokens, negative infinity, NaN and non-exact scalar conversion shall return false through the scalar input's ordinary rejection channel. A rejected or exceptional load may leave a partial target without useful entry values or a coherent old/new dimension promise. Its completed objects shall remain safely destructible, and it may be replaced by a complete successful load or assignment before ordinary value access. Resource/stream exceptions shall retain their selected reporting channel; they shall not be true results. No strong rollback guarantee shall be required. Admitted extents shall retain their normal resource requirements and resource-exception behavior.

PPL-SPEC-000793
3. Human-readable physical rows and output channels PPL-SPEC-000793

The stream insertion operator shall write every stored row in physical order, each coefficient followed by a space and each row followed by a newline, and return the supplied stream. It shall omit the space- dimension header used by 🔗 1. Pseudo-triangular mathematical-value records. An empty matrix shall write no row text. Coefficient output shall retain the selected scalar's mathematical output contract. print() shall write that same human- readable representation to std::cerr. Both forms shall preserve the matrix, and stream failure shall follow the selected stream policy.

PPL-SPEC-000794
4. Owned backing storage and live-payload memory accounting PPL-SPEC-000794

external_memory_in_bytes() shall report the bytes owned outside the matrix wrapper: the backing row allocation, including its retained capacity and metadata, plus externally owned payload of every physically live coefficient under 🔗 8. Row storage and live-payload memory accounting. It shall not count borrowed views or unrelated allocations. Removing logical entries shall not remove still-retained backing capacity from that count. total_memory_in_bytes() shall equal the external count plus sizeof(*this). Counts shall require supported representable memory arithmetic and the selected coefficient type's own accounting contract.

PPL-SPEC-000795
5. Physical-shape and selected-coefficient invariant checking PPL-SPEC-000795

For an otherwise safely inspectable owner, OK() shall accept exactly when its live logical coefficient count matches 2n(n + 1) for its recorded space dimension and its owned DB_Row<T> satisfies 🔗 9. Constructed-row validity checks and diagnostic metadata with the recorded logical size and capacity. This includes each selected coefficient's OK() hook and rejection of NaN. Available extra-debug checks shall retain their configuration scope. A valid empty matrix shall pass.

This checker shall not establish octagonal strong closure, consistency, coherent mirrored constraints or semantic diagonal conventions, and shall not substitute for higher-level finite/positive-infinite operation domains. Callers shall not pass corrupted ownership metadata or read beyond live storage merely to obtain a diagnostic. The checker shall preserve entry values and ownership.

6. Rectilinear distance of physical octagonal entry arrays PPL-SPEC-000796

With the conditions of 🔗 9. Distance workspace protocol and admissible overlaps, rectilinear distance shall return false on unequal space dimensions without modifying result or workspaces. For equal dimensions it shall return true and assign the requested directed approximation of ∑(k, j) ∈ Dndkj, where Dn is exactly the physical coordinate domain of 🔗 1. Pseudo-triangular matrix values and physical coordinates and each finite dkj is the absolute difference of the entry values on call entry. Equal positive infinities shall contribute zero; exactly one positive infinity at any stored coordinate shall make the distance positive infinity. Empty equal-dimensional matrices shall have distance zero.

Accumulation and result conversion shall retain the selected profile's rounding guarantees: successful upward bounds shall be no smaller than the exact sum and downward bounds no larger. Source entries shall be preserved except where the admitted result output overlaps an entry. Reported numerical/resource failures shall not be true results.

7. Euclidean distance of physical octagonal entry arrays PPL-SPEC-000797

With the conditions of 🔗 9. Distance workspace protocol and admissible overlaps, Euclidean distance shall return false on unequal space dimensions without modifying result or workspaces. For equal dimensions it shall return true and assign the requested directed approximation of √(∑(k, j) ∈ Dnd 2kj), using exactly the physical coordinate domain of 🔗 1. Pseudo-triangular matrix values and physical coordinates and finite absolute entry differences on call entry. Equal positive infinities shall contribute zero; exactly one positive infinity at any stored coordinate shall make the distance positive infinity. Empty equal-dimensional matrices shall have distance zero.

Accumulation, square root and result conversion shall retain the selected profile's directed enclosure guarantees. Rational square-root bounds shall retain 🔗 2. Finite rational square root at the selected irrational precision and the context precision of 🔗 3. Selection and ownership of irrational rational precision, without promising every rational perfect square is exact on the selected grid. Source entries shall be preserved except where the admitted result output overlaps an entry. Reported failures shall not be true results.

8. Maximum-coordinate distance of physical octagonal entry arrays PPL-SPEC-000798

With the conditions of 🔗 9. Distance workspace protocol and admissible overlaps, maximum-coordinate distance shall return false on unequal space dimensions without changing result or workspaces. For equal dimensions it shall return true and assign the requested directed approximation of max(k, j) ∈ Dndkj, using exactly the physical coordinate domain of 🔗 1. Pseudo-triangular matrix values and physical coordinates and finite absolute entry differences on call entry. Equal positive infinities shall contribute zero; exactly one positive infinity at any stored coordinate shall make the distance positive infinity. Empty equal-dimensional matrices shall have distance zero.

Coordinate difference, maximum and result conversion shall retain the selected profile's directed guarantees. Source entries shall be preserved except where the admitted result output overlaps an entry. Reported numerical/resource failures shall not be true results.

9. Distance workspace protocol and admissible overlaps PPL-SPEC-000799

Distance operations shall require valid matrices of admitted finite or positive-infinite entries, supported rounding directions and temporary/ result profiles supporting every required conversion, subtraction, accumulation, square-root or maximum operation. Negative infinity and NaN shall remain outside these metric domains. Every intermediate shall satisfy the selected arithmetic, precision and resource prerequisites. Initialization and synchronization shall retain 🔗 3. Thread initialization, default state and finalization where required.

The three mutable workspaces shall be pairwise distinct and independent of matrix coefficients; their values may be overwritten. The result may be independent, overlap one workspace when types permit, or overlap one live input entry while all workspaces remain independent. Results shall use input values on entry. Identical matrix owners may be passed as both inputs. Dimension mismatch shall precede any result/workspace update. Other failures shall retain the selected numerical policy's permitted output states without a universal rollback guarantee. The generic helper shall apply these conditions with the library's rectilinear, Euclidean or maximum-coordinate specialization for the same temporary type.

PPL-SPEC-000800
10. Integer square root for capacity calculations PPL-SPEC-000800

For every dimension_type input x, isqrt shall return the nonnegative integer r satisfying r2 ≤ x < (r + 1)2. The inequalities describe mathematical integers and shall not require overflowing machine multiplication to check their meaning. The helper shall not allocate or require numerical-library initialization. Its result shall be valid for the actual radicand used in the row-bound calculation of 🔗 2. Sized construction, destruction and the supported row bound.