
theorem Th5:
  for S1, S2, T1, T2 being RelStr st the RelStr of S1 = the RelStr
of S2 & the RelStr of T1 = the RelStr of T2 for f being Function of S1, T1 st f
  is isomorphic for g being Function of S2, T2 st g = f holds g is isomorphic
proof
  let S1, S2, T1, T2 be RelStr such that
A1: the RelStr of S1 = the RelStr of S2 and
A2: the RelStr of T1 = the RelStr of T2;
  let f be Function of S1, T1 such that
A3: f is isomorphic;
  let g be Function of S2, T2 such that
A4: g = f;
  per cases;
  suppose
A5: S1 is empty;
    then T1 is empty by A3,WAYBEL_0:def 38;
    then
A6: T2 is empty by A2;
    S2 is empty by A1,A5;
    hence thesis by A6,WAYBEL_0:def 38;
  end;
  suppose
    S1 is non empty;
    then reconsider S1, T1 as non empty RelStr by A3,WAYBEL_0:def 38;
    reconsider f as Function of S1, T1;
    the carrier of S1 <> {} & the carrier of T1 <> {};
    then reconsider S2, T2 as non empty RelStr by A1,A2;
    reconsider g as Function of S2, T2;
A7: now
      let x,y be Element of S2;
      reconsider a = x, b = y as Element of S1 by A1;
A8:   x <= y iff a <= b by A1,YELLOW_0:1;
      g.x <= g.y iff f.a <= f.b by A2,A4,YELLOW_0:1;
      hence x <= y iff g.x <= g.y by A3,A8,WAYBEL_0:66;
    end;
    rng f = the carrier of T1 by A3,WAYBEL_0:66;
    hence thesis by A2,A3,A4,A7,WAYBEL_0:66;
  end;
end;
