Article MSAFREE3, MML version 4.99.1005

:: MSAFREE3:funcreg 1
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non empty MSAlgebra over a1;
  cluster Union the Sorts of a2 -> non empty;
end;

:: MSAFREE3:modenot 1
definition
  let a1 be non empty non void ManySortedSign;
  let a2 be non empty MSAlgebra over a1;
  mode Element of a2 is Element of Union the Sorts of a2;
end;

:: MSAFREE3:th 2
theorem
for b1 being set
for b2 being ManySortedSet of b1
for b3 being Function-yielding ManySortedSet of b1
      st b3 is "1-1" & b2 c= doms b3
   holds b3 "" (b3 .:.: b2) = b2;

:: MSAFREE3:funcnot 1 => MSAFREE3:func 1
definition
  let a1 be non void feasible ManySortedSign;
  let a2 be ManySortedSet of the carrier of a1;
  func Free(A1,A2) -> strict MSAlgebra over a1 means
    ex b1 being ManySortedSubset of the Sorts of FreeMSA (a2 \/ ((the carrier of a1) --> {0})) st
       it = GenMSAlg b1 &
        b1 = (Reverse (a2 \/ ((the carrier of a1) --> {0}))) "" a2;
end;

:: MSAFREE3:def 2
theorem
for b1 being non void feasible ManySortedSign
for b2 being ManySortedSet of the carrier of b1
for b3 being strict MSAlgebra over b1 holds
      b3 = Free(b1,b2)
   iff
      ex b4 being ManySortedSubset of the Sorts of FreeMSA (b2 \/ ((the carrier of b1) --> {0})) st
         b3 = GenMSAlg b4 &
          b4 = (Reverse (b2 \/ ((the carrier of b1) --> {0}))) "" b2;

:: MSAFREE3:th 3
theorem
for b1 being set
for b2 being non void feasible ManySortedSign
for b3 being ManySortedSet of the carrier of b2
for b4 being Element of the carrier of b2 holds
      [b1,b4] in the carrier of DTConMSA b3
   iff
      b1 in b3 . b4;

:: MSAFREE3:th 4
theorem
for b1 being set
for b2 being non void feasible ManySortedSign
for b3 being non-empty ManySortedSet of the carrier of b2
for b4 being ManySortedSet of the carrier of b2
for b5 being Element of the carrier of b2 holds
      b1 in b4 . b5 & b1 in b3 . b5
   iff
      root-tree [b1,b5] in ((Reverse b3) "" b4) . b5;

:: MSAFREE3:th 5
theorem
for b1 being set
for b2 being non void feasible ManySortedSign
for b3 being ManySortedSet of the carrier of b2
for b4 being Element of the carrier of b2
      st b1 in b3 . b4
   holds root-tree [b1,b4] in (the Sorts of Free(b2,b3)) . b4;

:: MSAFREE3:th 6
theorem
for b1 being non void feasible ManySortedSign
for b2 being ManySortedSet of the carrier of b1
for b3 being Element of the OperSymbols of b1
      st the_arity_of b3 = {}
   holds root-tree [b3,the carrier of b1] in (the Sorts of Free(b1,b2)) . the_result_sort_of b3;

:: MSAFREE3:funcreg 2
registration
  let a1 be non void feasible ManySortedSign;
  let a2 be non empty-yielding ManySortedSet of the carrier of a1;
  cluster Free(a1,a2) -> strict non empty;
end;

:: MSAFREE3:th 7
theorem
for b1 being set
for b2 being non void feasible ManySortedSign
for b3 being non-empty ManySortedSet of the carrier of b2 holds
      b1 is Element of Union the Sorts of FreeMSA b3
   iff
      b1 is Element of b2 -Terms b3;

:: MSAFREE3:th 8
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being Element of the carrier of b1
for b4 being Element of b1 -Terms b2 holds
      b4 in (the Sorts of FreeMSA b2) . b3
   iff
      the_sort_of b4 = b3;

:: MSAFREE3:th 9
theorem
for b1 being non void feasible ManySortedSign
for b2 being non empty-yielding ManySortedSet of the carrier of b1
for b3 being Element of Union the Sorts of Free(b1,b2) holds
   b3 is Element of b1 -Terms (b2 \/ ((the carrier of b1) --> {0}));

:: MSAFREE3:condreg 1
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non empty-yielding ManySortedSet of the carrier of a1;
  cluster -> Relation-like Function-like (Element of Union the Sorts of Free(a1,a2));
end;

:: MSAFREE3:condreg 2
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non empty-yielding ManySortedSet of the carrier of a1;
  cluster -> finite DecoratedTree-like (Element of Union the Sorts of Free(a1,a2));
end;

:: MSAFREE3:condreg 3
registration
  let a1 be non empty non void ManySortedSign;
  let a2 be non empty-yielding ManySortedSet of the carrier of a1;
  cluster -> finite-branching (Element of Union the Sorts of Free(a1,a2));
end;

:: MSAFREE3:condreg 4
registration
  cluster Relation-like Function-like DecoratedTree-like -> non empty (set);
end;

:: MSAFREE3:funcnot 2 => MSAFREE3:func 2
definition
  let a1 be ManySortedSign;
  let a2 be non empty Relation-like set;
  func A1 variables_in A2 -> ManySortedSet of the carrier of a1 means
    for b1 being set
          st b1 in the carrier of a1
       holds it . b1 = {b2 `1 where b2 is Element of proj2 a2: b2 `2 = b1};
end;

:: MSAFREE3:def 3
theorem
for b1 being ManySortedSign
for b2 being non empty Relation-like set
for b3 being ManySortedSet of the carrier of b1 holds
      b3 = b1 variables_in b2
   iff
      for b4 being set
            st b4 in the carrier of b1
         holds b3 . b4 = {b5 `1 where b5 is Element of proj2 b2: b5 `2 = b4};

:: MSAFREE3:funcnot 3 => MSAFREE3:func 3
definition
  let a1 be ManySortedSign;
  let a2 be ManySortedSet of the carrier of a1;
  let a3 be non empty Relation-like set;
  func A2 variables_in A3 -> ManySortedSubset of a2 equals
    a2 /\ (a1 variables_in a3);
end;

:: MSAFREE3:def 4
theorem
for b1 being ManySortedSign
for b2 being ManySortedSet of the carrier of b1
for b3 being non empty Relation-like set holds
   b2 variables_in b3 = b2 /\ (b1 variables_in b3);

:: MSAFREE3:th 10
theorem
for b1 being ManySortedSign
for b2 being ManySortedSet of the carrier of b1
for b3 being non empty Relation-like set
for b4 being ManySortedSubset of b2 holds
      b4 = b2 variables_in b3
   iff
      for b5 being set
            st b5 in the carrier of b1
         holds b4 . b5 = (b2 . b5) /\ {b6 `1 where b6 is Element of proj2 b3: b6 `2 = b5};

:: MSAFREE3:th 11
theorem
for b1 being ManySortedSign
for b2, b3 being set holds
(b2 in the carrier of b1 implies (b1 variables_in root-tree [b3,b2]) . b2 = {b3}) &
 (for b4 being set
       st (b4 = b2 implies not b2 in the carrier of b1)
    holds (b1 variables_in root-tree [b3,b2]) . b4 = {});

:: MSAFREE3:th 12
theorem
for b1, b2 being set
for b3 being ManySortedSign
for b4 being set
   st b4 in the carrier of b3
for b5 being Relation-like Function-like FinSequence-like DTree-yielding set holds
      b1 in (b3 variables_in ([b2,the carrier of b3] -tree b5)) . b4
   iff
      ex b6 being Relation-like Function-like DecoratedTree-like set st
         b6 in proj2 b5 & b1 in (b3 variables_in b6) . b4;

:: MSAFREE3:th 13
theorem
for b1 being ManySortedSign
for b2 being ManySortedSet of the carrier of b1
for b3, b4 being set holds
(b4 in b2 . b3 implies (b2 variables_in root-tree [b4,b3]) . b3 = {b4}) &
 (for b5 being set
       st (b5 = b3 implies not b4 in b2 . b3)
    holds (b2 variables_in root-tree [b4,b3]) . b5 = {});

:: MSAFREE3:th 14
theorem
for b1, b2 being set
for b3 being ManySortedSign
for b4 being ManySortedSet of the carrier of b3
for b5 being set
   st b5 in the carrier of b3
for b6 being Relation-like Function-like FinSequence-like DTree-yielding set holds
      b1 in (b4 variables_in ([b2,the carrier of b3] -tree b6)) . b5
   iff
      ex b7 being Relation-like Function-like DecoratedTree-like set st
         b7 in proj2 b6 & b1 in (b4 variables_in b7) . b5;

:: MSAFREE3:th 15
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being Element of b1 -Terms b2 holds
   b1 variables_in b3 c= b2;

:: MSAFREE3:funcnot 4 => MSAFREE3:func 4
definition
  let a1 be non void feasible ManySortedSign;
  let a2 be non-empty ManySortedSet of the carrier of a1;
  let a3 be Element of a1 -Terms a2;
  func variables_in A3 -> ManySortedSubset of a2 equals
    a1 variables_in a3;
end;

:: MSAFREE3:def 5
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being Element of b1 -Terms b2 holds
   variables_in b3 = b1 variables_in b3;

:: MSAFREE3:th 16
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being Element of b1 -Terms b2 holds
   variables_in b3 = b2 variables_in b3;

:: MSAFREE3:funcnot 5 => MSAFREE3:func 5
definition
  let a1 be non void feasible ManySortedSign;
  let a2 be non-empty ManySortedSet of the carrier of a1;
  let a3 be ManySortedSet of the carrier of a1;
  func A1 -Terms(A3,A2) -> ManySortedSubset of the Sorts of FreeMSA a2 means
    for b1 being Element of the carrier of a1 holds
       it . b1 = {b2 where b2 is Element of a1 -Terms a2: the_sort_of b2 = b1 & variables_in b2 c= a3};
end;

:: MSAFREE3:def 6
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being ManySortedSet of the carrier of b1
for b4 being ManySortedSubset of the Sorts of FreeMSA b2 holds
      b4 = b1 -Terms(b3,b2)
   iff
      for b5 being Element of the carrier of b1 holds
         b4 . b5 = {b6 where b6 is Element of b1 -Terms b2: the_sort_of b6 = b5 & variables_in b6 c= b3};

:: MSAFREE3:th 17
theorem
for b1 being set
for b2 being non void feasible ManySortedSign
for b3 being non-empty ManySortedSet of the carrier of b2
for b4 being ManySortedSet of the carrier of b2
for b5 being Element of the carrier of b2
      st b1 in (b2 -Terms(b4,b3)) . b5
   holds b1 is Element of b2 -Terms b3;

:: MSAFREE3:th 18
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being ManySortedSet of the carrier of b1
for b4 being Element of b1 -Terms b2
for b5 being Element of the carrier of b1
      st b4 in (b1 -Terms(b3,b2)) . b5
   holds the_sort_of b4 = b5 & variables_in b4 c= b3;

:: MSAFREE3:th 19
theorem
for b1 being set
for b2 being non void feasible ManySortedSign
for b3 being non-empty ManySortedSet of the carrier of b2
for b4 being ManySortedSet of the carrier of b2
for b5 being Element of the carrier of b2 holds
      root-tree [b1,b5] in (b2 -Terms(b4,b3)) . b5
   iff
      b1 in b4 . b5 & b1 in b3 . b5;

:: MSAFREE3:th 20
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being ManySortedSet of the carrier of b1
for b4 being Element of the OperSymbols of b1
for b5 being ArgumentSeq of Sym(b4,b2) holds
      (Sym(b4,b2)) -tree b5 in (b1 -Terms(b3,b2)) . the_result_sort_of b4
   iff
      rng b5 c= Union (b1 -Terms(b3,b2));

:: MSAFREE3:th 21
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being ManySortedSubset of the Sorts of FreeMSA b2 holds
      b3 is opers_closed(b1, FreeMSA b2)
   iff
      for b4 being Element of the OperSymbols of b1
      for b5 being ArgumentSeq of Sym(b4,b2)
            st rng b5 c= Union b3
         holds (Sym(b4,b2)) -tree b5 in b3 . the_result_sort_of b4;

:: MSAFREE3:th 22
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being ManySortedSet of the carrier of b1 holds
   b1 -Terms(b3,b2) is opers_closed(b1, FreeMSA b2);

:: MSAFREE3:th 23
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being ManySortedSet of the carrier of b1 holds
   (Reverse b2) "" b3 c= b1 -Terms(b3,b2);

:: MSAFREE3:th 24
theorem
for b1 being non void feasible ManySortedSign
for b2 being ManySortedSet of the carrier of b1
for b3 being Element of b1 -Terms (b2 \/ ((the carrier of b1) --> {0}))
for b4 being Element of the carrier of b1
      st b3 in (b1 -Terms(b2,b2 \/ ((the carrier of b1) --> {0}))) . b4
   holds b3 in (the Sorts of Free(b1,b2)) . b4;

:: MSAFREE3:th 25
theorem
for b1 being non void feasible ManySortedSign
for b2 being ManySortedSet of the carrier of b1 holds
   the Sorts of Free(b1,b2) = b1 -Terms(b2,b2 \/ ((the carrier of b1) --> {0}));

:: MSAFREE3:th 26
theorem
for b1 being non void feasible ManySortedSign
for b2 being ManySortedSet of the carrier of b1 holds
   (FreeMSA (b2 \/ ((the carrier of b1) --> {0}))) | (b1 -Terms(b2,b2 \/ ((the carrier of b1) --> {0}))) = Free(b1,b2);

:: MSAFREE3:th 27
theorem
for b1 being non void feasible ManySortedSign
for b2, b3 being non-empty ManySortedSet of the carrier of b1
for b4 being MSSubAlgebra of FreeMSA b2
for b5 being MSSubAlgebra of FreeMSA b3
      st the Sorts of b4 = the Sorts of b5
   holds MSAlgebra(#the Sorts of b4,the Charact of b4#) = MSAlgebra(#the Sorts of b5,the Charact of b5#);

:: MSAFREE3:th 28
theorem
for b1 being non void feasible ManySortedSign
for b2 being non empty-yielding ManySortedSet of the carrier of b1
for b3 being ManySortedSet of the carrier of b1
for b4 being Element of Union the Sorts of Free(b1,b2) holds
   b1 variables_in b4 c= b2;

:: MSAFREE3:th 29
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being Element of b1 -Terms b2 holds
   variables_in b3 c= b2;

:: MSAFREE3:th 30
theorem
for b1 being non void feasible ManySortedSign
for b2, b3 being non-empty ManySortedSet of the carrier of b1
for b4 being Element of b1 -Terms b2
for b5 being Element of b1 -Terms b3
      st b4 = b5
   holds the_sort_of b4 = the_sort_of b5;

:: MSAFREE3:th 31
theorem
for b1 being non void feasible ManySortedSign
for b2, b3 being non-empty ManySortedSet of the carrier of b1
for b4 being Element of b1 -Terms b3
      st variables_in b4 c= b2
   holds b4 is Element of b1 -Terms b2;

:: MSAFREE3:th 32
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1 holds
   Free(b1,b2) = FreeMSA b2;

:: MSAFREE3:th 33
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being Element of b1 -Terms b2
for b4 being Element of proj1 b3 holds
   variables_in (b3 | b4) c= variables_in b3;

:: MSAFREE3:th 34
theorem
for b1 being non void feasible ManySortedSign
for b2 being non empty-yielding ManySortedSet of the carrier of b1
for b3 being Element of Union the Sorts of Free(b1,b2)
for b4 being Element of proj1 b3 holds
   b3 | b4 is Element of Union the Sorts of Free(b1,b2);

:: MSAFREE3:th 35
theorem
for b1 being non void feasible ManySortedSign
for b2 being non-empty ManySortedSet of the carrier of b1
for b3 being Element of b1 -Terms b2
for b4 being Element of proj2 b3 holds
   b4 = [b4 `1,b4 `2];

:: MSAFREE3:th 36
theorem
for b1 being set
for b2 being non void feasible ManySortedSign
for b3 being non empty-yielding ManySortedSet of the carrier of b2
for b4 being Element of Union the Sorts of Free(b2,b3)
for b5 being Element of the carrier of b2 holds
   (b1 in (b2 variables_in b4) . b5 implies [b1,b5] in proj2 b4) &
    ([b1,b5] in proj2 b4 implies b1 in (b2 variables_in b4) . b5 & b1 in b3 . b5);

:: MSAFREE3:th 37
theorem
for b1 being non void feasible ManySortedSign
for b2 being ManySortedSet of the carrier of b1
      st for b3 being Element of the carrier of b1
              st b2 . b3 = {}
           holds ex b4 being Element of the OperSymbols of b1 st
              the_result_sort_of b4 = b3 & the_arity_of b4 = {}
   holds Free(b1,b2) is non-empty(b1);

:: MSAFREE3:th 38
theorem
for b1 being non empty non void ManySortedSign
for b2 being MSAlgebra over b1
for b3 being MSSubAlgebra of b2
for b4 being Element of the OperSymbols of b1 holds
   Args(b4,b3) c= Args(b4,b2);

:: MSAFREE3:th 39
theorem
for b1 being non void feasible ManySortedSign
for b2 being feasible MSAlgebra over b1
for b3 being MSSubAlgebra of b2 holds
   b3 is feasible(b1);

:: MSAFREE3:condreg 5
registration
  let a1 be non void feasible ManySortedSign;
  let a2 be feasible MSAlgebra over a1;
  cluster -> feasible (MSSubAlgebra of a2);
end;

:: MSAFREE3:th 40
theorem
for b1 being non void feasible ManySortedSign
for b2 being ManySortedSet of the carrier of b1 holds
   Free(b1,b2) is feasible(b1) & Free(b1,b2) is free(b1);

:: MSAFREE3:funcreg 3
registration
  let a1 be non void feasible ManySortedSign;
  let a2 be ManySortedSet of the carrier of a1;
  cluster Free(a1,a2) -> strict free feasible;
end;