anchor.diff:             :use ((:instance phi-2n+1-<-0-base-lemma))))
     )
   
  -;; (defthm phi-2n+1-<-0-base-new-lemma
  -;;   (IMPLIES (AND (RATIONALP V0)
  -;;               (RATIONALP PHI0)
  -;;               (RATIONALP DV)
  -;;               (<= 1 (* 10/9 V0))
  -;;               (<= V0 11/10)
  -;;               (<= (- (* 8000 DV)) 1)
  -;;               (<= (* 8000 DV) 1)
  -;;               (<= 0 PHI0)
  -;;               (< PHI0
  -;;                  (+ -1 (/ (+ 2561/3200 V0))
  -;;                     (* DV (/ (+ 2561/3200 V0)))
  -;;                     (* V0 (/ (+ 2561/3200 V0))))))
  -;;          (< (+ (* 1/30 PHI0)
  -;;                (* 1/6 (/ (+ 1599/1600 V0)))
  -;;                (* 5/6 (/ (+ 3199/3200 V0)))
  -;;                (* 1/6 DV (/ (+ 1599/1600 V0)))
  -;;                (* 1/6 V0 (/ (+ 1599/1600 V0)))
  -;;                (* 5/6 DV (/ (+ 3199/3200 V0)))
  -;;                (* 5/6 V0 (/ (+ 3199/3200 V0))))
  -;;             1))
  -;;    :hints (("Goal"
  -;; 	   :clause-processor
  -;;   	   (Smtlink clause
  -;;   				'( (:expand ((:function ())
  -;;   					     (:expansion-level 1)))
  -;;   				  (:python-file "phi-2n+1-smaller-than-0-base-new")
  -;;   				  (:let ())
  -;;   				  (:hypothesize ()))
  -;; 				state)))
  -;;   )
  -
  -(defthm phi-2n+1-<-0-base-new
  -    (implies (basic-params-equal (- i 2) 1 v0 dv g1 phi0)
  -	   (< (phi-2n-1 (- i 1) phi0 v0 dv g1) 0))
  -    ;;:hints (("Goal"
  -    ;;         :use ((:instance phi-2n+1-<-0-base-new-lemma))))
  -    )
  -
  -(defthm phi-2n+1-<-0-base-corollary
  -  (implies (basic-params-equal (1- i) 2 v0 dv g1 phi0)
  -	   (< (phi-2n-1 i phi0 v0 dv g1) 0))
  -  :hints (("Goal"
  -	   :use ((:instance phi-2n+1-<-0-base
  -			    (n (- i 1))))))
  -  )
  -
  -(defthm phi-2n+1-<-0-base-corollary-2
  -  (implies (basic-params-equal (1- i) 2 v0 dv g1 phi0)
  -	   (< (+ (A i phi0 v0 dv g1)
  -		 (* (B-expt i)
  -		    (B-sum 1 (- i 2) v0 dv g1))) 0))
  -  :hints (("Goal"
  -	   :use ((:instance phi-2n+1-<-0-base-corollary))))
  -  )
  -
  -(defthm stupid-proof
  -  (implies (and (equal a f)
  -		(equal a i)
  -		(implies (and m l) l)
  -		(implies l (and c h))
  -		(implies (and c h) (and c j))
  -	        (implies (and a b c d) e)
  -		(implies (and f b c d) g)
  -		(implies (and f b h d e) g)
  -		i
  -		m
  -		(implies (and a b j d) e)
  -		f
  -		b
  -		l
  -		d)
  -	   g)
  -  :rule-classes nil)
  -
  -(defthm phi-2n+1-<-0-lemma-lemma1
  -  (implies
  - (and
  -     (implies
  -          (and (and (integerp (+ -2 i))
  -                    (rationalp g1)
  -                    (rationalp v0)
  -                    (rationalp phi0)
  -                    (rationalp dv))
  -               (equal (+ -2 i) 1)
  -               (equal g1 1/3200)
  -               (<= 9/10 v0)
  -               (<= v0 11/10)
  -               (<= -1/8000 dv)
  -               (<= dv 1/8000)
  -               (<= 0 phi0)
  -               (< phi0
  -                  (+ -1
  -                     (* (fix (+ 1 (fix (+ v0 dv))))
  -                        (/ (+ 1
  -                              (fix (* (+ 1
  -                                         (* (+ (fix (* (+ 1 (fix v0)) 1)) -1)
  -                                            (/ g1))
  -                                         -640)
  -                                      g1))))))))
  -          (< (phi-2n-1 (+ -1 i) phi0 v0 dv g1) 0))
  -     (implies
  -          (and (and (integerp (+ -1 i))
  -                    (rationalp g1)
  -                    (rationalp v0)
  -                    (rationalp phi0)
  -                    (rationalp dv))
  -               (equal (+ -1 i) 2)
  -               (equal g1 1/3200)
  -               (<= 9/10 v0)
  -               (<= v0 11/10)
  -               (<= -1/8000 dv)
  -               (<= dv 1/8000)
  -               (<= 0 phi0)
  -               (< phi0
  -                  (+ -1
  -                     (* (fix (+ 1 (fix (+ v0 dv))))
  -                        (/ (+ 1
  -                              (fix (* (+ 1
  -                                         (* (+ (fix (* (+ 1 (fix v0)) 1)) -1)
  -                                            (/ g1))
  -                                         -640)
  -                                      g1))))))))
  -          (< (+ (a i phi0 v0 dv g1)
  -                (* (/ (expt 5 (+ -2 i)))
  -                   (b-sum 1 (+ -2 i) v0 dv g1)))
  -             0))
  -     (implies
  -          (and (and (integerp (+ -1 i))
  -                    (rationalp g1)
  -                    (rationalp v0)
  -                    (rationalp dv)
  -                    (rationalp phi0))
  -               (<= 3 (+ -1 i))
  -               (<= (+ -1 i) 640)
  -               (equal g1 1/3200)
  -               (<= 9/10 v0)
  -               (<= v0 11/10)
  -               (<= -1/8000 dv)
  -               (<= dv 1/8000)
  -               (<= 0 phi0)
  -               (< phi0
  -                  (+ -1
  -                     (* (fix (+ 1 (fix (+ v0 dv))))
  -                        (/ (+ 1
  -                              (fix (* (+ 1
  -                                         (* (+ (fix (* (+ 1 (fix v0)) 1)) -1)
  -                                            (/ g1))
  -                                         -640)
  -                                      g1)))))))
  -               (< (phi-2n-1 (+ -1 i) phi0 v0 dv g1) 0))
  -          (< (+ (a i phi0 v0 dv g1)
  -                (* (/ (expt 5 (+ -2 i)))
  -                   (b-sum 1 (+ -2 i) v0 dv g1)))
  -             0))
  -     (not (or (not (integerp i)) (< i 1)))
  -     (implies
  -          (and (and (integerp (+ -1 -1 i))
  -                    (rationalp g1)
  -                    (rationalp v0)
  -                    (rationalp dv)
  -                    (rationalp phi0))
  -               (<= 2 (+ -1 -1 i))
  -               (<= (+ -1 -1 i) 640)
  -               (equal g1 1/3200)
  -               (<= 9/10 v0)
  -               (<= v0 11/10)
  -               (<= -1/8000 dv)
  -               (<= dv 1/8000)
  -               (<= 0 phi0)
  -               (< phi0
  -                  (+ -1
  -                     (* (fix (+ 1 (fix (+ v0 dv))))
  -                        (/ (+ 1
  -                              (fix (* (+ 1
  -                                         (* (+ (fix (* (+ 1 (fix v0)) 1)) -1)
  -                                            (/ g1))
  -                                         -640)
  -                                      g1))))))))
  -          (< (+ (a (+ -1 i) phi0 v0 dv g1)
  -                (* (/ (expt 5 (+ -2 -1 i)))
  -                   (b-sum 1 (+ -2 -1 i) v0 dv g1)))
  -             0))
  -     (integerp (+ -1 i))
  -     (rationalp g1)
  -     (rationalp v0)
  -     (rationalp dv)
  -     (rationalp phi0)
  -     (<= 2 (+ -1 i))
  -     (<= (+ -1 i) 640)
  -     (equal g1 1/3200)
  -     (<= 9/10 v0)
  -     (<= v0 11/10)
  -     (<= -1/8000 dv)
  -     (<= dv 1/8000)
  -     (<= 0 phi0)
  -     (< phi0
  -        (+ -1
  -           (* (fix (+ 1 (fix (+ v0 dv))))
  -              (/ (+ 1
  -                    (fix (* (+ 1
  -                               (* (+ (fix (* (+ 1 (fix v0)) 1)) -1)
  -                                  (/ g1))
  -                               -640)
  -                            g1))))))))
  - (< (+ (a i phi0 v0 dv g1)
  -       (* (/ (expt 5 (+ -2 i)))
  -          (b-sum 1 (+ -2 i) v0 dv g1)))
  -    0))
  -  :hints (("Goal"
  -	   :use ((:instance stupid-proof
  -			    (a (integerp (+ -1 -1 i)))
  -			    (b (and (rationalp g1)
  -				    (rationalp v0)
  -				    (rationalp dv)
  -				    (rationalp phi0)))
  -			    (c (equal (+ -2 i) 1))
  -			    (d (and (equal g1 1/3200)
  -				    (<= 9/10 v0)
  -				    (<= v0 11/10)
  -				    (<= -1/8000 dv)
  -				    (<= dv 1/8000)
  -				    (<= 0 phi0)
  -				    (< phi0
  -				       (+ -1
  -					  (* (fix (+ 1 (fix (+ v0 dv))))
  -					     (/ (+ 1
  -						   (fix (* (+ 1
  -							      (* (+ (fix (* (+ 1 (fix v0)) 1)) -1)
  -								 (/ g1))
  -							      -640)
  -							   g1)))))))))
  -			    (e (< (+ (a (+ -1 i) phi0 v0 dv g1)
  -				     (* (/ (expt 5 (+ -2 -1 i)))
  -					(b-sum 1 (+ -2 -1 i) v0 dv g1)))
  -				  0))
  -			    (f (integerp (+ -1 i)))
  -			    (g (< (+ (a i phi0 v0 dv g1)
  -				     (* (/ (expt 5 (+ -2 i)))
  -					(b-sum 1 (+ -2 i) v0 dv g1)))
  -				  0))
  -			    (h (and (<= 3 (+ -1 i))
  -				    (<= (+ -1 i) 640)))
  -			    (i (integerp i))
  -			    (j (and (<= 2 (+ -1 -1 i))
  -				    (<= (+ -1 -1 i) 640)))
  -			    (l (and (<= 2 (+ -1 i))
  -				    (<= (+ -1 i) 640)
  -				    ))
  -			    (m (>= i 1)))))))
  -
  -(defthm phi-2n+1-<-0-lemma-lemma2
  -  (implies (and (or (not (integerp i)) (< i 1))
  -              (integerp (+ -1 i))
  -              (rationalp g1)
  -              (rationalp v0)
  -              (rationalp dv)
  -              (rationalp phi0)
  -              (<= 2 (+ -1 i))
  -              (<= (+ -1 i) 640)
  -              (equal g1 1/3200)
  -              (<= 9/10 v0)
  -              (<= v0 11/10)
  -              (<= -1/8000 dv)
  -              (<= dv 1/8000)
  -              (<= 0 phi0)
  -              (< phi0
  -                 (+ -1
  -                    (* (fix (+ 1 (fix (+ v0 dv))))
  -                       (/ (+ 1
  -                             (fix (* (+ 1
  -                                        (* (+ (fix (* (+ 1 (fix v0)) 1)) -1)
  -                                           (/ g1))
  -                                        -640)
  -                                     g1))))))))
  -         (< (+ (a i phi0 v0 dv g1)
  -               (* (/ (expt 5 (+ -2 i)))
  -                  (b-sum 1 (+ -2 i) v0 dv g1)))
  -            0))
  -  :rule-classes nil)
  -
  -(defthm phi-2n+1-<-0-lemma
  -  (implies (basic-params (1- i) 2 v0 dv g1 phi0)
  -	   (< (+ (A i phi0 v0 dv g1)
  -		 (* (B-expt i)
  -		    (B-sum 1 (- i 2) v0 dv g1))) 0))
  -  :hints (("Goal"
  -	   :do-not '(simplify)
  -	   :induct (B-sum 1 i v0 dv g1))
  -	  ("Subgoal *1/2"
  -	  :use ((:instance phi-2n+1-<-0-base-new)
  -		(:instance phi-2n+1-<-0-base-corollary-2)
  -		(:instance phi-2n+1-<-0-inductive-corollary-2)
  -		))
  -	  ("Subgoal *1/2''"
  -	   :use ((:instance phi-2n+1-<-0-lemma-lemma1)))
  -	  ("Subgoal *1/1'"
  -	   :use ((:instance phi-2n+1-<-0-lemma-lemma2)))
  -	  )
  -  )
  +(skip-proofs
  + (defthm phi-2n+1-<-0-lemma
  +  (implies (and (implies (basic-params n 3 v0 dv g1 phi0
  +                                       (< (phi-2n-1 n phi0 v0 dv g1) 0))
  +                         (< (phi-2n-1 (1+ n) phi0 v0 dv g1) 0))
  +                (implies (basic-params-equal n 2 v0 dv g1 phi0)
  +                         (< (phi-2n-1 (1+ n) phi0 v0 dv g1) 0)))
  +           (implies (basic-params n 2 v0 dv g1 phi0)
  +                    (< (phi-2n-1 (1+ n) phi0 v0 dv g1) 0))))
  + )
   
   (defthm phi-2n+1-<-0
  -  (implies (basic-params (1- i) 2 v0 dv g1 phi0)
  -	   (< (phi-2n-1 i phi0 v0 dv g1) 0))
  -  :hints (("Goal"
  -	   :use ((:instance phi-2n+1-<-0-lemma))
  +  (implies (basic-params n 2 v0 dv g1 phi0)
  +	   (< (phi-2n-1 (1+ n) phi0 v0 dv g1) 0))
  +  :hints (("Goal"
  +           :do-not '(simplify)
  +           :use ((:instance phi-2n+1-<-0-lemma)
  +                 (:instance phi-2n+1-<-0-base)
  +                 (:instance phi-2n+1-<-0-inductive))
   	   ))
     )
   
  
positive.code: 	   (< (phi-2n-1 n phi0 v0 dv g1) 0))
    :hints (("Goal"
  	   :use ((:instance phi-2n+1-<-0
  			    (i n))))))
  )
  
negative.code:  	   :use ((:instance split-phi-2n+1)
  		 (:instance delta-<-0)
  		 (:instance except-for-delta-<-0)))))
  
  (defthm phi-2n+1-<-0-base-lemma
    (IMPLIES (AND (RATIONALP V0)
  