diff --git a/research/orthogonal-schur-rigidity/PROOF.md b/research/orthogonal-schur-rigidity/PROOF.md new file mode 100644 index 0000000000..2afd2e0053 --- /dev/null +++ b/research/orthogonal-schur-rigidity/PROOF.md @@ -0,0 +1,170 @@ +# Orthogonal Schur dilation rigidity + +This contribution was produced by Nick Petalas. Apache-2.0. + +The claim is a scoped finite-dimensional theorem over R or C. The positive +Gram-isometry argument is the classical uniqueness argument for a minimal +positive-operator dilation. The contribution is its explicit application to +the prescribed-pivot Schur interface, including the entire residual pair. +No literature-wide priority claim is made. + +## Statement + +Fix d >= 1 and Hermitian d-by-d matrices A,B,H, with A and B invertible. +Define + +```text +T00 = I-A-B+H, T10 = A-H, T01 = B-H, T11 = H. +n0 = sum_j rank(Tj). +``` + +There exist commuting orthogonal projections P,Q on K^n with +P11=A, Q11=B and (PQ)11=H if and only if all four Tj are positive +semidefinite and n >= n0. Here K is R or C and the first d coordinates +carry the usual positive definite inner product. In particular A and B +are positive definite whenever these conditions hold. + +For every such realization form the usual Schur complements + +```text +S = P22-P21 A^-1 P12, Z = Q22-Q21 B^-1 Q12. +``` + +There is an ordered pair (S0,Z0) on dimension n0-d, determined up to +simultaneous unitary equivalence by A,B,H alone, such that + +```text +(S,Z) is unitarily equivalent to +(S0,Z0) plus k00 copies of (0,0), k10 copies of (1,0), + k01 copies of (0,1), k11 copies of (1,1), +kj = rank(Ej) - rank(Tj). +``` + +The Ej are the projections onto the four original joint sectors. Consequently the +commutator [S,Z], its rank, every nonzero singular value, and every +nonzero eigenvalue are independent of all four padding dimensions. +At each n >= n0 there is exactly one possible commutator rank for these +fixed compressed matrices in the orthogonal class. This is a restriction +of the oblique problem, not a competing formula for its rank frontier. + +## Proof + +Let i:K^d -> K^n be the coordinate isometry. For commuting orthogonal +projections the four mutually orthogonal projections are + +```text +E00=(I-P)(I-Q), E10=P(I-Q), E01=(I-P)Q, E11=PQ. +Yj=Ej i, Yj*Yj=Tj. +``` + +This gives positivity and rank(Ej) >= rank(Tj). Their sum gives n >= n0. +For sufficiency use the Hilbert space Vj=range(Tj), and regard Tj^(1/2) +as a map from K^d into Vj. Stack these four maps into i0. Since sum Tj=I, +i0*i0=I. On the direct sum of the Vj define the diagonal projections + +```text +P0=diag(0,I,0,I), Q0=diag(0,0,I,I). +``` + +Their three compressions are A,B,H. Complete i0 to an orthonormal basis +to put it in the first d coordinate positions. This realizes n0. Add +00-sector dimensions to realize every larger n. Square roots and this +basis completion are existence operations over R or C; a rational +orthonormal realization at n0 is not asserted. + +For any realization set Cj=range(Yj) and C=orthogonal direct sum Cj. +Then dim C=n0 and i(K^d) is contained in C, because i=sum Yj. Each +original sector splits orthogonally as Cj plus an inactive subspace Kj. +Both C and its orthogonal complement reduce P and Q. On Kj the ordered +pair is the corresponding scalar pair j. + +If Yj and Yj' come from two realizations with the same Tj, the rule + +```text +Uj(Yj x)=Yj' x +``` + +is well-defined: both squared norms equal x*Tj x, so their kernels +agree. Polarization shows that Uj preserves the inner product. It is +onto Cj' by definition. Their orthogonal direct sum U:C -> C' is unitary, +intertwines both P and Q, and satisfies Ui=i'. This proves uniqueness +of the core as a dilation fixing the observed coordinates pointwise. + +It remains to show that the same decomposition survives Schur deletion. +On the whole ambient space put + +```text +Phat=P-Pi A^-1 i*P, Qhat=Q-Qi B^-1 i*Q. +``` + +Pi A^-1 i*P is the orthogonal projection onto range(Pi): it is +self-adjoint, its square equals itself using i*Pi=A, and it is the +identity on range(Pi). This range lies inside range(P). Thus Phat is +also an orthogonal projection, and it kills i(K^d). The same holds for +Qhat. In the original coordinates they are diag(0,S), diag(0,Z). + +Both correction terms have range in C and vanish on C-perp. Therefore +on C-perp the lifted pair remains the original commuting scalar pair. +On C, U intertwines the correction terms because it intertwines P,Q +and fixes i. Restricting to C intersect i(K^d)-perp gives the unique +pair (S0,Z0). Each Kj already lies in i(K^d)-perp. These orthogonal +subspaces exhaust the residual space and prove the displayed decomposition. +Its commutator is [S0,Z0] plus a zero matrix, proving all consequences. + +## Scalar specialization + +For d=1 write A=a>0, B=b>0, H=h. Feasibility says + +```text +max(0,a+b-1) <= h <= min(a,b). +c = (a-h)(b-h)/(ab). +``` + +The forced Schur-commutator norm is sqrt(c(1-c)). Its rank is two when +0= n0 = rank(T00)+rank(T10)+rank(T01)+rank(T11). +(S,Z) = one fixed core pair plus copies of (0,0), (1,0), (0,1), (1,1), + up to a simultaneous unitary change of residual coordinates. +``` + +In particular the commutator rank and every nonzero commutator singular +value are independent of padding. There is a single feasible rank at +every admitted dimension in this orthogonal class. This closes off +ambient padding as a way to change the rank while retaining these +compressed effects and self-adjointness. [PROOF.md](PROOF.md) gives the +existence construction, core isometry and Schur decomposition. + +The minimum positive-operator dilation and its Gram-isometry argument +are classical. The contribution is the explicit Schur-interface +restriction and its consequences. No literature-wide priority is claimed. + +## Scalar consequence + +For d=1, A=a>0, B=b>0, H=h, set c=(a-h)(b-h)/(ab). The exact +Schur-commutator norm is sqrt(c(1-c)); its rank is two if +0 None: + if not condition: + raise ValueError(message) + + +def matrix(rows) -> Matrix: + out = tuple(tuple(F(x) for x in row) for row in rows) + require(0 < len(out) <= LIMIT, "matrix row capacity") + require(len(out[0]) <= LIMIT, "matrix column capacity") + require(all(len(row) == len(out[0]) for row in out), "ragged matrix") + return out + + +def zero(n: int, m: int) -> Matrix: + return matrix([[0] * m for _ in range(n)]) + + +def eye(n: int) -> Matrix: + return matrix([[int(i == j) for j in range(n)] for i in range(n)]) + + +def tr(a: Matrix) -> Matrix: + require(bool(a[0]), "cannot transpose a zero-column matrix") + return matrix(zip(*a, strict=True)) + + +def add(a: Matrix, b: Matrix, factor=1) -> Matrix: + require(len(a) == len(b) and len(a[0]) == len(b[0]), "sum shape") + return matrix([[x + factor * y for x, y in zip(r, s, strict=True)] + for r, s in zip(a, b, strict=True)]) + + +def mul(a: Matrix, b: Matrix) -> Matrix: + require(len(a[0]) == len(b), "product shape") + return matrix([[sum(x * y for x, y in zip(row, col, strict=True)) + for col in zip(*b, strict=True)] for row in a]) + + +def rref(a: Matrix): + rows = [list(row) for row in a] + pivots = [] + for j in range(len(a[0])): + candidates = [i for i in range(len(pivots), len(a)) if rows[i][j]] + if not candidates: + continue + k = len(pivots) + rows[k], rows[candidates[0]] = rows[candidates[0]], rows[k] + v = rows[k][j] + rows[k] = [x / v for x in rows[k]] + for i in range(len(a)): + if i != k: + v = rows[i][j] + rows[i] = [x - v * y for x, y in zip(rows[i], rows[k], strict=True)] + pivots.append(j) + return matrix(rows), tuple(pivots) + + +def rank(a: Matrix) -> int: + return len(rref(a)[1]) + + +def inv(a: Matrix) -> Matrix: + n = len(a) + require(n == len(a[0]) and 2 * n <= LIMIT, "inverse capacity or shape") + rr, pivots = rref(matrix([row + unit for row, unit in zip(a, eye(n), strict=True)])) + require(pivots[:n] == tuple(range(n)), "singular matrix") + return matrix([row[n:] for row in rr]) + + +def basis(a: Matrix) -> Matrix: + pivots = rref(a)[1] + return matrix([[row[j] for j in pivots] for row in a]) + + +def orthoproject(a: Matrix) -> Matrix: + b = basis(a) + if not b[0]: + return zero(len(a), len(a)) + return mul(mul(b, inv(mul(tr(b), b))), tr(b)) + + +def block(a: Matrix, rows: range, cols: range) -> Matrix: + return matrix([[a[i][j] for j in cols] for i in rows]) + + +def diag(values) -> Matrix: + values = tuple(values) + return matrix([[v if i == j else 0 for j in range(len(values))] + for i, v in enumerate(values)]) + + +def householder(vector) -> Matrix: + v = tuple(F(x) for x in vector) + norm = sum(x * x for x in v) + require(bool(norm), "zero reflection vector") + return matrix([[int(i == j) - 2 * x * y / norm + for j, y in enumerate(v)] for i, x in enumerate(v)]) + + +def schur(p: Matrix, d: int) -> Matrix: + n = len(p) + require(1 <= d < n, "pivot size") + first, tail = range(d), range(d, n) + a = block(p, first, first) + correction = mul(mul(block(p, tail, first), inv(a)), block(p, first, tail)) + return add(block(p, tail, tail), correction, -1) + + +def psd(a: Matrix) -> bool: + if a != tr(a): + return False + rows = [list(row) for row in a] + for k in range(len(a)): + if any(rows[i][i] < 0 for i in range(k, len(a))): + return False + positive = [i for i in range(k, len(a)) if rows[i][i] > 0] + if not positive: + return all(rows[i][j] == 0 for i in range(k, len(a)) + for j in range(k, len(a))) + p = positive[0] + rows[k], rows[p] = rows[p], rows[k] + for row in rows: + row[k], row[p] = row[p], row[k] + pivot = rows[k][k] + for i in range(k + 1, len(a)): + for j in range(k + 1, len(a)): + rows[i][j] -= rows[i][k] * rows[k][j] / pivot + return True diff --git a/research/orthogonal-schur-rigidity/verify.py b/research/orthogonal-schur-rigidity/verify.py new file mode 100644 index 0000000000..25fe796825 --- /dev/null +++ b/research/orthogonal-schur-rigidity/verify.py @@ -0,0 +1,267 @@ +"""Exact finite corroboration of orthogonal Schur dilation rigidity.""" + +import hashlib +import itertools +import json +import sys +from fractions import Fraction as F +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from matrix import ( + add, basis, block, diag, eye, householder, inv, matrix, mul, + orthoproject, psd, rank, require, rref, schur, tr, zero, +) + +SECTORS = ((0, 0), (1, 0), (0, 1), (1, 1)) + + +def sectors(p, q): + ident = eye(len(p)) + pq = mul(p, q) + return (add(add(add(ident, p, -1), q, -1), pq), + add(p, pq, -1), add(q, pq, -1), pq) + + +def premises(p, q, d): + n = len(p) + require(1 <= d < n <= 14, "fixture dimensions") + require(len(p[0]) == n and len(q) == len(q[0]) == n, "square shape") + for a in (p, q): + require(a == tr(a), "self-adjointness") + require(mul(a, a) == a, "idempotence") + require(rank(block(a, range(d), range(d))) == d, "invertible pivot") + require(mul(p, q) == mul(q, p), "commutation") + + +def data(p, q, d): + premises(p, q, d) + es = sectors(p, q) + ys = tuple(block(e, range(len(p)), range(d)) for e in es) + ts = tuple(block(e, range(d), range(d)) for e in es) + cs = tuple(orthoproject(y) for y in ys) + for y, t, c in zip(ys, ts, cs, strict=True): + require(mul(tr(y), y) == t and psd(t), "positive Gram effect") + require(rank(c) == rank(t), "core sector dimension") + return es, ys, ts, cs + + +def concatenate(parts): + return matrix([sum((part[i] for part in parts), ()) + for i in range(len(parts[0]))]) + + +def lifted_schur(p, d): + n = len(p) + first = range(d) + correction = mul(mul(block(p, range(n), first), + inv(block(p, first, first))), block(p, first, range(n))) + return add(p, correction, -1) + + +def verify_decomposition(p, q, d): + es, _, ts, cs = data(p, q, d) + n = len(p) + core = zero(n, n) + for c in cs: + core = add(core, c) + observed = diag([int(i < d) for i in range(n)]) + require(mul(core, observed) == observed, "core contains observed space") + require(mul(core, core) == core, "orthogonal core projection") + require(rank(core) == sum(rank(t) for t in ts), "minimum core dimension") + w = basis(add(core, observed, -1)) + ks = tuple(basis(add(e, c, -1)) for e, c in zip(es, cs, strict=True)) + change = block(concatenate((w,) + ks), range(d, n), range(n - d)) + change_inv = inv(change) + core_size = len(w[0]) + iota = block(eye(n), range(n), range(d)) + core_basis = concatenate((iota, w)) + left = mul(inv(mul(tr(core_basis), core_basis)), tr(core_basis)) + for index, original in enumerate((p, q)): + require(mul(original, core) == mul(core, original), "reducing core") + residual = schur(original, d) + lift = lifted_schur(original, d) + require(lift == tr(lift) and mul(lift, lift) == lift, "Schur projection") + expected = [list(row) for row in zero(n - d, n - d)] + if core_size: + small = schur(mul(mul(left, original), core_basis), d) + for r in range(core_size): + for c in range(core_size): + expected[r][c] = small[r][c] + offset = core_size + for label, k in zip(SECTORS, ks, strict=True): + for r in range(len(k[0])): + expected[offset + r][offset + r] = label[index] + offset += len(k[0]) + require(offset == n - d, "complete residual decomposition") + require(mul(mul(change_inv, residual), change) == matrix(expected), + "literal ordered residual decomposition") + comm = add(mul(schur(p, d), schur(q, d)), mul(schur(q, d), schur(p, d)), -1) + require(rank(comm) % 2 == 0, "orthogonal commutator even rank") + return ts, rank(comm) + + +def generated_pair(profile, seed): + n = sum(profile) + v = [i + 1 for i in range(n)] + rotation = householder(v) + if seed: + w = [((3 * i + seed) % 7) - 3 for i in range(n)] + rotation = mul(rotation, householder(w)) + labels = tuple(label for label, count in zip(SECTORS, profile, strict=True) + for _ in range(count)) + return tuple(mul(mul(tr(rotation), diag([label[j] for label in labels])), rotation) + for j in range(2)) + + +def padded_pair(p, q, d, label): + n = len(p) + tail = householder([i + 1 for i in range(n + 1 - d)]) + rotation = [list(row) for row in eye(n + 1)] + for i in range(n + 1 - d): + for j in range(n + 1 - d): + rotation[d + i][d + j] = tail[i][j] + rotation = matrix(rotation) + result = [] + for index, a in enumerate((p, q)): + extended = matrix([list(row) + [0] for row in a] + [[0] * n + [label[index]]]) + result.append(mul(mul(tr(rotation), extended), rotation)) + return tuple(result) + + +def verify_core_isometry(p, q, p2, q2, d): + _, ys, ts, cs = data(p, q, d) + _, zs, us, ds = data(p2, q2, d) + require(ts == us, "same prescribed effects") + mapping = zero(len(p2), len(p)) + core, core2 = zero(len(p), len(p)), zero(len(p2), len(p2)) + for y, z, c, e in zip(ys, zs, cs, ds, strict=True): + pivots = rref(y)[1] + if pivots: + b = matrix([[row[j] for j in pivots] for row in y]) + b2 = matrix([[row[j] for j in pivots] for row in z]) + local = mul(mul(b2, inv(mul(tr(b), b))), tr(b)) + require(mul(local, y) == z, "Gram isometry maps all observed columns") + mapping = add(mapping, local) + core, core2 = add(core, c), add(core2, e) + require(mul(tr(mapping), mapping) == core, "initial core isometry") + require(mul(mapping, tr(mapping)) == core2, "final core isometry") + iota = block(eye(len(p)), range(len(p)), range(d)) + iota2 = block(eye(len(p2)), range(len(p2)), range(d)) + require(mul(mapping, iota) == iota2, "isometry fixes retained coordinates") + for a, b in ((p, p2), (q, q2)): + require(mul(mapping, a) == mul(b, mapping), "original pair intertwining") + require(mul(mapping, lifted_schur(a, d)) == mul(lifted_schur(b, d), mapping), + "Schur pair intertwining") + + +def scalar_check(p, q, ts): + a = ts[1][0][0] + ts[3][0][0] + b = ts[2][0][0] + ts[3][0][0] + h = ts[3][0][0] + c = (a - h) * (b - h) / (a * b) + s, z = schur(p, 1), schur(q, 1) + k = add(mul(s, z), mul(z, s), -1) + norm_squared = -sum(mul(k, k)[i][i] for i in range(len(k))) / 2 + require(norm_squared == c * (1 - c), "scalar norm formula") + require(rank(k) == (2 if 0 < h < min(a, b) else 0), "scalar rank formula") + return norm_squared + + +def fixtures(): + for n in range(2, 5): + for profile in itertools.product(range(n + 1), repeat=4): + if sum(profile) == n: + for seed in range(2): + for d in range(1, min(2, n - 1) + 1): + yield profile, seed, d + for n in (5, 6, 7): + for profile in ((0, 2, 2, n - 4), (1, 1, 2, n - 4), (n - 3, 1, 1, 1)): + for d in (1, 2, 3): + yield profile, 2, d + + +def rejection_controls(p, q): + rejected = 0 + for mode in range(6): + a, b, d = p, q, 1 + if mode == 0: + a = add(a, eye(len(a))) + elif mode == 1: + rows = [list(row) for row in a] + rows[0][1] += 1 + a = matrix(rows) + elif mode == 2: + b = diag([1] + [0] * (len(a) - 1)) + elif mode == 3: + a = zero(len(a), len(a)) + elif mode == 4: + d = 0 + else: + d = len(a) + try: + premises(a, b, d) + except ValueError: + rejected += 1 + require(rejected == 6, "hypothesis controls") + require(not psd(matrix([[0, 1], [1, 0]])), "indefinite zero-diagonal control") + require(not psd(matrix([[-1, 0], [0, 1]])), "negative-effect control") + return rejected + 2 + + +def run(): + counts = dict(candidates=0, admitted=0, singular_pivots=0, scalar=0, padded=0) + histogram = {} + padding_seeds = [] + by_size = {1: 0, 2: 0, 3: 0} + for profile, seed, d in fixtures(): + counts['candidates'] += 1 + p, q = generated_pair(profile, seed) + if any(rank(block(a, range(d), range(d))) < d for a in (p, q)): + counts['singular_pivots'] += 1 + continue + ts, r = verify_decomposition(p, q, d) + counts['admitted'] += 1 + histogram[str(r)] = histogram.get(str(r), 0) + 1 + if d == 1: + scalar_check(p, q, ts) + counts['scalar'] += 1 + if by_size[d] < 3 and r: + padding_seeds.append((p, q, d)) + by_size[d] += 1 + for p, q, d in padding_seeds: + for label in SECTORS: + p2, q2 = padded_pair(p, q, d, label) + verify_decomposition(p2, q2, d) + verify_core_isometry(p, q, p2, q2, d) + counts['padded'] += 1 + v = [F(1, 3)] * 3 + [F(1, 2)] * 2 + [F(1, 3), F(1, 6), F(1, 6)] + rotation = householder([int(i == 0) - x for i, x in enumerate(v)]) + labels = [(1, 0)] * 3 + [(0, 1)] * 2 + [(1, 1)] * 3 + p, q = tuple(mul(mul(tr(rotation), diag([x[j] for x in labels])), rotation) + for j in range(2)) + ts, r = verify_decomposition(p, q, 1) + require(tuple(t[0][0] for t in ts) == (0, F(1, 3), F(1, 2), F(1, 6)), + "half-norm fixture effects") + require(r == 2 and scalar_check(p, q, ts) == F(1, 4), "attained half norm") + counts['controls'] = rejection_controls(p, q) + counts['rank_histogram'] = histogram + counts['padding_seed_pivot_sizes'] = by_size + counts['half_norm_fixture_core_dimension'] = sum(rank(t) for t in ts) + require(tuple(counts[k] for k in ('candidates', 'admitted', 'singular_pivots', + 'scalar', 'padded')) == (267, 137, 130, 93, 32), + "fixture coverage") + require(histogram == {'0': 110, '2': 25, '4': 2}, "rank coverage") + return counts + + +if __name__ == '__main__': + result = run() + root = Path(__file__).resolve().parent + names = ('README.md', 'PROOF.md', 'matrix.py', 'verify.py', + 'TASK.json', 'SOURCES.json', 'VERIFY.json') + result['source_sha256'] = { + name: hashlib.sha256((root / name).read_bytes()).hexdigest() for name in names + } + result['status'] = 'PASS_ORTHOGONAL_SCHUR_RIGIDITY' + print(json.dumps(result, sort_keys=True))