Discovery.Linear­Disentanglement.Simultaneous­Congruence

Two results on recovering a unit-diagonal matrix B that makes B·Aₑ·Bᵀ diagonal for every environment e.

Definitions 14 core · 0 supporting This module defines the paper-independent objects used to deform a simultaneous congruence representation along an affine-collinear pair of diagonal shifts.

Two-coordinate deformations for collinear congruence families

This module defines the paper-independent objects used to deform a simultaneous congruence representation along an affine-collinear pair of diagonal shifts. The deformation first mixes the two selected rows and then rescales them so that a unit-diagonal normalization is retained.

structure AffineLineCertificate reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

A concrete certificate that the selected two-coordinate shift cloud is contained in the affine line u x + v y = c, with a nonzero normal vector.

Definition (Lean source)
d :
ℕ
E :
Type*
s :
E → Fin d → ℝ
i j :
Fin d
First component of the line's normal vector.
u :
ℝ
Second component of the line's normal vector.
v :
ℝ
Affine offset of the line.
c :
ℝ
The normal vector is nonzero.
normal_ne :
u ≠ 0 ∨ v ≠ 0
Every selected shift pair lies on the certified affine line.
equation :
∀ e, u * s e i + v * s e j = c
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.AffineLineCertificate · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:31
def pairShear reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The elementary two-row shear traces the observationally ambiguous direction associated with selected coordinates i,j, line normal u,v and deformation t in dimension d. It perturbs only the selected pair, or their common diagonal if they coincide.

Definition (Lean source)
d :
ℕ
i j :
Fin d
u v t :
ℝ
pairShear i j u v t :
1 + Matrix.single i j (t * v) + Matrix.single j i (t * u)
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairShear · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:46 · uses SqMatrix
def firstNormalizationDenom reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The first normalization denominator is the row-scale correction that keeps the first selected diagonal entry fixed after shearing reference matrix B at coordinates i,j, with coefficient v and magnitude t in dimension d.

Definition (Lean source)
d :
ℕ
B :
i j :
Fin d
v t :
ℝ
firstNormalizationDenom B i j v t :
ℝ
1 + t * v * B j i
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.firstNormalizationDenom · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:53 · uses SqMatrix
def secondNormalizationDenom reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The second normalization denominator is the row-scale correction that keeps the second selected diagonal entry fixed after shearing reference matrix B at coordinates i,j, with coefficient u and magnitude t in dimension d.

Definition (Lean source)
d :
ℕ
B :
i j :
Fin d
u t :
ℝ
secondNormalizationDenom B i j u t :
ℝ
1 + t * u * B i j
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.secondNormalizationDenom · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:60 · uses SqMatrix
def pairRowNormalizer reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pair row normalizer compensates row scaling after deforming selected coordinates i,j of reference matrix B, using line normal u,v and magnitude t in dimension d. It rescales only the selected rows; zero denominators use the library's zero reciprocal convention.

Definition (Lean source)
d :
ℕ
B :
i j :
Fin d
u v t :
ℝ
pairRowNormalizer B i j u v t :
diagonal fun k ↦ if k
= i then (firstNormalizationDenom B i j v t)⁻¹ else if k = j then (secondNormalizationDenom B i j u t)⁻¹ else 1
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairRowNormalizer · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:67 · uses SqMatrix
def normalizedPairDeformation reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The normalized two-coordinate deformation combines a shear with row rescaling, moving along the ambiguity generated by coordinates i,j and line normal u,v at magnitude t for reference matrix B in dimension d.

Definition (Lean source)
d :
ℕ
B :
i j :
Fin d
u v t :
ℝ
normalizedPairDeformation B i j u v t :
pairRowNormalizer B i j u v t * pairShear i j u v t
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.normalizedPairDeformation · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:78 · uses SqMatrix
def deformedDiagonalizer reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The deformed diagonalizer applies the normalized ambiguity direction to reference diagonalizer B, mixing coordinates i,j according to line normal u,v and magnitude t in dimension d.

Definition (Lean source)
d :
ℕ
B :
i j :
Fin d
u v t :
ℝ
deformedDiagonalizer B i j u v t :
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.deformedDiagonalizer · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:85 · uses SqMatrix
def PairCycleAdmissible reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Pair-cycle admissibility rules out the singular two-coordinate feedback cycle in matrix B: the opposite entries at coordinates i,j must not multiply to one in dimension d.

Definition (Lean source)
d :
ℕ
B :
i j :
Fin d
PairCycleAdmissible B i j :
Prop
B i j * B j i ≠ 1
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.PairCycleAdmissible · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:92 · uses SqMatrix
def commonShiftCrossTerm reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The common shift cross term is the off-diagonal contribution shared by all environments after deforming reference matrix B at coordinates i,j, determined by line normal, offset, and magnitude u,v,c,t in dimension d.

Definition (Lean source)
d :
ℕ
B :
i j :
Fin d
u v c t :
ℝ
commonShiftCrossTerm B i j u v c t :
ℝ
(firstNormalizationDenom B i j v t)⁻¹ * (secondNormalizationDenom B i j u t)⁻¹ * (t * c)
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.commonShiftCrossTerm · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:98 · uses SqMatrix
def pairSymmetricOffDiagonal reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The symmetric selected-pair matrix places value x in both orientations of coordinates i,j in dimension d, isolating the common cross term created by a pair deformation.

Definition (Lean source)
d :
ℕ
i j :
Fin d
x :
ℝ
pairSymmetricOffDiagonal i j x :
Matrix.single i j x + Matrix.single j i x
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairSymmetricOffDiagonal · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:106 · uses SqMatrix
def deformedInvariant reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The deformed invariant matrix absorbs the environment-independent cross term so the represented covariance family can remain unchanged. From reference diagonalizer and invariant matrix, selected coordinates, and line data and magnitude in dimension d, it first forms the normalized pair deformation, then transforms the invariant and adds the common symmetric term.

Definition (Lean source)
d :
ℕ
B Ω :
i j :
Fin d
u v c t :
ℝ
deformedInvariant B Ω i j u v c t :
T :
T * Ω * T.transpose + pairSymmetricOffDiagonal i j (commonShiftCrossTerm B i j u v c t)
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.deformedInvariant · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:112 · uses SqMatrix
def deformedShift reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The deformed shift records the new environment-specific diagonal after transforming original shift s through reference diagonalizer B at coordinates i,j, with line normal u,v and magnitude t in dimension d; it first forms the normalized pair deformation.

Definition (Lean source)
d :
ℕ
B :
i j :
Fin d
u v t :
ℝ
s :
Fin d → ℝ
deformedShift B i j u v t s :
Fin d → ℝ
fun k ↦ let T := normalizedPairDeformation B i j u v t (T * diagonal s * T.transpose) k k
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.deformedShift · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:123 · uses SqMatrix
def representedCovariance reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The represented covariance matrix maps an invariant and diagonalizer plus an environment-specific diagonal shift back to observed coordinates in dimension d. An invertible diagonalizer is required for the intended interpretation; the library's singular inverse convention returns zero otherwise.

Definition (Lean source)
d :
ℕ
B Ω :
s :
Fin d → ℝ
representedCovariance B Ω s :
B⁻¹ * (Ω + diagonal s) * (B⁻¹).transpose
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.representedCovariance · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:133 · uses SqMatrix
def RepresentsCovarianceFamily reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

A covariance family is represented when every environment in E shares diagonalizer B and invariant component Ω while varying only through shift family s, reproducing covariances Sigma in dimension d. Invertibility is deliberately separate; a singular diagonalizer represents only the zero family.

Definition (Lean source)
d :
ℕ
E :
Type*
Sigma :
E → SqMatrix d
B Ω :
s :
E → Fin d → ℝ
e :
RepresentsCovarianceFamily Sigma B Ω s :
Prop
Sigma e = representedCovariance B Ω (s e)
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.RepresentsCovarianceFamily · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/Definitions.lean:140 · uses SqMatrix
Definitions­Pairwise­Affine 17 core · 7 supporting This module defines pair-dependent affine-minor separation, off-diagonal approximate simultaneous congruence, the entrywise Euclidean matrix norm used for aggregation, and the explicit constants and scale envelopes used ★ opNorm_le_conditionRoot

Pairwise-affine simultaneous-congruence stability: definitions

This module defines pair-dependent affine-minor separation, off-diagonal approximate simultaneous congruence, the entrywise Euclidean matrix norm used for aggregation, and the explicit constants and scale envelopes used by the local stability theorem.

Unlike AffineMinorSeparated, the separation predicate here does not select one common base and a full-dimensional minor. Its three witnessing environments may depend on the coordinate pair.

def pairAffineDet reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pairwise affine determinant measures whether three environmental shifts span area in coordinates i,j, using shift family s and environments e₀,e₁,e₂ from collection E in dimension p.

Definition (Lean source)
p :
ℕ
E :
Type*
s :
E → Fin p → ℝ
i j :
Fin p
e₀ e₁ e₂ :
E
pairAffineDet s i j e₀ e₁ e₂ :
ℝ
(s e₁ i - s e₀ i) * (s e₂ j - s e₀ j) - (s e₂ i - s e₀ i) * (s e₁ j - s e₀ j)
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairAffineDet · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:35
def PairwiseAffineSeparated reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Pairwise affine separation ensures every coordinate pair receives enough independent environmental movement to be distinguished: shift family s over finite environments E has a three-environment area of at least margin δ for every pair in dimension p.

Definition (Lean source)
p :
ℕ
E :
Type*
s :
E → Fin p → ℝ
δ :
ℝ
i j :
i ≠ j
PairwiseAffineSeparated s δ :
Prop
∃ e₀ e₁ e₂ : E, δ ≤ |pairAffineDet s i j e₀ e₁ e₂|
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.PairwiseAffineSeparated · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:43
def OffDiagonalApproximateCongruence reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Off-diagonal approximate congruence accepts candidate coordinates B when all cross-coordinate terms of observed matrices A stay below tolerance ε, over finite environments E in dimension p.

Definition (Lean source)
p :
ℕ
E :
Type*
A :
E → SqMatrix p
B :
ε :
ℝ
e i j :
i ≠ j
OffDiagonalApproximateCongruence A B ε :
Prop
|(B * A e * B.transpose) i j| ≤ ε
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.OffDiagonalApproximateCongruence · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:51 · uses SqMatrix
def transitionError reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The transition error directly measures departure from exact recovery by comparing candidate coordinates with reference coordinates in dimension p.

Definition (Lean source)
p :
ℕ
B₀ B :
transitionError B₀ B :
transition B₀ B - 1
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.transitionError · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:60 · uses SqMatrix
def entryL2 reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The entrywise Euclidean size aggregates all coordinate errors of matrix R in dimension p, using its Frobenius norm.

Definition (Lean source)
p :
ℕ
R :
entryL2 R :
ℝ
@norm (SqMatrix p) Matrix.frobeniusNormedAddCommGroup.toNorm R
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.entryL2 · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:65 · uses SqMatrix
def pairwiseSolveFactor reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pairwise solve factor converts off-diagonal residuals into coordinate-pair error; it grows with shift scale M and shrinks with separation margin δ.

Definition (Lean source)
M δ :
ℝ
pairwiseSolveFactor M δ :
ℝ
6 * M / δ
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairwiseSolveFactor · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:92
def pairwiseAggregateFactor reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pairwise aggregate factor combines all ordered coordinate-pair errors under dimension p, shift scale M, separation margin δ, and matrix scale L.

Definition (Lean source)
p :
ℕ
M δ L :
ℝ
pairwiseAggregateFactor p M δ L :
ℝ
pairwiseSolveFactor M δ * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + L ^ 2))
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairwiseAggregateFactor · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:100
def pairwiseStabilityConstant reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pairwise stability constant turns residual size into diagonalizer error under dimension p, shift scale M, separation margin δ, and matrix scale L.

Definition (Lean source)
p :
ℕ
M δ L :
ℝ
pairwiseStabilityConstant p M δ L :
ℝ
16 * pairwiseAggregateFactor p M δ L * L ^ 3
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairwiseStabilityConstant · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:107
def pairwiseResidualRadius reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pairwise residual radius sets the noise threshold used to enter the identity branch, determined by dimension p, shift scale M, separation margin δ, and matrix scale L.

Definition (Lean source)
p :
ℕ
M δ L :
ℝ
pairwiseResidualRadius p M δ L :
ℝ
1 / (32 * (max 1 (pairwiseAggregateFactor p M δ L)) ^ 2 * M)
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairwiseResidualRadius · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:113
def pairwiseLocalRadius reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pairwise local radius sets the reference-neighborhood size used to force a candidate onto the identity branch, determined by dimension p, shift scale M, separation margin δ, matrix scale L, and inverse-norm envelope J.

Definition (Lean source)
p :
ℕ
M δ L J :
ℝ
pairwiseLocalRadius p M δ L J :
ℝ
min 1 (3 / (8 * max 1 (pairwiseAggregateFactor p M δ L) * M)) / ((p : ℝ) * J)
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pairwiseLocalRadius · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:122
def conditionRoot reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The condition root is the scale used to convert determinant and condition information operator-norm bound in dimension p under condition envelope κ. At dimension zero the exponent conventions make the value one.

Definition (Lean source)
p :
ℕ
κ :
ℝ
conditionRoot p κ :
ℝ
((Nat.factorial p : ℝ) * κ ^ (p - 1)) ^ (1 / (p : ℝ))
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.conditionRoot · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:132
abbrev PairMatrixNormBound reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pair matrix-norm bound keeps reference and candidate matrices within scale L in dimension p; it is the canonical pair matrix-scale condition under a compatibility name.

Definition (Lean source)
p :
ℕ
L :
ℝ
B₀ B :
PairMatrixNormBound L B₀ B :
Prop
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.PairMatrixNormBound · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:138 · uses SqMatrix
def InReferenceNeighborhood reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Membership in the reference neighborhood requires candidate and reference matrices to differ by at most entrywise radius ρ in dimension p.

Definition (Lean source)
p :
ℕ
ρ :
ℝ
B₀ B :
InReferenceNeighborhood ρ B₀ B :
Prop
entryL2 (B - B₀) ≤ ρ
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.InReferenceNeighborhood · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:144 · uses SqMatrix
def DetConditionEnvelope reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The determinant-condition envelope rules out unstable matrices B in dimension p by requiring (1) nonsingularity, (2) a factorial determinant cap, and (3) condition number at most envelope κ for that envelope.

Definition (Lean source)
p :
ℕ
κ :
ℝ
B :
DetConditionEnvelope κ B :
Prop
clause 1
IsUnit B.det
clause 2
|B.det| ≤ (Nat.factorial p : ℝ)
clause 3
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.DetConditionEnvelope · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:150 · uses SqMatrix
def PairDetConditionEnvelope reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The pair determinant-condition envelope places reference and candidate matrices in the same stable class in dimension p: (1) the reference meets the envelope and (2) the candidate meets it, for condition limit κ.

Definition (Lean source)
p :
ℕ
κ :
ℝ
B₀ B :
PairDetConditionEnvelope κ B₀ B :
Prop
clause 1
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.PairDetConditionEnvelope · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:158 · uses SqMatrix
def InIdentityBranch reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Membership in the identity branch rules out large relabeling or sign ambiguities for reference and candidate matrices in dimension p, under shift scale, separation, and matrix scale: (1) transition error is at most one, and (2) its amplified pairwise error is at most one half.

Definition (Lean source)
p :
ℕ
M δ L :
ℝ
B₀ B :
InIdentityBranch M δ L B₀ B :
Prop
clause 1
entryL2 (transitionError B₀ B) ≤ 1
clause 2
2 * pairwiseAggregateFactor p M δ L * M * entryL2 (transitionError B₀ B) ≤ 1 / 2
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.InIdentityBranch · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:165 · uses SqMatrix
theorem opNorm_le_conditionRoot reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The determinant-condition root bounds the matrix operator norm, turning matrix B's determinant-condition certificate into a scale bound in dimension p for condition envelope κ, when the dimension is positive.

Formal statement
p :
ℕ
κ :
ℝ
B :
hp :
0 < p
henv :
‖B‖ ≤ conditionRoot p κ
Proof (Lean source)
-- Proof route: order the singular values; -- `cond(B) ≤ κ` bounds every lower singular value below by `‖B‖/κ`, while their -- product is `|det B| ≤ p!`. Take the positive `p`-th root. theorem opNorm_le_conditionRoot {p : ℕ} {κ : ℝ} (B : SqMatrix p) (hp : 0 < p) (henv : DetConditionEnvelope κ B) : ‖B‖ ≤ conditionRoot p κ := by have hcond_nonneg : 0 ≤ operatorConditionNumber B := mul_nonneg (norm_nonneg B) (norm_nonneg B⁻¹) have hpow : ‖B‖ ^ p ≤ (Nat.factorial p : ℝ) * κ ^ (p - 1) := by calc ‖B‖ ^ p ≤ |B.det| * operatorConditionNumber B ^ (p - 1) := opNorm_pow_le_det_mul_condition_pow hp B henv.1 _ ≤ (Nat.factorial p : ℝ) * κ ^ (p - 1) := by exact mul_le_mul henv.2.1 (pow_le_pow_left₀ hcond_nonneg henv.2.2 _) (pow_nonneg hcond_nonneg _) (by positivity) unfold conditionRoot have hrpow := Real.rpow_le_rpow (pow_nonneg (norm_nonneg B) _) hpow (show 0 ≤ 1 / (p : ℝ) by positivity) calc ‖B‖ = (‖B‖ ^ p) ^ (1 / (p : ℝ)) := by rw [← Real.rpow_natCast] rw [← Real.rpow_mul (norm_nonneg B)] have hpR : (p : ℝ) ≠ 0 := by positivity rw [mul_div_cancel₀ 1 hpR, Real.rpow_one] _ ≤ ((Nat.factorial p : ℝ) * κ ^ (p - 1)) ^ (1 / (p : ℝ)) := hrpow
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.opNorm_le_conditionRoot · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/DefinitionsPairwiseAffine.lean:328 · uses SqMatrix , DetConditionEnvelope , conditionRoot
7 supporting declarations (lemmas, instances)
Algebra 1 core · 19 supporting This module records the entry formulas, invertibility and normalization facts, cycle product identity, shift nonnegativity, and exact congruence decomposition for the two-coordinate construction. ★ representedCovariance_deformation_eq

Algebra of the normalized two-coordinate deformation

This module records the entry formulas, invertibility and normalization facts, cycle product identity, shift nonnegativity, and exact congruence decomposition for the two-coordinate construction.

theorem representedCovariance_deformation_eq reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The explicit pair deformation leaves every represented covariance unchanged, proving observational equivalence for diagonalizer B, invariant Ω, shifts s, certificate cert, parameter t, and environment e over environment type E in dimension d, when coordinates i,j are distinct and the normalized deformation is invertible.

Formal statement
d :
ℕ
E :
Type*
B Ω :
i j :
Fin d
hij :
i ≠ j
s :
E → Fin d → ℝ
cert :
t :
ℝ
e :
E
hT :
IsUnit (normalizedPairDeformation B i j cert.u cert.v t).det
representedCovariance (deformedDiagonalizer B i j cert.u cert.v t) (deformedInvariant B Ω i j cert.u cert.v cert.c t) (deformedShift B i j cert.u cert.v t (s e))
Proof (Lean source)
theorem representedCovariance_deformation_eq {d : ℕ} {E : Type*} (B Ω : SqMatrix d) {i j : Fin d} (hij : i ≠ j) (s : E → Fin d → ℝ) (cert : AffineLineCertificate s i j) (t : ℝ) (e : E) (hT : IsUnit (normalizedPairDeformation B i j cert.u cert.v t).det) : representedCovariance (deformedDiagonalizer B i j cert.u cert.v t) (deformedInvariant B Ω i j cert.u cert.v cert.c t) (deformedShift B i j cert.u cert.v t (s e)) = representedCovariance B Ω (s e) := by let T := normalizedPairDeformation B i j cert.u cert.v t have hTtr : IsUnit T.transpose.det := Matrix.isUnit_det_transpose T hT unfold representedCovariance deformedDiagonalizer change (T * B)⁻¹ * (deformedInvariant B Ω i j cert.u cert.v cert.c t + diagonal (deformedShift B i j cert.u cert.v t (s e))) * ((T * B)⁻¹).transpose = _ rw [← total_congruence_decomposition B Ω hij s cert t e] rw [Matrix.mul_inv_rev, Matrix.transpose_mul, Matrix.transpose_nonsing_inv] calc (B⁻¹ * T⁻¹) * (T * (Ω + diagonal (s e)) * T.transpose) * ((T.transpose)⁻¹ * (B⁻¹).transpose) = B⁻¹ * (T⁻¹ * T) * (Ω + diagonal (s e)) * (T.transpose * (T.transpose)⁻¹) * (B⁻¹).transpose := by noncomm_ring _ = B⁻¹ * (Ω + diagonal (s e)) * (B⁻¹).transpose := by rw [Matrix.nonsing_inv_mul T hT, Matrix.mul_nonsing_inv T.transpose hTtr] simp
19 supporting declarations (lemmas, instances)
Local­Branch 1 core · 5 supporting This module converts an ordinary entrywise-L² neighborhood of the reference into control of the transition error. ★ inIdentityBranch_of_small_residual

Local branch selection for pairwise-affine congruence stability

This module converts an ordinary entrywise-L² neighborhood of the reference into control of the transition error. It then combines that control with an explicit small-residual threshold and the pairwise quadratic estimate to select the identity branch. Thus the stability API does not ask callers to assume the desired transition-error bound directly.

theorem inIdentityBranch_of_small_residual reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Small-residual local identity-branch selection. For positive dimension, shift scale, affine margin, matrix scale, and inverse envelope, bounded pairwise-separated shifts, an exact invertible unit-diagonal reference, a unit-diagonal candidate, a reference operator norm at most the matrix scale, an inverse bound, nonnegative approximate residual, the explicit residual smallness condition, and membership in the explicit ordinary reference neighborhood, the transition lies on the identity branch needed by the linear stability estimate.

Formal statement
p :
ℕ
E :
Type*
Nonempty E
A :
E → SqMatrix p
s :
E → Fin p → ℝ
B₀ B :
M δ L J ε :
ℝ
hp :
0 < p
hM :
0 < M
hδ :
0 < δ
hL :
1 ≤ L
hJ :
0 < J
hscale :
hunit :
IsUnit B₀.det
hexact :
hdiag₀ :
hdiag :
hB₀ :
‖B₀‖ ≤ L
hinv :
‖B₀⁻¹‖ ≤ J
hε :
0 ≤ ε
hsmall :
ε ≤ pairwiseResidualRadius p M δ L
hlocal :
InIdentityBranch M δ L B₀ B
Proof (Lean source)
-- Proof route: the neighborhood and inverse envelope give `u ≤ min 1 (3/(8 max(1,K)M))` -- for `u = entryL2 R`. Pairwise control gives `u ≤ 2 K M u² + 2 K ε`; the coarse -- local bound absorbs three quarters of `u`, and the residual radius improves this to -- `2 K M u ≤ 1/2`. This derives, rather than assumes, `InIdentityBranch`. theorem inIdentityBranch_of_small_residual {p : ℕ} {E : Type*} [Fintype E] [Nonempty E] (A : E → SqMatrix p) (s : E → Fin p → ℝ) (B₀ B : SqMatrix p) {M δ L J ε : ℝ} (hp : 0 < p) (hM : 0 < M) (hδ : 0 < δ) (hL : 1 ≤ L) (hJ : 0 < J) (hscale : ShiftScaleBound s M) (hsep : PairwiseAffineSeparated s δ) (hunit : IsUnit B₀.det) (hexact : ExactCongruence A s B₀) (hdiag₀ : UnitDiagonal B₀) (hdiag : UnitDiagonal B) (hB₀ : ‖B₀‖ ≤ L) (hinv : ‖B₀⁻¹‖ ≤ J) (hε : 0 ≤ ε) (hsmall : ε ≤ pairwiseResidualRadius p M δ L) (happrox : OffDiagonalApproximateCongruence A B ε) (hlocal : InReferenceNeighborhood (pairwiseLocalRadius p M δ L J) B₀ B) : InIdentityBranch M δ L B₀ B := by let R := transitionError B₀ B let u := entryL2 R let K := pairwiseAggregateFactor p M δ L have hpR : (0 : ℝ) < p := by exact_mod_cast hp have hL0 : 0 ≤ L := le_trans (by norm_num) hL have hK0 : 0 ≤ K := by dsimp [K, pairwiseAggregateFactor, pairwiseSolveFactor] positivity have hmax : 0 < max 1 K := lt_of_lt_of_le (by norm_num) (le_max_left _ _) have hKmax : K ≤ max 1 K := le_max_right _ _ have hu0 : 0 ≤ u := by exact entryL2_nonneg R have huLocal : u ≤ min 1 (3 / (8 * max 1 K * M)) := by have h := transitionError_entryL2_le_of_neighborhood B₀ B hp hunit hinv hlocal change u ≤ (p : ℝ) * J * pairwiseLocalRadius p M δ L J at h calc u ≤ (p : ℝ) * J * pairwiseLocalRadius p M δ L J := h _ = min 1 (3 / (8 * max 1 K * M)) := by dsimp [pairwiseLocalRadius, K] field_simp have hu1 : u ≤ 1 := huLocal.trans (min_le_left _ _) have huCoarse : u ≤ 3 / (8 * max 1 K * M) := huLocal.trans (min_le_right _ _) have hc0 : 0 ≤ pairwiseSolveFactor M δ * (2 * M * u ^ 2 + 2 * ε) := by unfold pairwiseSolveFactor positivity have hoff : ∀ i j, i ≠ j → |R i j| ≤ pairwiseSolveFactor M δ * (2 * M * u ^ 2 + 2 * ε) := by simpa [R, u] using pairwise_offDiagonal_control A s B₀ B hM.le hδ hε hscale hsep hunit hexact happrox have huAgg := entryL2_transitionError_le B₀ B hp hL0 hc0 hunit hdiag₀ hdiag hB₀ hoff have huK : u ≤ K * (2 * M * u ^ 2 + 2 * ε) := by change u ≤ pairwiseSolveFactor M δ * (2 * M * u ^ 2 + 2 * ε) * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + L ^ 2)) at huAgg calc u ≤ pairwiseSolveFactor M δ * (2 * M * u ^ 2 + 2 * ε) * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + L ^ 2)) := huAgg _ = K * (2 * M * u ^ 2 + 2 * ε) := by dsimp [K, pairwiseAggregateFactor] ring have hcoefficient : 2 * K * M * u ≤ 3 / 4 := by calc 2 * K * M * u ≤ 2 * (max 1 K) * M * u := by gcongr _ ≤ 2 * (max 1 K) * M * (3 / (8 * max 1 K * M)) := by gcongr _ = 3 / 4 := by field_simp; ring have huLinear : u ≤ 8 * K * ε := by have hquad : 2 * K * M * u ^ 2 ≤ (3 / 4) * u := by nlinarith [mul_nonneg hu0 (sub_nonneg.mpr hcoefficient)] nlinarith have hsmall' : ε ≤ 1 / (32 * (max 1 K) ^ 2 * M) := by simpa [pairwiseResidualRadius, K] using hsmall have hbranch : 2 * K * M * u ≤ 1 / 2 := by calc 2 * K * M * u ≤ 2 * K * M * (8 * K * ε) := by gcongr _ = 16 * K ^ 2 * M * ε := by ring _ ≤ 16 * (max 1 K) ^ 2 * M * ε := by gcongr _ ≤ 16 * (max 1 K) ^ 2 * M * (1 / (32 * (max 1 K) ^ 2 * M)) := by gcongr _ = 1 / 2 := by field_simp; ring exact ⟨by simpa [u, R] using hu1, by simpa [u, R, K] using hbranch⟩
5 supporting declarations (lemmas, instances)
Main 1 core · 1 supporting This module gives a paper-independent non-identifiability witness for a family (over any index set) of positive-definite covariance matrices. ★ exists_collinear_simultaneous_congruence_ambiguity

Constructive ambiguity from an affine-collinear shift pair

This module gives a paper-independent non-identifiability witness for a family (over any index set) of positive-definite covariance matrices. If two selected coordinates of all diagonal shifts lie on one affine line, an arbitrarily small nonzero normalized two-row deformation produces a distinct invertible diagonalizer and a second exact positive-definite/nonnegative representation of the same family.

theorem exists_collinear_simultaneous_congruence_ambiguity reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Affine collinearity of two shift coordinates creates an arbitrarily small continuum of observationally equivalent, admissible representations. For dimension d, environment type E, reference diagonalizer B₀, invariant Ω₀, shifts s, and selected coordinates i,j, this uses distinct coordinates, unit diagonal and invertibility, pair-cycle admissibility, positive-definite invariant, nonnegative shifts, an affine-line certificate, and positive radius r.

Formal statement
d :
ℕ
E :
Type*
B₀ Ω₀ :
s :
E → Fin d → ℝ
i j :
Fin d
hij :
i ≠ j
hdiag :
hunit :
IsUnit B₀.det
hcycle :
hΩ :
Ω₀.PosDef
hs :
∀ e k, 0 ≤ s e k
cert :
r :
ℝ
hr :
0 < r
∃ (t : ℝ) (B₁ Ω₁ : SqMatrix d) (s₁ : E → Fin d → ℝ),
0 < |t|
|t| < r
B₁ = deformedDiagonalizer B₀ i j cert.u cert.v t
Ω₁ = deformedInvariant B₀ Ω₀ i j cert.u cert.v cert.c t
s₁ = (fun e ↦ deformedShift B₀ i j cert.u cert.v t (s e))
IsUnit B₁.det
B₁ ≠ B₀
Ω₁.IsSymm
Ω₁.PosDef
conclusion 1
e k :
0 ≤ s₁ e k
conclusion 2
e :
(representedCovariance B₀ Ω₀ (s e)).PosDef
conclusion 3
e :
representedCovariance B₁ Ω₁ (s₁ e) = representedCovariance B₀ Ω₀ (s e)
Proof (Lean source)
theorem exists_collinear_simultaneous_congruence_ambiguity {d : ℕ} {E : Type*} (B₀ Ω₀ : SqMatrix d) (s : E → Fin d → ℝ) {i j : Fin d} (hij : i ≠ j) (hdiag : UnitDiagonal B₀) (hunit : IsUnit B₀.det) (hcycle : PairCycleAdmissible B₀ i j) (hΩ : Ω₀.PosDef) (hs : ∀ e k, 0 ≤ s e k) (cert : AffineLineCertificate s i j) {r : ℝ} (hr : 0 < r) : ∃ (t : ℝ) (B₁ Ω₁ : SqMatrix d) (s₁ : E → Fin d → ℝ), 0 < |t| ∧ |t| < r ∧ B₁ = deformedDiagonalizer B₀ i j cert.u cert.v t ∧ Ω₁ = deformedInvariant B₀ Ω₀ i j cert.u cert.v cert.c t ∧ s₁ = (fun e ↦ deformedShift B₀ i j cert.u cert.v t (s e)) ∧ UnitDiagonal B₁ ∧ IsUnit B₁.det ∧ PairCycleAdmissible B₁ i j ∧ B₁ ≠ B₀ ∧ Ω₁.IsSymm ∧ Ω₁.PosDef ∧ (∀ e k, 0 ≤ s₁ e k) ∧ (∀ e, (representedCovariance B₀ Ω₀ (s e)).PosDef) ∧ ∀ e, representedCovariance B₁ Ω₁ (s₁ e) = representedCovariance B₀ Ω₀ (s e) := by rcases exists_small_admissible_parameter B₀ Ω₀ hij hdiag hunit hcycle hΩ s cert.u cert.v cert.c cert.normal_ne hs hr with ⟨t, ht0, htr, _hfirst, _hsecond, _hdet, hTunit, hB₁unit, hB₁diag, hB₁cycle, hB₁ne, hΩ₁pos, hs₁⟩ refine ⟨t, deformedDiagonalizer B₀ i j cert.u cert.v t, deformedInvariant B₀ Ω₀ i j cert.u cert.v cert.c t, (fun e ↦ deformedShift B₀ i j cert.u cert.v t (s e)), ht0, htr, rfl, rfl, rfl, hB₁diag, hB₁unit, hB₁cycle, hB₁ne, ?_, hΩ₁pos, hs₁, ?_, ?_⟩ · have hΩsymm : Ω₀.IsSymm := by rw [← Matrix.isHermitian_iff_isSymm] exact hΩ.isHermitian exact deformedInvariant_isSymm B₀ Ω₀ hΩsymm cert.u cert.v cert.c t · intro e exact representedCovariance_posDef B₀ Ω₀ (s e) hunit hΩ (hs e) · intro e exact representedCovariance_deformation_eq B₀ Ω₀ hij s cert t e hTunit
1 supporting declaration (lemmas, instances)
Pairwise­Control 1 core · 5 supporting This module expands a congruence around the identity transition, bounds its quadratic coordinate-product remainder, solves the two-coordinate affine system furnished by one pair's selected environment triple, and control ★ pairwise_offDiagonal_control

Pairwise affine coordinate control

This module expands a congruence around the identity transition, bounds its quadratic coordinate-product remainder, solves the two-coordinate affine system furnished by one pair's selected environment triple, and controls diagonal transition entries using unit-diagonal normalization.

theorem pairwise_offDiagonal_control reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Pairwise affine separation gives one common bound for every off-diagonal transition error, for matrix family, shifts, reference, and candidate over environments E in dimension p, with scale, margin, and residual parameters, nonnegative scale and residual with positive margin, bounded separated shifts, an invertible exact reference, and an approximately diagonal candidate.

Formal statement
p :
ℕ
E :
Type*
Nonempty E
A :
E → SqMatrix p
s :
E → Fin p → ℝ
B₀ B :
M δ ε :
ℝ
hM :
0 ≤ M
hδ :
0 < δ
hε :
0 ≤ ε
hscale :
hunit :
IsUnit B₀.det
hexact :
i j :
i ≠ j
|transitionError B₀ B i j|
≤ pairwiseSolveFactor M δ * (2 * M * entryL2 (transitionError B₀ B) ^ 2 + 2 * ε)
Proof (Lean source)
theorem pairwise_offDiagonal_control {p : ℕ} {E : Type*} [Fintype E] [Nonempty E] (A : E → SqMatrix p) (s : E → Fin p → ℝ) (B₀ B : SqMatrix p) {M δ ε : ℝ} (hM : 0 ≤ M) (hδ : 0 < δ) (hε : 0 ≤ ε) (hscale : ShiftScaleBound s M) (hsep : PairwiseAffineSeparated s δ) (hunit : IsUnit B₀.det) (hexact : ExactCongruence A s B₀) (happrox : OffDiagonalApproximateCongruence A B ε) : ∀ i j, i ≠ j → |transitionError B₀ B i j| ≤ pairwiseSolveFactor M δ * (2 * M * entryL2 (transitionError B₀ B) ^ 2 + 2 * ε) := by intro i j hij obtain ⟨e₀, e₁, e₂, hdet⟩ := hsep i j hij exact (selectedTriple_offDiagonal_control A s B₀ B i j hij e₀ e₁ e₂ hM hδ hε hscale hdet hunit hexact happrox).1
5 supporting declarations (lemmas, instances)
  • coordinateProductRemainder_le theorem — The nonlinear coordinate-product remainder is quadratic in transition error, so it is lower order near the reference. This holds for error matrix R, rows i,j, environments e₁,e₀, and shift family s over environment type E in dimension p, under scale M, nonnegativity, and the shift bound.
    p :
    ℕ
    E :
    Type*
    s :
    E → Fin p → ℝ
    R :
    M :
    ℝ
    hM :
    0 ≤ M
    hscale :
    e₁ e₀ :
    E
    i j :
    Fin p
    |∑ k, R i k * R j k * (s e₁ k - s e₀ k)| ≤ 2 * M * entryL2 R ^ 2
    Proof (Lean source)
    -- Proof route: `|s₁ k-s₀ k| ≤ 2M`, then Cauchy--Schwarz on the two rows and the -- fact that each row's squared sum is bounded by the full entrywise squared sum. theorem coordinateProductRemainder_le {p : ℕ} {E : Type*} [Fintype E] (s : E → Fin p → ℝ) (R : SqMatrix p) {M : ℝ} (hM : 0 ≤ M) (hscale : ShiftScaleBound s M) (e₁ e₀ : E) (i j : Fin p) : |∑ k, R i k * R j k * (s e₁ k - s e₀ k)| ≤ 2 * M * entryL2 R ^ 2 := by classical have hshift (k : Fin p) : |s e₁ k - s e₀ k| ≤ 2 * M := by calc |s e₁ k - s e₀ k| ≤ |s e₁ k| + |s e₀ k| := abs_sub _ _ _ ≤ M + M := add_le_add (hscale _ _) (hscale _ _) _ = 2 * M := by ring have hterm (k : Fin p) : |R i k * R j k * (s e₁ k - s e₀ k)| ≤ M * (|R i k| ^ 2 + |R j k| ^ 2) := by have huv : 2 * (|R i k| * |R j k|) ≤ |R i k| ^ 2 + |R j k| ^ 2 := by nlinarith [sq_nonneg (|R i k| - |R j k|)] calc |R i k * R j k * (s e₁ k - s e₀ k)| = (|R i k| * |R j k|) * |s e₁ k - s e₀ k| := by simp only [abs_mul] _ ≤ (|R i k| * |R j k|) * (2 * M) := by gcongr exact hshift k _ ≤ M * (|R i k| ^ 2 + |R j k| ^ 2) := by nlinarith [mul_nonneg (abs_nonneg (R i k)) (abs_nonneg (R j k))] have hrow (a : Fin p) : (∑ k, |R a k| ^ 2) ≤ ∑ u, ∑ k, |R u k| ^ 2 := by exact Finset.single_le_sum (fun u _ => Finset.sum_nonneg fun k _ => sq_nonneg |R u k|) (Finset.mem_univ a) have hentry : entryL2 R ^ 2 = ∑ u, ∑ k, |R u k| ^ 2 := by rw [entryL2_eq_sqrt, Real.sq_sqrt] positivity calc |∑ k, R i k * R j k * (s e₁ k - s e₀ k)| ≤ ∑ k, |R i k * R j k * (s e₁ k - s e₀ k)| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ k, M * (|R i k| ^ 2 + |R j k| ^ 2) := by gcongr with k exact hterm k _ = M * ((∑ k, |R i k| ^ 2) + ∑ k, |R j k| ^ 2) := by simp_rw [mul_add] rw [Finset.sum_add_distrib, ← Finset.mul_sum, ← Finset.mul_sum] _ ≤ 2 * M * (∑ u, ∑ k, |R u k| ^ 2) := by nlinarith [hrow i, hrow j] _ = 2 * M * entryL2 R ^ 2 := by rw [hentry]
    Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.coordinateProductRemainder_le · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/PairwiseControl.lean:29
  • pair_cramer_control theorem — If the scale is nonnegative, the determinant margin is positive, and the residual bound is nonnegative, all four coefficients have scale at most 2M, the two-by-two coefficient determinant is separated, the two displayed equations hold, and both equation residuals are at most η, then both unknowns obey the conservative explicit Cramer bound.
    a b c d x y r₁ r₂ M δ η :
    ℝ
    hM :
    0 ≤ M
    hδ :
    0 < δ
    hη :
    0 ≤ η
    hcoeff :
    |a| ≤ 2 * M ∧ |b| ≤ 2 * M ∧ |c| ≤ 2 * M ∧ |d| ≤ 2 * M
    hdet :
    δ ≤ |a * d - c * b|
    heq₁ :
    a * x + b * y = r₁
    heq₂ :
    c * x + d * y = r₂
    hr₁ :
    |r₁| ≤ η
    hr₂ :
    |r₂| ≤ η
    conclusion 1
    |x| ≤ pairwiseSolveFactor M δ * η
    conclusion 2
    |y| ≤ pairwiseSolveFactor M δ * η
    Proof (Lean source)
    theorem pair_cramer_control {a b c d x y r₁ r₂ M δ η : ℝ} (hM : 0 ≤ M) (hδ : 0 < δ) (hη : 0 ≤ η) (hcoeff : |a| ≤ 2 * M ∧ |b| ≤ 2 * M ∧ |c| ≤ 2 * M ∧ |d| ≤ 2 * M) (hdet : δ ≤ |a * d - c * b|) (heq₁ : a * x + b * y = r₁) (heq₂ : c * x + d * y = r₂) (hr₁ : |r₁| ≤ η) (hr₂ : |r₂| ≤ η) : |x| ≤ pairwiseSolveFactor M δ * η ∧ |y| ≤ pairwiseSolveFactor M δ * η := by have hxid : (a * d - c * b) * x = d * r₁ - b * r₂ := by rw [← heq₁, ← heq₂] ring_nf have hyid : (a * d - c * b) * y = a * r₂ - c * r₁ := by rw [← heq₁, ← heq₂] ring have hxnum : |d * r₁ - b * r₂| ≤ 4 * M * η := by calc |d * r₁ - b * r₂| ≤ |d * r₁| + |b * r₂| := abs_sub _ _ _ = |d| * |r₁| + |b| * |r₂| := by simp only [abs_mul] _ ≤ (2 * M) * η + (2 * M) * η := by exact add_le_add (mul_le_mul hcoeff.2.2.2 hr₁ (abs_nonneg r₁) (by positivity)) (mul_le_mul hcoeff.2.1 hr₂ (abs_nonneg r₂) (by positivity)) _ = 4 * M * η := by ring have hynum : |a * r₂ - c * r₁| ≤ 4 * M * η := by calc |a * r₂ - c * r₁| ≤ |a * r₂| + |c * r₁| := abs_sub _ _ _ = |a| * |r₂| + |c| * |r₁| := by simp only [abs_mul] _ ≤ (2 * M) * η + (2 * M) * η := by exact add_le_add (mul_le_mul hcoeff.1 hr₂ (abs_nonneg r₂) (by positivity)) (mul_le_mul hcoeff.2.2.1 hr₁ (abs_nonneg r₁) (by positivity)) _ = 4 * M * η := by ring have hxmul : δ * |x| ≤ 4 * M * η := by calc δ * |x| ≤ |a * d - c * b| * |x| := by gcongr _ = |d * r₁ - b * r₂| := by rw [← abs_mul, hxid] _ ≤ 4 * M * η := hxnum have hymul : δ * |y| ≤ 4 * M * η := by calc δ * |y| ≤ |a * d - c * b| * |y| := by gcongr _ = |a * r₂ - c * r₁| := by rw [← abs_mul, hyid] _ ≤ 4 * M * η := hynum constructor <;> unfold pairwiseSolveFactor <;> rw [div_mul_eq_mul_div] <;> apply (le_div_iff₀ hδ).2 <;> nlinarith [mul_nonneg hM hη]
    Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.pair_cramer_control · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/PairwiseControl.lean:83
  • selectedTriple_offDiagonal_control theorem — One separating triple of environments controls both directed off-diagonal transition errors for matrix family, shifts, reference, and candidate over environments E in dimension p. It uses scale, margin, and residual parameters, selected coordinates and their distinctness, environment triple, nonnegative scale and residual with positive margin, bounded shifts and determinant separation, an invertible exact reference, and an approximately diagonal candidate.
    p :
    ℕ
    E :
    Type*
    Nonempty E
    A :
    E → SqMatrix p
    s :
    E → Fin p → ℝ
    B₀ B :
    M δ ε :
    ℝ
    i j :
    Fin p
    hij :
    i ≠ j
    e₀ e₁ e₂ :
    E
    hM :
    0 ≤ M
    hδ :
    0 < δ
    hε :
    0 ≤ ε
    hscale :
    hdet :
    δ ≤ |pairAffineDet s i j e₀ e₁ e₂|
    hunit :
    IsUnit B₀.det
    hexact :
    R :
    η :
    2 * M * entryL2 R ^ 2 + 2 * ε
    |R i j| ≤ pairwiseSolveFactor M δ * η
    |R j i| ≤ pairwiseSolveFactor M δ * η
    Proof (Lean source)
    -- Proof route: put `Q = B B₀⁻¹ = I+R`. Subtract the congruence equations at `e₀` -- from those at `e₁,e₂`. The `(i,j)` entries give a 2×2 system in `R i j` and -- `R j i`; `coordinateProductRemainder_le` bounds its nonlinear terms and the two -- off-diagonal residuals contribute `2ε`. Apply `pair_cramer_control`. theorem selectedTriple_offDiagonal_control {p : ℕ} {E : Type*} [Fintype E] [Nonempty E] (A : E → SqMatrix p) (s : E → Fin p → ℝ) (B₀ B : SqMatrix p) {M δ ε : ℝ} (i j : Fin p) (hij : i ≠ j) (e₀ e₁ e₂ : E) (hM : 0 ≤ M) (hδ : 0 < δ) (hε : 0 ≤ ε) (hscale : ShiftScaleBound s M) (hdet : δ ≤ |pairAffineDet s i j e₀ e₁ e₂|) (hunit : IsUnit B₀.det) (hexact : ExactCongruence A s B₀) (happrox : OffDiagonalApproximateCongruence A B ε) : let R := transitionError B₀ B let η := 2 * M * entryL2 R ^ 2 + 2 * ε |R i j| ≤ pairwiseSolveFactor M δ * η ∧ |R j i| ≤ pairwiseSolveFactor M δ * η := by classical dsimp only let Q := transition B₀ B let R := transitionError B₀ B have hQR : Q = 1 + R := by ext u v simp [Q, R, transitionError, Matrix.sub_apply] have hformula (e : E) : (B * A e * B.transpose) i j = R i j * s e j + R j i * s e i + ∑ k, R i k * R j k * s e k := by rw [← transition_diagonal_congruence A s B₀ B hunit hexact e] have hentry : (Q * diagonal (s e) * Q.transpose) i j = ∑ k, Q i k * s e k * Q j k := by simp [Matrix.mul_apply, Matrix.diagonal_apply] change (Q * diagonal (s e) * Q.transpose) i j = _ rw [hentry, hQR] simp only [Matrix.add_apply, Matrix.one_apply] ring_nf repeat rw [Finset.sum_add_distrib] simp only [ite_mul, one_mul, zero_mul, mul_ite, mul_one, mul_zero, Finset.sum_ite_eq, Finset.mem_univ, ↓reduceIte] rw [if_neg hij] have hsum : (∑ k, R i k * s e k * R j k) = ∑ k, R i k * R j k * s e k := by apply Finset.sum_congr rfl intro k hk ring rw [hsum] ring have hlinear (e' e : E) : (s e' j - s e j) * R i j + (s e' i - s e i) * R j i = ((B * A e' * B.transpose) i j - (B * A e * B.transpose) i j) - ∑ k, R i k * R j k * (s e' k - s e k) := by rw [hformula e', hformula e] simp_rw [mul_sub] rw [Finset.sum_sub_distrib] ring let a := s e₁ j - s e₀ j let b := s e₁ i - s e₀ i let c := s e₂ j - s e₀ j let d := s e₂ i - s e₀ i let r₁ := ((B * A e₁ * B.transpose) i j - (B * A e₀ * B.transpose) i j) - ∑ k, R i k * R j k * (s e₁ k - s e₀ k) let r₂ := ((B * A e₂ * B.transpose) i j - (B * A e₀ * B.transpose) i j) - ∑ k, R i k * R j k * (s e₂ k - s e₀ k) have heq₁ : a * R i j + b * R j i = r₁ := by simpa [a, b, r₁] using hlinear e₁ e₀ have heq₂ : c * R i j + d * R j i = r₂ := by simpa [c, d, r₂] using hlinear e₂ e₀ have hcoeff : |a| ≤ 2 * M ∧ |b| ≤ 2 * M ∧ |c| ≤ 2 * M ∧ |d| ≤ 2 * M := by have hdiff (e' e : E) (k : Fin p) : |s e' k - s e k| ≤ 2 * M := by calc |s e' k - s e k| ≤ |s e' k| + |s e k| := abs_sub _ _ _ ≤ M + M := add_le_add (hscale _ _) (hscale _ _) _ = 2 * M := by ring exact ⟨hdiff e₁ e₀ j, hdiff e₁ e₀ i, hdiff e₂ e₀ j, hdiff e₂ e₀ i⟩ have hdet' : δ ≤ |a * d - c * b| := by have heqdet : a * d - c * b = -pairAffineDet s i j e₀ e₁ e₂ := by simp [a, b, c, d, pairAffineDet] ring rw [heqdet, abs_neg] exact hdet have houtput (e' e : E) : |(B * A e' * B.transpose) i j - (B * A e * B.transpose) i j| ≤ 2 * ε := by calc |_ - _| ≤ |(B * A e' * B.transpose) i j| + |(B * A e * B.transpose) i j| := abs_sub _ _ _ ≤ ε + ε := add_le_add (happrox e' i j hij) (happrox e i j hij) _ = 2 * ε := by ring have hr₁ : |r₁| ≤ 2 * M * entryL2 R ^ 2 + 2 * ε := by dsimp [r₁] calc |_ - _| ≤ |(B * A e₁ * B.transpose) i j - (B * A e₀ * B.transpose) i j| + |∑ k, R i k * R j k * (s e₁ k - s e₀ k)| := abs_sub _ _ _ ≤ 2 * ε + 2 * M * entryL2 R ^ 2 := add_le_add (houtput e₁ e₀) (coordinateProductRemainder_le s R hM hscale e₁ e₀ i j) _ = 2 * M * entryL2 R ^ 2 + 2 * ε := by ring have hr₂ : |r₂| ≤ 2 * M * entryL2 R ^ 2 + 2 * ε := by dsimp [r₂] calc |_ - _| ≤ |(B * A e₂ * B.transpose) i j - (B * A e₀ * B.transpose) i j| + |∑ k, R i k * R j k * (s e₂ k - s e₀ k)| := abs_sub _ _ _ ≤ 2 * ε + 2 * M * entryL2 R ^ 2 := add_le_add (houtput e₂ e₀) (coordinateProductRemainder_le s R hM hscale e₂ e₀ i j) _ = 2 * M * entryL2 R ^ 2 + 2 * ε := by ring have hη : 0 ≤ 2 * M * entryL2 R ^ 2 + 2 * ε := by positivity change |R i j| ≤ _ ∧ |R j i| ≤ _ exact pair_cramer_control hM hδ hη hcoeff hdet' heq₁ heq₂ hr₁ hr₂
    Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.selectedTriple_offDiagonal_control · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/PairwiseControl.lean:134
  • diagonalBranch_control theorem — Unit-diagonal normalization turns off-diagonal transition control into diagonal control, for reference and candidate matrices in dimension p with invertible reference and both diagonals normalized.
    p :
    ℕ
    B₀ B :
    hunit :
    IsUnit B₀.det
    hdiag₀ :
    hdiag :
    i :
    |transitionError B₀ B i i| ^ 2
    ≤ ‖B₀‖ ^ 2 * ∑ k ∈ (Finset.univ.erase i), |transitionError B₀ B i k| ^ 2
    Proof (Lean source)
    -- Proof route: `B = (I+R)B₀`; comparing diagonal entries gives -- `R i i = -∑_{k≠i} R i k B₀ k i`, then apply Cauchy--Schwarz. theorem diagonalBranch_control {p : ℕ} (B₀ B : SqMatrix p) (hunit : IsUnit B₀.det) (hdiag₀ : UnitDiagonal B₀) (hdiag : UnitDiagonal B) : ∀ i, |transitionError B₀ B i i| ^ 2 ≤ ‖B₀‖ ^ 2 * ∑ k ∈ (Finset.univ.erase i), |transitionError B₀ B i k| ^ 2 := by classical let R := transitionError B₀ B have hRB : R * B₀ = B - B₀ := by dsimp [R, transitionError, transition] rw [Matrix.sub_mul, Matrix.one_mul] simpa only [Matrix.mul_assoc] using congrArg (fun X : SqMatrix p => X - B₀) (Matrix.nonsing_inv_mul_cancel_right B₀ B hunit) intro i have hentry := congrArg (fun X : SqMatrix p => X i i) hRB simp only [Matrix.mul_apply, Matrix.sub_apply, hdiag i, hdiag₀ i, sub_self] at hentry have hsplit := Finset.sum_erase_add (Finset.univ : Finset (Fin p)) (fun k => R i k * B₀ k i) (Finset.mem_univ i) have heq : R i i = -∑ k ∈ Finset.univ.erase i, R i k * B₀ k i := by rw [← hsplit, hdiag₀ i, mul_one] at hentry linarith have hcolumn : ∑ k ∈ Finset.univ.erase i, |B₀ k i| ^ 2 ≤ ‖B₀‖ ^ 2 := by let e : EuclideanSpace ℝ (Fin p) := toLp 2 (single i 1) have he : ‖e‖ = 1 := by simp [e] have hmul := Matrix.l2_opNorm_mulVec B₀ e rw [he, mul_one] at hmul have hfull : ∑ k, |B₀ k i| ^ 2 ≤ ‖B₀‖ ^ 2 := by have hsquare := (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).mpr hmul rw [EuclideanSpace.norm_sq_eq] at hsquare simpa [e, mulVec, dotProduct, sq_abs] using hsquare exact (Finset.sum_le_sum_of_subset_of_nonneg (Finset.erase_subset _ _) (fun _ _ _ => sq_nonneg _)).trans hfull change |R i i| ^ 2 ≤ ‖B₀‖ ^ 2 * ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 rw [heq, abs_neg, sq_abs] calc (∑ k ∈ Finset.univ.erase i, R i k * B₀ k i) ^ 2 ≤ (∑ k ∈ Finset.univ.erase i, (R i k) ^ 2) * ∑ k ∈ Finset.univ.erase i, (B₀ k i) ^ 2 := Finset.sum_mul_sq_le_sq_mul_sq _ _ _ _ = (∑ k ∈ Finset.univ.erase i, |R i k| ^ 2) * ∑ k ∈ Finset.univ.erase i, |B₀ k i| ^ 2 := by simp only [sq_abs] _ ≤ (∑ k ∈ Finset.univ.erase i, |R i k| ^ 2) * ‖B₀‖ ^ 2 := by exact mul_le_mul_of_nonneg_left hcolumn (Finset.sum_nonneg fun _ _ => sq_nonneg _) _ = ‖B₀‖ ^ 2 * ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 := by ring
    Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.diagonalBranch_control · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/PairwiseControl.lean:278
  • entryL2_transitionError_le theorem — Uniform off-diagonal control aggregates into a full entrywise transition-error bound for reference and candidate matrices in dimension p, with matrix and entry bounds L,c, positive dimension and nonnegative bounds, an invertible unit-diagonal reference and unit-diagonal candidate, reference norm control, and common off-diagonal control.
    p :
    ℕ
    B₀ B :
    L c :
    ℝ
    hp :
    0 < p
    hL :
    0 ≤ L
    hc :
    0 ≤ c
    hunit :
    IsUnit B₀.det
    hdiag₀ :
    hdiag :
    hB₀ :
    ‖B₀‖ ≤ L
    hoff :
    ∀ i j
    if
    i ≠ j
    then
    |transitionError B₀ B i j| ≤ c
    entryL2 (transitionError B₀ B) ≤ c * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + L ^ 2))
    Proof (Lean source)
    theorem entryL2_transitionError_le {p : ℕ} (B₀ B : SqMatrix p) {L c : ℝ} (hp : 0 < p) (hL : 0 ≤ L) (hc : 0 ≤ c) (hunit : IsUnit B₀.det) (hdiag₀ : UnitDiagonal B₀) (hdiag : UnitDiagonal B) (hB₀ : ‖B₀‖ ≤ L) (hoff : ∀ i j, i ≠ j → |transitionError B₀ B i j| ≤ c) : entryL2 (transitionError B₀ B) ≤ c * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + L ^ 2)) := by classical let R := transitionError B₀ B have hdiagControl := diagonalBranch_control B₀ B hunit hdiag₀ hdiag have hnormsq : ‖B₀‖ ^ 2 ≤ L ^ 2 := (sq_le_sq₀ (norm_nonneg _) hL).mpr hB₀ have hoffSq (i k : Fin p) (hik : i ≠ k) : |R i k| ^ 2 ≤ c ^ 2 := by exact (sq_le_sq₀ (abs_nonneg _) hc).mpr (by simpa [R] using hoff i k hik) have herase (i : Fin p) : ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 ≤ (p - 1 : ℕ) * c ^ 2 := by calc ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 ≤ (Finset.univ.erase i).card • c ^ 2 := Finset.sum_le_card_nsmul _ _ _ (fun k hk => hoffSq i k (by simpa [ne_comm] using (Finset.mem_erase.mp hk).1)) _ = (p - 1 : ℕ) * c ^ 2 := by rw [Finset.card_erase_of_mem (Finset.mem_univ i), Finset.card_univ, Fintype.card_fin] norm_num have hrow (i : Fin p) : ∑ k, |R i k| ^ 2 ≤ (1 + L ^ 2) * ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 := by have hsplit := Finset.sum_erase_add (Finset.univ : Finset (Fin p)) (fun k => |R i k| ^ 2) (Finset.mem_univ i) rw [← hsplit] calc (∑ k ∈ Finset.univ.erase i, |R i k| ^ 2) + |R i i| ^ 2 ≤ (∑ k ∈ Finset.univ.erase i, |R i k| ^ 2) + ‖B₀‖ ^ 2 * ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 := by gcongr simpa [R] using hdiagControl i _ ≤ (∑ k ∈ Finset.univ.erase i, |R i k| ^ 2) + L ^ 2 * ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 := by gcongr _ = (1 + L ^ 2) * ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 := by ring have hsum : ∑ i, ∑ k, |R i k| ^ 2 ≤ (p : ℝ) * (p - 1 : ℕ) * c ^ 2 * (1 + L ^ 2) := by calc ∑ i, ∑ k, |R i k| ^ 2 ≤ ∑ i, (1 + L ^ 2) * ∑ k ∈ Finset.univ.erase i, |R i k| ^ 2 := by gcongr with i exact hrow i _ ≤ ∑ _i : Fin p, (1 + L ^ 2) * ((p - 1 : ℕ) * c ^ 2) := by gcongr with i exact herase i _ = (p : ℝ) * (p - 1 : ℕ) * c ^ 2 * (1 + L ^ 2) := by simp [Finset.card_univ, Fintype.card_fin] ring rw [entryL2_eq_sqrt, Real.sqrt_le_iff] constructor · positivity · calc ∑ i, ∑ j, |R i j| ^ 2 ≤ (p : ℝ) * (p - 1 : ℕ) * c ^ 2 * (1 + L ^ 2) := hsum _ = (c * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + L ^ 2))) ^ 2 := by rw [mul_pow, Real.sq_sqrt] · ring · positivity
    Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence.entryL2_transitionError_le · Causalean/Discovery/LinearDisentanglement/SimultaneousCongruence/PairwiseControl.lean:332
Small­Parameter 1 core · 2 supporting This module proves the openness step for the transformed invariant and packages all algebraic, normalization, invertibility, cycle-product, and nonnegativity constraints into one arbitrarily-small nonzero parameter choic ★ exists_small_admissible_parameter

Selecting a simultaneous small deformation parameter

This module proves the openness step for the transformed invariant and packages all algebraic, normalization, invertibility, cycle-product, and nonnegativity constraints into one arbitrarily-small nonzero parameter choice.

theorem exists_small_admissible_parameter reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

Every positive neighborhood contains a nontrivial admissible ambiguity deformation, showing the nonidentification is genuinely local. For dimension d, environment type E, reference diagonalizer B, invariant Ω, and selected coordinates, this uses distinctness, unit diagonal, invertibility, cycle admissibility, and positive definiteness, shift family s, line normal and offset u,v,c, nonzero normal and nonnegative shifts, and positive radius r.

Formal statement
d :
ℕ
E :
Type*
B Ω :
i j :
Fin d
hij :
i ≠ j
hBdiag :
hBunit :
IsUnit B.det
hcycle :
hΩ :
Ω.PosDef
s :
E → Fin d → ℝ
u v c :
ℝ
hnormal :
u ≠ 0 ∨ v ≠ 0
hs :
∀ e k, 0 ≤ s e k
r :
ℝ
hr :
0 < r
∃ t : ℝ,
0 < |t|
|t| < r
firstNormalizationDenom B i j v t ≠ 0
secondNormalizationDenom B i j u t ≠ 0
1 - t ^ 2 * u * v ≠ 0
IsUnit (deformedDiagonalizer B i j u v t).det
deformedDiagonalizer B i j u v t ≠ B
(deformedInvariant B Ω i j u v c t).PosDef
conclusion 1
e k :
0 ≤ deformedShift B i j u v t (s e) k
Proof (Lean source)
theorem exists_small_admissible_parameter {d : ℕ} {E : Type*} (B Ω : SqMatrix d) {i j : Fin d} (hij : i ≠ j) (hBdiag : UnitDiagonal B) (hBunit : IsUnit B.det) (hcycle : PairCycleAdmissible B i j) (hΩ : Ω.PosDef) (s : E → Fin d → ℝ) (u v c : ℝ) (hnormal : u ≠ 0 ∨ v ≠ 0) (hs : ∀ e k, 0 ≤ s e k) {r : ℝ} (hr : 0 < r) : ∃ t : ℝ, 0 < |t| ∧ |t| < r ∧ firstNormalizationDenom B i j v t ≠ 0 ∧ secondNormalizationDenom B i j u t ≠ 0 ∧ 1 - t ^ 2 * u * v ≠ 0 ∧ IsUnit (normalizedPairDeformation B i j u v t).det ∧ IsUnit (deformedDiagonalizer B i j u v t).det ∧ UnitDiagonal (deformedDiagonalizer B i j u v t) ∧ PairCycleAdmissible (deformedDiagonalizer B i j u v t) i j ∧ deformedDiagonalizer B i j u v t ≠ B ∧ (deformedInvariant B Ω i j u v c t).PosDef ∧ ∀ e k, 0 ≤ deformedShift B i j u v t (s e) k := by rcases exists_deformedInvariant_posDef_radius B Ω hΩ u v c with ⟨ρp, hρp, hp⟩ rcases exists_algebraic_admissibility_radius B i j u v with ⟨ρa, hρa, ha⟩ let δ := min r (min ρp ρa) let t := δ / 2 have hδ : 0 < δ := by exact lt_min hr (lt_min hρp hρa) have ht_abs : |t| = δ / 2 := by rw [abs_of_pos] exact div_pos hδ (by norm_num) have ht0 : 0 < |t| := by rw [ht_abs]; positivity have htr : |t| < r := by rw [ht_abs] have hδr : δ ≤ r := min_le_left _ _ linarith have htp : |t| < ρp := by rw [ht_abs] have hδp : δ ≤ ρp := (min_le_right r _).trans (min_le_left _ _) linarith have hta : |t| < ρa := by rw [ht_abs] have hδa : δ ≤ ρa := (min_le_right r _).trans (min_le_right _ _) linarith rcases ha t hta with ⟨hfirst, hsecond, hdet⟩ have hTunit : IsUnit (normalizedPairDeformation B i j u v t).det := normalizedPairDeformation_isUnit_det B hij hfirst hsecond hdet have hB'unit : IsUnit (deformedDiagonalizer B i j u v t).det := by rw [deformedDiagonalizer, Matrix.det_mul] exact hTunit.mul hBunit have hdiag : UnitDiagonal (deformedDiagonalizer B i j u v t) := deformedDiagonalizer_unitDiagonal B hij hBdiag hfirst hsecond have hcycle' : PairCycleAdmissible (deformedDiagonalizer B i j u v t) i j := deformedDiagonalizer_pairCycleAdmissible B hij hBdiag hcycle hfirst hsecond hdet have htne : t ≠ 0 := abs_pos.mp ht0 have hne : deformedDiagonalizer B i j u v t ≠ B := deformedDiagonalizer_ne B hij hBunit hnormal htne hfirst hsecond have hpos : (deformedInvariant B Ω i j u v c t).PosDef := hp t htp have hshift : ∀ e k, 0 ≤ deformedShift B i j u v t (s e) k := by intro e exact deformedShift_nonnegative B hij u v t (s e) (hs e) exact ⟨t, ht0, htr, hfirst, hsecond, hdet, hTunit, hB'unit, hdiag, hcycle', hne, hpos, hshift⟩
2 supporting declarations (lemmas, instances)
Stability 1 core · 4 supporting This module aggregates the pair-dependent two-coordinate estimates, uses an explicit small-residual threshold and ordinary local neighborhood to select the identity branch, converts entrywise L² control to Euclidean oper ★ opNorm_sub_le_condition_specialization

Local operator-norm stability from pairwise affine separation

This module aggregates the pair-dependent two-coordinate estimates, uses an explicit small-residual threshold and ordinary local neighborhood to select the identity branch, converts entrywise L² control to Euclidean operator norm, and specializes the result to a determinant/condition-number envelope.

theorem opNorm_sub_le_condition_specialization reviewed
Causalean.Discovery.LinearDisentanglement.SimultaneousCongruence

The determinant-condition envelope yields the advertised local operator-norm stability rate, replacing an abstract matrix scale by its explicit condition root. For matrix family, shifts, reference, and candidate over environments E in dimension p, with scale, margin, condition, and residual parameters, this uses positive dimension, scale, and margin with condition at least one, bounded separated shifts, normalized matrices and a conditioned reference, exact and approximate feasibility, nonnegative residual, and the small-residual and local-neighborhood conditions.

Formal statement
p :
ℕ
E :
Type*
Nonempty E
A :
E → SqMatrix p
s :
E → Fin p → ℝ
B₀ B :
M γ κ ε :
ℝ
hp :
0 < p
hM :
0 < M
hγ :
0 < γ
hκ :
1 ≤ κ
hscale :
hdiag₀ :
hdiag :
hcond :
hexact :
hε :
0 ≤ ε
hsmall :
hlocal :
‖B - B₀‖
≤ 16 * (6 * M / γ) * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + conditionRoot p κ ^ 2)) * conditionRoot p κ ^ 3 * ε
Proof (Lean source)
theorem opNorm_sub_le_condition_specialization {p : ℕ} {E : Type*} [Fintype E] [Nonempty E] (A : E → SqMatrix p) (s : E → Fin p → ℝ) (B₀ B : SqMatrix p) {M γ κ ε : ℝ} (hp : 0 < p) (hM : 0 < M) (hγ : 0 < γ) (hκ : 1 ≤ κ) (hscale : ShiftScaleBound s M) (hsep : PairwiseAffineSeparated s γ) (hdiag₀ : UnitDiagonal B₀) (hdiag : UnitDiagonal B) (hcond : DetConditionEnvelope κ B₀) (hexact : ExactCongruence A s B₀) (hε : 0 ≤ ε) (happrox : OffDiagonalApproximateCongruence A B ε) (hsmall : ε ≤ pairwiseResidualRadius p M γ (conditionRoot p κ)) (hlocal : InReferenceNeighborhood (pairwiseLocalRadius p M γ (conditionRoot p κ) κ) B₀ B) : ‖B - B₀‖ ≤ 16 * (6 * M / γ) * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + conditionRoot p κ ^ 2)) * conditionRoot p κ ^ 3 * ε := by have hL : 1 ≤ conditionRoot p κ := one_le_conditionRoot hp hκ have hB₀ : ‖B₀‖ ≤ conditionRoot p κ := opNorm_le_conditionRoot B₀ hp hcond have hinv : ‖B₀⁻¹‖ ≤ κ := invOpNorm_le_conditionEnvelope B₀ hp hdiag₀ hcond have hJ : 0 < κ := lt_of_lt_of_le zero_lt_one hκ have h := opNorm_sub_le_of_pairwise_affine (J := κ) A s B₀ B hp hM hγ hL hJ hscale hsep hcond.1 hexact hdiag₀ hdiag hB₀ hinv hε hsmall happrox hlocal calc ‖B - B₀‖ ≤ pairwiseStabilityConstant p M γ (conditionRoot p κ) * ε := h _ = 16 * (6 * M / γ) * sqrt ((p : ℝ) * (p - 1 : ℕ) * (1 + conditionRoot p κ ^ 2)) * conditionRoot p κ ^ 3 * ε := by unfold pairwiseStabilityConstant pairwiseAggregateFactor pairwiseSolveFactor ring
4 supporting declarations (lemmas, instances)