reserve
  a,b for object, I,J for set, f for Function, R for Relation,
  i,j,n for Nat, m for (Element of NAT),
  S for non empty non void ManySortedSign,
  s,s1,s2 for SortSymbol of S,
  o for OperSymbol of S,
  X for non-empty ManySortedSet of the carrier of S,
  x,x1,x2 for (Element of X.s), x11 for (Element of X.s1),
  T for all_vars_including inheriting_operations free_in_itself
  (X,S)-terms MSAlgebra over S,
  g for Translation of Free(S,X),s1,s2,
  h for Endomorphism of Free(S,X);
reserve
  r,r1,r2 for (Element of T),
  t,t1,t2 for (Element of Free(S,X));
reserve
  Y for infinite-yielding ManySortedSet of the carrier of S,
  y,y1 for (Element of Y.s), y11 for (Element of Y.s1),
  Q for all_vars_including inheriting_operations free_in_itself
  (Y,S)-terms MSAlgebra over S,
  q,q1 for (Element of Args(o,Free(S,Y))),
  u,u1,u2 for (Element of Q),
  v,v1,v2 for (Element of Free(S,Y)),
  Z for non-trivial ManySortedSet of the carrier of S,
  z,z1 for (Element of Z.s),
  l,l1 for (Element of Free(S,Z)),
  R for all_vars_including inheriting_operations free_in_itself
  (Z,S)-terms MSAlgebra over S,
  k,k1 for Element of Args(o,Free(S,Z));
reserve c,c1,c2 for set, d,d1 for DecoratedTree;
reserve
  w for (Element of Args(o,T)),
  p,p1 for Element of Args(o,Free(S,X));
reserve C for (context of x), C1 for (context of y), C9 for (context of z),
  C11 for (context of x11), C12 for (context of y11), D for context of s,X;
reserve
  S9 for sufficiently_rich non empty non void ManySortedSign,
  s9 for SortSymbol of S9,
  o9 for s9-dependent OperSymbol of S9,
  X9 for non-trivial ManySortedSet of the carrier of S9,
  x9 for (Element of X9.s9);
reserve h1 for x-constant Homomorphism of Free(S,X), T,
  h2 for y-constant Homomorphism of Free(S,Y), Q;

theorem Th79:
  T is struct-invariant & x1 <> x2 & r is x2-omitting implies
  Hom(T,x1,x2).r is x1-omitting
  proof assume that
AA: for o for p being Element of Args(o,T) st Den(o,T).p = Den(o,Free(S,X)).p
    for s,x1,x2 holds
    Den(o,T).(Hom(T,x1,x2)#p) = Den(o,Free(S,X)).(Hom(T,x1,x2)#p) and
A0: x1 <> x2;
    set h = Hom(T,x1,x2);
    set s0 = s;
    defpred P[Element of T] means
    $1 is x2-omitting implies h.$1 is x1-omitting;
A1: for s,x,r st r = x-term holds P[r]
    proof
      let s,x,r;
      assume Z0: r = x-term;
      assume Z1: r is x2-omitting;
      per cases;
      suppose
A2:     s0 <> s or x1 <> x & x2 <> x;
        then Hom(T,x1,x2).s.r = r & the_sort_of @r = the_sort_of r
        by Z0,HOM,Lem00;
        then Hom(T,x1,x2).(the_sort_of r).r = r & x-term is x1-omitting
        by A2,Z0,SORT,ThC1;
        hence h.r is x1-omitting by Z0,ABBR;
      end;
      suppose
        s0 = s & x1 = x;
        then h.s.r = x2-term & the_sort_of @r = the_sort_of r by Z0,HOM,Lem00;
        then
A4:     h.(the_sort_of r).r = x2-term by Z0,SORT;
        x2-term is x1-omitting by A0,ThC1;
        hence h.r is x1-omitting by A4,ABBR;
      end;
      suppose
A3:     s0 = s & x2 = x;
        x2-term is non x2-omitting;
        hence h.r is x1-omitting by Z0,Z1,A3;
      end;
    end;
A2: for o, p, r st r = o-term p &
      for t being Element of T st t in rng p holds P[t]
    holds P[r]
    proof
      let o, p, r;
      assume Z1: r = o-term p;
      assume Z2: for t being Element of T st t in rng p holds P[t];
      assume r is x2-omitting;
      then
S3:   o-term p is x2-omitting by Z1;
      the_sort_of @r = the_sort_of r by Lem00;
      then
A6:   the_sort_of r = the_result_sort_of o by Z1,Th8;
      then o-term p in (the Sorts of T).the_result_sort_of o by Z1,SORT;
      then
A5:   Den(o,Free(S,X)).p in (the Sorts of T).the_result_sort_of o
      by MSAFREE4:13;
      then reconsider q = p as Element of Args(o,T) by MSAFREE4:def 8;
      Args(o,T) c= Args(o,Free(S,X)) by MSAFREE4:41;
      then reconsider m = h#q as Element of Args(o,Free(S,X));
A7:   Den(o,T).q = Den(o,Free(S,X)).p = o-term p by A5,MSAFREE4:def 8,13;
A9:   h.(the_result_sort_of o).r = Den(o,T).(h#q)
      by Z1,A7,MSUALG_3:def 7,MSUALG_6:def 2
      .= Den(o,Free(S,X)).m by AA,A7 .= o-term m by MSAFREE4:13;
      now let i; assume
B1:     i in dom m;
B2:     dom m = dom the_arity_of o = dom p by MSUALG_3:6;
        then
B3:     p.i in rng p & p/.i = p.i = q/.i by B1,FUNCT_1:def 3,PARTFUN1:def 6;
        then
B4:     P[q/.i] by Z2;
        q/.i in (the Sorts of T).((the_arity_of o)/.i) by B1,B2,B3,MSUALG_6:2;
        then
B5:     the_sort_of (q/.i) = (the_arity_of o)/.i by SORT;
        m/.i = m.i = h.((the_arity_of o)/.i).(q/.i)
        by B1,PARTFUN1:def 6,B2,B3,MSUALG_3:def 6;
        then h.(q/.i) = m/.i & p/.i is x2-omitting by B1,B2,S3,B5,ABBR,Th54;
        hence m/.i is x1-omitting by B3,B4,OMIT;
      end;
      then o-term m is x1-omitting by Th54;
      hence h.r is x1-omitting by A9,A6,ABBR;
    end;
    thus P[r] from TermAlgebraInd(A1,A2);
  end;
