reserve S,S9 for non void Signature,
  f,g for Function;

theorem Th37:
  f,g form_a_replacement_in S implies for f9 being Function of the
carrier of S, the carrier of S with-replacement (f,g) st f9 = (the carrier of S
  )-indexing f for g9 being rng-retract of (the carrier' of S)-indexing g holds
  the Arity of S with-replacement (f,g) = f9* *(the Arity of S)*g9
proof
  set ff = (the carrier of S)-indexing f;
  set gg = (the carrier' of S)-indexing g;
  set T = S with-replacement (f,g);
  assume
A1: f,g form_a_replacement_in S;
  then
A2: ff, gg form_morphism_between S, T by Def4;
  let f9 be Function of the carrier of S, the carrier of S with-replacement (f
  ,g) such that
A3: f9 = (the carrier of S)-indexing f;
  let g9 be rng-retract of gg;
  the carrier' of T = rng gg by A1,Def4;
  hence the Arity of T = (the Arity of T)*id rng gg by FUNCT_2:17
    .= (the Arity of T)*(gg*g9) by Def2
    .= (the Arity of T)*gg*g9 by RELAT_1:36
    .= f9* *(the Arity of S)*g9 by A2,A3,Th35;
end;
