Skip to content

Commit

Permalink
Removed unused assumptions
Browse files Browse the repository at this point in the history
  • Loading branch information
hrajchert committed Mar 17, 2023
1 parent 2d016ca commit 7c34190
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
3 changes: 1 addition & 2 deletions isabelle/Core/QuiescentResult.thy
Expand Up @@ -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\<lparr>accounts := finalAccs\<rparr>) x24) =
NotReduced \<Longrightarrow>
cont = Pay x21 x22 tok x23 x24 \<Longrightarrow> False"
NotReduced \<Longrightarrow> False"
apply (cases "evalValue env sta x23 \<le> 0")
apply simp
apply (cases "min (moneyInAccount x21 tok (accounts sta)) (evalValue env sta x23) < (evalValue env sta x23)")
Expand Down
2 changes: 1 addition & 1 deletion isabelle/Core/TimeRange.thy
Expand Up @@ -214,7 +214,7 @@ lemma geIfNone_redListSize :


lemma reduceStep_ifCaseLtCt_aux : "inInterval (a, b) (calculateNonAmbiguousInterval n ct (When x41 x42 x43)) \<Longrightarrow>
a \<le> b \<Longrightarrow> env = \<lparr>timeInterval = (a, b)\<rparr> \<Longrightarrow> b < x42 \<Longrightarrow> ct < x42"
a \<le> b \<Longrightarrow> b < x42 \<Longrightarrow> ct < x42"
apply (induction x41)
apply simp
apply (smt (verit, best) OptBoundTimeInterval.inInterval.simps(3) inIntervalIdempotency1)
Expand Down
18 changes: 9 additions & 9 deletions isabelle/Core/Timeout.thy
Expand Up @@ -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 \<le> iniTime \<Longrightarrow>
maxTimeContract (When x41 x42 x43) \<le> iniTime \<Longrightarrow>
"maxTimeContract (When x41 x42 x43) \<le> iniTime \<Longrightarrow>
iniTime \<le> endTime \<Longrightarrow>
reduceContractStep \<lparr>timeInterval = (iniTime, endTime)\<rparr> (sta\<lparr>minTime := iniTime\<rparr>) (When x41 x42 x43) \<noteq> NotReduced"
apply (induction x41)
Expand Down Expand Up @@ -119,7 +118,7 @@ lemma maxTimeNotAmbiguous : "maxTimeContract cont \<le> iniTime \<Longrightarrow


lemma timedOutReduce_only_quiescent_in_close :
"minTime sta \<le> iniTime \<Longrightarrow>
"
maxTimeContract c \<le> iniTime \<Longrightarrow>
iniTime \<le> endTime \<Longrightarrow>
reduceContractStep \<lparr>timeInterval = (iniTime, endTime)\<rparr> (sta\<lparr>minTime := iniTime\<rparr>) c = NotReduced \<Longrightarrow> c = Close"
Expand Down Expand Up @@ -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 \<le> iniTime \<Longrightarrow>
lemma timedOutReduceContractLoop_closes_contract : "
maxTimeContract cont \<le> iniTime \<Longrightarrow>
iniTime \<le> endTime \<Longrightarrow>
minTime sta = iniTime \<Longrightarrow>
Expand All @@ -187,13 +186,14 @@ lemma timedOutReduceContractLoop_closes_contract : "minTime sta \<le> 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

Expand Down
3 changes: 1 addition & 2 deletions isabelle/Core/ValidState.thy
Expand Up @@ -25,8 +25,7 @@ lemma refundOne_preserves_valid_map_accounts :
lemma reductionStep_preserves_valid_state_Refund :
"valid_state state \<Longrightarrow>
reduceContractStep env state Close = Reduced wa ef newState newCont \<Longrightarrow>
state = \<lparr>accounts = oldAccounts, choices = oldChoices, boundValues = oldBoundValues, minTime = oldMinTime\<rparr> \<Longrightarrow>
newState = \<lparr>accounts = newAccounts, choices = newChoices, boundValues = newBoundValues, minTime = newMinTime\<rparr> \<Longrightarrow>
state = \<lparr>accounts = oldAccounts, choices = oldChoices, boundValues = oldBoundValues, minTime = oldMinTime\<rparr> \<Longrightarrow>
valid_state newState"
apply (cases "refundOne oldAccounts")
using refundOne_preserves_valid_map_accounts by auto
Expand Down

0 comments on commit 7c34190

Please sign in to comment.