reserve n,m,k for Nat;
reserve a,p,r for Real;
reserve s,s1,s2,s3 for Real_Sequence;

theorem Th2:
  for n being Nat holds |.a.| to_power n = |.a to_power n.|
proof
  let n be Nat;
  per cases;
  suppose
A1: a <> 0;
    then
A2: |.a.| > 0 by COMPLEX1:47;
    now
      per cases by A1;
      suppose a>0;
        then a to_power n = |.a.| to_power n & a to_power n > 0
         by ABSVALUE:def 1,POWER:34;
        hence thesis by ABSVALUE:def 1;
      end;
      suppose
A3:     a < 0;
        reconsider m=n as Integer;
        now
          per cases;
          suppose
A4:         m is even;
A5:         |.a.| to_power n > 0 by A2,POWER:34;
            |.a.| to_power n = (-a) to_power m by A3,ABSVALUE:def 1
              .= a to_power m by A4,POWER:47;
            hence thesis by A5,ABSVALUE:def 1;
          end;
          suppose
A6:         m is odd;
A7:         |.a.| to_power n > 0 by A2,POWER:34;
            |.a.| to_power n = (-a) to_power m by A3,ABSVALUE:def 1
              .= - a to_power m by A6,POWER:48;
            hence |.a.| to_power n = |. - a to_power n.|
             by A7,ABSVALUE:def 1
              .= |. a to_power n.| by COMPLEX1:52;
          end;
        end;
        hence thesis;
      end;
    end;
    hence thesis;
  end;
  suppose
A8: a = 0;
    per cases;
    suppose n = 0;
      then a to_power n = 1 by NEWTON:4;
      hence thesis by A8,COMPLEX1:44,48;
    end;
    suppose n > 0;
      then |.a.| to_power n = 0 by A8,COMPLEX1:44,POWER:def 2;
      hence thesis by A8,COMPLEX1:44;
    end;
  end;
end;
