File: cases.doc

package info (click to toggle)
hol-light 20170109-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 36,568 kB
  • ctags: 8,549
  • sloc: ml: 540,018; cpp: 439; lisp: 286; java: 279; makefile: 262; sh: 229; yacc: 108; perl: 78; ansic: 57; sed: 39
file content (31 lines) | stat: -rw-r--r-- 812 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
\DOC cases

\TYPE {cases : string -> thm}

\SYNOPSIS
Produce cases theorem for an inductive type.

\DESCRIBE
A call {cases "ty"} where {"ty"} is the name of a recursive type defined with 
{define_type}, returns a ``cases'' theorem asserting that each element of the 
type is an instance of one of the type constructors. The effect is exactly 
the same is if {prove_cases_thm} were applied to the induction theorem produced
by {define_type}, and the documentation for {prove_cases_thm} gives a lengthier
discussion.

\FAILURE
Fails if {ty} is not the name of a recursive type.

\EXAMPLE
{
  # cases "num";;
  val it : thm = |- !m. m = 0 \/ (?n. m = SUC n)

  # cases "list";;
  val it : thm = |- !x. x = [] \/ (?a0 a1. x = CONS a0 a1)
}

\SEEALSO
define_type, distinctness, injectivity, prove_cases_thm.

\ENDDOC