:: OSALG_4 semantic presentation

registration
let c1 be non empty Poset;
cluster Relation-yielding ManySortedSet of the carrier of a1;
existence
ex b1 being OrderSortedSet of c1 st b1 is Relation-yielding
proof end;
end;

definition
let c1 be non empty Poset;
let c2, c3 be ManySortedSet of the carrier of c1;
let c4 be ManySortedRelation of c2,c3;
attr a4 is os-compatible means :Def1: :: OSALG_4:def 1
for b1, b2 being Element of a1 st b1 <= b2 holds
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;

:: deftheorem Def1 defines os-compatible OSALG_4:def 1 :
for b1 being non empty Poset
for b2, b3 being ManySortedSet of the carrier of b1
for b4 being ManySortedRelation of b2,b3 holds
( b4 is os-compatible iff for b5, b6 being Element of b1 st b5 <= b6 holds
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 ) );

registration
let c1 be non empty Poset;
let c2, c3 be ManySortedSet of the carrier of c1;
cluster os-compatible ManySortedRelation of a2,a3;
existence
ex b1 being ManySortedRelation of c2,c3 st b1 is os-compatible
proof end;
end;

definition
let c1 be non empty Poset;
let c2, c3 be ManySortedSet of the carrier of c1;
mode OrderSortedRelation of a2,a3 is os-compatible ManySortedRelation of a2,a3;
end;

theorem Th1: :: OSALG_4:1
for b1 being non empty Poset
for b2, b3 being ManySortedSet of the carrier of b1
for b4 being ManySortedRelation of b2,b3 st b4 is os-compatible holds
b4 is OrderSortedSet of b1
proof end;

registration
let c1 be non empty Poset;
let c2, c3 be ManySortedSet of c1;
cluster os-compatible -> order-sorted ManySortedRelation of a2,a3;
coherence
for b1 being ManySortedRelation of c2,c3 st b1 is os-compatible holds
b1 is order-sorted
by Th1;
end;

definition
let c1 be non empty Poset;
let c2 be ManySortedSet of the carrier of c1;
mode OrderSortedRelation of a2 is OrderSortedRelation of a2,a2;
end;

definition
let c1 be OrderSortedSign;
let c2 be OSAlgebra of c1;
canceled;
mode OrderSortedRelation of c2 -> ManySortedRelation of a2 means :Def3: :: OSALG_4:def 3
a3 is os-compatible;
existence
ex b1 being ManySortedRelation of c2 st b1 is os-compatible
proof end;
end;

:: deftheorem Def2 OSALG_4:def 2 :
canceled;

:: deftheorem Def3 defines OrderSortedRelation OSALG_4:def 3 :
for b1 being OrderSortedSign
for b2 being OSAlgebra of b1
for b3 being ManySortedRelation of b2 holds
( b3 is OrderSortedRelation of b2 iff b3 is os-compatible );

registration
let c1 be OrderSortedSign;
let c2 be OSAlgebra of c1;
cluster MSEquivalence-like OrderSortedRelation of a2;
existence
ex b1 being OrderSortedRelation of c2 st b1 is MSEquivalence-like
proof end;
end;

registration
let c1 be OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
cluster MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
existence
ex b1 being MSEquivalence-like OrderSortedRelation of c2 st b1 is MSCongruence-like
proof end;
end;

definition
let c1 be OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
mode OSCongruence of a2 is MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
end;

definition
let c1 be non empty Poset;
func Path_Rel c1 -> Equivalence_Relation of the carrier of a1 means :Def4: :: OSALG_4:def 4
for b1, b2 being set holds
( [b1,b2] in a2 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 Nat 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 ) ) ) );
existence
ex b1 being Equivalence_Relation of the carrier of c1 st
for b2, b3 being set holds
( [b2,b3] in b1 iff ( b2 in the carrier of c1 & b3 in the carrier of c1 & ex b4 being FinSequence of the carrier of c1 st
( 1 < len b4 & b4 . 1 = b2 & b4 . (len b4) = b3 & ( for b5 being Nat st 2 <= b5 & b5 <= len b4 & not [(b4 . b5),(b4 . (b5 - 1))] in the InternalRel of c1 holds
[(b4 . (b5 - 1)),(b4 . b5)] in the InternalRel of c1 ) ) ) )
proof end;
uniqueness
for b1, b2 being Equivalence_Relation of the carrier of c1 st ( for b3, b4 being set holds
( [b3,b4] in b1 iff ( b3 in the carrier of c1 & b4 in the carrier of c1 & ex b5 being FinSequence of the carrier of c1 st
( 1 < len b5 & b5 . 1 = b3 & b5 . (len b5) = b4 & ( for b6 being Nat st 2 <= b6 & b6 <= len b5 & not [(b5 . b6),(b5 . (b6 - 1))] in the InternalRel of c1 holds
[(b5 . (b6 - 1)),(b5 . b6)] in the InternalRel of c1 ) ) ) ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff ( b3 in the carrier of c1 & b4 in the carrier of c1 & ex b5 being FinSequence of the carrier of c1 st
( 1 < len b5 & b5 . 1 = b3 & b5 . (len b5) = b4 & ( for b6 being Nat st 2 <= b6 & b6 <= len b5 & not [(b5 . b6),(b5 . (b6 - 1))] in the InternalRel of c1 holds
[(b5 . (b6 - 1)),(b5 . b6)] in the InternalRel of c1 ) ) ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines Path_Rel OSALG_4:def 4 :
for b1 being non empty Poset
for b2 being Equivalence_Relation of 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 Nat 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 ) ) ) ) );

theorem Th2: :: OSALG_4:2
for b1 being non empty Poset
for b2, b3 being Element of b1 st b2 <= b3 holds
[b2,b3] in Path_Rel b1
proof end;

definition
let c1 be non empty Poset;
let c2, c3 be Element of c1;
pred c2 ~= c3 means :Def5: :: OSALG_4:def 5
[a2,a3] in Path_Rel a1;
reflexivity
for b1 being Element of c1 holds [b1,b1] in Path_Rel c1
proof end;
symmetry
for b1, b2 being Element of c1 st [b1,b2] in Path_Rel c1 holds
[b2,b1] in Path_Rel c1
proof end;
end;

:: deftheorem Def5 defines ~= OSALG_4:def 5 :
for b1 being non empty Poset
for b2, b3 being Element of b1 holds
( b2 ~= b3 iff [b2,b3] in Path_Rel b1 );

theorem Th3: :: OSALG_4:3
for b1 being non empty Poset
for b2, b3, b4 being Element of b1 st b2 ~= b3 & b3 ~= b4 holds
b2 ~= b4
proof end;

definition
let c1 be non empty Poset;
func Components c1 -> non empty Subset-Family of a1 equals :: OSALG_4:def 6
Class (Path_Rel a1);
coherence
Class (Path_Rel c1) is non empty Subset-Family of c1
;
end;

:: deftheorem Def6 defines Components OSALG_4:def 6 :
for b1 being non empty Poset holds Components b1 = Class (Path_Rel b1);

registration
let c1 be non empty Poset;
cluster -> non empty Element of Components a1;
coherence
for b1 being Element of Components c1 holds not b1 is empty
proof end;
end;

definition
let c1 be non empty Poset;
mode Component of a1 is Element of Components a1;
end;

definition
let c1 be non empty Poset;
let c2 be Element of c1;
canceled;
func CComp c2 -> Component of a1 equals :: OSALG_4:def 8
Class (Path_Rel a1),a2;
correctness
coherence
Class (Path_Rel c1),c2 is Component of c1
;
by EQREL_1:def 5;
end;

:: deftheorem Def7 OSALG_4:def 7 :
canceled;

:: deftheorem Def8 defines CComp OSALG_4:def 8 :
for b1 being non empty Poset
for b2 being Element of b1 holds CComp b2 = Class (Path_Rel b1),b2;

theorem Th4: :: OSALG_4:4
for b1 being non empty Poset
for b2 being Element of b1 holds b2 in CComp b2 by EQREL_1:28;

theorem Th5: :: OSALG_4:5
for b1 being non empty Poset
for b2, b3 being Element of b1 st b2 <= b3 holds
CComp b2 = CComp b3
proof end;

definition
let c1 be non empty Poset;
let c2 be ManySortedSet of the carrier of c1;
let c3 be Component of c1;
func c2 -carrier_of c3 -> set equals :: OSALG_4:def 9
union { (a2 . b1) where B is Element of a1 : b1 in a3 } ;
correctness
coherence
union { (c2 . b1) where B is Element of c1 : b1 in c3 } is set
;
;
end;

:: deftheorem Def9 defines -carrier_of OSALG_4:def 9 :
for b1 being non empty Poset
for b2 being ManySortedSet of the carrier of b1
for b3 being Component of b1 holds b2 -carrier_of b3 = union { (b2 . b4) where B is Element of b1 : b4 in b3 } ;

theorem Th6: :: OSALG_4:6
for b1 being non empty Poset
for b2 being ManySortedSet of the carrier of b1
for b3 being Element of b1
for b4 being set st b4 in b2 . b3 holds
b4 in b2 -carrier_of (CComp b3)
proof end;

definition
let c1 be non empty Poset;
attr a1 is locally_directed means :Def10: :: OSALG_4:def 10
for b1 being Component of a1 holds b1 is directed;
end;

:: deftheorem Def10 defines locally_directed OSALG_4:def 10 :
for b1 being non empty Poset holds
( b1 is locally_directed iff for b2 being Component of b1 holds b2 is directed );

theorem Th7: :: OSALG_4:7
for b1 being non empty discrete Poset
for b2, b3 being Element of b1 st [b2,b3] in Path_Rel b1 holds
b2 = b3
proof end;

theorem Th8: :: OSALG_4:8
for b1 being non empty discrete Poset
for b2 being Component of b1 ex b3 being Element of b1 st b2 = {b3}
proof end;

theorem Th9: :: OSALG_4:9
for b1 being non empty discrete Poset holds b1 is locally_directed
proof end;

registration
cluster non empty locally_directed RelStr ;
existence
ex b1 being non empty Poset st b1 is locally_directed
proof end;
end;

registration
cluster locally_directed OverloadedRSSign ;
existence
ex b1 being OrderSortedSign st b1 is locally_directed
proof end;
end;

registration
cluster non empty discrete -> non empty locally_directed RelStr ;
coherence
for b1 being non empty Poset st b1 is discrete holds
b1 is locally_directed
by Th9;
end;

registration
let c1 be non empty locally_directed Poset;
cluster -> non empty directed Element of Components a1;
coherence
for b1 being Component of c1 holds b1 is directed
by Def10;
end;

theorem Th10: :: OSALG_4:10
{} is Equivalence_Relation of {}
proof end;

definition
let c1 be locally_directed OrderSortedSign;
let c2 be OSAlgebra of c1;
let c3 be MSEquivalence-like OrderSortedRelation of c2;
let c4 be Component of c1;
func CompClass c3,c4 -> Equivalence_Relation of the Sorts of a2 -carrier_of a4 means :Def11: :: OSALG_4:def 11
for b1, b2 being set holds
( [b1,b2] in a5 iff ex b3 being Element of a1 st
( b3 in a4 & [b1,b2] in a3 . b3 ) );
existence
ex b1 being Equivalence_Relation of the Sorts of c2 -carrier_of c4 st
for b2, b3 being set holds
( [b2,b3] in b1 iff ex b4 being Element of c1 st
( b4 in c4 & [b2,b3] in c3 . b4 ) )
proof end;
uniqueness
for b1, b2 being Equivalence_Relation of the Sorts of c2 -carrier_of c4 st ( for b3, b4 being set holds
( [b3,b4] in b1 iff ex b5 being Element of c1 st
( b5 in c4 & [b3,b4] in c3 . b5 ) ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff ex b5 being Element of c1 st
( b5 in c4 & [b3,b4] in c3 . b5 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def11 defines CompClass OSALG_4:def 11 :
for b1 being locally_directed OrderSortedSign
for b2 being OSAlgebra of b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being Component of b1
for b5 being Equivalence_Relation of 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 b1 st
( b8 in b4 & [b6,b7] in b3 . b8 ) ) );

definition
let c1 be locally_directed OrderSortedSign;
let c2 be OSAlgebra of c1;
let c3 be MSEquivalence-like OrderSortedRelation of c2;
let c4 be Element of c1;
func OSClass c3,c4 -> Subset of (Class (CompClass a3,(CComp a4))) means :Def12: :: OSALG_4:def 12
for b1 being set holds
( b1 in a5 iff ex b2 being set st
( b2 in the Sorts of a2 . a4 & b1 = Class (CompClass a3,(CComp a4)),b2 ) );
existence
ex b1 being Subset of (Class (CompClass c3,(CComp c4))) st
for b2 being set holds
( b2 in b1 iff ex b3 being set st
( b3 in the Sorts of c2 . c4 & b2 = Class (CompClass c3,(CComp c4)),b3 ) )
proof end;
uniqueness
for b1, b2 being Subset of (Class (CompClass c3,(CComp c4))) st ( for b3 being set holds
( b3 in b1 iff ex b4 being set st
( b4 in the Sorts of c2 . c4 & b3 = Class (CompClass c3,(CComp c4)),b4 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being set st
( b4 in the Sorts of c2 . c4 & b3 = Class (CompClass c3,(CComp c4)),b4 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def12 defines OSClass OSALG_4:def 12 :
for b1 being locally_directed OrderSortedSign
for b2 being OSAlgebra of b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being Element of b1
for b5 being Subset of (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 ) ) );

registration
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be MSEquivalence-like OrderSortedRelation of c2;
let c4 be Element of c1;
cluster OSClass a3,a4 -> non empty ;
coherence
not OSClass c3,c4 is empty
proof end;
end;

theorem Th11: :: OSALG_4:11
for b1 being locally_directed OrderSortedSign
for b2 being OSAlgebra of b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4, b5 being Element of b1 st b4 <= b5 holds
OSClass b3,b4 c= OSClass b3,b5
proof end;

definition
let c1 be locally_directed OrderSortedSign;
let c2 be OSAlgebra of c1;
let c3 be MSEquivalence-like OrderSortedRelation of c2;
func OSClass c3 -> OrderSortedSet of a1 means :Def13: :: OSALG_4:def 13
for b1 being Element of a1 holds a4 . b1 = OSClass a3,b1;
existence
ex b1 being OrderSortedSet of c1 st
for b2 being Element of c1 holds b1 . b2 = OSClass c3,b2
proof end;
uniqueness
for b1, b2 being OrderSortedSet of c1 st ( for b3 being Element of c1 holds b1 . b3 = OSClass c3,b3 ) & ( for b3 being Element of c1 holds b2 . b3 = OSClass c3,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def13 defines OSClass OSALG_4:def 13 :
for b1 being locally_directed OrderSortedSign
for b2 being OSAlgebra of b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being OrderSortedSet of b1 holds
( b4 = OSClass b3 iff for b5 being Element of b1 holds b4 . b5 = OSClass b3,b5 );

registration
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be MSEquivalence-like OrderSortedRelation of c2;
cluster OSClass a3 -> V2 ;
coherence
OSClass c3 is non-empty
proof end;
end;

definition
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be MSEquivalence-like OrderSortedRelation of c2;
let c4 be Element of c1;
let c5 be Element of the Sorts of c2 . c4;
func OSClass c3,c5 -> Element of OSClass a3,a4 equals :: OSALG_4:def 14
Class (CompClass a3,(CComp a4)),a5;
correctness
coherence
Class (CompClass c3,(CComp c4)),c5 is Element of OSClass c3,c4
;
by Def12;
end;

:: deftheorem Def14 defines OSClass OSALG_4:def 14 :
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being Element of b1
for b5 being Element of the Sorts of b2 . b4 holds OSClass b3,b5 = Class (CompClass b3,(CComp b4)),b5;

theorem Th12: :: OSALG_4:12
for b1 being non empty locally_directed Poset
for b2, b3 being Element of b1 st ex b4 being Element of b1 st
( b4 <= b2 & b4 <= b3 ) holds
ex b4 being Element of b1 st
( b2 <= b4 & b3 <= b4 )
proof end;

theorem Th13: :: OSALG_4:13
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4 being Element 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 )
proof end;

theorem Th14: :: OSALG_4:14
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being MSEquivalence-like OrderSortedRelation of b2
for b4, b5 being Element of b1
for b6 being Element of the Sorts of b2 . b4 st b4 <= b5 holds
for b7 being Element of the Sorts of b2 . b5 st b7 = b6 holds
OSClass b3,b6 = OSClass b3,b7
proof end;

definition
let c1 be locally_directed OrderSortedSign;
let c2 be Element of the OperSymbols of c1;
let c3 be non-empty OSAlgebra of c1;
let c4 be OSCongruence of c3;
let c5 be Element of Args c2,c3;
func c4 #_os c5 -> Element of product ((OSClass a4) * (the_arity_of a2)) means :Def15: :: OSALG_4:def 15
for b1 being Nat 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 & a6 . b1 = OSClass a4,b2 );
existence
ex b1 being Element of product ((OSClass c4) * (the_arity_of c2)) st
for b2 being Nat st b2 in dom (the_arity_of c2) holds
ex b3 being Element of the Sorts of c3 . ((the_arity_of c2) /. b2) st
( b3 = c5 . b2 & b1 . b2 = OSClass c4,b3 )
proof end;
uniqueness
for b1, b2 being Element of product ((OSClass c4) * (the_arity_of c2)) st ( for b3 being Nat st b3 in dom (the_arity_of c2) holds
ex b4 being Element of the Sorts of c3 . ((the_arity_of c2) /. b3) st
( b4 = c5 . b3 & b1 . b3 = OSClass c4,b4 ) ) & ( for b3 being Nat st b3 in dom (the_arity_of c2) holds
ex b4 being Element of the Sorts of c3 . ((the_arity_of c2) /. b3) st
( b4 = c5 . b3 & b2 . b3 = OSClass c4,b4 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def15 defines #_os OSALG_4:def 15 :
for b1 being locally_directed OrderSortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty OSAlgebra of b1
for b4 being OSCongruence 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 Nat 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 ) );

definition
let c1 be locally_directed OrderSortedSign;
let c2 be Element of the OperSymbols of c1;
let c3 be non-empty OSAlgebra of c1;
let c4 be OSCongruence of c3;
func OSQuotRes c4,c2 -> Function of (the Sorts of a3 * the ResultSort of a1) . a2,((OSClass a4) * the ResultSort of a1) . a2 means :Def16: :: OSALG_4:def 16
for b1 being Element of the Sorts of a3 . (the_result_sort_of a2) holds a5 . b1 = OSClass a4,b1;
existence
ex b1 being Function of (the Sorts of c3 * the ResultSort of c1) . c2,((OSClass c4) * the ResultSort of c1) . c2 st
for b2 being Element of the Sorts of c3 . (the_result_sort_of c2) holds b1 . b2 = OSClass c4,b2
proof end;
uniqueness
for b1, b2 being Function of (the Sorts of c3 * the ResultSort of c1) . c2,((OSClass c4) * the ResultSort of c1) . c2 st ( for b3 being Element of the Sorts of c3 . (the_result_sort_of c2) holds b1 . b3 = OSClass c4,b3 ) & ( for b3 being Element of the Sorts of c3 . (the_result_sort_of c2) holds b2 . b3 = OSClass c4,b3 ) holds
b1 = b2
proof end;
func OSQuotArgs c4,c2 -> Function of ((the Sorts of a3 # ) * the Arity of a1) . a2,(((OSClass a4) # ) * the Arity of a1) . a2 means :: OSALG_4:def 17
for b1 being Element of Args a2,a3 holds a5 . b1 = a4 #_os b1;
existence
ex b1 being Function of ((the Sorts of c3 # ) * the Arity of c1) . c2,(((OSClass c4) # ) * the Arity of c1) . c2 st
for b2 being Element of Args c2,c3 holds b1 . b2 = c4 #_os b2
proof end;
uniqueness
for b1, b2 being Function of ((the Sorts of c3 # ) * the Arity of c1) . c2,(((OSClass c4) # ) * the Arity of c1) . c2 st ( for b3 being Element of Args c2,c3 holds b1 . b3 = c4 #_os b3 ) & ( for b3 being Element of Args c2,c3 holds b2 . b3 = c4 #_os b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def16 defines OSQuotRes OSALG_4:def 16 :
for b1 being locally_directed OrderSortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty OSAlgebra of b1
for b4 being OSCongruence of b3
for b5 being Function 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 );

:: deftheorem Def17 defines OSQuotArgs OSALG_4:def 17 :
for b1 being locally_directed OrderSortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty OSAlgebra of b1
for b4 being OSCongruence of b3
for b5 being Function 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 );

definition
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be OSCongruence of c2;
func OSQuotRes c3 -> ManySortedFunction of the Sorts of a2 * the ResultSort of a1,(OSClass a3) * the ResultSort of a1 means :: OSALG_4:def 18
for b1 being OperSymbol of a1 holds a4 . b1 = OSQuotRes a3,b1;
existence
ex b1 being ManySortedFunction of the Sorts of c2 * the ResultSort of c1,(OSClass c3) * the ResultSort of c1 st
for b2 being OperSymbol of c1 holds b1 . b2 = OSQuotRes c3,b2
proof end;
uniqueness
for b1, b2 being ManySortedFunction of the Sorts of c2 * the ResultSort of c1,(OSClass c3) * the ResultSort of c1 st ( for b3 being OperSymbol of c1 holds b1 . b3 = OSQuotRes c3,b3 ) & ( for b3 being OperSymbol of c1 holds b2 . b3 = OSQuotRes c3,b3 ) holds
b1 = b2
proof end;
func OSQuotArgs c3 -> ManySortedFunction of (the Sorts of a2 # ) * the Arity of a1,((OSClass a3) # ) * the Arity of a1 means :: OSALG_4:def 19
for b1 being OperSymbol of a1 holds a4 . b1 = OSQuotArgs a3,b1;
existence
ex b1 being ManySortedFunction of (the Sorts of c2 # ) * the Arity of c1,((OSClass c3) # ) * the Arity of c1 st
for b2 being OperSymbol of c1 holds b1 . b2 = OSQuotArgs c3,b2
proof end;
uniqueness
for b1, b2 being ManySortedFunction of (the Sorts of c2 # ) * the Arity of c1,((OSClass c3) # ) * the Arity of c1 st ( for b3 being OperSymbol of c1 holds b1 . b3 = OSQuotArgs c3,b3 ) & ( for b3 being OperSymbol of c1 holds b2 . b3 = OSQuotArgs c3,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def18 defines OSQuotRes OSALG_4:def 18 :
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being OSCongruence 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 OperSymbol of b1 holds b4 . b5 = OSQuotRes b3,b5 );

:: deftheorem Def19 defines OSQuotArgs OSALG_4:def 19 :
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being OSCongruence 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 OperSymbol of b1 holds b4 . b5 = OSQuotArgs b3,b5 );

theorem Th15: :: OSALG_4:15
for b1 being locally_directed OrderSortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty OSAlgebra of b1
for b4 being OSCongruence 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
proof end;

definition
let c1 be locally_directed OrderSortedSign;
let c2 be Element of the OperSymbols of c1;
let c3 be non-empty OSAlgebra of c1;
let c4 be OSCongruence of c3;
func OSQuotCharact c4,c2 -> Function of (((OSClass a4) # ) * the Arity of a1) . a2,((OSClass a4) * the ResultSort of a1) . a2 means :Def20: :: OSALG_4:def 20
for b1 being Element of Args a2,a3 st a4 #_os b1 in (((OSClass a4) # ) * the Arity of a1) . a2 holds
a5 . (a4 #_os b1) = ((OSQuotRes a4,a2) * (Den a2,a3)) . b1;
existence
ex b1 being Function of (((OSClass c4) # ) * the Arity of c1) . c2,((OSClass c4) * the ResultSort of c1) . c2 st
for b2 being Element of Args c2,c3 st c4 #_os b2 in (((OSClass c4) # ) * the Arity of c1) . c2 holds
b1 . (c4 #_os b2) = ((OSQuotRes c4,c2) * (Den c2,c3)) . b2
proof end;
uniqueness
for b1, b2 being Function of (((OSClass c4) # ) * the Arity of c1) . c2,((OSClass c4) * the ResultSort of c1) . c2 st ( for b3 being Element of Args c2,c3 st c4 #_os b3 in (((OSClass c4) # ) * the Arity of c1) . c2 holds
b1 . (c4 #_os b3) = ((OSQuotRes c4,c2) * (Den c2,c3)) . b3 ) & ( for b3 being Element of Args c2,c3 st c4 #_os b3 in (((OSClass c4) # ) * the Arity of c1) . c2 holds
b2 . (c4 #_os b3) = ((OSQuotRes c4,c2) * (Den c2,c3)) . b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def20 defines OSQuotCharact OSALG_4:def 20 :
for b1 being locally_directed OrderSortedSign
for b2 being Element of the OperSymbols of b1
for b3 being non-empty OSAlgebra of b1
for b4 being OSCongruence of b3
for b5 being Function 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 );

definition
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be OSCongruence of c2;
func OSQuotCharact c3 -> ManySortedFunction of ((OSClass a3) # ) * the Arity of a1,(OSClass a3) * the ResultSort of a1 means :Def21: :: OSALG_4:def 21
for b1 being OperSymbol of a1 holds a4 . b1 = OSQuotCharact a3,b1;
existence
ex b1 being ManySortedFunction of ((OSClass c3) # ) * the Arity of c1,(OSClass c3) * the ResultSort of c1 st
for b2 being OperSymbol of c1 holds b1 . b2 = OSQuotCharact c3,b2
proof end;
uniqueness
for b1, b2 being ManySortedFunction of ((OSClass c3) # ) * the Arity of c1,(OSClass c3) * the ResultSort of c1 st ( for b3 being OperSymbol of c1 holds b1 . b3 = OSQuotCharact c3,b3 ) & ( for b3 being OperSymbol of c1 holds b2 . b3 = OSQuotCharact c3,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def21 defines OSQuotCharact OSALG_4:def 21 :
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being OSCongruence 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 OperSymbol of b1 holds b4 . b5 = OSQuotCharact b3,b5 );

definition
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be OSCongruence of c2;
func QuotOSAlg c2,c3 -> OSAlgebra of a1 equals :: OSALG_4:def 22
MSAlgebra(# (OSClass a3),(OSQuotCharact a3) #);
coherence
MSAlgebra(# (OSClass c3),(OSQuotCharact c3) #) is OSAlgebra of c1
by OSALG_1:17;
end;

:: deftheorem Def22 defines QuotOSAlg OSALG_4:def 22 :
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being OSCongruence of b2 holds QuotOSAlg b2,b3 = MSAlgebra(# (OSClass b3),(OSQuotCharact b3) #);

registration
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be OSCongruence of c2;
cluster QuotOSAlg a2,a3 -> strict non-empty ;
coherence
( QuotOSAlg c2,c3 is strict & QuotOSAlg c2,c3 is non-empty )
by MSUALG_1:def 8;
end;

definition
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be OSCongruence of c2;
let c4 be Element of c1;
func OSNat_Hom c2,c3,c4 -> Function of the Sorts of a2 . a4, OSClass a3,a4 means :Def23: :: OSALG_4:def 23
for b1 being Element of the Sorts of a2 . a4 holds a5 . b1 = OSClass a3,b1;
existence
ex b1 being Function of the Sorts of c2 . c4, OSClass c3,c4 st
for b2 being Element of the Sorts of c2 . c4 holds b1 . b2 = OSClass c3,b2
proof end;
uniqueness
for b1, b2 being Function of the Sorts of c2 . c4, OSClass c3,c4 st ( for b3 being Element of the Sorts of c2 . c4 holds b1 . b3 = OSClass c3,b3 ) & ( for b3 being Element of the Sorts of c2 . c4 holds b2 . b3 = OSClass c3,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def23 defines OSNat_Hom OSALG_4:def 23 :
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being OSCongruence of b2
for b4 being Element of b1
for b5 being Function 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 );

definition
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be OSCongruence of c2;
func OSNat_Hom c2,c3 -> ManySortedFunction of a2,(QuotOSAlg a2,a3) means :Def24: :: OSALG_4:def 24
for b1 being Element of a1 holds a4 . b1 = OSNat_Hom a2,a3,b1;
existence
ex b1 being ManySortedFunction of c2,(QuotOSAlg c2,c3) st
for b2 being Element of c1 holds b1 . b2 = OSNat_Hom c2,c3,b2
proof end;
uniqueness
for b1, b2 being ManySortedFunction of c2,(QuotOSAlg c2,c3) st ( for b3 being Element of c1 holds b1 . b3 = OSNat_Hom c2,c3,b3 ) & ( for b3 being Element of c1 holds b2 . b3 = OSNat_Hom c2,c3,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def24 defines OSNat_Hom OSALG_4:def 24 :
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being OSCongruence of b2
for b4 being ManySortedFunction of b2,(QuotOSAlg b2,b3) holds
( b4 = OSNat_Hom b2,b3 iff for b5 being Element of b1 holds b4 . b5 = OSNat_Hom b2,b3,b5 );

theorem Th16: :: OSALG_4:16
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being OSCongruence of b2 holds
( OSNat_Hom b2,b3 is_epimorphism b2, QuotOSAlg b2,b3 & OSNat_Hom b2,b3 is order-sorted )
proof end;

theorem Th17: :: OSALG_4:17
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3 st b4 is_homomorphism b2,b3 & b4 is order-sorted holds
MSCng b4 is OSCongruence of b2
proof end;

definition
let c1 be locally_directed OrderSortedSign;
let c2, c3 be non-empty OSAlgebra of c1;
let c4 be ManySortedFunction of c2,c3;
assume E29: ( c4 is_homomorphism c2,c3 & c4 is order-sorted ) ;
func OSCng c4 -> OSCongruence of a2 equals :Def25: :: OSALG_4:def 25
MSCng a4;
correctness
coherence
MSCng c4 is OSCongruence of c2
;
by E29, Th17;
end;

:: deftheorem Def25 defines OSCng OSALG_4:def 25 :
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3 st b4 is_homomorphism b2,b3 & b4 is order-sorted holds
OSCng b4 = MSCng b4;

definition
let c1 be locally_directed OrderSortedSign;
let c2, c3 be non-empty OSAlgebra of c1;
let c4 be ManySortedFunction of c2,c3;
let c5 be Element of c1;
assume E30: ( c4 is_homomorphism c2,c3 & c4 is order-sorted ) ;
func OSHomQuot c4,c5 -> Function of the Sorts of (QuotOSAlg a2,(OSCng a4)) . a5,the Sorts of a3 . a5 means :Def26: :: OSALG_4:def 26
for b1 being Element of the Sorts of a2 . a5 holds a6 . (OSClass (OSCng a4),b1) = (a4 . a5) . b1;
existence
ex b1 being Function of the Sorts of (QuotOSAlg c2,(OSCng c4)) . c5,the Sorts of c3 . c5 st
for b2 being Element of the Sorts of c2 . c5 holds b1 . (OSClass (OSCng c4),b2) = (c4 . c5) . b2
proof end;
uniqueness
for b1, b2 being Function of the Sorts of (QuotOSAlg c2,(OSCng c4)) . c5,the Sorts of c3 . c5 st ( for b3 being Element of the Sorts of c2 . c5 holds b1 . (OSClass (OSCng c4),b3) = (c4 . c5) . b3 ) & ( for b3 being Element of the Sorts of c2 . c5 holds b2 . (OSClass (OSCng c4),b3) = (c4 . c5) . b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def26 defines OSHomQuot OSALG_4:def 26 :
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3
for b5 being Element of b1 st b4 is_homomorphism b2,b3 & b4 is order-sorted holds
for b6 being Function 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 );

definition
let c1 be locally_directed OrderSortedSign;
let c2, c3 be non-empty OSAlgebra of c1;
let c4 be ManySortedFunction of c2,c3;
func OSHomQuot c4 -> ManySortedFunction of (QuotOSAlg a2,(OSCng a4)),a3 means :Def27: :: OSALG_4:def 27
for b1 being Element of a1 holds a5 . b1 = OSHomQuot a4,b1;
existence
ex b1 being ManySortedFunction of (QuotOSAlg c2,(OSCng c4)),c3 st
for b2 being Element of c1 holds b1 . b2 = OSHomQuot c4,b2
proof end;
uniqueness
for b1, b2 being ManySortedFunction of (QuotOSAlg c2,(OSCng c4)),c3 st ( for b3 being Element of c1 holds b1 . b3 = OSHomQuot c4,b3 ) & ( for b3 being Element of c1 holds b2 . b3 = OSHomQuot c4,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def27 defines OSHomQuot OSALG_4:def 27 :
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3
for b5 being ManySortedFunction of (QuotOSAlg b2,(OSCng b4)),b3 holds
( b5 = OSHomQuot b4 iff for b6 being Element of b1 holds b5 . b6 = OSHomQuot b4,b6 );

theorem Th18: :: OSALG_4:18
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3 st b4 is_homomorphism b2,b3 & b4 is order-sorted holds
( OSHomQuot b4 is_monomorphism QuotOSAlg b2,(OSCng b4),b3 & OSHomQuot b4 is order-sorted )
proof end;

theorem Th19: :: OSALG_4:19
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3 st b4 is_epimorphism b2,b3 & b4 is order-sorted holds
OSHomQuot b4 is_isomorphism QuotOSAlg b2,(OSCng b4),b3
proof end;

theorem Th20: :: OSALG_4:20
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3 st b4 is_epimorphism b2,b3 & b4 is order-sorted holds
QuotOSAlg b2,(OSCng b4),b3 are_isomorphic
proof end;

definition
let c1 be OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be MSEquivalence-like OrderSortedRelation of c2;
attr a3 is monotone means :Def28: :: OSALG_4:def 28
for b1, b2 being OperSymbol of a1 st b1 <= b2 holds
for b3 being Element of Args b1,a2
for b4 being Element of Args b2,a2 st ( for b5 being Nat st b5 in dom 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;

:: deftheorem Def28 defines monotone OSALG_4:def 28 :
for b1 being OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being MSEquivalence-like OrderSortedRelation of b2 holds
( b3 is monotone iff for b4, b5 being OperSymbol of b1 st b4 <= b5 holds
for b6 being Element of Args b4,b2
for b7 being Element of Args b5,b2 st ( for b8 being Nat st b8 in dom 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) );

theorem Th21: :: OSALG_4:21
for b1 being OrderSortedSign
for b2 being non-empty OSAlgebra of b1 holds [|the Sorts of b2,the Sorts of b2|] is OSCongruence of b2
proof end;

theorem Th22: :: OSALG_4:22
for b1 being OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being OSCongruence of b2 st b3 = [|the Sorts of b2,the Sorts of b2|] holds
b3 is monotone
proof end;

registration
let c1 be OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
cluster monotone OrderSortedRelation of a2;
existence
ex b1 being OSCongruence of c2 st b1 is monotone
proof end;
end;

registration
let c1 be OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
cluster MSEquivalence-like monotone OrderSortedRelation of a2;
existence
ex b1 being MSEquivalence-like OrderSortedRelation of c2 st b1 is monotone
proof end;
end;

theorem Th23: :: OSALG_4:23
for b1 being OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being MSEquivalence-like monotone OrderSortedRelation of b2 holds b3 is MSCongruence-like
proof end;

registration
let c1 be OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
cluster MSEquivalence-like monotone -> MSEquivalence-like MSCongruence-like OrderSortedRelation of a2;
coherence
for b1 being MSEquivalence-like OrderSortedRelation of c2 st b1 is monotone holds
b1 is MSCongruence-like
by Th23;
end;

theorem Th24: :: OSALG_4:24
for b1 being OrderSortedSign
for b2 being non-empty monotone OSAlgebra of b1
for b3 being OSCongruence of b2 holds b3 is monotone
proof end;

registration
let c1 be OrderSortedSign;
let c2 be non-empty monotone OSAlgebra of c1;
cluster -> monotone OrderSortedRelation of a2;
coherence
for b1 being OSCongruence of c2 holds b1 is monotone
by Th24;
end;

registration
let c1 be locally_directed OrderSortedSign;
let c2 be non-empty OSAlgebra of c1;
let c3 be monotone OSCongruence of c2;
cluster QuotOSAlg a2,a3 -> strict non-empty monotone ;
coherence
QuotOSAlg c2,c3 is monotone
proof end;
end;

theorem Th25: :: OSALG_4:25
canceled;

theorem Th26: :: OSALG_4:26
for b1 being locally_directed OrderSortedSign
for b2 being non-empty OSAlgebra of b1
for b3 being non-empty monotone OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3 st b4 is_homomorphism b2,b3 & b4 is order-sorted holds
OSCng b4 is monotone
proof end;

definition
let c1 be locally_directed OrderSortedSign;
let c2, c3 be non-empty OSAlgebra of c1;
let c4 be ManySortedFunction of c2,c3;
let c5 be OSCongruence of c2;
let c6 be Element of c1;
assume E39: ( c4 is_homomorphism c2,c3 & c4 is order-sorted & c5 c= OSCng c4 ) ;
func OSHomQuot c4,c5,c6 -> Function of the Sorts of (QuotOSAlg a2,a5) . a6,the Sorts of a3 . a6 means :Def29: :: OSALG_4:def 29
for b1 being Element of the Sorts of a2 . a6 holds a7 . (OSClass a5,b1) = (a4 . a6) . b1;
existence
ex b1 being Function of the Sorts of (QuotOSAlg c2,c5) . c6,the Sorts of c3 . c6 st
for b2 being Element of the Sorts of c2 . c6 holds b1 . (OSClass c5,b2) = (c4 . c6) . b2
proof end;
uniqueness
for b1, b2 being Function of the Sorts of (QuotOSAlg c2,c5) . c6,the Sorts of c3 . c6 st ( for b3 being Element of the Sorts of c2 . c6 holds b1 . (OSClass c5,b3) = (c4 . c6) . b3 ) & ( for b3 being Element of the Sorts of c2 . c6 holds b2 . (OSClass c5,b3) = (c4 . c6) . b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def29 defines OSHomQuot OSALG_4:def 29 :
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3
for b5 being OSCongruence of b2
for b6 being Element of b1 st b4 is_homomorphism b2,b3 & b4 is order-sorted & b5 c= OSCng b4 holds
for b7 being Function 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 );

definition
let c1 be locally_directed OrderSortedSign;
let c2, c3 be non-empty OSAlgebra of c1;
let c4 be ManySortedFunction of c2,c3;
let c5 be OSCongruence of c2;
func OSHomQuot c4,c5 -> ManySortedFunction of (QuotOSAlg a2,a5),a3 means :Def30: :: OSALG_4:def 30
for b1 being Element of a1 holds a6 . b1 = OSHomQuot a4,a5,b1;
existence
ex b1 being ManySortedFunction of (QuotOSAlg c2,c5),c3 st
for b2 being Element of c1 holds b1 . b2 = OSHomQuot c4,c5,b2
proof end;
uniqueness
for b1, b2 being ManySortedFunction of (QuotOSAlg c2,c5),c3 st ( for b3 being Element of c1 holds b1 . b3 = OSHomQuot c4,c5,b3 ) & ( for b3 being Element of c1 holds b2 . b3 = OSHomQuot c4,c5,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def30 defines OSHomQuot OSALG_4:def 30 :
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3
for b5 being OSCongruence of b2
for b6 being ManySortedFunction of (QuotOSAlg b2,b5),b3 holds
( b6 = OSHomQuot b4,b5 iff for b7 being Element of b1 holds b6 . b7 = OSHomQuot b4,b5,b7 );

theorem Th27: :: OSALG_4:27
for b1 being locally_directed OrderSortedSign
for b2, b3 being non-empty OSAlgebra of b1
for b4 being ManySortedFunction of b2,b3
for b5 being OSCongruence of b2 st b4 is_homomorphism b2,b3 & b4 is order-sorted & b5 c= OSCng b4 holds
( OSHomQuot b4,b5 is_homomorphism QuotOSAlg b2,b5,b3 & OSHomQuot b4,b5 is order-sorted )
proof end;