reserve n for Nat;

theorem
  for n be Nat, x1 be Point of REAL-NS n, x2 be Point of
  REAL-US n st x1 = x2 holds ||.x1.||^2 = x2 .|. x2
proof
  let n be Nat, x1 be Point of REAL-NS n, x2 be Point of REAL-US n;
  reconsider x=x1 as Element of REAL n by Def4;
  assume
A1: x1 = x2;
  thus ||.x1.||^2 = |.x.|^2 by Th1
    .= |(x,x)| by EUCLID_2:4
    .= Sum mlt(x,x) by RVSUM_1:def 16
    .= (Euclid_scalar n).(x,x) by Def5
    .= x2 .|. x2 by A1,Def6;
end;
