reserve i for Nat, x,y for set;
reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of S;

theorem Th38:
  for U1,U2 be preIfWhileAlgebra st the UAStr of U1 = the UAStr of U2
  holds ElementaryInstructions U1 = ElementaryInstructions U2
  proof
    let U1,U2 be preIfWhileAlgebra;
    assume A1: the UAStr of U1 = the UAStr of U2;
    set Y1 = {I1 \; I2 where I1,I2 is Algorithm of U1: I1 <> I1\;I2 &
    I2 <> I1\;I2};
    set Y2 = {I1 \; I2 where I1,I2 is Algorithm of U2: I1 <> I1\;I2 &
    I2 <> I1\;I2};
A2: Y1 = Y2
    proof
      thus Y1 c= Y2
      proof
        let x be object; assume x in Y1; then
        consider I1,I2 being Algorithm of U1 such that
A3:     x = I1\;I2 & I1 <> I1\;I2 & I2 <> I1\;I2;
        reconsider I1,I2 as Algorithm of U2 by A1;
        x = I1\;I2 by A1,A3;
        hence thesis by A3;
      end;
      let x be object; assume x in Y2; then
      consider I1,I2 being Algorithm of U2 such that
A4:   x = I1\;I2 & I1 <> I1\;I2 & I2 <> I1\;I2;
      reconsider I1,I2 as Algorithm of U1 by A1;
      x = I1\;I2 by A1,A4;
      hence thesis by A4;
    end;
    thus ElementaryInstructions U1 = ElementaryInstructions U2 by A2,A1;
  end;
