reserve x for set,
  m,n for Nat,
  a,b,c for Int_position,
  i for Instruction of SCMPDS,
  s,s1,s2 for State of SCMPDS,
  k1,k2 for Integer,
  loc,l1 for Nat,
  I,J for Program of SCMPDS,
  N for with_non-empty_elements set;
reserve P,P1,P2,Q for Instruction-Sequence of SCMPDS;

theorem Th25:
  DataPart s1 = DataPart s2 & InsCode i <> 3 implies
   DataPart Exec(i,s1) = DataPart Exec(i,s2)
proof
  assume that
A1: DataPart s1 = DataPart s2 and
A2: InsCode i <> 3;
  InsCode i = 0 or ... or InsCode i = 14 by SCMPDS_2:6;
  then per cases by A2;
  suppose InsCode i = 0;
   then Exec(i,s1) = s1 & Exec(i,s2) = s2 by SCMPDS_2:86;
   hence thesis by A1;
  end;
  suppose
    InsCode i = 14;
    then
A3: ex k1 st i = goto k1 by SCMPDS_2:26;
    now
      let a;
      thus Exec(i, s1).a = s1.a by A3,SCMPDS_2:54
        .=s2.a by A1,SCMPDS_4:8
        .=Exec(i, s2).a by A3,SCMPDS_2:54;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 1;
    then consider a such that
A4: i = return a by SCMPDS_2:27;
    now
      let b;
      per cases;
      suppose
A5:     a=b;
        hence Exec(i, s1).b= s1.DataLoc(s1.a,RetSP) by A4,SCMPDS_2:58
          .=s2.DataLoc(s2.a,RetSP) by A1,SCMPDS_3:2
          .=Exec(i,s2).b by A4,A5,SCMPDS_2:58;
      end;
      suppose
A6:     a<>b;
        hence Exec(i, s1).b = s1.b by A4,SCMPDS_2:58
          .=s2.b by A1,SCMPDS_4:8
          .=Exec(i,s2).b by A4,A6,SCMPDS_2:58;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 2;
    then consider a,k1 such that
A7: i = a := k1 by SCMPDS_2:28;
    now
      let b;
      per cases;
      suppose
A8:     a=b;
        hence Exec(i, s1).b= k1 by A7,SCMPDS_2:45
          .=Exec(i,s2).b by A7,A8,SCMPDS_2:45;
      end;
      suppose
A9:     a<>b;
        hence Exec(i,s1).b = s1.b by A7,SCMPDS_2:45
          .=s2.b by A1,SCMPDS_4:8
          .=Exec(i,s2).b by A7,A9,SCMPDS_2:45;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 4;
    then
A10: ex a,k1,k2 st i = (a,k1)<>0_goto k2 by SCMPDS_2:30;
    now
      let a;
      thus Exec(i, s1).a = s1.a by A10,SCMPDS_2:55
        .=s2.a by A1,SCMPDS_4:8
        .=Exec(i, s2).a by A10,SCMPDS_2:55;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 5;
    then
A11: ex a,k1,k2 st i = (a,k1)<=0_goto k2 by SCMPDS_2:31;
    now
      let a;
      thus Exec(i, s1).a = s1.a by A11,SCMPDS_2:56
        .=s2.a by A1,SCMPDS_4:8
        .=Exec(i, s2).a by A11,SCMPDS_2:56;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 6;
    then
A12: ex a,k1,k2 st i = (a,k1)>=0_goto k2 by SCMPDS_2:32;
    now
      let a;
      thus Exec(i, s1).a = s1.a by A12,SCMPDS_2:57
        .=s2.a by A1,SCMPDS_4:8
        .=Exec(i, s2).a by A12,SCMPDS_2:57;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 7;
    then consider a,k1,k2 such that
A13: i = (a,k1) := k2 by SCMPDS_2:33;
    now
      let b;
      per cases;
      suppose
A14:    DataLoc(s1.a,k1)=b;
        then
A15:    DataLoc(s2.a,k1)=b by A1,SCMPDS_4:8;
        thus Exec(i, s1).b= k2 by A13,A14,SCMPDS_2:46
          .=Exec(i,s2).b by A13,A15,SCMPDS_2:46;
      end;
      suppose
A16:    DataLoc(s1.a,k1)<>b;
        then
A17:    DataLoc(s2.a,k1)<>b by A1,SCMPDS_4:8;
        thus Exec(i,s1).b = s1.b by A13,A16,SCMPDS_2:46
          .=s2.b by A1,SCMPDS_4:8
          .=Exec(i,s2).b by A13,A17,SCMPDS_2:46;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 8;
    then consider a,k1,k2 such that
A18: i = AddTo(a,k1,k2) by SCMPDS_2:34;
    now
      let b;
      per cases;
      suppose
A19:    DataLoc(s1.a,k1)=b;
        then
A20:    DataLoc(s2.a,k1)=b by A1,SCMPDS_4:8;
        thus Exec(i, s1).b= s1.DataLoc(s1.a,k1)+k2 by A18,A19,SCMPDS_2:48
          .= s2.DataLoc(s2.a,k1)+k2 by A1,SCMPDS_3:2
          .=Exec(i,s2).b by A18,A20,SCMPDS_2:48;
      end;
      suppose
A21:    DataLoc(s1.a,k1)<>b;
        then
A22:    DataLoc(s2.a,k1)<>b by A1,SCMPDS_4:8;
        thus Exec(i,s1).b = s1.b by A18,A21,SCMPDS_2:48
          .=s2.b by A1,SCMPDS_4:8
          .=Exec(i,s2).b by A18,A22,SCMPDS_2:48;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 9;
    then consider a,b,k1,k2 such that
A23: i = AddTo(a,k1,b,k2) by SCMPDS_2:35;
    now
      let c;
      per cases;
      suppose
A24:    DataLoc(s1.a,k1)=c;
        then
A25:    DataLoc(s2.a,k1)=c by A1,SCMPDS_4:8;
        thus Exec(i, s1).c = s1.DataLoc(s1.a,k1)+s1.DataLoc(s1.b,k2) by A23,A24
,SCMPDS_2:49
          .= s2.DataLoc(s2.a,k1)+s1.DataLoc(s1.b,k2) by A1,SCMPDS_3:2
          .= s2.DataLoc(s2.a,k1)+s2.DataLoc(s2.b,k2) by A1,SCMPDS_3:2
          .=Exec(i,s2).c by A23,A25,SCMPDS_2:49;
      end;
      suppose
A26:    DataLoc(s1.a,k1)<>c;
        then
A27:    DataLoc(s2.a,k1)<>c by A1,SCMPDS_4:8;
        thus Exec(i,s1).c = s1.c by A23,A26,SCMPDS_2:49
          .=s2.c by A1,SCMPDS_4:8
          .=Exec(i,s2).c by A23,A27,SCMPDS_2:49;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 10;
    then consider a,b,k1,k2 such that
A28: i = SubFrom(a,k1,b,k2) by SCMPDS_2:36;
    now
      let c;
      per cases;
      suppose
A29:    DataLoc(s1.a,k1)=c;
        then
A30:    DataLoc(s2.a,k1)=c by A1,SCMPDS_4:8;
        thus Exec(i, s1).c = s1.DataLoc(s1.a,k1)-s1.DataLoc(s1.b,k2)
         by A28,A29,SCMPDS_2:50
          .= s2.DataLoc(s2.a,k1)-s1.DataLoc(s1.b,k2) by A1,SCMPDS_3:2
          .= s2.DataLoc(s2.a,k1)-s2.DataLoc(s2.b,k2) by A1,SCMPDS_3:2
          .=Exec(i,s2).c by A28,A30,SCMPDS_2:50;
      end;
      suppose
A31:    DataLoc(s1.a,k1)<>c;
        then
A32:    DataLoc(s2.a,k1)<>c by A1,SCMPDS_4:8;
        thus Exec(i,s1).c = s1.c by A28,A31,SCMPDS_2:50
          .=s2.c by A1,SCMPDS_4:8
          .=Exec(i,s2).c by A28,A32,SCMPDS_2:50;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 11;
    then consider a,b,k1,k2 such that
A33: i = MultBy(a,k1,b,k2) by SCMPDS_2:37;
    now
      let c;
      per cases;
      suppose
A34:    DataLoc(s1.a,k1)=c;
        then
A35:    DataLoc(s2.a,k1)=c by A1,SCMPDS_4:8;
        thus Exec(i, s1).c = s1.DataLoc(s1.a,k1)*s1.DataLoc(s1.b,k2) by A33,A34
,SCMPDS_2:51
          .= s2.DataLoc(s2.a,k1)*s1.DataLoc(s1.b,k2) by A1,SCMPDS_3:2
          .= s2.DataLoc(s2.a,k1)*s2.DataLoc(s2.b,k2) by A1,SCMPDS_3:2
          .=Exec(i,s2).c by A33,A35,SCMPDS_2:51;
      end;
      suppose
A36:    DataLoc(s1.a,k1)<>c;
        then
A37:    DataLoc(s2.a,k1)<>c by A1,SCMPDS_4:8;
        thus Exec(i,s1).c = s1.c by A33,A36,SCMPDS_2:51
          .=s2.c by A1,SCMPDS_4:8
          .=Exec(i,s2).c by A33,A37,SCMPDS_2:51;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 12;
    then consider a,b,k1,k2 such that
A38: i = Divide(a,k1,b,k2) by SCMPDS_2:38;
    now
      let c;
      per cases;
      suppose
A39:    DataLoc(s1.b,k2)=c;
        then
A40:    DataLoc(s2.b,k2)=c by A1,SCMPDS_4:8;
        thus Exec(i, s1).c = s1.DataLoc(s1.a,k1) mod s1.DataLoc(s1.b,k2) by A38
,A39,SCMPDS_2:52
          .= s2.DataLoc(s2.a,k1) mod s1.DataLoc(s1.b,k2) by A1,SCMPDS_3:2
          .= s2.DataLoc(s2.a,k1) mod s2.DataLoc(s2.b,k2) by A1,SCMPDS_3:2
          .= Exec(i,s2).c by A38,A40,SCMPDS_2:52;
      end;
      suppose
A41:    DataLoc(s1.b,k2)<>c;
        then
A42:    DataLoc(s2.b,k2)<>c by A1,SCMPDS_4:8;
        hereby
          per cases;
          suppose
A43:        DataLoc(s1.a,k1)<>c;
            then
A44:        DataLoc(s2.a,k1)<>c by A1,SCMPDS_4:8;
            thus Exec(i, s1).c = s1.c by A38,A41,A43,SCMPDS_2:52
              .=s2.c by A1,SCMPDS_4:8
              .=Exec(i,s2).c by A38,A42,A44,SCMPDS_2:52;
          end;
          suppose
A45:        DataLoc(s1.a,k1)=c;
            then
A46:        DataLoc(s2.a,k1)=c by A1,SCMPDS_4:8;
            thus Exec(i, s1).c = s1.DataLoc(s1.a,k1) div s1.DataLoc(s1.b,k2)
            by A38,A41,A45,SCMPDS_2:52
              .= s2.DataLoc(s2.a,k1) div s1.DataLoc(s1.b,k2) by A1,SCMPDS_3:2
              .= s2.DataLoc(s2.a,k1) div s2.DataLoc(s2.b,k2) by A1,SCMPDS_3:2
              .= Exec(i,s2).c by A38,A42,A46,SCMPDS_2:52;
          end;
        end;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
  suppose
    InsCode i = 13;
    then consider a,b,k1,k2 such that
A47: i = (a,k1):=(b,k2) by SCMPDS_2:39;
    now
      let c;
      per cases;
      suppose
A48:    DataLoc(s1.a,k1)=c;
        then
A49:    DataLoc(s2.a,k1)=c by A1,SCMPDS_4:8;
        thus Exec(i, s1).c = s1.DataLoc(s1.b,k2) by A47,A48,SCMPDS_2:47
          .= s2.DataLoc(s2.b,k2) by A1,SCMPDS_3:2
          .=Exec(i,s2).c by A47,A49,SCMPDS_2:47;
      end;
      suppose
A50:    DataLoc(s1.a,k1)<>c;
        then
A51:    DataLoc(s2.a,k1)<>c by A1,SCMPDS_4:8;
        thus Exec(i,s1).c = s1.c by A47,A50,SCMPDS_2:47
          .=s2.c by A1,SCMPDS_4:8
          .=Exec(i,s2).c by A47,A51,SCMPDS_2:47;
      end;
    end;
    hence thesis by SCMPDS_4:8;
  end;
end;
