reserve S for OrderSortedSign;
reserve S for OrderSortedSign,
  X for ManySortedSet of S,
  o for OperSymbol of S ,
  b for Element of ([:the carrier' of S,{the carrier of S}:] \/ Union (coprod X
  ))*;
reserve x for set;

theorem Th27:
  for S be locally_directed OrderSortedSign, X be non-empty
  ManySortedSet of S holds PTCongruence(X) is monotone
proof
  let S be locally_directed OrderSortedSign, X be non-empty ManySortedSet of S;
  set PTA = ParsedTermsOSA(X), P = PTCongruence X;
  thus P is monotone
  proof
    let o1,o2 be OperSymbol of S such that
A1: o1 <= o2;
A2: o1 ~= o2 by A1;
A3: the_result_sort_of o1 <= the_result_sort_of o2 by A1;
    let x1 be Element of Args(o1,PTA), x2 be Element of Args(o2,PTA) such that
A4: for y being Nat st y in dom x1 holds [x1.y,x2.y] in P.((
    the_arity_of o2)/.y);
    (the_arity_of o1) <= (the_arity_of o2) by A1;
    then
A5: len (the_arity_of o1) = len (the_arity_of o2);
    then dom (the_arity_of o2) = dom (the_arity_of o1) by FINSEQ_3:29;
    then dom the_arity_of o2 = dom x1 by MSUALG_3:6;
    hence thesis by A4,A2,A3,A5,Th26;
  end;
end;
