Article FUNCT_5, MML version 4.99.1005

:: FUNCT_5:sch 1
scheme FUNCT_5:sch 1
{F1 -> set,
  F2 -> set}:
ex b1 being Relation-like Function-like set st
   proj1 b1 = F1() &
    (for b2 being Relation-like Function-like set
          st b2 in F1()
       holds b1 . b2 = F2(b2))


:: FUNCT_5:th 1
theorem
~ {} = {};

:: FUNCT_5:th 4
theorem
for b1, b2, b3 being set
      st [b1,b2] in b3
   holds b1 in proj1 b3 & b2 in proj2 b3;

:: FUNCT_5:th 5
theorem
for b1, b2 being set
      st b1 c= b2
   holds proj1 b1 c= proj1 b2 & proj2 b1 c= proj2 b2;

:: FUNCT_5:th 6
theorem
for b1, b2 being set holds
proj1 (b1 \/ b2) = (proj1 b1) \/ proj1 b2 &
 proj2 (b1 \/ b2) = (proj2 b1) \/ proj2 b2;

:: FUNCT_5:th 7
theorem
for b1, b2 being set holds
proj1 (b1 /\ b2) c= (proj1 b1) /\ proj1 b2 &
 proj2 (b1 /\ b2) c= (proj2 b1) /\ proj2 b2;

:: FUNCT_5:th 8
theorem
for b1, b2 being set holds
(proj1 b1) \ proj1 b2 c= proj1 (b1 \ b2) &
 (proj2 b1) \ proj2 b2 c= proj2 (b1 \ b2);

:: FUNCT_5:th 9
theorem
for b1, b2 being set holds
(proj1 b1) \+\ proj1 b2 c= proj1 (b1 \+\ b2) &
 (proj2 b1) \+\ proj2 b2 c= proj2 (b1 \+\ b2);

:: FUNCT_5:th 10
theorem
proj1 {} = {} & proj2 {} = {};

:: FUNCT_5:th 11
theorem
for b1, b2 being set
      st (b1 = {} & [:b2,b1:] = {} implies [:b1,b2:] <> {})
   holds proj1 [:b2,b1:] = b2 & proj2 [:b1,b2:] = b2;

:: FUNCT_5:th 12
theorem
for b1, b2 being set holds
proj1 [:b1,b2:] c= b1 & proj2 [:b1,b2:] c= b2;

:: FUNCT_5:th 13
theorem
for b1, b2, b3 being set
      st b1 c= [:b2,b3:]
   holds proj1 b1 c= b2 & proj2 b1 c= b3;

:: FUNCT_5:th 15
theorem
for b1, b2 being set holds
proj1 {[b1,b2]} = {b1} &
 proj2 {[b1,b2]} = {b2};

:: FUNCT_5:th 16
theorem
for b1, b2, b3, b4 being set holds
proj1 {[b1,b2],[b3,b4]} = {b1,b3} &
 proj2 {[b1,b2],[b3,b4]} = {b2,b4};

:: FUNCT_5:th 17
theorem
for b1 being set
      st for b2, b3 being set holds
        not [b2,b3] in b1
   holds proj1 b1 = {} & proj2 b1 = {};

:: FUNCT_5:th 18
theorem
for b1 being set
   st (proj1 b1 = {} or proj2 b1 = {})
for b2, b3 being set holds
not [b2,b3] in b1;

:: FUNCT_5:th 19
theorem
for b1 being set holds
      proj1 b1 = {}
   iff
      proj2 b1 = {};

:: FUNCT_5:th 20
theorem
for b1 being Relation-like Function-like set holds
   proj1 proj1 b1 = proj2 proj1 ~ b1 &
    proj2 proj1 b1 = proj1 proj1 ~ b1;

:: FUNCT_5:th 21
theorem
for b1 being Relation-like set holds
   proj1 b1 = proj1 b1 & proj2 b1 = proj2 b1;

:: FUNCT_5:funcnot 1 => FUNCT_5:func 1
definition
  let a1 be Relation-like Function-like set;
  func curry A1 -> Relation-like Function-like set means
    proj1 it = proj1 proj1 a1 &
     (for b1 being set
           st b1 in proj1 proj1 a1
        holds ex b2 being Relation-like Function-like set st
           it . b1 = b2 &
            proj1 b2 = proj2 ((proj1 a1) /\ [:{b1},proj2 proj1 a1:]) &
            (for b3 being set
                  st b3 in proj1 b2
               holds b2 . b3 = a1 .(b1,b3)));
end;

:: FUNCT_5:def 3
theorem
for b1, b2 being Relation-like Function-like set holds
   b2 = curry b1
iff
   proj1 b2 = proj1 proj1 b1 &
    (for b3 being set
          st b3 in proj1 proj1 b1
       holds ex b4 being Relation-like Function-like set st
          b2 . b3 = b4 &
           proj1 b4 = proj2 ((proj1 b1) /\ [:{b3},proj2 proj1 b1:]) &
           (for b5 being set
                 st b5 in proj1 b4
              holds b4 . b5 = b1 .(b3,b5)));

:: FUNCT_5:funcnot 2 => FUNCT_5:func 2
definition
  let a1 be Relation-like Function-like set;
  func uncurry A1 -> Relation-like Function-like set means
    (for b1 being set holds
           b1 in proj1 it
        iff
           ex b2 being set st
              ex b3 being Relation-like Function-like set st
                 ex b4 being set st
                    b1 = [b2,b4] & b2 in proj1 a1 & b3 = a1 . b2 & b4 in proj1 b3) &
     (for b1 being set
     for b2 being Relation-like Function-like set
           st b1 in proj1 it & b2 = a1 . (b1 `1)
        holds it . b1 = b2 . (b1 `2));
end;

:: FUNCT_5:def 4
theorem
for b1, b2 being Relation-like Function-like set holds
   b2 = uncurry b1
iff
   (for b3 being set holds
          b3 in proj1 b2
       iff
          ex b4 being set st
             ex b5 being Relation-like Function-like set st
                ex b6 being set st
                   b3 = [b4,b6] & b4 in proj1 b1 & b5 = b1 . b4 & b6 in proj1 b5) &
    (for b3 being set
    for b4 being Relation-like Function-like set
          st b3 in proj1 b2 & b4 = b1 . (b3 `1)
       holds b2 . b3 = b4 . (b3 `2));

:: FUNCT_5:funcnot 3 => FUNCT_5:func 3
definition
  let a1 be Relation-like Function-like set;
  func curry' A1 -> Relation-like Function-like set equals
    curry ~ a1;
end;

:: FUNCT_5:def 5
theorem
for b1 being Relation-like Function-like set holds
   curry' b1 = curry ~ b1;

:: FUNCT_5:funcnot 4 => FUNCT_5:func 4
definition
  let a1 be Relation-like Function-like set;
  func uncurry' A1 -> Relation-like Function-like set equals
    ~ uncurry a1;
end;

:: FUNCT_5:def 6
theorem
for b1 being Relation-like Function-like set holds
   uncurry' b1 = ~ uncurry b1;

:: FUNCT_5:th 26
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st [b1,b2] in proj1 b3
   holds b1 in proj1 curry b3 & (curry b3) . b1 is Relation-like Function-like set;

:: FUNCT_5:th 27
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st [b1,b2] in proj1 b3 & b4 = (curry b3) . b1
   holds b2 in proj1 b4 & b4 . b2 = b3 .(b1,b2);

:: FUNCT_5:th 28
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st [b1,b2] in proj1 b3
   holds b2 in proj1 curry' b3 & (curry' b3) . b2 is Relation-like Function-like set;

:: FUNCT_5:th 29
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st [b1,b2] in proj1 b3 & b4 = (curry' b3) . b2
   holds b1 in proj1 b4 & b4 . b1 = b3 .(b1,b2);

:: FUNCT_5:th 30
theorem
for b1 being Relation-like Function-like set holds
   proj1 curry' b1 = proj2 proj1 b1;

:: FUNCT_5:th 31
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st [:b1,b2:] <> {} & proj1 b3 = [:b1,b2:]
   holds proj1 curry b3 = b1 & proj1 curry' b3 = b2;

:: FUNCT_5:th 32
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj1 b3 c= [:b1,b2:]
   holds proj1 curry b3 c= b1 & proj1 curry' b3 c= b2;

:: FUNCT_5:th 33
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj2 b3 c= Funcs(b1,b2)
   holds proj1 uncurry b3 = [:proj1 b3,b1:] &
    proj1 uncurry' b3 = [:b1,proj1 b3:];

:: FUNCT_5:th 34
theorem
for b1 being Relation-like Function-like set
      st for b2, b3 being set holds
        not [b2,b3] in proj1 b1
   holds curry b1 = {} & curry' b1 = {};

:: FUNCT_5:th 35
theorem
for b1 being Relation-like Function-like set
      st for b2 being set
              st b2 in proj1 b1
           holds b1 . b2 is not Relation-like Function-like set
   holds uncurry b1 = {} & uncurry' b1 = {};

:: FUNCT_5:th 36
theorem
for b1, b2, b3 being set
for b4 being Relation-like Function-like set
      st [:b1,b2:] <> {} & proj1 b4 = [:b1,b2:] & b3 in b1
   holds ex b5 being Relation-like Function-like set st
      (curry b4) . b3 = b5 &
       proj1 b5 = b2 &
       proj2 b5 c= proj2 b4 &
       (for b6 being set
             st b6 in b2
          holds b5 . b6 = b4 .(b3,b6));

:: FUNCT_5:th 37
theorem
for b1 being set
for b2 being Relation-like Function-like set
      st b1 in proj1 curry b2
   holds (curry b2) . b1 is Relation-like Function-like set;

:: FUNCT_5:th 38
theorem
for b1 being set
for b2, b3 being Relation-like Function-like set
      st b1 in proj1 curry b2 & b3 = (curry b2) . b1
   holds proj1 b3 = proj2 ((proj1 b2) /\ [:{b1},proj2 proj1 b2:]) &
    proj1 b3 c= proj2 proj1 b2 &
    proj2 b3 c= proj2 b2 &
    (for b4 being set
          st b4 in proj1 b3
       holds b3 . b4 = b2 .(b1,b4) & [b1,b4] in proj1 b2);

:: FUNCT_5:th 39
theorem
for b1, b2, b3 being set
for b4 being Relation-like Function-like set
      st [:b1,b2:] <> {} & proj1 b4 = [:b1,b2:] & b3 in b2
   holds ex b5 being Relation-like Function-like set st
      (curry' b4) . b3 = b5 &
       proj1 b5 = b1 &
       proj2 b5 c= proj2 b4 &
       (for b6 being set
             st b6 in b1
          holds b5 . b6 = b4 .(b6,b3));

:: FUNCT_5:th 40
theorem
for b1 being set
for b2 being Relation-like Function-like set
      st b1 in proj1 curry' b2
   holds (curry' b2) . b1 is Relation-like Function-like set;

:: FUNCT_5:th 41
theorem
for b1 being set
for b2, b3 being Relation-like Function-like set
      st b1 in proj1 curry' b2 & b3 = (curry' b2) . b1
   holds proj1 b3 = proj1 ((proj1 b2) /\ [:proj1 proj1 b2,{b1}:]) &
    proj1 b3 c= proj1 proj1 b2 &
    proj2 b3 c= proj2 b2 &
    (for b4 being set
          st b4 in proj1 b3
       holds b3 . b4 = b2 .(b4,b1) & [b4,b1] in proj1 b2);

:: FUNCT_5:th 42
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj1 b3 = [:b1,b2:]
   holds proj2 curry b3 c= Funcs(b2,proj2 b3) & proj2 curry' b3 c= Funcs(b1,proj2 b3);

:: FUNCT_5:th 43
theorem
for b1 being Relation-like Function-like set holds
   proj2 curry b1 c= PFuncs(proj2 proj1 b1,proj2 b1) &
    proj2 curry' b1 c= PFuncs(proj1 proj1 b1,proj2 b1);

:: FUNCT_5:th 44
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj2 b3 c= PFuncs(b1,b2)
   holds proj1 uncurry b3 c= [:proj1 b3,b1:] &
    proj1 uncurry' b3 c= [:b1,proj1 b3:];

:: FUNCT_5:th 45
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st b1 in proj1 b3 & b4 = b3 . b1 & b2 in proj1 b4
   holds [b1,b2] in proj1 uncurry b3 & (uncurry b3) .(b1,b2) = b4 . b2 & b4 . b2 in proj2 uncurry b3;

:: FUNCT_5:th 46
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st b1 in proj1 b3 & b4 = b3 . b1 & b2 in proj1 b4
   holds [b2,b1] in proj1 uncurry' b3 & (uncurry' b3) .(b2,b1) = b4 . b2 & b4 . b2 in proj2 uncurry' b3;

:: FUNCT_5:th 47
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj2 b3 c= PFuncs(b1,b2)
   holds proj2 uncurry b3 c= b2 & proj2 uncurry' b3 c= b2;

:: FUNCT_5:th 48
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj2 b3 c= Funcs(b1,b2)
   holds proj2 uncurry b3 c= b2 & proj2 uncurry' b3 c= b2;

:: FUNCT_5:th 49
theorem
curry {} = {} & curry' {} = {};

:: FUNCT_5:th 50
theorem
uncurry {} = {} & uncurry' {} = {};

:: FUNCT_5:th 51
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st proj1 b3 = [:b1,b2:] & proj1 b4 = [:b1,b2:] & curry b3 = curry b4
   holds b3 = b4;

:: FUNCT_5:th 52
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st proj1 b3 = [:b1,b2:] & proj1 b4 = [:b1,b2:] & curry' b3 = curry' b4
   holds b3 = b4;

:: FUNCT_5:th 53
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st proj2 b3 c= Funcs(b1,b2) & proj2 b4 c= Funcs(b1,b2) & b1 <> {} & uncurry b3 = uncurry b4
   holds b3 = b4;

:: FUNCT_5:th 54
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st proj2 b3 c= Funcs(b1,b2) & proj2 b4 c= Funcs(b1,b2) & b1 <> {} & uncurry' b3 = uncurry' b4
   holds b3 = b4;

:: FUNCT_5:th 55
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj2 b3 c= Funcs(b1,b2) & b1 <> {}
   holds curry uncurry b3 = b3 & curry' uncurry' b3 = b3;

:: FUNCT_5:th 56
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj1 b3 = [:b1,b2:]
   holds uncurry curry b3 = b3 & uncurry' curry' b3 = b3;

:: FUNCT_5:th 57
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj1 b3 c= [:b1,b2:]
   holds uncurry curry b3 = b3 & uncurry' curry' b3 = b3;

:: FUNCT_5:th 58
theorem
for b1, b2 being set
for b3 being Relation-like Function-like set
      st proj2 b3 c= PFuncs(b1,b2) & not {} in proj2 b3
   holds curry uncurry b3 = b3 & curry' uncurry' b3 = b3;

:: FUNCT_5:th 59
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st proj1 b3 c= [:b1,b2:] & proj1 b4 c= [:b1,b2:] & curry b3 = curry b4
   holds b3 = b4;

:: FUNCT_5:th 60
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st proj1 b3 c= [:b1,b2:] & proj1 b4 c= [:b1,b2:] & curry' b3 = curry' b4
   holds b3 = b4;

:: FUNCT_5:th 61
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st proj2 b3 c= PFuncs(b1,b2) & proj2 b4 c= PFuncs(b1,b2) & not {} in proj2 b3 & not {} in proj2 b4 & uncurry b3 = uncurry b4
   holds b3 = b4;

:: FUNCT_5:th 62
theorem
for b1, b2 being set
for b3, b4 being Relation-like Function-like set
      st proj2 b3 c= PFuncs(b1,b2) & proj2 b4 c= PFuncs(b1,b2) & not {} in proj2 b3 & not {} in proj2 b4 & uncurry' b3 = uncurry' b4
   holds b3 = b4;

:: FUNCT_5:th 63
theorem
for b1, b2, b3 being set
      st b1 c= b2
   holds Funcs(b3,b1) c= Funcs(b3,b2);

:: FUNCT_5:th 64
theorem
for b1 being set holds
   Funcs({},b1) = {{}};

:: FUNCT_5:th 65
theorem
for b1, b2 being set holds
b1,Funcs({b2},b1) are_equipotent &
 Card b1 = Card Funcs({b2},b1);

:: FUNCT_5:th 66
theorem
for b1, b2 being set holds
Funcs(b1,{b2}) = {b1 --> b2};

:: FUNCT_5:th 67
theorem
for b1, b2, b3, b4 being set
      st b1,b2 are_equipotent & b3,b4 are_equipotent
   holds Funcs(b1,b3),Funcs(b2,b4) are_equipotent & Card Funcs(b1,b3) = Card Funcs(b2,b4);

:: FUNCT_5:th 68
theorem
for b1, b2, b3, b4 being set
      st Card b1 = Card b2 & Card b3 = Card b4
   holds Card Funcs(b1,b3) = Card Funcs(b2,b4);

:: FUNCT_5:th 69
theorem
for b1, b2, b3 being set
      st b1 misses b2
   holds Funcs(b1 \/ b2,b3),[:Funcs(b1,b3),Funcs(b2,b3):] are_equipotent &
    Card Funcs(b1 \/ b2,b3) = Card [:Funcs(b1,b3),Funcs(b2,b3):];

:: FUNCT_5:th 70
theorem
for b1, b2, b3 being set holds
Funcs([:b1,b2:],b3),Funcs(b1,Funcs(b2,b3)) are_equipotent &
 Card Funcs([:b1,b2:],b3) = Card Funcs(b1,Funcs(b2,b3));

:: FUNCT_5:th 71
theorem
for b1, b2, b3 being set holds
Funcs(b1,[:b2,b3:]),[:Funcs(b1,b2),Funcs(b1,b3):] are_equipotent &
 Card Funcs(b1,[:b2,b3:]) = Card [:Funcs(b1,b2),Funcs(b1,b3):];

:: FUNCT_5:th 72
theorem
for b1, b2, b3 being set
      st b1 <> b2
   holds Funcs(b3,{b1,b2}),bool b3 are_equipotent &
    Card Funcs(b3,{b1,b2}) = Card bool b3;

:: FUNCT_5:th 73
theorem
for b1, b2, b3 being set
      st b1 <> b2
   holds Funcs({b1,b2},b3),[:b3,b3:] are_equipotent &
    Card Funcs({b1,b2},b3) = Card [:b3,b3:];

:: FUNCT_5:funcnot 5 => XBOOLE_0:func 1
notation
  synonym op0 for {};
end;

:: FUNCT_5:funcnot 6 => FUNCT_5:func 5
definition
  redefine func op0 -> Element of 1;
end;

:: FUNCT_5:funcnot 7 => FUNCT_5:func 6
definition
  func op1 -> set equals
    {} .--> {};
end;

:: FUNCT_5:def 7
theorem
op1 = {} .--> {};

:: FUNCT_5:funcnot 8 => FUNCT_5:func 7
definition
  func op2 -> set equals
    ({},{}):-> {};
end;

:: FUNCT_5:def 8
theorem
op2 = ({},{}):-> {};

:: FUNCT_5:funcnot 9 => FUNCT_5:func 8
definition
  redefine func op1 -> Function-like quasi_total Relation of 1,1;
end;

:: FUNCT_5:funcnot 10 => FUNCT_5:func 9
definition
  redefine func op2 -> Function-like quasi_total Relation of [:1,1:],1;
end;