TPTP Problem File: SWX009_1.p
View Solutions
- Solve Problem
%------------------------------------------------------------------------------
% File : SWX009_1 : TPTP v9.1.0. Released v9.1.0.
% Domain : Software Verification
% Problem : one-duplicate-3
% Version : Especial.
% English :
% Refs : [Kot17] Kotelnikov (2017), Email to Geoff Sutcliffe
% Source : [Kot17]
% Names : one-duplicate-3 [Kot17]
% Status : Theorem
% Rating : ? v9.1.0
% Syntax : Number of formulae : 25 ( 1 unt; 12 typ; 0 def)
% Number of atoms : 47 ( 14 equ)
% Maximal formula atoms : 15 ( 3 avg)
% Number of connectives : 33 ( 4 ~; 4 |; 12 &)
% ( 0 <=>; 13 =>; 0 <=; 0 <~>)
% Maximal formula depth : 10 ( 5 avg)
% Maximal term depth : 3 ( 1 avg)
% Number of FOOLs : 8 ( 5 fml; 3 var)
% Number of X terms : 6 ( 0 []; 0 ite; 6 let)
% Number arithmetic : 50 ( 20 atm; 0 fun; 11 num; 19 var)
% Number of types : 4 ( 2 usr; 1 ari)
% Number of type conns : 10 ( 4 >; 6 *; 0 +; 0 <<)
% Number of predicates : 8 ( 2 usr; 2 prp; 0-2 aty)
% Number of functors : 11 ( 8 usr; 7 con; 0-3 aty)
% Number of variables : 29 ( 29 !; 0 ?; 29 :)
% SPC : TX0_THM_EQU_ARI
% Comments : This file was generated by Voogie.
%------------------------------------------------------------------------------
tff(array_int_int,type,
array_int_int: $tType ).
tff(array_int_bool,type,
array_int_bool: $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(select_int_bool,type,
select_int_bool: ( array_int_bool * $int ) > $o ).
tff(store_int_bool,type,
store_int_bool: ( array_int_bool * $int * $o ) > array_int_bool ).
tff(a,type,
a: array_int_int ).
tff(bad,type,
bad: $o ).
tff(d,type,
d: $int ).
tff(i,type,
i: $int ).
tff(n,type,
n: $int ).
tff(occs,type,
occs: array_int_bool ).
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,
! [A: array_int_bool,V: $o,I: $int,J: $int] :
( ( I = J )
=> ( select_int_bool(store_int_bool(A,I,(V)),J) = (V) ) ) ).
tff(voogie_precondition_5,axiom,
! [A: array_int_bool,V: $o,I: $int,J: $int] :
( ( I != J )
=> ( select_int_bool(store_int_bool(A,I,(V)),J) = select_int_bool(A,J) ) ) ).
tff(voogie_precondition_6,axiom,
! [A: array_int_bool,B: array_int_bool] :
( ! [I: $int] : ( select_int_bool(A,I) = select_int_bool(A,I) )
=> ( A = B ) ) ).
tff(voogie_precondition_7,axiom,
$greater(n,0) ).
tff(voogie_precondition_8,axiom,
! [I: $int] :
( ( $lesseq(0,I)
& $less(I,n) )
=> $greatereq(select_int_int(a,I),0) ) ).
tff(voogie_precondition_9,axiom,
( $lesseq(0,i)
& $lesseq(i,n) ) ).
tff(voogie_precondition_10,axiom,
( $greatereq(d,0)
=> select_int_bool(occs,select_int_int(a,i)) ) ).
tff(voogie_precondition_11,axiom,
! [K: $int] :
( ( $lesseq(0,K)
& $less(K,i) )
=> select_int_bool(occs,select_int_int(a,K)) ) ).
tff(voogie_precondition_12,axiom,
! [J: $int,K: $int] :
( ( $lesseq(0,J)
& $less(J,K)
& $less(K,i) )
=> ( select_int_int(a,J) != select_int_int(a,K) ) ) ).
tff(voogie_conjecture,conjecture,
$let(
bad: $o,
bad:=
$ite(
~ ( $less(i,n)
& $less(d,0) ),
$true,
bad ),
$let(
[ d: $int,
occs: array_int_bool,
i: $int ],
[d,occs,i]:=
$ite(
~ select_int_bool(occs,select_int_int(a,i)),
$let(
occs: array_int_bool,
occs:= store_int_bool(occs,select_int_int(a,i),$true),
$let(
i: $int,
i:= $sum(i,1),
[d,occs,i] ) ),
$let(
d: $int,
d:= select_int_int(a,i),
[d,occs,i] ) ),
$let(
bad: $o,
bad:=
$ite(
~ ( $less(i,n)
& $less(d,0) ),
$true,
bad ),
$let(
[ d: $int,
occs: array_int_bool,
i: $int ],
[d,occs,i]:=
$ite(
~ select_int_bool(occs,select_int_int(a,i)),
$let(
occs: array_int_bool,
occs:= store_int_bool(occs,select_int_int(a,i),$true),
$let(
i: $int,
i:= $sum(i,1),
[d,occs,i] ) ),
$let(
d: $int,
d:= select_int_int(a,i),
[d,occs,i] ) ),
$let(
bad: $o,
bad:=
$ite(
~ ( $less(i,n)
& $less(d,0) ),
$true,
bad ),
$let(
[ d: $int,
occs: array_int_bool,
i: $int ],
[d,occs,i]:=
$ite(
~ select_int_bool(occs,select_int_int(a,i)),
$let(
occs: array_int_bool,
occs:= store_int_bool(occs,select_int_int(a,i),$true),
$let(
i: $int,
i:= $sum(i,1),
[d,occs,i] ) ),
$let(
d: $int,
d:= select_int_int(a,i),
[d,occs,i] ) ),
( ( bad
| ( $lesseq(0,i)
& $lesseq(i,n) ) )
& ( bad
| ( $greatereq(d,0)
=> select_int_bool(occs,select_int_int(a,i)) ) )
& ( bad
| ! [K: $int] :
( ( $lesseq(0,K)
& $less(K,i) )
=> select_int_bool(occs,select_int_int(a,K)) ) )
& ( bad
| ! [J: $int,K: $int] :
( ( $lesseq(0,J)
& $less(J,K)
& $less(K,i) )
=> ( select_int_int(a,J) != select_int_int(a,K) ) ) ) ) ) ) ) ) ) ) ).
%------------------------------------------------------------------------------