Article SCMFSA6C, MML version 4.99.1005
:: SCMFSA6C:th 1
theorem
for b1 being Int-Location
for b2 being Element of product the Object-Kind of SCM+FSA
for b3 being finite programmed initial parahalting keeping_0 Element of sproduct the Object-Kind of SCM+FSA
for b4 being finite programmed initial parahalting Element of sproduct the Object-Kind of SCM+FSA holds
(IExec(b3 ';' b4,b2)) . b1 = (IExec(b4,IExec(b3,b2))) . b1;
:: SCMFSA6C:th 2
theorem
for b1 being FinSeq-Location
for b2 being Element of product the Object-Kind of SCM+FSA
for b3 being finite programmed initial parahalting keeping_0 Element of sproduct the Object-Kind of SCM+FSA
for b4 being finite programmed initial parahalting Element of sproduct the Object-Kind of SCM+FSA holds
(IExec(b3 ';' b4,b2)) . b1 = (IExec(b4,IExec(b3,b2))) . b1;
:: SCMFSA6C:attrnot 1 => SCMFSA6C:attr 1
definition
let a1 be Element of the Instructions of SCM+FSA;
attr a1 is parahalting means
Macro a1 is parahalting;
end;
:: SCMFSA6C:dfs 1
definiens
let a1 be Element of the Instructions of SCM+FSA;
To prove
a1 is parahalting
it is sufficient to prove
thus Macro a1 is parahalting;
:: SCMFSA6C:def 1
theorem
for b1 being Element of the Instructions of SCM+FSA holds
b1 is parahalting
iff
Macro b1 is parahalting;
:: SCMFSA6C:attrnot 2 => SCMFSA6C:attr 2
definition
let a1 be Element of the Instructions of SCM+FSA;
attr a1 is keeping_0 means
Macro a1 is keeping_0;
end;
:: SCMFSA6C:dfs 2
definiens
let a1 be Element of the Instructions of SCM+FSA;
To prove
a1 is keeping_0
it is sufficient to prove
thus Macro a1 is keeping_0;
:: SCMFSA6C:def 2
theorem
for b1 being Element of the Instructions of SCM+FSA holds
b1 is keeping_0
iff
Macro b1 is keeping_0;
:: SCMFSA6C:funcreg 1
registration
cluster halt SCM+FSA -> parahalting keeping_0;
end;
:: SCMFSA6C:exreg 1
registration
cluster parahalting keeping_0 Element of the Instructions of SCM+FSA;
end;
:: SCMFSA6C:funcreg 2
registration
let a1 be parahalting Element of the Instructions of SCM+FSA;
cluster Macro a1 -> finite programmed initial parahalting;
end;
:: SCMFSA6C:funcreg 3
registration
let a1 be keeping_0 Element of the Instructions of SCM+FSA;
cluster Macro a1 -> finite programmed initial keeping_0;
end;
:: SCMFSA6C:funcreg 4
registration
let a1, a2 be Int-Location;
cluster a1 := a2 -> parahalting;
end;
:: SCMFSA6C:funcreg 5
registration
let a1, a2 be Int-Location;
cluster AddTo(a1,a2) -> parahalting;
end;
:: SCMFSA6C:funcreg 6
registration
let a1, a2 be Int-Location;
cluster SubFrom(a1,a2) -> parahalting;
end;
:: SCMFSA6C:funcreg 7
registration
let a1, a2 be Int-Location;
cluster MultBy(a1,a2) -> parahalting;
end;
:: SCMFSA6C:funcreg 8
registration
let a1, a2 be Int-Location;
cluster Divide(a1,a2) -> parahalting;
end;
:: SCMFSA6C:funcreg 9
registration
let a1, a2 be Int-Location;
let a3 be FinSeq-Location;
cluster a2 :=(a3,a1) -> parahalting;
end;
:: SCMFSA6C:funcreg 10
registration
let a1, a2 be Int-Location;
let a3 be FinSeq-Location;
cluster (a3,a1):= a2 -> parahalting keeping_0;
end;
:: SCMFSA6C:funcreg 11
registration
let a1 be Int-Location;
let a2 be FinSeq-Location;
cluster a1 :=len a2 -> parahalting;
end;
:: SCMFSA6C:funcreg 12
registration
let a1 be Int-Location;
let a2 be FinSeq-Location;
cluster a2 :=<0,...,0> a1 -> parahalting keeping_0;
end;
:: SCMFSA6C:funcreg 13
registration
let a1 be read-write Int-Location;
let a2 be Int-Location;
cluster a1 := a2 -> keeping_0;
end;
:: SCMFSA6C:funcreg 14
registration
let a1 be read-write Int-Location;
let a2 be Int-Location;
cluster AddTo(a1,a2) -> keeping_0;
end;
:: SCMFSA6C:funcreg 15
registration
let a1 be read-write Int-Location;
let a2 be Int-Location;
cluster SubFrom(a1,a2) -> keeping_0;
end;
:: SCMFSA6C:funcreg 16
registration
let a1 be read-write Int-Location;
let a2 be Int-Location;
cluster MultBy(a1,a2) -> keeping_0;
end;
:: SCMFSA6C:funcreg 17
registration
let a1, a2 be read-write Int-Location;
cluster Divide(a1,a2) -> keeping_0;
end;
:: SCMFSA6C:funcreg 18
registration
let a1 be Int-Location;
let a2 be FinSeq-Location;
let a3 be read-write Int-Location;
cluster a3 :=(a2,a1) -> keeping_0;
end;
:: SCMFSA6C:funcreg 19
registration
let a1 be FinSeq-Location;
let a2 be read-write Int-Location;
cluster a2 :=len a1 -> keeping_0;
end;
:: SCMFSA6C:funcreg 20
registration
let a1 be parahalting Element of the Instructions of SCM+FSA;
let a2 be finite programmed initial parahalting Element of sproduct the Object-Kind of SCM+FSA;
cluster a1 ';' a2 -> finite programmed initial parahalting;
end;
:: SCMFSA6C:funcreg 21
registration
let a1 be finite programmed initial parahalting Element of sproduct the Object-Kind of SCM+FSA;
let a2 be parahalting Element of the Instructions of SCM+FSA;
cluster a1 ';' a2 -> finite programmed initial parahalting;
end;
:: SCMFSA6C:funcreg 22
registration
let a1, a2 be parahalting Element of the Instructions of SCM+FSA;
cluster a1 ';' a2 -> finite programmed initial parahalting;
end;
:: SCMFSA6C:funcreg 23
registration
let a1 be keeping_0 Element of the Instructions of SCM+FSA;
let a2 be finite programmed initial keeping_0 Element of sproduct the Object-Kind of SCM+FSA;
cluster a1 ';' a2 -> finite programmed initial keeping_0;
end;
:: SCMFSA6C:funcreg 24
registration
let a1 be finite programmed initial keeping_0 Element of sproduct the Object-Kind of SCM+FSA;
let a2 be keeping_0 Element of the Instructions of SCM+FSA;
cluster a1 ';' a2 -> finite programmed initial keeping_0;
end;
:: SCMFSA6C:funcreg 25
registration
let a1, a2 be keeping_0 Element of the Instructions of SCM+FSA;
cluster a1 ';' a2 -> finite programmed initial keeping_0;
end;
:: SCMFSA6C:funcnot 1 => SCMFSA6C:func 1
definition
let a1 be Element of product the Object-Kind of SCM+FSA;
func Initialize A1 -> Element of product the Object-Kind of SCM+FSA equals
(a1 +* ((intloc 0) .--> 1)) +* Start-At insloc 0;
end;
:: SCMFSA6C:def 3
theorem
for b1 being Element of product the Object-Kind of SCM+FSA holds
Initialize b1 = (b1 +* ((intloc 0) .--> 1)) +* Start-At insloc 0;
:: SCMFSA6C:th 3
theorem
for b1 being Element of product the Object-Kind of SCM+FSA holds
IC Initialize b1 = insloc 0 &
(Initialize b1) . intloc 0 = 1 &
(for b2 being read-write Int-Location holds
(Initialize b1) . b2 = b1 . b2) &
(for b2 being FinSeq-Location holds
(Initialize b1) . b2 = b1 . b2) &
(for b2 being Instruction-Location of SCM+FSA holds
(Initialize b1) . b2 = b1 . b2);
:: SCMFSA6C:th 4
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA holds
b1,b2 equal_outside NAT
iff
b1 | ((Int-Locations \/ FinSeq-Locations) \/ {IC SCM+FSA}) = b2 | ((Int-Locations \/ FinSeq-Locations) \/ {IC SCM+FSA});
:: SCMFSA6C:th 5
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2, b3 being Element of product the Object-Kind of SCM+FSA
st b2 | (Int-Locations \/ FinSeq-Locations) = b3 | (Int-Locations \/ FinSeq-Locations)
holds (Exec(b1,b2)) | (Int-Locations \/ FinSeq-Locations) = (Exec(b1,b3)) | (Int-Locations \/ FinSeq-Locations);
:: SCMFSA6C:th 6
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being parahalting Element of the Instructions of SCM+FSA holds
Exec(b2,Initialize b1) = IExec(Macro b2,b1);
:: SCMFSA6C:th 7
theorem
for b1 being Int-Location
for b2 being Element of product the Object-Kind of SCM+FSA
for b3 being finite programmed initial parahalting keeping_0 Element of sproduct the Object-Kind of SCM+FSA
for b4 being parahalting Element of the Instructions of SCM+FSA holds
(IExec(b3 ';' b4,b2)) . b1 = (Exec(b4,IExec(b3,b2))) . b1;
:: SCMFSA6C:th 8
theorem
for b1 being FinSeq-Location
for b2 being Element of product the Object-Kind of SCM+FSA
for b3 being finite programmed initial parahalting keeping_0 Element of sproduct the Object-Kind of SCM+FSA
for b4 being parahalting Element of the Instructions of SCM+FSA holds
(IExec(b3 ';' b4,b2)) . b1 = (Exec(b4,IExec(b3,b2))) . b1;
:: SCMFSA6C:th 9
theorem
for b1 being Int-Location
for b2 being Element of product the Object-Kind of SCM+FSA
for b3 being parahalting keeping_0 Element of the Instructions of SCM+FSA
for b4 being parahalting Element of the Instructions of SCM+FSA holds
(IExec(b3 ';' b4,b2)) . b1 = (Exec(b4,Exec(b3,Initialize b2))) . b1;
:: SCMFSA6C:th 10
theorem
for b1 being FinSeq-Location
for b2 being Element of product the Object-Kind of SCM+FSA
for b3 being parahalting keeping_0 Element of the Instructions of SCM+FSA
for b4 being parahalting Element of the Instructions of SCM+FSA holds
(IExec(b3 ';' b4,b2)) . b1 = (Exec(b4,Exec(b3,Initialize b2))) . b1;
:: SCMFSA6C:funcnot 2 => SCMFSA6C:func 2
definition
let a1, a2 be Int-Location;
func swap(A1,A2) -> finite programmed initial Element of sproduct the Object-Kind of SCM+FSA equals
(((FirstNotUsed Macro (a1 := a2)) := a1) ';' (a1 := a2)) ';' (a2 := FirstNotUsed Macro (a1 := a2));
end;
:: SCMFSA6C:def 4
theorem
for b1, b2 being Int-Location holds
swap(b1,b2) = (((FirstNotUsed Macro (b1 := b2)) := b1) ';' (b1 := b2)) ';' (b2 := FirstNotUsed Macro (b1 := b2));
:: SCMFSA6C:funcreg 26
registration
let a1, a2 be Int-Location;
cluster swap(a1,a2) -> finite programmed initial parahalting;
end;
:: SCMFSA6C:funcreg 27
registration
let a1, a2 be read-write Int-Location;
cluster swap(a1,a2) -> finite programmed initial keeping_0;
end;
:: SCMFSA6C:th 11
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2, b3 being read-write Int-Location holds
(IExec(swap(b2,b3),b1)) . b2 = b1 . b3 &
(IExec(swap(b2,b3),b1)) . b3 = b1 . b2;
:: SCMFSA6C:th 12
theorem
for b1, b2 being Int-Location holds
UsedInt*Loc swap(b1,b2) = {};