Sindbad~EG File Manager

Current Path : /usr/home/beeson/MathXpert/
Upload File :
Current File : /usr/home/beeson/MathXpert/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;

int check1(term);  /* public functions by which the theorem-prover is called */
int check_literally(term);
int infer(term);
int refute(term);
void eliminate_vars(int savenvariables, short savenextassumption);
int negate_eq(term,term *);
int fetchvalues(term, term, double, double, term *, int, double *, int, int *);
   // defined in sing.c, exported because called in defint.c to break up integral(abs f,x,a,b)
   
int check_defined(term);
void kill_defns(void);  /* used by cleanup() in top.c */
void kill_assumptions(void);
void kill_functions(void);
term join(term u, term v);
int interval_as_and(term u);


/*__________________________________________________________*/
/* 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);
term lambda1(term,term);
term ap1(term,term);
term infinitesimal(term,term);
term denom(term);
term num(term);
term lpt(term);  /* reduce proposition to simpler logically equivalent form  */
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 == ABSFUNCTOR || 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))


int limval(term t, term *ans);
int leading_term(term t, term x, term a, term *c,  term *deg);
int leading_term1(term t, term x, term a, term *c,  term *deg);
int lt_plus(term *,int, term, term, term *, term *);
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))

int unify1(term p, term u, term *a, int *flag);  /* match.c */
int match(term t, term lhs, term rhs, term *a, term *ans);
int zeroes(term, term *);  /* singular.c */
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 */

int stdpartonly(term,term *);      /* stdpart.c */
void record_theorem(term);         /* prover.c  */
term domain(term);                 /* domain.c  */
void deletep(term);           /* called in checkproblem */
int remove_dups(term,term *);  /* A && A == A,  A || A == A */
int conjoin(term, term, term *);  /* simplify and(ineq2,ineq2) */
term getnewintvar1(term, char *);  /* funcinfo.c */
term getnewindexvar(term, char *);  /* funcinfo.c */
term getindexvar(term t, char *data); /* funcinfo.c */
int contains_existentials(term);   /* lpt.c      */
int implies_instantly(term, term);
void setprimes(term,term *);       /* prover.c   */
int contains_bound(term t, unsigned short f); /* prover.c */
int simplify_assumptions(term);
void push_assumption(term,int);    /* prover.c   */
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 */
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