Article MSUALG_1, MML version 4.99.1005

:: MSUALG_1:structnot 1 => MSUALG_1:struct 1
definition
  struct(1-sorted) ManySortedSign(#
    carrier -> set,
    OperSymbols -> set,
    Arity -> Function-like quasi_total Relation of the OperSymbols of it,(the carrier of it) *,
    ResultSort -> Function-like quasi_total Relation of the OperSymbols of it,the carrier of it
  #);
end;

:: MSUALG_1:attrnot 1 => MSUALG_1:attr 1
definition
  let a1 be ManySortedSign;
  attr a1 is strict;
end;

:: MSUALG_1:exreg 1
registration
  cluster strict ManySortedSign;
end;

:: MSUALG_1:aggrnot 1 => MSUALG_1:aggr 1
definition
  let a1, a2 be set;
  let a3 be Function-like quasi_total Relation of a2,a1 *;
  let a4 be Function-like quasi_total Relation of a2,a1;
  aggr ManySortedSign(#a1,a2,a3,a4#) -> strict ManySortedSign;
end;

:: MSUALG_1:selnot 1 => MSUALG_1:sel 1
definition
  let a1 be ManySortedSign;
  sel the OperSymbols of a1 -> set;
end;

:: MSUALG_1:selnot 2 => MSUALG_1:sel 2
definition
  let a1 be ManySortedSign;
  sel the Arity of a1 -> Function-like quasi_total Relation of the OperSymbols of a1,(the carrier of a1) *;
end;

:: MSUALG_1:selnot 3 => MSUALG_1:sel 3
definition
  let a1 be ManySortedSign;
  sel the ResultSort of a1 -> Function-like quasi_total Relation of the OperSymbols of a1,the carrier of a1;
end;

:: MSUALG_1:attrnot 2 => MSUALG_1:attr 2
definition
  let a1 be ManySortedSign;
  attr a1 is void means
    the OperSymbols of a1 = {};
end;

:: MSUALG_1:dfs 1
definiens
  let a1 be ManySortedSign;
To prove
     a1 is void
it is sufficient to prove
  thus the OperSymbols of a1 = {};

:: MSUALG_1:def 5
theorem
for b1 being ManySortedSign holds
      b1 is void
   iff
      the OperSymbols of b1 = {};

:: MSUALG_1:exreg 2
registration
  cluster non empty strict void ManySortedSign;
end;

:: MSUALG_1:exreg 3
registration
  cluster non empty strict non void ManySortedSign;
end;

:: MSUALG_1:modenot 1
definition
  let a1 be non empty ManySortedSign;
  mode SortSymbol of a1 is Element of the carrier of a1;
end;

:: MSUALG_1:modenot 2
definition
  let a1 be non empty ManySortedSign;
  mode OperSymbol of a1 is Element of the OperSymbols of a1;
end;

:: MSUALG_1:funcnot 1 => MSUALG_1:func 1
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be Element of the OperSymbols of a1;
  func the_arity_of A2 -> Element of (the carrier of a1) * equals
    (the Arity of a1) . a2;
end;

:: MSUALG_1:def 6
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1 holds
   the_arity_of b2 = (the Arity of b1) . b2;

:: MSUALG_1:funcnot 2 => MSUALG_1:func 2
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be Element of the OperSymbols of a1;
  func the_result_sort_of A2 -> Element of the carrier of a1 equals
    (the ResultSort of a1) . a2;
end;

:: MSUALG_1:def 7
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1 holds
   the_result_sort_of b2 = (the ResultSort of b1) . b2;

:: MSUALG_1:structnot 2 => MSUALG_1:struct 2
definition
  let a1 be 1-sorted;
  struct() many-sorted(#
    Sorts -> ManySortedSet of the carrier of A1
  #);
end;

:: MSUALG_1:attrnot 3 => MSUALG_1:attr 3
definition
  let a1 be 1-sorted;
  let a2 be many-sorted over a1;
  attr a2 is strict;
end;

:: MSUALG_1:exreg 4
registration
  let a1 be 1-sorted;
  cluster strict many-sorted over a1;
end;

:: MSUALG_1:aggrnot 2 => MSUALG_1:aggr 2
definition
  let a1 be 1-sorted;
  let a2 be ManySortedSet of the carrier of a1;
  aggr many-sorted(#a2#) -> strict many-sorted over a1;
end;

:: MSUALG_1:selnot 4 => MSUALG_1:sel 4
definition
  let a1 be 1-sorted;
  let a2 be many-sorted over a1;
  sel the Sorts of a2 -> ManySortedSet of the carrier of a1;
end;

:: MSUALG_1:structnot 3 => MSUALG_1:struct 3
definition
  let a1 be non empty ManySortedSign;
  struct(many-sorted over a1) MSAlgebra(#
    Sorts -> ManySortedSet of the carrier of A1,
    Charact -> ManySortedFunction of (the Sorts of it) # * the Arity of A1,(the Sorts of it) * the ResultSort of A1
  #);
end;

:: MSUALG_1:attrnot 4 => MSUALG_1:attr 4
definition
  let a1 be non empty ManySortedSign;
  let a2 be MSAlgebra over a1;
  attr a2 is strict;
end;

:: MSUALG_1:exreg 5
registration
  let a1 be non empty ManySortedSign;
  cluster strict MSAlgebra over a1;
end;

:: MSUALG_1:aggrnot 3 => MSUALG_1:aggr 3
definition
  let a1 be non empty ManySortedSign;
  let a2 be ManySortedSet of the carrier of a1;
  let a3 be ManySortedFunction of a2 # * the Arity of a1,a2 * the ResultSort of a1;
  aggr MSAlgebra(#a2,a3#) -> strict MSAlgebra over a1;
end;

:: MSUALG_1:selnot 5 => MSUALG_1:sel 5
definition
  let a1 be non empty ManySortedSign;
  let a2 be MSAlgebra over a1;
  sel the Charact of a2 -> ManySortedFunction of (the Sorts of a2) # * the Arity of a1,(the Sorts of a2) * the ResultSort of a1;
end;

:: MSUALG_1:attrnot 5 => MSUALG_1:attr 5
definition
  let a1 be 1-sorted;
  let a2 be many-sorted over a1;
  attr a2 is non-empty means
    the Sorts of a2 is non-empty;
end;

:: MSUALG_1:dfs 4
definiens
  let a1 be 1-sorted;
  let a2 be many-sorted over a1;
To prove
     a2 is non-empty
it is sufficient to prove
  thus the Sorts of a2 is non-empty;

:: MSUALG_1:def 8
theorem
for b1 being 1-sorted
for b2 being many-sorted over b1 holds
      b2 is non-empty(b1)
   iff
      the Sorts of b2 is non-empty;

:: MSUALG_1:exreg 6
registration
  let a1 be non empty ManySortedSign;
  cluster strict non-empty MSAlgebra over a1;
end;

:: MSUALG_1:exreg 7
registration
  let a1 be 1-sorted;
  cluster strict non-empty many-sorted over a1;
end;

:: MSUALG_1:funcreg 1
registration
  let a1 be 1-sorted;
  let a2 be non-empty many-sorted over a1;
  cluster the Sorts of a2 -> non-empty;
end;

:: MSUALG_1:condreg 1
registration
  let a1 be non empty ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  cluster -> non empty (Element of proj2 the Sorts of a2);
end;

:: MSUALG_1:condreg 2
registration
  let a1 be non empty ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  cluster -> non empty (Element of proj2 ((the Sorts of a2) #));
end;

:: MSUALG_1:funcnot 3 => MSUALG_1:func 3
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be MSAlgebra over a1;
  func Args(A2,A3) -> Element of proj2 ((the Sorts of a3) #) equals
    ((the Sorts of a3) # * the Arity of a1) . a2;
end;

:: MSUALG_1:def 9
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being MSAlgebra over b1 holds
   Args(b2,b3) = ((the Sorts of b3) # * the Arity of b1) . b2;

:: MSUALG_1:funcnot 4 => MSUALG_1:func 4
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be MSAlgebra over a1;
  func Result(A2,A3) -> Element of proj2 the Sorts of a3 equals
    ((the Sorts of a3) * the ResultSort of a1) . a2;
end;

:: MSUALG_1:def 10
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being MSAlgebra over b1 holds
   Result(b2,b3) = ((the Sorts of b3) * the ResultSort of b1) . b2;

:: MSUALG_1:funcnot 5 => MSUALG_1:func 5
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be MSAlgebra over a1;
  func Den(A2,A3) -> Function-like quasi_total Relation of Args(a2,a3),Result(a2,a3) equals
    (the Charact of a3) . a2;
end;

:: MSUALG_1:def 11
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being MSAlgebra over b1 holds
   Den(b2,b3) = (the Charact of b3) . b2;

:: MSUALG_1:th 6
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty MSAlgebra over b1 holds
   Den(b2,b3) is not empty;

:: MSUALG_1:th 7
theorem
for b1 being set
for b2, b3 being non empty set
for b4 being Function-like Relation of b1,b2
for b5 being Function-like quasi_total Relation of b2,b3 holds
   b5 * b4 is Function-like quasi_total Relation of proj1 b4,b3;

:: MSUALG_1:th 8
theorem
for b1 being non empty set
for b2 being non empty Function-like homogeneous quasi_total Relation of b1 *,b1 holds
   proj1 b2 = Funcs(Seg arity b2,b1);

:: MSUALG_1:th 9
theorem
for b1 being non empty partial quasi_total non-empty UAStr holds
   signature b1 is not empty;

:: MSUALG_1:funcnot 6 => MSUALG_1:func 6
definition
  let a1 be non empty partial quasi_total non-empty UAStr;
  redefine func signature a1 -> FinSequence of NAT;
end;

:: MSUALG_1:attrnot 6 => MSUALG_1:attr 6
definition
  let a1 be ManySortedSign;
  attr a1 is segmental means
    ex b1 being natural set st
       the OperSymbols of a1 = Seg b1;
end;

:: MSUALG_1:dfs 8
definiens
  let a1 be ManySortedSign;
To prove
     a1 is segmental
it is sufficient to prove
  thus ex b1 being natural set st
       the OperSymbols of a1 = Seg b1;

:: MSUALG_1:def 12
theorem
for b1 being ManySortedSign holds
      b1 is segmental
   iff
      ex b2 being natural set st
         the OperSymbols of b1 = Seg b2;

:: MSUALG_1:th 10
theorem
for b1 being non empty ManySortedSign
   st b1 is trivial
for b2 being MSAlgebra over b1
for b3, b4 being Element of proj2 the Sorts of b2 holds
b3 = b4;

:: MSUALG_1:exreg 8
registration
  cluster non empty trivial strict non void segmental ManySortedSign;
end;

:: MSUALG_1:funcnot 7 => MSUALG_1:func 7
definition
  let a1 be non empty partial quasi_total non-empty UAStr;
  func MSSign A1 -> trivial strict non void segmental ManySortedSign means
    the carrier of it = {0} &
     the OperSymbols of it = dom signature a1 &
     the Arity of it = (*--> 0) * signature a1 &
     the ResultSort of it = (dom signature a1) --> 0;
end;

:: MSUALG_1:def 13
theorem
for b1 being non empty partial quasi_total non-empty UAStr
for b2 being trivial strict non void segmental ManySortedSign holds
      b2 = MSSign b1
   iff
      the carrier of b2 = {0} &
       the OperSymbols of b2 = dom signature b1 &
       the Arity of b2 = (*--> 0) * signature b1 &
       the ResultSort of b2 = (dom signature b1) --> 0;

:: MSUALG_1:funcreg 2
registration
  let a1 be non empty partial quasi_total non-empty UAStr;
  cluster MSSign a1 -> non empty trivial strict non void segmental;
end;

:: MSUALG_1:funcnot 8 => MSUALG_1:func 8
definition
  let a1 be non empty partial quasi_total non-empty UAStr;
  func MSSorts A1 -> non-empty ManySortedSet of the carrier of MSSign a1 equals
    {0} --> the carrier of a1;
end;

:: MSUALG_1:def 14
theorem
for b1 being non empty partial quasi_total non-empty UAStr holds
   MSSorts b1 = {0} --> the carrier of b1;

:: MSUALG_1:funcnot 9 => MSUALG_1:func 9
definition
  let a1 be non empty partial quasi_total non-empty UAStr;
  func MSCharact A1 -> ManySortedFunction of (MSSorts a1) # * the Arity of MSSign a1,(MSSorts a1) * the ResultSort of MSSign a1 equals
    the charact of a1;
end;

:: MSUALG_1:def 15
theorem
for b1 being non empty partial quasi_total non-empty UAStr holds
   MSCharact b1 = the charact of b1;

:: MSUALG_1:funcnot 10 => MSUALG_1:func 10
definition
  let a1 be non empty partial quasi_total non-empty UAStr;
  func MSAlg A1 -> strict MSAlgebra over MSSign a1 equals
    MSAlgebra(#MSSorts a1,MSCharact a1#);
end;

:: MSUALG_1:def 16
theorem
for b1 being non empty partial quasi_total non-empty UAStr holds
   MSAlg b1 = MSAlgebra(#MSSorts b1,MSCharact b1#);

:: MSUALG_1:funcreg 3
registration
  let a1 be non empty partial quasi_total non-empty UAStr;
  cluster MSAlg a1 -> strict non-empty;
end;

:: MSUALG_1:funcnot 11 => MSUALG_1:func 11
definition
  let a1 be non empty trivial ManySortedSign;
  let a2 be MSAlgebra over a1;
  func the_sort_of A2 -> set means
    it is Element of proj2 the Sorts of a2;
end;

:: MSUALG_1:def 17
theorem
for b1 being non empty trivial ManySortedSign
for b2 being MSAlgebra over b1
for b3 being set holds
      b3 = the_sort_of b2
   iff
      b3 is Element of proj2 the Sorts of b2;

:: MSUALG_1:funcreg 4
registration
  let a1 be non empty trivial ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  cluster the_sort_of a2 -> non empty;
end;

:: MSUALG_1:th 11
theorem
for b1 being non empty trivial non void segmental ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty MSAlgebra over b1 holds
   Args(b2,b3) = (len the_arity_of b2) -tuples_on the_sort_of b3;

:: MSUALG_1:th 12
theorem
for b1 being non empty set
for b2 being natural set holds
   b2 -tuples_on b1 c= b1 *;

:: MSUALG_1:th 13
theorem
for b1 being non empty trivial non void segmental ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty MSAlgebra over b1 holds
   Args(b2,b3) c= (the_sort_of b3) *;

:: MSUALG_1:th 14
theorem
for b1 being non empty trivial non void segmental ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   the Charact of b2 is FinSequence of PFuncs((the_sort_of b2) *,the_sort_of b2);

:: MSUALG_1:funcnot 12 => MSUALG_1:func 12
definition
  let a1 be non empty trivial non void segmental ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  func the_charact_of A2 -> FinSequence of PFuncs((the_sort_of a2) *,the_sort_of a2) equals
    the Charact of a2;
end;

:: MSUALG_1:def 18
theorem
for b1 being non empty trivial non void segmental ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   the_charact_of b2 = the Charact of b2;

:: MSUALG_1:funcnot 13 => MSUALG_1:func 13
definition
  let a1 be non empty trivial non void segmental ManySortedSign;
  let a2 be non-empty MSAlgebra over a1;
  func 1-Alg A2 -> non empty strict partial quasi_total non-empty UAStr equals
    UAStr(#the_sort_of a2,the_charact_of a2#);
end;

:: MSUALG_1:def 19
theorem
for b1 being non empty trivial non void segmental ManySortedSign
for b2 being non-empty MSAlgebra over b1 holds
   1-Alg b2 = UAStr(#the_sort_of b2,the_charact_of b2#);

:: MSUALG_1:th 15
theorem
for b1 being non empty strict partial quasi_total non-empty UAStr holds
   b1 = 1-Alg MSAlg b1;

:: MSUALG_1:th 16
theorem
for b1 being non empty partial quasi_total non-empty UAStr
for b2 being Function-like quasi_total Relation of dom signature b1,{0} *
for b3 being Element of {0}
      st b2 = (*--> 0) * signature b1
   holds MSSign b1 = ManySortedSign(#{0},dom signature b1,b2,(dom signature b1) --> b3#);