File: disjuncts.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 (43 lines) | stat: -rw-r--r-- 1,328 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
32
33
34
35
36
37
38
39
40
41
42
43
\DOC disjuncts

\TYPE {disjuncts : term -> term list}

\SYNOPSIS
Iteratively breaks apart a disjunction.

\DESCRIBE
If a term {t} is a disjunction {p \/ q}, then {disjuncts t} will recursively
break down {p} and {q} into disjuncts and append the resulting lists. Otherwise
it will return the singleton list {[t]}. So if {t} is of the form
{t1 \/ ... \/ tn} with any reassociation, no {ti} itself being a disjunction, 
the list returned will be {[t1; ...; tn]}. But
{
   disjuncts(list_mk_disj([t1;...;tn]))
}
\noindent will not return {[t1;...;tn]} if any of {t1},...,{tn} is a
disjunction.

\FAILURE
Never fails, even if the term is not boolean.

\EXAMPLE
{
  # list_mk_disj [`a \/ b`;`c \/ d`;`e \/ f`];;
  val it : term = `(a \/ b) \/ (c \/ d) \/ e \/ f`

  # disjuncts it;;                                       
  val it : term list = [`a`; `b`; `c`; `d`; `e`; `f`]                           

  # disjuncts `1`;;                                                            
  val it : term list = [`1`]                                           
}

\COMMENTS
Because {disjuncts} splits both the left and right sides of a disjunction,
this operation is not the inverse of {list_mk_disj}. You can also use 
{splitlist dest_disj} to split in a right-associated way only.

\SEEALSO
conjuncts, dest_disj, list_mk_disj.

\ENDDOC