function [B0,B1,B2,BH,BT]=cr_skip(A0,A1,A2,AH,AT)
% [B0,B1,B2,BH,BT]=CR_SKIP(A0,A1,A2,AH,AT) computes the matrices obtained 
% after two steps of CR
% A0, A1, A2, AH, AT: matrices
% B0, B1, B2, BH, BT: matrices obtained by applying two steps
% of CR to A0, A1, A2, AH, AT
n = size(A0,1);
Z = zeros(n);
S = [A1,A2,Z;A0,A1,A2;Z,A0,A1];
SI = inv(S);
q = n*2;
m = n*3;
S11 = SI(1:n,1:n);
SMM = SI(q+1:m,q+1:m);
SM1 = SI(q+1:m,1:n);
S1M = SI(1:n,q+1:m);
T1 = A2*S11*A0;
T2 = A0*SMM*A2;
B1 = A1 - T1 - T2;
B0 = -A0*SM1*A0;
B2 = -A2*S1M*A2;
BH = AH - T1;
BT = AT - T2;
