theorem Th14:
  len p = len q & (for k st 1 <= k & k <= len p holds p.k = q.k) implies p = q
proof
  assume that
A1: len p = len q and
A2: for k st 1<=k & k<=len p holds p.k = q.k;
A3: dom p = Seg len p by Def3;
  now
    let x be object;
    assume
A5: x in dom p;
    then reconsider k=x as Nat;
    1 <= k & k <= len p by A3,A5,Th1;
    hence p.x = q.x by A2;
  end;
  hence thesis by A1,A3,Def3;
end;
