reserve i for Nat,
  j for Element of NAT,
  X,Y,x,y,z for set;
reserve C for initialized ConstructorSignature,
  s for SortSymbol of C,
  o for OperSymbol of C,
  c for constructor OperSymbol of C;
reserve a,b for expression of C, an_Adj C;
reserve t, t1,t2 for expression of C, a_Type C;
reserve p for FinSequence of QuasiTerms C;
reserve e for expression of C;
reserve a,a9 for expression of C, an_Adj C;
reserve q for pure expression of C, a_Type C,
  A for finite Subset of QuasiAdjs C;
reserve T for quasi-type of C;

theorem Th130:
  for S being non void Signature
  for X being non empty ManySortedSet of the carrier of S
  for f being term-transformation of S,X
  for s being SortSymbol of S
  for p being FinSequence of (the Sorts of Free(S,X)).s
  holds f*p is FinSequence of (the Sorts of Free(S,X)).s &
  card (f*p) = len p
proof
  let S be non void Signature;
  let X be non empty ManySortedSet of the carrier of S;
  set A = Free(S,X);
  let f be term-transformation of S,X;
  let s be SortSymbol of S;
  let p be FinSequence of (the Sorts of A).s;
A1: Union the Sorts of A = {} or Union the Sorts of A <> {};
A2: dom the Sorts of A = the carrier of S by PARTFUN1:def 2;
A3: dom f = Union the Sorts of A by A1,FUNCT_2:def 1;
  (the Sorts of A).s in rng the Sorts of A by A2,FUNCT_1:def 3;
  then (the Sorts of A).s c= Union the Sorts of A by ZFMISC_1:74;
  then rng p c= dom f by A3;
  then
A4: dom (f*p) = dom p by RELAT_1:27;
  dom p = Seg len p by FINSEQ_1:def 3;
  then
A5: f*p is FinSequence by A4,FINSEQ_1:def 2;
A6: rng(f*p) c= (the Sorts of A).s
  proof
    let z be object;
    assume z in rng(f*p);
    then consider i being object such that
A7: i in dom(f*p) and
A8: z = (f*p).i by FUNCT_1:def 3;
    p.i in rng p by A4,A7,FUNCT_1:def 3;
    then f.(p.i) in (the Sorts of A).s by Th129;
    hence thesis by A7,A8,FUNCT_1:12;
  end;
  hence f*p is FinSequence of (the Sorts of Free(S,X)).s by A5,FINSEQ_1:def 4;
  reconsider q = f*p as FinSequence of (the Sorts of A).s by A5,A6,
FINSEQ_1:def 4;
  thus card(f*p) = len q .= len p by A4,FINSEQ_3:29;
end;
