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

theorem
  for S being non void Signature, E being Extension of S st f,g
  form_a_replacement_in E holds E with-replacement(f,g) is Extension of S
  with-replacement(f,g)
proof
  let S be non void Signature, E be Extension of S;
  set f9 = (the carrier of E)-indexing f;
  set g9 = (the carrier' of E)-indexing g;
  set gg = (the carrier' of S)-indexing g;
  set T = E with-replacement (f,g);
A1: (the carrier' of S)-indexing gg = gg by Th11;
  assume
A2: f,g form_a_replacement_in E;
  then f,g form_a_replacement_in S by Th52;
  then (the carrier of S)-indexing f,gg form_a_replacement_in S by Th30;
  then
A3: f,gg form_a_replacement_in S by A1,Th30;
A4: S is Subsignature of E by Def5;
  then
A5: g9|the carrier' of S = (the carrier' of S)-indexing g by Th17,INSTALG1:10;
  f9, g9 form_morphism_between E, T by A2,Th40;
  then
A6: S with-replacement (f9|the carrier of S, g9|the carrier' of S) is
  Subsignature of T by A4,Th39,INSTALG1:18;
  f9|the carrier of S = (the carrier of S)-indexing f by A4,Th17,INSTALG1:10;
  then S with-replacement (f9|the carrier of S, g9|the carrier' of S) = S
  with-replacement (f, (the carrier' of S)-indexing g) by A3,A5,Th43;
  hence S with-replacement(f,g) is Subsignature of E with-replacement(f,g) by
A2,A6,Th44,Th52;
end;
