-- Lean 4 proof step from Mathlib.Data.Matrix.Invertible (goal)
Goal:
m : Type u_1
n : Type u_2
α : Type u_3
inst : Fintype n
inst_1 : DecidableEq n
inst_2 : Fintype m
inst_3 : DecidableEq m
inst_4 : Ring α
A : Matrix n n α
U : Matrix n m α
C : Matrix m m α
V : Matrix m n α
inst_5 : Invertible A
inst_6 : Invertible C
inst_7 :
  Invertible
    (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
      V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
_ :
  (A + U * C * V) *
      (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
        @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U *
              @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
                (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                  V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
                _ *
            V *
          @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _) =
    A * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
          A * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U *
                @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
                  (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                    V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
                  _ *
              V *
            @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ +
        U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
      U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U *
            @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
              (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
              _ *
          V *
        @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _
_₁ :
  A * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
          A * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U *
                @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
                  (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                    V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
                  _ *
              V *
            @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ +
        U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
      U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U *
            @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
              (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
              _ *
          V *
        @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ =
    1 + U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
      (U *
              @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
                (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                  V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
                _ *
            V *
          @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ +
        U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U *
              @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
                (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                  V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
                _ *
            V *
          @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _)
_₂ :
  1 + U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
      (U *
              @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
                (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                  V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
                _ *
            V *
          @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ +
        U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U *
              @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
                (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                  V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
                _ *
            V *
          @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _) =
    1 + U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
      (U + U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U) *
            @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
              (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
              _ *
          V *
        @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _
_₃ :
  1 + U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
      (U + U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U) *
            @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
              (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
              _ *
          V *
        @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ =
    1 + U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
      U * C *
              (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U) *
            @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
              (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
              _ *
          V *
        @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _
⊢ (A + U * C * V) *
      (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
        @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U *
              @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
                (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
                  V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
                _ *
            V *
          @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _) =
    1
have _₄ : 1 + U * C * V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ -
    U * C *
            (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
              V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U) *
          @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one
            (@Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one C _ +
              V * @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ * U)
            _ *
        V *
      @Invertible.invOf _ instMulOfFintypeOfAddCommMonoid one A _ =
  1
Tactic: calc
    (A + U*C*V)*(⅟A - ⅟A*U*⅟(⅟C + V*⅟A*U)*V*⅟A)
    _ = A*⅟A - A*⅟A*U*⅟(⅟C + V*⅟A*U)*V*⅟A + U*C*V*⅟A - U*C*V*⅟A*U*⅟(⅟C + V*⅟A*U)*V*⅟A := by
      simp_rw [add_sub_assoc, add_mul, mul_sub, Matrix.mul_assoc]
    _ = (1 + U*C*V*⅟A) - (U*⅟(⅟C + V*⅟A*U)*V*⅟A + U*C*V*⅟A*U*⅟(⅟C + V*⅟A*U)*V*⅟A) := by
      rw [mul_invOf_self, Matrix.one_mul]
      abel
    _ = 1 + U*C*V*⅟A - (U + U*C*V*⅟A*U)*⅟(⅟C + V*⅟A*U)*V*⅟A := by
      rw [sub_right_inj, Matrix.add_mul, Matrix.add_mul, Matrix.add_mul]
    _ = 1 + U*C*V*⅟A - U*C*(⅟C + V*⅟A*U)*⅟(⅟C + V*⅟A*U)*V*⅟A := by
      congr
      simp only [Matrix.mul_add, Matrix.mul_invOf_cancel_right, ← Matrix.mul_assoc]
    _ = 1 := by
      rw [Matrix.mul_invOf_cancel_right]
      abel