reserve a,b,c,k,m,n for Nat;
reserve i,j for Integer;
reserve p for Prime;

theorem Th50:
  for n,x,y,z,t being positive Nat holds
  n|^x + n|^y + n|^z = n|^t iff
  n = 2 & y = x & z = x+1 & t = x+2 or
  n = 2 & y = x+1 & z = x & t = x+2 or
  n = 2 & z = y & x = y+1 & t = y+2 or
  n = 3 & y = x & z = x & t = x+1
  proof
    let n,x,y,z,t be positive Nat;
A1: n|^x + n|^y + n|^z = n|^z + n|^y + n|^x;
A2: n|^x + n|^y + n|^z = n|^x + n|^z + n|^y;
A3: n|^x + n|^y + n|^z = n|^y + n|^z + n|^x;
A4: n|^x + n|^y + n|^z = n|^z + n|^x + n|^y;
    thus n|^x + n|^y + n|^z = n|^t implies
    n = 2 & y = x & z = x+1 & t = x+2 or
    n = 2 & y = x+1 & z = x & t = x+2 or
    n = 2 & z = y & x = y+1 & t = y+2 or
    n = 3 & y = x & z = x & t = x+1
    proof
      assume
A5:   n|^x + n|^y + n|^z = n|^t;
      per cases;
      suppose x <= y <= z;
        hence thesis by A5,Th49;
      end;
      suppose x <= z <= y;
        hence thesis by A2,A5,Th49;
      end;
      suppose y <= x <= z;
        then n = 2 & y = x & z = y+1 & t = y+2 or
        n = 3 & y = x & z = y & t = y+1 by A5,Th49;
        hence thesis;
      end;
      suppose y <= z <= x;
        then n = 2 & z = y & x = y+1 & t = y+2 or
        n = 3 & z = y & x = y & t = y+1 by A3,A5,Th49;
        hence thesis;
      end;
      suppose z <= x <= y;
        then n = 2 & x = z & y = z+1 & t = z+2 or
        n = 3 & x = z & y = z & t = z+1 by A4,A5,Th49;
        hence thesis;
      end;
      suppose z <= y <= x;
        then n = 2 & y = z & x = z+1 & t = z+2 or
        n = 3 & y = z & z = x & t = z+1 by A1,A5,Th49;
        hence thesis;
      end;
    end;
A6: x+0 <= x+1 by XREAL_1:6;
A7: y+0 <= y+1 by XREAL_1:6;
    assume n = 2 & y = x & z = x+1 & t = x+2 or
    n = 2 & y = x+1 & z = x & t = x+2 or
    n = 2 & z = y & x = y+1 & t = y+2 or
    n = 3 & y = x & z = x & t = x+1;
    then per cases;
    suppose n = 2 & y = x & z = x+1 & t = x+2;
      hence thesis by A6,Th49;
    end;
    suppose n = 2 & y = x+1 & z = x & t = x+2;
      hence thesis by A2,A6,Th49;
    end;
    suppose n = 2 & z = y & x = y+1 & t = y+2;
      hence thesis by A1,A7,Th49;
    end;
    suppose n = 3 & y = x & z = x & t = x+1;
      hence thesis by Th49;
    end;
  end;
