reserve i,j,k for Nat;
reserve I,J,K for Element of Segm 9,
  a,a1,a2 for Nat,
  b,b1,b2,c,c1 for Element of SCM-Data-Loc;
reserve T for InsType of SCM-Instr,
        I for Element of SCM-Instr;
reserve a,b,c for Data-Location,
  loc for Nat,
  I for Instruction of SCM;
reserve s for State of SCM;

theorem Th6:
  Exec(Divide(a,b), s).IC SCM = IC s + 1 & (a <> b implies Exec(
Divide(a,b), s).a = s.a div s.b) & Exec(Divide(a,b), s).b = s.a mod s.b & for c
  st c <> a & c <> b holds Exec(Divide(a,b), s).c = s.c
proof
  reconsider S = s as SCM-State by CARD_3:107;
  reconsider mk = a, ml = b as Element of SCM-Data-Loc by AMI_2:def 16;
  reconsider I = Divide(a,b) as Element of SCM-Instr;
  set S1 = SCM-Chg(S, I address_1,S.(I address_1) div S.(I address_2));
  set S19 = SCM-Chg(S1, I address_2,S.(I address_1) mod S.(I address_2));
  reconsider i = 5 as Element of Segm 9 by NAT_1:44;
A1: I = [ i, {}, <*mk, ml*>];
  then
A2: I address_1 = mk by SCM_INST:5;
A3: Exec(Divide(a,b), s) = SCM-Exec-Res(I,S) by AMI_2:def 15
    .= (SCM-Chg(S19, IC S + 1)) by A1,AMI_2:def 14;
  hence Exec(Divide(a,b), s).IC SCM = IC s + 1 by Th1,AMI_2:11;
A4: I address_2 = ml by A1,SCM_INST:5;
  hereby
    assume
A5: a <> b;
    thus Exec(Divide(a,b), s).a = S19.mk by A3,AMI_2:12
      .= S1.mk by A4,A5,AMI_2:16
      .= s.a div s.b by A2,A4,AMI_2:15;
  end;
  thus Exec(Divide(a,b), s).b = S19.ml by A3,AMI_2:12
    .= s.a mod s.b by A2,A4,AMI_2:15;
  let c;
  reconsider mn = c as Element of SCM-Data-Loc by AMI_2:def 16;
  assume that
A6: c <> a and
A7: c <> b;
  thus Exec(Divide(a,b), s).c = S19.mn by A3,AMI_2:12
    .= S1.mn by A4,A7,AMI_2:16
    .= s.c by A2,A6,AMI_2:16;
end;
