reserve c, c1, c2, d, d1, d2, e, y for Real,
  k, n, m, N, n1, N0, N1, N2, N3, M for Element of NAT,
  x for set;

theorem
  for f being Real_Sequence st f in Big_Oh(seq_n^(1)) holds
    f(#)f in Big_Oh(seq_n^(2))
proof
  let f be Real_Sequence;
  set h = seq_n^(2);
  set g = seq_n^(1);
  assume f in Big_Oh(g);
  then consider t being Element of Funcs(NAT, REAL) such that
A1: t = f and
A2: ex c,N st c > 0 & for n st n >= N holds t.n <= c*g.n & t.n >= 0;
  consider c, N such that
A3: c > 0 and
A4: for n st n >= N holds t.n <= c*g.n & t.n >= 0 by A2;
  set d = max( c, c*c );
A5: 0 to_power 1 = 0 by POWER:def 2;
A6: now
    take N;
    let n;
    assume
A7: n >= N;
    then
A8: t.n >= 0 by A4;
    for n holds g.n <= h.n
    proof
      let n;
      per cases;
      suppose
A9:     n = 0;
        then g.n = 0 by Def3;
        hence thesis by A9,Def3;
      end;
      suppose
        n > 0;
        then
A10:    n >= 0+1 by NAT_1:13;
        thus g.n <= h.n
        proof
          per cases by A10,XXREAL_0:1;
          suppose
A11:        n = 1;
A12:        (1 to_power 2) = 1 by POWER:26;
            (1 to_power 1) = 1 by POWER:26;
            then g.n = (1 to_power 2) by A11,A12,Def3;
            hence thesis by A11,Def3;
          end;
          suppose
A13:        n > 1;
            then (n to_power 1) < (n to_power 2) by POWER:39;
            then g.n < (n to_power 2) by A13,Def3;
            hence thesis by A13,Def3;
          end;
        end;
      end;
    end;
    then
A14: h.n >= g.n;
    g.n >= 0
    proof
      per cases;
      suppose
        n = 0;
        hence thesis by Def3;
      end;
      suppose
        n > 0;
        then g.n = n to_power 1 by Def3
          .= n by POWER:25;
        hence thesis;
      end;
    end;
    then
A15: (c*c)*h.n <= d*h.n by A14,XREAL_1:64,XXREAL_0:25;
A16: (n to_power 1)*(n to_power 1) = (n to_power (1+1))
    proof
      per cases;
      suppose
        n = 0;
        hence thesis by A5,POWER:def 2;
      end;
      suppose
        n > 0;
        hence thesis by POWER:27;
      end;
    end;
A17: g.n*g.n = h.n
    proof
      per cases;
      suppose
A18:    n = 0;
        hence g.n*g.n = 0*g.n by Def3
          .= h.n by A18,Def3;
      end;
      suppose
A19:    n > 0;
        hence g.n*g.n = (n to_power 1)*g.n by Def3
          .= (n to_power (1+1)) by A16,A19,Def3
          .= h.n by A19,Def3;
      end;
    end;
    t.n <= c*g.n by A4,A7;
    then t.n*t.n <= (c*g.n)*(c*g.n) by A8,Lm20;
    then t.n*t.n <= d*h.n by A17,A15,XXREAL_0:2;
    hence (t(#)t).n <= d*h.n by SEQ_1:8;
    t.n*t.n >= t.n*0 by A8;
    hence (t(#)t).n >= 0 by SEQ_1:8;
  end;
A20: t(#)t is Element of Funcs(NAT, REAL) by FUNCT_2:8;
  d > 0 by A3,XXREAL_0:25;
  hence thesis by A1,A20,A6;
end;
