Article MSAFREE1, MML version 4.99.1005

:: MSAFREE1:th 1
theorem
for b1, b2 being Relation-like Function-like set
      st b2 in product b1
   holds proj2 b2 c= Union b1;

:: MSAFREE1:sch 1
scheme MSAFREE1:sch 1
{F1 -> non empty DTConstrStr,
  F2 -> non empty set,
  F3 -> Element of F2(),
  F4 -> Element of F2(),
  F5 -> Function-like quasi_total Relation of TS F1(),F2(),
  F6 -> Function-like quasi_total Relation of TS F1(),F2()}:
F5() = F6()
provided
   for b1 being Element of the carrier of F1()
         st b1 in Terminals F1()
      holds F5() . root-tree b1 = F3(b1)
and
   for b1 being Element of the carrier of F1()
   for b2 being FinSequence of TS F1()
      st b1 ==> roots b2
   for b3 being FinSequence of F2()
         st b3 = F5() * b2
      holds F5() . (b1 -tree b2) = F4(b1, b2, b3)
and
   for b1 being Element of the carrier of F1()
         st b1 in Terminals F1()
      holds F6() . root-tree b1 = F3(b1)
and
   for b1 being Element of the carrier of F1()
   for b2 being FinSequence of TS F1()
      st b1 ==> roots b2
   for b3 being FinSequence of F2()
         st b3 = F6() * b2
      holds F6() . (b1 -tree b2) = F4(b1, b2, b3);


:: MSAFREE1:th 2
theorem
for b1 being non empty non void ManySortedSign
for b2 being ManySortedSet of the carrier of b1
for b3, b4 being set
      st [b3,b4] in REL b2
   holds b3 in [:the OperSymbols of b1,{the carrier of b1}:] &
    b4 in ([:the OperSymbols of b1,{the carrier of b1}:] \/ Union coprod b2) *;

:: MSAFREE1:th 3
theorem
for b1 being non empty non void ManySortedSign
for b2 being ManySortedSet of the carrier of b1
for b3 being Element of the OperSymbols of b1
for b4 being Relation-like Function-like FinSequence-like set
      st [[b3,the carrier of b1],b4] in REL b2
   holds len b4 = len the_arity_of b3 &
    (for b5 being set
          st b5 in dom b4
       holds (b4 . b5 in [:the OperSymbols of b1,{the carrier of b1}:] implies for b6 being Element of the OperSymbols of b1
              st [b6,the carrier of b1] = b4 . b5
           holds the_result_sort_of b6 = (the_arity_of b3) . b5) &
        (b4 . b5 in Union coprod b2 implies b4 . b5 in coprod((the_arity_of b3) . b5,b2)));

:: MSAFREE1:modenot 1 => MSAFREE1:mode 1
definition
  let a1 be set;
  redefine mode FinSequence of a1 -> Element of a1 *;
end;

:: MSAFREE1:funcreg 1
registration
  let a1 be non empty set;
  let a2 be ManySortedSet of a1;
  cluster proj2 a2 -> non empty;
end;

:: MSAFREE1:condreg 1
registration
  let a1 be set;
  cluster empty-yielding -> disjoint_valued (ManySortedSet of a1);
end;

:: MSAFREE1:exreg 1
registration
  let a1 be set;
  cluster Relation-like Function-like disjoint_valued ManySortedSet of a1;
end;

:: MSAFREE1:funcnot 1 => MSAFREE1:func 1
definition
  let a1 be non empty set;
  let a2 be disjoint_valued ManySortedSet of a1;
  let a3 be non-empty ManySortedSet of a1;
  let a4 be ManySortedFunction of a2,a3;
  func Flatten A4 -> Function-like quasi_total Relation of Union a2,Union a3 means
    for b1 being Element of a1
    for b2 being set
          st b2 in a2 . b1
       holds it . b2 = (a4 . b1) . b2;
end;

:: MSAFREE1:def 1
theorem
for b1 being non empty set
for b2 being disjoint_valued ManySortedSet of b1
for b3 being non-empty ManySortedSet of b1
for b4 being ManySortedFunction of b2,b3
for b5 being Function-like quasi_total Relation of Union b2,Union b3 holds
      b5 = Flatten b4
   iff
      for b6 being Element of b1
      for b7 being set
            st b7 in b2 . b6
         holds b5 . b7 = (b4 . b6) . b7;

:: MSAFREE1:th 4
theorem
for b1 being non empty set
for b2 being disjoint_valued ManySortedSet of b1
for b3 being non-empty ManySortedSet of b1
for b4, b5 being ManySortedFunction of b2,b3
      st Flatten b4 = Flatten b5
   holds b4 = b5;

:: MSAFREE1:attrnot 1 => MSAFREE1:attr 1
definition
  let a1 be non empty ManySortedSign;
  let a2 be MSAlgebra over a1;
  attr a2 is disjoint_valued means
    the Sorts of a2 is disjoint_valued;
end;

:: MSAFREE1:dfs 2
definiens
  let a1 be non empty ManySortedSign;
  let a2 be MSAlgebra over a1;
To prove
     a2 is disjoint_valued
it is sufficient to prove
  thus the Sorts of a2 is disjoint_valued;

:: MSAFREE1:def 2
theorem
for b1 being non empty ManySortedSign
for b2 being MSAlgebra over b1 holds
      b2 is disjoint_valued(b1)
   iff
      the Sorts of b2 is disjoint_valued;

:: MSAFREE1:funcnot 2 => MSAFREE1:func 2
definition
  let a1 be non empty ManySortedSign;
  func SingleAlg A1 -> strict MSAlgebra over a1 means
    for b1 being set
          st b1 in the carrier of a1
       holds (the Sorts of it) . b1 = {b1};
end;

:: MSAFREE1:def 3
theorem
for b1 being non empty ManySortedSign
for b2 being strict MSAlgebra over b1 holds
      b2 = SingleAlg b1
   iff
      for b3 being set
            st b3 in the carrier of b1
         holds (the Sorts of b2) . b3 = {b3};

:: MSAFREE1:exreg 2
registration
  let a1 be non empty ManySortedSign;
  cluster non-empty disjoint_valued MSAlgebra over a1;
end;

:: MSAFREE1:funcreg 2
registration
  let a1 be non empty ManySortedSign;
  cluster SingleAlg a1 -> strict non-empty disjoint_valued;
end;

:: MSAFREE1:funcreg 3
registration
  let a1 be non empty ManySortedSign;
  let a2 be disjoint_valued MSAlgebra over a1;
  cluster the Sorts of a2 -> disjoint_valued;
end;

:: MSAFREE1:th 5
theorem
for b1 being non empty non void ManySortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty disjoint_valued MSAlgebra over b1
for b4 being non-empty MSAlgebra over b1
for b5 being ManySortedFunction of the Sorts of b3,the Sorts of b4
for b6 being Element of Args(b2,b3) holds
   b6 * Flatten b5 = b5 # b6;

:: MSAFREE1:funcreg 4
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty ManySortedSet of the carrier of a1;
  cluster FreeSort a2 -> disjoint_valued;
end;

:: MSAFREE1:sch 2
scheme MSAFREE1:sch 2
{F1 -> non empty non void ManySortedSign,
  F2 -> non-empty ManySortedSet of the carrier of F1(),
  F3 -> non-empty ManySortedSet of the carrier of F1(),
  F4 -> Element of Union F3(),
  F5 -> Element of Union F3(),
  F6 -> ManySortedFunction of FreeSort F2(),F3(),
  F7 -> ManySortedFunction of FreeSort F2(),F3()}:
F6() = F7()
provided
   for b1 being Element of the OperSymbols of F1()
   for b2 being Element of Args(b1,FreeMSA F2())
   for b3 being FinSequence of Union F3()
         st b3 = b2 * Flatten F6()
      holds (F6() . the_result_sort_of b1) . ((Den(b1,FreeMSA F2())) . b2) = F5(b1, b2, b3)
and
   for b1 being Element of the carrier of F1()
   for b2 being set
         st b2 in FreeGen(b1,F2())
      holds (F6() . b1) . b2 = F4(b2)
and
   for b1 being Element of the OperSymbols of F1()
   for b2 being Element of Args(b1,FreeMSA F2())
   for b3 being FinSequence of Union F3()
         st b3 = b2 * Flatten F7()
      holds (F7() . the_result_sort_of b1) . ((Den(b1,FreeMSA F2())) . b2) = F5(b1, b2, b3)
and
   for b1 being Element of the carrier of F1()
   for b2 being set
         st b2 in FreeGen(b1,F2())
      holds (F7() . b1) . b2 = F4(b2);


:: MSAFREE1:funcreg 5
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty ManySortedSet of the carrier of a1;
  cluster FreeMSA a2 -> non-empty;
end;

:: MSAFREE1:funcreg 6
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be non-empty MSAlgebra over a1;
  cluster Args(a2,a3) -> non empty;
end;

:: MSAFREE1:funcreg 7
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be non-empty MSAlgebra over a1;
  cluster Result(a2,a3) -> non empty;
end;

:: MSAFREE1:funcreg 8
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty ManySortedSet of the carrier of a1;
  cluster the Sorts of FreeMSA a2 -> disjoint_valued;
end;

:: MSAFREE1:funcreg 9
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non-empty ManySortedSet of the carrier of a1;
  cluster FreeMSA a2 -> disjoint_valued;
end;

:: MSAFREE1:sch 3
scheme MSAFREE1:sch 3
{F1 -> non empty non void ManySortedSign,
  F2 -> non-empty ManySortedSet of the carrier of F1(),
  F3 -> non-empty MSAlgebra over F1(),
  F4 -> ManySortedFunction of the Sorts of FreeMSA F2(),the Sorts of F3(),
  F5 -> ManySortedFunction of the Sorts of FreeMSA F2(),the Sorts of F3()}:
F4() = F5()
provided
   F4() is_homomorphism FreeMSA F2(),F3()
and
   for b1 being Element of the carrier of F1()
   for b2, b3 being set
         st b3 in FreeGen(b1,F2())
      holds    (F4() . b1) . b3 = b2
      iff
         P1[b1, b2, b3]
and
   F5() is_homomorphism FreeMSA F2(),F3()
and
   for b1 being Element of the carrier of F1()
   for b2, b3 being set
         st b3 in FreeGen(b1,F2())
      holds    (F5() . b1) . b3 = b2
      iff
         P1[b1, b2, b3];