From 7c34190f56bd6029d61d717a7038604b54538b2e Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Fri, 17 Mar 2023 10:47:09 -0300 Subject: [PATCH] Removed unused assumptions --- isabelle/Core/QuiescentResult.thy | 3 +-- isabelle/Core/TimeRange.thy | 2 +- isabelle/Core/Timeout.thy | 18 +++++++++--------- isabelle/Core/ValidState.thy | 3 +-- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/isabelle/Core/QuiescentResult.thy b/isabelle/Core/QuiescentResult.thy index 65fadf54..51c9c162 100644 --- a/isabelle/Core/QuiescentResult.thy +++ b/isabelle/Core/QuiescentResult.thy @@ -13,8 +13,7 @@ lemma reduceContractStepPayIsQuiescent : warning = if paidMoney < moneyToPay then ReducePartialPay x21 x22 tok paidMoney moneyToPay else ReduceNoWarning; (payment, finalAccs) = giveMoney x21 x22 tok paidMoney newAccs in Reduced warning payment (sta\accounts := finalAccs\) x24) = - NotReduced \ - cont = Pay x21 x22 tok x23 x24 \ False" + NotReduced \ False" apply (cases "evalValue env sta x23 \ 0") apply simp apply (cases "min (moneyInAccount x21 tok (accounts sta)) (evalValue env sta x23) < (evalValue env sta x23)") diff --git a/isabelle/Core/TimeRange.thy b/isabelle/Core/TimeRange.thy index af2b07b9..82c9fe9a 100644 --- a/isabelle/Core/TimeRange.thy +++ b/isabelle/Core/TimeRange.thy @@ -214,7 +214,7 @@ lemma geIfNone_redListSize : lemma reduceStep_ifCaseLtCt_aux : "inInterval (a, b) (calculateNonAmbiguousInterval n ct (When x41 x42 x43)) \ - a \ b \ env = \timeInterval = (a, b)\ \ b < x42 \ ct < x42" + a \ b \ b < x42 \ ct < x42" apply (induction x41) apply simp apply (smt (verit, best) OptBoundTimeInterval.inInterval.simps(3) inIntervalIdempotency1) diff --git a/isabelle/Core/Timeout.thy b/isabelle/Core/Timeout.thy index a9bb3ab7..820b1bda 100644 --- a/isabelle/Core/Timeout.thy +++ b/isabelle/Core/Timeout.thy @@ -40,8 +40,7 @@ lemma reduceClose_is_Close : "reduceContractUntilQuiescent env sta Close = Contr using reductionLoopClose_is_Close by blast lemma timedOutReduce_only_quiescent_in_close_When : - "minTime sta \ iniTime \ - maxTimeContract (When x41 x42 x43) \ iniTime \ + "maxTimeContract (When x41 x42 x43) \ iniTime \ iniTime \ endTime \ reduceContractStep \timeInterval = (iniTime, endTime)\ (sta\minTime := iniTime\) (When x41 x42 x43) \ NotReduced" apply (induction x41) @@ -119,7 +118,7 @@ lemma maxTimeNotAmbiguous : "maxTimeContract cont \ iniTime \ iniTime \ + " maxTimeContract c \ iniTime \ iniTime \ endTime \ reduceContractStep \timeInterval = (iniTime, endTime)\ (sta\minTime := iniTime\) c = NotReduced \ c = Close" @@ -167,7 +166,7 @@ lemma timedOutReduceStep_does_not_modify_minTime : apply (smt ReduceStepResult.inject State.ext_inject State.surjective State.update_convs(3) State.update_convs(4) reduceContractStep.simps(5)) by simp -lemma timedOutReduceContractLoop_closes_contract : "minTime sta \ iniTime \ +lemma timedOutReduceContractLoop_closes_contract : " maxTimeContract cont \ iniTime \ iniTime \ endTime \ minTime sta = iniTime \ @@ -187,13 +186,14 @@ lemma timedOutReduceContractLoop_closes_contract : "minTime sta \ iniTime \< apply simp apply simp apply simp + + using facts maxTimeOnlyDecreases_reduceStep apply fastforce apply simp - using facts(3) facts(7) maxTimeOnlyDecreases_reduceStep apply fastforce - apply simp - using facts(5) facts(7) timedOutReduceStep_does_not_modify_minTime apply blast - by (metis (no_types, lifting) ReduceStepResult.simps(8) facts(6) facts(7) reductionLoop.simps) + using facts timedOutReduceStep_does_not_modify_minTime apply meson + using facts by (metis (no_types, lifting) ReduceStepResult.simps(8) reductionLoop.simps) done - using timedOutReduce_only_quiescent_in_close apply fastforce + using timedOutReduce_only_quiescent_in_close + apply (metis SemanticsTypes.State.cases SemanticsTypes.State.select_convs(4) SemanticsTypes.State.update_convs(4) reductionLoopClose_is_Close) using maxTimeNotAmbiguous_reduceStep by blast done diff --git a/isabelle/Core/ValidState.thy b/isabelle/Core/ValidState.thy index 0d689df8..8db6439a 100644 --- a/isabelle/Core/ValidState.thy +++ b/isabelle/Core/ValidState.thy @@ -25,8 +25,7 @@ lemma refundOne_preserves_valid_map_accounts : lemma reductionStep_preserves_valid_state_Refund : "valid_state state \ reduceContractStep env state Close = Reduced wa ef newState newCont \ - state = \accounts = oldAccounts, choices = oldChoices, boundValues = oldBoundValues, minTime = oldMinTime\ \ - newState = \accounts = newAccounts, choices = newChoices, boundValues = newBoundValues, minTime = newMinTime\ \ + state = \accounts = oldAccounts, choices = oldChoices, boundValues = oldBoundValues, minTime = oldMinTime\ \ valid_state newState" apply (cases "refundOne oldAccounts") using refundOne_preserves_valid_map_accounts by auto