Article PRALG_1, MML version 4.99.1005

:: PRALG_1:th 1
theorem
for b1, b2 being non empty set
for b3, b4 being natural set
      st b3 -tuples_on b1 = b4 -tuples_on b2
   holds b3 = b4;

:: PRALG_1:funcnot 1 => PRALG_1:func 1
definition
  let a1, a2 be non empty set;
  let a3 be FinSequence of [:a1,a2:];
  redefine func pr1 A3 -> FinSequence of a1 means
    len it = len a3 &
     (for b1 being natural set
           st b1 in dom it
        holds it . b1 = (a3 . b1) `1);
end;

:: PRALG_1:def 1
theorem
for b1, b2 being non empty set
for b3 being FinSequence of [:b1,b2:]
for b4 being FinSequence of b1 holds
      b4 = pr1 b3
   iff
      len b4 = len b3 &
       (for b5 being natural set
             st b5 in dom b4
          holds b4 . b5 = (b3 . b5) `1);

:: PRALG_1:funcnot 2 => PRALG_1:func 2
definition
  let a1, a2 be non empty set;
  let a3 be FinSequence of [:a1,a2:];
  redefine func pr2 A3 -> FinSequence of a2 means
    len it = len a3 &
     (for b1 being natural set
           st b1 in dom it
        holds it . b1 = (a3 . b1) `2);
end;

:: PRALG_1:def 2
theorem
for b1, b2 being non empty set
for b3 being FinSequence of [:b1,b2:]
for b4 being FinSequence of b2 holds
      b4 = pr2 b3
   iff
      len b4 = len b3 &
       (for b5 being natural set
             st b5 in dom b4
          holds b4 . b5 = (b3 . b5) `2);

:: PRALG_1:funcnot 3 => PRALG_1:func 3
definition
  let a1, a2 be non empty set;
  let a3 be Function-like non empty homogeneous quasi_total Relation of a1 *,a1;
  let a4 be Function-like non empty homogeneous quasi_total Relation of a2 *,a2;
  assume arity a3 = arity a4;
  func [[:A3,A4:]] -> Function-like non empty homogeneous quasi_total Relation of [:a1,a2:] *,[:a1,a2:] means
    proj1 it = (arity a3) -tuples_on [:a1,a2:] &
     (for b1 being FinSequence of [:a1,a2:]
           st b1 in proj1 it
        holds it . b1 = [a3 . pr1 b1,a4 . pr2 b1]);
end;

:: PRALG_1:def 3
theorem
for b1, b2 being non empty set
for b3 being Function-like non empty homogeneous quasi_total Relation of b1 *,b1
for b4 being Function-like non empty homogeneous quasi_total Relation of b2 *,b2
   st arity b3 = arity b4
for b5 being Function-like non empty homogeneous quasi_total Relation of [:b1,b2:] *,[:b1,b2:] holds
      b5 = [[:b3,b4:]]
   iff
      proj1 b5 = (arity b3) -tuples_on [:b1,b2:] &
       (for b6 being FinSequence of [:b1,b2:]
             st b6 in proj1 b5
          holds b5 . b6 = [b3 . pr1 b6,b4 . pr2 b6]);

:: PRALG_1:funcnot 4 => PRALG_1:func 4
definition
  let a1, a2 be non empty partial quasi_total non-empty UAStr;
  assume a1,a2 are_similar;
  func Opers(A1,A2) -> FinSequence of PFuncs([:the carrier of a1,the carrier of a2:] *,[:the carrier of a1,the carrier of a2:]) means
    len it = len the charact of a1 &
     (for b1 being natural set
        st b1 in dom it
     for b2 being Function-like non empty homogeneous quasi_total Relation of (the carrier of a1) *,the carrier of a1
     for b3 being Function-like non empty homogeneous quasi_total Relation of (the carrier of a2) *,the carrier of a2
           st b2 = (the charact of a1) . b1 & b3 = (the charact of a2) . b1
        holds it . b1 = [[:b2,b3:]]);
end;

:: PRALG_1:def 4
theorem
for b1, b2 being non empty partial quasi_total non-empty UAStr
   st b1,b2 are_similar
for b3 being FinSequence of PFuncs([:the carrier of b1,the carrier of b2:] *,[:the carrier of b1,the carrier of b2:]) holds
      b3 = Opers(b1,b2)
   iff
      len b3 = len the charact of b1 &
       (for b4 being natural set
          st b4 in dom b3
       for b5 being Function-like non empty homogeneous quasi_total Relation of (the carrier of b1) *,the carrier of b1
       for b6 being Function-like non empty homogeneous quasi_total Relation of (the carrier of b2) *,the carrier of b2
             st b5 = (the charact of b1) . b4 & b6 = (the charact of b2) . b4
          holds b3 . b4 = [[:b5,b6:]]);

:: PRALG_1:th 2
theorem
for b1, b2 being non empty partial quasi_total non-empty UAStr
      st b1,b2 are_similar
   holds UAStr(#[:the carrier of b1,the carrier of b2:],Opers(b1,b2)#) is non empty strict partial quasi_total non-empty UAStr;

:: PRALG_1:funcnot 5 => PRALG_1:func 5
definition
  let a1, a2 be non empty partial quasi_total non-empty UAStr;
  assume a1,a2 are_similar;
  func [:A1,A2:] -> non empty strict partial quasi_total non-empty UAStr equals
    UAStr(#[:the carrier of a1,the carrier of a2:],Opers(a1,a2)#);
end;

:: PRALG_1:def 5
theorem
for b1, b2 being non empty partial quasi_total non-empty UAStr
      st b1,b2 are_similar
   holds [:b1,b2:] = UAStr(#[:the carrier of b1,the carrier of b2:],Opers(b1,b2)#);

:: PRALG_1:funcnot 6 => PRALG_1:func 6
definition
  let a1, a2 be non empty set;
  func Inv(A1,A2) -> Function-like quasi_total Relation of [:a1,a2:],[:a2,a1:] means
    for b1 being Element of [:a1,a2:] holds
       it . b1 = [b1 `2,b1 `1];
end;

:: PRALG_1:def 6
theorem
for b1, b2 being non empty set
for b3 being Function-like quasi_total Relation of [:b1,b2:],[:b2,b1:] holds
      b3 = Inv(b1,b2)
   iff
      for b4 being Element of [:b1,b2:] holds
         b3 . b4 = [b4 `2,b4 `1];

:: PRALG_1:th 3
theorem
for b1, b2 being non empty set holds
rng Inv(b1,b2) = [:b2,b1:];

:: PRALG_1:th 4
theorem
for b1, b2 being non empty set holds
Inv(b1,b2) is one-to-one;

:: PRALG_1:th 5
theorem
for b1, b2 being non empty partial quasi_total non-empty UAStr
      st b1,b2 are_similar
   holds Inv(the carrier of b1,the carrier of b2) is Function-like quasi_total Relation of the carrier of [:b1,b2:],the carrier of [:b2,b1:];

:: PRALG_1:th 6
theorem
for b1, b2 being non empty partial quasi_total non-empty UAStr
   st b1,b2 are_similar
for b3 being Element of Operations b1
for b4 being Element of Operations b2
for b5 being Element of Operations [:b1,b2:]
for b6 being natural set
      st b3 = (the charact of b1) . b6 & b4 = (the charact of b2) . b6 & b5 = (the charact of [:b1,b2:]) . b6 & b6 in dom the charact of b1
   holds arity b5 = arity b3 & arity b5 = arity b4 & b5 = [[:b3,b4:]];

:: PRALG_1:th 7
theorem
for b1, b2 being non empty partial quasi_total non-empty UAStr
      st b1,b2 are_similar
   holds [:b1,b2:],b1 are_similar;

:: PRALG_1:th 8
theorem
for b1, b2, b3, b4 being non empty partial quasi_total non-empty UAStr
      st b1 is SubAlgebra of b2 & b3 is SubAlgebra of b4 & b2,b4 are_similar
   holds [:b1,b3:] is SubAlgebra of [:b2,b4:];

:: PRALG_1:funcnot 7 => PRALG_1:func 7
definition
  let a1 be natural set;
  func TrivialOp A1 -> Function-like Relation of {{}} *,{{}} means
    proj1 it = {a1 |-> {}} & proj2 it = {{}};
end;

:: PRALG_1:def 7
theorem
for b1 being natural set
for b2 being Function-like Relation of {{}} *,{{}} holds
      b2 = TrivialOp b1
   iff
      proj1 b2 = {b1 |-> {}} & proj2 b2 = {{}};

:: PRALG_1:funcreg 1
registration
  let a1 be natural set;
  cluster TrivialOp a1 -> Function-like non empty homogeneous quasi_total;
end;

:: PRALG_1:th 9
theorem
for b1 being natural set holds
   arity TrivialOp b1 = b1;

:: PRALG_1:funcnot 8 => PRALG_1:func 8
definition
  let a1 be FinSequence of NAT;
  func TrivialOps A1 -> FinSequence of PFuncs({{}} *,{{}}) means
    len it = len a1 &
     (for b1 being natural set
        st b1 in dom it
     for b2 being natural set
           st b2 = a1 . b1
        holds it . b1 = TrivialOp b2);
end;

:: PRALG_1:def 8
theorem
for b1 being FinSequence of NAT
for b2 being FinSequence of PFuncs({{}} *,{{}}) holds
      b2 = TrivialOps b1
   iff
      len b2 = len b1 &
       (for b3 being natural set
          st b3 in dom b2
       for b4 being natural set
             st b4 = b1 . b3
          holds b2 . b3 = TrivialOp b4);

:: PRALG_1:th 10
theorem
for b1 being FinSequence of NAT holds
   TrivialOps b1 is homogeneous({{}}) & TrivialOps b1 is quasi_total({{}}) & TrivialOps b1 is non-empty;

:: PRALG_1:th 11
theorem
for b1 being FinSequence of NAT
      st b1 <> {}
   holds UAStr(#{{}},TrivialOps b1#) is non empty strict partial quasi_total non-empty UAStr;

:: PRALG_1:exreg 1
registration
  let a1 be non empty set;
  cluster Relation-like Function-like non empty finite FinSequence-like Element of a1 *;
end;

:: PRALG_1:funcnot 9 => PRALG_1:func 9
definition
  let a1 be non empty FinSequence of NAT;
  func Trivial_Algebra A1 -> non empty strict partial quasi_total non-empty UAStr equals
    UAStr(#{{}},TrivialOps a1#);
end;

:: PRALG_1:def 9
theorem
for b1 being non empty FinSequence of NAT holds
   Trivial_Algebra b1 = UAStr(#{{}},TrivialOps b1#);

:: PRALG_1:attrnot 1 => PRALG_1:attr 1
definition
  let a1 be Relation-like Function-like set;
  attr a1 is Univ_Alg-yielding means
    for b1 being set
          st b1 in proj1 a1
       holds a1 . b1 is non empty partial quasi_total non-empty UAStr;
end;

:: PRALG_1:dfs 10
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is Univ_Alg-yielding
it is sufficient to prove
  thus for b1 being set
          st b1 in proj1 a1
       holds a1 . b1 is non empty partial quasi_total non-empty UAStr;

:: PRALG_1:def 10
theorem
for b1 being Relation-like Function-like set holds
      b1 is Univ_Alg-yielding
   iff
      for b2 being set
            st b2 in proj1 b1
         holds b1 . b2 is non empty partial quasi_total non-empty UAStr;

:: PRALG_1:attrnot 2 => PRALG_1:attr 2
definition
  let a1 be Relation-like Function-like set;
  attr a1 is 1-sorted-yielding means
    for b1 being set
          st b1 in proj1 a1
       holds a1 . b1 is 1-sorted;
end;

:: PRALG_1:dfs 11
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is 1-sorted-yielding
it is sufficient to prove
  thus for b1 being set
          st b1 in proj1 a1
       holds a1 . b1 is 1-sorted;

:: PRALG_1:def 11
theorem
for b1 being Relation-like Function-like set holds
      b1 is 1-sorted-yielding
   iff
      for b2 being set
            st b2 in proj1 b1
         holds b1 . b2 is 1-sorted;

:: PRALG_1:exreg 2
registration
  cluster Relation-like Function-like Univ_Alg-yielding set;
end;

:: PRALG_1:condreg 1
registration
  cluster Relation-like Function-like Univ_Alg-yielding -> 1-sorted-yielding (set);
end;

:: PRALG_1:exreg 3
registration
  let a1 be set;
  cluster Relation-like Function-like 1-sorted-yielding ManySortedSet of a1;
end;

:: PRALG_1:attrnot 3 => PRALG_1:attr 3
definition
  let a1 be Relation-like Function-like set;
  attr a1 is equal-signature means
    for b1, b2 being set
       st b1 in proj1 a1 & b2 in proj1 a1
    for b3, b4 being non empty partial quasi_total non-empty UAStr
          st b3 = a1 . b1 & b4 = a1 . b2
       holds signature b3 = signature b4;
end;

:: PRALG_1:dfs 12
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is equal-signature
it is sufficient to prove
  thus for b1, b2 being set
       st b1 in proj1 a1 & b2 in proj1 a1
    for b3, b4 being non empty partial quasi_total non-empty UAStr
          st b3 = a1 . b1 & b4 = a1 . b2
       holds signature b3 = signature b4;

:: PRALG_1:def 12
theorem
for b1 being Relation-like Function-like set holds
      b1 is equal-signature
   iff
      for b2, b3 being set
         st b2 in proj1 b1 & b3 in proj1 b1
      for b4, b5 being non empty partial quasi_total non-empty UAStr
            st b4 = b1 . b2 & b5 = b1 . b3
         holds signature b4 = signature b5;

:: PRALG_1:exreg 4
registration
  let a1 be non empty set;
  cluster Relation-like Function-like Univ_Alg-yielding equal-signature ManySortedSet of a1;
end;

:: PRALG_1:funcnot 10 => PRALG_1:func 10
definition
  let a1 be non empty set;
  let a2 be 1-sorted-yielding ManySortedSet of a1;
  let a3 be Element of a1;
  redefine func a2 . a3 -> 1-sorted;
end;

:: PRALG_1:funcnot 11 => PRALG_1:func 11
definition
  let a1 be non empty set;
  let a2 be Univ_Alg-yielding ManySortedSet of a1;
  let a3 be Element of a1;
  redefine func a2 . a3 -> non empty partial quasi_total non-empty UAStr;
end;

:: PRALG_1:funcnot 12 => PRALG_1:func 12
definition
  let a1 be set;
  let a2 be 1-sorted-yielding ManySortedSet of a1;
  func Carrier A2 -> ManySortedSet of a1 means
    for b1 being set
          st b1 in a1
       holds ex b2 being 1-sorted st
          b2 = a2 . b1 & it . b1 = the carrier of b2;
end;

:: PRALG_1:def 13
theorem
for b1 being set
for b2 being 1-sorted-yielding ManySortedSet of b1
for b3 being ManySortedSet of b1 holds
      b3 = Carrier b2
   iff
      for b4 being set
            st b4 in b1
         holds ex b5 being 1-sorted st
            b5 = b2 . b4 & b3 . b4 = the carrier of b5;

:: PRALG_1:funcreg 2
registration
  let a1 be non empty set;
  let a2 be Univ_Alg-yielding ManySortedSet of a1;
  cluster Carrier a2 -> non-empty;
end;

:: PRALG_1:funcnot 13 => PRALG_1:func 13
definition
  let a1 be non empty set;
  let a2 be Univ_Alg-yielding equal-signature ManySortedSet of a1;
  func ComSign A2 -> FinSequence of NAT means
    for b1 being Element of a1 holds
       it = signature (a2 . b1);
end;

:: PRALG_1:def 14
theorem
for b1 being non empty set
for b2 being Univ_Alg-yielding equal-signature ManySortedSet of b1
for b3 being FinSequence of NAT holds
      b3 = ComSign b2
   iff
      for b4 being Element of b1 holds
         b3 = signature (b2 . b4);

:: PRALG_1:funcreg 3
registration
  let a1 be non empty set;
  let a2 be non-empty ManySortedSet of a1;
  cluster product a2 -> non empty;
end;

:: PRALG_1:modenot 1 => PRALG_1:mode 1
definition
  let a1 be non empty set;
  let a2 be non-empty ManySortedSet of a1;
  mode ManySortedOperation of A2 -> Function-yielding ManySortedSet of a1 means
    for b1 being Element of a1 holds
       it . b1 is Function-like non empty homogeneous quasi_total Relation of (a2 . b1) *,a2 . b1;
end;

:: PRALG_1:dfs 15
definiens
  let a1 be non empty set;
  let a2 be non-empty ManySortedSet of a1;
  let a3 be Function-yielding ManySortedSet of a1;
To prove
     a3 is ManySortedOperation of a2
it is sufficient to prove
  thus for b1 being Element of a1 holds
       a3 . b1 is Function-like non empty homogeneous quasi_total Relation of (a2 . b1) *,a2 . b1;

:: PRALG_1:def 15
theorem
for b1 being non empty set
for b2 being non-empty ManySortedSet of b1
for b3 being Function-yielding ManySortedSet of b1 holds
      b3 is ManySortedOperation of b2
   iff
      for b4 being Element of b1 holds
         b3 . b4 is Function-like non empty homogeneous quasi_total Relation of (b2 . b4) *,b2 . b4;

:: PRALG_1:funcnot 14 => PRALG_1:func 14
definition
  let a1 be non empty set;
  let a2 be non-empty ManySortedSet of a1;
  let a3 be ManySortedOperation of a2;
  let a4 be Element of a1;
  redefine func a3 . a4 -> Function-like non empty homogeneous quasi_total Relation of (a2 . a4) *,a2 . a4;
end;

:: PRALG_1:attrnot 4 => PRALG_1:attr 4
definition
  let a1 be Relation-like Function-like set;
  attr a1 is equal-arity means
    for b1, b2 being set
       st b1 in proj1 a1 & b2 in proj1 a1
    for b3, b4 being Relation-like Function-like set
       st a1 . b1 = b3 & a1 . b2 = b4
    for b5, b6 being natural set
    for b7, b8 being non empty set
       st proj1 b3 = b5 -tuples_on b7 & proj1 b4 = b6 -tuples_on b8
    for b9 being Function-like non empty homogeneous quasi_total Relation of b7 *,b7
    for b10 being Function-like non empty homogeneous quasi_total Relation of b8 *,b8
          st b3 = b9 & b4 = b10
       holds arity b9 = arity b10;
end;

:: PRALG_1:dfs 16
definiens
  let a1 be Relation-like Function-like set;
To prove
     a1 is equal-arity
it is sufficient to prove
  thus for b1, b2 being set
       st b1 in proj1 a1 & b2 in proj1 a1
    for b3, b4 being Relation-like Function-like set
       st a1 . b1 = b3 & a1 . b2 = b4
    for b5, b6 being natural set
    for b7, b8 being non empty set
       st proj1 b3 = b5 -tuples_on b7 & proj1 b4 = b6 -tuples_on b8
    for b9 being Function-like non empty homogeneous quasi_total Relation of b7 *,b7
    for b10 being Function-like non empty homogeneous quasi_total Relation of b8 *,b8
          st b3 = b9 & b4 = b10
       holds arity b9 = arity b10;

:: PRALG_1:def 16
theorem
for b1 being Relation-like Function-like set holds
      b1 is equal-arity
   iff
      for b2, b3 being set
         st b2 in proj1 b1 & b3 in proj1 b1
      for b4, b5 being Relation-like Function-like set
         st b1 . b2 = b4 & b1 . b3 = b5
      for b6, b7 being natural set
      for b8, b9 being non empty set
         st proj1 b4 = b6 -tuples_on b8 & proj1 b5 = b7 -tuples_on b9
      for b10 being Function-like non empty homogeneous quasi_total Relation of b8 *,b8
      for b11 being Function-like non empty homogeneous quasi_total Relation of b9 *,b9
            st b4 = b10 & b5 = b11
         holds arity b10 = arity b11;

:: PRALG_1:exreg 5
registration
  let a1 be non empty set;
  let a2 be non-empty ManySortedSet of a1;
  cluster Relation-like Function-like Function-yielding equal-arity ManySortedOperation of a2;
end;

:: PRALG_1:th 12
theorem
for b1 being non empty set
for b2 being non-empty ManySortedSet of b1
for b3 being ManySortedOperation of b2 holds
      b3 is equal-arity
   iff
      for b4, b5 being Element of b1 holds
      arity (b3 . b4) = arity (b3 . b5);

:: PRALG_1:funcnot 15 => PRALG_1:func 15
definition
  let a1 be Relation-like Function-like Function-yielding set;
  let a2 be Relation-like Function-like set;
  func A1 .. A2 -> Relation-like Function-like set means
    proj1 it = proj1 a1 &
     (for b1 being set
           st b1 in proj1 a1
        holds it . b1 = (a1 . b1) . (a2 . b1));
end;

:: PRALG_1:def 17
theorem
for b1 being Relation-like Function-like Function-yielding set
for b2, b3 being Relation-like Function-like set holds
   b3 = b1 .. b2
iff
   proj1 b3 = proj1 b1 &
    (for b4 being set
          st b4 in proj1 b1
       holds b3 . b4 = (b1 . b4) . (b2 . b4));

:: PRALG_1:funcnot 16 => PRALG_1:func 16
definition
  let a1 be set;
  let a2 be Function-yielding ManySortedSet of a1;
  let a3 be ManySortedSet of a1;
  redefine func A2 .. A3 -> ManySortedSet of a1 means
    for b1 being set
       st b1 in a1
    for b2 being Relation-like Function-like set
          st b2 = a2 . b1
       holds it . b1 = b2 . (a3 . b1);
end;

:: PRALG_1:def 18
theorem
for b1 being set
for b2 being Function-yielding ManySortedSet of b1
for b3, b4 being ManySortedSet of b1 holds
   b4 = b2 .. b3
iff
   for b5 being set
      st b5 in b1
   for b6 being Relation-like Function-like set
         st b6 = b2 . b5
      holds b4 . b5 = b6 . (b3 . b5);

:: PRALG_1:funcnot 17 => PRALG_1:func 17
definition
  let a1 be non empty set;
  let a2 be non-empty ManySortedSet of a1;
  let a3 be FinSequence of product a2;
  redefine func uncurry a3 -> ManySortedSet of [:dom a3,a1:];
end;

:: PRALG_1:funcnot 18 => PRALG_1:func 18
definition
  let a1, a2 be set;
  let a3 be ManySortedSet of [:a1,a2:];
  redefine func ~ a3 -> ManySortedSet of [:a2,a1:];
end;

:: PRALG_1:funcnot 19 => PRALG_1:func 19
definition
  let a1 be set;
  let a2 be non empty set;
  let a3 be ManySortedSet of [:a1,a2:];
  redefine func curry a3 -> ManySortedSet of a1;
end;

:: PRALG_1:funcnot 20 => PRALG_1:func 20
definition
  let a1 be non empty set;
  let a2 be non-empty ManySortedSet of a1;
  let a3 be equal-arity ManySortedOperation of a2;
  func ComAr A3 -> natural set means
    for b1 being Element of a1 holds
       it = arity (a3 . b1);
end;

:: PRALG_1:def 19
theorem
for b1 being non empty set
for b2 being non-empty ManySortedSet of b1
for b3 being equal-arity ManySortedOperation of b2
for b4 being natural set holds
      b4 = ComAr b3
   iff
      for b5 being Element of b1 holds
         b4 = arity (b3 . b5);

:: PRALG_1:funcnot 21 => PRALG_1:func 21
definition
  let a1 be set;
  let a2 be ManySortedSet of a1;
  func EmptySeq A2 -> ManySortedSet of a1 means
    for b1 being set
          st b1 in a1
       holds it . b1 = {} (a2 . b1);
end;

:: PRALG_1:def 20
theorem
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
   b3 = EmptySeq b2
iff
   for b4 being set
         st b4 in b1
      holds b3 . b4 = {} (b2 . b4);

:: PRALG_1:funcnot 22 => PRALG_1:func 22
definition
  let a1 be non empty set;
  let a2 be non-empty ManySortedSet of a1;
  let a3 be equal-arity ManySortedOperation of a2;
  func [[:A3:]] -> Function-like non empty homogeneous quasi_total Relation of (product a2) *,product a2 means
    proj1 it = (ComAr a3) -tuples_on product a2 &
     (for b1 being Element of (product a2) *
           st b1 in proj1 it
        holds (dom b1 = {} implies it . b1 = a3 .. EmptySeq a2) &
         (dom b1 = {} or for b2 being non empty set
         for b3 being ManySortedSet of [:a1,b2:]
               st b2 = dom b1 & b3 = ~ uncurry b1
            holds it . b1 = a3 .. curry b3));
end;

:: PRALG_1:def 21
theorem
for b1 being non empty set
for b2 being non-empty ManySortedSet of b1
for b3 being equal-arity ManySortedOperation of b2
for b4 being Function-like non empty homogeneous quasi_total Relation of (product b2) *,product b2 holds
      b4 = [[:b3:]]
   iff
      proj1 b4 = (ComAr b3) -tuples_on product b2 &
       (for b5 being Element of (product b2) *
             st b5 in proj1 b4
          holds (dom b5 = {} implies b4 . b5 = b3 .. EmptySeq b2) &
           (dom b5 = {} or for b6 being non empty set
           for b7 being ManySortedSet of [:b1,b6:]
                 st b6 = dom b5 & b7 = ~ uncurry b5
              holds b4 . b5 = b3 .. curry b7));

:: PRALG_1:funcnot 23 => PRALG_1:func 23
definition
  let a1 be non empty set;
  let a2 be Univ_Alg-yielding equal-signature ManySortedSet of a1;
  let a3 be natural set;
  assume a3 in dom ComSign a2;
  func ProdOp(A2,A3) -> equal-arity ManySortedOperation of Carrier a2 means
    for b1 being Element of a1
    for b2 being Element of Operations (a2 . b1)
          st (the charact of a2 . b1) . a3 = b2
       holds it . b1 = b2;
end;

:: PRALG_1:def 22
theorem
for b1 being non empty set
for b2 being Univ_Alg-yielding equal-signature ManySortedSet of b1
for b3 being natural set
   st b3 in dom ComSign b2
for b4 being equal-arity ManySortedOperation of Carrier b2 holds
      b4 = ProdOp(b2,b3)
   iff
      for b5 being Element of b1
      for b6 being Element of Operations (b2 . b5)
            st (the charact of b2 . b5) . b3 = b6
         holds b4 . b5 = b6;

:: PRALG_1:funcnot 24 => PRALG_1:func 24
definition
  let a1 be non empty set;
  let a2 be Univ_Alg-yielding equal-signature ManySortedSet of a1;
  func ProdOpSeq A2 -> FinSequence of PFuncs((product Carrier a2) *,product Carrier a2) means
    len it = len ComSign a2 &
     (for b1 being natural set
           st b1 in dom it
        holds it . b1 = [[:ProdOp(a2,b1):]]);
end;

:: PRALG_1:def 23
theorem
for b1 being non empty set
for b2 being Univ_Alg-yielding equal-signature ManySortedSet of b1
for b3 being FinSequence of PFuncs((product Carrier b2) *,product Carrier b2) holds
      b3 = ProdOpSeq b2
   iff
      len b3 = len ComSign b2 &
       (for b4 being natural set
             st b4 in dom b3
          holds b3 . b4 = [[:ProdOp(b2,b4):]]);

:: PRALG_1:funcnot 25 => PRALG_1:func 25
definition
  let a1 be non empty set;
  let a2 be Univ_Alg-yielding equal-signature ManySortedSet of a1;
  func ProdUnivAlg A2 -> non empty strict partial quasi_total non-empty UAStr equals
    UAStr(#product Carrier a2,ProdOpSeq a2#);
end;

:: PRALG_1:def 24
theorem
for b1 being non empty set
for b2 being Univ_Alg-yielding equal-signature ManySortedSet of b1 holds
   ProdUnivAlg b2 = UAStr(#product Carrier b2,ProdOpSeq b2#);