We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
case_elim
1 parent 44f3ac1 commit 9d1a9e8Copy full SHA for 9d1a9e8
language/pure_valueScript.sml
@@ -313,6 +313,17 @@ Proof
313
\\ fs [v_CASE, v_11, v_distinct]
314
QED
315
316
+Theorem v_CASE_elim:
317
+ ∀f. f (v_CASE v atom cons clos div err) ⇔
318
+ (∃b. v = Atom b ∧ f (atom b)) ∨
319
+ (∃s t. v = Constructor s t ∧ f (cons s t)) ∨
320
+ (∃n y. v = Closure n y ∧ f (clos n y)) ∨
321
+ (v = Diverge ∧ f div) ∨
322
+ (v = Error ∧ f err)
323
+Proof
324
+ qspec_then `v` assume_tac v_nchotomy >> gvs[v_CASE, v_distinct, v_11]
325
+QED
326
+
327
(*
328
* Register with TypeBase.
329
*)
@@ -436,6 +447,7 @@ val _ = TypeBase.export
436
447
{ ax = TypeBasePure.ORIG TRUTH,
437
448
induction = TypeBasePure.ORIG v_bisimulation,
438
449
case_def = v_CASE,
450
+ case_elim = v_CASE_elim,
439
451
case_cong = v_CASE_cong,
440
452
case_eq = v_CASE_eq,
441
453
nchotomy = v_nchotomy,
0 commit comments