reserve
  x, y for object,
  i, n for Nat,
  r, s for Real,
  f1, f2 for n-element real-valued FinSequence;

theorem
  n <> 0 implies max_diff_index(f1,f2) in dom f1
  proof
    set F = abs(f1-f2);
    assume n <> 0;
    then F is non empty;
    then sup rng F in rng F by XXREAL_2:def 6;
    then
A1: F"{sup rng F} <> {} by FUNCT_1:72;
A2: dom f1 = Seg n by FINSEQ_1:89;
A3: dom abs(f1-f2) = Seg n by FINSEQ_1:89;
A4: F"{sup rng F} c= dom F by RELAT_1:132;
    max_diff_index(f1,f2) in F"{sup rng F} by A1;
    hence thesis by A4,A2,A3;
  end;
