theorem Th52:
  for h being Endomorphism of T st
  (for s,x holds h.s.(x-term) = x-term) holds h = id the Sorts of T
  proof
    let h be Endomorphism of T;
A1: id the Sorts of T is_homomorphism T,T by MSUALG_3:9;
A2: h is_homomorphism T,T by MSUALG_6:def 2;
    assume Z0: for s,x holds h.s.(x-term) = x-term;
    h||FreeGen T = (id the Sorts of T)||FreeGen T
    proof
      let s be SortSymbol of S;
      thus (h||FreeGen T).s = ((id the Sorts of T)||FreeGen T).s
      proof
        let t be Element of (FreeGen T).s;
A6:     (FreeGen T).s c= (the Sorts of T).s by PBOOLE:def 2,def 18;
        (FreeGen T).s = FreeGen(s,X) by MSAFREE:def 16;
        then consider x being set such that
A4:     x in X.s & t = root-tree [x,s] by MSAFREE:def 15;
        reconsider x as Element of X.s by A4;
        thus (h||FreeGen T).s.t = ((h.s)|((FreeGen T).s)).t by MSAFREE:def 1
        .= h.s.(x-term) by A4,FUNCT_1:49
        .= x-term by Z0
        .= (id ((the Sorts of T).s)).t by A4,A6,FUNCT_1:18
        .= ((id the Sorts of T).s).t by MSUALG_3:def 1
        .= (((id the Sorts of T).s)|((FreeGen T).s)).t by FUNCT_1:49
        .= ((id the Sorts of T)||FreeGen T).s.t by MSAFREE:def 1;
      end;
    end;
    hence h = id the Sorts of T by A1,A2,EXTENS_1:19;
  end;
