reserve G for Abelian add-associative right_complementable right_zeroed
  non empty addLoopStr;
reserve GS for non empty addLoopStr;
reserve F for Field;
reserve F for Field,
  n for Nat,
  D for non empty set,
  d for Element of D,
  B for BinOp of D,
  C for UnOp of D;
reserve x,y for set;
reserve D for non empty set,
  H,G for BinOp of D,
  d for Element of D,
  t1,t2 for Element of n-tuples_on D;
reserve x,y,z for set,
  A for AbGroup;
reserve a for Domain-Sequence,
  i for Element of dom a,
  p for FinSequence;
reserve i for Element of dom a;

theorem Th18:
  for b being BinOps of a st for i holds b.i is associative holds
  [:b:] is associative
proof
  let b be BinOps of a such that
A1: for i holds b.i is associative;
  let x,y,z be Element of product a;
A2: now
    set xy = [:b:].(x,y), yz = [:b:].(y,z);
    let v be object;
    assume v in dom a;
    then reconsider i = v as Element of dom a;
A3: [:b:].(y,z).i = (b.i).(y.i,z.i) & [:b:].(x,yz).i = (b.i).(x.i,yz.i) by Def8
;
A4: [:b:].(xy,z).i = (b.i).(xy.i,z.i) by Def8;
    b.i is associative & [:b:].(x,y).i = (b.i).(x.i,y.i) by A1,Def8;
    hence [:b:].(x,[:b:].(y,z)).v = [:b:].([:b:].(x,y),z).v by A3,A4;
  end;
  dom ([:b:].(x,[:b:].(y,z))) = dom a &
  dom ([:b:].([:b:].(x,y),z)) = dom a by CARD_3:9;
  hence thesis by A2,FUNCT_1:2;
end;
