Article OSALG_4, MML version 4.99.1005

:: OSALG_4:exreg 1
registration
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  cluster Relation-like Function-like Relation-yielding order-sorted ManySortedSet of the carrier of a1;
end;

:: OSALG_4:attrnot 1 => OSALG_4:attr 1
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2, a3 be ManySortedSet of the carrier of a1;
  let a4 be ManySortedRelation of a2,a3;
  attr a4 is os-compatible means
    for b1, b2 being Element of the carrier of a1
       st b1 <= b2
    for b3, b4 being set
          st b3 in a2 . b1 & b4 in a3 . b1
       holds    [b3,b4] in a4 . b1
       iff
          [b3,b4] in a4 . b2;
end;

:: OSALG_4:dfs 1
definiens
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2, a3 be ManySortedSet of the carrier of a1;
  let a4 be ManySortedRelation of a2,a3;
To prove
     a4 is os-compatible
it is sufficient to prove
  thus for b1, b2 being Element of the carrier of a1
       st b1 <= b2
    for b3, b4 being set
          st b3 in a2 . b1 & b4 in a3 . b1
       holds    [b3,b4] in a4 . b1
       iff
          [b3,b4] in a4 . b2;

:: OSALG_4:def 1
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2, b3 being ManySortedSet of the carrier of b1
for b4 being ManySortedRelation of b2,b3 holds
      b4 is os-compatible(b1, b2, b3)
   iff
      for b5, b6 being Element of the carrier of b1
         st b5 <= b6
      for b7, b8 being set
            st b7 in b2 . b5 & b8 in b3 . b5
         holds    [b7,b8] in b4 . b5
         iff
            [b7,b8] in b4 . b6;

:: OSALG_4:exreg 2
registration
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2, a3 be ManySortedSet of the carrier of a1;
  cluster Relation-like Function-like Relation-yielding os-compatible ManySortedRelation of a2,a3;
end;

:: OSALG_4:modenot 1
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2, a3 be ManySortedSet of the carrier of a1;
  mode OrderSortedRelation of a2,a3 is os-compatible ManySortedRelation of a2,a3;
end;

:: OSALG_4:th 1
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2, b3 being ManySortedSet of the carrier of b1
for b4 being ManySortedRelation of b2,b3
      st b4 is os-compatible(b1, b2, b3)
   holds b4 is order-sorted ManySortedSet of the carrier of b1;

:: OSALG_4:condreg 1
registration
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2, a3 be ManySortedSet of the carrier of a1;
  cluster os-compatible -> order-sorted (ManySortedRelation of a2,a3);
end;

:: OSALG_4:modenot 2
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2 be ManySortedSet of the carrier of a1;
  mode OrderSortedRelation of a2 is os-compatible ManySortedRelation of a2,a2;
end;

:: OSALG_4:modenot 3 => OSALG_4:mode 1
definition
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be order-sorted MSAlgebra over a1;
  mode OrderSortedRelation of A2 -> ManySortedRelation of the Sorts of a2,the Sorts of a2 means
    it is os-compatible(a1, the Sorts of a2, the Sorts of a2);
end;

:: OSALG_4:dfs 2
definiens
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be order-sorted MSAlgebra over a1;
  let a3 be ManySortedRelation of the Sorts of a2,the Sorts of a2;
To prove
     a3 is OrderSortedRelation of a2
it is sufficient to prove
  thus a3 is os-compatible(a1, the Sorts of a2, the Sorts of a2);

:: OSALG_4:def 3
theorem
for b1 being non empty non void order-sorted discernable OverloadedRSSign
for b2 being order-sorted MSAlgebra over b1
for b3 being ManySortedRelation of the Sorts of b2,the Sorts of b2 holds
      b3 is OrderSortedRelation of b2
   iff
      b3 is os-compatible(b1, the Sorts of b2, the Sorts of b2);

:: OSALG_4:exreg 3
registration
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be order-sorted MSAlgebra over a1;
  cluster Relation-like Function-like Relation-yielding MSEquivalence-like OrderSortedRelation of a2;
end;

:: OSALG_4:exreg 4
registration
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  cluster Relation-like Function-like Relation-yielding MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
end;

:: OSALG_4:modenot 4
definition
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  mode OSCongruence of a2 is MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
end;

:: OSALG_4:funcnot 1 => OSALG_4:func 1
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  func Path_Rel A1 -> symmetric transitive total Relation of the carrier of a1,the carrier of a1 means
    for b1, b2 being set holds
       [b1,b2] in it
    iff
       b1 in the carrier of a1 &
        b2 in the carrier of a1 &
        (ex b3 being FinSequence of the carrier of a1 st
           1 < len b3 &
            b3 . 1 = b1 &
            b3 . len b3 = b2 &
            (for b4 being natural set
                  st 2 <= b4 &
                     b4 <= len b3 &
                     not [b3 . b4,b3 . (b4 - 1)] in the InternalRel of a1
               holds [b3 . (b4 - 1),b3 . b4] in the InternalRel of a1));
end;

:: OSALG_4:def 4
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2 being symmetric transitive total Relation of the carrier of b1,the carrier of b1 holds
      b2 = Path_Rel b1
   iff
      for b3, b4 being set holds
         [b3,b4] in b2
      iff
         b3 in the carrier of b1 &
          b4 in the carrier of b1 &
          (ex b5 being FinSequence of the carrier of b1 st
             1 < len b5 &
              b5 . 1 = b3 &
              b5 . len b5 = b4 &
              (for b6 being natural set
                    st 2 <= b6 &
                       b6 <= len b5 &
                       not [b5 . b6,b5 . (b6 - 1)] in the InternalRel of b1
                 holds [b5 . (b6 - 1),b5 . b6] in the InternalRel of b1));

:: OSALG_4:th 2
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2, b3 being Element of the carrier of b1
      st b2 <= b3
   holds [b2,b3] in Path_Rel b1;

:: OSALG_4:prednot 1 => OSALG_4:pred 1
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2, a3 be Element of the carrier of a1;
  pred A2 ~= A3 means
    [a2,a3] in Path_Rel a1;
  symmetry;
::  for a1 being non empty reflexive transitive antisymmetric RelStr
::  for a2, a3 being Element of the carrier of a1
::        st a2 ~= a3
::     holds a3 ~= a2;
  reflexivity;
::  for a1 being non empty reflexive transitive antisymmetric RelStr
::  for a2 being Element of the carrier of a1 holds
::     a2 ~= a2;
end;

:: OSALG_4:dfs 4
definiens
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2, a3 be Element of the carrier of a1;
To prove
     a2 ~= a3
it is sufficient to prove
  thus [a2,a3] in Path_Rel a1;

:: OSALG_4:def 5
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2, b3 being Element of the carrier of b1 holds
   b2 ~= b3
iff
   [b2,b3] in Path_Rel b1;

:: OSALG_4:th 3
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2, b3, b4 being Element of the carrier of b1
      st b2 ~= b3 & b3 ~= b4
   holds b2 ~= b4;

:: OSALG_4:funcnot 2 => OSALG_4:func 2
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  func Components A1 -> non empty Element of bool bool the carrier of a1 equals
    Class Path_Rel a1;
end;

:: OSALG_4:def 6
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr holds
   Components b1 = Class Path_Rel b1;

:: OSALG_4:condreg 2
registration
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  cluster -> non empty (Element of Components a1);
end;

:: OSALG_4:modenot 5
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  mode Component of a1 is Element of Components a1;
end;

:: OSALG_4:funcnot 3 => OSALG_4:func 3
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2 be Element of the carrier of a1;
  func CComp A2 -> Element of Components a1 equals
    Class(Path_Rel a1,a2);
end;

:: OSALG_4:def 8
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2 being Element of the carrier of b1 holds
   CComp b2 = Class(Path_Rel b1,b2);

:: OSALG_4:th 5
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2, b3 being Element of the carrier of b1
      st b2 <= b3
   holds CComp b2 = CComp b3;

:: OSALG_4:funcnot 4 => OSALG_4:func 4
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  let a2 be ManySortedSet of the carrier of a1;
  let a3 be Element of Components a1;
  func A2 -carrier_of A3 -> set equals
    union {a2 . b1 where b1 is Element of the carrier of a1: b1 in a3};
end;

:: OSALG_4:def 9
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2 being ManySortedSet of the carrier of b1
for b3 being Element of Components b1 holds
   b2 -carrier_of b3 = union {b2 . b4 where b4 is Element of the carrier of b1: b4 in b3};

:: OSALG_4:th 6
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr
for b2 being ManySortedSet of the carrier of b1
for b3 being Element of the carrier of b1
for b4 being set
      st b4 in b2 . b3
   holds b4 in b2 -carrier_of CComp b3;

:: OSALG_4:attrnot 2 => OSALG_4:attr 2
definition
  let a1 be non empty reflexive transitive antisymmetric RelStr;
  attr a1 is locally_directed means
    for b1 being Element of Components a1 holds
       b1 is directed(a1);
end;

:: OSALG_4:dfs 8
definiens
  let a1 be non empty reflexive transitive antisymmetric RelStr;
To prove
     a1 is locally_directed
it is sufficient to prove
  thus for b1 being Element of Components a1 holds
       b1 is directed(a1);

:: OSALG_4:def 10
theorem
for b1 being non empty reflexive transitive antisymmetric RelStr holds
      b1 is locally_directed
   iff
      for b2 being Element of Components b1 holds
         b2 is directed(b1);

:: OSALG_4:th 7
theorem
for b1 being non empty reflexive transitive antisymmetric discrete RelStr
for b2, b3 being Element of the carrier of b1
      st [b2,b3] in Path_Rel b1
   holds b2 = b3;

:: OSALG_4:th 8
theorem
for b1 being non empty reflexive transitive antisymmetric discrete RelStr
for b2 being Element of Components b1 holds
   ex b3 being Element of the carrier of b1 st
      b2 = {b3};

:: OSALG_4:th 9
theorem
for b1 being non empty reflexive transitive antisymmetric discrete RelStr holds
   b1 is locally_directed;

:: OSALG_4:exreg 5
registration
  cluster non empty reflexive transitive antisymmetric locally_directed RelStr;
end;

:: OSALG_4:exreg 6
registration
  cluster non empty non void reflexive transitive antisymmetric order-sorted discernable locally_directed OverloadedRSSign;
end;

:: OSALG_4:condreg 3
registration
  cluster non empty reflexive transitive antisymmetric discrete -> locally_directed (RelStr);
end;

:: OSALG_4:condreg 4
registration
  let a1 be non empty reflexive transitive antisymmetric locally_directed RelStr;
  cluster -> directed (Element of Components a1);
end;

:: OSALG_4:th 10
theorem
{} is symmetric transitive total Relation of {},{};

:: OSALG_4:funcnot 5 => OSALG_4:func 5
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like OrderSortedRelation of a2;
  let a4 be Element of Components a1;
  func CompClass(A3,A4) -> symmetric transitive total Relation of (the Sorts of a2) -carrier_of a4,(the Sorts of a2) -carrier_of a4 means
    for b1, b2 being set holds
       [b1,b2] in it
    iff
       ex b3 being Element of the carrier of a1 st
          b3 in a4 & [b1,b2] in a3 . b3;
end;

:: OSALG_4:def 11
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being Element of Components b1
for b5 being symmetric transitive total Relation of (the Sorts of b2) -carrier_of b4,(the Sorts of b2) -carrier_of b4 holds
      b5 = CompClass(b3,b4)
   iff
      for b6, b7 being set holds
         [b6,b7] in b5
      iff
         ex b8 being Element of the carrier of b1 st
            b8 in b4 & [b6,b7] in b3 . b8;

:: OSALG_4:funcnot 6 => OSALG_4:func 6
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like OrderSortedRelation of a2;
  let a4 be Element of the carrier of a1;
  func OSClass(A3,A4) -> Element of bool Class CompClass(a3,CComp a4) means
    for b1 being set holds
          b1 in it
       iff
          ex b2 being set st
             b2 in (the Sorts of a2) . a4 & b1 = Class(CompClass(a3,CComp a4),b2);
end;

:: OSALG_4:def 12
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being Element of the carrier of b1
for b5 being Element of bool Class CompClass(b3,CComp b4) holds
      b5 = OSClass(b3,b4)
   iff
      for b6 being set holds
            b6 in b5
         iff
            ex b7 being set st
               b7 in (the Sorts of b2) . b4 & b6 = Class(CompClass(b3,CComp b4),b7);

:: OSALG_4:funcreg 1
registration
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like OrderSortedRelation of a2;
  let a4 be Element of the carrier of a1;
  cluster OSClass(a3,a4) -> non empty;
end;

:: OSALG_4:th 11
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4, b5 being Element of the carrier of b1
      st b4 <= b5
   holds OSClass(b3,b4) c= OSClass(b3,b5);

:: OSALG_4:funcnot 7 => OSALG_4:func 7
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like OrderSortedRelation of a2;
  func OSClass A3 -> order-sorted ManySortedSet of the carrier of a1 means
    for b1 being Element of the carrier of a1 holds
       it . b1 = OSClass(a3,b1);
end;

:: OSALG_4:def 13
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being order-sorted ManySortedSet of the carrier of b1 holds
      b4 = OSClass b3
   iff
      for b5 being Element of the carrier of b1 holds
         b4 . b5 = OSClass(b3,b5);

:: OSALG_4:funcreg 2
registration
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like OrderSortedRelation of a2;
  cluster OSClass a3 -> non-empty order-sorted;
end;

:: OSALG_4:funcnot 8 => OSALG_4:func 8
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like OrderSortedRelation of a2;
  let a4 be Element of the carrier of a1;
  let a5 be Element of (the Sorts of a2) . a4;
  func OSClass(A3,A5) -> Element of OSClass(a3,a4) equals
    Class(CompClass(a3,CComp a4),a5);
end;

:: OSALG_4:def 14
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being Element of the carrier of b1
for b5 being Element of (the Sorts of b2) . b4 holds
   OSClass(b3,b5) = Class(CompClass(b3,CComp b4),b5);

:: OSALG_4:th 12
theorem
for b1 being non empty reflexive transitive antisymmetric locally_directed RelStr
for b2, b3 being Element of the carrier of b1
      st ex b4 being Element of the carrier of b1 st
           b4 <= b2 & b4 <= b3
   holds ex b4 being Element of the carrier of b1 st
      b2 <= b4 & b3 <= b4;

:: OSALG_4:th 13
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being Element of the carrier of b1
for b5, b6 being Element of (the Sorts of b2) . b4 holds
   OSClass(b3,b5) = OSClass(b3,b6)
iff
   [b5,b6] in b3 . b4;

:: OSALG_4:th 14
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4, b5 being Element of the carrier of b1
for b6 being Element of (the Sorts of b2) . b4
   st b4 <= b5
for b7 being Element of (the Sorts of b2) . b5
      st b7 = b6
   holds OSClass(b3,b6) = OSClass(b3,b7);

:: OSALG_4:funcnot 9 => OSALG_4:func 9
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a3;
  let a5 be Element of Args(a2,a3);
  func A4 #_os A5 -> Element of product ((OSClass a4) * the_arity_of a2) means
    for b1 being natural set
          st b1 in dom the_arity_of a2
       holds ex b2 being Element of (the Sorts of a3) . ((the_arity_of a2) /. b1) st
          b2 = a5 . b1 & it . b1 = OSClass(a4,b2);
end;

:: OSALG_4:def 15
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty order-sorted MSAlgebra over b1
for b4 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b3
for b5 being Element of Args(b2,b3)
for b6 being Element of product ((OSClass b4) * the_arity_of b2) holds
      b6 = b4 #_os b5
   iff
      for b7 being natural set
            st b7 in dom the_arity_of b2
         holds ex b8 being Element of (the Sorts of b3) . ((the_arity_of b2) /. b7) st
            b8 = b5 . b7 & b6 . b7 = OSClass(b4,b8);

:: OSALG_4:funcnot 10 => OSALG_4:func 10
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a3;
  func OSQuotRes(A4,A2) -> Function-like quasi_total Relation of ((the Sorts of a3) * the ResultSort of a1) . a2,((OSClass a4) * the ResultSort of a1) . a2 means
    for b1 being Element of (the Sorts of a3) . the_result_sort_of a2 holds
       it . b1 = OSClass(a4,b1);
end;

:: OSALG_4:def 16
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty order-sorted MSAlgebra over b1
for b4 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b3
for b5 being Function-like quasi_total Relation of ((the Sorts of b3) * the ResultSort of b1) . b2,((OSClass b4) * the ResultSort of b1) . b2 holds
      b5 = OSQuotRes(b4,b2)
   iff
      for b6 being Element of (the Sorts of b3) . the_result_sort_of b2 holds
         b5 . b6 = OSClass(b4,b6);

:: OSALG_4:funcnot 11 => OSALG_4:func 11
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a3;
  func OSQuotArgs(A4,A2) -> Function-like quasi_total Relation of ((the Sorts of a3) # * the Arity of a1) . a2,((OSClass a4) # * the Arity of a1) . a2 means
    for b1 being Element of Args(a2,a3) holds
       it . b1 = a4 #_os b1;
end;

:: OSALG_4:def 17
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty order-sorted MSAlgebra over b1
for b4 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b3
for b5 being Function-like quasi_total Relation of ((the Sorts of b3) # * the Arity of b1) . b2,((OSClass b4) # * the Arity of b1) . b2 holds
      b5 = OSQuotArgs(b4,b2)
   iff
      for b6 being Element of Args(b2,b3) holds
         b5 . b6 = b4 #_os b6;

:: OSALG_4:funcnot 12 => OSALG_4:func 12
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  func OSQuotRes A3 -> ManySortedFunction of (the Sorts of a2) * the ResultSort of a1,(OSClass a3) * the ResultSort of a1 means
    for b1 being Element of the OperSymbols of a1 holds
       it . b1 = OSQuotRes(a3,b1);
end;

:: OSALG_4:def 18
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
for b4 being ManySortedFunction of (the Sorts of b2) * the ResultSort of b1,(OSClass b3) * the ResultSort of b1 holds
      b4 = OSQuotRes b3
   iff
      for b5 being Element of the OperSymbols of b1 holds
         b4 . b5 = OSQuotRes(b3,b5);

:: OSALG_4:funcnot 13 => OSALG_4:func 13
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  func OSQuotArgs A3 -> ManySortedFunction of (the Sorts of a2) # * the Arity of a1,(OSClass a3) # * the Arity of a1 means
    for b1 being Element of the OperSymbols of a1 holds
       it . b1 = OSQuotArgs(a3,b1);
end;

:: OSALG_4:def 19
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
for b4 being ManySortedFunction of (the Sorts of b2) # * the Arity of b1,(OSClass b3) # * the Arity of b1 holds
      b4 = OSQuotArgs b3
   iff
      for b5 being Element of the OperSymbols of b1 holds
         b4 . b5 = OSQuotArgs(b3,b5);

:: OSALG_4:th 15
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty order-sorted MSAlgebra over b1
for b4 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b3
for b5 being set
      st b5 in ((OSClass b4) # * the Arity of b1) . b2
   holds ex b6 being Element of Args(b2,b3) st
      b5 = b4 #_os b6;

:: OSALG_4:funcnot 14 => OSALG_4:func 14
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be Element of the OperSymbols of a1;
  let a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a3;
  func OSQuotCharact(A4,A2) -> Function-like quasi_total Relation of ((OSClass a4) # * the Arity of a1) . a2,((OSClass a4) * the ResultSort of a1) . a2 means
    for b1 being Element of Args(a2,a3)
          st a4 #_os b1 in ((OSClass a4) # * the Arity of a1) . a2
       holds it . (a4 #_os b1) = ((OSQuotRes(a4,a2)) * Den(a2,a3)) . b1;
end;

:: OSALG_4:def 20
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty order-sorted MSAlgebra over b1
for b4 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b3
for b5 being Function-like quasi_total Relation of ((OSClass b4) # * the Arity of b1) . b2,((OSClass b4) * the ResultSort of b1) . b2 holds
      b5 = OSQuotCharact(b4,b2)
   iff
      for b6 being Element of Args(b2,b3)
            st b4 #_os b6 in ((OSClass b4) # * the Arity of b1) . b2
         holds b5 . (b4 #_os b6) = ((OSQuotRes(b4,b2)) * Den(b2,b3)) . b6;

:: OSALG_4:funcnot 15 => OSALG_4:func 15
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  func OSQuotCharact A3 -> ManySortedFunction of (OSClass a3) # * the Arity of a1,(OSClass a3) * the ResultSort of a1 means
    for b1 being Element of the OperSymbols of a1 holds
       it . b1 = OSQuotCharact(a3,b1);
end;

:: OSALG_4:def 21
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
for b4 being ManySortedFunction of (OSClass b3) # * the Arity of b1,(OSClass b3) * the ResultSort of b1 holds
      b4 = OSQuotCharact b3
   iff
      for b5 being Element of the OperSymbols of b1 holds
         b4 . b5 = OSQuotCharact(b3,b5);

:: OSALG_4:funcnot 16 => OSALG_4:func 16
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  func QuotOSAlg(A2,A3) -> order-sorted MSAlgebra over a1 equals
    MSAlgebra(#OSClass a3,OSQuotCharact a3#);
end;

:: OSALG_4:def 22
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2 holds
   QuotOSAlg(b2,b3) = MSAlgebra(#OSClass b3,OSQuotCharact b3#);

:: OSALG_4:funcreg 3
registration
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  cluster QuotOSAlg(a2,a3) -> strict non-empty order-sorted;
end;

:: OSALG_4:funcnot 17 => OSALG_4:func 17
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  let a4 be Element of the carrier of a1;
  func OSNat_Hom(A2,A3,A4) -> Function-like quasi_total Relation of (the Sorts of a2) . a4,OSClass(a3,a4) means
    for b1 being Element of (the Sorts of a2) . a4 holds
       it . b1 = OSClass(a3,b1);
end;

:: OSALG_4:def 23
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
for b4 being Element of the carrier of b1
for b5 being Function-like quasi_total Relation of (the Sorts of b2) . b4,OSClass(b3,b4) holds
      b5 = OSNat_Hom(b2,b3,b4)
   iff
      for b6 being Element of (the Sorts of b2) . b4 holds
         b5 . b6 = OSClass(b3,b6);

:: OSALG_4:funcnot 18 => OSALG_4:func 18
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  func OSNat_Hom(A2,A3) -> ManySortedFunction of the Sorts of a2,the Sorts of QuotOSAlg(a2,a3) means
    for b1 being Element of the carrier of a1 holds
       it . b1 = OSNat_Hom(a2,a3,b1);
end;

:: OSALG_4:def 24
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of QuotOSAlg(b2,b3) holds
      b4 = OSNat_Hom(b2,b3)
   iff
      for b5 being Element of the carrier of b1 holds
         b4 . b5 = OSNat_Hom(b2,b3,b5);

:: OSALG_4:th 16
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2 holds
   OSNat_Hom(b2,b3) is_epimorphism b2,QuotOSAlg(b2,b3) & OSNat_Hom(b2,b3) is order-sorted(b1);

:: OSALG_4:th 17
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_homomorphism b2,b3 & b4 is order-sorted(b1)
   holds MSCng b4 is MSEquivalence-like MSCongruence-like OrderSortedRelation of b2;

:: OSALG_4:funcnot 19 => OSALG_4:func 19
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2, a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  assume a4 is_homomorphism a2,a3 & a4 is order-sorted(a1);
  func OSCng A4 -> MSEquivalence-like MSCongruence-like OrderSortedRelation of a2 equals
    MSCng a4;
end;

:: OSALG_4:def 25
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_homomorphism b2,b3 & b4 is order-sorted(b1)
   holds OSCng b4 = MSCng b4;

:: OSALG_4:funcnot 20 => OSALG_4:func 20
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2, a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  let a5 be Element of the carrier of a1;
  assume a4 is_homomorphism a2,a3 & a4 is order-sorted(a1);
  func OSHomQuot(A4,A5) -> Function-like quasi_total Relation of (the Sorts of QuotOSAlg(a2,OSCng a4)) . a5,(the Sorts of a3) . a5 means
    for b1 being Element of (the Sorts of a2) . a5 holds
       it . OSClass(OSCng a4,b1) = (a4 . a5) . b1;
end;

:: OSALG_4:def 26
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b5 being Element of the carrier of b1
   st b4 is_homomorphism b2,b3 & b4 is order-sorted(b1)
for b6 being Function-like quasi_total Relation of (the Sorts of QuotOSAlg(b2,OSCng b4)) . b5,(the Sorts of b3) . b5 holds
      b6 = OSHomQuot(b4,b5)
   iff
      for b7 being Element of (the Sorts of b2) . b5 holds
         b6 . OSClass(OSCng b4,b7) = (b4 . b5) . b7;

:: OSALG_4:funcnot 21 => OSALG_4:func 21
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2, a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  func OSHomQuot A4 -> ManySortedFunction of the Sorts of QuotOSAlg(a2,OSCng a4),the Sorts of a3 means
    for b1 being Element of the carrier of a1 holds
       it . b1 = OSHomQuot(a4,b1);
end;

:: OSALG_4:def 27
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b5 being ManySortedFunction of the Sorts of QuotOSAlg(b2,OSCng b4),the Sorts of b3 holds
      b5 = OSHomQuot b4
   iff
      for b6 being Element of the carrier of b1 holds
         b5 . b6 = OSHomQuot(b4,b6);

:: OSALG_4:th 18
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_homomorphism b2,b3 & b4 is order-sorted(b1)
   holds OSHomQuot b4 is_monomorphism QuotOSAlg(b2,OSCng b4),b3 & OSHomQuot b4 is order-sorted(b1);

:: OSALG_4:th 19
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_epimorphism b2,b3 & b4 is order-sorted(b1)
   holds OSHomQuot b4 is_isomorphism QuotOSAlg(b2,OSCng b4),b3;

:: OSALG_4:th 20
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_epimorphism b2,b3 & b4 is order-sorted(b1)
   holds QuotOSAlg(b2,OSCng b4),b3 are_isomorphic;

:: OSALG_4:attrnot 3 => OSALG_4:attr 3
definition
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like OrderSortedRelation of a2;
  attr a3 is monotone means
    for b1, b2 being Element of the OperSymbols of a1
       st b1 <= b2
    for b3 being Element of Args(b1,a2)
    for b4 being Element of Args(b2,a2)
          st for b5 being natural set
                  st b5 in proj1 b3
               holds [b3 . b5,b4 . b5] in a3 . ((the_arity_of b2) /. b5)
       holds [(Den(b1,a2)) . b3,(Den(b2,a2)) . b4] in a3 . the_result_sort_of b2;
end;

:: OSALG_4:dfs 26
definiens
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like OrderSortedRelation of a2;
To prove
     a3 is monotone
it is sufficient to prove
  thus for b1, b2 being Element of the OperSymbols of a1
       st b1 <= b2
    for b3 being Element of Args(b1,a2)
    for b4 being Element of Args(b2,a2)
          st for b5 being natural set
                  st b5 in proj1 b3
               holds [b3 . b5,b4 . b5] in a3 . ((the_arity_of b2) /. b5)
       holds [(Den(b1,a2)) . b3,(Den(b2,a2)) . b4] in a3 . the_result_sort_of b2;

:: OSALG_4:def 28
theorem
for b1 being non empty non void order-sorted discernable OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like OrderSortedRelation of b2 holds
      b3 is monotone(b1, b2)
   iff
      for b4, b5 being Element of the OperSymbols of b1
         st b4 <= b5
      for b6 being Element of Args(b4,b2)
      for b7 being Element of Args(b5,b2)
            st for b8 being natural set
                    st b8 in proj1 b6
                 holds [b6 . b8,b7 . b8] in b3 . ((the_arity_of b5) /. b8)
         holds [(Den(b4,b2)) . b6,(Den(b5,b2)) . b7] in b3 . the_result_sort_of b5;

:: OSALG_4:th 21
theorem
for b1 being non empty non void order-sorted discernable OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1 holds
   [|the Sorts of b2,the Sorts of b2|] is MSEquivalence-like MSCongruence-like OrderSortedRelation of b2;

:: OSALG_4:th 22
theorem
for b1 being non empty non void order-sorted discernable OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
      st b3 = [|the Sorts of b2,the Sorts of b2|]
   holds b3 is monotone(b1, b2);

:: OSALG_4:exreg 7
registration
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  cluster Relation-like Function-like Relation-yielding MSEquivalence-like MSCongruence-like monotone OrderSortedRelation of a2;
end;

:: OSALG_4:exreg 8
registration
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  cluster Relation-like Function-like Relation-yielding MSEquivalence-like monotone OrderSortedRelation of a2;
end;

:: OSALG_4:th 23
theorem
for b1 being non empty non void order-sorted discernable OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being MSEquivalence-like monotone OrderSortedRelation of b2 holds
   b3 is MSCongruence-like(b1, b2);

:: OSALG_4:condreg 5
registration
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  cluster MSEquivalence-like monotone -> MSCongruence-like (OrderSortedRelation of a2);
end;

:: OSALG_4:th 24
theorem
for b1 being non empty non void order-sorted discernable OverloadedRSSign
for b2 being non-empty order-sorted monotone MSAlgebra over b1
for b3 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2 holds
   b3 is monotone(b1, b2);

:: OSALG_4:condreg 6
registration
  let a1 be non empty non void order-sorted discernable OverloadedRSSign;
  let a2 be non-empty order-sorted monotone MSAlgebra over a1;
  cluster MSEquivalence-like MSCongruence-like -> monotone (OrderSortedRelation of a2);
end;

:: OSALG_4:funcreg 4
registration
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2 be non-empty order-sorted MSAlgebra over a1;
  let a3 be MSEquivalence-like MSCongruence-like monotone OrderSortedRelation of a2;
  cluster QuotOSAlg(a2,a3) -> order-sorted monotone;
end;

:: OSALG_4:th 26
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2 being non-empty order-sorted MSAlgebra over b1
for b3 being non-empty order-sorted monotone MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
      st b4 is_homomorphism b2,b3 & b4 is order-sorted(b1)
   holds OSCng b4 is monotone(b1, b2);

:: OSALG_4:funcnot 22 => OSALG_4:func 22
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2, a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  let a5 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  let a6 be Element of the carrier of a1;
  assume a4 is_homomorphism a2,a3 & a4 is order-sorted(a1) & a5 c= OSCng a4;
  func OSHomQuot(A4,A5,A6) -> Function-like quasi_total Relation of (the Sorts of QuotOSAlg(a2,a5)) . a6,(the Sorts of a3) . a6 means
    for b1 being Element of (the Sorts of a2) . a6 holds
       it . OSClass(a5,b1) = (a4 . a6) . b1;
end;

:: OSALG_4:def 29
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b5 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
for b6 being Element of the carrier of b1
   st b4 is_homomorphism b2,b3 & b4 is order-sorted(b1) & b5 c= OSCng b4
for b7 being Function-like quasi_total Relation of (the Sorts of QuotOSAlg(b2,b5)) . b6,(the Sorts of b3) . b6 holds
      b7 = OSHomQuot(b4,b5,b6)
   iff
      for b8 being Element of (the Sorts of b2) . b6 holds
         b7 . OSClass(b5,b8) = (b4 . b6) . b8;

:: OSALG_4:funcnot 23 => OSALG_4:func 23
definition
  let a1 be non empty non void order-sorted discernable locally_directed OverloadedRSSign;
  let a2, a3 be non-empty order-sorted MSAlgebra over a1;
  let a4 be ManySortedFunction of the Sorts of a2,the Sorts of a3;
  let a5 be MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
  func OSHomQuot(A4,A5) -> ManySortedFunction of the Sorts of QuotOSAlg(a2,a5),the Sorts of a3 means
    for b1 being Element of the carrier of a1 holds
       it . b1 = OSHomQuot(a4,a5,b1);
end;

:: OSALG_4:def 30
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b5 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
for b6 being ManySortedFunction of the Sorts of QuotOSAlg(b2,b5),the Sorts of b3 holds
      b6 = OSHomQuot(b4,b5)
   iff
      for b7 being Element of the carrier of b1 holds
         b6 . b7 = OSHomQuot(b4,b5,b7);

:: OSALG_4:th 27
theorem
for b1 being non empty non void order-sorted discernable locally_directed OverloadedRSSign
for b2, b3 being non-empty order-sorted MSAlgebra over b1
for b4 being ManySortedFunction of the Sorts of b2,the Sorts of b3
for b5 being MSEquivalence-like MSCongruence-like OrderSortedRelation of b2
      st b4 is_homomorphism b2,b3 & b4 is order-sorted(b1) & b5 c= OSCng b4
   holds OSHomQuot(b4,b5) is_homomorphism QuotOSAlg(b2,b5),b3 & OSHomQuot(b4,b5) is order-sorted(b1);