diff options
| author | Brian Campbell | 2019-12-19 18:04:55 +0000 |
|---|---|---|
| committer | Brian Campbell | 2019-12-19 18:41:20 +0000 |
| commit | 866d8e5e2d7da11b0c34800679dbdc2d5d8fd8f2 (patch) | |
| tree | 1eb7dcebe8579de2f221e0f99e7ed32911e6e577 /lib/coq/Sail2_state_lemmas.v | |
| parent | 1aeb3db72e08a463e04632992ca3bd668ee4e52e (diff) | |
Coq library improvements
- add liftRS support to tactics
- define uint and sint in terms of functions without proof terms
- eq_vec correctness
- lemma that rounding up integers using reals is the obvious integer calculation
- another proof irrelevance tactic
- try lemmas in the sail hintdb both before and after goal processing
Diffstat (limited to 'lib/coq/Sail2_state_lemmas.v')
| -rw-r--r-- | lib/coq/Sail2_state_lemmas.v | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/coq/Sail2_state_lemmas.v b/lib/coq/Sail2_state_lemmas.v index 5f409e22..ef82084f 100644 --- a/lib/coq/Sail2_state_lemmas.v +++ b/lib/coq/Sail2_state_lemmas.v @@ -199,6 +199,14 @@ unfold build_trivial_exS. apply bindS_cong; auto. Qed. +Lemma liftRS_cong {A R Regs E} m m' : + m === m' -> + @liftRS A R Regs E m === liftRS m'. +intros E1. +unfold liftRS. +apply try_catchS_cong; auto. +Qed. + (* Monad lifting *) Lemma liftState_bind Regval Regs A B E {r : Sail2_values.register_accessors Regs Regval} {m : monad Regval A E} {f : A -> monad Regval B E} : @@ -287,6 +295,8 @@ Ltac statecong db := solve [ eapply or_boolSP_cong; intros; statecong db ] | |- (build_trivial_exS _) === _ => solve [ eapply build_trivial_exS_cong; intros; statecong db ] + | |- (liftRS _) === _ => + solve [ eapply liftRS_cong; intros; statecong db ] | |- (let '(matchvar1, matchvar2) := ?e1 in _) === _ => eapply (@equiv_transitive _ _ _ _ (let '(matchvar1,matchvar2) := e1 in _) _); [ destruct e1; etransitivity; [ statecong db | apply equiv_reflexive ] |
