All constraints:
(May ==K 1)
( Live ==K 1 )
( VCallValue ==K 0 )
( ( ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) <= 0 ) )
( ( minSInt256 <= ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) )
( ( ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) <= maxSInt256 ) )
( ( minSInt256 <= Art_i ) )
( ( Art_i <= maxSInt256 ) )
( ( 0 < ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) )
( ( 0 <= ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) )
( ( minSInt256 <= Rate ) )
( ( Rate <= maxSInt256 ) )
( ( 0 <= ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) ) )
( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) <= maxUInt256 ) )
( ( Rate ==K 0 ) ==K false )
( ( ( Base + Duty ) <= maxUInt256 ) )
( ( 0 > ACCT_ID_balance ) ==K false )
( ( VCallDepth >= 1024 ) ==K false )
( ( Rho <= TIME ) )
( ( 0 <= ACCT_ID ) )
( ( ACCT_ID <= maxUInt160 ) )
( ( 0 < ACCT_ID ) )
( ( 9 <= ACCT_ID ) )
( ( 0 <= CALLER_ID ) )
( ( CALLER_ID <= maxUInt160 ) )
( ( 0 <= ORIGIN_ID ) )
( ( ORIGIN_ID <= maxUInt160 ) )
( ( 0 <= TIME ) )
( ( TIME <= maxUInt256 ) )
( ( 0 <= ACCT_ID_balance ) )
( ( ACCT_ID_balance <= maxUInt256 ) )
( ( 0 <= ECREC_BAL ) )
( ( ECREC_BAL <= maxUInt256 ) )
( ( 0 <= SHA256_BAL ) )
( ( SHA256_BAL <= maxUInt256 ) )
( ( 0 <= RIP160_BAL ) )
( ( RIP160_BAL <= maxUInt256 ) )
( ( 0 <= ID_BAL ) )
( ( ID_BAL <= maxUInt256 ) )
( ( 0 <= MODEXP_BAL ) )
( ( MODEXP_BAL <= maxUInt256 ) )
( ( 0 <= ECADD_BAL ) )
( ( ECADD_BAL <= maxUInt256 ) )
( ( 0 <= ECMUL_BAL ) )
( ( ECMUL_BAL <= maxUInt256 ) )
( ( 0 <= ECPAIRING_BAL ) )
( ( ECPAIRING_BAL <= maxUInt256 ) )
( ( VCallDepth <= 1024 ) )
( ( 0 <= ABI_ilk ) )
( ( ABI_ilk <= maxUInt256 ) )
( ( 0 <= Vat ) )
( ( Vat <= maxUInt160 ) )
( ( 0 <= Base ) )
( ( Base <= maxUInt256 ) )
( ( 0 <= Vow ) )
( ( Vow <= maxUInt160 ) )
( ( 0 <= Duty ) )
( ( Duty <= maxUInt256 ) )
( ( 0 <= Rho ) )
( ( Rho <= maxUInt48 ) )
( ( 0 <= Rate ) )
( ( Rate <= maxUInt256 ) )
( ( 0 <= Art_i ) )
( ( Art_i <= maxUInt256 ) )
( ( 0 <= Dai ) )
( ( Dai <= maxUInt256 ) )
( ( 0 <= Debt ) )
( ( Debt <= maxUInt256 ) )
( ( 0 <= Ilk_spot ) )
( ( Ilk_spot <= maxUInt256 ) )
( ( 0 <= Ilk_line ) )
( ( Ilk_line <= maxUInt256 ) )
( ( 0 <= Ilk_dust ) )
( ( Ilk_dust <= maxUInt256 ) )
( ( 0 <= Vat_balance ) )
( ( Vat_balance <= maxUInt256 ) )
( ( sizeWordStackAux(CD, 0) <= 1250000000 ) )
( ( 0 < Vat ) )
( ( 9 <= Vat ) )
( ( 0 < Vow ) )
( ( 9 <= Vow ) )
( ( ACCT_ID ==K Vat ) ==K false )
( ( num0(( TIME - Rho )) >= 0 ) )
( ( num1(( TIME - Rho )) >= 0 ) )
( ( 0 <= (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) ) )
( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * #Ray ) < pow256 ) )
( ( VGas >= ( 300000000 + (#if ( ( Base + Duty ) ==K 0 ) #then ( 82 + (#if ( ( TIME - Rho ) ==K 0 ) #then 0 #else 10 #fi) ) #else (#if ( ( ( TIME - Rho ) modInt 2 ) ==K 0 ) #then (#if ( ( ( TIME - Rho )
/ 2 ) ==K 0 ) #then 150 #else ( ( ( num0(( TIME - Rho )) - 1 ) * 172 ) + ( 437 + ( num1(( TIME - Rho )) * 287 ) ) ) #fi) #else (#if ( ( ( TIME - Rho ) / 2 ) ==K 0 ) #then 160 #else ( ( num0(( TIME - Rho
)) * 172 ) + ( 447 + ( ( num1(( TIME - Rho )) - 1 ) * 287 ) ) ) #fi) #fi) #fi) ) ) )
( ( ( VCallDepth < 1024 ) andBool ( ( ( 0 <= ( TIME - Rho ) ) andBool ( ( TIME - Rho ) <= maxUInt256 ) ) andBool ( ( ( 0 <= ( Base + Duty ) ) andBool ( ( Base + Duty ) <= maxUInt256 ) ) andBool ( ( ( 0
<= ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) ) andBool ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) <= maxUInt256 ) ) andBool ( ( ( 0 <= ( Dai + (
Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) ) andBool ( ( Dai + ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate
) / #Ray ) - Rate ) ) ) <= maxUInt256 ) ) andBool ( ( ( 0 <= ( Debt + ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) ) andBool ( ( Debt + ( Art_i
* ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) <= maxUInt256 ) ) andBool ( ( ( minSInt256 <= Rate ) andBool ( Rate <= maxSInt256 ) ) andBool ( ( (
minSInt256 <= Art_i ) andBool ( Art_i <= maxSInt256 ) ) andBool ( ( minSInt256 <= ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) andBool ( (
Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) <= maxSInt256 ) ) ) ) ) ) ) ) ) ) ==K false )
( ( 0 <= ( Base + Duty ) ) )
( ( 0 <= ( TIME - Rho ) ) )
( ( ( TIME - Rho ) <= maxUInt256 ) )
( ( 0 < ( VGas - ( 5013 + (#if ( ( Base + Duty ) ==K 0 ) #then ( 82 + (#if ( ( TIME - Rho ) ==K 0 ) #then 0 #else 10 #fi) ) #else (#if ( ( ( TIME - Rho ) modInt 2 ) ==K 0 ) #then (#if ( ( ( TIME - Rho )
/ 2 ) ==K 0 ) #then 150 #else ( ( ( num0(( TIME - Rho )) - 1 ) * 172 ) + ( 437 + ( num1(( TIME - Rho )) * 287 ) ) ) #fi) #else (#if ( ( ( TIME - Rho ) / 2 ) ==K 0 ) #then 160 #else ( ( num0(( TIME - Rho
)) * 172 ) + ( 447 + ( ( num1(( TIME - Rho )) - 1 ) * 287 ) ) ) #fi) #fi) #fi) ) ) ) )
Near the bottom, there is the following large constraint (bascially the negation of all the necessary conditions from the pass
spec):
( ( ( VCallDepth < 1024 ) andBool ( ( ( 0 <= ( TIME - Rho ) ) andBool ( ( TIME - Rho ) <= maxUInt256 ) ) andBool ( ( ( 0 <= ( Base + Duty ) ) andBool ( ( Base + Duty ) <= maxUInt256 ) ) andBool ( ( ( 0
<= ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) ) andBool ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) <= maxUInt256 ) ) andBool ( ( ( 0 <= ( Dai + (
Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) ) andBool ( ( Dai + ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate
) / #Ray ) - Rate ) ) ) <= maxUInt256 ) ) andBool ( ( ( 0 <= ( Debt + ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) ) andBool ( ( Debt + ( Art_i
* ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) <= maxUInt256 ) ) andBool ( ( ( minSInt256 <= Rate ) andBool ( Rate <= maxSInt256 ) ) andBool ( ( (
minSInt256 <= Art_i ) andBool ( Art_i <= maxSInt256 ) ) andBool ( ( minSInt256 <= ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) andBool ( (
Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) <= maxSInt256 ) ) ) ) ) ) ) ) ) ) ==K false )
I claim this constraint is contradicted by the rest. I will show that under the assumption that the other constraints hold,
all individual conditions in this constraint are true, and thus their union via andBool
cannot be false.
( VCallDepth < 1024 )
True because ( ( VCallDepth >= 1024 ) ==K false )
is also a constraint.
( ( 0 <= ( TIME - Rho ) ) andBool ( ( TIME - Rho ) <= maxUInt256 ) )
Follows from the following constraints:
( ( Rho <= TIME ) )
( ( 0 <= Rho ) )
( ( 0 <= TIME ) )
( ( TIME <= maxUInt256 ) )
( ( 0 <= ( Base + Duty ) ) andBool ( ( Base + Duty ) <= maxUInt256 ) )
Follows from the following constraints:
( ( ( Base + Duty ) <= maxUInt256 ) )
( ( 0 <= Base ) )
( 0 <= Duty ) )
( ( 0 <= ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) ) andBool ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) <= maxUInt256 ) )
Follows from the following constraints:
( ( 0 <= ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) ) )
( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) <= maxUInt256 ) )
( ( 0 <= ( Dai + (Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) ) andBool ( ( Dai + ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) <= maxUInt256 ) )
To show this I will first show that under the constraints given, Art_i == 0
.
Lemma: Art_i == 0
under the given constraints.
Proof: the following three constraints are sufficient.
( ( 0 < ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) )
( ( 0 <= Art_i ) )
( ( ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) <= 0 ) )
With Art_i == 0
established, the constraint in question reduces to ((0 <= Dai) andBool (Dai <= maxUInt256))
.
This is proven true by the following constraints:
( ( 0 <= Dai ) )
( ( Dai <= maxUInt256 ) )
( ( 0 <= ( Debt + ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) ) andBool ( ( Debt + ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) <= maxUInt256 ) )
Using the previously-proven lemma that Art_i == 0
, this constraint reduces to saying that Debt
in the range of a
uint256
. This is proven by the following constraints:
( ( 0 <= Debt ) )
( ( Debt <= maxUInt256 ) )
( ( minSInt256 <= Rate ) andBool ( Rate <= maxSInt256 ) )
This follows from the following constraints:
( ( minSInt256 <= Rate ) )
( ( Rate <= maxSInt256 ) )
( ( minSInt256 <= Art_i ) andBool ( Art_i <= maxSInt256 ) )
This follows from Art_i == 0
, as well as the following two constraints:
( ( minSInt256 <= Art_i ) )
( ( Art_i <= maxSInt256 ) )
( ( minSInt256 <= ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) andBool ( ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) <= maxSInt256 ) )
This follows from Art_i == 0
, as well as the following two constraints:
( ( minSInt256 <= ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) ) )
( ( ( Art_i * ( ( ( (#rpow( #Ray , ( Base + Duty ) , ( TIME - Rho ) , #Ray )) * Rate ) / #Ray ) - Rate ) ) <= maxSInt256 ) )
We have now exhausted the sub-claims; they are all true, so andBool
ing them together cannot result in a falsehood.
Thus the given set of claims is contradictory.
Spec for proof: