Prototype introiff option for find_theorems.
This feature was suggested by Jeremy Avigad / Tobias Nipkow.
It adds an introiff keyword for find_theorems that returns, in
addition to the usual results for intro, any theorems of the
form ([| ... |] ==> (P = Q)) where either P or Q matches the
conclusions of the current goal. Such theorems can be made
introduction rules with [THEN iffDx].
The current patch is for evaluation only. It assumes an
(op = : 'a -> 'a -> bool) operator, which is specific to HOL.
It is not clear how this should be generalised.
#!/usr/bin/env bash
#
# Author: Markus Wenzel, TU Muenchen
#
# DESCRIPTION: print document
PRG="$(basename "$0")"
function usage()
{
echo
echo "Usage: isabelle $PRG [OPTIONS] FILE"
echo
echo " Options are:"
echo " -c cleanup -- remove FILE after use"
echo
echo " Print document FILE."
echo
exit 1
}
function fail()
{
echo "$1" >&2
exit 2
}
## process command line
# options
CLEAN=""
while getopts "c" OPT
do
case "$OPT" in
c)
CLEAN=true
;;
\?)
usage
;;
esac
done
shift $(($OPTIND - 1))
# args
[ "$#" -ne 1 ] && usage
FILE="$1"; shift
## main
[ -f "$FILE" ] || fail "Bad file: $FILE"
$PRINT_COMMAND "$FILE"
[ -n "$CLEAN" ] && rm -f "$FILE"