let s be State of SCM+FSA; :: thesis: for Q being Instruction-Sequence of SCM+FSA st s . (intloc (1 + 1)) >= 1 & s . (intloc (1 + 1)) <= len (s . ()) holds
( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),Q,s)) . (intloc (2 + 1)) = s . (intloc (2 + 1)) & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),Q,s)) . (intloc (5 + 1)) = s . (intloc (5 + 1)) & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),Q,s)) . () = s . () & ex x1 being Integer st
( x1 = (s . ()) . (s . (intloc (1 + 1))) & ( x1 - (s . (intloc (5 + 1))) > 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),Q,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),Q,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) ) ) & ( x1 - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),Q,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),Q,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) ) ) )

let P be Instruction-Sequence of SCM+FSA; :: thesis: ( s . (intloc (1 + 1)) >= 1 & s . (intloc (1 + 1)) <= len (s . ()) implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (2 + 1)) = s . (intloc (2 + 1)) & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (5 + 1)) = s . (intloc (5 + 1)) & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . () = s . () & ex x1 being Integer st
( x1 = (s . ()) . (s . (intloc (1 + 1))) & ( x1 - (s . (intloc (5 + 1))) > 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) ) ) & ( x1 - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) ) ) ) )

assume that
A1: s . (intloc (1 + 1)) >= 1 and
A2: s . (intloc (1 + 1)) <= len (s . ()) ; :: thesis: ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (2 + 1)) = s . (intloc (2 + 1)) & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (5 + 1)) = s . (intloc (5 + 1)) & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . () = s . () & ex x1 being Integer st
( x1 = (s . ()) . (s . (intloc (1 + 1))) & ( x1 - (s . (intloc (5 + 1))) > 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) ) ) & ( x1 - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) ) ) )

A3: |.(s . (intloc (1 + 1))).| = s . (intloc (1 + 1)) by ;
set s0 = Initialized s;
set s1 = Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),());
set s2 = IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s);
A4: intloc (3 + 1) <> intloc (2 + 1) by SCMFSA_2:101;
reconsider k1 = s . (intloc (1 + 1)) as Element of NAT by ;
reconsider n = (s . ()) . k1 as Integer ;
A5: (s . ()) /. k1 = n by ;
A6: (Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())) . (intloc (4 + 1)) = (() . ()) /. |.(() . (intloc (1 + 1))).| by SCMBSORT:2
.= (() . ()) /. |.(s . (intloc (1 + 1))).| by SCMFSA_M:37
.= n by ;
A7: intloc (1 + 1) <> intloc (2 + 1) by SCMFSA_2:101;
A8: intloc (4 + 1) <> intloc (5 + 1) by SCMFSA_2:101;
then A9: (Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())) . (intloc (5 + 1)) = () . (intloc (5 + 1)) by SCMFSA_2:72
.= s . (intloc (5 + 1)) by SCMFSA_M:37 ;
A10: intloc (4 + 1) <> intloc (2 + 1) by SCMFSA_2:101;
A11: (IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)) . (intloc (4 + 1)) = (Exec ((SubFrom ((intloc (4 + 1)),(intloc (5 + 1)))),(Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())))) . (intloc (4 + 1)) by SCMFSA6C:8
.= n - (s . (intloc (5 + 1))) by ;
thus (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (2 + 1)) = (IExec ((if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),()))))),P,(IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)))) . (intloc (2 + 1)) by SCM_HALT:20
.= (IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)) . (intloc (2 + 1)) by A4, A7, Lm15
.= (Exec ((SubFrom ((intloc (4 + 1)),(intloc (5 + 1)))),(Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())))) . (intloc (2 + 1)) by SCMFSA6C:8
.= (Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())) . (intloc (2 + 1)) by
.= () . (intloc (2 + 1)) by
.= s . (intloc (2 + 1)) by SCMFSA_M:37 ; :: thesis: ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (5 + 1)) = s . (intloc (5 + 1)) & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . () = s . () & ex x1 being Integer st
( x1 = (s . ()) . (s . (intloc (1 + 1))) & ( x1 - (s . (intloc (5 + 1))) > 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) ) ) & ( x1 - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) ) ) )

A12: intloc (3 + 1) <> intloc (5 + 1) by SCMFSA_2:101;
A13: intloc (1 + 1) <> intloc (5 + 1) by SCMFSA_2:101;
thus (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (5 + 1)) = (IExec ((if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),()))))),P,(IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)))) . (intloc (5 + 1)) by SCM_HALT:20
.= (IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)) . (intloc (5 + 1)) by
.= (Exec ((SubFrom ((intloc (4 + 1)),(intloc (5 + 1)))),(Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())))) . (intloc (5 + 1)) by SCMFSA6C:8
.= s . (intloc (5 + 1)) by ; :: thesis: ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . () = s . () & ex x1 being Integer st
( x1 = (s . ()) . (s . (intloc (1 + 1))) & ( x1 - (s . (intloc (5 + 1))) > 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) ) ) & ( x1 - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) ) ) )

A14: intloc (4 + 1) <> intloc (3 + 1) by SCMFSA_2:101;
thus (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . () = (IExec ((if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),()))))),P,(IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)))) . () by SCM_HALT:21
.= (IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)) . () by Lm13
.= (Exec ((SubFrom ((intloc (4 + 1)),(intloc (5 + 1)))),(Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())))) . () by SCMFSA6C:9
.= (Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())) . () by SCMFSA_2:65
.= () . () by SCMFSA_2:72
.= s . () by SCMFSA_M:37 ; :: thesis: ex x1 being Integer st
( x1 = (s . ()) . (s . (intloc (1 + 1))) & ( x1 - (s . (intloc (5 + 1))) > 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) ) ) & ( x1 - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) ) )

take n ; :: thesis: ( n = (s . ()) . (s . (intloc (1 + 1))) & ( n - (s . (intloc (5 + 1))) > 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) ) ) & ( n - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) ) )
A15: intloc (4 + 1) <> intloc (1 + 1) by SCMFSA_2:101;
thus n = (s . ()) . (s . (intloc (1 + 1))) ; :: thesis: ( ( n - (s . (intloc (5 + 1))) > 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) ) ) & ( n - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) ) )
A16: (IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)) . (intloc (3 + 1)) = (Exec ((SubFrom ((intloc (4 + 1)),(intloc (5 + 1)))),(Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())))) . (intloc (3 + 1)) by SCMFSA6C:8
.= (Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())) . (intloc (3 + 1)) by
.= () . (intloc (3 + 1)) by
.= s . (intloc (3 + 1)) by SCMFSA_M:37 ;
hereby :: thesis: ( n - (s . (intloc (5 + 1))) <= 0 implies ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 ) )
assume A17: n - (s . (intloc (5 + 1))) > 0 ; :: thesis: ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = 0 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1)) )
thus (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (IExec ((if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),()))))),P,(IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)))) . (intloc (1 + 1)) by SCM_HALT:20
.= 0 by ; :: thesis: (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = s . (intloc (3 + 1))
thus (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (IExec ((if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),()))))),P,(IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)))) . (intloc (3 + 1)) by SCM_HALT:20
.= s . (intloc (3 + 1)) by ; :: thesis: verum
end;
A18: (IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)) . (intloc (1 + 1)) = (Exec ((SubFrom ((intloc (4 + 1)),(intloc (5 + 1)))),(Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())))) . (intloc (1 + 1)) by SCMFSA6C:8
.= (Exec (((intloc (4 + 1)) := ((),(intloc (1 + 1)))),())) . (intloc (1 + 1)) by
.= () . (intloc (1 + 1)) by
.= s . (intloc (1 + 1)) by SCMFSA_M:37 ;
assume A19: n - (s . (intloc (5 + 1))) <= 0 ; :: thesis: ( (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (s . (intloc (1 + 1))) - 1 & (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1 )
thus (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (1 + 1)) = (IExec ((if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),()))))),P,(IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)))) . (intloc (1 + 1)) by SCM_HALT:20
.= (s . (intloc (1 + 1))) - 1 by A18, A11, A19, Lm3 ; :: thesis: (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (s . (intloc (3 + 1))) + 1
thus (IExec (((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))) ";" (if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),())))))),P,s)) . (intloc (3 + 1)) = (IExec ((if>0 ((intloc (4 + 1)),(Macro (SubFrom ((intloc (1 + 1)),(intloc (1 + 1))))),((AddTo ((intloc (3 + 1)),())) ";" (SubFrom ((intloc (1 + 1)),()))))),P,(IExec ((((intloc (4 + 1)) := ((),(intloc (1 + 1)))) ";" (SubFrom ((intloc (4 + 1)),(intloc (5 + 1))))),P,s)))) . (intloc (3 + 1)) by SCM_HALT:20
.= (s . (intloc (3 + 1))) + 1 by ; :: thesis: verum