@@ -48,6 +48,34 @@ protected theorem invOf_mul_cancel_right (A : Matrix m n α) (B : Matrix n n α)
4848protected theorem mul_invOf_cancel_right (A : Matrix m n α) (B : Matrix n n α) [Invertible B] :
4949 A * B * ⅟B = A := by rw [Matrix.mul_assoc, mul_invOf_self, Matrix.mul_one]
5050
51+ /-- A copy oy of `invOf_mul_eq_iff_eq_mul_left` for rectangular matrices. -/
52+ protected theorem invOf_mul_eq_iff_eq_mul_left
53+ {A B : Matrix n m α} {C : Matrix n n α} [Invertible C] :
54+ ⅟C * A = B ↔ A = C * B := by
55+ refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
56+ · rw [← h, Matrix.mul_invOf_cancel_left]
57+ · rw [h, Matrix.invOf_mul_cancel_left]
58+
59+ /-- A copy oy of `mul_left_eq_iff_eq_invOf_mul` for rectangular matrices. -/
60+ protected theorem mul_left_eq_iff_eq_invOf_mul
61+ {A B : Matrix n m α} {C : Matrix n n α} [Invertible C] :
62+ C * A = B ↔ A = ⅟C * B := by
63+ rw [eq_comm, ← Matrix.invOf_mul_eq_iff_eq_mul_left, eq_comm]
64+
65+ /-- A copy oy of `mul_invOf_eq_iff_eq_mul_right` for rectangular matrices. -/
66+ protected theorem mul_invOf_eq_iff_eq_mul_right
67+ {A B : Matrix m n α} {C : Matrix n n α} [Invertible C] :
68+ A * ⅟C = B ↔ A = B * C := by
69+ refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
70+ · rw [← h, Matrix.invOf_mul_cancel_right]
71+ · rw [h, Matrix.mul_invOf_cancel_right]
72+
73+ /-- A copy oy of `mul_right_eq_iff_eq_mul_invOf` for rectangular matrices. -/
74+ protected theorem mul_right_eq_iff_eq_mul_invOf
75+ {A B : Matrix m n α} {C : Matrix n n α} [Invertible C] :
76+ A * C = B ↔ A = B * ⅟C := by
77+ rw [eq_comm, ← Matrix.mul_invOf_eq_iff_eq_mul_right, eq_comm]
78+
5179section ConjTranspose
5280variable [StarRing α] (A : Matrix n n α)
5381
@@ -159,14 +187,59 @@ def invertibleAddMulMul : Invertible (A + U * C * V) where
159187 invOf_mul_self := add_mul_mul_invOf_mul_eq_one' _ _ _ _
160188 mul_invOf_self := add_mul_mul_invOf_mul_eq_one _ _ _ _
161189
162- /-- The **Woodbury Identity** (`⅟` version). -/
190+ /-- The **Woodbury Identity** (`⅟` version).
191+
192+ See `Matrix.invOf_add_mul_mul'` for the Binomial Inverse Theorem. -/
163193theorem invOf_add_mul_mul [Invertible (A + U * C * V)] :
164194 ⅟(A + U * C * V) = ⅟A - ⅟A * U * ⅟(⅟C + V * ⅟A * U) * V * ⅟A := by
165195 letI := invertibleAddMulMul A U C V
166196 convert (rfl : ⅟(A + U * C * V) = _)
167197
168198end Woodbury
169199
200+ section BinomialInverseTheorem
201+
202+ variable [Fintype m] [DecidableEq m] [Ring α]
203+ (A : Matrix n n α) (U : Matrix n m α) (C : Matrix m m α) (V : Matrix m n α)
204+ [Invertible A] [Invertible (C + C * V * ⅟A * U * C)]
205+
206+ lemma add_mul_mul_mul_invOf_eq_one :
207+ (A + U * C * V) * (⅟A - ⅟A * U * C * ⅟(C + C * V * ⅟A * U * C) * C * V * ⅟A) = 1 := by
208+ simp only [Matrix.mul_sub, Matrix.add_mul, mul_invOf_self']
209+ rw [add_sub_assoc, add_eq_left, sub_eq_zero]
210+ simp only [← Matrix.mul_assoc, mul_invOf_self', Matrix.one_mul]
211+ simp only [← Matrix.add_mul]
212+ congr
213+ rw [← Matrix.mul_right_eq_iff_eq_mul_invOf]
214+ simp only [Matrix.add_mul, Matrix.mul_add, Matrix.mul_assoc]
215+
216+ lemma add_mul_mul_mul_invOf_eq_one' :
217+ (⅟A - ⅟A * U * C * ⅟(C + C * V * ⅟A * U * C) * C * V * ⅟A) * (A + U * C * V) = 1 := by
218+ simp only [Matrix.mul_add, Matrix.sub_mul, invOf_mul_self']
219+ rw [sub_add, sub_eq_self, sub_eq_zero]
220+ simp only [Matrix.mul_assoc, ← Matrix.mul_sub]
221+ congr
222+ rw [eq_sub_iff_add_eq, ← Matrix.mul_add]
223+ rw [Matrix.invOf_mul_eq_iff_eq_mul_left]
224+ simp only [Matrix.add_mul, invOf_mul_self', Matrix.mul_one, add_right_inj]
225+ simp only [Matrix.mul_assoc]
226+
227+ /-- If matrices `A` and `C + C * V * A⁻¹ * U * C` are invertible, then so is `A + U * C * V`. -/
228+ def invertibleAddMulMul' : Invertible (A + U * C * V) where
229+ invOf := ⅟A - ⅟A * U * C * ⅟(C + C * V * ⅟A * U * C) * C * V * ⅟A
230+ invOf_mul_self := add_mul_mul_mul_invOf_eq_one' A U C V
231+ mul_invOf_self := add_mul_mul_mul_invOf_eq_one A U C V
232+
233+ /-- The **Binomial Inverse Theorem** (`⅟` version).
234+
235+ See `Matrix.invOf_add_mul_mul` for the Woodbury identity. -/
236+ theorem invOf_add_mul_mul' [Invertible (A + U * C * V)] :
237+ ⅟(A + U * C * V) = ⅟A - ⅟A * U * C * ⅟(C + C * V * ⅟A * U * C) * C * V * ⅟A := by
238+ letI := invertibleAddMulMul' A U C V
239+ convert (rfl : ⅟(A + U * C * V) = _)
240+
241+ end BinomialInverseTheorem
242+
170243end Ring
171244
172245end Matrix
0 commit comments