TPTP Problem File: SWW980_1.p
View Solutions
- Solve Problem
%------------------------------------------------------------------------------
% File : SWW980_1 : TPTP v9.2.1. Released v9.1.0.
% Domain : Software Verification
% Problem : bubble-sort-4
% Version : Especial.
% English :
% Refs : [Kot17] Kotelnikov (2017), Email to Geoff Sutcliffe
% Source : [Kot17]
% Names : bubble-sort-4 [Kot17]
% Status : Theorem
% Rating : ? v9.1.0
% Syntax : Number of formulae : 21 ( 1 unt; 9 typ; 0 def)
% Number of atoms : 50 ( 6 equ)
% Maximal formula atoms : 18 ( 4 avg)
% Number of connectives : 39 ( 1 ~; 4 |; 23 &)
% ( 0 <=>; 11 =>; 0 <=; 0 <~>)
% Maximal formula depth : 10 ( 5 avg)
% Maximal term depth : 3 ( 1 avg)
% Number of X terms : 12 ( 0 []; 0 ite; 12 let)
% Number arithmetic : 69 ( 40 atm; 0 fun; 8 num; 21 var)
% Number of types : 3 ( 1 usr; 1 ari)
% Number of type conns : 5 ( 2 >; 3 *; 0 +; 0 <<)
% Number of predicates : 7 ( 1 usr; 2 prp; 0-2 aty)
% Number of functors : 10 ( 7 usr; 7 con; 0-3 aty)
% Number of variables : 25 ( 25 !; 0 ?; 25 :)
% SPC : TX0_THM_EQU_ARI
% Comments : This file was generated by Voogie.
%------------------------------------------------------------------------------
tff(array_int_int,type,
array_int_int: $tType ).
tff(select_int_int,type,
select_int_int: ( array_int_int * $int ) > $int ).
tff(store_int_int,type,
store_int_int: ( array_int_int * $int * $int ) > array_int_int ).
tff(a,type,
a: array_int_int ).
tff(bad,type,
bad: $o ).
tff(i,type,
i: $int ).
tff(n,type,
n: $int ).
tff(sortedUntil,type,
sortedUntil: $int ).
tff(t,type,
t: $int ).
tff(voogie_precondition_1,axiom,
! [A: array_int_int,V: $int,I: $int,J: $int] :
( ( I = J )
=> ( select_int_int(store_int_int(A,I,V),J) = V ) ) ).
tff(voogie_precondition_2,axiom,
! [A: array_int_int,V: $int,I: $int,J: $int] :
( ( I != J )
=> ( select_int_int(store_int_int(A,I,V),J) = select_int_int(A,J) ) ) ).
tff(voogie_precondition_3,axiom,
! [A: array_int_int,B: array_int_int] :
( ! [I: $int] : ( select_int_int(A,I) = select_int_int(B,I) )
=> ( A = B ) ) ).
tff(voogie_precondition_4,axiom,
$greatereq(n,0) ).
tff(voogie_precondition_5,axiom,
( $lesseq(0,sortedUntil)
& $lesseq(sortedUntil,n) ) ).
tff(voogie_precondition_6,axiom,
! [J: $int,K: $int] :
( ( $lesseq(0,J)
& $less(J,sortedUntil)
& $lesseq(sortedUntil,K)
& $less(K,n) )
=> $lesseq(select_int_int(a,J),select_int_int(a,K)) ) ).
tff(voogie_precondition_7,axiom,
! [J: $int,K: $int] :
( ( $lesseq(0,J)
& $less(J,K)
& $less(K,sortedUntil) )
=> $lesseq(select_int_int(a,J),select_int_int(a,K)) ) ).
tff(voogie_precondition_8,axiom,
( $lesseq(sortedUntil,i)
& $less(i,n) ) ).
tff(voogie_precondition_9,axiom,
! [J: $int,K: $int] :
( ( $lesseq(0,J)
& $less(J,sortedUntil)
& $lesseq(sortedUntil,K)
& $less(K,n) )
=> $lesseq(select_int_int(a,J),select_int_int(a,K)) ) ).
tff(voogie_precondition_10,axiom,
! [J: $int] :
( ( $lesseq(i,J)
& $less(J,n) )
=> $lesseq(select_int_int(a,i),select_int_int(a,J)) ) ).
tff(voogie_precondition_11,axiom,
! [J: $int,K: $int] :
( ( $lesseq(0,J)
& $less(J,K)
& $less(K,sortedUntil) )
=> $lesseq(select_int_int(a,J),select_int_int(a,K)) ) ).
tff(voogie_conjecture,conjecture,
$let(
bad: $o,
bad:=
$ite(~ $greater(i,sortedUntil),$true,bad),
$let(
[ t: $int,
a: array_int_int ],
[t,a]:=
$ite(
$lesseq(select_int_int(a,i),select_int_int(a,$difference(i,1))),
$let(
t: $int,
t:= select_int_int(a,i),
$let(
a: array_int_int,
a:= store_int_int(a,i,select_int_int(a,$difference(i,1))),
$let(
a: array_int_int,
a:= store_int_int(a,$difference(i,1),t),
[t,a] ) ) ),
[t,a] ),
$let(
i: $int,
i:= $difference(i,1),
$let(
bad: $o,
bad:=
$ite(~ $greater(i,sortedUntil),$true,bad),
$let(
[ t: $int,
a: array_int_int ],
[t,a]:=
$ite(
$lesseq(select_int_int(a,i),select_int_int(a,$difference(i,1))),
$let(
t: $int,
t:= select_int_int(a,i),
$let(
a: array_int_int,
a:= store_int_int(a,i,select_int_int(a,$difference(i,1))),
$let(
a: array_int_int,
a:= store_int_int(a,$difference(i,1),t),
[t,a] ) ) ),
[t,a] ),
$let(
i: $int,
i:= $difference(i,1),
$let(
bad: $o,
bad:=
$ite(~ $greater(i,sortedUntil),$true,bad),
$let(
[ t: $int,
a: array_int_int ],
[t,a]:=
$ite(
$lesseq(select_int_int(a,i),select_int_int(a,$difference(i,1))),
$let(
t: $int,
t:= select_int_int(a,i),
$let(
a: array_int_int,
a:= store_int_int(a,i,select_int_int(a,$difference(i,1))),
$let(
a: array_int_int,
a:= store_int_int(a,$difference(i,1),t),
[t,a] ) ) ),
[t,a] ),
$let(
i: $int,
i:= $difference(i,1),
$let(
bad: $o,
bad:=
$ite(~ $greater(i,sortedUntil),$true,bad),
$let(
[ t: $int,
a: array_int_int ],
[t,a]:=
$ite(
$lesseq(select_int_int(a,i),select_int_int(a,$difference(i,1))),
$let(
t: $int,
t:= select_int_int(a,i),
$let(
a: array_int_int,
a:= store_int_int(a,i,select_int_int(a,$difference(i,1))),
$let(
a: array_int_int,
a:= store_int_int(a,$difference(i,1),t),
[t,a] ) ) ),
[t,a] ),
$let(
i: $int,
i:= $difference(i,1),
( ( bad
| ( $lesseq(sortedUntil,i)
& $less(i,n) ) )
& ( bad
| ! [J: $int,K: $int] :
( ( $lesseq(0,J)
& $less(J,sortedUntil)
& $lesseq(sortedUntil,K)
& $less(K,n) )
=> $lesseq(select_int_int(a,J),select_int_int(a,K)) ) )
& ( bad
| ! [J: $int] :
( ( $lesseq(i,J)
& $less(J,n) )
=> $lesseq(select_int_int(a,i),select_int_int(a,J)) ) )
& ( bad
| ! [J: $int,K: $int] :
( ( $lesseq(0,J)
& $less(J,K)
& $less(K,sortedUntil) )
=> $lesseq(select_int_int(a,J),select_int_int(a,K)) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ).
%------------------------------------------------------------------------------