Article UNIALG_1, MML version 4.99.1005

:: UNIALG_1:attrnot 1 => UNIALG_1:attr 1
definition
  let a1 be Relation-like set;
  attr a1 is homogeneous means
    for b1, b2 being Relation-like Function-like FinSequence-like set
          st b1 in proj1 a1 & b2 in proj1 a1
       holds len b1 = len b2;
end;

:: UNIALG_1:dfs 1
definiens
  let a1 be Relation-like set;
To prove
     a1 is homogeneous
it is sufficient to prove
  thus for b1, b2 being Relation-like Function-like FinSequence-like set
          st b1 in proj1 a1 & b2 in proj1 a1
       holds len b1 = len b2;

:: UNIALG_1:def 1
theorem
for b1 being Relation-like set holds
      b1 is homogeneous
   iff
      for b2, b3 being Relation-like Function-like FinSequence-like set
            st b2 in proj1 b1 & b3 in proj1 b1
         holds len b2 = len b3;

:: UNIALG_1:attrnot 2 => UNIALG_1:attr 2
definition
  let a1 be set;
  let a2 be Function-like Relation of a1 *,a1;
  attr a2 is quasi_total means
    for b1, b2 being FinSequence of a1
          st len b1 = len b2 & b1 in proj1 a2
       holds b2 in proj1 a2;
end;

:: UNIALG_1:dfs 2
definiens
  let a1 be set;
  let a2 be Function-like Relation of a1 *,a1;
To prove
     a2 is quasi_total
it is sufficient to prove
  thus for b1, b2 being FinSequence of a1
          st len b1 = len b2 & b1 in proj1 a2
       holds b2 in proj1 a2;

:: UNIALG_1:def 2
theorem
for b1 being set
for b2 being Function-like Relation of b1 *,b1 holds
      b2 is quasi_total(b1)
   iff
      for b3, b4 being FinSequence of b1
            st len b3 = len b4 & b3 in proj1 b2
         holds b4 in proj1 b2;

:: UNIALG_1:funcreg 1
registration
  let a1 be Relation-like set;
  let a2 be natural set;
  cluster a1 | (a2 -tuples_on NAT) -> Relation-like homogeneous;
end;

:: UNIALG_1:exreg 1
registration
  let a1 be non empty set;
  cluster Relation-like Function-like non empty homogeneous quasi_total Relation of a1 *,a1;
end;

:: UNIALG_1:exreg 2
registration
  cluster Relation-like Function-like non empty homogeneous set;
end;

:: UNIALG_1:th 1
theorem
for b1 being set
for b2 being Function-like Relation of b1 *,b1 holds
      b2 is not empty
   iff
      proj1 b2 <> {};

:: UNIALG_1:th 2
theorem
for b1 being non empty set
for b2 being Element of b1 holds
   {<*> b1} --> b2 is Function-like non empty homogeneous quasi_total Relation of b1 *,b1;

:: UNIALG_1:th 3
theorem
for b1 being non empty set
for b2 being Element of b1 holds
   {<*> b1} --> b2 is Element of PFuncs(b1 *,b1);

:: UNIALG_1:condreg 1
registration
  let a1 be set;
  let a2 be functional set;
  cluster Function-like -> Function-yielding (Relation of a1,a2);
end;

:: UNIALG_1:condreg 2
registration
  let a1 be set;
  let a2 be functional set;
  cluster Function-like -> Function-yielding (Relation of a1,a2);
end;

:: UNIALG_1:modenot 1
definition
  let a1 be set;
  mode PFuncFinSequence of a1 is FinSequence of PFuncs(a1 *,a1);
end;

:: UNIALG_1:structnot 1 => UNIALG_1:struct 1
definition
  struct(1-sorted) UAStr(#
    carrier -> set,
    charact -> FinSequence of PFuncs((the carrier of it) *,the carrier of it)
  #);
end;

:: UNIALG_1:attrnot 3 => UNIALG_1:attr 3
definition
  let a1 be UAStr;
  attr a1 is strict;
end;

:: UNIALG_1:exreg 3
registration
  cluster strict UAStr;
end;

:: UNIALG_1:aggrnot 1 => UNIALG_1:aggr 1
definition
  let a1 be set;
  let a2 be FinSequence of PFuncs(a1 *,a1);
  aggr UAStr(#a1,a2#) -> strict UAStr;
end;

:: UNIALG_1:selnot 1 => UNIALG_1:sel 1
definition
  let a1 be UAStr;
  sel the charact of a1 -> FinSequence of PFuncs((the carrier of a1) *,the carrier of a1);
end;

:: UNIALG_1:exreg 4
registration
  cluster non empty strict UAStr;
end;

:: UNIALG_1:funcreg 2
registration
  let a1 be non empty set;
  let a2 be FinSequence of PFuncs(a1 *,a1);
  cluster UAStr(#a1,a2#) -> non empty strict;
end;

:: UNIALG_1:attrnot 4 => UNIALG_1:attr 4
definition
  let a1 be set;
  let a2 be FinSequence of PFuncs(a1 *,a1);
  attr a2 is homogeneous means
    for b1 being natural set
    for b2 being Function-like Relation of a1 *,a1
          st b1 in dom a2 & b2 = a2 . b1
       holds b2 is homogeneous;
end;

:: UNIALG_1:dfs 3
definiens
  let a1 be set;
  let a2 be FinSequence of PFuncs(a1 *,a1);
To prove
     a2 is homogeneous
it is sufficient to prove
  thus for b1 being natural set
    for b2 being Function-like Relation of a1 *,a1
          st b1 in dom a2 & b2 = a2 . b1
       holds b2 is homogeneous;

:: UNIALG_1:def 4
theorem
for b1 being set
for b2 being FinSequence of PFuncs(b1 *,b1) holds
      b2 is homogeneous(b1)
   iff
      for b3 being natural set
      for b4 being Function-like Relation of b1 *,b1
            st b3 in dom b2 & b4 = b2 . b3
         holds b4 is homogeneous;

:: UNIALG_1:attrnot 5 => UNIALG_1:attr 5
definition
  let a1 be set;
  let a2 be FinSequence of PFuncs(a1 *,a1);
  attr a2 is quasi_total means
    for b1 being natural set
    for b2 being Function-like Relation of a1 *,a1
          st b1 in dom a2 & b2 = a2 . b1
       holds b2 is quasi_total(a1);
end;

:: UNIALG_1:dfs 4
definiens
  let a1 be set;
  let a2 be FinSequence of PFuncs(a1 *,a1);
To prove
     a2 is quasi_total
it is sufficient to prove
  thus for b1 being natural set
    for b2 being Function-like Relation of a1 *,a1
          st b1 in dom a2 & b2 = a2 . b1
       holds b2 is quasi_total(a1);

:: UNIALG_1:def 5
theorem
for b1 being set
for b2 being FinSequence of PFuncs(b1 *,b1) holds
      b2 is quasi_total(b1)
   iff
      for b3 being natural set
      for b4 being Function-like Relation of b1 *,b1
            st b3 in dom b2 & b4 = b2 . b3
         holds b4 is quasi_total(b1);

:: UNIALG_1:funcnot 1 => UNIALG_1:func 1
definition
  let a1 be non empty set;
  let a2 be Element of PFuncs(a1 *,a1);
  redefine func <*a2*> -> FinSequence of PFuncs(a1 *,a1);
end;

:: UNIALG_1:exreg 5
registration
  let a1 be non empty set;
  cluster Relation-like non-empty Function-like Function-yielding FinSequence-like homogeneous quasi_total FinSequence of PFuncs(a1 *,a1);
end;

:: UNIALG_1:funcreg 3
registration
  let a1 be non empty set;
  let a2 be homogeneous FinSequence of PFuncs(a1 *,a1);
  let a3 be set;
  cluster a2 . a3 -> homogeneous;
end;

:: UNIALG_1:attrnot 6 => UNIALG_1:attr 6
definition
  let a1 be UAStr;
  attr a1 is partial means
    the charact of a1 is homogeneous(the carrier of a1);
end;

:: UNIALG_1:dfs 5
definiens
  let a1 be UAStr;
To prove
     a1 is partial
it is sufficient to prove
  thus the charact of a1 is homogeneous(the carrier of a1);

:: UNIALG_1:def 7
theorem
for b1 being UAStr holds
      b1 is partial
   iff
      the charact of b1 is homogeneous(the carrier of b1);

:: UNIALG_1:attrnot 7 => UNIALG_1:attr 7
definition
  let a1 be UAStr;
  attr a1 is quasi_total means
    the charact of a1 is quasi_total(the carrier of a1);
end;

:: UNIALG_1:dfs 6
definiens
  let a1 be UAStr;
To prove
     a1 is quasi_total
it is sufficient to prove
  thus the charact of a1 is quasi_total(the carrier of a1);

:: UNIALG_1:def 8
theorem
for b1 being UAStr holds
      b1 is quasi_total
   iff
      the charact of b1 is quasi_total(the carrier of b1);

:: UNIALG_1:attrnot 8 => UNIALG_1:attr 8
definition
  let a1 be UAStr;
  attr a1 is non-empty means
    the charact of a1 <> {} & the charact of a1 is non-empty;
end;

:: UNIALG_1:dfs 7
definiens
  let a1 be UAStr;
To prove
     a1 is non-empty
it is sufficient to prove
  thus the charact of a1 <> {} & the charact of a1 is non-empty;

:: UNIALG_1:def 9
theorem
for b1 being UAStr holds
      b1 is non-empty
   iff
      the charact of b1 <> {} & the charact of b1 is non-empty;

:: UNIALG_1:th 4
theorem
for b1 being non empty set
for b2 being Element of b1
for b3 being Element of PFuncs(b1 *,b1)
      st b3 = {<*> b1} --> b2
   holds <*b3*> is homogeneous(b1) & <*b3*> is quasi_total(b1) & <*b3*> is non-empty;

:: UNIALG_1:exreg 6
registration
  cluster non empty strict partial quasi_total non-empty UAStr;
end;

:: UNIALG_1:funcreg 4
registration
  let a1 be partial UAStr;
  cluster the charact of a1 -> homogeneous;
end;

:: UNIALG_1:funcreg 5
registration
  let a1 be quasi_total UAStr;
  cluster the charact of a1 -> quasi_total;
end;

:: UNIALG_1:funcreg 6
registration
  let a1 be non-empty UAStr;
  cluster the charact of a1 -> non-empty non empty;
end;

:: UNIALG_1:modenot 2
definition
  mode Universal_Algebra is non empty partial quasi_total non-empty UAStr;
end;

:: UNIALG_1:funcnot 2 => UNIALG_1:func 2
definition
  let a1 be Relation-like homogeneous set;
  func arity A1 -> natural set means
    for b1 being Relation-like Function-like FinSequence-like set
          st b1 in proj1 a1
       holds it = len b1
    if ex b1 being Relation-like Function-like FinSequence-like set st
       b1 in proj1 a1
    otherwise it = 0;
end;

:: UNIALG_1:def 10
theorem
for b1 being Relation-like homogeneous set
for b2 being natural set holds
   (for b3 being Relation-like Function-like FinSequence-like set holds
       not b3 in proj1 b1 or    (b2 = arity b1
    iff
       for b3 being Relation-like Function-like FinSequence-like set
             st b3 in proj1 b1
          holds b2 = len b3)) &
    (for b3 being Relation-like Function-like FinSequence-like set holds
       not b3 in proj1 b1 implies    (b2 = arity b1
    iff
       b2 = 0));

:: UNIALG_1:funcnot 3 => UNIALG_1:func 3
definition
  let a1 be Relation-like Function-like homogeneous set;
  redefine func arity a1 -> Element of NAT;
end;

:: UNIALG_1:th 5
theorem
for b1 being natural set
for b2 being non empty partial non-empty UAStr
      st b1 in dom the charact of b2
   holds (the charact of b2) . b1 is Function-like Relation of (the carrier of b2) *,the carrier of b2;

:: UNIALG_1:funcnot 4 => UNIALG_1:func 4
definition
  let a1 be non empty partial non-empty UAStr;
  func signature A1 -> FinSequence of NAT 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 Relation of (the carrier of a1) *,the carrier of a1
           st b2 = (the charact of a1) . b1
        holds it . b1 = arity b2);
end;

:: UNIALG_1:def 11
theorem
for b1 being non empty partial non-empty UAStr
for b2 being FinSequence of NAT holds
      b2 = signature b1
   iff
      len b2 = len the charact of b1 &
       (for b3 being natural set
          st b3 in dom b2
       for b4 being Function-like non empty homogeneous Relation of (the carrier of b1) *,the carrier of b1
             st b4 = (the charact of b1) . b3
          holds b2 . b3 = arity b4);

:: UNIALG_1:funcreg 7
registration
  let a1 be non empty partial quasi_total non-empty UAStr;
  cluster the charact of a1 -> Function-yielding;
end;