theorem Th28:
  f1 is_right_distributive_wrt g1 & f2 is_right_distributive_wrt
  g2 iff |:f1,f2:| is_right_distributive_wrt |:g1,g2:|
proof
  thus f1 is_right_distributive_wrt g1 & f2 is_right_distributive_wrt g2
  implies |:f1,f2:| is_right_distributive_wrt |:g1,g2:|
  proof
    defpred P[set,set,set] means |:f1,f2:|.(|:g1,g2:|.($2,$3),$1) = |:g1,g2:|.
    (|:f1,f2:|.($2,$1),|:f1,f2:|.($3,$1));
    assume
A1: for b1,c1,a1 holds f1.(g1.(b1,c1),a1) = g1.(f1.(b1,a1),f1.(c1,a1));
    assume
A2: for b2,c2,a2 holds f2.(g2.(b2,c2),a2) = g2.(f2.(b2,a2),f2.(c2,a2));
A3: now
      let a1,b1,c1, a2,b2,c2;
      |:f1,f2:|.(|:g1,g2:|.([b1,b2],[c1,c2]),[a1,a2]) = |:f1,f2:|.([g1.(b1
      ,c1),g2.(b2,c2)],[a1,a2]) by Th21
        .= [f1.(g1.(b1,c1),a1),f2.(g2.(b2,c2),a2)] by Th21
        .= [g1.(f1.(b1,a1),f1.(c1,a1)),f2.(g2.(b2,c2),a2)] by A1
        .= [g1.(f1.(b1,a1),f1.(c1,a1)),g2.(f2.(b2,a2),f2.(c2,a2))] by A2
        .= |:g1,g2:|.([f1.(b1,a1),f2.(b2,a2)],[f1.(c1,a1),f2.(c2,a2)]) by Th21
        .= |:g1,g2:|.(|:f1,f2:|.([b1,b2],[a1,a2]),[f1.(c1,a1),f2.(c2,a2)])
      by Th21
        .= |:g1,g2:|.(|:f1,f2:|.([b1,b2],[a1,a2]),|:f1,f2:|.([c1,c2],[a1,a2]
      )) by Th21;
      hence P[[a1,a2],[b1,b2],[c1,c2]];
    end;
    for a,b,c being Element of [:D1,D2:] holds P[a,b,c] from AuxCart3( A3);
    then for b,c,a being Element of [:D1,D2:] holds P[a,b,c];
    hence thesis;
  end;
  assume
A4: for b,c,a being Element of [:D1,D2:] holds |:f1,f2:|.(|:g1,g2:|.(b,c
  ),a) = |:g1,g2:|.(|:f1,f2:|.(b,a),|:f1,f2:|.(c,a));
A5: now
    let a1,b1,c1, a2,b2,c2;
    thus [f1.(g1.(b1,c1),a1),f2.(g2.(b2,c2),a2)] = |:f1,f2:|.([g1.(b1,c1),g2.(
    b2,c2)],[a1,a2]) by Th21
      .= |:f1,f2:|.(|:g1,g2:|.([b1,b2],[c1,c2]),[a1,a2]) by Th21
      .= |:g1,g2:|.(|:f1,f2:|.([b1,b2],[a1,a2]),|:f1,f2:|.([c1,c2],[a1,a2]))
    by A4
      .= |:g1,g2:|.([f1.(b1,a1),f2.(b2,a2)],|:f1,f2:|.([c1,c2],[a1,a2])) by
Th21
      .= |:g1,g2:|.([f1.(b1,a1),f2.(b2,a2)],[f1.(c1,a1),f2.(c2,a2)]) by Th21
      .= [g1.(f1.(b1,a1),f1.(c1,a1)),g2.(f2.(b2,a2),f2.(c2,a2))] by Th21;
  end;
  thus for b1,c1,a1 holds f1.(g1.(b1,c1),a1) = g1.(f1.(b1,a1),f1.(c1,a1))
  proof
    set a2 = the Element of D2;
    let b1,c1,a1;
    [f1.(g1.(b1,c1),a1),f2.(g2.(a2,a2),a2)] = [g1.(f1.(b1,a1),f1.(c1,a1)),
    g2.(f2.(a2,a2),f2.(a2,a2))] by A5;
    hence thesis by XTUPLE_0:1;
  end;
  set a1 = the Element of D1;
  let b2,c2,a2;
  [f1.(g1.(a1,a1),a1),f2.(g2.(b2,c2),a2)] = [g1.(f1.(a1,a1),f1.(a1,a1)),
  g2.(f2.(b2,a2),f2.(c2,a2))] by A5;
  hence thesis by XTUPLE_0:1;
end;
