 reserve n,s for Nat;

theorem Th34:
  for s being non zero Nat,
      x being non zero s-gonal number st s >= 4 holds
    IndexPoly (s,x) in NAT
  proof
    let s be non zero Nat,
        x be non zero s-gonal number;
    assume
A1: s >= 4;
    consider n being Nat such that
A2: x = Polygon (s,n) by Def4;
A3: ((8*s - 16) * x) + (s - 4) ^2 = (2 * n * (s - 2) - (s - 4)) ^2 by A2;
A4: s - 2 <> 0 by A1;
    n <> 0 by A2; then
A5: 2 * n >= 1 by Th1;
    s >= 0 + 4 by A1; then
A6: s - 4 >= 0 by XREAL_1:19;
    s - 2 >= s - 4 by XREAL_1:13; then
A7: 2 * n * (s - 2) >= 0 + 1 * (s - 4) by A5,A6,XREAL_1:66;
    IndexPoly (s,x) = ((2 * n * (s - 2) - (s - 4)) + s - 4) / (2 * s - 4)
          by SQUARE_1:22,A7,A3,XREAL_1:19
       .= (2 * n * (s - 2)) / (2 * (s - 2))
       .= (2 * n) / 2 by A4,XCMPLX_1:91
       .= n;
    hence thesis by ORDINAL1:def 12;
  end;
