TPTP Problem File: SWX014_1.p
View Solutions
- Solve Problem
%------------------------------------------------------------------------------
% File : SWX014_1 : TPTP v9.1.0. Released v9.1.0.
% Domain : Software Verification
% Problem : select-k-3
% Version : Especial.
% English :
% Refs : [Kot17] Kotelnikov (2017), Email to Geoff Sutcliffe
% Source : [Kot17]
% Names : select-k-3 [Kot17]
% Status : Theorem
% Rating : ? v9.1.0
% Syntax : Number of formulae : 24 ( 2 unt; 11 typ; 0 def)
% Number of atoms : 45 ( 8 equ)
% Maximal formula atoms : 15 ( 3 avg)
% Number of connectives : 33 ( 1 ~; 4 |; 17 &)
% ( 0 <=>; 11 =>; 0 <=; 0 <~>)
% Maximal formula depth : 11 ( 4 avg)
% Maximal term depth : 3 ( 1 avg)
% Number of X terms : 9 ( 0 []; 0 ite; 9 let)
% Number arithmetic : 70 ( 33 atm; 7 fun; 15 num; 15 var)
% Number of types : 3 ( 1 usr; 1 ari)
% Number of type conns : 5 ( 2 >; 3 *; 0 +; 0 <<)
% Number of predicates : 6 ( 1 usr; 2 prp; 0-2 aty)
% Number of functors : 13 ( 9 usr; 9 con; 0-3 aty)
% Number of variables : 19 ( 19 !; 0 ?; 19 :)
% 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(j,type,
j: $int ).
tff(k,type,
k: $int ).
tff(minValue,type,
minValue: $int ).
tff(n,type,
n: $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,
$greater(n,0) ).
tff(voogie_precondition_5,axiom,
( $lesseq(0,k)
& $less(k,n) ) ).
tff(voogie_precondition_6,axiom,
( $lesseq(0,i)
& $lesseq(i,$sum(k,1)) ) ).
tff(voogie_precondition_7,axiom,
( $greater(i,0)
=> ! [V: $int] :
( ( $lesseq(0,V)
& $less(V,$difference(i,1)) )
=> $lesseq(select_int_int(a,V),select_int_int(a,$difference(i,1))) ) ) ).
tff(voogie_precondition_8,axiom,
( $greater(i,0)
=> ! [W: $int] :
( ( $less($difference(i,1),W)
& $less(W,n) )
=> $lesseq(select_int_int(a,$difference(i,1)),select_int_int(a,W)) ) ) ).
tff(voogie_precondition_9,axiom,
( $lesseq($sum(i,1),j)
& $lesseq(j,n) ) ).
tff(voogie_precondition_10,axiom,
select_int_int(a,i) = minValue ).
tff(voogie_precondition_11,axiom,
! [W: $int] :
( ( $less(i,W)
& $less(W,j) )
=> $lesseq(select_int_int(a,i),select_int_int(a,W)) ) ).
tff(voogie_precondition_12,axiom,
! [V: $int,W: $int] :
( ( $lesseq(0,V)
& $less(V,i)
& $lesseq(i,W)
& $less(W,n) )
=> $lesseq(select_int_int(a,V),select_int_int(a,W)) ) ).
tff(voogie_conjecture,conjecture,
$let(
bad: $o,
bad:=
$ite(~ $less(j,n),$true,bad),
$let(
[ minValue: $int,
t: $int,
a: array_int_int ],
[minValue,t,a]:=
$ite(
$less(select_int_int(a,j),minValue),
$let(
minValue: $int,
minValue:= select_int_int(a,j),
$let(
t: $int,
t:= select_int_int(a,i),
$let(
a: array_int_int,
a:= store_int_int(a,i,select_int_int(a,j)),
$let(
a: array_int_int,
a:= store_int_int(a,j,t),
[minValue,t,a] ) ) ) ),
[minValue,t,a] ),
$let(
j: $int,
j:= $sum(j,1),
$let(
bad: $o,
bad:=
$ite(~ $less(j,n),$true,bad),
$let(
[ minValue: $int,
t: $int,
a: array_int_int ],
[minValue,t,a]:=
$ite(
$less(select_int_int(a,j),minValue),
$let(
minValue: $int,
minValue:= select_int_int(a,j),
$let(
t: $int,
t:= select_int_int(a,i),
$let(
a: array_int_int,
a:= store_int_int(a,i,select_int_int(a,j)),
$let(
a: array_int_int,
a:= store_int_int(a,j,t),
[minValue,t,a] ) ) ) ),
[minValue,t,a] ),
$let(
j: $int,
j:= $sum(j,1),
$let(
bad: $o,
bad:=
$ite(~ $less(j,n),$true,bad),
$let(
[ minValue: $int,
t: $int,
a: array_int_int ],
[minValue,t,a]:=
$ite(
$less(select_int_int(a,j),minValue),
$let(
minValue: $int,
minValue:= select_int_int(a,j),
$let(
t: $int,
t:= select_int_int(a,i),
$let(
a: array_int_int,
a:= store_int_int(a,i,select_int_int(a,j)),
$let(
a: array_int_int,
a:= store_int_int(a,j,t),
[minValue,t,a] ) ) ) ),
[minValue,t,a] ),
$let(
j: $int,
j:= $sum(j,1),
( ( bad
| ( $lesseq($sum(i,1),j)
& $lesseq(j,n) ) )
& ( bad
| ( select_int_int(a,i) = minValue ) )
& ( bad
| ! [W: $int] :
( ( $less(i,W)
& $less(W,j) )
=> $lesseq(select_int_int(a,i),select_int_int(a,W)) ) )
& ( bad
| ! [V: $int,W: $int] :
( ( $lesseq(0,V)
& $less(V,i)
& $lesseq(i,W)
& $less(W,n) )
=> $lesseq(select_int_int(a,V),select_int_int(a,W)) ) ) ) ) ) ) ) ) ) ) ) ) ).
%------------------------------------------------------------------------------