Skip to content

Commit

Permalink
Add distinctiveness lemmas for nub' and procsOf
Browse files Browse the repository at this point in the history
  • Loading branch information
agomezl committed May 3, 2018
1 parent 728d544 commit 027581e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions semantics/semBakeryScript.sml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ val nub'_def = tDefine "nub'" `
\\ Q.EXISTS_TAC `LENGTH xs`
\\ rw [LENGTH_FILTER_LEQ]);

val all_distinct_nub' = Q.store_thm("all_distinct_nub'",
`∀l. ALL_DISTINCT (nub' l)`,
rw [ALL_DISTINCT,nub'_def]
\\ Induct_on `l`
\\ rw [ALL_DISTINCT,nub'_def,FILTER_ALL_DISTINCT,MEM_FILTER]
);


(* The set of all processes in a choreography *)
val procsOf_def = Define`
Expand All @@ -67,6 +74,12 @@ val procsOf_def = Define`
∧ procsOf (Let _ p _ _ c) = nub' ([p] ++ procsOf c)
`;

val procsOf_all_distinct = Q.store_thm("procsOf_all_distinct",
`∀c. ALL_DISTINCT (procsOf c)`,
Induct_on `c` >> rw [procsOf_def,ALL_DISTINCT,all_distinct_nub']
);


val (lcong_rules,lcong_ind,lcong_cases) = Hol_reln `
(* Congruence rules for lists of asyncronous operations *)

Expand Down

0 comments on commit 027581e

Please sign in to comment.