
theorem
  for a,b,c,d be positive Real st a + b = c + d holds
  max (a,b) > max (c,d) iff min (a,b) < min (c,d)
  proof
    let a,b,c,d be positive Real such that
    A1: a + b = c + d;
    reconsider k = max (a,b) - max (c,d) as Real;
    A2: k = min (c,d) - min (a,b) by A1,SAD;
    A3: max (a,b) > max (c,d) implies min (a,b) < min (c,d)
    proof
      assume
      max (a,b) > max (c,d); then
      max (a,b) - max (c,d) > max (c,d) - max (c,d) by XREAL_1:9; then
      k + min (a,b) > 0 + min (a,b) by XREAL_1:6;
      hence thesis by A2;
    end;
    max (a,b) <= max (c,d) implies min (a,b) >= min (c,d)
    proof
      assume
      max (a,b) <= max (c,d); then
      max (a,b) - max (c,d) <= max (c,d) - max (c,d) by XREAL_1:9; then
      k + min (a,b) <= 0 + min (a,b) by XREAL_1:6;
      hence thesis by A2;
    end;
    hence thesis by A3;
  end;
