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;
reserve
  s2 for s1-reachable SortSymbol of S,
  g1 for Translation of Free(S,Y),s1,s2,
  g for Translation of Free(S,X),s1,s2;

theorem Th70:
  X is non-trivial & the_sort_of t = s implies
  card Coim(t,a) c= card Coim(C-sub t,a)
  proof assume that
ZZ: X is non-trivial and
Z0: the_sort_of t = s;
    defpred P[context of x] means
    for C st C = $1 holds card Coim(t,a) c= card Coim(C-sub t,a);
A0: P[x-term] by Z0,Th41;
A1: for o,p st p is x-context_including
    holds P[x-context_in p] implies
    for C being context of x st C = o-term p holds P[C]
    proof
      let o,p;
      assume Z1: p is x-context_including;
      assume Z2: P[x-context_in p];
      set i = x-context_pos_in p;
A6:   i in dom p = dom the_arity_of o by Z1,Th71,MSUALG_3:6;
      then consider j such that
A3:   i = 1+j by NAT_1:10,FINSEQ_3:25;
      card (<*j*>^^Coim((x-context_in p)-sub t,a))
      = card Coim((x-context_in p)-sub t,a) by Th1;
      then consider f being Function such that
A2:   f is one-to-one & dom f = Coim(t,a) &
      rng f c= <*j*>^^Coim((x-context_in p)-sub t,a)
      by Z2,CARD_1:10;
      let C be context of x;
      assume Z3: C = o-term p;
      x-context_in p = p.i by Z1,Th71;
      then x-context_in p in (the Sorts of Free(S,X)).((the_arity_of o)/.i)
      by A6,MSUALG_6:2;
      then the_sort_of (x-context_in p) = (the_arity_of o)/.i by SORT;
      then reconsider q = p+*(x-context_pos_in p,(x-context_in p)-sub t)
      as Element of Args(o,Free(S,X)) by MSUALG_6:7;
A4:   C-sub t = o-term q by ZZ,Z0,Z1,Z3,Th43;
      <*j*>^^Coim((x-context_in p)-sub t,a) c= Coim(C-sub t,a)
      proof
        let r be object;
        assume r in <*j*>^^Coim((x-context_in p)-sub t,a);
        then consider n being Element of Coim((x-context_in p)-sub t,a)
        such that
A5:     r = <*j*>^n & n in Coim((x-context_in p)-sub t,a);
        Coim((x-context_in p)-sub t,a) c= dom((x-context_in p)-sub t)
        by RELAT_1:132;
        then reconsider n as Element of dom((x-context_in p)-sub t) by A5;
        i <= len p & dom q = dom the_arity_of o by A6,FINSEQ_3:25,MSUALG_3:6;
        then j < len p = len q & q.i = (x-context_in p)-sub t
        by A3,Z1,Th71,MSUALG_3:6,NAT_1:13,FINSEQ_3:29,FUNCT_7:31;
        then
A9:     <*j*>^n in dom (C-sub t) &
        (C-sub t).r = ((x-context_in p)-sub t).n in {a}
        by A3,A4,A5,TREES_4:11,12,FUNCT_1:def 7;
        thus thesis by A5,A9,FUNCT_1:def 7;
      end;
      then rng f c= Coim(C-sub t,a) by A2;
      hence P[C] by A2,CARD_1:10;
    end;
    P[C] from ContextInd(A0,A1);
    hence thesis;
end;
