<<  NCGB.m;
<< NCGuts.m;
<<  NCMakeRelations.m;
<< NCShortCuts.m

NCGuts[
      NCStrongProduct2 -> 
        True]

  
x  =  tp[a] ** a + tp[b] ** b;
SetNonCommutative[a, b, c, d, Pinv[a], Pinv[b], 
        Pinv[x]];

A  =  {{a}, {b}} ;
iA  =  {{c, d}};

  
  
X1  =  MatMult[A, iA, A] -  A
X2  =  MatMult[iA, A, iA]  -  iA 
X3  =  tp[MatMult[A, iA]] - MatMult[A, iA]
X4  =  
      tp[MatMult[iA, A]] - 
        MatMult[iA, A]

relations  =  {-a + a ** c ** a + a ** d ** b, -b + 
            b ** c ** a + 
            b ** d ** b, -c + (c ** a + d ** b) ** 
              c, -d + (c ** a + d ** b) ** d, -a ** c + 
            tp[c] ** tp[a], -a ** d + tp[c] ** tp[b], -b ** c + 
            tp[d] ** tp[a], -b ** d + tp[d] ** tp[b], -c ** a - 
            d ** b + tp[a] ** tp[c] + tp[b] ** tp[d]};

relations2  =  
        NCMakeRelations[{Pinv,  
            tp[a] ** a + tp[b] ** b}];
relations3  =  
        Join[relations, relations2];
relations4  =  
        Transform[ NCAddTranspose[relations3], 
          Tp -> tp];

ClearMonomialOrderAll[];
SetMonomialOrder[ {a, tp[a], b, tp[b], 
        Pinv[ tp[a] ** a + tp[b] ** b], Pinv[tp[ tp[a] ** a + tp[b] ** b]], 
        tp[Pinv[ tp[a] ** a + tp[b] ** b]], 
        tp[Pinv[tp[ tp[a] ** a + tp[b] ** b]]]}, {c, tp[c]}, {d, 
        tp[d]}]

PrintMonomialOrder[];
NCProcess[ relations4, 5, 0, 0, 0, "PseudoInverseOfColumn", 
        SBByCat ->  False,  RR -> False,  
        NCCV  ->  True ];