doc-src/Ref/tctical.tex
changeset 13104 df7aac8543c9
parent 8149 941afb897532
child 30184 37969710e61f
equal deleted inserted replaced
13103:66659a4b16f6 13104:df7aac8543c9
   301 \index{theorems!size of}
   301 \index{theorems!size of}
   302 \index{theorems!equality of}
   302 \index{theorems!equality of}
   303 \begin{ttbox} 
   303 \begin{ttbox} 
   304 has_fewer_prems : int -> thm -> bool
   304 has_fewer_prems : int -> thm -> bool
   305 eq_thm          : thm * thm -> bool
   305 eq_thm          : thm * thm -> bool
       
   306 eq_thm_prop     : thm * thm -> bool
   306 size_of_thm     : thm -> int
   307 size_of_thm     : thm -> int
   307 \end{ttbox}
   308 \end{ttbox}
   308 \begin{ttdescription}
   309 \begin{ttdescription}
   309 \item[\ttindexbold{has_fewer_prems} $n$ $thm$] 
   310 \item[\ttindexbold{has_fewer_prems} $n$ $thm$] 
   310 reports whether $thm$ has fewer than~$n$ premises.  By currying,
   311 reports whether $thm$ has fewer than~$n$ premises.  By currying,
   311 \hbox{\tt has_fewer_prems $n$} is a predicate on theorems; it may 
   312 \hbox{\tt has_fewer_prems $n$} is a predicate on theorems; it may 
   312 be given to the searching tacticals.
   313 be given to the searching tacticals.
   313 
   314 
   314 \item[\ttindexbold{eq_thm} ($thm@1$, $thm@2$)] reports whether $thm@1$ and
   315 \item[\ttindexbold{eq_thm} ($thm@1$, $thm@2$)] reports whether $thm@1$ and
   315   $thm@2$ are equal.  Both theorems must have identical signatures.  Both
   316   $thm@2$ are equal.  Both theorems must have compatible signatures.  Both
   316   theorems must have the same conclusions, and the same hypotheses, in the
   317   theorems must have the same conclusions, the same hypotheses (in the same
   317   same order.  Names of bound variables are ignored.
   318   order), and the same set of sort hypotheses.  Names of bound variables are
       
   319   ignored.
       
   320   
       
   321 \item[\ttindexbold{eq_thm_prop} ($thm@1$, $thm@2$)] reports whether the
       
   322   propositions of $thm@1$ and $thm@2$ are equal.  Names of bound variables are
       
   323   ignored.
   318 
   324 
   319 \item[\ttindexbold{size_of_thm} $thm$] 
   325 \item[\ttindexbold{size_of_thm} $thm$] 
   320 computes the size of $thm$, namely the number of variables, constants and
   326 computes the size of $thm$, namely the number of variables, constants and
   321 abstractions in its conclusion.  It may serve as a distance function for 
   327 abstractions in its conclusion.  It may serve as a distance function for 
   322 \ttindex{BEST_FIRST}. 
   328 \ttindex{BEST_FIRST}.