Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion. • 103 items • Updated • 3
statement stringlengths 1 1.48k | proof stringlengths 0 8.54k | type stringclasses 15
values | symbolic_name stringlengths 1 85 | library stringclasses 3
values | filename stringclasses 31
values | imports listlengths 1 14 | deps listlengths 0 38 | docstring stringclasses 17
values | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
A_eq_dec : forall x y : A, {x = y} + {x <> y}. | Hypothesis | A_eq_dec | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | ||
dup_drop_step : list A -> list A -> Prop | :=
| DDS_dup : forall l p,
In p l ->
dup_drop_step l (p :: l)
| DDS_drop : forall xs p ys,
dup_drop_step (xs ++ p :: ys) (xs ++ ys). | Inductive | dup_drop_step | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_step_star | := clos_refl_trans_n1 _ dup_drop_step. | Definition | dup_drop_step_star | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_step_star_trans :
forall l l' l'',
dup_drop_step_star l l' ->
dup_drop_step_star l' l'' ->
dup_drop_step_star l l''. | Proof using.
intros.
apply clos_rt_rtn1_iff.
eapply rt_trans; apply clos_rt_rtn1_iff; eauto.
Qed. | Lemma | dup_drop_step_star_trans | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_step_star_step_n1 :
forall l l' l'',
dup_drop_step_star l l' ->
dup_drop_step l' l'' ->
dup_drop_step_star l l''. | Proof using.
intros.
econstructor; eauto.
Qed. | Lemma | dup_drop_step_star_step_n1 | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step",
"dup_drop_step_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_step_star_step_1n :
forall l l' l'',
dup_drop_step l l' ->
dup_drop_step_star l' l'' ->
dup_drop_step_star l l''. | Proof using.
intros.
apply clos_rt_rtn1_iff.
apply clos_rt_rt1n_iff.
econstructor; [eauto|].
apply clos_rt_rt1n_iff.
apply clos_rt_rtn1_iff.
auto.
Qed. | Lemma | dup_drop_step_star_step_1n | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step",
"dup_drop_step_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_step_star_step_1 :
forall l l',
dup_drop_step l l' ->
dup_drop_step_star l l'. | Proof using.
intros.
eapply dup_drop_step_star_step_1n; eauto.
constructor.
Qed. | Lemma | dup_drop_step_star_step_1 | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step",
"dup_drop_step_star",
"dup_drop_step_star_step_1n"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_swap :
forall l x y,
dup_drop_step_star (x :: y :: l) (y :: x :: l). | Proof using.
intros.
eapply dup_drop_step_star_step_1n; [eapply DDS_dup with (p := y); simpl; auto|].
eapply dup_drop_step_star_step_1n.
eapply DDS_drop with (xs := [y; x]) (p := y) (ys := l).
constructor.
Qed. | Lemma | dup_drop_swap | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step_star",
"dup_drop_step_star_step_1n"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_cons :
forall l l' x,
dup_drop_step_star l l' ->
dup_drop_step_star (x :: l) (x :: l'). | Proof using.
induction 1.
- constructor.
- invc H.
+ eapply dup_drop_step_star_trans; [eauto|].
eapply dup_drop_step_star_step_1n; [eapply DDS_dup with (p := p); simpl; auto|].
auto using dup_drop_swap.
+ eapply dup_drop_step_star_trans; [eauto|].
eapply dup_drop_step_sta... | Lemma | dup_drop_cons | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step_star",
"dup_drop_step_star_step_1n",
"dup_drop_step_star_trans",
"dup_drop_swap"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_Permutation :
forall l l',
Permutation l l' ->
dup_drop_step_star l l'. | Proof using.
induction 1.
- constructor.
- auto using dup_drop_cons.
- auto using dup_drop_swap.
- eauto using dup_drop_step_star_trans.
Qed. | Lemma | dup_drop_Permutation | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_cons",
"dup_drop_step_star",
"dup_drop_step_star_trans",
"dup_drop_swap"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
remove_not_in_nop :
forall a l,
~ In a l ->
remove A_eq_dec a l = l. | Proof using.
induction l; simpl; intuition.
break_if; congruence.
Qed. | Lemma | remove_not_in_nop | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"A_eq_dec",
"remove"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_in :
forall l l' a,
dup_drop_step_star l l' ->
In a l' ->
In a l. | Proof using.
induction 1; intros.
- auto.
- invc H.
+ simpl in *. intuition.
subst. auto.
+ apply IHclos_refl_trans_n1.
find_apply_lem_hyp in_app_or.
intuition auto with datatypes.
Qed. | Lemma | dup_drop_in | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_dup_early :
forall l l' a,
dup_drop_step_star l l' ->
In a l ->
dup_drop_step_star l (a :: l'). | Proof using.
induction 1; intros.
- apply dup_drop_step_star_step_1. constructor. auto.
- concludes.
eapply dup_drop_step_star_trans; eauto.
apply dup_drop_cons.
apply dup_drop_step_star_step_1.
auto.
Qed. | Lemma | dup_drop_dup_early | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_cons",
"dup_drop_step_star",
"dup_drop_step_star_step_1",
"dup_drop_step_star_trans"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_step_star_remove_In :
forall l' l a,
In a l' ->
dup_drop_step_star l (remove A_eq_dec a l') ->
dup_drop_step_star (a :: l) l'. | Proof using.
induction l'; simpl; intuition.
- subst. break_if; try congruence.
destruct (in_dec A_eq_dec a0 l').
+ find_apply_hyp_hyp.
eapply dup_drop_step_star_trans; eauto.
eapply dup_drop_step_star_step_1.
apply DDS_dup; auto.
+ rewrite remove_not_in_nop in * by aut... | Lemma | dup_drop_step_star_remove_In | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"A_eq_dec",
"dup_drop_cons",
"dup_drop_dup_early",
"dup_drop_in",
"dup_drop_step_star",
"dup_drop_step_star_step_1",
"dup_drop_step_star_step_n1",
"dup_drop_step_star_trans",
"remove",
"remove_not_in_nop"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
remove_In_elim :
forall x a l,
In x (remove A_eq_dec a l) ->
x <> a /\ In x l. | Proof using.
induction l; simpl; intuition; break_if; subst; simpl in *; intuition.
Qed. | Lemma | remove_In_elim | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"A_eq_dec",
"remove"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
dup_drop_reorder :
forall l l' : list A,
(forall x, In x l' -> In x l) ->
dup_drop_step_star l l'. | Proof using A_eq_dec.
induction l; intros.
- destruct l'.
+ constructor.
+ simpl in *. exfalso. eauto.
- destruct (in_dec A_eq_dec a l').
+ eapply dup_drop_step_star_remove_In. auto.
apply IHl.
intros.
find_apply_lem_hyp remove_In_elim.
intuition.
fi... | Lemma | dup_drop_reorder | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"A_eq_dec",
"dup_drop_step_star",
"dup_drop_step_star_remove_In",
"dup_drop_step_star_step_1n",
"remove_In_elim"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
step_failure_dup_drop_step :
forall ps ps' Sigma f,
dup_drop_step_star _ ps ps' ->
step_failure_star (f, mkNetwork ps Sigma) (f, mkNetwork ps' Sigma) []. | Proof using.
induction 1.
- constructor.
- match goal with
| [ H : dup_drop_step _ _ _ |- _ ] => invc H
end.
+ find_apply_lem_hyp in_split. break_exists. break_and. subst.
apply refl_trans_n1_1n_trace.
eapply RTn1TStep with (cs := []).
* apply refl_trans_1n_n1_trace... | Theorem | step_failure_dup_drop_step | Core | theories/Core/DupDropReordering.v | [
"Coq",
"List",
"Relations",
"Permutation",
"StructTact",
"StructTactics",
"Verdi",
"Net",
"ListNotations"
] | [
"dup_drop_step",
"dup_drop_step_star",
"refl_trans_1n_n1_trace",
"refl_trans_n1_1n_trace",
"step_failure_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ordered_dynamic_uninitialized_state :
forall net failed tr,
step_ordered_dynamic_failure_star step_ordered_dynamic_failure_init (failed, net) tr ->
forall n, ~ In n (odnwNodes net) ->
odnwState net n = None. | Proof using.
move => net failed tr H.
remember step_ordered_dynamic_failure_init as y in *.
have ->: net = snd (failed, net) by [].
move: Heqy.
induction H using refl_trans_1n_trace_n1_ind => H_init /=; first by rewrite H_init.
concludes => {H_init}.
match goal with
| [ H : step_ordered_dynamic_failure _ _ _ |- _ ] => ... | Lemma | ordered_dynamic_uninitialized_state | Core | theories/Core/DynamicNetLemmas.v | [
"Verdi",
"StructTact",
"Update",
"Coq",
"FunctionalExtensionality",
"Sumbool",
"Relation_Definitions",
"RelationClasses",
"Ssrexport"
] | [
"name_eq_dec",
"refl_trans_1n_trace_n1_ind",
"step_ordered_dynamic_failure",
"step_ordered_dynamic_failure_init",
"step_ordered_dynamic_failure_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ordered_dynamic_initialized_state :
forall net failed tr,
step_ordered_dynamic_failure_star step_ordered_dynamic_failure_init (failed, net) tr ->
forall n, In n (odnwNodes net) ->
exists d, odnwState net n = Some d. | Proof using.
move => net failed tr H.
remember step_ordered_dynamic_failure_init as y in *.
have ->: net = snd (failed, net) by [].
move: Heqy.
induction H using refl_trans_1n_trace_n1_ind => H_init /=; first by rewrite H_init.
repeat find_rewrite.
concludes => {H_init}.
match goal with
| [ H : step_ordered_dynamic_fai... | Lemma | ordered_dynamic_initialized_state | Core | theories/Core/DynamicNetLemmas.v | [
"Verdi",
"StructTact",
"Update",
"Coq",
"FunctionalExtensionality",
"Sumbool",
"Relation_Definitions",
"RelationClasses",
"Ssrexport"
] | [
"refl_trans_1n_trace_n1_ind",
"step_ordered_dynamic_failure",
"step_ordered_dynamic_failure_init",
"step_ordered_dynamic_failure_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ordered_dynamic_failed_then_initialized :
forall net failed tr,
step_ordered_dynamic_failure_star step_ordered_dynamic_failure_init (failed, net) tr ->
forall n, In n failed ->
In n (odnwNodes net). | Proof using.
move => net failed tr H.
remember step_ordered_dynamic_failure_init as y in *.
have ->: failed = fst (failed, net) by [].
have H_eq_o: net = snd (failed, net) by [].
rewrite {2}H_eq_o {H_eq_o}.
move: Heqy.
induction H using refl_trans_1n_trace_n1_ind => H_init /=; first by rewrite H_init.
repeat find_rewri... | Lemma | ordered_dynamic_failed_then_initialized | Core | theories/Core/DynamicNetLemmas.v | [
"Verdi",
"StructTact",
"Update",
"Coq",
"FunctionalExtensionality",
"Sumbool",
"Relation_Definitions",
"RelationClasses",
"Ssrexport"
] | [
"refl_trans_1n_trace_n1_ind",
"step_ordered_dynamic_failure",
"step_ordered_dynamic_failure_init",
"step_ordered_dynamic_failure_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ordered_dynamic_state_not_initialized_not_failed :
forall net failed tr,
step_ordered_dynamic_failure_star step_ordered_dynamic_failure_init (failed, net) tr ->
forall n, ~ In n (odnwNodes net) ->
~ In n failed. | Proof using.
move => net failed tr H.
remember step_ordered_dynamic_failure_init as y in *.
have ->: failed = fst (failed, net) by [].
have H_eq_o: net = snd (failed, net) by [].
rewrite {1}H_eq_o {H_eq_o}.
move: Heqy.
induction H using refl_trans_1n_trace_n1_ind => H_init /=; first by rewrite H_init.
repeat find_rewri... | Lemma | ordered_dynamic_state_not_initialized_not_failed | Core | theories/Core/DynamicNetLemmas.v | [
"Verdi",
"StructTact",
"Update",
"Coq",
"FunctionalExtensionality",
"Sumbool",
"Relation_Definitions",
"RelationClasses",
"Ssrexport"
] | [
"refl_trans_1n_trace_n1_ind",
"step_ordered_dynamic_failure",
"step_ordered_dynamic_failure_init",
"step_ordered_dynamic_failure_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ordered_dynamic_no_outgoing_uninitialized :
forall onet failed tr,
step_ordered_dynamic_failure_star step_ordered_dynamic_failure_init (failed, onet) tr ->
forall n, ~ In n (odnwNodes onet) ->
forall n', onet.(odnwPackets) n n' = []. | Proof using.
move => net failed tr H.
remember step_ordered_dynamic_failure_init as y in *.
have ->: net = snd (failed, net) by [].
move: Heqy.
induction H using refl_trans_1n_trace_n1_ind => H_init /=; first by rewrite H_init.
concludes => {H_init}.
match goal with
| [ H : step_ordered_dynamic_failure _ _ _ |- _ ] => ... | Lemma | ordered_dynamic_no_outgoing_uninitialized | Core | theories/Core/DynamicNetLemmas.v | [
"Verdi",
"StructTact",
"Update",
"Coq",
"FunctionalExtensionality",
"Sumbool",
"Relation_Definitions",
"RelationClasses",
"Ssrexport"
] | [
"refl_trans_1n_trace_n1_ind",
"step_ordered_dynamic_failure",
"step_ordered_dynamic_failure_init",
"step_ordered_dynamic_failure_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ordered_dynamic_nodes_no_dup :
forall onet failed tr,
step_ordered_dynamic_failure_star step_ordered_dynamic_failure_init (failed, onet) tr ->
NoDup (odnwNodes onet). | Proof using.
move => net failed tr H.
remember step_ordered_dynamic_failure_init as y in *.
have ->: net = snd (failed, net) by [].
move: Heqy.
induction H using refl_trans_1n_trace_n1_ind => H_init.
rewrite H_init /=.
exact: NoDup_nil.
concludes => {H_init}.
match goal with
| [ H : step_ordered_dynamic_failure _ _... | Lemma | ordered_dynamic_nodes_no_dup | Core | theories/Core/DynamicNetLemmas.v | [
"Verdi",
"StructTact",
"Update",
"Coq",
"FunctionalExtensionality",
"Sumbool",
"Relation_Definitions",
"RelationClasses",
"Ssrexport"
] | [
"refl_trans_1n_trace_n1_ind",
"step_ordered_dynamic_failure",
"step_ordered_dynamic_failure_init",
"step_ordered_dynamic_failure_star"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
GhostMultiParams `(P : MultiParams) | :=
{
ghost_data : Type;
ghost_init : ghost_data ;
ghost_net_handlers :
name -> name -> msg -> (ghost_data * data) -> ghost_data;
ghost_input_handlers :
name -> input -> (ghost_data * data) -> ghost_data
}. | Class | GhostMultiParams | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParams",
"data",
"input",
"msg",
"name"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_net_handlers me src m st | :=
let '(out, st', ps) :=
net_handlers me src m (snd st) in
(out, (ghost_net_handlers me src m st, st'), ps). | Definition | refined_net_handlers | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"src"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_input_handlers me inp st | :=
let '(out, st', ps) := input_handlers me inp (snd st) in
(out, (ghost_input_handlers me inp st, st'), ps). | Definition | refined_input_handlers | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_init_handlers (n : name) : ghost_data * data | :=
(ghost_init, init_handlers n). | Definition | refined_init_handlers | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"data",
"name"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_reboot (st : ghost_data * data) | :=
(fst st , reboot (snd st)). | Definition | refined_reboot | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"data"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_base_params : BaseParams | :=
{
data := (ghost_data * data)%type ;
input := input ;
output := output
}. | Instance | refined_base_params | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"BaseParams",
"data",
"input",
"output"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_multi_params : MultiParams _ | :=
{
name := name ;
msg := msg ;
msg_eq_dec := msg_eq_dec ;
name_eq_dec := name_eq_dec ;
nodes := nodes ;
all_names_nodes := all_names_nodes ;
no_dup_nodes := no_dup_nodes ;
init_handlers := refined_init_handlers;
net_handlers := refined_net_handlers ;
input_handlers := refined... | Instance | refined_multi_params | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParams",
"all_names_nodes",
"msg",
"msg_eq_dec",
"name",
"name_eq_dec",
"no_dup_nodes",
"nodes",
"refined_init_handlers",
"refined_input_handlers",
"refined_net_handlers"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_failure_params : FailureParams _ | :=
{
reboot := refined_reboot
}. | Instance | refined_failure_params | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"FailureParams",
"refined_reboot"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
deghost_packet p | :=
@mkPacket _ multi_params
(@pSrc _ refined_multi_params p)
(pDst p)
(pBody p). | Definition | deghost_packet | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"multi_params",
"refined_multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
deghost (net : @network _ refined_multi_params) : (@network _ multi_params). | refine (@mkNetwork _ multi_params
(map deghost_packet
(nwPackets net))
_
).
intros.
destruct net as [? nwState].
concludes.
destruct nwState. auto.
Defined. | Definition | deghost | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"deghost_packet",
"multi_params",
"network",
"refined_multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
deghost_prop I (failed_net : list name * network) : Prop | :=
I ((fst failed_net), deghost (snd failed_net)). | Definition | deghost_prop | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"deghost",
"name",
"network"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_base_params_tot_map :
BaseParamsTotalMap refined_base_params base_params | :=
{
tot_map_data := snd ;
tot_map_input := id ;
tot_map_output := id
}. | Instance | refined_base_params_tot_map | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"BaseParamsTotalMap",
"base_params",
"refined_base_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_multi_params_name_tot_map :
MultiParamsNameTotalMap refined_multi_params multi_params | :=
{
tot_map_name := id ;
tot_map_name_inv := id
}. | Instance | refined_multi_params_name_tot_map | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParamsNameTotalMap",
"multi_params",
"refined_multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_multi_params_name_tot_map_bijective :
MultiParamsNameTotalMapBijective refined_multi_params_name_tot_map | :=
{
tot_map_name_inv_inverse := fun _ => eq_refl ;
tot_map_name_inverse_inv := fun _ => eq_refl
}. | Instance | refined_multi_params_name_tot_map_bijective | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParamsNameTotalMapBijective",
"eq_refl",
"refined_multi_params_name_tot_map"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_multi_params_tot_msg_map :
MultiParamsMsgTotalMap refined_multi_params multi_params | :=
{
tot_map_msg := id
}. | Instance | refined_multi_params_tot_msg_map | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParamsMsgTotalMap",
"multi_params",
"refined_multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_multi_params_map_congruency :
MultiParamsTotalMapCongruency refined_base_params_tot_map
refined_multi_params_name_tot_map refined_multi_params_tot_msg_map :=
{
tot_init_handlers_eq := fun _ => eq_refl ;
tot_net_handlers_eq := _ ;
tot_input_handlers_eq := _
}. | Next Obligation.
rewrite /tot_mapped_net_handlers /= /refined_net_handlers /= /tot_map_name_msgs /= /id /=.
repeat break_let.
find_inversion.
by rewrite /= -/id map_id map_fst_snd_id.
Qed. | Instance | refined_multi_params_map_congruency | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParamsTotalMapCongruency",
"eq_refl",
"map_id",
"refined_base_params_tot_map",
"refined_multi_params_name_tot_map",
"refined_multi_params_tot_msg_map",
"refined_net_handlers",
"tot_map_name_msgs",
"tot_mapped_net_handlers"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
refined_failure_params_map_congruency :
FailureParamsTotalMapCongruency refined_failure_params
failure_params refined_base_params_tot_map | :=
{
tot_reboot_eq := fun _ => eq_refl
}. | Instance | refined_failure_params_map_congruency | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"FailureParamsTotalMapCongruency",
"eq_refl",
"refined_base_params_tot_map",
"refined_failure_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
map_id_tr :
forall out,
map (fun e : name * (input + list output) =>
let (n, s) := e in
match s with
| inl io => (n, inl io)
| inr lo => (n, inr (map id lo))
end) out = out. | Proof using.
elim => //.
move => tr l IH.
rewrite /= IH.
break_let.
break_match => //=.
by rewrite map_id.
Qed. | Lemma | map_id_tr | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"input",
"map_id",
"name",
"output"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ghost_simulation_1 :
forall net net' failed failed' out,
@step_failure _ _ refined_failure_params (failed, net) (failed', net') out ->
@step_failure _ _ failure_params (failed, deghost net) (failed', deghost net') out. | Proof using.
move => net net' failed failed' out H_step.
apply step_failure_tot_mapped_simulation_1 in H_step.
rewrite /tot_map_name /tot_map_net /= 2!map_id /id /= in H_step.
rewrite /tot_map_trace_occ /= /id /= in H_step.
rewrite /tot_map_packet /= /id /= in H_step.
rewrite /deghost /=.
rewrite -/id map_id_tr in H_st... | Theorem | ghost_simulation_1 | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"deghost",
"dst",
"map_id",
"map_id_tr",
"packet",
"refined_failure_params",
"src",
"step_failure",
"step_failure_tot_mapped_simulation_1",
"tot_map_net",
"tot_map_packet",
"tot_map_trace_occ"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ghost_simulation_2 :
forall net net' failed failed' out gnet,
@step_failure _ _ failure_params (failed, net) (failed', net') out ->
deghost gnet = net ->
exists gnet',
step_failure (failed, gnet) (failed', gnet') out /\
deghost gnet' = net'. | Proof using.
move => net net' failed failed' out gnet H_step H_eq.
eapply step_failure_tot_mapped_simulation_2 in H_step => //.
- move: H_step => [gnet' [H_step H_eq_net]].
exists gnet'.
split; eauto.
rewrite -H_eq_net {H_eq_net H_step}.
rewrite /deghost /tot_map_net /= /id /= /tot_map_packet /= /id /=.
set n... | Theorem | ghost_simulation_2 | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"deghost",
"map_id",
"packet",
"step_failure",
"step_failure_tot_mapped_simulation_2",
"tot_map_net",
"tot_map_packet"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ghost_packet p | :=
@mkPacket _ refined_multi_params
(@pSrc _ multi_params p)
(pDst p)
(pBody p). | Definition | ghost_packet | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"multi_params",
"refined_multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
reghost (net : @network _ multi_params) : @network _ refined_multi_params. | refine (@mkNetwork _ refined_multi_params
(map ghost_packet
(nwPackets net))
_
).
intros.
destruct net as [? nwState].
concludes.
exact (ghost_init, nwState).
Defined. | Definition | reghost | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"ghost_packet",
"multi_params",
"network",
"refined_multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
reghost_deghost_partial_inverses :
forall net,
deghost (reghost net) = net. | Proof using.
destruct net. unfold deghost, reghost. simpl in *. f_equal.
rewrite map_map. map_id.
Qed. | Lemma | reghost_deghost_partial_inverses | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"deghost",
"map_id",
"reghost"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ghost_invariant_lift :
forall P : _ -> Prop,
(forall net net' failed failed' out,
@step_failure _ _ failure_params (failed, net) (failed', net') out ->
P net ->
P net') ->
(forall net net' failed failed' out,
step_failure (failed, net) (failed', net') out ->
P (deghost net) ... | Proof using.
intros. eauto using ghost_simulation_1.
Qed. | Theorem | ghost_invariant_lift | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"deghost",
"ghost_simulation_1",
"step_failure"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ghost_invariant_lower :
forall P : _ -> Prop,
(forall net net' failed failed' out,
step_failure (failed, net) (failed', net') out ->
P (deghost net) ->
P (deghost net')) ->
(forall net net' failed failed' out,
@step_failure _ _ failure_params (failed, net) (failed', net') out ->
... | Proof using.
intros.
apply ghost_simulation_2 with (gnet := reghost net) in H0.
- break_exists. intuition. subst.
eapply H; eauto.
rewrite reghost_deghost_partial_inverses.
auto.
- eauto using reghost_deghost_partial_inverses.
Qed. | Theorem | ghost_invariant_lower | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"deghost",
"ghost_simulation_2",
"reghost",
"reghost_deghost_partial_inverses",
"step_failure"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
MsgGhostMultiParams `(P : MultiParams) | :=
{
ghost_msg : Type;
ghost_msg_eq_dec : forall x y : ghost_msg, {x = y} + {x <> y} ;
ghost_msg_default : ghost_msg ;
write_ghost_msg :
name -> data -> ghost_msg
}. | Class | MsgGhostMultiParams | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParams",
"data",
"name"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
add_ghost_msg (me : name) (st : data) (ps : list (name * msg)) :
list (name * (ghost_msg * msg)) | :=
map (fun m => (fst m, (write_ghost_msg me st, snd m))) ps. | Definition | add_ghost_msg | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"data",
"msg",
"name"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_net_handlers me src (m : ghost_msg * msg) st | :=
let '(out, st', ps) := net_handlers me src (snd m) st in
(out, st', add_ghost_msg me st' ps). | Definition | mgv_refined_net_handlers | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"add_ghost_msg",
"msg",
"src"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_input_handlers me inp st | :=
let '(out, st', ps) := input_handlers me inp st in
(out, st', add_ghost_msg me st' ps). | Definition | mgv_refined_input_handlers | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"add_ghost_msg"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_msg_eq_dec :
forall x y : ghost_msg * msg, {x = y} + {x <> y}. | Proof using.
intros.
decide equality; auto using msg_eq_dec, ghost_msg_eq_dec.
Qed. | Definition | mgv_msg_eq_dec | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"msg",
"msg_eq_dec"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_base_params : BaseParams | :=
{
data := data ;
input := input ;
output := output
}. | Instance | mgv_refined_base_params | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"BaseParams",
"data",
"input",
"output"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_multi_params : MultiParams _ | :=
{
name := name ;
msg := (ghost_msg * msg) ;
msg_eq_dec := mgv_msg_eq_dec ;
name_eq_dec := name_eq_dec ;
nodes := nodes ;
all_names_nodes := all_names_nodes ;
no_dup_nodes := no_dup_nodes ;
init_handlers := init_handlers;
net_handlers := mgv_refined_net_handlers ;
input_handl... | Instance | mgv_refined_multi_params | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParams",
"all_names_nodes",
"mgv_msg_eq_dec",
"mgv_refined_input_handlers",
"mgv_refined_net_handlers",
"msg",
"msg_eq_dec",
"name",
"name_eq_dec",
"no_dup_nodes",
"nodes"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_failure_params : FailureParams _ | :=
{
reboot := (@reboot base_params multi_params failure_params)
}. | Instance | mgv_refined_failure_params | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"FailureParams",
"base_params",
"multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_deghost_packet p | :=
@mkPacket _ multi_params
(@pSrc _ mgv_refined_multi_params p)
(pDst p)
(snd (pBody p)). | Definition | mgv_deghost_packet | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"mgv_refined_multi_params",
"multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_deghost (net : @network _ mgv_refined_multi_params) : (@network _ multi_params). | refine (@mkNetwork _ multi_params
(map mgv_deghost_packet
(nwPackets net))
_
).
intros.
destruct net.
concludes.
auto.
Defined. | Definition | mgv_deghost | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"mgv_deghost_packet",
"mgv_refined_multi_params",
"multi_params",
"network"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_base_params_tot_map :
BaseParamsTotalMap mgv_refined_base_params base_params | :=
{
tot_map_data := id ;
tot_map_input := id ;
tot_map_output := id
}. | Instance | mgv_refined_base_params_tot_map | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"BaseParamsTotalMap",
"base_params",
"mgv_refined_base_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_multi_params_name_tot_map :
MultiParamsNameTotalMap mgv_refined_multi_params multi_params | :=
{
tot_map_name := id ;
tot_map_name_inv := id ;
}. | Instance | mgv_refined_multi_params_name_tot_map | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParamsNameTotalMap",
"mgv_refined_multi_params",
"multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_multi_params_name_tot_map_bijective :
MultiParamsNameTotalMapBijective mgv_refined_multi_params_name_tot_map | :=
{
tot_map_name_inv_inverse := fun _ => eq_refl ;
tot_map_name_inverse_inv := fun _ => eq_refl
}. | Instance | mgv_refined_multi_params_name_tot_map_bijective | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParamsNameTotalMapBijective",
"eq_refl",
"mgv_refined_multi_params_name_tot_map"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_multi_params_tot_map :
MultiParamsMsgTotalMap mgv_refined_multi_params multi_params | :=
{
tot_map_msg := snd ;
}. | Instance | mgv_refined_multi_params_tot_map | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParamsMsgTotalMap",
"mgv_refined_multi_params",
"multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_multi_params_map_congruency :
MultiParamsTotalMapCongruency mgv_refined_base_params_tot_map
mgv_refined_multi_params_name_tot_map mgv_refined_multi_params_tot_map :=
{
tot_init_handlers_eq := fun _ => eq_refl ;
tot_net_handlers_eq := _ ;
tot_input_handlers_eq := _
}. | Next Obligation.
rewrite /tot_mapped_net_handlers /= /mgv_refined_net_handlers /= /tot_map_name_msgs /= /id /=.
repeat break_let.
find_inversion.
rewrite -/id map_id /= /add_ghost_msg /=.
elim l0 => //=.
case => n m' l IH.
find_inversion.
by find_rewrite; find_rewrite.
Qed. | Instance | mgv_refined_multi_params_map_congruency | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"MultiParamsTotalMapCongruency",
"add_ghost_msg",
"eq_refl",
"map_id",
"mgv_refined_base_params_tot_map",
"mgv_refined_multi_params_name_tot_map",
"mgv_refined_multi_params_tot_map",
"mgv_refined_net_handlers",
"tot_map_name_msgs",
"tot_mapped_net_handlers"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_refined_failure_params_map_congruency :
FailureParamsTotalMapCongruency mgv_refined_failure_params
failure_params mgv_refined_base_params_tot_map | :=
{
tot_reboot_eq := fun _ => eq_refl
}. | Instance | mgv_refined_failure_params_map_congruency | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"FailureParamsTotalMapCongruency",
"eq_refl",
"mgv_refined_base_params_tot_map",
"mgv_refined_failure_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_map_id_tr :
forall out,
map (fun e : name * (input + list output) =>
let (n, s) := e in
match s with
| inl io => (n, inl io)
| inr lo => (n, inr (map id lo))
end) out = out. | Proof using.
elim => //.
move => tr l IH.
rewrite /= IH.
break_let.
break_match => //.
by rewrite map_id.
Qed. | Lemma | mgv_map_id_tr | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"input",
"map_id",
"name",
"output"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_ghost_simulation_1 :
forall net net' failed failed' out,
@step_failure _ _ mgv_refined_failure_params (failed, net) (failed', net') out ->
@step_failure _ _ failure_params (failed, mgv_deghost net) (failed', mgv_deghost net') out. | Proof using.
move => net net' failed failed' out H_step.
apply step_failure_tot_mapped_simulation_1 in H_step.
rewrite /tot_map_name /tot_map_net /= 2!map_id /id /= in H_step.
rewrite /tot_map_trace_occ /= /id /= in H_step.
rewrite /tot_map_packet /= /id /= in H_step.
rewrite /mgv_deghost /=.
rewrite -/id mgv_map_id_tr... | Theorem | mgv_ghost_simulation_1 | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"dst",
"map_id",
"mgv_deghost",
"mgv_map_id_tr",
"mgv_refined_failure_params",
"packet",
"src",
"step_failure",
"step_failure_tot_mapped_simulation_1",
"tot_map_net",
"tot_map_packet",
"tot_map_trace_occ"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_ghost_packet p | :=
@mkPacket _ mgv_refined_multi_params
(@pSrc _ multi_params p)
(pDst p)
(ghost_msg_default, pBody p). | Definition | mgv_ghost_packet | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"mgv_refined_multi_params",
"multi_params"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_reghost (net : @network _ multi_params) : @network _ mgv_refined_multi_params. | refine (@mkNetwork _ mgv_refined_multi_params
(map mgv_ghost_packet
(nwPackets net))
_
).
intros.
destruct net.
concludes.
auto.
Defined. | Definition | mgv_reghost | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"mgv_ghost_packet",
"mgv_refined_multi_params",
"multi_params",
"network"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_reghost_deghost_partial_inverses :
forall net,
mgv_deghost (mgv_reghost net) = net. | Proof using.
destruct net. unfold mgv_deghost, mgv_reghost. simpl in *. f_equal.
rewrite map_map. map_id.
Qed. | Lemma | mgv_reghost_deghost_partial_inverses | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"map_id",
"mgv_deghost",
"mgv_reghost"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_ghost_simulation_2 :
forall net net' failed failed' out gnet,
@step_failure _ _ failure_params (failed, net) (failed', net') out ->
mgv_deghost gnet = net ->
exists gnet',
step_failure (failed, gnet) (failed', gnet') out /\
mgv_deghost gnet' = net'. | Proof using.
move => net net' failed failed' out gnet H_step H_eq.
eapply step_failure_tot_mapped_simulation_2 in H_step => //.
- move: H_step => [gnet' [H_step H_eq_net]].
exists gnet'.
split; eauto.
rewrite -H_eq_net {H_step H_eq_net}.
rewrite /mgv_deghost /tot_map_net /= /id /= /tot_map_packet /= /id /=.
s... | Theorem | mgv_ghost_simulation_2 | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"map_id",
"mgv_deghost",
"packet",
"step_failure",
"step_failure_tot_mapped_simulation_2",
"tot_map_net",
"tot_map_packet"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_ghost_invariant_lift :
forall P : _ -> Prop,
(forall net net' failed failed' out,
@step_failure _ _ failure_params (failed, net) (failed', net') out ->
P net ->
P net') ->
(forall net net' failed failed' out,
step_failure (failed, net) (failed', net') out ->
P (mgv_degho... | Proof using.
intros. eauto using mgv_ghost_simulation_1.
Qed. | Theorem | mgv_ghost_invariant_lift | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"mgv_deghost",
"mgv_ghost_simulation_1",
"step_failure"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
mgv_ghost_invariant_lower :
forall P : _ -> Prop,
(forall net net' failed failed' out,
step_failure (failed, net) (failed', net') out ->
P (mgv_deghost net) ->
P (mgv_deghost net')) ->
(forall net net' failed failed' out,
@step_failure _ _ failure_params (failed, net) (failed', net... | Proof using.
intros.
apply mgv_ghost_simulation_2 with (gnet := mgv_reghost net) in H0.
- break_exists. intuition. subst.
eapply H; eauto.
rewrite mgv_reghost_deghost_partial_inverses.
auto.
- eauto using mgv_reghost_deghost_partial_inverses.
Qed. | Theorem | mgv_ghost_invariant_lower | Core | theories/Core/GhostSimulations.v | [
"Coq",
"List",
"StructTact",
"StructTactics",
"Util",
"Verdi",
"Net",
"TotalMapSimulations",
"FunctionalExtensionality",
"Ssrexport"
] | [
"mgv_deghost",
"mgv_ghost_simulation_2",
"mgv_reghost",
"mgv_reghost_deghost_partial_inverses",
"step_failure"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
GenHandler (W S O A : Type) : Type | := S -> A * list O * S * list W % type. | Definition | GenHandler | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
ret {W S O A : Type} (a : A) : GenHandler W S O A | := fun s => (a, [], s, []). | Definition | ret | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
bind {W S O A B : Type} (m : GenHandler W S O A) (f : A -> GenHandler W S O B) : GenHandler W S O B | :=
fun s =>
let '(a, os1, s', ws1) := m s in
let '(b, os2, s'', ws2) := f a s' in
(b, os1 ++ os2, s'', ws1 ++ ws2). | Definition | bind | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
send {W S O} (w : W) : GenHandler W S O unit | := fun s => (tt, [], s, [w]). | Definition | send | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
write_output {W S O} (o : O) : GenHandler W S O unit | := fun s => (tt, [o], s, []). | Definition | write_output | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
modify {W S O} (f : S -> S) : GenHandler W S O unit | := fun s => (tt, [], f s, []). | Definition | modify | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
put {W S O} (s : S) : GenHandler W S O unit | := fun _ => (tt, [], s, []). | Definition | put | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
get {W S O} : GenHandler W S O S | := fun s => (s, [], s, []). | Definition | get | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
runGenHandler {W S O A} (s : S) (h : GenHandler W S O A) :
A * list O * S * list W % type | :=
h s. | Definition | runGenHandler | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
runGenHandler_ignore {W S O A} (s : S) (h : GenHandler W S O A) :
list O * S * list W % type | :=
let '(_, os, s', ms) := h s in (os, s', ms). | Definition | runGenHandler_ignore | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
runGenHandler1_ignore {W S O A} (h : GenHandler W S O A) (s : S) : list O * S | :=
let '(_, os, d, _) := runGenHandler s h in
(os, d). | Definition | runGenHandler1_ignore | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler",
"runGenHandler"
] | for single node semantics | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b |
nop {W S O : Type} | := @ret W S O _ tt. | Definition | nop | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"ret"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
"a >> b" | := (bind a (fun _ => b)) (at level 50). | Notation | a >> b | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"bind"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
"x <- c1 ;; c2" | := (@bind _ _ _ _ _ c1 (fun x => c2))
(at level 100, c1 at next level, right associativity). | Notation | x <- c1 ;; c2 | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"bind"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
"e1 ;; e2" | := (_ <- e1 ;; e2)
(at level 100, right associativity). | Notation | e1 ;; e2 | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
when {W S O A} (b : bool) (m : GenHandler W S O A) : GenHandler W S O unit | :=
if b then m ;; ret tt else nop. | Definition | when | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"GenHandler",
"nop",
"ret"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
monad_unfold | :=
repeat unfold
runGenHandler_ignore,
runGenHandler,
runGenHandler1_ignore,
bind,
send,
write_output,
get,
when,
put,
nop,
modify,
ret in *. | Ltac | monad_unfold | Core | theories/Core/HandlerMonad.v | [
"Coq",
"List",
"ListNotations"
] | [
"bind",
"get",
"modify",
"nop",
"put",
"ret",
"runGenHandler",
"runGenHandler1_ignore",
"runGenHandler_ignore",
"send",
"when",
"write_output"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
InverseTraceRelation `{State : Type} `{Event : Type} (step : step_relation State Event) | :=
{
init : State;
T : (list Event) -> Prop;
R : State -> Prop;
R_dec : forall s, {R s} + {~ R s};
T_monotonic : forall tr o, T tr -> T (tr ++ o);
R_false_init : ~ R init;
R_implies_T : forall s s' o tr,
refl_trans_1n_trace step init s tr ->
~ R s ->... | Class | InverseTraceRelation | Core | theories/Core/InverseTraceRelations.v | [
"Coq",
"List",
"Verdi",
"Net",
"StructTact",
"StructTactics"
] | [
"refl_trans_1n_trace",
"step_relation"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
inverse_trace_relations_work :
forall s tr,
refl_trans_1n_trace step init s tr ->
R s ->
T tr. | Proof using.
intros. find_apply_lem_hyp refl_trans_1n_n1_trace.
remember init as s'.
induction H.
- subst. exfalso. pose R_false_init; auto.
- subst. concludes.
destruct (R_dec x');
intuition eauto using T_monotonic, refl_trans_n1_1n_trace, R_implies_T.
Qed. | Theorem | inverse_trace_relations_work | Core | theories/Core/InverseTraceRelations.v | [
"Coq",
"List",
"Verdi",
"Net",
"StructTact",
"StructTactics"
] | [
"refl_trans_1n_n1_trace",
"refl_trans_1n_trace",
"refl_trans_n1_1n_trace"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
LabeledMultiParams (P : BaseParams) | :=
{
lb_name : Type ;
lb_msg : Type ;
lb_msg_eq_dec : forall x y : lb_msg, {x = y} + {x <> y} ;
lb_name_eq_dec : forall x y : lb_name, {x = y} + {x <> y} ;
lb_nodes : list lb_name ;
lb_all_names_nodes : forall n, In n lb_nodes ;
lb_no_dup_nodes : NoDup lb_nodes ;
label : Type ;
lab... | Class | LabeledMultiParams | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [
"BaseParams",
"data",
"input",
"output"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
unlabeled_net_handlers me src m st | :=
let '(lb, out, st', ps) := lb_net_handlers me src m st in (out, st', ps). | Definition | unlabeled_net_handlers | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [
"src"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
unlabeled_input_handlers me inp st | :=
let '(lb, out, st', ps) := lb_input_handlers me inp st in (out, st', ps). | Definition | unlabeled_input_handlers | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
unlabeled_multi_params : MultiParams base_params | :=
{
name := lb_name ;
msg := lb_msg ;
msg_eq_dec := lb_msg_eq_dec ;
name_eq_dec := lb_name_eq_dec ;
nodes := lb_nodes ;
all_names_nodes := lb_all_names_nodes ;
no_dup_nodes := lb_no_dup_nodes ;
init_handlers := lb_init_handlers;
net_handlers := unlabeled_net_handlers ;
input_h... | Instance | unlabeled_multi_params | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [
"MultiParams",
"all_names_nodes",
"base_params",
"msg",
"msg_eq_dec",
"name",
"name_eq_dec",
"no_dup_nodes",
"nodes",
"unlabeled_input_handlers",
"unlabeled_net_handlers"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
lb_step_relation | := A -> L -> A -> list trace -> Prop. | Definition | lb_step_relation | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
lb_step_ex (step : lb_step_relation) (l : L) (a : A) : Prop | :=
exists a' tr, step a l a' tr. | Definition | lb_step_ex | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [
"lb_step_relation"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
event | := { evt_a : A ; evt_l : L ; evt_trace : list trace }. | Record | event | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
enabled (step : lb_step_relation) (l : L) (e : event) : Prop | :=
lb_step_ex step l (evt_a e). | Definition | enabled | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [
"event",
"lb_step_ex",
"lb_step_relation"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b | |
occurred (l : L) (e : event) : Prop | := l = evt_l e. | Definition | occurred | Core | theories/Core/LabeledNet.v | [
"Verdi",
"InfSeqExt",
"infseq",
"exteq",
"Ssrexport"
] | [
"event"
] | https://github.com/uwplse/verdi | 7e1641b758d8f0032aa7de63620bc115330e0a6b |
Structured dataset from Verdi — Distributed systems verification.
7e1641b758d8f0032aa7de63620bc115330e0a6b| Column | Type | Description |
|---|---|---|
| statement | string | Declaration signature/claim with the leading keyword removed (verbatim slice); the full declaration minus its proof |
| proof | string | Verbatim proof/body, empty if the declaration has none |
| type | string | Declaration keyword |
| symbolic_name | string | Declaration identifier |
| library | string | Sub-library |
| filename | string | Repository-relative source path |
| imports | list[string] | File-level Require/Import modules |
| deps | list[string] | Intra-corpus identifiers referenced |
| docstring | string | Preceding documentation comment, empty if absent |
| source_url | string | Upstream repository |
| commit | string | Upstream commit extracted |
| Type | Count |
|---|---|
| Lemma | 428 |
| Definition | 292 |
| Theorem | 68 |
| Instance | 64 |
| Class | 40 |
| Inductive | 37 |
| Parameter | 35 |
| Corollary | 14 |
| Ltac | 13 |
| Record | 12 |
| Hypothesis | 11 |
| Fixpoint | 10 |
| Notation | 6 |
| Example | 4 |
| CoInductive | 1 |
dup_drop_step : list A -> list A -> Prop
:=
| DDS_dup : forall l p,
In p l ->
dup_drop_step l (p :: l)
| DDS_drop : forall xs p ys,
dup_drop_step (xs ++ p :: ys) (xs ++ ys).
dup_drop_step | theories/Core/DupDropReordering.vEach declaration is split into a statement (signature/claim) and a proof (body) that are disjoint
and together form the complete declaration, for proof modeling, autoformalization, retrieval, and
dependency analysis via deps.
@misc{coq_verdi_dataset,
title = {Coq-Verdi},
author = {Norton, Charles},
year = {2026},
note = {Extracted from https://github.com/uwplse/verdi, commit 7e1641b758d8},
url = {https://huggingface.co/datasets/phanerozoic/Coq-Verdi}
}