
theorem
  for f,g,h be Function of NAT,REAL
  st f negligibleEQ g & g negligibleEQ h
  holds f negligibleEQ h
  proof
    let f,g,h be Function of NAT,REAL;
    given v be Function of NAT,REAL such that
    B1: v is negligible
    &
    for x be Nat holds
    |. f.x - g.x .| <= |.v.x.|;
    given w be Function of NAT,REAL such that
    B2: w is negligible
    &
    for x be Nat
    holds |. g.x - h.x .| <= |.w.x.|;
    take u = |.v.| + |.w.|;
    thus u is negligible by B1,B2;
    let x be Nat;
B4: |. f.x - g.x .| <= |.v.x.| by B1;
B5: |. g.x - h.x .| <= |.w.x.| by B2;
    |. f.x - h.x .| = |. (f.x -g.x) + (g.x - h.x) .|;
    then
B6: |. f.x - h.x .| <= |. (f.x -g.x) .|
    + |. (g.x -h.x) .| by COMPLEX1:56;
    |. (f.x -g.x) .| + |. g.x - h.x .|
    <= |.v.x.| + |.w.x.| by B4,B5,XREAL_1:7;
    then
B7: |. f.x - h.x .| <= |.v.x.| + |.w.x.| by B6,XXREAL_0:2;
    x in NAT by ORDINAL1:def 12;then
    consider y be Element of NAT such that LXY: x=y;
    |.v.x.| + |.w.x.| = (|. v .|).x + |.w.x.| by SEQ_1:12
    .= (|. v .|).x + (|. w .|).x by SEQ_1:12
    .= (|. v .|+|. w .|).x by LXY,VALUED_1:1;
    hence |. f.x - h.x .| <= |. u.x .| by B7,ABSVALUE:def 1;
  end;
