reserve A for set,
  C for non empty set,
  B for Subset of A,
  x for Element of A,
  f,g for Function of A,C;

theorem Th2:
  f|B = g|B iff for x st x in B holds g.x = f.x
proof
  thus f|B = g|B implies for x st x in B holds g.x = f.x
  proof
    assume
A1: f|B = g|B;
    let x;
    assume
A2: x in B;
    hence g.x = (g|B).x by FUNCT_1:49
      .= f.x by A1,A2,FUNCT_1:49;
  end;
  reconsider f9=f|B, g9=g|B as Function of B,C by FUNCT_2:32;
  assume
A3: for x st x in B holds g.x = f.x;
A4: now
    let x be object;
    assume
A5: x in B;
    hence f9.x = f.x by FUNCT_1:49
      .= g.x by A3,A5
      .= g9.x by A5,FUNCT_1:49;
  end;
  thus f|B = f9|B
    .= g9|B by A4,FUNCT_2:12
    .= g|B;
end;
