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

theorem Th5:
  abs(f1-f2).x <= abs(f1-f2).max_diff_index(f1,f2)
  proof
    set F = abs(f1-f2);
A1: dom F = dom(f1-f2) by VALUED_1:def 11
    .= dom f1 /\ dom f2 by VALUED_1:12;
    set m = max_diff_index(f1,f2);
A2: dom f1 = Seg n & dom f2 = Seg n by FINSEQ_1:89;
    per cases;
    suppose x in dom f1;
      then
A3:   F.x in rng F by A2,A1,FUNCT_1:def 3;
      then sup rng F in rng F by XXREAL_2:def 6;
      then
      F"{sup rng F} <> {} by FUNCT_1:72;
      then F.m in {sup rng F} by FUNCT_1:def 7;
      then F.m = sup rng F by TARSKI:def 1;
      hence thesis by A3,XXREAL_2:4;
    end;
    suppose not x in dom f1;
      then
A4:   not x in dom F by A1,XBOOLE_0:def 4;
      F.m = |.(f1-f2).m.| by VALUED_1:18;
      hence thesis by A4,FUNCT_1:def 2;
    end;
  end;
