Article RFUNCT_3, MML version 4.99.1005

:: RFUNCT_3:funcnot 1 => RFUNCT_3:func 1
definition
  let a1, a2 be Element of NAT;
  redefine func min(a1,a2) -> Element of NAT;
  commutativity;
::  for a1, a2 being Element of NAT holds
::  min(a1,a2) = min(a2,a1);
  idempotence;
::  for a1 being Element of NAT holds
::     min(a1,a1) = a1;
end;

:: RFUNCT_3:funcnot 2 => RFUNCT_3:func 2
definition
  let a1 be real set;
  func max+ A1 -> Element of REAL equals
    max(a1,0);
end;

:: RFUNCT_3:def 1
theorem
for b1 being real set holds
   max+ b1 = max(b1,0);

:: RFUNCT_3:funcnot 3 => RFUNCT_3:func 3
definition
  let a1 be real set;
  func max- A1 -> Element of REAL equals
    max(- a1,0);
end;

:: RFUNCT_3:def 2
theorem
for b1 being real set holds
   max- b1 = max(- b1,0);

:: RFUNCT_3:th 1
theorem
for b1 being real set holds
   b1 = (max+ b1) - max- b1;

:: RFUNCT_3:th 2
theorem
for b1 being real set holds
   abs b1 = (max+ b1) + max- b1;

:: RFUNCT_3:th 3
theorem
for b1 being real set holds
   2 * max+ b1 = b1 + abs b1;

:: RFUNCT_3:th 4
theorem
for b1, b2 being real set
      st 0 <= b1
   holds max+ (b1 * b2) = b1 * max+ b2;

:: RFUNCT_3:th 5
theorem
for b1, b2 being real set holds
max+ (b1 + b2) <= (max+ b1) + max+ b2;

:: RFUNCT_3:th 8
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3, b4 being real set
      st b3 <> 0
   holds b2 " {b4 / b3} = (b3 (#) b2) " {b4};

:: RFUNCT_3:th 9
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL holds
   (0 (#) b2) " {0} = dom b2;

:: RFUNCT_3:th 10
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of REAL
      st 0 < b3
   holds (abs b2) " {b3} = b2 " {- b3,b3};

:: RFUNCT_3:th 11
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL holds
   (abs b2) " {0} = b2 " {0};

:: RFUNCT_3:th 12
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of REAL
      st b3 < 0
   holds (abs b2) " {b3} = {};

:: RFUNCT_3:th 13
theorem
for b1, b2 being non empty set
for b3 being Function-like Relation of b1,REAL
for b4 being Function-like Relation of b2,REAL
for b5 being Element of REAL
      st b5 <> 0
   holds    b3,b4 are_fiberwise_equipotent
   iff
      b5 (#) b3,b5 (#) b4 are_fiberwise_equipotent;

:: RFUNCT_3:th 14
theorem
for b1, b2 being non empty set
for b3 being Function-like Relation of b1,REAL
for b4 being Function-like Relation of b2,REAL holds
      b3,b4 are_fiberwise_equipotent
   iff
      - b3,- b4 are_fiberwise_equipotent;

:: RFUNCT_3:th 15
theorem
for b1, b2 being non empty set
for b3 being Function-like Relation of b1,REAL
for b4 being Function-like Relation of b2,REAL
      st b3,b4 are_fiberwise_equipotent
   holds abs b3,abs b4 are_fiberwise_equipotent;

:: RFUNCT_3:modenot 1 => RFUNCT_3:mode 1
definition
  let a1, a2 be set;
  mode PartFunc-set of A1,A2 means
    for b1 being Element of it holds
       b1 is Function-like Relation of a1,a2;
end;

:: RFUNCT_3:dfs 3
definiens
  let a1, a2, a3 be set;
To prove
     a3 is PartFunc-set of a1,a2
it is sufficient to prove
  thus for b1 being Element of a3 holds
       b1 is Function-like Relation of a1,a2;

:: RFUNCT_3:def 3
theorem
for b1, b2, b3 being set holds
   b3 is PartFunc-set of b1,b2
iff
   for b4 being Element of b3 holds
      b4 is Function-like Relation of b1,b2;

:: RFUNCT_3:exreg 1
registration
  let a1, a2 be set;
  cluster non empty PartFunc-set of a1,a2;
end;

:: RFUNCT_3:modenot 2
definition
  let a1, a2 be set;
  mode PFUNC_DOMAIN of a1,a2 is non empty PartFunc-set of a1,a2;
end;

:: RFUNCT_3:funcnot 4 => RFUNCT_3:func 4
definition
  let a1, a2 be set;
  redefine func PFuncs(a1,a2) -> PartFunc-set of a1,a2;
end;

:: RFUNCT_3:modenot 3 => RFUNCT_3:mode 2
definition
  let a1, a2 be set;
  let a3 be non empty PartFunc-set of a1,a2;
  redefine mode Element of a3 -> Function-like Relation of a1,a2;
end;

:: RFUNCT_3:funcnot 5 => RFUNCT_3:func 5
definition
  let a1, a2 be non empty set;
  let a3 be Element of bool a1;
  let a4 be Element of a2;
  redefine func a3 --> a4 -> Element of PFuncs(a1,a2);
end;

:: RFUNCT_3:funcnot 6 => RFUNCT_3:func 6
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3, a4 be Element of PFuncs(a1,a2);
  redefine func a3 + a4 -> Element of PFuncs(a1,REAL);
  commutativity;
::  for a1 being non empty set
::  for a2 being real-membered set
::  for a3, a4 being Element of PFuncs(a1,a2) holds
::  a3 + a4 = a4 + a3;
end;

:: RFUNCT_3:funcnot 7 => RFUNCT_3:func 7
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3, a4 be Element of PFuncs(a1,a2);
  redefine func a3 - a4 -> Element of PFuncs(a1,REAL);
end;

:: RFUNCT_3:funcnot 8 => RFUNCT_3:func 8
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3, a4 be Element of PFuncs(a1,a2);
  redefine func a3 (#) a4 -> Element of PFuncs(a1,REAL);
  commutativity;
::  for a1 being non empty set
::  for a2 being real-membered set
::  for a3, a4 being Element of PFuncs(a1,a2) holds
::  a3 (#) a4 = a4 (#) a3;
end;

:: RFUNCT_3:funcnot 9 => RFUNCT_3:func 9
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3, a4 be Element of PFuncs(a1,a2);
  redefine func a3 / a4 -> Element of PFuncs(a1,REAL);
end;

:: RFUNCT_3:funcnot 10 => RFUNCT_3:func 10
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3 be Element of PFuncs(a1,a2);
  redefine func abs a3 -> Element of PFuncs(a1,REAL);
  projectivity;
::  for a1 being non empty set
::  for a2 being real-membered set
::  for a3 being Element of PFuncs(a1,a2) holds
::     abs abs a3 = abs a3;
end;

:: RFUNCT_3:funcnot 11 => RFUNCT_3:func 11
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3 be Element of PFuncs(a1,a2);
  redefine func - a3 -> Element of PFuncs(a1,REAL);
  involutiveness;
::  for a1 being non empty set
::  for a2 being real-membered set
::  for a3 being Element of PFuncs(a1,a2) holds
::     - - a3 = a3;
end;

:: RFUNCT_3:funcnot 12 => RFUNCT_3:func 12
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3 be Element of PFuncs(a1,a2);
  redefine func a3 ^ -> Element of PFuncs(a1,REAL);
end;

:: RFUNCT_3:funcnot 13 => RFUNCT_3:func 13
definition
  let a1 be non empty set;
  let a2 be real-membered set;
  let a3 be Element of PFuncs(a1,a2);
  let a4 be real set;
  redefine func a4 (#) a3 -> Element of PFuncs(a1,REAL);
end;

:: RFUNCT_3:funcnot 14 => RFUNCT_3:func 14
definition
  let a1 be non empty set;
  func addpfunc A1 -> Function-like quasi_total Relation of [:PFuncs(a1,REAL),PFuncs(a1,REAL):],PFuncs(a1,REAL) means
    for b1, b2 being Element of PFuncs(a1,REAL) holds
    it .(b1,b2) = b1 + b2;
end;

:: RFUNCT_3:def 4
theorem
for b1 being non empty set
for b2 being Function-like quasi_total Relation of [:PFuncs(b1,REAL),PFuncs(b1,REAL):],PFuncs(b1,REAL) holds
      b2 = addpfunc b1
   iff
      for b3, b4 being Element of PFuncs(b1,REAL) holds
      b2 .(b3,b4) = b3 + b4;

:: RFUNCT_3:th 16
theorem
for b1 being non empty set holds
   addpfunc b1 is commutative(PFuncs(b1,REAL));

:: RFUNCT_3:th 17
theorem
for b1 being non empty set holds
   addpfunc b1 is associative(PFuncs(b1,REAL));

:: RFUNCT_3:th 18
theorem
for b1 being non empty set holds
   ([#] b1) --> 0 is_a_unity_wrt addpfunc b1;

:: RFUNCT_3:th 19
theorem
for b1 being non empty set holds
   the_unity_wrt addpfunc b1 = ([#] b1) --> 0;

:: RFUNCT_3:th 20
theorem
for b1 being non empty set holds
   addpfunc b1 is having_a_unity(PFuncs(b1,REAL));

:: RFUNCT_3:funcnot 15 => RFUNCT_3:func 15
definition
  let a1 be non empty set;
  let a2 be FinSequence of PFuncs(a1,REAL);
  func Sum A2 -> Element of PFuncs(a1,REAL) equals
    (addpfunc a1) "**" a2;
end;

:: RFUNCT_3:def 5
theorem
for b1 being non empty set
for b2 being FinSequence of PFuncs(b1,REAL) holds
   Sum b2 = (addpfunc b1) "**" b2;

:: RFUNCT_3:th 21
theorem
for b1 being non empty set holds
   Sum <*> PFuncs(b1,REAL) = ([#] b1) --> 0;

:: RFUNCT_3:th 23
theorem
for b1 being non empty set
for b2 being FinSequence of PFuncs(b1,REAL)
for b3 being Element of PFuncs(b1,REAL) holds
   Sum (b2 ^ <*b3*>) = (Sum b2) + b3;

:: RFUNCT_3:th 24
theorem
for b1 being non empty set
for b2, b3 being FinSequence of PFuncs(b1,REAL) holds
Sum (b2 ^ b3) = (Sum b2) + Sum b3;

:: RFUNCT_3:th 25
theorem
for b1 being non empty set
for b2 being FinSequence of PFuncs(b1,REAL)
for b3 being Element of PFuncs(b1,REAL) holds
   Sum (<*b3*> ^ b2) = b3 + Sum b2;

:: RFUNCT_3:th 26
theorem
for b1 being non empty set
for b2, b3 being Element of PFuncs(b1,REAL) holds
Sum <*b2,b3*> = b2 + b3;

:: RFUNCT_3:th 27
theorem
for b1 being non empty set
for b2, b3, b4 being Element of PFuncs(b1,REAL) holds
Sum <*b2,b3,b4*> = (b2 + b3) + b4;

:: RFUNCT_3:th 28
theorem
for b1 being non empty set
for b2, b3 being FinSequence of PFuncs(b1,REAL)
      st b2,b3 are_fiberwise_equipotent
   holds Sum b2 = Sum b3;

:: RFUNCT_3:funcnot 16 => RFUNCT_3:func 16
definition
  let a1 be non empty set;
  let a2 be Relation-like Function-like FinSequence-like set;
  func CHI(A2,A1) -> FinSequence of PFuncs(a1,REAL) means
    len it = len a2 &
     (for b1 being Element of NAT
           st b1 in dom it
        holds it . b1 = chi(a2 . b1,a1));
end;

:: RFUNCT_3:def 6
theorem
for b1 being non empty set
for b2 being Relation-like Function-like FinSequence-like set
for b3 being FinSequence of PFuncs(b1,REAL) holds
      b3 = CHI(b2,b1)
   iff
      len b3 = len b2 &
       (for b4 being Element of NAT
             st b4 in dom b3
          holds b3 . b4 = chi(b2 . b4,b1));

:: RFUNCT_3:funcnot 17 => RFUNCT_3:func 17
definition
  let a1 be non empty set;
  let a2 be FinSequence of PFuncs(a1,REAL);
  let a3 be FinSequence of REAL;
  func A3 (#) A2 -> FinSequence of PFuncs(a1,REAL) means
    len it = min(len a3,len a2) &
     (for b1 being Element of NAT
        st b1 in dom it
     for b2 being Function-like Relation of a1,REAL
     for b3 being Element of REAL
           st b3 = a3 . b1 & b2 = a2 . b1
        holds it . b1 = b3 (#) b2);
end;

:: RFUNCT_3:def 7
theorem
for b1 being non empty set
for b2 being FinSequence of PFuncs(b1,REAL)
for b3 being FinSequence of REAL
for b4 being FinSequence of PFuncs(b1,REAL) holds
      b4 = b3 (#) b2
   iff
      len b4 = min(len b3,len b2) &
       (for b5 being Element of NAT
          st b5 in dom b4
       for b6 being Function-like Relation of b1,REAL
       for b7 being Element of REAL
             st b7 = b3 . b5 & b6 = b2 . b5
          holds b4 . b5 = b7 (#) b6);

:: RFUNCT_3:funcnot 18 => RFUNCT_3:func 18
definition
  let a1 be non empty set;
  let a2 be FinSequence of PFuncs(a1,REAL);
  let a3 be Element of a1;
  func A2 # A3 -> FinSequence of REAL means
    len it = len a2 &
     (for b1 being Element of NAT
     for b2 being Element of PFuncs(a1,REAL)
           st b1 in dom it & a2 . b1 = b2
        holds it . b1 = b2 . a3);
end;

:: RFUNCT_3:def 8
theorem
for b1 being non empty set
for b2 being FinSequence of PFuncs(b1,REAL)
for b3 being Element of b1
for b4 being FinSequence of REAL holds
      b4 = b2 # b3
   iff
      len b4 = len b2 &
       (for b5 being Element of NAT
       for b6 being Element of PFuncs(b1,REAL)
             st b5 in dom b4 & b2 . b5 = b6
          holds b4 . b5 = b6 . b3);

:: RFUNCT_3:prednot 1 => RFUNCT_3:pred 1
definition
  let a1, a2 be non empty set;
  let a3 be FinSequence of PFuncs(a1,a2);
  let a4 be Element of a1;
  pred A4 is_common_for_dom A3 means
    for b1 being Element of PFuncs(a1,a2)
    for b2 being Element of NAT
          st b2 in dom a3 & a3 . b2 = b1
       holds a4 in dom b1;
end;

:: RFUNCT_3:dfs 9
definiens
  let a1, a2 be non empty set;
  let a3 be FinSequence of PFuncs(a1,a2);
  let a4 be Element of a1;
To prove
     a4 is_common_for_dom a3
it is sufficient to prove
  thus for b1 being Element of PFuncs(a1,a2)
    for b2 being Element of NAT
          st b2 in dom a3 & a3 . b2 = b1
       holds a4 in dom b1;

:: RFUNCT_3:def 9
theorem
for b1, b2 being non empty set
for b3 being FinSequence of PFuncs(b1,b2)
for b4 being Element of b1 holds
      b4 is_common_for_dom b3
   iff
      for b5 being Element of PFuncs(b1,b2)
      for b6 being Element of NAT
            st b6 in dom b3 & b3 . b6 = b5
         holds b4 in dom b5;

:: RFUNCT_3:th 29
theorem
for b1, b2 being non empty set
for b3 being FinSequence of PFuncs(b1,b2)
for b4 being Element of b1
for b5 being Element of NAT
      st b4 is_common_for_dom b3 & b5 <> 0
   holds b4 is_common_for_dom b3 | b5;

:: RFUNCT_3:th 30
theorem
for b1, b2 being non empty set
for b3 being FinSequence of PFuncs(b1,b2)
for b4 being Element of b1
for b5 being Element of NAT
      st b4 is_common_for_dom b3
   holds b4 is_common_for_dom b3 /^ b5;

:: RFUNCT_3:th 31
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of PFuncs(b1,REAL)
      st len b3 <> 0
   holds    b2 is_common_for_dom b3
   iff
      b2 in dom Sum b3;

:: RFUNCT_3:th 32
theorem
for b1 being non empty set
for b2 being FinSequence of PFuncs(b1,REAL)
for b3 being Element of b1
for b4 being Element of NAT holds
   (b2 | b4) # b3 = (b2 # b3) | b4;

:: RFUNCT_3:th 33
theorem
for b1 being non empty set
for b2 being Relation-like Function-like FinSequence-like set
for b3 being Element of b1 holds
   b3 is_common_for_dom CHI(b2,b1);

:: RFUNCT_3:th 34
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of PFuncs(b1,REAL)
for b4 being FinSequence of REAL
      st b2 is_common_for_dom b3
   holds b2 is_common_for_dom b4 (#) b3;

:: RFUNCT_3:th 35
theorem
for b1 being non empty set
for b2 being Relation-like Function-like FinSequence-like set
for b3 being FinSequence of REAL
for b4 being Element of b1 holds
   b4 is_common_for_dom b3 (#) CHI(b2,b1);

:: RFUNCT_3:th 36
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of PFuncs(b1,REAL)
      st b2 is_common_for_dom b3
   holds (Sum b3) . b2 = Sum (b3 # b2);

:: RFUNCT_3:funcnot 19 => RFUNCT_3:func 19
definition
  let a1 be non empty set;
  let a2 be Function-like Relation of a1,REAL;
  func max+ A2 -> Function-like Relation of a1,REAL means
    dom it = dom a2 &
     (for b1 being Element of a1
           st b1 in dom it
        holds it . b1 = max+ (a2 . b1));
end;

:: RFUNCT_3:def 10
theorem
for b1 being non empty set
for b2, b3 being Function-like Relation of b1,REAL holds
   b3 = max+ b2
iff
   dom b3 = dom b2 &
    (for b4 being Element of b1
          st b4 in dom b3
       holds b3 . b4 = max+ (b2 . b4));

:: RFUNCT_3:funcnot 20 => RFUNCT_3:func 20
definition
  let a1 be non empty set;
  let a2 be Function-like Relation of a1,REAL;
  func max- A2 -> Function-like Relation of a1,REAL means
    dom it = dom a2 &
     (for b1 being Element of a1
           st b1 in dom it
        holds it . b1 = max- (a2 . b1));
end;

:: RFUNCT_3:def 11
theorem
for b1 being non empty set
for b2, b3 being Function-like Relation of b1,REAL holds
   b3 = max- b2
iff
   dom b3 = dom b2 &
    (for b4 being Element of b1
          st b4 in dom b3
       holds b3 . b4 = max- (b2 . b4));

:: RFUNCT_3:th 37
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL holds
   b2 = (max+ b2) - max- b2 &
    abs b2 = (max+ b2) + max- b2 &
    2 (#) max+ b2 = b2 + abs b2;

:: RFUNCT_3:th 38
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of REAL
      st 0 < b3
   holds b2 " {b3} = (max+ b2) " {b3};

:: RFUNCT_3:th 39
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL holds
   b2 " left_closed_halfline 0 = (max+ b2) " {0};

:: RFUNCT_3:th 40
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of b1 holds
   0 <= (max+ b2) . b3;

:: RFUNCT_3:th 41
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of REAL
      st 0 < b3
   holds b2 " {- b3} = (max- b2) " {b3};

:: RFUNCT_3:th 42
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL holds
   b2 " right_closed_halfline 0 = (max- b2) " {0};

:: RFUNCT_3:th 43
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of b1 holds
   0 <= (max- b2) . b3;

:: RFUNCT_3:th 44
theorem
for b1, b2 being non empty set
for b3 being Function-like Relation of b1,REAL
for b4 being Function-like Relation of b2,REAL
      st b3,b4 are_fiberwise_equipotent
   holds max+ b3,max+ b4 are_fiberwise_equipotent;

:: RFUNCT_3:th 45
theorem
for b1, b2 being non empty set
for b3 being Function-like Relation of b1,REAL
for b4 being Function-like Relation of b2,REAL
      st b3,b4 are_fiberwise_equipotent
   holds max- b3,max- b4 are_fiberwise_equipotent;

:: RFUNCT_3:exreg 2
registration
  let a1, a2 be set;
  cluster Relation-like Function-like finite Relation of a1,a2;
end;

:: RFUNCT_3:funcreg 1
registration
  let a1 be non empty set;
  let a2 be Function-like finite Relation of a1,REAL;
  cluster max+ a2 -> Function-like finite;
end;

:: RFUNCT_3:funcreg 2
registration
  let a1 be non empty set;
  let a2 be Function-like finite Relation of a1,REAL;
  cluster max- a2 -> Function-like finite;
end;

:: RFUNCT_3:th 46
theorem
for b1, b2 being non empty set
for b3 being Function-like finite Relation of b1,REAL
for b4 being Function-like finite Relation of b2,REAL
      st max+ b3,max+ b4 are_fiberwise_equipotent & max- b3,max- b4 are_fiberwise_equipotent
   holds b3,b4 are_fiberwise_equipotent;

:: RFUNCT_3:th 47
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set holds
   (max+ b2) | b3 = max+ (b2 | b3);

:: RFUNCT_3:th 48
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set holds
   (max- b2) | b3 = max- (b2 | b3);

:: RFUNCT_3:th 49
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
      st for b3 being Element of b1
              st b3 in dom b2
           holds 0 <= b2 . b3
   holds max+ b2 = b2;

:: RFUNCT_3:th 50
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
      st for b3 being Element of b1
              st b3 in dom b2
           holds b2 . b3 <= 0
   holds max- b2 = - b2;

:: RFUNCT_3:th 51
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL holds
   b2 - 0 = b2;

:: RFUNCT_3:th 52
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of REAL
for b4 being set holds
   (b2 | b4) - b3 = (b2 - b3) | b4;

:: RFUNCT_3:th 53
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3, b4 being Element of REAL holds
b2 " {b4 + b3} = (b2 - b3) " {b4};

:: RFUNCT_3:th 54
theorem
for b1, b2 being non empty set
for b3 being Function-like Relation of b1,REAL
for b4 being Function-like Relation of b2,REAL
for b5 being Element of REAL holds
      b3,b4 are_fiberwise_equipotent
   iff
      b3 - b5,b4 - b5 are_fiberwise_equipotent;

:: RFUNCT_3:prednot 2 => RFUNCT_3:pred 2
definition
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be set;
  pred A1 is_convex_on A2 means
    a2 c= dom a1 &
     (for b1 being Element of REAL
        st 0 <= b1 & b1 <= 1
     for b2, b3 being Element of REAL
           st b2 in a2 &
              b3 in a2 &
              (b1 * b2) + ((1 - b1) * b3) in a2
        holds a1 . ((b1 * b2) + ((1 - b1) * b3)) <= (b1 * (a1 . b2)) + ((1 - b1) * (a1 . b3)));
end;

:: RFUNCT_3:dfs 12
definiens
  let a1 be Function-like Relation of REAL,REAL;
  let a2 be set;
To prove
     a1 is_convex_on a2
it is sufficient to prove
  thus a2 c= dom a1 &
     (for b1 being Element of REAL
        st 0 <= b1 & b1 <= 1
     for b2, b3 being Element of REAL
           st b2 in a2 &
              b3 in a2 &
              (b1 * b2) + ((1 - b1) * b3) in a2
        holds a1 . ((b1 * b2) + ((1 - b1) * b3)) <= (b1 * (a1 . b2)) + ((1 - b1) * (a1 . b3)));

:: RFUNCT_3:def 13
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being set holds
      b1 is_convex_on b2
   iff
      b2 c= dom b1 &
       (for b3 being Element of REAL
          st 0 <= b3 & b3 <= 1
       for b4, b5 being Element of REAL
             st b4 in b2 &
                b5 in b2 &
                (b3 * b4) + ((1 - b3) * b5) in b2
          holds b1 . ((b3 * b4) + ((1 - b3) * b5)) <= (b3 * (b1 . b4)) + ((1 - b3) * (b1 . b5)));

:: RFUNCT_3:th 55
theorem
for b1, b2 being Element of REAL
for b3 being Function-like Relation of REAL,REAL holds
      b3 is_convex_on [.b1,b2.]
   iff
      [.b1,b2.] c= dom b3 &
       (for b4 being Element of REAL
          st 0 <= b4 & b4 <= 1
       for b5, b6 being Element of REAL
             st b5 in [.b1,b2.] & b6 in [.b1,b2.]
          holds b3 . ((b4 * b5) + ((1 - b4) * b6)) <= (b4 * (b3 . b5)) + ((1 - b4) * (b3 . b6)));

:: RFUNCT_3:th 56
theorem
for b1, b2 being Element of REAL
for b3 being Function-like Relation of REAL,REAL holds
      b3 is_convex_on [.b1,b2.]
   iff
      [.b1,b2.] c= dom b3 &
       (for b4, b5, b6 being Element of REAL
             st b4 in [.b1,b2.] & b5 in [.b1,b2.] & b6 in [.b1,b2.] & b4 < b5 & b5 < b6
          holds ((b3 . b4) - (b3 . b5)) / (b4 - b5) <= ((b3 . b5) - (b3 . b6)) / (b5 - b6));

:: RFUNCT_3:th 57
theorem
for b1 being Function-like Relation of REAL,REAL
for b2, b3 being set
      st b1 is_convex_on b2 & b3 c= b2
   holds b1 is_convex_on b3;

:: RFUNCT_3:th 58
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being set
for b3 being Element of REAL holds
      b1 is_convex_on b2
   iff
      b1 - b3 is_convex_on b2;

:: RFUNCT_3:th 59
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being set
for b3 being Element of REAL
      st 0 < b3
   holds    b1 is_convex_on b2
   iff
      b3 (#) b1 is_convex_on b2;

:: RFUNCT_3:th 60
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being set
      st b2 c= dom b1
   holds 0 (#) b1 is_convex_on b2;

:: RFUNCT_3:th 61
theorem
for b1, b2 being Function-like Relation of REAL,REAL
for b3 being set
      st b1 is_convex_on b3 & b2 is_convex_on b3
   holds b1 + b2 is_convex_on b3;

:: RFUNCT_3:th 62
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being set
for b3 being Element of REAL
      st b1 is_convex_on b2
   holds max+ (b1 - b3) is_convex_on b2;

:: RFUNCT_3:th 63
theorem
for b1 being Function-like Relation of REAL,REAL
for b2 being set
      st b1 is_convex_on b2
   holds max+ b1 is_convex_on b2;

:: RFUNCT_3:th 64
theorem
id [#] REAL is_convex_on REAL;

:: RFUNCT_3:th 65
theorem
for b1 being Element of REAL holds
   max+ ((id [#] REAL) - b1) is_convex_on REAL;

:: RFUNCT_3:funcnot 21 => RFUNCT_3:func 21
definition
  let a1 be non empty set;
  let a2 be Function-like Relation of a1,REAL;
  let a3 be set;
  assume dom (a2 | a3) is finite;
  func FinS(A2,A3) -> non-increasing FinSequence of REAL means
    a2 | a3,it are_fiberwise_equipotent;
end;

:: RFUNCT_3:def 14
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
   st dom (b2 | b3) is finite
for b4 being non-increasing FinSequence of REAL holds
      b4 = FinS(b2,b3)
   iff
      b2 | b3,b4 are_fiberwise_equipotent;

:: RFUNCT_3:th 66
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
      st dom (b2 | b3) is finite
   holds FinS(b2,dom (b2 | b3)) = FinS(b2,b3);

:: RFUNCT_3:th 67
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
      st dom (b2 | b3) is finite
   holds FinS(b2 | b3,b3) = FinS(b2,b3);

:: RFUNCT_3:funcnot 22 => RFUNCT_3:func 22
definition
  let a1 be non empty set;
  let a2 be Function-like Relation of a1,REAL;
  let a3 be finite set;
  redefine func a2 | a3 -> Function-like finite Relation of a1,REAL;
end;

:: RFUNCT_3:th 68
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being set
for b4 being Function-like Relation of b1,REAL
      st b3 is finite & b2 in dom (b4 | b3)
   holds (FinS(b4,b3 \ {b2})) ^ <*b4 . b2*>,b4 | b3 are_fiberwise_equipotent;

:: RFUNCT_3:th 69
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being set
for b4 being Function-like Relation of b1,REAL
      st dom (b4 | b3) is finite & b2 in dom (b4 | b3)
   holds (FinS(b4,b3 \ {b2})) ^ <*b4 . b2*>,b4 | b3 are_fiberwise_equipotent;

:: RFUNCT_3:th 70
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
for b4 being finite set
      st b4 = dom (b2 | b3)
   holds len FinS(b2,b3) = card b4;

:: RFUNCT_3:th 71
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL holds
   FinS(b2,{}) = <*> REAL;

:: RFUNCT_3:th 72
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of b1
      st b3 in dom b2
   holds FinS(b2,{b3}) = <*b2 . b3*>;

:: RFUNCT_3:th 73
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
for b4 being Element of b1
      st dom (b2 | b3) is finite &
         b4 in dom (b2 | b3) &
         (FinS(b2,b3)) . len FinS(b2,b3) = b2 . b4
   holds FinS(b2,b3) = (FinS(b2,b3 \ {b4})) ^ <*b2 . b4*>;

:: RFUNCT_3:th 74
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3, b4 being set
      st dom (b2 | b3) is finite &
         b4 c= b3 &
         (for b5, b6 being Element of b1
               st b5 in dom (b2 | b4) & b6 in dom (b2 | (b3 \ b4))
            holds b2 . b6 <= b2 . b5)
   holds FinS(b2,b3) = (FinS(b2,b4)) ^ FinS(b2,b3 \ b4);

:: RFUNCT_3:th 75
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of REAL
for b4 being set
for b5 being Element of b1
      st dom (b2 | b4) is finite & b5 in dom (b2 | b4)
   holds    (FinS(b2 - b3,b4)) . len FinS(b2 - b3,b4) = (b2 - b3) . b5
   iff
      (FinS(b2,b4)) . len FinS(b2,b4) = b2 . b5;

:: RFUNCT_3:th 76
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of REAL
for b4 being set
for b5 being finite set
      st b5 = dom (b2 | b4)
   holds FinS(b2 - b3,b4) = (FinS(b2,b4)) - ((card b5) |-> b3);

:: RFUNCT_3:th 77
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
      st dom (b2 | b3) is finite &
         (for b4 being Element of b1
               st b4 in dom (b2 | b3)
            holds 0 <= b2 . b4)
   holds FinS(max+ b2,b3) = FinS(b2,b3);

:: RFUNCT_3:th 78
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
for b4 being Element of REAL
for b5 being finite set
      st b5 = dom (b2 | b3) & rng (b2 | b3) = {b4}
   holds FinS(b2,b3) = (card b5) |-> b4;

:: RFUNCT_3:th 79
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3, b4 being set
      st dom (b2 | (b3 \/ b4)) is finite & b3 misses b4
   holds FinS(b2,b3 \/ b4),(FinS(b2,b3)) ^ FinS(b2,b4) are_fiberwise_equipotent;

:: RFUNCT_3:funcnot 23 => RFUNCT_3:func 23
definition
  let a1 be non empty set;
  let a2 be Function-like Relation of a1,REAL;
  let a3 be set;
  func Sum(A2,A3) -> Element of REAL equals
    Sum FinS(a2,a3);
end;

:: RFUNCT_3:def 15
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set holds
   Sum(b2,b3) = Sum FinS(b2,b3);

:: RFUNCT_3:th 80
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
for b4 being Element of REAL
      st dom (b2 | b3) is finite
   holds Sum(b4 (#) b2,b3) = b4 * Sum(b2,b3);

:: RFUNCT_3:th 81
theorem
for b1 being non empty set
for b2, b3 being Function-like Relation of b1,REAL
for b4 being set
for b5 being finite set
      st b5 = dom (b2 | b4) & dom (b2 | b4) = dom (b3 | b4)
   holds Sum(b2 + b3,b4) = (Sum(b2,b4)) + Sum(b3,b4);

:: RFUNCT_3:th 82
theorem
for b1 being non empty set
for b2, b3 being Function-like Relation of b1,REAL
for b4 being set
      st dom (b2 | b4) is finite & dom (b2 | b4) = dom (b3 | b4)
   holds Sum(b2 - b3,b4) = (Sum(b2,b4)) - Sum(b3,b4);

:: RFUNCT_3:th 83
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being set
for b4 being Element of REAL
for b5 being finite set
      st b5 = dom (b2 | b3)
   holds Sum(b2 - b4,b3) = (Sum(b2,b3)) - (b4 * card b5);

:: RFUNCT_3:th 84
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL holds
   Sum(b2,{}) = 0;

:: RFUNCT_3:th 85
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3 being Element of b1
      st b3 in dom b2
   holds Sum(b2,{b3}) = b2 . b3;

:: RFUNCT_3:th 86
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3, b4 being set
      st dom (b2 | (b3 \/ b4)) is finite & b3 misses b4
   holds Sum(b2,b3 \/ b4) = (Sum(b2,b3)) + Sum(b2,b4);

:: RFUNCT_3:th 87
theorem
for b1 being non empty set
for b2 being Function-like Relation of b1,REAL
for b3, b4 being set
      st dom (b2 | (b3 \/ b4)) is finite & dom (b2 | b3) misses dom (b2 | b4)
   holds Sum(b2,b3 \/ b4) = (Sum(b2,b3)) + Sum(b2,b4);