1
; Copyright (C) 2007 by Shant Harutunian
2
; License: A 3-clause BSD license. See the LICENSE file distributed with ACL2.
6
(include-book "arith-nsa4")
9
(include-book "phi-exists")
10
(include-book "computed-hints")
11
(include-book "tm-floor")
13
(in-theory (disable i-large))
14
(in-theory (disable standard-part-<=))
16
;; Cuong Chau: Some proofs failed when I left the following lemmas enable.
19
(in-theory (disable EPS-N-FUN-RW-1-THM
24
(defun f-sum (x n eps)
27
(t (+ (* eps (f (run x (- n 1) eps)))
28
(f-sum x (- n 1) eps)))))
37
(+ x (f-sum x n eps))))
39
:hints (("Goal" :do-not '(generalize))
40
("Subgoal *1/2" :in-theory (disable step-run-thm)
42
step-run-thm (n (- n 1)))))))
44
(defun resid (x n eps)
45
(- (f-sum x n eps) (* n eps (f x))))
52
(realp (f-sum x n eps)))
53
:rule-classes :type-prescription)
60
(realp (run x n eps)))
61
:rule-classes :type-prescription)
63
(defthm run-limited-thm
72
(i-limited (* eps n)))
73
(i-limited (run x n eps)))
74
:rule-classes ((:type-prescription) (:rewrite))
75
:hints (("Goal" :in-theory (disable abs
82
:use ((:instance run-limit-eexpt-thm)
83
(:instance run-n-limit-limited-thm)
84
(:instance limited-bound-x-implies-limited-x-thm
85
(y (run-n-limit x n eps))
86
(x (run x n eps)))))))
88
(defthm resid-limited-thm
97
(i-limited (* eps n)))
98
(i-limited (resid x n eps)))
99
:rule-classes :type-prescription
100
:hints (("Goal" :in-theory (disable i-large)
101
:use ((:instance run-f-sum-thm)
102
(:instance run-limited-thm)))
103
("Goal'''" :use ((:instance times-limited
106
(:instance plus-limited
107
(x (+ X (F-SUM X N EPS)))
110
(defthm resid-standard-thm
119
(i-limited (* eps n)))
120
(standard-numberp (standard-part (resid x n eps))))
121
:hints (("Goal" :in-theory (disable i-large resid)
122
:use ((:instance resid-limited-thm)))))
124
(defthm resid-std-thm
126
(AND (STANDARD-NUMBERP X)
127
(STANDARD-NUMBERP TM)
131
(STANDARD-NUMBERP (STANDARD-PART
133
(FLOOR1 (* (I-LARGE-INTEGER) TM))
134
(/ (I-LARGE-INTEGER))))))
135
:hints (("Goal" :in-theory (disable i-large)
136
:use ((:instance resid-standard-thm
137
(n (floor1 (* tm (i-large-integer))))
138
(eps (/ (i-large-integer))))))))
140
(in-theory (disable resid))
142
(defun-std resid-tm (x tm)
147
(t (standard-part (resid x
148
(floor1 (* tm (i-large-integer)))
149
(/ (i-large-integer)))))))
151
(in-theory (enable resid))
153
(defthm f-run-bound-hint-1
159
(equal (f (step1 x eps))
160
(+ (f x) (- (f (step1 x eps)) (f x)))))
163
(defthm f-run-bound-hint-2
169
(<= (abs (f (step1 x eps)))
170
(* (+ 1 (* eps (L))) (abs (f x)))))
172
:hints (("Goal" :in-theory (disable abs)
173
:use ((:instance f-run-bound-hint-1)
174
(:instance abs-triangular-inequality-thm
176
(y (- (f (step1 x eps)) (f x))))
181
(defthm f-run-bound-thm
189
(<= (abs (f (run x n eps)))
190
(* (eexp (* n eps (L))) (abs (f x)))))
191
:hints (("Goal" :in-theory (disable abs step1)
192
:do-not '(generalize))
193
("Subgoal *1/5" :use ((:instance pos-factor-<=-thm
194
(x (abs (f (step1 x eps))))
195
(y (* (+ 1 (* eps (L))) (abs (f x))))
196
(a (EEXP (+ (* -1 (L) EPS)
198
(:instance pos-factor-<=-thm
199
(x (+ 1 (* eps (L))))
200
(y (eexp (* eps (L))))
201
(a (* (EEXP (+ (* -1 (L) EPS)
204
(:instance f-run-bound-hint-2)
205
(:instance 1+x-<=eexp-thm
208
(defthm f-sum-exp-bound-thm
216
(<= (abs (f-sum x n eps))
217
(* n eps (eexp (* eps n (L))) (abs (f x)))))
219
:hints (("Goal" :induct (f-sum x n eps)
221
:in-theory (disable abs <-*-LEFT-CANCEL)
222
:do-not '(generalize))
223
("Subgoal *1/2" :use ((:instance f-run-bound-thm (n (- n 1)))
224
(:instance pos-factor-<=-thm
225
(x (abs (f (run x (- n 1) eps))))
226
(y (* (eexp (* (- n 1) eps (L)))
229
(:instance abs-triangular-inequality-thm
230
(x (F-SUM X (+ -1 N) EPS))
231
(y (* EPS (F (RUN X (+ -1 N) EPS)))))
232
(:instance pos-factor-<=-thm
234
(y (EEXP (* (L) EPS)))
235
(a (* EPS N (ABS (F X))
236
(EEXP (+ (* -1 (L) EPS)
240
(defthm f-sum-diff-thm
250
(equal (- (f-sum x m eps)
252
(f-sum (run x n eps) (- m n) eps))))
254
(defthm f-run-diff-eq-f-sum-thm
264
(equal (- (run x m eps)
266
(f-sum (run x n eps) (- m n) eps)))
267
:hints (("Goal" :do-not-induct t
268
:use ((:instance run-f-sum-thm (n m))
269
(:instance run-f-sum-thm)
270
(:instance f-sum-diff-thm)))))
283
(<= (* a b) (* x y)))
284
:hints (("Goal" :use ((:instance pos-factor-<=-thm
288
(:instance pos-factor-<=-thm
293
(defthm f-run-diff-tm-thm-hint
301
(<= 0 (* (- m n) eps (eexp (* (- m n) (L) eps)))))
303
:hints (("Goal" :in-theory (disable distributivity
305
:use ((:instance pos-factor-<=-thm
314
(defthm f-run-diff-tm-thm
324
(<= (abs (- (run x m eps)
326
(* (- m n) eps (eexp (* eps m (L))) (abs (f x)))))
327
:hints (("Goal" :do-not-induct t
328
:in-theory (disable abs)
329
:use ((:instance f-run-diff-tm-thm-hint)
330
(:instance f-run-diff-eq-f-sum-thm)
331
(:instance f-sum-exp-bound-thm
334
(:instance f-run-bound-thm)
335
(:instance pos-factor-<=-thm
336
(x (abs (f (run x n eps))))
337
(y (* (eexp (* n eps (L))) (abs (f x))))
344
;; Cuong Chau: I need this lemma to prove some theorems in this book.
346
(defthm standard-number-is-limited
347
(implies (standard-numberp r)
350
(defthm run-diff-tm-standard-part-thm
361
(i-limited (* eps n))
362
(i-limited (* eps m))
363
(equal (standard-part (* m eps))
364
(standard-part (* n eps))))
365
(equal (- (standard-part (run x m eps))
366
(standard-part (run x n eps)))
368
:hints ((standard-part-hint stable-under-simplificationp clause)
369
("Goal" :in-theory (e/d (EPS-N-FUN-RW-1-THM
372
:cases ((<= n m) (< m n))
374
("Subgoal 2" :use ((:instance f-run-diff-tm-thm)))
375
("Subgoal 1" :use ((:instance f-run-diff-tm-thm
379
(defthm floor1-large-1<=
384
(standard-numberp x))
385
(i-large (* (i-large-integer) x)))
386
:hints (("Goal" :in-theory (enable i-large))))
395
:hints ((standard-part-hint stable-under-simplificationp clause)
396
("Goal" :in-theory (enable i-large)
397
:use ((:instance standard-part-<=
401
(defthm standard-diff-*-large-thm
409
(<= (+ (* (i-large-integer) x) 1)
410
(* (i-large-integer) y)))
411
:hints (("Goal" :use ((:instance floor1-large-1<= (x (- y x)))
412
(:instance large-gt-1
413
(x (+ (* -1 (I-LARGE-INTEGER) X)
414
(* (I-LARGE-INTEGER) Y))))
415
(:instance pos-factor-<-thm
418
(a (i-large-integer)))))))
420
(defthm abs-standard-numberp
424
(standard-numberp x))
425
(standard-numberp (abs x))))
427
(defthm-std phi-diff-tm-thm
435
(<= (abs (- (phi x tm2)
437
(* (- tm2 tm1) (eexp (* tm2 (L))) (abs (f x)))))
439
:hints ((standard-part-hint stable-under-simplificationp clause)
440
("Goal" :in-theory (disable abs <-CANCEL-DIVISORS)
441
:use ((:instance f-run-diff-tm-thm
442
(eps (/ (i-large-integer)))
443
(n (floor1 (* tm1 (i-large-integer))))
444
(m (floor1 (* tm2 (i-large-integer)))))
445
(:instance L-STANDARD-THM)
446
(:instance F-STANDARD-THM)
447
(:instance standard-diff-*-large-thm
451
;; ----------------------------------------------
452
;; The following is the theorem which states
453
;; that phi is continuous with respect to time
454
;; ----------------------------------------------
456
(defthm phi-tm-continuous-thm
464
(equal (standard-part (phi x tm1))
465
(phi x (standard-part tm1))))
466
:hints ((standard-part-hint stable-under-simplificationp clause)
467
("Goal" :in-theory (disable abs)
468
:cases ((<= tm1 (standard-part tm1))
469
(< (standard-part tm1) tm1)))
470
("Subgoal 2" :use ((:instance phi-diff-tm-thm
472
(tm2 (standard-part tm1)))))
473
("Subgoal 1" :use ((:instance phi-diff-tm-thm
475
(tm1 (standard-part tm1)))))))
484
(equal (run (run x n eps) m eps)
485
(run x (+ m n) eps))))
487
(defthm phi-diff-hint-1
490
(standard-numberp x1)
491
(standard-numberp x2)
492
(standard-numberp tm)
497
(equal (STANDARD-PART (* (EEXP (* (L) (/ (I-LARGE-INTEGER))
498
(FLOOR1 (* (I-LARGE-INTEGER) TM))))
499
(ABS (+ X1 (* -1 X2)))))
501
(ABS (+ X1 (* -1 X2))))))
503
:hints (("Goal" :in-theory (disable *-commut-3way)
504
:use (:instance L-STANDARD-THM))))
506
(defthm-std phi-x-diff-thm
513
(<= (abs (- (phi x1 tm) (phi x2 tm)))
514
(* (abs (- x1 x2)) (eexp (* tm (L))))))
516
:hints ((standard-part-hint stable-under-simplificationp clause)
517
("Goal" :in-theory (disable abs i-large )
518
:use ((:instance run-diff-limit-eexp-thm
519
(n (floor1 (* tm (i-large-integer))))
520
(eps (/ (i-large-integer))))
521
(:instance phi-diff-hint-1)))))
523
(defthm run-x-continuous-thm
531
(i-limited (* eps n))
533
(equal (standard-part (run (standard-part x) n eps))
534
(standard-part (run x n eps))))
535
:hints ((standard-part-hint stable-under-simplificationp clause)
536
("Goal" :in-theory (disable abs)
538
:use ((:instance run-diff-limit-eexp-thm
540
(x2 (standard-part x)))))))
542
;; -------------------------------------------
543
;; The following is the theorem which states
544
;; that phi is continuous with respect to x
545
;; -------------------------------------------
547
(defthm phi-x-continuous-thm
553
(standard-numberp tm)
555
(equal (standard-part (phi x tm))
556
(phi (standard-part x) tm)))
557
:hints ((standard-part-hint stable-under-simplificationp clause)
558
("Goal" :in-theory (disable abs)
559
:use ((:instance phi-x-diff-thm
561
(x2 (standard-part x)))))))
563
(defthm phi-plus-hint1
568
(equal (standard-part (* (+ (FLOOR1 (* (I-LARGE-INTEGER) TM1))
569
(FLOOR1 (* (I-LARGE-INTEGER) TM2)))
570
(/ (I-LARGE-INTEGER))))
571
(standard-part (* (floor1 (* (i-large-integer) (+ tm1 tm2)))
572
(/ (i-large-integer))))))
573
:hints ((standard-part-hint stable-under-simplificationp clause)
574
("Goal" :in-theory (disable <-CANCEL-DIVISORS)
575
:use ((:instance pos-factor-<-thm
576
(x (+ (* (I-LARGE-INTEGER) TM1)
577
(* (I-LARGE-INTEGER) TM2)
579
(y (+ (FLOOR1 (* (I-LARGE-INTEGER) TM1))
580
(FLOOR1 (* (I-LARGE-INTEGER) TM2))))
581
(a (/ (i-large-integer))))
582
(:instance pos-factor-<=-thm
583
(x (+ (FLOOR1 (* (I-LARGE-INTEGER) TM1))
584
(FLOOR1 (* (I-LARGE-INTEGER) TM2))))
585
(y (+ (* (I-LARGE-INTEGER) TM1)
586
(* (I-LARGE-INTEGER) TM2)))
587
(a (/ (i-large-integer))))
588
(:instance pos-factor-<-thm
589
(x (+ (* (i-large-integer) (+ tm1 tm2)) -1))
590
(y (floor1 (* (i-large-integer) (+ tm1 tm2))))
591
(a (/ (i-large-integer))))
592
(:instance pos-factor-<=-thm
593
(x (floor1 (* (i-large-integer) (+ tm1 tm2))))
594
(y (* (i-large-integer) (+ tm1 tm2)))
595
(a (/ (i-large-integer))))))))
597
(defthm tm1+tm2-limited-thm
600
(standard-numberp tm1)
601
(standard-numberp tm2)
604
(i-limited (* (/ (i-large-integer))
605
(floor1 (* (i-large-integer) (+ tm1 tm2))))))
607
:hints (("Goal" :use ((:instance phi-plus-hint1)
608
(:instance standard+small->i-limited
610
(* (/ (i-large-integer))
611
(floor1 (* (i-large-integer)
613
(eps (- (* (/ (i-large-integer))
614
(floor1 (* (i-large-integer)
617
(* (/ (i-large-integer))
618
(floor1 (* (i-large-integer)
622
;; -------------------------------------------
623
;; The following is the theorem which states
624
;; that phi is time invariant
625
;; -------------------------------------------
627
(defthm-std phi-plus-thm
635
(equal (phi (phi x tm1) tm2)
636
(phi x (+ tm1 tm2))))
637
:hints (("Goal" :in-theory (disable i-large run-plus-thm)
638
:use ((:instance phi-plus-hint1)
639
(:instance tm1+tm2-limited-thm)
640
(:instance run-plus-thm (n (floor1 (* tm1
644
(eps (/ (i-large-integer))))
645
(:instance run-diff-tm-standard-part-thm
646
(eps (/ (i-large-integer)))
647
(m (+ (floor1 (* (i-large-integer) tm1))
648
(floor1 (* (i-large-integer) tm2))))
649
(n (floor1 (* (i-large-integer) (+ tm1 tm2)))))
650
(:instance phi-x-continuous-thm
652
(FLOOR1 (* (I-LARGE-INTEGER) TM1))
653
(/ (I-LARGE-INTEGER))))
656
;; For some reason, enabling the following rule as a
657
;; linear lemma may cause ACL2 to stall during simplification
666
;; For some reason, enabling the following rewrite rule
667
;; may cause ACL2 to stall during simplification
674
(equal (floor1 x) 0))
684
(t (floor1 (/ tm eps)))))
686
(defun phi-run (x tm eps)
687
(declare (xargs :measure (tm-m tm eps)
688
:hints (("Subgoal 1.2"
689
:use ((:instance floor1-1-thm
690
(x (* (/ eps) tm))))))))
692
((not (and (realp eps)
695
(realp tm))) (phi x tm))
696
(t (phi-run (phi x eps) (- tm eps) eps))))
698
(defthm phi-run-eq-phi-thm
706
(equal (phi-run x tm eps)
710
(defthm run-equal-thm
718
(equal (+ x (* eps n (f x)) (- (f-sum x n eps) (* n eps (f x))))
720
:hints (("Goal" :use ((:instance run-f-sum-thm)))))
722
(defthm-std phi-equal-thm
728
(equal (+ x (* tm (f x)) (resid-tm x tm))
730
:hints (("Goal" :use ((:instance F-STANDARD-THM)
731
(:instance run-f-sum-thm
732
(eps (/ (i-large-integer)))
733
(n (floor1 (* tm (i-large-integer))))
736
(defthm step-resid-thm
744
(equal (+ (resid x n eps)
745
(- (* eps (f (run x n eps)))
747
(resid x (+ n 1) eps))))
755
(realp (resid x n eps)))
756
:rule-classes :type-prescription)
758
(defthm-std resid-tm-type
763
(realp (resid-tm x tm)))
764
:rule-classes :type-prescription)
766
(defthm step-resid-bound-thm
774
(<= (abs (resid x n eps))
775
(+ (abs (resid x (- n 1) eps))
776
(* eps eps (L) (- n 1)
777
(eexp (* eps (- n 1) (L)))
780
:hints (("Goal" :in-theory (disable abs step-resid-thm resid)
781
:use ((:instance f-sum-exp-bound-thm (n (- n 1)))
782
(:instance abs-triangular-inequality-thm
783
(x (RESID X (+ -1 N) EPS))
784
(y (- (* eps (f (run x (- n 1) eps)))
786
(:instance abs-pos-*-left-thm
789
(* (F (RUN X (+ -1 N) EPS))))))
790
(:instance f-lim-thm (x1 (run x (- n 1) eps))
792
(:instance pos-factor-<=-thm
793
(x (ABS (+ (* -1 (F X))
794
(* (F (RUN X (+ -1 N) EPS))))))
797
(RUN X (+ -1 N) EPS)))))
799
(:instance run-f-sum-thm (n (- n 1)))
800
(:instance step-resid-thm (n (- n 1)))
801
(:instance pos-factor-<=-thm
802
(x (abs (f-sum x (- n 1) eps)))
805
(eexp (* eps (- n 1) (L)))
809
(defthm resid-bound-thm
817
(<= (abs (resid x n eps))
818
(* n n eps eps (L) (eexp (* n eps (L))) (abs (f x)))))
820
:hints (("Goal" :in-theory (disable abs)
821
:do-not '(generalize)
823
:induct (f-sum x n eps))
824
("Subgoal *1/2" :in-theory (disable abs resid
826
:use ((:instance step-resid-bound-thm)
827
(:instance pos-factor-<=-thm
831
(:instance pos-factor-<=-thm
833
(y (eexp (* eps (L))))
834
(a (* (L) EPS EPS N N
836
(EEXP (+ (* -1 (L) EPS)
840
(defthm tm-fun-rw-5-thm
847
(standard-numberp tm))
848
(equal (* (/ (I-LARGE-INTEGER)) a b
849
(FLOOR1 (* (I-LARGE-INTEGER) TM)) c)
850
(* (tm-fun tm) a b c)))
851
:hints (("Goal" :in-theory (e/d (tm-fun) (tm-fun-rw-1-thm
856
(defthm tm-fun-rw-6-thm
864
(standard-numberp tm))
865
(equal (* (/ (I-LARGE-INTEGER)) a b c
866
(FLOOR1 (* (I-LARGE-INTEGER) TM)) d)
867
(* (tm-fun tm) a b c d)))
868
:hints (("Goal" :in-theory (e/d (tm-fun) (tm-fun-rw-1-thm
874
(defthm-std resid-tm-bound-thm
880
(<= (abs (resid-tm x tm))
881
(* tm tm (L) (eexp (* tm (L))) (abs (f x)))))
882
:hints ((standard-part-hint stable-under-simplificationp clause)
883
("Goal" :in-theory (disable abs <-CANCEL-DIVISORS)
884
:use ((:instance F-STANDARD-THM)
885
(:instance L-STANDARD-THM)
886
(:instance resid-bound-thm
887
(eps (/ (i-large-integer)))
888
(n (floor1 (* tm (i-large-integer)))))))))
890
(defthm tm-floor-0-thm
898
(equal (FLOOR1 (* (/ EPS) TM)) 0))
899
:hints (("Goal" :use ((:instance floor1-0-thm (x (/ tm eps)))))))
901
(defthm-std phi-0-thm
907
(defun tm-induct (tm eps)
908
(declare (xargs :measure (tm-m tm eps)
909
:hints (("Subgoal 1.2"
910
:use ((:instance floor1-1-thm
911
(x (* (/ eps) tm))))))))
918
(t (tm-induct (- tm eps)
921
(defthm phi-eps-step-thm
928
(<= (abs (- (phi x1 eps) (step1 x2 eps)))
929
(+ (* (abs (- x1 x2)) (+ 1 (* eps (L))))
930
(* eps eps (L) (eexp (* eps (L))) (abs (f x1))))))
932
:hints (("Goal" :in-theory (disable abs)
933
:do-not '(generalize)
935
:use ((:instance phi-equal-thm (x x1) (tm eps))
936
(:instance abs-triangular-inequality-thm
938
(y (+(RESID-TM X1 EPS)
941
(:instance abs-triangular-inequality-thm
942
(x (RESID-TM X1 EPS))
945
(:instance resid-tm-bound-thm
948
(:instance abs-pos-*-left-thm
952
(:instance f-lim-thm)
953
(:instance pos-factor-<=-thm
954
(x (abs (- (f x1) (f x2))))
955
(y (* (L) (abs (- x1 x2))))
958
(defthm phi-phi-run-thm
967
(equal (phi (phi-run x
970
(FLOOR1 (* (/ EPS) TM))))
972
(phi-run x (* eps (floor1 (/ tm eps))) eps)))
973
:hints (("Goal" :induct (phi-run x tm eps)
974
:do-not '(generalize))
975
("Subgoal *1/4" :use ((:instance floor1-1-thm
977
(:instance pos-factor-<=-thm
979
(y (floor1 (/ tm eps)))
981
("Subgoal *1/2" :use ((:instance floor1-1-thm (x (/ tm eps)))
982
(:instance pos-factor-<=-thm
984
(y (floor1 (/ tm eps)))
986
("Subgoal *1/1" :use ((:instance tm-floor-0-thm
988
(:instance distributivity
989
(y (FLOOR1 (* (/ EPS) TM)))
993
(defthm f-standard-part-thm
998
(equal (standard-part (f x))
999
(f (standard-part x))))
1000
:hints ((standard-part-hint stable-under-simplificationp clause)
1001
("Goal" :in-theory (disable abs STANDARDP-STANDARD-PART)
1002
:use ((:instance F-STANDARD-THM
1003
(x (standard-part x)))
1004
(:instance f-lim-thm
1005
(x1 (standard-part x))
1007
(:instance standardp-standard-part)))))
1009
(defthm-std f-phi-bound-thm
1015
(<= (abs (f (phi x tm)))
1016
(* (eexp (* tm (L))) (abs (f x)))))
1017
:hints ((standard-part-hint stable-under-simplificationp clause)
1018
("Goal" :in-theory (disable abs)
1019
:use ((:instance L-STANDARD-THM)
1020
(:instance f-run-bound-thm
1021
(eps (/ (i-large-integer)))
1022
(n (floor1 (* tm (i-large-integer))))
1025
(defthm phi-eps-arith-hint
1032
(* (EEXP (* (L) EPS))
1033
(FLOOR1 (* (/ EPS) TM))
1034
(EEXP (+ (* -1 (L) EPS)
1035
(* (L) EPS (FLOOR1 (* (/ EPS) TM))))))
1036
(* (FLOOR1 (* (/ EPS) TM))
1037
(EEXP (* (L) EPS (FLOOR1 (* (/ EPS) TM)))))))
1038
:hints (("Goal" :in-theory (disable *-commut-3way)
1039
:use ((:instance *-commut-3way
1040
(x (EEXP (* (L) EPS)))
1041
(y (FLOOR1 (* (/ EPS) TM)))
1042
(z (EEXP (+ (* -1 (L) EPS)
1044
(FLOOR1 (* (/ EPS) TM))))))
1055
(<= (abs (- (phi-run x
1056
(* eps (floor1 (/ tm eps)))
1065
(eexp (* eps (floor1 (/ tm eps)) (L))))))
1067
:hints (("Goal" :in-theory (disable abs)
1068
:induct (tm-induct tm eps)
1069
:do-not '(generalize))
1070
("Subgoal *1/2" :in-theory (disable abs run step1)
1071
:use ((:instance floor1-1-thm (x (/ tm eps)))
1072
(:instance pos-factor-<=-thm
1074
(y (floor1 (/ tm eps)))
1076
("Subgoal *1/2.1" :in-theory (disable abs run step1
1079
:use ((:instance phi-run-eq-phi-thm
1081
(* EPS (FLOOR1 (* (/ EPS) TM))))))
1082
(:instance phi-run-eq-phi-thm
1083
(tm (* EPS (FLOOR1 (* (/ EPS) TM)))))
1084
(:instance 1+x-<=eexp-thm (x (* eps (L))))
1085
(:instance phi-eps-arith-hint)
1086
(:instance pos-factor-<=-thm
1087
(x (+ 1 (* eps (L))))
1088
(y (eexp (* eps (L))))
1101
(:instance pos-factor-<=-thm
1115
(EEXP (+ (* -1 (L) EPS)
1121
(FLOOR1 (* (/ EPS) TM))
1122
(EEXP (+ (* -1 (L) EPS)
1127
(a (EEXP (* (L) EPS))))
1128
(:instance pos-factor-<=-thm
1136
(EEXP (+ (* -1 (L) EPS)
1141
(a (* (L) EPS EPS (EEXP (* (L) EPS)))))
1142
(:instance phi-eps-step-thm
1145
(- (floor1 (/ tm eps)) 1))
1147
(x2 (run x (- (floor1
1148
(/ tm eps)) 1) eps)))
1149
(:instance f-phi-bound-thm
1151
(* EPS (FLOOR1 (* (/ EPS) TM)))))
1154
(defthm phi-any-small-eps-thm
1159
(standard-numberp x)
1160
(standard-numberp tm)
1165
(equal (standard-part (phi x tm))
1166
(standard-part (run x (floor1 (/ tm eps)) eps))))
1167
:hints ((standard-part-hint stable-under-simplificationp clause)
1168
("Goal" :in-theory (disable abs phi)
1169
:use ((:instance small-are-limited (x eps))
1170
(:instance phi-eps-thm)
1171
(:instance phi-run-eq-phi-thm
1172
(tm (* EPS (FLOOR1 (* (/ EPS) TM)))))))))
1174
;; ----------------------------------------------
1175
;; The following is the theorem which states
1176
;; that run, hence phi, is independent of the
1178
;; ----------------------------------------------
1180
(defthm run-any-small-eps-thm
1185
(standard-numberp x)
1186
(standard-numberp tm)
1191
(equal (standard-part (run x
1192
(floor1 (* tm (i-large-integer)))
1193
(/ (i-large-integer))))
1194
(standard-part (run x
1197
:hints (("Goal" :use ((:instance phi-any-small-eps-thm)))))