Sindbad~EG File Manager

Current Path : /usr/home/beeson/Otter-Lambda/yyy/
Upload File :
Current File : /usr/home/beeson/Otter-Lambda/yyy/prover.h

/* include file for Mathpert's theorem-prover */
/* The prover is in files prover.c, axioms.c, redineq.c,
funcinfo.c, induct.c, binders.c, constr.c */

/*_________________________________________________________________*/
/* following type describes generic ways a function can approach a
(finite or infinite) limit from one side */

typedef enum { unknown,
               min,
               max,
               damped_oscillation,
               dom_error,
               bounded_oscillation,
               unbounded_oscillation,
               complex_approach
             } approach;

MEXPORT_PROVER int check(term);  /* public functions by which the theorem-prover is called */
MEXPORT_PROVER int check_literally(term);
MEXPORT_PROVER int infer(term);
MEXPORT_PROVER int refute(term);
MEXPORT_PROVER void eliminate_vars(int savenvariables, short savenextassumption);
MEXPORT_PROVER int negate_eq(term,term *);

int check_defined(term);
void kill_defns(void);  /* used by cleanup() in top.c */
void kill_assumptions(void);
void kill_functions(void);

/*__________________________________________________________*/
/* The 'kind' of a neighborhood is FULL or PUNCTURED; the 'direction' of
a neighborhood is LEFTDIR, RIGHTDIR, or CENTERED. */

#define LEFTDIR 0
#define LT zero
#define RIGHTDIR 1
#define RT one
#define CENTERED 2
#define centered two
#define FULL 0
#define full zero
#define PUNCTURED 1
#define punctured one


/* corresponding term-makers : */
term continuous(term,term,term,unsigned short);
term differentiable(term u,term x, term a,unsigned dir);
term true_in_nbhd(term prop, term x, term a, unsigned kind, unsigned dir);
term increasing3(term,term,term);
term decreasing3(term,term,term);
term strictly_increasing3(term,term,term);
term strictly_decreasing3(term,term,term);
term constant3(term,term,term);
term increasing5(term,term,term,unsigned,unsigned);
term decreasing5(term,term,term,unsigned,unsigned);
term strictly_increasing5(term,term,term,unsigned,unsigned);
term strictly_decreasing5(term,term,term,unsigned,unsigned);
term constant5(term,term,term,unsigned,unsigned);
term denom1(term);
term numerator1(term);
MEXPORT_PROVER term lambda1(term,term);
MEXPORT_PROVER term ap1(term,term);
term infinitesimal(term,term);
MEXPORT_ALGEBRA term denom(term);
term num(term);
MEXPORT_PROVER term lpt(term);  /* reduce proposition to simpler logically equivalent form  */
MEXPORT_PROVER int immediate(term);  /* prover.c; called also in redineq.c */
/*________________________________________________________________*/
/* Following functions are in funcinfo.c:   */


term open_domain(unsigned short f, term x, int kind, int dir);
term posval(unsigned short f, term x);
term negval(unsigned short f, term x);
term nonposval(unsigned short f, term x);
term nonnegval(unsigned short f, term x);
term zeroval(unsigned short f, term x);
int rootinfo(unsigned short, term, term *);
term nonzeroval(unsigned short f, term x);
term increasing(unsigned short f, term a, int kind, int dir);
term decreasing(unsigned short f, term a, int kind, int dir);
term singular(unsigned short f, term x);
term singular4(unsigned short f, term x, int dir, int sign);
/*______________________________________________________________________*/
/* Following functions are in axioms.c */

term reduce(term);
term inc_ax(term,term,term,unsigned,unsigned);
term dec_ax(term,term,term,unsigned,unsigned);
term sinc(term,term,term,unsigned,unsigned);
term sdec(term,term,term,unsigned,unsigned);
term dna(term,term,term,unsigned,unsigned);
term isnonzero(term,term,term,unsigned,unsigned);
term singularplus(term,term,term,unsigned);
term singularminus(term,term,term,unsigned);
term nonconstant(term,term,term,unsigned,unsigned);
term isconstant(term,term,term,unsigned,unsigned);
int real_analytic(term,term);
term bessel_singularity(unsigned short, term, term, int, int);  /* funcinfo.c */
/*______________________________________________________________________*/
 /* is f everywhere defined? Note that some functions are everywhere
 defined for real arguments but not for all complex arguments. */

#define ENTIRE(f) (f==SIN || f==COS || f == ABS || f==SINH || f == COSH || f == '-' || f == DEG||\
   f == ERF || f==ERFC || \
   (f == SECH && !get_complex())  || \
   (f == ASINH && !get_complex()) || \
   (f==ATAN && !get_complex())    || \
   (f==ACOT && !get_complex())    || \
   (f==TANH && !get_complex()))

/*___________________________________________________________________*/
#define BINDING(p)  ((FUNCTOR(p) == INTEGRAL && ARITY(p)==4) || FUNCTOR(p)==SUM || FUNCTOR(p)==PRODUCT || FUNCTOR(p)==LIMIT || FUNCTOR(p) == EVAL || FUNCTOR(p) == FORALL || FUNCTOR(p) == LAM || FUNCTOR(p) == EXISTS || FUNCTOR(p) == BIGOH)
#define BINDING2(p)  ((FUNCTOR(p) == INTEGRAL && ARITY(p)==4) || FUNCTOR(p)==SUM || FUNCTOR(p)==PRODUCT || FUNCTOR(p)==LIMIT || FUNCTOR(p) == EVAL)
#define BOUNDVAR(p) (FUNCTOR(p) == LIMIT ? ARG(0,ARG(0,p)) : (FUNCTOR(p) == SUM || FUNCTOR(p) == PRODUCT || FUNCTOR(p) == INTEGRAL || FUNCTOR(p) == DIFF || FUNCTOR(p) == EVAL) ? ARG(1,p): ARG(0,p))


MEXPORT_PROVER int limval(term t, term *ans);
MEXPORT_PROVER int leading_term(term t, term x, term a, term *c,  term *deg);
MEXPORT_PROVER int leading_term1(term t, term x, term a, term *c,  term *deg);
MEXPORT_PROVER int lt_plus(term *,int, term, term, term *, term *);
MEXPORT_PROVER int limval_aux(int,term, term *, approach *, approach *);
int nonstandard(term, term *);     /* stdpart.c */
int apparent_leading_term(term t, term x, term a, term *c,  term *deg);

#define ISINFINITE(x)    (equals(x,infinity) || equals(x,minusinfinity))
#define WILD(x)  (equals(x,undefined) || equals(x,bounded_oscillations) || equals(x,unbounded_oscillations))  /* not including infinite */
#define NOTDEFINED(x)  (ISINFINITE(x) || WILD(x))

MEXPORT_PROVER int unify1(term p, term u, term *a, int *flag);  /* match.c */
MEXPORT_PROVER int match(term t, term lhs, term rhs, term *a, term *ans);
MEXPORT_PROVER int zeroes(term, term *);  /* singular.c */
MEXPORT_PROVER int singularities(term,term *,term *);
int critical_points(term, term, term *);
int get_infinitesimal(term *, term *, term *);
int nonstandard(term, term *);  /* reduce an inequality using infinitesimals */


#define INEQUALITY(f)   ((f) == '=' || (f) == '<' || (f)==LE || (f)==GE || (f) == '>' || (f)==NE)
#define SWITCH(f) ((unsigned short) ( (f) == '<' ? '>' : (f) == '>' ? '<' : (f)==LE ? GE : LE))

typedef struct tl { term data;
                    struct tl *next;
                    struct tl *prev;
                  } termlist;   /* used for binders list, see boundvar.c */

MEXPORT_PROVER int stdpartonly(term,term *);      /* stdpart.c */
MEXPORT_PROVER int interval_as_and(term);         /* prover.c  */
MEXPORT_PROVER void record_theorem(term);         /* prover.c  */
MEXPORT_PROVER term domain(term);                 /* domain.c  */
MEXPORT_PROVER void deletep(term);           /* called in checkproblem */
MEXPORT_PROVER int remove_dups(term,term *);  /* A && A == A,  A || A == A */
MEXPORT_PROVER int conjoin(term, term, term *);  /* simplify and(ineq2,ineq2) */
MEXPORT_PROVER term getnewintvar1(term, char *);  /* funcinfo.c */
MEXPORT_PROVER term getnewindexvar(term, char *);  /* funcinfo.c */
MEXPORT_PROVER int contains_existentials(term);   /* lpt.c      */
MEXPORT_PROVER int implies_instantly(term, term);
MEXPORT_PROVER void setprimes(term,term *);       /* prover.c   */
MEXPORT_PROVER int contains_bound(term t, unsigned short f); /* prover.c */
MEXPORT_PROVER int simplify_assumptions(term);
MEXPORT_PROVER void push_assumption(term,int);    /* prover.c   */
MEXPORT_PROVER void pop_assumption(int);          /* prover.c   */

/* Private functions shared by files in the prover module:  */
term tred(term);                 /* simplify terms u:type   */
int reduce_ineq(term, term *);   /* redineq.c               */
int orrule1(term, term, term *); /* prop.c, called in prover.c and lpt.c */
int orrule2(term, term *);       /* prop.c                  */
int andrule1(term t,term *ans);  /* prop.c, called in lpt.c */
term reduce_and(term); /* called by lpt on flattened AND terms */
term reduce_or(term);  /* called by lpt on flattened OR terms */
int disjoin(term,term,term *);  /* simplify or(ineq1,ineq2) */
term defined2(unsigned short, term);   /* domain.c */
term defined3(unsigned short, term, term);


#define PROPOSITIONAL(f)  (f == AND || f == OR || f == '<'\
                 || f == LE || f == GE || f ==  '>' || f == NE\
                 || f == DEFINED || f == EVEN1 || f == ODD1)

void drop_variants(term, term *);
void addbinder(term);
int infer_by_constraints(term, int);
int sturm_reduce(term, term *);
int pdistribute(term, term *);
int domain_implies(term,term);     /* fasttrig.c */
void reset_prover(void);
int isdifofsquares(term t);        /* redineq.c  */
void stopcheck(void);
void startcheck(void);
int merge_existentials(term t, term *ans);
int embedded_type(int, int);

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists