File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ record ('v, 's) prism =
17
17
type_notation
18
18
prism ( infixr "\<Longrightarrow>\<^sub>\<triangle>" 0 )
19
19
20
+ definition prism_matches :: "('a \<Longrightarrow>\<^sub>\<triangle> 'e) \<Rightarrow> 'e \<Rightarrow> bool" ( "matches\<index>" ) where
21
+ "prism_matches a e = (match\<^bsub>a\<^esub> e \<noteq> None)"
22
+
20
23
locale wb_prism =
21
24
fixes x :: "'v \<Longrightarrow>\<^sub>\<triangle> 's" ( structure )
22
25
assumes match_build : "match (build v) = Some v"
@@ -32,10 +35,14 @@ begin
32
35
lemma inj_build : "inj build"
33
36
by ( metis injI match_build option.inject )
34
37
38
+ lemma matches_build : "matches (build v)"
39
+ by ( simp add : prism_matches_def match_build )
40
+
35
41
end
36
42
37
43
declare wb_prism.match_build [ simp ]
38
44
declare wb_prism.build_match [ simp ]
45
+ declare wb_prism.matches_build [ simp ]
39
46
40
47
subsection \<open> Co-dependence \<close>
41
48
You can’t perform that action at this time.
0 commit comments