Commit c0c54f6b authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

slightly generalized Tower of Hanoi (two Coq lemmas not proved yet)

parent 3b6e790c
......@@ -57,6 +57,79 @@ module Hanoi
end
module Tower_of_Hanoi
use import int.Int
use import list.List
use import list.Length
clone list.Sorted as S with type t = int, predicate le = (<)
clone list.Sorted as R with type t = int, predicate le = (>)
type tower = {
mutable rod : list int;
} invariant {
S.sorted self.rod
}
let move (a b: tower) (ghost x: int) (ghost s: list int)
requires { a.rod = Cons x s }
requires { match b.rod with Nil -> true | Cons y _ -> x < y end }
ensures { a.rod = s }
ensures { b.rod = Cons x (old b.rod) }
= match a.rod with
| Cons x r ->
a.rod <- r;
b.rod <- Cons x b.rod
| Nil -> absurd
end
predicate compat (s t: list int) =
match s, t with
| Cons x _, Cons y _ -> x < y
| _, _ -> true
end
function rev_append (s t: list int) : list int =
match s with
| Cons x r -> rev_append r (Cons x t)
| Nil -> t
end
let rec hanoi_rec (a b c: tower) (n: int) (ghost p s: list int)
requires { length p = n /\ R.sorted p }
requires { a.rod = rev_append p s }
requires { compat p b.rod }
requires { compat p c.rod }
variant { n }
ensures { a.rod = s }
ensures { b.rod = rev_append p (old b.rod) }
ensures { c.rod = old c.rod }
= if n > 0 then begin
let ghost t = c.rod in
let ghost x = match p with Cons x _ -> x | Nil -> absurd end in
let ghost r = match p with Cons _ r -> r | Nil -> absurd end in
hanoi_rec a c b (n-1) r (Cons x s);
move a b x s;
hanoi_rec c b a (n-1) r t
end
use import list.Reverse
lemma rev_sorted:
forall s: list int. S.sorted s -> R.sorted (reverse s)
lemma rev_append_rev:
forall s: list int. s = rev_append (reverse s) Nil
let tower_of_hanoi (a b c: tower)
requires { b.rod = c.rod = Nil }
ensures { b.rod = old a.rod }
ensures { a.rod = c.rod = Nil }
= hanoi_rec a b c (length a.rod) (ghost reverse a.rod) Nil
end
(* a stack of disks is modeled as a sorted list of integers *)
module Disks
......
......@@ -30,7 +30,7 @@
locfile="../tower_of_hanoi.mlw"
loclnum="1" loccnumb="7" loccnume="12"
verified="true"
expanded="true">
expanded="false">
<goal
name="WP_parameter move"
locfile="../tower_of_hanoi.mlw"
......@@ -58,14 +58,14 @@
expl="VC for hanoi_rec"
sum="c150d1d30ea2393b5aa8e35087a60e62"
proved="true"
expanded="true"
expanded="false"
shape="iainfix &gt;V0c0ainfix =V10V2Aainfix =V11aprependV0V3Aainfix =V12V1AasortedV12Iainfix =V12V9Aainfix =V11aprependainfix -V0c1V8Aainfix =V10V2AasortedV11AasortedV10FACV9aNiltaConsVwainfix &gt;V13ainfix -V0c1ACV8aNiltaConsVwainfix &gt;V14ainfix -V0c1Aainfix =V5aprependainfix -V0c1V2Aainfix &lt;ainfix -V0c1V0Aainfix &lt;=c0V0Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FACV6aNiltaConsVwainfix &gt;V15V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FACV3aNiltaConsVwainfix &gt;V16ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V17ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Aainfix &lt;ainfix -V0c1V0Aainfix &lt;=c0V0ainfix =V2V2Aainfix =V3aprependV0V3Aainfix =V4V1ICV2aNiltaConsVwainfix &gt;V18V0ACV3aNiltaConsVwainfix &gt;V19V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<transf
name="split_goal_wp"
proved="true"
expanded="true">
expanded="false">
<goal
name="WP_parameter hanoi_rec.1"
locfile="../tower_of_hanoi.mlw"
......@@ -109,74 +109,1293 @@
<goal
name="WP_parameter hanoi_rec.3"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="3. precondition"
sum="19e25771d08eefbcd410deda03025f82"
loclnum="36" loccnumb="10" loccnume="19"
expl="3. precondition"
sum="19e25771d08eefbcd410deda03025f82"
proved="true"
expanded="false"
shape="CV2aNiltaConsVwainfix &gt;V5ainfix -V0c1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V6V0ACV3aNiltaConsVwainfix &gt;V7V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.04"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.4"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="4. precondition"
sum="dc11c678c4700f0c21416f11d7698f86"
proved="true"
expanded="false"
shape="CV3aNiltaConsVwainfix &gt;V5ainfix -V0c1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V6V0ACV3aNiltaConsVwainfix &gt;V7V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.10"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.5"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="5. type invariant"
sum="5043dfde71412176b73d6ced3dcd72b3"
proved="true"
expanded="false"
shape="asortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V8ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V9ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V10V0ACV3aNiltaConsVwainfix &gt;V11V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.6"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="6. precondition"
sum="16d8b26de4fc1ff9e963eb8892d90ce1"
proved="true"
expanded="false"
shape="ainfix =V7aConsV0V1IasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V8ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V9ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V10V0ACV3aNiltaConsVwainfix &gt;V11V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.7"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="7. precondition"
sum="14fde92eccb1b86936c96402a3ba1b2b"
proved="true"
expanded="false"
shape="CV6aNiltaConsVwainfix &gt;V8V0IasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V9ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V10ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V11V0ACV3aNiltaConsVwainfix &gt;V12V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="1.47"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.8"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="8. variant decrease"
sum="29e8117d6c38bc6d080c9c309b516869"
proved="true"
expanded="false"
shape="ainfix &lt;ainfix -V0c1V0Aainfix &lt;=c0V0Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FICV6aNiltaConsVwainfix &gt;V10V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V11ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V12ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V13V0ACV3aNiltaConsVwainfix &gt;V14V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.9"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="9. precondition"
sum="a42e36f9b07d8a8bde8789fffcafabb8"
proved="true"
expanded="false"
shape="ainfix =V5aprependainfix -V0c1V2Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FICV6aNiltaConsVwainfix &gt;V10V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V11ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V12ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V13V0ACV3aNiltaConsVwainfix &gt;V14V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.10"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="10. precondition"
sum="cd019874269e510b9867ed6180e5e362"
proved="true"
expanded="false"
shape="CV8aNiltaConsVwainfix &gt;V10ainfix -V0c1Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FICV6aNiltaConsVwainfix &gt;V11V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V12ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V13ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V14V0ACV3aNiltaConsVwainfix &gt;V15V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.10"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.11"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="11. precondition"
sum="e310a05526a124b2a409e8c34c2ab3d3"
proved="true"
expanded="false"
shape="CV9aNiltaConsVwainfix &gt;V10ainfix -V0c1Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FICV6aNiltaConsVwainfix &gt;V11V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V12ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V13ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V14V0ACV3aNiltaConsVwainfix &gt;V15V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="timeout" time="5.27"/>
</proof>
<proof
prover="1"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.06"/>
</proof>
<proof
prover="4"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.11"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.12"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="12. type invariant"
sum="154da48dcf9545287324a9a7c3287270"
proved="true"
expanded="false"
shape="asortedV12Iainfix =V12V9Aainfix =V11aprependainfix -V0c1V8Aainfix =V10V2AasortedV11AasortedV10FICV9aNiltaConsVwainfix &gt;V13ainfix -V0c1ACV8aNiltaConsVwainfix &gt;V14ainfix -V0c1Aainfix =V5aprependainfix -V0c1V2Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FICV6aNiltaConsVwainfix &gt;V15V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V16ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V17ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V18V0ACV3aNiltaConsVwainfix &gt;V19V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.13"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="13. postcondition"
sum="8f2f23cf409bc84d65b6c2757a38c168"
proved="true"
expanded="false"
shape="ainfix =V12V1IasortedV12Iainfix =V12V9Aainfix =V11aprependainfix -V0c1V8Aainfix =V10V2AasortedV11AasortedV10FICV9aNiltaConsVwainfix &gt;V13ainfix -V0c1ACV8aNiltaConsVwainfix &gt;V14ainfix -V0c1Aainfix =V5aprependainfix -V0c1V2Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FICV6aNiltaConsVwainfix &gt;V15V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V16ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V17ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V18V0ACV3aNiltaConsVwainfix &gt;V19V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.14"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="14. postcondition"
sum="a10a8f942b1651449af069b2c6fc4971"
proved="true"
expanded="false"
shape="ainfix =V11aprependV0V3IasortedV12Iainfix =V12V9Aainfix =V11aprependainfix -V0c1V8Aainfix =V10V2AasortedV11AasortedV10FICV9aNiltaConsVwainfix &gt;V13ainfix -V0c1ACV8aNiltaConsVwainfix &gt;V14ainfix -V0c1Aainfix =V5aprependainfix -V0c1V2Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FICV6aNiltaConsVwainfix &gt;V15V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V16ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V17ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V18V0ACV3aNiltaConsVwainfix &gt;V19V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.15"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="15. postcondition"
sum="1ecd1f3bbbe68f6dbdb64da2be9d658a"
proved="true"
expanded="false"
shape="ainfix =V10V2IasortedV12Iainfix =V12V9Aainfix =V11aprependainfix -V0c1V8Aainfix =V10V2AasortedV11AasortedV10FICV9aNiltaConsVwainfix &gt;V13ainfix -V0c1ACV8aNiltaConsVwainfix &gt;V14ainfix -V0c1Aainfix =V5aprependainfix -V0c1V2Iainfix =V8aConsV0V6Aainfix =V9V1AasortedV8AasortedV9FICV6aNiltaConsVwainfix &gt;V15V0Aainfix =V7aConsV0V1AasortedV6Iainfix =V6V3Aainfix =V5aprependainfix -V0c1V2Aainfix =V7aConsV0V1AasortedV5AasortedV7FICV3aNiltaConsVwainfix &gt;V16ainfix -V0c1ACV2aNiltaConsVwainfix &gt;V17ainfix -V0c1Aainfix =V4aprependainfix -V0c1aConsV0V1Iainfix &gt;V0c0ICV2aNiltaConsVwainfix &gt;V18V0ACV3aNiltaConsVwainfix &gt;V19V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.16"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="16. postcondition"
sum="918f0b184c4c2830f2948ebb1fde96b6"
proved="true"
expanded="false"
shape="ainfix =V4V1Iainfix &gt;V0c0NICV2aNiltaConsVwainfix &gt;V5V0ACV3aNiltaConsVwainfix &gt;V6V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.17"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="17. postcondition"
sum="0e68928903affe289c3b5f94f90515f8"
proved="true"
expanded="false"
shape="ainfix =V3aprependV0V3Iainfix &gt;V0c0NICV2aNiltaConsVwainfix &gt;V5V0ACV3aNiltaConsVwainfix &gt;V6V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.18"
locfile="../tower_of_hanoi.mlw"
loclnum="36" loccnumb="10" loccnume="19"
expl="18. postcondition"
sum="0d3ce2a9830089707c3ed67f25c58810"
proved="true"
expanded="false"
shape="ainfix =V2V2Iainfix &gt;V0c0NICV2aNiltaConsVwainfix &gt;V5V0ACV3aNiltaConsVwainfix &gt;V6V0Aainfix =V4aprependV0V1AasortedV2AasortedV3AasortedV4FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
</transf>
</goal>
<goal
name="WP_parameter tower_of_hanoi"
locfile="../tower_of_hanoi.mlw"
loclnum="51" loccnumb="6" loccnume="20"
expl="VC for tower_of_hanoi"
sum="a8a16cdff15404f00e67412cb0ecb07d"
proved="true"
expanded="false"
shape="ainfix =V3aNilAainfix =V5V3Aainfix =V4V2AasortedV3Iainfix =V3V0Aainfix =V4aprependalengthV2V1Aainfix =V5aNilAasortedV4AasortedV5FACV0aNiltaConsVwainfix &gt;V6alengthV2ACV1aNiltaConsVwainfix &gt;V7alengthV2Aainfix =V2aprependalengthV2aNilIainfix =V0aNilAainfix =V1V0Aainfix =V2aprependalengthV2aNilAasortedV0AasortedV1AasortedV2F">
<label
name="expl:VC for tower_of_hanoi"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.08"/>
</proof>
</goal>
</theory>
<theory
name="Tower_of_Hanoi"
locfile="../tower_of_hanoi.mlw"
loclnum="60" loccnumb="7" loccnume="21"
verified="false"
expanded="true">
<goal
name="WP_parameter move"
locfile="../tower_of_hanoi.mlw"
loclnum="75" loccnumb="6" loccnume="10"
expl="VC for move"
sum="772d8946a9dd4d6b0ff7c1b16fb04669"
proved="true"
expanded="false"
shape="CV3aConsVVainfix =V7aConsV0V2Aainfix =V6V1AasortedV7AasortedV6Iainfix =V7aConsV4V2FIainfix =V6V5FaNilfICV2aNiltaConsVwainfix &lt;V0V8Aainfix =V3aConsV0V1AasortedV2AasortedV3FF">
<label
name="expl:VC for move"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="1.47"/>
</proof>
<proof
prover="1"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.03"/>
</proof>
<proof
prover="4"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec"
locfile="../tower_of_hanoi.mlw"
loclnum="99" loccnumb="10" loccnume="19"
expl="VC for hanoi_rec"
sum="0c0ce191fc9dd2e4dce0b1d738aea60b"
proved="true"
expanded="false"
shape="iainfix &gt;V0c0CV1aConsVwCV1aConswVainfix =V13V3Aainfix =V14arev_appendV1V4Aainfix =V15V2AasortedV15Iainfix =V15V12Aainfix =V14arev_appendV7V11Aainfix =V13V3AasortedV14AasortedV13FACV12aConsVVCV7aConsVVainfix &lt;V18V16wtwtACV11aConsVVCV7aConsVVainfix &lt;V22V20wtwtAainfix =V8arev_appendV7V3AasortedV7Aainfix =alengthV7ainfix -V0c1Aainfix &lt;ainfix -V0c1V0Aainfix &lt;=c0V0Iainfix =V11aConsV6V9Aainfix =V12V2AasortedV11AasortedV12FACV9aNiltaConsVwainfix &lt;V6V24Aainfix =V10aConsV6V2AasortedV9Iainfix =V9V4Aainfix =V8arev_appendV7V3Aainfix =V10aConsV6V2AasortedV8AasortedV10FACV4aConsVVCV7aConsVVainfix &lt;V27V25wtwtACV3aConsVVCV7aConsVVainfix &lt;V31V29wtwtAainfix =V5arev_appendV7aConsV6V2AasortedV7Aainfix =alengthV7ainfix -V0c1Aainfix &lt;ainfix -V0c1V0Aainfix &lt;=c0V0aNilfaNilfainfix =V3V3Aainfix =V4arev_appendV1V4Aainfix =V5V2ICV3aConsVVCV1aConsVVainfix &lt;V35V33wtwtACV4aConsVVCV1aConsVVainfix &lt;V39V37wtwtAainfix =V5arev_appendV1V2AasortedV1Aainfix =alengthV1V0AasortedV3AasortedV4AasortedV5FF">
<label
name="expl:VC for hanoi_rec"/>
<transf
name="split_goal_wp"
proved="true"
expanded="false">
<goal
name="WP_parameter hanoi_rec.1"
locfile="../tower_of_hanoi.mlw"
loclnum="99" loccnumb="10" loccnume="19"
expl="1. variant decrease"
sum="5340a9ff77ad76b510474d6f7c6edb78"
proved="true"
expanded="false"
shape="CV1aConsVwCV1aConswVainfix &lt;ainfix -V0c1V0Aainfix &lt;=c0V0aNiltaNiltIainfix &gt;V0c0ICV3aConsVVCV1aConsVVainfix &lt;V10V8wtwtACV4aConsVVCV1aConsVVainfix &lt;V14V12wtwtAainfix =V5arev_appendV1V2AasortedV1Aainfix =alengthV1V0AasortedV3AasortedV4AasortedV5FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.02"/>
</proof>
<proof
prover="1"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.02"/>
</proof>
<proof
prover="4"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.2"
locfile="../tower_of_hanoi.mlw"
loclnum="99" loccnumb="10" loccnume="19"
expl="2. precondition"
sum="26394f88f48b415a632072a8d369dc80"
proved="true"
expanded="false"
shape="CV1aConsVwCV1aConswVasortedV7Aainfix =alengthV7ainfix -V0c1aNiltaNiltIainfix &gt;V0c0ICV3aConsVVCV1aConsVVainfix &lt;V10V8wtwtACV4aConsVVCV1aConsVVainfix &lt;V14V12wtwtAainfix =V5arev_appendV1V2AasortedV1Aainfix =alengthV1V0AasortedV3AasortedV4AasortedV5FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.07"/>
</proof>
<proof
prover="1"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.02"/>
</proof>
<proof
prover="4"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal
name="WP_parameter hanoi_rec.3"
locfile="../tower_of_hanoi.mlw"
loclnum="99" loccnumb="10" loccnume="19"
expl="3. precondition"
sum="83e7e93fe6c82420414d0eaf8a2c9d2a"
proved="true"
expanded="false"
shape="CV1aConsVwCV1aConswVainfix =V5arev_appendV7aConsV6V2aNiltaNiltIainfix &gt;V0c0ICV3aConsVVCV1aConsVVainfix &lt;V10V8wtwtACV4aConsVVCV1aConsVVainfix &lt;V14V12wtwtAainfix =V5arev_appendV1V2AasortedV1Aainfix =alengthV1V0AasortedV3AasortedV4AasortedV5FF">
<label
name="expl:VC for hanoi_rec"/>
<proof
prover="0"
timelimit="5"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.04"/>