reserve L,L1,L2 for Lattice,
  F1,F2 for Filter of L,
  p,q,r,s for Element of L,
  p1,q1,r1,s1 for Element of L1,
  p2,q2,r2,s2 for Element of L2,
  X,x,x1,x2,y,y1,y2 for set,
  D,D1,D2 for non empty set,
  R for Relation,
  RD for Equivalence_Relation of D,
  a,b,d for Element of D,
  a1,b1,c1 for Element of D1,
  a2,b2,c2 for Element of D2,
  B for B_Lattice,
  FB for Filter of B,
  I for I_Lattice,
  FI for Filter of I ,
  i,i1,i2,j,j1,j2,k for Element of I,
  f1,g1 for BinOp of D1,
  f2,g2 for BinOp of D2;
reserve F,G for BinOp of D,RD;

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