reserve A for preIfWhileAlgebra,
  C,I,J for Element of A;
reserve S for non empty set,
  T for Subset of S,
  s for Element of S;
reserve f for ExecutionFunction of A,S,T;

theorem
  for A being free ECIW-strict preIfWhileAlgebra
  for f1,f2 being ExecutionFunction of A, S, T
  st f1|[:S, ElementaryInstructions A:] = f2|[:S, ElementaryInstructions A:] &
  for s being Element of S for C,I being Element of A
  st not f1 iteration_terminates_for I\;C, f1.(s,C)
  holds f1.(s, while(C,I)) = f2.(s, while(C,I)) holds f1 = f2
proof
  let A be free ECIW-strict preIfWhileAlgebra;
  let f1,f2 be ExecutionFunction of A, S, T;
  assume
A1: f1|[:S, ElementaryInstructions A:] = f2|[:S, ElementaryInstructions A:];
  set g = f1|[:S, ElementaryInstructions A:];
  assume
A2: for s being Element of S for C,I being Element of A
  st not f1 iteration_terminates_for I\;C, f1.(s,C)
  holds f1.(s, while(C,I)) = f2.(s, while(C,I));
  defpred P[set] means for s being Element of S holds f1.(s, $1) = f2.(s, $1);
A3: for I being Element of A st I in ElementaryInstructions A holds P[I]
  proof
    let I be Element of A such that
A4: I in ElementaryInstructions A;
    let s be Element of S;
A5: [s,I] in [:S, ElementaryInstructions A:] by A4,ZFMISC_1:87;
    hence f1.(s,I) = g.[s,I] by FUNCT_1:49
      .= f2.(s,I) by A1,A5,FUNCT_1:49;
  end;
A6: P[EmptyIns A]
  proof
    let s be Element of S;
    thus f1.(s, EmptyIns A) = s by Def28
      .= f2.(s, EmptyIns A) by Def28;
  end;
A7: for I1,I2 being Element of A st P[I1] & P[I2] holds P[I1\;I2]
  proof
    let I1,I2 be Element of A such that
A8: P[I1] and
A9: P[I2];
    let s be Element of S;
    thus f1.(s, I1\;I2) = f1.(f1.(s, I1), I2) by Def29
      .= f1.(f2.(s, I1), I2) by A8
      .= f2.(f2.(s, I1), I2) by A9
      .= f2.(s, I1\;I2) by Def29;
  end;
A10: for C,I1,I2 being Element of A st P[C] & P[I1] & P[I2]
  holds P[if-then-else(C,I1,I2)]
  proof
    let C,I1,I2 be Element of A such that
A11: P[C] and
A12: P[I1] and
A13: P[I2];
    let s be Element of S;
A14: f1 complies_with_if_wrt T by Def32;
A15: f2 complies_with_if_wrt T by Def32;
A16: f1.(s, C) = f2.(s, C) by A11;
    per cases;
    suppose
A17:  f1.(s,C) in T;
      hence f1.(s, if-then-else(C,I1,I2)) = f1.(f1.(s, C), I1) by A14
        .= f2.(f1.(s, C), I1) by A12
        .= f2.(s, if-then-else(C,I1,I2)) by A15,A16,A17;
    end;
    suppose
A18:  f1.(s,C) nin T;
      hence f1.(s, if-then-else(C,I1,I2)) = f1.(f1.(s, C), I2) by A14
        .= f2.(f1.(s, C), I2) by A13
        .= f2.(s, if-then-else(C,I1,I2)) by A15,A16,A18;
    end;
  end;
A19: for C,I being Element of A st P[C] & P[I] holds P[while(C,I)]
  proof
    let C,I be Element of A such that
A20: P[C] and
A21: P[I];
    let s be Element of S;
    now
      assume f1 iteration_terminates_for I\;C, f1.(s,C);
      then consider r being non empty FinSequence of S such that
A22:  r.1 = f1.(s, C) and
A23:  r.len r nin T and
A24:  for i being Nat st 1 <= i & i < len r
      holds r.i in T & r.(i+1) = f1.(r.i, I\;C);
A25:  f1.(s, C) = f2.(s, C) by A20;
A26:  now
        let i be Nat;
        assume that
A27:    1 <= i and
A28:    i < len r;
        thus r.i in T by A24,A27,A28;
        then reconsider si = r.i as Element of S;
        thus r.(i+1) = f1.(si, I\;C) by A24,A27,A28
          .= f1.(f1.(si,I),C) by Def29
          .= f1.(f2.(si,I),C) by A21
          .= f2.(f2.(si,I),C) by A20
          .= f2.(r.i, I\;C) by Def29;
      end;
      thus f1.(s, while(C,I)) = r.len r by A22,A23,A24,Th86
        .= f2.(s, while(C,I)) by A22,A23,A25,A26,Th86;
    end;
    hence thesis by A2;
  end;
  now
    let sI be Element of [:S, the carrier of A:];
    consider s,I being object such that
A29: s in S and
A30: I in the carrier of A and
A31: sI = [s,I] by ZFMISC_1:def 2;
    reconsider I as Element of A by A30;
    reconsider s as Element of S by A29;
    P[I] from StructInd(A3,A6,A7,A10,A19);
    then f1.(s,I) = f2.(s,I);
    hence f1.sI = f2.sI by A31;
  end;
  hence thesis by FUNCT_2:63;
end;
