|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
Direct sum of two invertibles — the trivial compositional preserver. More...
Public Types | |
| using | first_factor = A |
| using | second_factor = B |
| using | inverse_type |
| Inverse: block-diagonal of the factor inverses. | |
Public Member Functions | |
| constexpr auto | inverse () const |
| template<typename A2, typename B2> | |
| constexpr auto | operator* (DirectSum< A2, B2 >) const |
| Composition: (A ⊕ B) · (A' ⊕ B') = (A·A') ⊕ (B·B'). | |
| template<typename A2, typename B2> | |
| constexpr bool | operator== (DirectSum< A2, B2 >) const |
Direct sum of two invertibles — the trivial compositional preserver.
(A ⊕ B) is the block-diagonal operator
[[ A, 0 ], [ 0, B ]]
with (A ⊕ B)^{-1} = A^{-1} ⊕ B^{-1} and (A ⊕ B) · (A' ⊕ B') = (A·A') ⊕ (B·B').
This is Tier 1 of #366: invertibility of a block-diagonal sum is a consequence of invertibility of the blocks, with no Schur-complement recurrence needed. Cheapest move on the block-composition ladder, and the one that builds arbitrarily-large well-behaved matrices from 2×2 bases "for free" by iteration.
The factors A and B are expected to be types that participate in composition (operator* returning a value of the same structural shape) and expose inverse() returning an inverse_type; Invertible2x2<T, …> is the canonical instance today.
| using dedekind::linear_algebra::DirectSum< A, B >::inverse_type |
Inverse: block-diagonal of the factor inverses.
The closed form (A ⊕ B)^{-1} = A^{-1} ⊕ B^{-1} is exact whenever each factor's inverse is exact — here, inherited from Invertible2x2 over Rational<Z>.
|
inlineconstexpr |
Composition: (A ⊕ B) · (A' ⊕ B') = (A·A') ⊕ (B·B').
The two blocks compose independently; the output is again a DirectSum.