(NOTE-LIB "mc20-1" T)
Loading ./yu/mc20-1.lib
Finished loading ./yu/mc20-1.lib
Loading ./yu/mc20-1.o
Finished loading ./yu/mc20-1.o
(#./yu/mc20-1.lib #./yu/mc20-1)
(COMPILE-UNCOMPILED-DEFNS "tmp")
Loading ./yu/tmp.o
Finished loading ./yu/tmp.o
/v/hank/v28/boyer/nqthm-2nd/nqthm-1992/examples/yu/tmp.lisp
(DEFN ROM-ADDRP
(ADDR MEM N)
(PC-READ-MEMP ADDR MEM N))
Note that:
(OR (FALSEP (ROM-ADDRP ADDR MEM N))
(TRUEP (ROM-ADDRP ADDR MEM N)))
is a theorem.
[ 0.0 0.0 0.0 ]
ROM-ADDRP
(DEFN RAM-ADDRP
(ADDR MEM N)
(WRITE-MEMP ADDR MEM N))
Note that:
(OR (FALSEP (RAM-ADDRP ADDR MEM N))
(TRUEP (RAM-ADDRP ADDR MEM N)))
is a theorem.
[ 0.0 0.0 0.0 ]
RAM-ADDRP
(DEFN N-MEMBER
(X LST)
(IF (NLISTP LST)
F
(OR (EQUAL (FIX X) (FIX (CAR LST)))
(N-MEMBER X (CDR LST)))))
Linear arithmetic, the lemmas CDR-LESSEQP and CDR-LESSP, and the
definition of NLISTP can be used to show that the measure (COUNT LST)
decreases according to the well-founded relation LESSP in each recursive call.
Hence, N-MEMBER is accepted under the definitional principle. Observe that:
(OR (FALSEP (N-MEMBER X LST))
(TRUEP (N-MEMBER X LST)))
is a theorem.
[ 0.0 0.0 0.0 ]
N-MEMBER
(DEFN MOD-EQ
(N X Y)
(IF (ZEROP N)
T
(AND (EQUAL (BCAR X) (BCAR Y))
(MOD-EQ (SUB1 N) (BCDR X) (BCDR Y)))))
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, MOD-EQ is accepted under the
principle of definition. From the definition we can conclude that:
(OR (FALSEP (MOD-EQ N X Y))
(TRUEP (MOD-EQ N X Y)))
is a theorem.
[ 0.0 0.0 0.0 ]
MOD-EQ
(DEFN MOD32-EQ
(X Y)
(EQUAL (HEAD X 32) (HEAD Y 32)))
Note that (OR (FALSEP (MOD32-EQ X Y)) (TRUEP (MOD32-EQ X Y))) is a
theorem.
[ 0.0 0.0 0.0 ]
MOD32-EQ
(DEFN NEG (N X) (SUB N X 0))
Observe that (NUMBERP (NEG N X)) is a theorem.
[ 0.0 0.0 0.0 ]
NEG
(DEFN DISJOINT0
(X M Y)
(IF (ZEROP M)
T
(AND (NOT (MOD32-EQ (ADD 32 X (SUB1 M)) Y))
(DISJOINT0 X (SUB1 M) Y))))
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP
establish that the measure (COUNT M) decreases according to the well-founded
relation LESSP in each recursive call. Hence, DISJOINT0 is accepted under the
principle of definition. Note that:
(OR (FALSEP (DISJOINT0 X M Y))
(TRUEP (DISJOINT0 X M Y)))
is a theorem.
[ 0.0 0.0 0.0 ]
DISJOINT0
(DEFN DISJOINT
(X M Y N)
(IF (ZEROP N)
T
(AND (DISJOINT0 X M (ADD 32 Y (SUB1 N)))
(DISJOINT X M Y (SUB1 N)))))
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP
inform us that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, DISJOINT is accepted under the
definitional principle. Observe that:
(OR (FALSEP (DISJOINT X M Y N))
(TRUEP (DISJOINT X M Y N)))
is a theorem.
[ 0.0 0.0 0.0 ]
DISJOINT
(DEFN BIT
(BV)
(IF (NLISTP BV)
(B0)
(IF (B0P (CAR BV)) (B0) (B1))))
Note that (NUMBERP (BIT BV)) is a theorem.
[ 0.0 0.0 0.0 ]
BIT
(DEFN VEC
(BV)
(IF (NLISTP BV) NIL (CDR BV)))
[ 0.0 0.0 0.0 ]
VEC
(DEFN FIX-BV
(BV)
(IF (NLISTP BV)
NIL
(CONS (BIT BV) (FIX-BV (VEC BV)))))
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and
NLISTP inform us that the measure (COUNT BV) decreases according to the
well-founded relation LESSP in each recursive call. Hence, FIX-BV is accepted
under the definitional principle. From the definition we can conclude that:
(OR (LITATOM (FIX-BV BV))
(LISTP (FIX-BV BV)))
is a theorem.
[ 0.0 0.0 0.0 ]
FIX-BV
(DEFN BV-LEN
(BV)
(IF (NLISTP BV)
0
(ADD1 (BV-LEN (VEC BV)))))
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and
NLISTP inform us that the measure (COUNT BV) decreases according to the
well-founded relation LESSP in each recursive call. Hence, BV-LEN is accepted
under the principle of definition. From the definition we can conclude that
(NUMBERP (BV-LEN BV)) is a theorem.
[ 0.0 0.0 0.0 ]
BV-LEN
(DEFN BV-NOT
(BV)
(IF (NLISTP BV)
NIL
(CONS (B-NOT (BIT BV))
(BV-NOT (VEC BV)))))
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and
NLISTP inform us that the measure (COUNT BV) decreases according to the
well-founded relation LESSP in each recursive call. Hence, BV-NOT is accepted
under the definitional principle. Observe that:
(OR (LITATOM (BV-NOT BV))
(LISTP (BV-NOT BV)))
is a theorem.
[ 0.0 0.0 0.0 ]
BV-NOT
(DEFN BV-HEAD
(BV N)
(IF (ZEROP N)
NIL
(CONS (BIT BV)
(BV-HEAD (VEC BV) (SUB1 N)))))
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, BV-HEAD is accepted under the
definitional principle. Note that:
(OR (LITATOM (BV-HEAD BV N))
(LISTP (BV-HEAD BV N)))
is a theorem.
[ 0.0 0.0 0.0 ]
BV-HEAD
(DEFN BV-TAIL
(BV N)
(IF (ZEROP N)
(FIX-BV BV)
(BV-TAIL (VEC BV) (SUB1 N))))
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, BV-TAIL is accepted under the
principle of definition. Observe that:
(OR (LITATOM (BV-TAIL BV N))
(LISTP (BV-TAIL BV N)))
is a theorem.
[ 0.0 0.0 0.0 ]
BV-TAIL
(DEFN BV-BITN
(BV N)
(IF (ZEROP N)
(BIT BV)
(BV-BITN (VEC BV) (SUB1 N))))
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, BV-BITN is accepted under the
principle of definition. Observe that (NUMBERP (BV-BITN BV N)) is a theorem.
[ 0.0 0.0 0.0 ]
BV-BITN
(DEFN BV-MBIT
(BV)
(IF (NLISTP BV)
(B0)
(IF (NLISTP (VEC BV))
(BIT BV)
(BV-MBIT (VEC BV)))))
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and
NLISTP establish that the measure (COUNT BV) decreases according to the
well-founded relation LESSP in each recursive call. Hence, BV-MBIT is
accepted under the definitional principle. Note that (NUMBERP (BV-MBIT BV))
is a theorem.
[ 0.0 0.0 0.0 ]
BV-MBIT
(DEFN BV-ADDER
(C X Y)
(IF (NLISTP X)
NIL
(CONS (B-EOR (B-EOR (BIT X) (BIT Y)) C)
(BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and
NLISTP can be used to establish that the measure (COUNT X) decreases according
to the well-founded relation LESSP in each recursive call. Hence, BV-ADDER is
accepted under the definitional principle. Note that:
(OR (LITATOM (BV-ADDER C X Y))
(LISTP (BV-ADDER C X Y)))
is a theorem.
[ 0.0 0.0 0.0 ]
BV-ADDER
(DEFN BV-TO-NAT
(BV)
(IF (NLISTP BV)
0
(PLUS (BIT BV)
(TIMES 2 (BV-TO-NAT (VEC BV))))))
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and
NLISTP inform us that the measure (COUNT BV) decreases according to the
well-founded relation LESSP in each recursive call. Hence, BV-TO-NAT is
accepted under the principle of definition. Note that
(NUMBERP (BV-TO-NAT BV)) is a theorem.
[ 0.0 0.0 0.0 ]
BV-TO-NAT
(DEFN BV-SIZED-TO-NAT
(BV SIZE)
(IF (ZEROP SIZE)
0
(PLUS (BIT BV)
(TIMES 2
(BV-SIZED-TO-NAT (VEC BV)
(SUB1 SIZE))))))
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP can
be used to show that the measure (COUNT SIZE) decreases according to the
well-founded relation LESSP in each recursive call. Hence, BV-SIZED-TO-NAT is
accepted under the definitional principle. Observe that:
(NUMBERP (BV-SIZED-TO-NAT BV SIZE))
is a theorem.
[ 0.0 0.0 0.0 ]
BV-SIZED-TO-NAT
(DEFN NAT-TO-BV
(N)
(IF (ZEROP N)
NIL
(CONS (REMAINDER N 2)
(NAT-TO-BV (QUOTIENT N 2)))))
Linear arithmetic, the lemmas QUOTIENT-TIMES-LESSP, TIMES-LESSP, and
COUNT-NUMBERP, and the definitions of NUMBERP, EQUAL, and ZEROP can be used to
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, NAT-TO-BV is accepted under the
principle of definition. Note that:
(OR (LITATOM (NAT-TO-BV N))
(LISTP (NAT-TO-BV N)))
is a theorem.
[ 0.0 0.0 0.0 ]
NAT-TO-BV
(DEFN NAT-TO-BV-SIZED
(N SIZE)
(IF (ZEROP SIZE)
NIL
(CONS (REMAINDER N 2)
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 SIZE)))))
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP
establish that the measure (COUNT SIZE) decreases according to the
well-founded relation LESSP in each recursive call. Hence, NAT-TO-BV-SIZED is
accepted under the definitional principle. From the definition we can
conclude that:
(OR (LITATOM (NAT-TO-BV-SIZED N SIZE))
(LISTP (NAT-TO-BV-SIZED N SIZE)))
is a theorem.
[ 0.0 0.0 0.0 ]
NAT-TO-BV-SIZED
(PROVE-LEMMA BV-LEN-LISTP
(REWRITE)
(EQUAL (EQUAL (BV-LEN X) 0)
(NLISTP X)))
This formula simplifies, opening up the definition of NLISTP, to two new
conjectures:
Case 2. (IMPLIES (NOT (EQUAL (BV-LEN X) 0))
(LISTP X)),
which again simplifies, unfolding the definitions of BV-LEN and EQUAL, to:
T.
Case 1. (IMPLIES (EQUAL (BV-LEN X) 0)
(NOT (LISTP X))),
which we will name *1.
Perhaps we can prove it by induction. There is only one plausible
induction. We will induct according to the following scheme:
(AND (IMPLIES (NLISTP X) (p X))
(IMPLIES (AND (NOT (NLISTP X)) (p (VEC X)))
(p X))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
can be used to prove that the measure (COUNT X) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme produces three new formulas:
Case 3. (IMPLIES (AND (NLISTP X) (EQUAL (BV-LEN X) 0))
(NOT (LISTP X))),
which simplifies, opening up NLISTP, to:
T.
Case 2. (IMPLIES (AND (NOT (NLISTP X))
(NOT (EQUAL (BV-LEN (VEC X)) 0))
(EQUAL (BV-LEN X) 0))
(NOT (LISTP X))),
which simplifies, opening up NLISTP and BV-LEN, to:
T.
Case 1. (IMPLIES (AND (NOT (NLISTP X))
(NOT (LISTP (VEC X)))
(EQUAL (BV-LEN X) 0))
(NOT (LISTP X))),
which simplifies, expanding the definitions of NLISTP, VEC, and BV-LEN, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-LEN-LISTP
(PROVE-LEMMA BV-HEAD-LISTP
(REWRITE)
(EQUAL (LISTP (BV-HEAD X N))
(NOT (ZEROP N)))
((EXPAND (BV-HEAD X 1))))
This formula simplifies, opening up the definitions of ZEROP and NOT, to three
new conjectures:
Case 3. (IMPLIES (NOT (NUMBERP N))
(EQUAL (LISTP (BV-HEAD X N)) F)),
which again simplifies, unfolding the definitions of BV-HEAD, LISTP, and
EQUAL, to:
T.
Case 2. (IMPLIES (EQUAL N 0)
(EQUAL (LISTP (BV-HEAD X N)) F)),
which again simplifies, unfolding EQUAL, BV-HEAD, and LISTP, to:
T.
Case 1. (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N))
(EQUAL (LISTP (BV-HEAD X N)) T)),
which again simplifies, clearly, to:
(IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N))
(LISTP (BV-HEAD X N))),
which we will name *1.
Perhaps we can prove it by induction. There is only one plausible
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N))
(p (VEC X) (SUB1 N)))
(p X N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP can be
used to prove that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. Note,
however, the inductive instance chosen for X. The above induction scheme
produces three new formulas:
Case 3. (IMPLIES (AND (ZEROP N)
(NOT (EQUAL N 0))
(NUMBERP N))
(LISTP (BV-HEAD X N))),
which simplifies, expanding the definition of ZEROP, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (SUB1 N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(LISTP (BV-HEAD X N))),
which simplifies, rewriting with SUB1-OF-1, and unfolding the functions
ZEROP, EQUAL, NUMBERP, BV-HEAD, B1, B0P, B0, BIT, VEC, and SUB1, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LISTP (BV-HEAD (VEC X) (SUB1 N)))
(NOT (EQUAL N 0))
(NUMBERP N))
(LISTP (BV-HEAD X N))).
This simplifies, opening up the functions ZEROP, BV-HEAD, B1, B0P, B0, and
BIT, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-HEAD-LISTP
(PROVE-LEMMA BV-ADDER-LISTP
(REWRITE)
(EQUAL (LISTP (BV-ADDER C X Y))
(LISTP X)))
Name the conjecture *1.
Perhaps we can prove it by induction. There is only one plausible
induction. We will induct according to the following scheme:
(AND (IMPLIES (NLISTP X) (p C X Y))
(IMPLIES (AND (NOT (NLISTP X))
(p (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(p C X Y))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
establish that the measure (COUNT X) decreases according to the well-founded
relation LESSP in each induction step of the scheme. Note, however, the
inductive instances chosen for C and Y. The above induction scheme produces
the following two new goals:
Case 2. (IMPLIES (NLISTP X)
(EQUAL (LISTP (BV-ADDER C X Y))
(LISTP X))).
This simplifies, expanding NLISTP, BV-ADDER, LISTP, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (NLISTP X))
(EQUAL (LISTP (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(LISTP (VEC X))))
(EQUAL (LISTP (BV-ADDER C X Y))
(LISTP X))).
This simplifies, unfolding NLISTP, VEC, BV-ADDER, B1, B0P, B0, BIT, B-EOR,
and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-ADDER-LISTP
(PROVE-LEMMA BV-HEAD-LEN
(REWRITE)
(EQUAL (BV-LEN (BV-HEAD X N))
(FIX N)))
This simplifies, unfolding FIX, to two new formulas:
Case 2. (IMPLIES (NOT (NUMBERP N))
(EQUAL (BV-LEN (BV-HEAD X N)) 0)),
which again simplifies, unfolding BV-HEAD, BV-LEN, and EQUAL, to:
T.
Case 1. (IMPLIES (NUMBERP N)
(EQUAL (BV-LEN (BV-HEAD X N)) N)),
which we will name *1.
We will appeal to induction. There is only one plausible induction. We
will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N))
(p (VEC X) (SUB1 N)))
(p X N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP inform us
that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. Note, however, the inductive
instance chosen for X. The above induction scheme generates the following two
new goals:
Case 2. (IMPLIES (AND (ZEROP N) (NUMBERP N))
(EQUAL (BV-LEN (BV-HEAD X N)) N)).
This simplifies, opening up the definitions of ZEROP, NUMBERP, EQUAL,
BV-HEAD, and BV-LEN, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (BV-LEN (BV-HEAD (VEC X) (SUB1 N)))
(SUB1 N))
(NUMBERP N))
(EQUAL (BV-LEN (BV-HEAD X N)) N)).
This simplifies, applying ADD1-SUB1 and CDR-CONS, and expanding ZEROP,
BV-HEAD, B1, B0P, B0, BIT, VEC, and BV-LEN, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-HEAD-LEN
(PROVE-LEMMA NAT-TO-BV-SIZED-LEN
(REWRITE)
(EQUAL (BV-LEN (NAT-TO-BV-SIZED X N))
(FIX N)))
This simplifies, unfolding FIX, to two new formulas:
Case 2. (IMPLIES (NOT (NUMBERP N))
(EQUAL (BV-LEN (NAT-TO-BV-SIZED X N))
0)),
which again simplifies, unfolding NAT-TO-BV-SIZED, BV-LEN, and EQUAL, to:
T.
Case 1. (IMPLIES (NUMBERP N)
(EQUAL (BV-LEN (NAT-TO-BV-SIZED X N))
N)),
which we will name *1.
We will appeal to induction. There is only one plausible induction. We
will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N))
(p (QUOTIENT X 2) (SUB1 N)))
(p X N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP inform us
that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. Note, however, the inductive
instance chosen for X. The above induction scheme generates the following two
new goals:
Case 2. (IMPLIES (AND (ZEROP N) (NUMBERP N))
(EQUAL (BV-LEN (NAT-TO-BV-SIZED X N))
N)).
This simplifies, opening up the definitions of ZEROP, NUMBERP, EQUAL,
NAT-TO-BV-SIZED, and BV-LEN, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (BV-LEN (NAT-TO-BV-SIZED (QUOTIENT X 2)
(SUB1 N)))
(SUB1 N))
(NUMBERP N))
(EQUAL (BV-LEN (NAT-TO-BV-SIZED X N))
N)).
This simplifies, applying ADD1-SUB1 and CDR-CONS, and expanding ZEROP,
NAT-TO-BV-SIZED, VEC, and BV-LEN, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
NAT-TO-BV-SIZED-LEN
(PROVE-LEMMA BV-ADDER-LEN
(REWRITE)
(EQUAL (BV-LEN (BV-ADDER C X Y))
(BV-LEN X)))
Name the conjecture *1.
Perhaps we can prove it by induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (NLISTP X) (p C X Y))
(IMPLIES (AND (NOT (NLISTP X))
(p (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(p C X Y))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
establish that the measure (COUNT X) decreases according to the well-founded
relation LESSP in each induction step of the scheme. Note, however, the
inductive instances chosen for C and Y. The above induction scheme produces
the following two new goals:
Case 2. (IMPLIES (NLISTP X)
(EQUAL (BV-LEN (BV-ADDER C X Y))
(BV-LEN X))).
This simplifies, expanding NLISTP, BV-ADDER, BV-LEN, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (NLISTP X))
(EQUAL (BV-LEN (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-LEN (VEC X))))
(EQUAL (BV-LEN (BV-ADDER C X Y))
(BV-LEN X))).
This simplifies, rewriting with CDR-CONS, and unfolding the definitions of
NLISTP, BV-ADDER, B1, B0P, B0, BIT, B-EOR, VEC, and BV-LEN, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-ADDER-LEN
(PROVE-LEMMA NAT-TO-BV-SIZED-LA0
(REWRITE)
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N (EXP 2 K))
K)
(NAT-TO-BV-SIZED N K)))
.
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace N by:
(PLUS X (TIMES (EXP 2 K) Z))
to eliminate (REMAINDER N (EXP 2 K)) and (QUOTIENT N (EXP 2 K)). We use
REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was introduced
to restrict the new variables. We thus obtain the following four new formulas:
Case 4. (IMPLIES (NOT (NUMBERP N))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N (EXP 2 K))
K)
(NAT-TO-BV-SIZED N K))).
However this simplifies, using linear arithmetic, rewriting with EXP-OF-2-0
and REMAINDER-EXIT, and unfolding EQUAL, to the new formula:
(IMPLIES (NOT (NUMBERP N))
(EQUAL (NAT-TO-BV-SIZED 0 K)
(NAT-TO-BV-SIZED N K))),
which we would normally push and work on later by induction. But if we must
use induction to prove the input conjecture, we prefer to induct on the
original formulation of the problem. Thus we will disregard all that we
have previously done, give the name *1 to the original input, and work on it.
So now let us return to:
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N (EXP 2 K))
K)
(NAT-TO-BV-SIZED N K)).
We named this *1. We will try to prove it by induction. There are four
plausible inductions. They merge into two likely candidate inductions.
However, only one is unflawed. We will induct according to the following
scheme:
(AND (IMPLIES (ZEROP K) (p N K))
(IMPLIES (AND (NOT (ZEROP K))
(p (QUOTIENT N 2) (SUB1 K)))
(p N K))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP establish
that the measure (COUNT K) decreases according to the well-founded relation
LESSP in each induction step of the scheme. Note, however, the inductive
instance chosen for N. The above induction scheme leads to two new goals:
Case 2. (IMPLIES (ZEROP K)
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N (EXP 2 K))
K)
(NAT-TO-BV-SIZED N K))),
which simplifies, rewriting with REMAINDER-1, and opening up the functions
ZEROP, EXP, NAT-TO-BV-SIZED, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP K))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER (QUOTIENT N 2)
(EXP 2 (SUB1 K)))
(SUB1 K))
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N (EXP 2 K))
K)
(NAT-TO-BV-SIZED N K))).
This simplifies, unfolding the functions ZEROP, EXP, and NAT-TO-BV-SIZED, to
the new goal:
(IMPLIES (AND (NOT (EQUAL K 0))
(NUMBERP K)
(EQUAL (NAT-TO-BV-SIZED (REMAINDER (QUOTIENT N 2)
(EXP 2 (SUB1 K)))
(SUB1 K))
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N
(TIMES 2 (EXP 2 (SUB1 K))))
K)
(CONS (REMAINDER N 2)
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace N by
(PLUS Z (TIMES 2 X)) to eliminate (QUOTIENT N 2) and (REMAINDER N 2) and X
by (PLUS V (TIMES (EXP 2 (SUB1 K)) W)) to eliminate:
(REMAINDER X (EXP 2 (SUB1 K)))
and (QUOTIENT X (EXP 2 (SUB1 K))). We use REMAINDER-LESSP, the type
restriction lemma noted when REMAINDER was introduced, and the type
restriction lemma noted when QUOTIENT was introduced to restrict the new
variables. We would thus like to prove the following six new goals:
Case 1.6.
(IMPLIES
(AND (NOT (NUMBERP N))
(NOT (EQUAL K 0))
(NUMBERP K)
(EQUAL (NAT-TO-BV-SIZED (REMAINDER (QUOTIENT N 2)
(EXP 2 (SUB1 K)))
(SUB1 K))
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N
(TIMES 2 (EXP 2 (SUB1 K))))
K)
(CONS (REMAINDER N 2)
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))).
But this further simplifies, using linear arithmetic, rewriting with
QUOTIENT-EXIT, REMAINDER-0, EXP-OF-2-0, and REMAINDER-EXIT, and expanding
the function EQUAL, to:
(IMPLIES (AND (NOT (NUMBERP N))
(NOT (EQUAL K 0))
(NUMBERP K))
(EQUAL (NAT-TO-BV-SIZED 0 K)
(CONS 0
(NAT-TO-BV-SIZED 0 (SUB1 K))))),
which again simplifies, expanding QUOTIENT, REMAINDER, and NAT-TO-BV-SIZED,
to:
T.
Case 1.5.
(IMPLIES
(AND (EQUAL 2 0)
(NOT (EQUAL K 0))
(NUMBERP K)
(EQUAL (NAT-TO-BV-SIZED (REMAINDER (QUOTIENT N 2)
(EXP 2 (SUB1 K)))
(SUB1 K))
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N
(TIMES 2 (EXP 2 (SUB1 K))))
K)
(CONS (REMAINDER N 2)
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))),
which further simplifies, using linear arithmetic, to:
T.
Case 1.4.
(IMPLIES
(AND (NOT (NUMBERP 2))
(NOT (EQUAL K 0))
(NUMBERP K)
(EQUAL (NAT-TO-BV-SIZED (REMAINDER (QUOTIENT N 2)
(EXP 2 (SUB1 K)))
(SUB1 K))
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER N
(TIMES 2 (EXP 2 (SUB1 K))))
K)
(CONS (REMAINDER N 2)
(NAT-TO-BV-SIZED (QUOTIENT N 2)
(SUB1 K))))),
which further simplifies, obviously, to:
T.
Case 1.3.
(IMPLIES
(AND (EQUAL (EXP 2 (SUB1 K)) 0)
(NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z 2) (NOT (ZEROP 2)))
(NOT (EQUAL 2 0))
(NOT (EQUAL K 0))
(NUMBERP K)
(EQUAL (NAT-TO-BV-SIZED (REMAINDER X (EXP 2 (SUB1 K)))
(SUB1 K))
(NAT-TO-BV-SIZED X (SUB1 K))))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER (PLUS Z (TIMES 2 X))
(TIMES 2 (EXP 2 (SUB1 K))))
K)
(CONS Z
(NAT-TO-BV-SIZED X (SUB1 K))))).
But this further simplifies, using linear arithmetic and applying the
lemma EXP-OF-2-0, to:
T.
Case 1.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 (SUB1 K))))
(NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z 2) (NOT (ZEROP 2)))
(NOT (EQUAL 2 0))
(NOT (EQUAL K 0))
(NUMBERP K)
(EQUAL (NAT-TO-BV-SIZED (REMAINDER X (EXP 2 (SUB1 K)))
(SUB1 K))
(NAT-TO-BV-SIZED X (SUB1 K))))
(EQUAL (NAT-TO-BV-SIZED (REMAINDER (PLUS Z (TIMES 2 X))
(TIMES 2 (EXP 2 (SUB1 K))))
K)
(CONS Z
(NAT-TO-BV-SIZED X (SUB1 K))))),
which further simplifies, trivially, to:
T.
Case 1.1.
(IMPLIES
(AND (NUMBERP V)
(EQUAL (LESSP V (EXP 2 (SUB1 K)))
(NOT (ZEROP (EXP 2 (SUB1 K)))))
(NUMBERP W)
(NOT (EQUAL (EXP 2 (SUB1 K)) 0))
(NUMBERP Z)
(EQUAL (LESSP Z 2) (NOT (ZEROP 2)))
(NOT (EQUAL 2 0))
(NOT (EQUAL K 0))
(NUMBERP K)
(EQUAL (NAT-TO-BV-SIZED V (SUB1 K))
(NAT-TO-BV-SIZED (PLUS V (TIMES (EXP 2 (SUB1 K)) W))
(SUB1 K))))
(EQUAL
(NAT-TO-BV-SIZED
(REMAINDER (PLUS Z
(TIMES 2
(PLUS V (TIMES (EXP 2 (SUB1 K)) W))))
(TIMES 2 (EXP 2 (SUB1 K))))
K)
(CONS Z
(NAT-TO-BV-SIZED (PLUS V (TIMES (EXP 2 (SUB1 K)) W))
(SUB1 K))))).
This further simplifies, appealing to the lemmas LESSP-OF-1, SUB1-OF-1,
TIMES-COMMUTATIVITY, REMAINDER-0, REMAINDER-EXIT, REMAINDER-PLUS-TIMES2,
TIMES-DISTRIBUTES-REMAINDER, REMAINDER-PLUS2, QUOTIENT-TIMES,
REMAINDER-TIMES, PLUS-ADD1, REMAINDER-DISTRIBUTES-TIMES2-ADD1,
QUOTIENT-ADD1, and REMAINDER-ADD1, and unfolding ZEROP, NOT, SUB1, NUMBERP,
EQUAL, LESSP, NAT-TO-BV-SIZED, and ADD1, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.7 0.1 ]
NAT-TO-BV-SIZED-LA0
(PROVE-LEMMA NAT-TO-BV-SIZED-HEAD
(REWRITE)
(EQUAL (NAT-TO-BV-SIZED M N)
(BV-HEAD (NAT-TO-BV M) N)))
WARNING: the newly proposed lemma, NAT-TO-BV-SIZED-HEAD, could be applied
whenever the previously added lemma NAT-TO-BV-SIZED-LA0 could.
Name the conjecture *1.
Perhaps we can prove it by induction. There are three plausible
inductions. However, they merge into one likely candidate induction. We will
induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p M N))
(IMPLIES (AND (NOT (ZEROP N))
(p (QUOTIENT M 2) (SUB1 N)))
(p M N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP establish
that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. Note, however, the inductive
instance chosen for M. The above induction scheme produces the following two
new goals:
Case 2. (IMPLIES (ZEROP N)
(EQUAL (NAT-TO-BV-SIZED M N)
(BV-HEAD (NAT-TO-BV M) N))).
This simplifies, expanding ZEROP, EQUAL, NAT-TO-BV-SIZED, NAT-TO-BV, and
BV-HEAD, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N))
(BV-HEAD (NAT-TO-BV (QUOTIENT M 2))
(SUB1 N))))
(EQUAL (NAT-TO-BV-SIZED M N)
(BV-HEAD (NAT-TO-BV M) N))).
This simplifies, unfolding ZEROP, NAT-TO-BV-SIZED, and NAT-TO-BV, to the
following three new conjectures:
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N))
(BV-HEAD (NAT-TO-BV (QUOTIENT M 2))
(SUB1 N)))
(NOT (EQUAL M 0))
(NUMBERP M))
(EQUAL (CONS (REMAINDER M 2)
(NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N)))
(BV-HEAD (CONS (REMAINDER M 2)
(NAT-TO-BV (QUOTIENT M 2)))
N))).
However this again simplifies, applying CDR-CONS, CAR-CONS, and CONS-EQUAL,
and unfolding the functions VEC, BIT, B0, B0P, B1, and BV-HEAD, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N))
(BV-HEAD (NAT-TO-BV (QUOTIENT M 2))
(SUB1 N)))
(NOT (EQUAL M 0))
(NUMBERP M)
(NOT (EQUAL (REMAINDER M 2) 0)))
(EQUAL (REMAINDER M 2) 1)),
which again simplifies, using linear arithmetic and applying
REMAINDER-WRT-2, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N))
(BV-HEAD (NAT-TO-BV (QUOTIENT M 2))
(SUB1 N)))
(EQUAL M 0))
(EQUAL (CONS (REMAINDER M 2)
(NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N)))
(BV-HEAD NIL N))).
But this again simplifies, unfolding the functions QUOTIENT, NAT-TO-BV,
REMAINDER, VEC, BIT, and BV-HEAD, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N))
(BV-HEAD (NAT-TO-BV (QUOTIENT M 2))
(SUB1 N)))
(NOT (NUMBERP M)))
(EQUAL (CONS (REMAINDER M 2)
(NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N)))
(BV-HEAD NIL N))),
which again simplifies, using linear arithmetic and applying
REMAINDER-EXIT, to the new formula:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N))
(BV-HEAD (NAT-TO-BV (QUOTIENT M 2))
(SUB1 N)))
(NOT (NUMBERP M)))
(EQUAL (CONS 0
(NAT-TO-BV-SIZED (QUOTIENT M 2)
(SUB1 N)))
(BV-HEAD NIL N))),
which further simplifies, using linear arithmetic, applying QUOTIENT-EXIT,
and unfolding the definitions of NAT-TO-BV, VEC, BIT, and BV-HEAD, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
NAT-TO-BV-SIZED-HEAD
(PROVE-LEMMA BV-SIZED-TO-NAT-HEAD
(REWRITE)
(EQUAL (BV-SIZED-TO-NAT X N)
(BV-TO-NAT (BV-HEAD X N))))
Name the conjecture *1.
Perhaps we can prove it by induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N))
(p (VEC X) (SUB1 N)))
(p X N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP establish
that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. Note, however, the inductive
instance chosen for X. The above induction scheme produces the following two
new goals:
Case 2. (IMPLIES (ZEROP N)
(EQUAL (BV-SIZED-TO-NAT X N)
(BV-TO-NAT (BV-HEAD X N)))).
This simplifies, expanding ZEROP, EQUAL, BV-SIZED-TO-NAT, BV-HEAD, and
BV-TO-NAT, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (BV-SIZED-TO-NAT (VEC X) (SUB1 N))
(BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))))
(EQUAL (BV-SIZED-TO-NAT X N)
(BV-TO-NAT (BV-HEAD X N)))).
This simplifies, rewriting with PLUS-COMMUTATIVITY, CDR-CONS, CAR-CONS, and
CORRECTNESS-OF-CANCEL-EQUAL-PLUS, and unfolding the definitions of ZEROP,
BV-SIZED-TO-NAT, B1, B0P, B0, BIT, BV-HEAD, VEC, BV-TO-NAT, and FIX, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-SIZED-TO-NAT-HEAD
(PROVE-LEMMA BV-TO-NAT-TO-BV
(REWRITE)
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT X)) N)
(BV-HEAD X N))
((DISABLE PLUS-ADD1)))
Name the conjecture *1.
We will appeal to induction. The recursive terms in the conjecture
suggest three inductions. However, they merge into one likely candidate
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N))
(p (VEC X) (SUB1 N)))
(p X N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP inform us
that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. Note, however, the inductive
instance chosen for X. The above induction scheme produces the following two
new formulas:
Case 2. (IMPLIES (ZEROP N)
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT X)) N)
(BV-HEAD X N))).
This simplifies, applying PLUS-COMMUTATIVITY, and expanding ZEROP, BV-TO-NAT,
B1, B0P, B0, BIT, EQUAL, and BV-HEAD, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT (VEC X)))
(SUB1 N))
(BV-HEAD (VEC X) (SUB1 N))))
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT X)) N)
(BV-HEAD X N))),
which simplifies, applying PLUS-COMMUTATIVITY, and expanding the functions
ZEROP, BV-TO-NAT, B1, B0P, B0, BIT, and BV-HEAD, to the following three new
goals:
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT (VEC X)))
(SUB1 N))
(BV-HEAD (VEC X) (SUB1 N)))
(NOT (LISTP X)))
(EQUAL (BV-HEAD (NAT-TO-BV 0) N)
(CONS 0 (BV-HEAD (VEC X) (SUB1 N))))).
But this again simplifies, opening up the definition of NAT-TO-BV, to the
formula:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT (VEC X)))
(SUB1 N))
(BV-HEAD (VEC X) (SUB1 N)))
(NOT (LISTP X)))
(EQUAL (BV-HEAD NIL N)
(CONS 0 (BV-HEAD (VEC X) (SUB1 N))))).
However this further simplifies, unfolding VEC, BV-TO-NAT, and NAT-TO-BV,
to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LISTP X)))
(EQUAL (BV-HEAD NIL N)
(CONS 0 (BV-HEAD NIL (SUB1 N))))).
This again simplifies, expanding the functions VEC, BIT, and BV-HEAD, to:
T.
Case 1.2.
(IMPLIES
(AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT (VEC X)))
(SUB1 N))
(BV-HEAD (VEC X) (SUB1 N)))
(LISTP X)
(EQUAL (CAR X) 0))
(EQUAL (BV-HEAD (NAT-TO-BV (PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
0))
N)
(CONS 0 (BV-HEAD (VEC X) (SUB1 N))))),
which again simplifies, rewriting with PLUS-COMMUTATIVITY, QUOTIENT-TIMES,
REMAINDER-TIMES, and TIMES-EQUAL-0, and opening up the definitions of
EQUAL, PLUS, NUMBERP, and NAT-TO-BV, to the following two new goals:
Case 1.2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT (VEC X)))
(SUB1 N))
(BV-HEAD (VEC X) (SUB1 N)))
(LISTP X)
(EQUAL (CAR X) 0)
(NOT (EQUAL (BV-TO-NAT (VEC X)) 0)))
(EQUAL (BV-HEAD (CONS 0
(NAT-TO-BV (BV-TO-NAT (VEC X))))
N)
(CONS 0 (BV-HEAD (VEC X) (SUB1 N))))).
This again simplifies, rewriting with CDR-CONS and CAR-CONS, and opening
up the functions VEC, BIT, B0P, B0, and BV-HEAD, to:
T.
Case 1.2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT (VEC X)))
(SUB1 N))
(BV-HEAD (VEC X) (SUB1 N)))
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (BV-TO-NAT (VEC X)) 0))
(EQUAL (BV-HEAD NIL N)
(CONS 0 (BV-HEAD (VEC X) (SUB1 N))))).
But this again simplifies, opening up the function NAT-TO-BV, to the
goal:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-HEAD NIL (SUB1 N))
(BV-HEAD (VEC X) (SUB1 N)))
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (BV-TO-NAT (VEC X)) 0))
(EQUAL (BV-HEAD NIL N)
(CONS 0 (BV-HEAD NIL (SUB1 N))))).
But this again simplifies, expanding VEC, BIT, and BV-HEAD, to:
T.
Case 1.1.
(IMPLIES
(AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-HEAD (NAT-TO-BV (BV-TO-NAT (VEC X)))
(SUB1 N))
(BV-HEAD (VEC X) (SUB1 N)))
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-HEAD (NAT-TO-BV (PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
1))
N)
(CONS 1 (BV-HEAD (VEC X) (SUB1 N))))),
which again simplifies, applying the lemmas PLUS-COMMUTATIVITY,
QUOTIENT-PLUS-TIMES1, REMAINDER-PLUS-TIMES1, PLUS-EQUAL-0, CDR-CONS, and
CAR-CONS, and unfolding the definitions of PLUS, QUOTIENT, REMAINDER,
NUMBERP, EQUAL, NAT-TO-BV, VEC, BIT, B0P, B1, and BV-HEAD, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.0 ]
BV-TO-NAT-TO-BV
(PROVE-LEMMA NAT-TO-BV-TO-NAT
(REWRITE)
(EQUAL (BV-TO-NAT (NAT-TO-BV N))
(FIX N)))
This formula simplifies, unfolding the definition of FIX, to the following two
new goals:
Case 2. (IMPLIES (NOT (NUMBERP N))
(EQUAL (BV-TO-NAT (NAT-TO-BV N)) 0)).
This again simplifies, unfolding the definitions of NAT-TO-BV, BV-TO-NAT,
and EQUAL, to:
T.
Case 1. (IMPLIES (NUMBERP N)
(EQUAL (BV-TO-NAT (NAT-TO-BV N)) N)),
which we will name *1.
Perhaps we can prove it by induction. There is only one plausible
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N))
(IMPLIES (AND (NOT (ZEROP N))
(p (QUOTIENT N 2)))
(p N))).
Linear arithmetic, the lemmas QUOTIENT-TIMES-LESSP, TIMES-LESSP, and
COUNT-NUMBERP, and the definitions of NUMBERP, EQUAL, and ZEROP inform us that
the measure (COUNT N) decreases according to the well-founded relation LESSP
in each induction step of the scheme. The above induction scheme leads to the
following two new formulas:
Case 2. (IMPLIES (AND (ZEROP N) (NUMBERP N))
(EQUAL (BV-TO-NAT (NAT-TO-BV N)) N)).
This simplifies, unfolding the definitions of ZEROP, NUMBERP, NAT-TO-BV,
BV-TO-NAT, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N))
(EQUAL (BV-TO-NAT (NAT-TO-BV N)) N)).
This simplifies, rewriting with the lemmas PLUS-COMMUTATIVITY, CDR-CONS, and
CAR-CONS, and opening up the functions ZEROP, NAT-TO-BV, VEC, BIT, B0, B0P,
B1, and BV-TO-NAT, to the following two new formulas:
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N)
(NOT (EQUAL (REMAINDER N 2) 0)))
(EQUAL (PLUS (TIMES 2 (QUOTIENT N 2)) 1)
N)).
However this again simplifies, using linear arithmetic and rewriting with
REMAINDER-WRT-2, to the new conjecture:
(IMPLIES (AND (EQUAL (REMAINDER N 2) 1)
(NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N)
(NOT (EQUAL 1 0)))
(EQUAL (PLUS (TIMES 2 (QUOTIENT N 2)) 1)
N)),
which again simplifies, rewriting with PLUS-ADD1 and PLUS-COMMUTATIVITY,
and unfolding EQUAL, to the new goal:
(IMPLIES (AND (EQUAL (REMAINDER N 2) 1)
(NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N))
(EQUAL (ADD1 (TIMES 2 (QUOTIENT N 2)))
N)).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace N by
(PLUS X (TIMES 2 Z)) to eliminate (REMAINDER N 2) and (QUOTIENT N 2). We
use REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. This produces the following
three new formulas:
Case 1.2.3.
(IMPLIES (AND (EQUAL 2 0)
(EQUAL (REMAINDER N 2) 1)
(NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N))
(EQUAL (ADD1 (TIMES 2 (QUOTIENT N 2)))
N)).
However this further simplifies, using linear arithmetic, to:
T.
Case 1.2.2.
(IMPLIES (AND (NOT (NUMBERP 2))
(EQUAL (REMAINDER N 2) 1)
(NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N))
(EQUAL (ADD1 (TIMES 2 (QUOTIENT N 2)))
N)),
which further simplifies, trivially, to:
T.
Case 1.2.1.
(IMPLIES (AND (NUMBERP X)
(EQUAL (LESSP X 2) (NOT (ZEROP 2)))
(NUMBERP Z)
(NOT (EQUAL 2 0))
(EQUAL X 1)
(NOT (EQUAL (PLUS X (TIMES 2 Z)) 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV Z)) Z))
(EQUAL (ADD1 (TIMES 2 Z))
(PLUS X (TIMES 2 Z)))).
But this further simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N)
(EQUAL (REMAINDER N 2) 0))
(EQUAL (PLUS (TIMES 2 (QUOTIENT N 2)) 0)
N)),
which again simplifies, rewriting with PLUS-COMMUTATIVITY, and opening up
the definitions of EQUAL and PLUS, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N)
(EQUAL (REMAINDER N 2) 0))
(EQUAL (TIMES 2 (QUOTIENT N 2)) N)).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace N by
(PLUS Z (TIMES 2 X)) to eliminate (QUOTIENT N 2) and (REMAINDER N 2). We
employ REMAINDER-LESSP, the type restriction lemma noted when QUOTIENT was
introduced, and the type restriction lemma noted when REMAINDER was
introduced to restrict the new variables. This produces the following
three new formulas:
Case 1.1.3.
(IMPLIES (AND (EQUAL 2 0)
(NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N)
(EQUAL (REMAINDER N 2) 0))
(EQUAL (TIMES 2 (QUOTIENT N 2)) N)).
However this further simplifies, using linear arithmetic, to:
T.
Case 1.1.2.
(IMPLIES (AND (NOT (NUMBERP 2))
(NOT (EQUAL N 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV (QUOTIENT N 2)))
(QUOTIENT N 2))
(NUMBERP N)
(EQUAL (REMAINDER N 2) 0))
(EQUAL (TIMES 2 (QUOTIENT N 2)) N)),
which further simplifies, clearly, to:
T.
Case 1.1.1.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z 2) (NOT (ZEROP 2)))
(NOT (EQUAL 2 0))
(NOT (EQUAL (PLUS Z (TIMES 2 X)) 0))
(EQUAL (BV-TO-NAT (NAT-TO-BV X)) X)
(EQUAL Z 0))
(EQUAL (TIMES 2 X)
(PLUS Z (TIMES 2 X)))).
But this further simplifies, using linear arithmetic, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.5 0.0 ]
NAT-TO-BV-TO-NAT
(PROVE-LEMMA BV-HEAD-NAT
(REWRITE)
(EQUAL (BV-TO-NAT (BV-HEAD X N))
(IF (LESSP (BV-TO-NAT X) (EXP 2 N))
(BV-TO-NAT X)
(REMAINDER (BV-TO-NAT X) (EXP 2 N)))))
This formula simplifies, obviously, to the following two new goals:
Case 2. (IMPLIES (NOT (LESSP (BV-TO-NAT X) (EXP 2 N)))
(EQUAL (BV-TO-NAT (BV-HEAD X N))
(REMAINDER (BV-TO-NAT X) (EXP 2 N)))).
Give the above formula the name *1.
Case 1. (IMPLIES (LESSP (BV-TO-NAT X) (EXP 2 N))
(EQUAL (BV-TO-NAT (BV-HEAD X N))
(BV-TO-NAT X))),
which we would usually push and work on later by induction. But if we must
use induction to prove the input conjecture, we prefer to induct on the
original formulation of the problem. Thus we will disregard all that we
have previously done, give the name *1 to the original input, and work on it.
So now let us consider:
(EQUAL (BV-TO-NAT (BV-HEAD X N))
(IF (LESSP (BV-TO-NAT X) (EXP 2 N))
(BV-TO-NAT X)
(REMAINDER (BV-TO-NAT X) (EXP 2 N)))),
which we named *1 above. We will appeal to induction. The recursive terms in
the conjecture suggest six inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N))
(p (VEC X) (SUB1 N)))
(p X N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP can be
used to prove that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. Note,
however, the inductive instance chosen for X. The above induction scheme
produces two new conjectures:
Case 2. (IMPLIES (ZEROP N)
(EQUAL (BV-TO-NAT (BV-HEAD X N))
(IF (LESSP (BV-TO-NAT X) (EXP 2 N))
(BV-TO-NAT X)
(REMAINDER (BV-TO-NAT X)
(EXP 2 N))))),
which simplifies, appealing to the lemmas PLUS-COMMUTATIVITY, LESSP-OF-1,
and REMAINDER-1, and opening up the functions ZEROP, EQUAL, BV-HEAD,
BV-TO-NAT, B1, B0P, B0, BIT, and EXP, to four new conjectures:
Case 2.4.
(IMPLIES (AND (EQUAL N 0)
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(EQUAL (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
0))
(EQUAL 0
(PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
1))),
which again simplifies, trivially, to:
T.
Case 2.3.
(IMPLIES (AND (EQUAL N 0)
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
0))
(EQUAL 0
(PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
0))).
This again simplifies, obviously, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (NUMBERP N))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(EQUAL (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
0))
(EQUAL 0
(PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
1))).
This again simplifies, clearly, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (NUMBERP N))
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
0))
(EQUAL 0
(PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
0))).
This again simplifies, clearly, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(IF (LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
(BV-TO-NAT (VEC X))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))))
(EQUAL (BV-TO-NAT (BV-HEAD X N))
(IF (LESSP (BV-TO-NAT X) (EXP 2 N))
(BV-TO-NAT X)
(REMAINDER (BV-TO-NAT X)
(EXP 2 N))))).
This simplifies, applying PLUS-COMMUTATIVITY, CDR-CONS, and CAR-CONS, and
expanding the definitions of ZEROP, BV-HEAD, B1, B0P, B0, BIT, VEC,
BV-TO-NAT, and EXP, to ten new conjectures:
Case 1.10.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (LESSP (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (TIMES 2
(BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N))))
1)
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, applying PLUS-ADD1, PLUS-COMMUTATIVITY,
TIMES2-ADD1-LESSP-CANCEL, and REMAINDER-DISTRIBUTES-TIMES2-ADD1, to:
T.
Case 1.9.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(LESSP (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (PLUS (TIMES 2
(BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N))))
1)
(PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
1))).
But this again simplifies, using linear arithmetic, to:
T.
Case 1.8.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(LISTP X)
(EQUAL (CAR X) 0)
(NOT (LESSP (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (TIMES 2
(BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N))))
0)
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, rewriting with PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-LESSP-TIMES, and TIMES-DISTRIBUTES-REMAINDER, and
opening up the functions EQUAL, PLUS, ZEROP, NOT, FIX, and AND, to:
T.
Case 1.7.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(LISTP X)
(EQUAL (CAR X) 0)
(LESSP (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (PLUS (TIMES 2
(BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N))))
0)
(PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
0))).
But this again simplifies, using linear arithmetic, to:
T.
Case 1.6.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(NOT (LISTP X))
(NOT (LESSP 0 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (TIMES 2
(BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N))))
0)
(REMAINDER 0
(TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, rewriting with the lemma
EXP-OF-2-0, and unfolding EQUAL, to:
T.
Case 1.5.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(NOT (LISTP X))
(LESSP 0 (TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (PLUS (TIMES 2
(BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N))))
0)
0)),
which again simplifies, using linear arithmetic, applying TIMES-LESSP,
PLUS-COMMUTATIVITY, and TIMES-EQUAL-0, and unfolding EQUAL, NUMBERP, and
PLUS, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N))))
(NOT (LISTP X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
0)),
which further simplifies, opening up the definitions of VEC, BV-TO-NAT,
EQUAL, and LESSP, to:
T.
Case 1.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(BV-TO-NAT (VEC X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (LESSP (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(BV-TO-NAT (VEC X)))
(LISTP X)
(EQUAL (CAR X) 0)
(NOT (LESSP (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(BV-TO-NAT (VEC X)))
(NOT (LISTP X))
(NOT (LESSP 0 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(REMAINDER 0
(TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(BV-TO-NAT (VEC X)))
(NOT (LISTP X))
(LESSP 0 (TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
0)),
which again simplifies, using linear arithmetic, applying TIMES-LESSP,
PLUS-COMMUTATIVITY, and TIMES-EQUAL-0, and opening up EQUAL, NUMBERP, and
PLUS, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
(EQUAL (BV-TO-NAT (BV-HEAD (VEC X) (SUB1 N)))
(BV-TO-NAT (VEC X)))
(NOT (LISTP X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (BV-TO-NAT (VEC X)) 0)),
which further simplifies, opening up the functions VEC, BV-TO-NAT, EQUAL,
and LESSP, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.3 0.0 ]
BV-HEAD-NAT
(PROVE-LEMMA BV-TO-NAT-TO-BV-SIZED
(REWRITE)
(EQUAL (NAT-TO-BV-SIZED (BV-TO-NAT X) N)
(BV-HEAD X N)))
WARNING: the previously added lemma, NAT-TO-BV-SIZED-HEAD, could be applied
whenever the newly proposed BV-TO-NAT-TO-BV-SIZED could!
This formula can be simplified, using the abbreviations BV-TO-NAT-TO-BV and
NAT-TO-BV-SIZED-HEAD, to the new conjecture:
(EQUAL (BV-HEAD X N) (BV-HEAD X N)),
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
BV-TO-NAT-TO-BV-SIZED
(PROVE-LEMMA NAT-TO-BV-SIZED-TO-NAT
(REWRITE)
(EQUAL (BV-TO-NAT (NAT-TO-BV-SIZED M N))
(IF (LESSP M (EXP 2 N))
(FIX M)
(REMAINDER M (EXP 2 N)))))
This conjecture can be simplified, using the abbreviation NAT-TO-BV-SIZED-HEAD,
to the formula:
(EQUAL (BV-TO-NAT (BV-HEAD (NAT-TO-BV M) N))
(IF (LESSP M (EXP 2 N))
(FIX M)
(REMAINDER M (EXP 2 N)))).
This simplifies, rewriting with NAT-TO-BV-TO-NAT and BV-HEAD-NAT, and
expanding the function FIX, to three new conjectures:
Case 3. (IMPLIES (AND (NOT (LESSP M (EXP 2 N)))
(NOT (NUMBERP M))
(NOT (LESSP 0 (EXP 2 N))))
(EQUAL (REMAINDER 0 (EXP 2 N))
(REMAINDER M (EXP 2 N)))),
which again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and opening up the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (LESSP M (EXP 2 N)))
(NOT (NUMBERP M))
(LESSP 0 (EXP 2 N)))
(EQUAL 0 (REMAINDER M (EXP 2 N)))).
However this again simplifies, unfolding the definition of LESSP, to:
T.
Case 1. (IMPLIES (AND (LESSP M (EXP 2 N))
(NOT (NUMBERP M))
(NOT (LESSP 0 (EXP 2 N))))
(EQUAL (REMAINDER 0 (EXP 2 N)) 0)),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
NAT-TO-BV-SIZED-TO-NAT
(PROVE-LEMMA BV-SIZED-TO-NAT-TO-BV-SIZED
(REWRITE)
(EQUAL (NAT-TO-BV-SIZED (BV-SIZED-TO-NAT X N)
N)
(BV-HEAD X N)))
WARNING: the previously added lemma, NAT-TO-BV-SIZED-HEAD, could be applied
whenever the newly proposed BV-SIZED-TO-NAT-TO-BV-SIZED could!
This conjecture can be simplified, using the abbreviations
BV-TO-NAT-TO-BV-SIZED and BV-SIZED-TO-NAT-HEAD, to the conjecture:
(EQUAL (BV-HEAD (BV-HEAD X N) N)
(BV-HEAD X N)).
Give the above formula the name *1.
Perhaps we can prove it by induction. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N))
(p (VEC X) (SUB1 N)))
(p X N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP establish
that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. Note, however, the inductive
instance chosen for X. The above induction scheme generates the following two
new formulas:
Case 2. (IMPLIES (ZEROP N)
(EQUAL (BV-HEAD (BV-HEAD X N) N)
(BV-HEAD X N))).
This simplifies, opening up the definitions of ZEROP, EQUAL, and BV-HEAD, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (BV-HEAD (BV-HEAD (VEC X) (SUB1 N))
(SUB1 N))
(BV-HEAD (VEC X) (SUB1 N))))
(EQUAL (BV-HEAD (BV-HEAD X N) N)
(BV-HEAD X N))).
This simplifies, applying CDR-CONS, CAR-CONS, and CONS-EQUAL, and opening up
ZEROP, BV-HEAD, B1, B0P, B0, BIT, and VEC, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-SIZED-TO-NAT-TO-BV-SIZED
(PROVE-LEMMA NAT-TO-BV-SIZED-SIZED-TO-NAT
(REWRITE)
(EQUAL (BV-SIZED-TO-NAT (NAT-TO-BV-SIZED M N)
N)
(IF (LESSP M (EXP 2 N))
(FIX M)
(REMAINDER M (EXP 2 N)))))
WARNING: the previously added lemma, BV-SIZED-TO-NAT-HEAD, could be applied
whenever the newly proposed NAT-TO-BV-SIZED-SIZED-TO-NAT could!
This formula can be simplified, using the abbreviations BV-SIZED-TO-NAT-HEAD
and NAT-TO-BV-SIZED-HEAD, to the new formula:
(EQUAL (BV-TO-NAT (BV-HEAD (BV-HEAD (NAT-TO-BV M) N) N))
(IF (LESSP M (EXP 2 N))
(FIX M)
(REMAINDER M (EXP 2 N)))),
which simplifies, rewriting with NAT-TO-BV-TO-NAT and BV-HEAD-NAT, and
expanding FIX, to the following six new formulas:
Case 6. (IMPLIES (AND (NOT (LESSP M (EXP 2 N)))
(NOT (NUMBERP M))
(LESSP 0 (EXP 2 N)))
(EQUAL 0 (REMAINDER M (EXP 2 N)))).
This again simplifies, unfolding the definition of LESSP, to:
T.
Case 5. (IMPLIES (AND (NOT (LESSP M (EXP 2 N)))
(NOT (NUMBERP M))
(NOT (LESSP 0 (EXP 2 N)))
(NOT (LESSP (REMAINDER 0 (EXP 2 N))
(EXP 2 N))))
(EQUAL (REMAINDER (REMAINDER 0 (EXP 2 N))
(EXP 2 N))
(REMAINDER M (EXP 2 N)))),
which again simplifies, using linear arithmetic, rewriting with the lemma
EXP-OF-2-0, and unfolding EQUAL, to:
T.
Case 4. (IMPLIES (AND (NOT (LESSP M (EXP 2 N)))
(NOT (NUMBERP M))
(NOT (LESSP 0 (EXP 2 N)))
(LESSP (REMAINDER 0 (EXP 2 N))
(EXP 2 N)))
(EQUAL (REMAINDER 0 (EXP 2 N))
(REMAINDER M (EXP 2 N)))),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NOT (LESSP M (EXP 2 N)))
(NUMBERP M)
(NOT (LESSP (REMAINDER M (EXP 2 N))
(EXP 2 N))))
(EQUAL (REMAINDER (REMAINDER M (EXP 2 N))
(EXP 2 N))
(REMAINDER M (EXP 2 N)))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and opening up EQUAL, to:
T.
Case 2. (IMPLIES (AND (LESSP M (EXP 2 N))
(NOT (NUMBERP M))
(NOT (LESSP 0 (EXP 2 N)))
(NOT (LESSP (REMAINDER 0 (EXP 2 N))
(EXP 2 N))))
(EQUAL (REMAINDER (REMAINDER 0 (EXP 2 N))
(EXP 2 N))
0)).
This again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (LESSP M (EXP 2 N))
(NOT (NUMBERP M))
(NOT (LESSP 0 (EXP 2 N)))
(LESSP (REMAINDER 0 (EXP 2 N))
(EXP 2 N)))
(EQUAL (REMAINDER 0 (EXP 2 N)) 0)),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
NAT-TO-BV-SIZED-SIZED-TO-NAT
(DISABLE BV-SIZED-TO-NAT-HEAD)
[ 0.0 0.0 0.0 ]
BV-SIZED-TO-NAT-HEAD-OFF
(DISABLE NAT-TO-BV-SIZED-HEAD)
[ 0.0 0.0 0.0 ]
NAT-TO-BV-SIZED-HEAD-OFF
(PROVE-LEMMA BV-BITN-NOT
(REWRITE)
(EQUAL (BV-BITN (BV-NOT X) I)
(IF (LESSP I (BV-LEN X))
(B-NOT (BV-BITN X I))
(B0))))
This formula can be simplified, using the abbreviation B0, to the new
conjecture:
(EQUAL (BV-BITN (BV-NOT X) I)
(IF (LESSP I (BV-LEN X))
(B-NOT (BV-BITN X I))
0)),
which simplifies, expanding B1, B0P, B0, and B-NOT, to three new goals:
Case 3. (IMPLIES (NOT (EQUAL (BV-BITN X I) 0))
(EQUAL (BV-BITN (BV-NOT X) I) 0)),
which we will name *1.
Case 2. (IMPLIES (NOT (LESSP I (BV-LEN X)))
(EQUAL (BV-BITN (BV-NOT X) I) 0)),
which we would usually push and work on later by induction. But if we must
use induction to prove the input conjecture, we prefer to induct on the
original formulation of the problem. Thus we will disregard all that we
have previously done, give the name *1 to the original input, and work on it.
So now let us consider:
(EQUAL (BV-BITN (BV-NOT X) I)
(IF (LESSP I (BV-LEN X))
(B-NOT (BV-BITN X I))
(B0))),
which we named *1 above. We will appeal to induction. Five inductions are
suggested by terms in the conjecture. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP I) (p X I))
(IMPLIES (AND (NOT (ZEROP I))
(p (VEC X) (SUB1 I)))
(p X I))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP establish
that the measure (COUNT I) decreases according to the well-founded relation
LESSP in each induction step of the scheme. Note, however, the inductive
instance chosen for X. The above induction scheme produces the following two
new conjectures:
Case 2. (IMPLIES (ZEROP I)
(EQUAL (BV-BITN (BV-NOT X) I)
(IF (LESSP I (BV-LEN X))
(B-NOT (BV-BITN X I))
(B0)))).
This simplifies, opening up ZEROP, BV-NOT, B1, B0P, B0, BIT, B-NOT, EQUAL,
BV-BITN, BV-LEN, and LESSP, to the following six new conjectures:
Case 2.6.
(IMPLIES (AND (EQUAL I 0)
(LISTP X)
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(EQUAL (CAR X) 0))
(EQUAL (CAR (CONS 1 (BV-NOT (VEC X))))
0)).
This again simplifies, using linear arithmetic, to:
T.
Case 2.5.
(IMPLIES (AND (EQUAL I 0)
(LISTP X)
(NOT (EQUAL (ADD1 (BV-LEN (VEC X))) 0))
(EQUAL (CAR X) 0))
(NOT (EQUAL (CAR (CONS 1 (BV-NOT (VEC X))))
0))),
which again simplifies, applying CAR-CONS, and expanding EQUAL, to:
T.
Case 2.4.
(IMPLIES (AND (EQUAL I 0)
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL (CAR (CONS 0 (BV-NOT (VEC X))))
0)).
But this again simplifies, rewriting with CAR-CONS, and expanding the
definition of EQUAL, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (NUMBERP I))
(LISTP X)
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(EQUAL (CAR X) 0))
(EQUAL (CAR (CONS 1 (BV-NOT (VEC X))))
0)).
This again simplifies, using linear arithmetic, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (NUMBERP I))
(LISTP X)
(NOT (EQUAL (ADD1 (BV-LEN (VEC X))) 0))
(EQUAL (CAR X) 0))
(NOT (EQUAL (CAR (CONS 1 (BV-NOT (VEC X))))
0))),
which again simplifies, rewriting with CAR-CONS, and expanding the
definition of EQUAL, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (NUMBERP I))
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL (CAR (CONS 0 (BV-NOT (VEC X))))
0)).
However this again simplifies, applying CAR-CONS, and opening up the
definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP I))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
(IF (LESSP (SUB1 I) (BV-LEN (VEC X)))
(B-NOT (BV-BITN (VEC X) (SUB1 I)))
(B0))))
(EQUAL (BV-BITN (BV-NOT X) I)
(IF (LESSP I (BV-LEN X))
(B-NOT (BV-BITN X I))
(B0)))).
This simplifies, expanding the definitions of ZEROP, B1, B0P, B0, B-NOT,
BV-NOT, BIT, BV-LEN, and BV-BITN, to the following 18 new formulas:
Case 1.18.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (EQUAL (BV-BITN (VEC X) (SUB1 I)) 0))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(NOT (LISTP X)))
(EQUAL (BV-BITN NIL I) 0)).
But this further simplifies, unfolding VEC and BV-NOT, to:
T.
Case 1.17.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (EQUAL (BV-BITN (VEC X) (SUB1 I)) 0))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-BITN (CONS 0 (BV-NOT (VEC X))) I)
0)),
which again simplifies, rewriting with CDR-CONS, and opening up the
functions VEC, BV-BITN, and EQUAL, to:
T.
Case 1.16.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (EQUAL (BV-BITN (VEC X) (SUB1 I)) 0))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(LISTP X)
(EQUAL (CAR X) 0))
(EQUAL (BV-BITN (CONS 1 (BV-NOT (VEC X))) I)
0)).
But this again simplifies, rewriting with CDR-CONS, and expanding the
functions VEC, BV-BITN, and EQUAL, to:
T.
Case 1.15.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(LISTP X)
(NOT (EQUAL (BV-BITN (VEC X) (SUB1 I)) 0))
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-BITN (CONS 0 (BV-NOT (VEC X))) I)
0)).
But this again simplifies, applying the lemma CDR-CONS, and expanding the
functions VEC, BV-BITN, and EQUAL, to:
T.
Case 1.14.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(LISTP X)
(NOT (LESSP I (ADD1 (BV-LEN (VEC X)))))
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-BITN (CONS 0 (BV-NOT (VEC X))) I)
0)),
which again simplifies, appealing to the lemmas SUB1-ADD1 and CDR-CONS,
and unfolding LESSP, VEC, BV-BITN, and EQUAL, to:
T.
Case 1.13.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(LISTP X)
(NOT (EQUAL (BV-BITN (VEC X) (SUB1 I)) 0))
(EQUAL (CAR X) 0))
(EQUAL (BV-BITN (CONS 1 (BV-NOT (VEC X))) I)
0)),
which again simplifies, rewriting with the lemma CDR-CONS, and expanding
the functions VEC, BV-BITN, and EQUAL, to:
T.
Case 1.12.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(LISTP X)
(NOT (LESSP I (ADD1 (BV-LEN (VEC X)))))
(EQUAL (CAR X) 0))
(EQUAL (BV-BITN (CONS 1 (BV-NOT (VEC X))) I)
0)),
which again simplifies, applying the lemmas SUB1-ADD1 and CDR-CONS, and
opening up the definitions of LESSP, VEC, BV-BITN, and EQUAL, to:
T.
Case 1.11.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(LISTP X)
(LESSP I (ADD1 (BV-LEN (VEC X))))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-BITN (CONS 0 (BV-NOT (VEC X))) I)
1)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.10.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(LISTP X)
(LESSP I (ADD1 (BV-LEN (VEC X))))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(EQUAL (CAR X) 0))
(EQUAL (BV-BITN (CONS 1 (BV-NOT (VEC X))) I)
1)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.9.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(NOT (LISTP X))
(NOT (EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)))
(EQUAL (BV-BITN NIL I) 0)),
which further simplifies, opening up the functions VEC, BV-LEN, EQUAL,
LESSP, and BV-NOT, to:
T.
Case 1.8.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(NOT (LISTP X))
(NOT (LESSP I 0)))
(EQUAL (BV-BITN NIL I) 0)),
which again simplifies, opening up the definitions of EQUAL and LESSP, to
the conjecture:
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(NOT (LISTP X)))
(EQUAL (BV-BITN NIL I) 0)).
But this further simplifies, opening up VEC, BV-LEN, EQUAL, LESSP, BV-NOT,
and BV-BITN, to:
T.
Case 1.7.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(NOT (LESSP (SUB1 I) (BV-LEN (VEC X))))
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
0)
(NOT (LISTP X))
(LESSP I 0)
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0))
(EQUAL (BV-BITN NIL I) 1)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.6.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(LESSP (SUB1 I) (BV-LEN (VEC X)))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
1)
(LISTP X)
(NOT (LESSP I (ADD1 (BV-LEN (VEC X)))))
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-BITN (CONS 0 (BV-NOT (VEC X))) I)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.5.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(LESSP (SUB1 I) (BV-LEN (VEC X)))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
1)
(LISTP X)
(NOT (LESSP I (ADD1 (BV-LEN (VEC X)))))
(EQUAL (CAR X) 0))
(EQUAL (BV-BITN (CONS 1 (BV-NOT (VEC X))) I)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.4.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(LESSP (SUB1 I) (BV-LEN (VEC X)))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
1)
(LISTP X)
(LESSP I (ADD1 (BV-LEN (VEC X))))
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-BITN (CONS 0 (BV-NOT (VEC X))) I)
1)),
which again simplifies, applying SUB1-ADD1 and CDR-CONS, and expanding
LESSP, VEC, BV-BITN, and EQUAL, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(LESSP (SUB1 I) (BV-LEN (VEC X)))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
1)
(LISTP X)
(LESSP I (ADD1 (BV-LEN (VEC X))))
(EQUAL (CAR X) 0))
(EQUAL (BV-BITN (CONS 1 (BV-NOT (VEC X))) I)
1)).
However this again simplifies, applying SUB1-ADD1 and CDR-CONS, and
unfolding LESSP, VEC, BV-BITN, and EQUAL, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(LESSP (SUB1 I) (BV-LEN (VEC X)))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
1)
(NOT (LISTP X))
(NOT (LESSP I 0)))
(EQUAL (BV-BITN NIL I) 0)).
However this again simplifies, opening up the functions EQUAL and LESSP,
to the formula:
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(LESSP (SUB1 I) (BV-LEN (VEC X)))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
1)
(NOT (LISTP X)))
(EQUAL (BV-BITN NIL I) 0)).
This further simplifies, unfolding the definitions of VEC, BV-LEN, EQUAL,
and LESSP, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(LESSP (SUB1 I) (BV-LEN (VEC X)))
(EQUAL (BV-BITN (VEC X) (SUB1 I)) 0)
(EQUAL (BV-BITN (BV-NOT (VEC X)) (SUB1 I))
1)
(NOT (LISTP X))
(LESSP I 0))
(EQUAL (BV-BITN NIL I) 1)),
which again simplifies, using linear arithmetic, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
BV-BITN-NOT
(PROVE-LEMMA BV-TO-NAT-RANGEP
(REWRITE)
(NAT-RANGEP (BV-TO-NAT X) (BV-LEN X)))
WARNING: Note that the rewrite rule BV-TO-NAT-RANGEP will be stored so as to
apply only to terms with the nonrecursive function symbol NAT-RANGEP.
This formula can be simplified, using the abbreviation NAT-RANGEP, to:
(LESSP (BV-TO-NAT X)
(EXP 2 (BV-LEN X))),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (NLISTP X) (p X))
(IMPLIES (AND (NOT (NLISTP X)) (p (VEC X)))
(p X))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
establish that the measure (COUNT X) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme produces the following two new goals:
Case 2. (IMPLIES (NLISTP X)
(LESSP (BV-TO-NAT X)
(EXP 2 (BV-LEN X)))).
This simplifies, unfolding NLISTP, BV-TO-NAT, BV-LEN, EXP, and LESSP, to:
T.
Case 1. (IMPLIES (AND (NOT (NLISTP X))
(LESSP (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))
(LESSP (BV-TO-NAT X)
(EXP 2 (BV-LEN X)))).
This simplifies, rewriting with PLUS-COMMUTATIVITY and SUB1-ADD1, and
opening up NLISTP, BV-TO-NAT, B1, B0P, B0, BIT, BV-LEN, and EXP, to two new
goals:
Case 1.2.
(IMPLIES (AND (LISTP X)
(LESSP (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))
(NOT (EQUAL (CAR X) 0)))
(LESSP (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2 (EXP 2 (BV-LEN (VEC X)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (AND (LISTP X)
(LESSP (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))
(EQUAL (CAR X) 0))
(LESSP (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2 (EXP 2 (BV-LEN (VEC X)))))),
which again simplifies, using linear arithmetic, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-TO-NAT-RANGEP
(DEFN BV-ADDER&CARRY
(C X Y)
(IF (NLISTP X)
(CONS (FIX-BIT C) NIL)
(CONS (B-EOR C (B-EOR (BIT X) (BIT Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and
NLISTP can be used to show that the measure (COUNT X) decreases according to
the well-founded relation LESSP in each recursive call. Hence, BV-ADDER&CARRY
is accepted under the principle of definition. Note that:
(LISTP (BV-ADDER&CARRY C X Y))
is a theorem.
[ 0.0 0.0 0.0 ]
BV-ADDER&CARRY
(PROVE-LEMMA BV-ADDER&CARRY-LEN
(REWRITE)
(EQUAL (BV-LEN (BV-ADDER&CARRY C X Y))
(ADD1 (BV-LEN X))))
Name the conjecture *1.
We will appeal to induction. The recursive terms in the conjecture
suggest two inductions. However, they merge into one likely candidate
induction. We will induct according to the following scheme:
(AND (IMPLIES (NLISTP X) (p C X Y))
(IMPLIES (AND (NOT (NLISTP X))
(p (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(p C X Y))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
inform us that the measure (COUNT X) decreases according to the well-founded
relation LESSP in each induction step of the scheme. Note, however, the
inductive instances chosen for C and Y. The above induction scheme produces
the following two new formulas:
Case 2. (IMPLIES (NLISTP X)
(EQUAL (BV-LEN (BV-ADDER&CARRY C X Y))
(ADD1 (BV-LEN X)))).
This simplifies, applying CDR-CONS, and expanding NLISTP, BV-ADDER&CARRY, B1,
B0P, B0, FIX-BIT, ADD1, BV-LEN, VEC, and EQUAL, to:
T.
Case 1. (IMPLIES
(AND (NOT (NLISTP X))
(EQUAL (BV-LEN (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(ADD1 (BV-LEN (VEC X)))))
(EQUAL (BV-LEN (BV-ADDER&CARRY C X Y))
(ADD1 (BV-LEN X)))),
which simplifies, applying CDR-CONS, and expanding the functions NLISTP,
BV-ADDER&CARRY, B1, B0P, B0, BIT, VEC, and BV-LEN, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
BV-ADDER&CARRY-LEN
(PROVE-LEMMA FIX-BV-ADDER&CARRY
(REWRITE)
(EQUAL (FIX-BV (BV-ADDER&CARRY C X Y))
(BV-ADDER&CARRY C X Y)))
Name the conjecture *1.
We will appeal to induction. The recursive terms in the conjecture
suggest two inductions. However, they merge into one likely candidate
induction. We will induct according to the following scheme:
(AND (IMPLIES (NLISTP X) (p C X Y))
(IMPLIES (AND (NOT (NLISTP X))
(p (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(p C X Y))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
inform us that the measure (COUNT X) decreases according to the well-founded
relation LESSP in each induction step of the scheme. Note, however, the
inductive instances chosen for C and Y. The above induction scheme produces
the following two new formulas:
Case 2. (IMPLIES (NLISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY C X Y))
(BV-ADDER&CARRY C X Y))).
This simplifies, applying CDR-CONS, CAR-CONS, and CONS-EQUAL, and expanding
NLISTP, BV-ADDER&CARRY, B1, B0P, B0, FIX-BIT, FIX-BV, VEC, BIT, and EQUAL,
to:
T.
Case 1. (IMPLIES
(AND (NOT (NLISTP X))
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))))
(EQUAL (FIX-BV (BV-ADDER&CARRY C X Y))
(BV-ADDER&CARRY C X Y))),
which simplifies, applying CDR-CONS, CAR-CONS, and CONS-EQUAL, and expanding
the functions NLISTP, BV-ADDER&CARRY, B1, B0P, B0, BIT, VEC, and FIX-BV, to
the following 12 new goals:
Case 1.12.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 0)) 0)))
(EQUAL 1 (B-EOR C (B-EOR 1 0)))).
But this again simplifies, opening up the definitions of B-EOR, B1, B0P,
B0, and EQUAL, to:
T.
Case 1.11.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(NOT (LISTP Y))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 0)) 0)))
(EQUAL 1 (B-EOR C (B-EOR 1 0)))),
which again simplifies, unfolding the functions B-EOR, B1, B0P, B0, and
EQUAL, to:
T.
Case 1.10.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 0)) 0))
(EQUAL 0 (B-EOR C (B-EOR 1 0)))),
which again simplifies, obviously, to:
T.
Case 1.9.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(NOT (LISTP Y))
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 0)) 0))
(EQUAL 0 (B-EOR C (B-EOR 1 0)))).
This again simplifies, clearly, to:
T.
Case 1.8.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 0)) 0)))
(EQUAL 1 (B-EOR C (B-EOR 0 0)))).
This again simplifies, expanding the functions B-EOR, B1, B0P, B0, and
EQUAL, to:
T.
Case 1.7.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(NOT (LISTP Y))
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 0)) 0)))
(EQUAL 1 (B-EOR C (B-EOR 0 0)))),
which again simplifies, expanding B-EOR, B1, B0P, B0, and EQUAL, to:
T.
Case 1.6.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 0)) 0))
(EQUAL 0 (B-EOR C (B-EOR 0 0)))),
which again simplifies, clearly, to:
T.
Case 1.5.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(NOT (LISTP Y))
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 0)) 0))
(EQUAL 0 (B-EOR C (B-EOR 0 0)))).
This again simplifies, trivially, to:
T.
Case 1.4.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 1)) 0)))
(EQUAL 1 (B-EOR C (B-EOR 1 1)))).
But this again simplifies, opening up the functions B-EOR, B1, B0P, B0,
and EQUAL, to:
T.
Case 1.3.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 1)) 0))
(EQUAL 0 (B-EOR C (B-EOR 1 1)))),
which again simplifies, trivially, to:
T.
Case 1.2.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 1)) 0)))
(EQUAL 1 (B-EOR C (B-EOR 0 1)))).
But this again simplifies, expanding B-EOR, B1, B0P, B0, and EQUAL, to:
T.
Case 1.1.
(IMPLIES
(AND (LISTP X)
(EQUAL (FIX-BV (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 1)) 0))
(EQUAL 0 (B-EOR C (B-EOR 0 1)))),
which again simplifies, trivially, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.1 ]
FIX-BV-ADDER&CARRY
(PROVE-LEMMA BV-ADDER-BRIDGE
(REWRITE)
(EQUAL (BV-ADDER C X Y)
(BV-HEAD (BV-ADDER&CARRY C X Y)
(BV-LEN X))))
Name the conjecture *1.
Let us appeal to the induction principle. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (NLISTP X) (p C X Y))
(IMPLIES (AND (NOT (NLISTP X))
(p (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(p C X Y))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
can be used to show that the measure (COUNT X) decreases according to the
well-founded relation LESSP in each induction step of the scheme. Note,
however, the inductive instances chosen for C and Y. The above induction
scheme leads to the following two new goals:
Case 2. (IMPLIES (NLISTP X)
(EQUAL (BV-ADDER C X Y)
(BV-HEAD (BV-ADDER&CARRY C X Y)
(BV-LEN X)))).
This simplifies, expanding the definitions of NLISTP, BV-ADDER,
BV-ADDER&CARRY, B1, B0P, B0, FIX-BIT, BV-LEN, EQUAL, and BV-HEAD, to:
T.
Case 1. (IMPLIES
(AND (NOT (NLISTP X))
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X)))))
(EQUAL (BV-ADDER C X Y)
(BV-HEAD (BV-ADDER&CARRY C X Y)
(BV-LEN X)))).
This simplifies, rewriting with SUB1-ADD1, CDR-CONS, CAR-CONS, and
CONS-EQUAL, and unfolding the functions NLISTP, BV-ADDER, B1, B0P, B0, BIT,
B-EOR, BV-ADDER&CARRY, BV-LEN, VEC, and BV-HEAD, to 24 new formulas:
Case 1.24.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(NOT (LISTP Y))
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 0)) 0)
(EQUAL (B-EOR 1 0) 0))
(EQUAL C 0)),
which again simplifies, opening up the definitions of B1, B0P, B0, B-EOR,
and EQUAL, to:
T.
Case 1.23.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(NOT (LISTP Y))
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 0)) 0)
(NOT (EQUAL (B-EOR 1 0) 0)))
(NOT (EQUAL C 0))),
which again simplifies, unfolding the definitions of B1, B0P, B0, BIT,
B-AND, B-OR, VEC, B-EOR, and EQUAL, to:
T.
Case 1.22.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(NOT (LISTP Y))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 0)) 0))
(EQUAL (B-EOR 1 0) 0))
(NOT (EQUAL C 0))),
which again simplifies, opening up the definitions of B1, B0P, B0, BIT,
B-AND, B-OR, VEC, B-EOR, and EQUAL, to:
T.
Case 1.21.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(NOT (LISTP Y))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 0)) 0))
(NOT (EQUAL (B-EOR 1 0) 0)))
(EQUAL C 0)),
which again simplifies, unfolding the functions B-EOR, B0P, B0, and EQUAL,
to:
T.
Case 1.20.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(NOT (LISTP Y))
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 0)) 0)
(EQUAL (B-EOR 0 0) 0))
(EQUAL C 0)),
which again simplifies, unfolding B1, B0P, B0, B-EOR, and EQUAL, to:
T.
Case 1.19.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(NOT (LISTP Y))
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 0)) 0)
(NOT (EQUAL (B-EOR 0 0) 0)))
(NOT (EQUAL C 0))),
which again simplifies, expanding the definitions of B0, B0P, BIT, B-AND,
B-OR, VEC, B-EOR, and EQUAL, to:
T.
Case 1.18.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(NOT (LISTP Y))
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 0)) 0))
(EQUAL (B-EOR 0 0) 0))
(NOT (EQUAL C 0))),
which again simplifies, trivially, to:
T.
Case 1.17.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(NOT (LISTP Y))
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 0)) 0))
(NOT (EQUAL (B-EOR 0 0) 0)))
(EQUAL C 0)).
But this again simplifies, unfolding B-EOR, B1, B0P, B0, and EQUAL, to:
T.
Case 1.16.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 0)) 0)
(EQUAL (B-EOR 1 0) 0))
(EQUAL C 0)),
which again simplifies, unfolding the functions B1, B0P, B0, B-EOR, and
EQUAL, to:
T.
Case 1.15.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 0)) 0)
(NOT (EQUAL (B-EOR 1 0) 0)))
(NOT (EQUAL C 0))),
which again simplifies, applying CAR-NLISTP, and unfolding B1, B0P, B0,
BIT, B-AND, B-OR, VEC, EQUAL, and B-EOR, to:
T.
Case 1.14.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 0)) 0))
(EQUAL (B-EOR 1 0) 0))
(NOT (EQUAL C 0))).
But this again simplifies, rewriting with CAR-NLISTP, and expanding B1,
B0P, B0, BIT, B-AND, B-OR, VEC, EQUAL, and B-EOR, to:
T.
Case 1.13.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 0)) 0))
(NOT (EQUAL (B-EOR 1 0) 0)))
(EQUAL C 0)).
But this again simplifies, unfolding the functions B-EOR, B0P, B0, and
EQUAL, to:
T.
Case 1.12.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 0)) 0)
(EQUAL (B-EOR 0 0) 0))
(EQUAL C 0)),
which again simplifies, unfolding the functions B1, B0P, B0, B-EOR, and
EQUAL, to:
T.
Case 1.11.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 0)) 0)
(NOT (EQUAL (B-EOR 0 0) 0)))
(NOT (EQUAL C 0))),
which again simplifies, applying CAR-NLISTP, and unfolding the functions
B0, B0P, BIT, B-AND, B-OR, VEC, EQUAL, and B-EOR, to:
T.
Case 1.10.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 0)) 0))
(EQUAL (B-EOR 0 0) 0))
(NOT (EQUAL C 0))).
This again simplifies, trivially, to:
T.
Case 1.9.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 0)) 0))
(NOT (EQUAL (B-EOR 0 0) 0)))
(EQUAL C 0)).
This again simplifies, expanding B-EOR, B1, B0P, B0, and EQUAL, to:
T.
Case 1.8.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 1)) 0)
(EQUAL (B-EOR 1 1) 0))
(EQUAL C 0)),
which again simplifies, expanding the definitions of B1, B0P, B0, B-EOR,
and EQUAL, to:
T.
Case 1.7.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(EQUAL (B-EOR C (B-EOR 1 1)) 0)
(NOT (EQUAL (B-EOR 1 1) 0)))
(NOT (EQUAL C 0))),
which again simplifies, expanding the functions B1, B0P, B0, BIT, B-AND,
B-OR, VEC, B-EOR, and EQUAL, to:
T.
Case 1.6.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 1)) 0))
(EQUAL (B-EOR 1 1) 0))
(NOT (EQUAL C 0))),
which again simplifies, opening up B1, B0P, B0, BIT, B-AND, B-OR, VEC,
B-EOR, and EQUAL, to:
T.
Case 1.5.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 1)) 0))
(NOT (EQUAL (B-EOR 1 1) 0)))
(EQUAL C 0)),
which again simplifies, unfolding the functions B-EOR, B1, B0P, B0, and
EQUAL, to:
T.
Case 1.4.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 1)) 0)
(EQUAL (B-EOR 0 1) 0))
(EQUAL C 0)),
which again simplifies, expanding the functions B1, B0P, B0, B-EOR, and
EQUAL, to:
T.
Case 1.3.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(EQUAL (B-EOR C (B-EOR 0 1)) 0)
(NOT (EQUAL (B-EOR 0 1) 0)))
(NOT (EQUAL C 0))),
which again simplifies, expanding the functions B0, B0P, BIT, B1, B-AND,
B-OR, VEC, B-EOR, and EQUAL, to:
T.
Case 1.2.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 1)) 0))
(EQUAL (B-EOR 0 1) 0))
(NOT (EQUAL C 0))),
which again simplifies, opening up the definitions of B0, B0P, BIT, B1,
B-AND, B-OR, VEC, B-EOR, and EQUAL, to:
T.
Case 1.1.
(IMPLIES
(AND (LISTP X)
(EQUAL (BV-ADDER (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-HEAD (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y))
(BV-LEN (VEC X))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 1)) 0))
(NOT (EQUAL (B-EOR 0 1) 0)))
(EQUAL C 0)),
which again simplifies, unfolding the functions B-EOR, B0P, B0, and EQUAL,
to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.1 ]
BV-ADDER-BRIDGE
(PROVE-LEMMA BV-NOT-LOGNOT
(REWRITE)
(EQUAL (BV-TO-NAT (BV-NOT X))
(LOGNOT (BV-LEN X) (BV-TO-NAT X)))
((DISABLE REMAINDER QUOTIENT)))
This formula simplifies, expanding the functions HEAD and LOGNOT, to the
formula:
(EQUAL (BV-TO-NAT (BV-NOT X))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN X))
(REMAINDER (BV-TO-NAT X)
(EXP 2 (BV-LEN X)))))).
Give the above formula the name *1.
Perhaps we can prove it by induction. Four inductions are suggested by
terms in the conjecture. However, they merge into one likely candidate
induction. We will induct according to the following scheme:
(AND (IMPLIES (NLISTP X) (p X))
(IMPLIES (AND (NOT (NLISTP X)) (p (VEC X)))
(p X))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
can be used to prove that the measure (COUNT X) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme generates two new goals:
Case 2. (IMPLIES (NLISTP X)
(EQUAL (BV-TO-NAT (BV-NOT X))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN X))
(REMAINDER (BV-TO-NAT X)
(EXP 2 (BV-LEN X))))))),
which simplifies, opening up the definitions of NLISTP, BV-NOT, BV-TO-NAT,
BV-LEN, EXP, REMAINDER, DIFFERENCE, SUB1, and EQUAL, to:
T.
Case 1. (IMPLIES
(AND (NOT (NLISTP X))
(EQUAL (BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))
(EQUAL (BV-TO-NAT (BV-NOT X))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN X))
(REMAINDER (BV-TO-NAT X)
(EXP 2 (BV-LEN X))))))),
which simplifies, rewriting with the lemmas PLUS-COMMUTATIVITY, CDR-CONS,
CAR-CONS, and SUB1-ADD1, and unfolding the functions NLISTP, BV-NOT, B1, B0P,
B0, BIT, B-NOT, VEC, BV-TO-NAT, BV-LEN, and EXP, to two new goals:
Case 1.2.
(IMPLIES
(AND
(LISTP X)
(EQUAL (BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0)))
(EQUAL
(PLUS (TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
0)
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (BV-LEN (VEC X))))
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, applying the lemmas PLUS-COMMUTATIVITY, PLUS-ADD1,
REMAINDER-DISTRIBUTES-TIMES2-ADD1, SUB1-ADD1, and TIMES-EQUAL-0, and
expanding EQUAL, PLUS, NUMBERP, and DIFFERENCE, to two new conjectures:
Case 1.2.2.
(IMPLIES
(AND
(LISTP X)
(EQUAL (BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic, to five new formulas:
Case 1.2.2.5.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))
(EXP 2 (BV-LEN (VEC X)))))
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic and applying the lemma
REMAINDER-LESSP-LINEAR, to:
T.
Case 1.2.2.4.
(IMPLIES
(AND
(LESSP (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic and rewriting with
REMAINDER-LESSP-LINEAR, to:
T.
Case 1.2.2.3.
(IMPLIES
(AND
(NOT (LESSP (TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))
(SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))))
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))).
However this again simplifies, using linear arithmetic, to two new
conjectures:
Case 1.2.2.3.2.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))
(EXP 2 (BV-LEN (VEC X)))))
(NOT (LESSP (TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))
(SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))))
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE
(SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic and appealing to the
lemma REMAINDER-LESSP-LINEAR, to:
T.
Case 1.2.2.3.1.
(IMPLIES
(AND
(LESSP (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))
(NOT (LESSP (TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))
(SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))))
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE
(SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic and appealing to the
lemma REMAINDER-LESSP-LINEAR, to:
T.
Case 1.2.2.2.
(IMPLIES
(AND
(LESSP (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic, to two new goals:
Case 1.2.2.2.2.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))
(EXP 2 (BV-LEN (VEC X)))))
(LESSP (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE
(SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic and applying
REMAINDER-LESSP-LINEAR, to:
T.
Case 1.2.2.2.1.
(IMPLIES
(AND
(LESSP (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))
(LESSP (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE
(SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))).
This again simplifies, using linear arithmetic and rewriting with
the lemma REMAINDER-LESSP-LINEAR, to:
T.
Case 1.2.2.1.
(IMPLIES
(AND
(EQUAL (TIMES 2 (EXP 2 (BV-LEN (VEC X))))
0)
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (BV-LEN (VEC X)))))
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 1.2.2.1.2.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))
(EXP 2 (BV-LEN (VEC X)))))
(EQUAL (TIMES 2 (EXP 2 (BV-LEN (VEC X))))
0)
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE
(SUB1 0)
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.2.2.1.1.
(IMPLIES
(AND
(LESSP (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))
(EQUAL (TIMES 2 (EXP 2 (BV-LEN (VEC X))))
0)
(LISTP X)
(EQUAL
(BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(EQUAL
(TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1
(DIFFERENCE
(SUB1 0)
(TIMES 2
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.2.1.
(IMPLIES
(AND
(LISTP X)
(EQUAL (BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(NOT (EQUAL (CAR X) 0))
(EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(EQUAL (TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1 0))),
which again simplifies, using linear arithmetic, to two new goals:
Case 1.2.1.2.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER (BV-TO-NAT (VEC X)) 0)
0))
(LISTP X)
(EQUAL (BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE 0
(REMAINDER (BV-TO-NAT (VEC X)) 0))))
(NOT (EQUAL (CAR X) 0))
(EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(EQUAL (TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1 0))),
which again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and expanding EQUAL, to:
T.
Case 1.2.1.1.
(IMPLIES
(AND
(LESSP 0
(REMAINDER (BV-TO-NAT (VEC X)) 0))
(LISTP X)
(EQUAL (BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE 0
(REMAINDER (BV-TO-NAT (VEC X)) 0))))
(NOT (EQUAL (CAR X) 0))
(EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(EQUAL (TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
(SUB1 0))),
which again simplifies, using linear arithmetic, rewriting with
EXP-OF-2-0, and opening up EQUAL, to:
T.
Case 1.1.
(IMPLIES
(AND
(LISTP X)
(EQUAL (BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(EQUAL (CAR X) 0))
(EQUAL
(PLUS (TIMES 2 (BV-TO-NAT (BV-NOT (VEC X))))
1)
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (BV-LEN (VEC X))))
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2
(EXP 2 (BV-LEN (VEC X))))))))).
However this again simplifies, rewriting with PLUS-ADD1,
PLUS-COMMUTATIVITY, TIMES-DISTRIBUTES-REMAINDER, and
TIMES-DISTRIBUTES-DIFFERENCE, and unfolding the functions EQUAL and PLUS,
to:
(IMPLIES
(AND
(LISTP X)
(EQUAL (BV-TO-NAT (BV-NOT (VEC X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X)))))))
(EQUAL (CAR X) 0))
(EQUAL
(ADD1 (TIMES 2
(BV-TO-NAT (BV-NOT (VEC X)))))
(SUB1 (TIMES 2
(DIFFERENCE (EXP 2 (BV-LEN (VEC X)))
(REMAINDER (BV-TO-NAT (VEC X))
(EXP 2 (BV-LEN (VEC X))))))))),
which further simplifies, expanding the function VEC, to:
(IMPLIES
(AND
(LISTP X)
(EQUAL (BV-TO-NAT (BV-NOT (CDR X)))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN (CDR X)))
(REMAINDER (BV-TO-NAT (CDR X))
(EXP 2 (BV-LEN (CDR X)))))))
(EQUAL (CAR X) 0))
(EQUAL
(ADD1 (TIMES 2
(BV-TO-NAT (BV-NOT (CDR X)))))
(SUB1 (TIMES 2
(DIFFERENCE (EXP 2 (BV-LEN (CDR X)))
(REMAINDER (BV-TO-NAT (CDR X))
(EXP 2 (BV-LEN (CDR X))))))))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS V Z) to
eliminate (CDR X) and (CAR X). This generates:
(IMPLIES
(AND (EQUAL (BV-TO-NAT (BV-NOT Z))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN Z))
(REMAINDER (BV-TO-NAT Z)
(EXP 2 (BV-LEN Z))))))
(EQUAL V 0))
(EQUAL (ADD1 (TIMES 2 (BV-TO-NAT (BV-NOT Z))))
(SUB1 (TIMES 2
(DIFFERENCE (EXP 2 (BV-LEN Z))
(REMAINDER (BV-TO-NAT Z)
(EXP 2 (BV-LEN Z)))))))).
This further simplifies, obviously, to:
(IMPLIES
(EQUAL (BV-TO-NAT (BV-NOT Z))
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN Z))
(REMAINDER (BV-TO-NAT Z)
(EXP 2 (BV-LEN Z))))))
(EQUAL (ADD1 (TIMES 2 (BV-TO-NAT (BV-NOT Z))))
(SUB1 (TIMES 2
(DIFFERENCE (EXP 2 (BV-LEN Z))
(REMAINDER (BV-TO-NAT Z)
(EXP 2 (BV-LEN Z)))))))).
We use the above equality hypothesis by substituting:
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN Z))
(REMAINDER (BV-TO-NAT Z)
(EXP 2 (BV-LEN Z)))))
for (BV-TO-NAT (BV-NOT Z)) and throwing away the equality. This generates
the formula:
(EQUAL
(ADD1 (TIMES 2
(SUB1 (DIFFERENCE (EXP 2 (BV-LEN Z))
(REMAINDER (BV-TO-NAT Z)
(EXP 2 (BV-LEN Z)))))))
(SUB1 (TIMES 2
(DIFFERENCE (EXP 2 (BV-LEN Z))
(REMAINDER (BV-TO-NAT Z)
(EXP 2 (BV-LEN Z))))))).
This further simplifies, applying REMAINDER-LESSP, DIFFERENCE=0,
DIFFERENCE-SUB1, and TIMES-ADD1-SUB1, and opening up the functions EQUAL,
NUMBERP, and SUB1, to:
(IMPLIES
(EQUAL (EXP 2 (BV-LEN Z)) 0)
(EQUAL 1
(SUB1 (TIMES 2
(DIFFERENCE (EXP 2 (BV-LEN Z))
(REMAINDER (BV-TO-NAT Z)
(EXP 2 (BV-LEN Z)))))))),
which finally simplifies, using linear arithmetic, appealing to the lemma
EXP-OF-2-0, and unfolding EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.3 0.0 ]
BV-NOT-LOGNOT
(PROVE-LEMMA BV-BITN-BITN
(REWRITE)
(EQUAL (BV-BITN X N)
(BITN (BV-TO-NAT X) N))
((DISABLE REMAINDER QUOTIENT)))
WARNING: the newly proposed lemma, BV-BITN-BITN, could be applied whenever
the previously added lemma BV-BITN-NOT could.
This formula can be simplified, using the abbreviations TAIL, BCAR, and BITN,
to the new conjecture:
(EQUAL (BV-BITN X N)
(REMAINDER (QUOTIENT (BV-TO-NAT X) (EXP 2 N))
2)),
which we will name *1.
Perhaps we can prove it by induction. There are three plausible
inductions. However, they merge into one likely candidate induction. We will
induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N))
(p (VEC X) (SUB1 N)))
(p X N))).
The lemmas LESSP-SUB1 and COUNT-NUMBERP and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. Note,
however, the inductive instance chosen for X. The above induction scheme
generates two new conjectures:
Case 2. (IMPLIES (ZEROP N)
(EQUAL (BV-BITN X N)
(REMAINDER (QUOTIENT (BV-TO-NAT X) (EXP 2 N))
2))),
which simplifies, rewriting with PLUS-COMMUTATIVITY and QUOTIENT-1, and
expanding the definitions of ZEROP, BIT, B0, B0P, B1, EQUAL, BV-BITN,
BV-TO-NAT, and EXP, to the following six new formulas:
Case 2.6.
(IMPLIES (AND (EQUAL N 0) (NOT (LISTP X)))
(EQUAL 0 (REMAINDER 0 2))).
This again simplifies, opening up REMAINDER and EQUAL, to:
T.
Case 2.5.
(IMPLIES (AND (EQUAL N 0)
(LISTP X)
(EQUAL (CAR X) 0))
(EQUAL 0
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
2))),
which again simplifies, applying PLUS-COMMUTATIVITY and REMAINDER-TIMES,
and unfolding the functions EQUAL and PLUS, to:
T.
Case 2.4.
(IMPLIES (AND (EQUAL N 0)
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL 1
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
2))).
However this again simplifies, rewriting with PLUS-ADD1,
PLUS-COMMUTATIVITY, REMAINDER-TIMES, and REMAINDER-ADD1, and opening up
the definitions of EQUAL, NUMBERP, SUB1, and ADD1, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (NUMBERP N))
(NOT (LISTP X)))
(EQUAL 0 (REMAINDER 0 2))).
However this again simplifies, expanding the functions REMAINDER and EQUAL,
to:
T.
Case 2.2.
(IMPLIES (AND (NOT (NUMBERP N))
(LISTP X)
(EQUAL (CAR X) 0))
(EQUAL 0
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
2))),
which again simplifies, applying PLUS-COMMUTATIVITY and REMAINDER-TIMES,
and expanding EQUAL and PLUS, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (NUMBERP N))
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL 1
(REMAINDER (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
2))).
This again simplifies, applying PLUS-ADD1, PLUS-COMMUTATIVITY,
REMAINDER-TIMES, and REMAINDER-ADD1, and expanding the definitions of
EQUAL, NUMBERP, SUB1, and ADD1, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (BV-BITN (VEC X) (SUB1 N))
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
2)))
(EQUAL (BV-BITN X N)
(REMAINDER (QUOTIENT (BV-TO-NAT X) (EXP 2 N))
2))).
This simplifies, appealing to the lemma PLUS-COMMUTATIVITY, and expanding
the functions ZEROP, BV-BITN, BV-TO-NAT, B1, B0P, B0, BIT, and EXP, to the
following three new conjectures:
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-BITN (VEC X) (SUB1 N))
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
2))
(NOT (LISTP X)))
(EQUAL (BV-BITN (VEC X) (SUB1 N))
(REMAINDER (QUOTIENT 0
(TIMES 2 (EXP 2 (SUB1 N))))
2))).
This again simplifies, appealing to the lemma QUOTIENT-0, and opening up
the function REMAINDER, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-BITN (VEC X) (SUB1 N))
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
2))
(NOT (LISTP X)))
(EQUAL (BV-BITN (VEC X) (SUB1 N)) 0)).
This again simplifies, using linear arithmetic and appealing to the lemma
REMAINDER-WRT-2, to the goal:
(IMPLIES (AND (EQUAL (BV-BITN (VEC X) (SUB1 N)) 1)
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL 1
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
2))
(NOT (LISTP X)))
(EQUAL 1 0)).
However this again simplifies, opening up the definition of EQUAL, to:
(IMPLIES (AND (EQUAL (BV-BITN (VEC X) (SUB1 N)) 1)
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL 1
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
2)))
(LISTP X)).
This further simplifies, applying QUOTIENT-0, and expanding the functions
VEC, BV-TO-NAT, REMAINDER, and EQUAL, to:
T.
Case 1.2.
(IMPLIES
(AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-BITN (VEC X) (SUB1 N))
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
2))
(LISTP X)
(EQUAL (CAR X) 0))
(EQUAL (BV-BITN (VEC X) (SUB1 N))
(REMAINDER (QUOTIENT (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2 (EXP 2 (SUB1 N))))
2))).
But this again simplifies, rewriting with PLUS-COMMUTATIVITY and
QUOTIENT-TIMES-CANCEL, and unfolding EQUAL, PLUS, and NUMBERP, to:
T.
Case 1.1.
(IMPLIES
(AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (BV-BITN (VEC X) (SUB1 N))
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 N)))
2))
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-BITN (VEC X) (SUB1 N))
(REMAINDER (QUOTIENT (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2 (EXP 2 (SUB1 N))))
2))).
But this again simplifies, rewriting with PLUS-ADD1, PLUS-COMMUTATIVITY,
and QUOTIENT-DISTRIBUTES-TIMES2-ADD1, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.3 0.1 ]
BV-BITN-BITN
(PROVE-LEMMA BV-MBIT-BITN
(REWRITE)
(EQUAL (BV-MBIT X)
(IF (EQUAL (BV-LEN X) 0)
0
(BITN (BV-TO-NAT X)
(SUB1 (BV-LEN X)))))
((DISABLE REMAINDER QUOTIENT)))
This formula can be simplified, using the abbreviations TAIL, BCAR, and BITN,
to:
(EQUAL (BV-MBIT X)
(IF (EQUAL (BV-LEN X) 0)
0
(REMAINDER (QUOTIENT (BV-TO-NAT X)
(EXP 2 (SUB1 (BV-LEN X))))
2))),
which simplifies, rewriting with BV-LEN-LISTP, to the following two new
formulas:
Case 2. (IMPLIES (NOT (LISTP X))
(EQUAL (BV-MBIT X) 0)).
This again simplifies, expanding the definitions of B0, BV-MBIT, and EQUAL,
to:
T.
Case 1. (IMPLIES (LISTP X)
(EQUAL (BV-MBIT X)
(REMAINDER (QUOTIENT (BV-TO-NAT X)
(EXP 2 (SUB1 (BV-LEN X))))
2))),
which we will name *1.
Perhaps we can prove it by induction. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (NLISTP X) (p X))
(IMPLIES (AND (NOT (NLISTP X))
(NLISTP (VEC X)))
(p X))
(IMPLIES (AND (NOT (NLISTP X))
(NOT (NLISTP (VEC X)))
(p (VEC X)))
(p X))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
can be used to establish that the measure (COUNT X) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme leads to four new conjectures:
Case 4. (IMPLIES (AND (NLISTP X) (LISTP X))
(EQUAL (BV-MBIT X)
(REMAINDER (QUOTIENT (BV-TO-NAT X)
(EXP 2 (SUB1 (BV-LEN X))))
2))),
which simplifies, opening up the definition of NLISTP, to:
T.
Case 3. (IMPLIES (AND (NOT (NLISTP X))
(NLISTP (VEC X))
(LISTP X))
(EQUAL (BV-MBIT X)
(REMAINDER (QUOTIENT (BV-TO-NAT X)
(EXP 2 (SUB1 (BV-LEN X))))
2))),
which simplifies, appealing to the lemmas PLUS-COMMUTATIVITY and SUB1-ADD1,
and unfolding the functions NLISTP, VEC, BV-MBIT, B1, B0P, B0, BIT,
BV-TO-NAT, and BV-LEN, to two new formulas:
Case 3.2.
(IMPLIES
(AND (NOT (LISTP (CDR X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL 1
(REMAINDER (QUOTIENT (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(EXP 2 (BV-LEN (VEC X))))
2))),
which again simplifies, rewriting with PLUS-ADD1, PLUS-COMMUTATIVITY, and
QUOTIENT-ADD1, to the following three new formulas:
Case 3.2.3.
(IMPLIES
(AND (NOT (LISTP (CDR X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(EQUAL (REMAINDER (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
(SUB1 (EXP 2 (BV-LEN (VEC X))))))
(EQUAL 1
(REMAINDER (ADD1 (QUOTIENT (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X)))))
2))).
However this again simplifies, rewriting with REMAINDER-ADD1, and
unfolding the definitions of EQUAL, NUMBERP, and SUB1, to the following
two new conjectures:
Case 3.2.3.2.
(IMPLIES
(AND (NOT (LISTP (CDR X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(EQUAL (REMAINDER (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
(SUB1 (EXP 2 (BV-LEN (VEC X))))))
(EQUAL 1
(ADD1 (REMAINDER (QUOTIENT (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
2)))).
But this again simplifies, using linear arithmetic and applying
REMAINDER-WRT-2, to:
(IMPLIES
(AND (EQUAL (REMAINDER (QUOTIENT (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
2)
1)
(NOT (LISTP (CDR X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(EQUAL (REMAINDER (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
(SUB1 (EXP 2 (BV-LEN (VEC X))))))
(EQUAL 1 2)),
which again simplifies, unfolding the definition of EQUAL, to:
(IMPLIES
(AND (EQUAL (REMAINDER (QUOTIENT (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
2)
1)
(NOT (LISTP (CDR X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0)))
(NOT (EQUAL (REMAINDER (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
(SUB1 (EXP 2 (BV-LEN (VEC X))))))).
However this finally simplifies, unfolding the functions VEC,
BV-TO-NAT, TIMES, BV-LEN, EXP, QUOTIENT, REMAINDER, and EQUAL, to:
T.
Case 3.2.3.1.
(IMPLIES
(AND (NOT (LISTP (CDR X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(EQUAL (REMAINDER (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
(SUB1 (EXP 2 (BV-LEN (VEC X))))))
(NOT (EQUAL (REMAINDER (QUOTIENT (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
2)
1))),
which further simplifies, opening up the definitions of VEC, BV-LEN,
EXP, EQUAL, BV-TO-NAT, TIMES, REMAINDER, SUB1, and QUOTIENT, to:
T.
Case 3.2.2.
(IMPLIES (AND (NOT (LISTP (CDR X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(NOT (EQUAL (REMAINDER (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
(SUB1 (EXP 2 (BV-LEN (VEC X)))))))
(EQUAL 1
(REMAINDER (QUOTIENT (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
2))),
which further simplifies, expanding VEC, BV-LEN, EXP, EQUAL, BV-TO-NAT,
TIMES, REMAINDER, and SUB1, to:
T.
Case 3.2.1.
(IMPLIES (AND (NOT (LISTP (CDR X)))
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(EQUAL (EXP 2 (BV-LEN (VEC X))) 0))
(EQUAL 1 (REMAINDER 0 2))),
which again simplifies, using linear arithmetic, applying EXP-OF-2-0,
and unfolding EQUAL, to:
T.
Case 3.1.
(IMPLIES
(AND (NOT (LISTP (CDR X)))
(LISTP X)
(EQUAL (CAR X) 0))
(EQUAL 0
(REMAINDER (QUOTIENT (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(EXP 2 (BV-LEN (VEC X))))
2))).
This again simplifies, using linear arithmetic and rewriting with
REMAINDER-WRT-2, to:
(IMPLIES
(AND
(EQUAL (REMAINDER (QUOTIENT (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(EXP 2 (BV-LEN (VEC X))))
2)
1)
(NOT (LISTP (CDR X)))
(LISTP X)
(EQUAL (CAR X) 0))
(EQUAL 0 1)),
which again simplifies, rewriting with PLUS-COMMUTATIVITY, and unfolding
the definitions of EQUAL and PLUS, to:
(IMPLIES
(AND (EQUAL (REMAINDER (QUOTIENT (TIMES 2 (BV-TO-NAT (VEC X)))
(EXP 2 (BV-LEN (VEC X))))
2)
1)
(NOT (LISTP (CDR X)))
(LISTP X))
(NOT (EQUAL (CAR X) 0))),
which further simplifies, unfolding the functions VEC, BV-TO-NAT, TIMES,
BV-LEN, EXP, QUOTIENT, REMAINDER, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (NLISTP X))
(NOT (NLISTP (VEC X)))
(NOT (LISTP (VEC X)))
(LISTP X))
(EQUAL (BV-MBIT X)
(REMAINDER (QUOTIENT (BV-TO-NAT X)
(EXP 2 (SUB1 (BV-LEN X))))
2))),
which simplifies, expanding NLISTP and VEC, to:
T.
Case 1. (IMPLIES
(AND (NOT (NLISTP X))
(NOT (NLISTP (VEC X)))
(EQUAL (BV-MBIT (VEC X))
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 (BV-LEN (VEC X)))))
2))
(LISTP X))
(EQUAL (BV-MBIT X)
(REMAINDER (QUOTIENT (BV-TO-NAT X)
(EXP 2 (SUB1 (BV-LEN X))))
2))),
which simplifies, rewriting with PLUS-COMMUTATIVITY, SUB1-ADD1, and
BV-LEN-LISTP, and unfolding the definitions of NLISTP, VEC, BV-MBIT,
BV-TO-NAT, B1, B0P, B0, BIT, BV-LEN, and EXP, to the following two new
conjectures:
Case 1.2.
(IMPLIES
(AND (LISTP (CDR X))
(EQUAL (BV-MBIT (VEC X))
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 (BV-LEN (VEC X)))))
2))
(LISTP X)
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-MBIT (VEC X))
(REMAINDER (QUOTIENT (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 1)
(TIMES 2
(EXP 2 (SUB1 (BV-LEN (VEC X))))))
2))).
But this again simplifies, applying PLUS-ADD1, PLUS-COMMUTATIVITY, and
QUOTIENT-DISTRIBUTES-TIMES2-ADD1, to:
T.
Case 1.1.
(IMPLIES
(AND (LISTP (CDR X))
(EQUAL (BV-MBIT (VEC X))
(REMAINDER (QUOTIENT (BV-TO-NAT (VEC X))
(EXP 2 (SUB1 (BV-LEN (VEC X)))))
2))
(LISTP X)
(EQUAL (CAR X) 0))
(EQUAL (BV-MBIT (VEC X))
(REMAINDER (QUOTIENT (PLUS (TIMES 2 (BV-TO-NAT (VEC X))) 0)
(TIMES 2
(EXP 2 (SUB1 (BV-LEN (VEC X))))))
2))).
But this again simplifies, applying PLUS-COMMUTATIVITY and
QUOTIENT-TIMES-CANCEL, and unfolding the functions EQUAL, PLUS, and
NUMBERP, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 1.0 0.0 ]
BV-MBIT-BITN
(PROVE-LEMMA BV-ADDER&CARRY-NAT
(REWRITE)
(IMPLIES (EQUAL (BV-LEN X) (BV-LEN Y))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY C X Y))
(PLUS (FIX-BIT C)
(BV-TO-NAT X)
(BV-TO-NAT Y)))))
This formula simplifies, appealing to the lemmas PLUS-COMMUTATIVITY and
PLUS-COMMUTATIVITY1, and unfolding the definitions of B1, B0P, B0, and FIX-BIT,
to the following two new formulas:
Case 2. (IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(NOT (EQUAL C 0)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY C X Y))
(PLUS (BV-TO-NAT X)
(BV-TO-NAT Y)
1))).
However this again simplifies, rewriting with PLUS-ADD1, PLUS-COMMUTATIVITY,
and PLUS-ADD1-1, to:
(IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(NOT (EQUAL C 0)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY C X Y))
(ADD1 (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))))),
which we will name *1.
Case 1. (IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(EQUAL C 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY C X Y))
(PLUS (BV-TO-NAT X)
(BV-TO-NAT Y)
0))).
However this again simplifies, applying PLUS-COMMUTATIVITY, and unfolding
the functions EQUAL and PLUS, to:
(IMPLIES (EQUAL (BV-LEN X) (BV-LEN Y))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(PLUS (BV-TO-NAT X) (BV-TO-NAT Y)))),
which we would normally push and work on later by induction. But if we must
use induction to prove the input conjecture, we prefer to induct on the
original formulation of the problem. Thus we will disregard all that we
have previously done, give the name *1 to the original input, and work on it.
So now let us return to:
(IMPLIES (EQUAL (BV-LEN X) (BV-LEN Y))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY C X Y))
(PLUS (FIX-BIT C)
(BV-TO-NAT X)
(BV-TO-NAT Y)))),
named *1. Let us appeal to the induction principle. There are five plausible
inductions. However, they merge into one likely candidate induction. We will
induct according to the following scheme:
(AND (IMPLIES (NLISTP X) (p C X Y))
(IMPLIES (AND (NOT (NLISTP X))
(p (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(p C X Y))).
Linear arithmetic, the lemma CDR-LESSP, and the definitions of VEC and NLISTP
can be used to prove that the measure (COUNT X) decreases according to the
well-founded relation LESSP in each induction step of the scheme. Note,
however, the inductive instances chosen for C and Y. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (NLISTP X)
(EQUAL (BV-LEN X) (BV-LEN Y)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY C X Y))
(PLUS (FIX-BIT C)
(BV-TO-NAT X)
(BV-TO-NAT Y)))).
This simplifies, rewriting with PLUS-COMMUTATIVITY, CDR-CONS, CAR-CONS, and
PLUS-COMMUTATIVITY1, and expanding the functions NLISTP, BV-LEN,
BV-ADDER&CARRY, B1, B0P, B0, FIX-BIT, PLUS, EQUAL, TIMES, BV-TO-NAT, VEC,
and BIT, to six new formulas:
Case 3.6.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL 0 (ADD1 (BV-LEN (VEC Y))))
(NOT (LISTP Y))
(NOT (EQUAL C 0)))
(EQUAL 1 (PLUS 0 1 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.5.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL 0 (ADD1 (BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL C 0))
(EQUAL 0 (PLUS 0 0 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.4.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL 0 (ADD1 (BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (CAR Y) 0)
(NOT (EQUAL C 0)))
(EQUAL 1
(PLUS 0 1
(TIMES 2 (BV-TO-NAT (VEC Y)))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.3.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL 0 (ADD1 (BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (CAR Y) 0)
(EQUAL C 0))
(EQUAL 0
(PLUS 0 0
(TIMES 2 (BV-TO-NAT (VEC Y)))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.2.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL 0 (ADD1 (BV-LEN (VEC Y))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL C 0)))
(EQUAL 1
(PLUS 0 1
(TIMES 2 (BV-TO-NAT (VEC Y)))
1))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.1.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL 0 (ADD1 (BV-LEN (VEC Y))))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL C 0))
(EQUAL 0
(PLUS 0 0
(TIMES 2 (BV-TO-NAT (VEC Y)))
1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NOT (NLISTP X))
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(EQUAL (BV-LEN X) (BV-LEN Y)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY C X Y))
(PLUS (FIX-BIT C)
(BV-TO-NAT X)
(BV-TO-NAT Y)))),
which simplifies, rewriting with the lemmas CDR-CONS, CAR-CONS,
PLUS-COMMUTATIVITY, PLUS-ASSOCIATIVITY, and PLUS-COMMUTATIVITY1, and
expanding the functions NLISTP, BV-LEN, BV-ADDER&CARRY, B1, B0P, B0, BIT,
B-EOR, VEC, BV-TO-NAT, FIX-BIT, EQUAL, and PLUS, to 24 new formulas:
Case 2.24.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(NOT (EQUAL (B-EOR C 1) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.23.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(EQUAL (B-EOR C 1) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.22.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(NOT (EQUAL (CAR X) 0))
(EQUAL C 0)
(NOT (EQUAL (B-EOR C 1) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.21.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(NOT (EQUAL (CAR X) 0))
(EQUAL C 0)
(EQUAL (B-EOR C 1) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.20.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(EQUAL (CAR X) 0)
(NOT (EQUAL C 0))
(NOT (EQUAL (B-EOR C 0) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.19.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(EQUAL (CAR X) 0)
(NOT (EQUAL C 0))
(EQUAL (B-EOR C 0) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.18.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(EQUAL (CAR X) 0)
(EQUAL C 0)
(NOT (EQUAL (B-EOR C 0) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.17.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(EQUAL (CAR X) 0)
(EQUAL C 0)
(EQUAL (B-EOR C 0) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.16.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 1)) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.15.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(EQUAL (B-EOR C (B-EOR 1 1)) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.14.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(EQUAL C 0)
(NOT (EQUAL (B-EOR C (B-EOR 1 1)) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.13.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL (CAR X) 0))
(EQUAL C 0)
(EQUAL (B-EOR C (B-EOR 1 1)) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.12.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(NOT (EQUAL C 0))
(NOT (EQUAL (B-EOR C (B-EOR 0 1)) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.11.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(NOT (EQUAL C 0))
(EQUAL (B-EOR C (B-EOR 0 1)) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.10.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(EQUAL C 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 1)) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.9.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0))
(EQUAL (CAR X) 0)
(EQUAL C 0)
(EQUAL (B-EOR C (B-EOR 0 1)) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.8.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(NOT (EQUAL (B-EOR C (B-EOR 1 0)) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.7.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(EQUAL (B-EOR C (B-EOR 1 0)) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.6.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(EQUAL C 0)
(NOT (EQUAL (B-EOR C (B-EOR 1 0)) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.5.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0)
(NOT (EQUAL (CAR X) 0))
(EQUAL C 0)
(EQUAL (B-EOR C (B-EOR 1 0)) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.4.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(NOT (EQUAL C 0))
(NOT (EQUAL (B-EOR C (B-EOR 0 0)) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.3.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(NOT (EQUAL C 0))
(EQUAL (B-EOR C (B-EOR 0 0)) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.2.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(EQUAL C 0)
(NOT (EQUAL (B-EOR C (B-EOR 0 0)) 0)))
(EQUAL
(PLUS 1
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES
(AND (LISTP X)
(NOT (EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y))))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0)
(EQUAL (CAR X) 0)
(EQUAL C 0)
(EQUAL (B-EOR C (B-EOR 0 0)) 0))
(EQUAL
(PLUS 0
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES
(AND (NOT (NLISTP X))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (FIX-BIT (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C))))
(BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))
(EQUAL (BV-LEN X) (BV-LEN Y)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY C X Y))
(PLUS (FIX-BIT C)
(BV-TO-NAT X)
(BV-TO-NAT Y)))),
which simplifies, applying PLUS-COMMUTATIVITY, PLUS-COMMUTATIVITY1, CDR-CONS,
CAR-CONS, TIMES-DISTRIBUTES-PLUS-NEW, PLUS-ASSOCIATIVITY, ADD1-EQUAL,
PLUS-ADD1, SUB1-ADD1, and PLUS-ADD1-1, and unfolding the functions NLISTP,
B1, B0P, B0, BIT, B-AND, B-OR, FIX-BIT, BV-LEN, BV-ADDER&CARRY, B-EOR, VEC,
BV-TO-NAT, EQUAL, and PLUS, to the following 18 new conjectures:
Case 1.18.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (CAR Y) 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(NOT (EQUAL C 0)))
(EQUAL (PLUS 1
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0)))
(PLUS 1
(TIMES 2 (BV-TO-NAT (VEC X)))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 1.17.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (CAR Y) 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(EQUAL C 0))
(EQUAL (PLUS 0
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0)))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.16.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (CAR Y) 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL C 0)))
(EQUAL (PLUS 1
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0)))
(PLUS 1
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))))),
which again simplifies, applying PLUS-COMMUTATIVITY, ADD1-EQUAL, and
PLUS-ADD1, and expanding the definitions of EQUAL and PLUS, to:
T.
Case 1.15.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (CAR Y) 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL C 0))
(EQUAL (PLUS 0
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0)))
(PLUS 0
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))))).
But this again simplifies, applying PLUS-COMMUTATIVITY and ADD1-EQUAL, and
opening up the definitions of B0, B0P, BIT, B-AND, B-OR, VEC, EQUAL, and
PLUS, to:
T.
Case 1.14.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL C 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(TIMES 2 (BV-TO-NAT (VEC X))))).
However this again simplifies, using linear arithmetic, to:
T.
Case 1.13.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL C 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1))),
which again simplifies, appealing to the lemmas PLUS-COMMUTATIVITY,
ADD1-EQUAL, PLUS-ADD1, TIMES-DISTRIBUTES-PLUS-NEW, and PLUS-ADD1-1, and
expanding B0, B0P, BIT, B1, B-AND, B-OR, VEC, EQUAL, and PLUS, to:
(IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 (CDR X) (CDR Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))
(LISTP Y)
(EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y)))
(NOT (EQUAL (CAR Y) 0)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(ADD1 (TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY 0
(CDR X)
(CDR Y))))))).
This again simplifies, rewriting with PLUS-ADD1, CDR-CONS, and CAR-CONS,
and unfolding VEC, B-OR, B-AND, B-EOR, B1, BIT, B0P, B0, BV-ADDER&CARRY,
and BV-TO-NAT, to:
T.
Case 1.12.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR X) 0)
(EQUAL C 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0))).
However this again simplifies, rewriting with PLUS-COMMUTATIVITY,
ADD1-EQUAL, and TIMES-DISTRIBUTES-PLUS-NEW, and opening up B0, B0P, BIT,
B-AND, B-OR, VEC, EQUAL, and PLUS, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 (CDR X) (CDR Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))
(LISTP Y)
(EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y)))
(EQUAL (CAR Y) 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY 0
(CDR X)
(CDR Y)))))),
which again simplifies, applying CDR-CONS and CAR-CONS, and opening up VEC,
B-OR, B-AND, B-EOR, BIT, B0P, B0, BV-ADDER&CARRY, PLUS, EQUAL, and
BV-TO-NAT, to:
T.
Case 1.11.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR Y) 0)
(EQUAL C 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
1))).
However this again simplifies, using linear arithmetic, to:
T.
Case 1.10.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR Y) 0)
(EQUAL C 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0)
(EQUAL (CAR X) 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.9.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR Y) 0)
(EQUAL C 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1))),
which again simplifies, appealing to the lemmas PLUS-COMMUTATIVITY,
ADD1-EQUAL, PLUS-ADD1, TIMES-DISTRIBUTES-PLUS-NEW, and PLUS-ADD1-1, and
expanding the functions B1, B0P, B0, BIT, B-AND, B-OR, VEC, EQUAL, and
PLUS, to the goal:
(IMPLIES
(AND (LISTP X)
(EQUAL (CAR Y) 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 (CDR X) (CDR Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))
(LISTP Y)
(EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y)))
(NOT (EQUAL (CAR X) 0)))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(ADD1 (TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY 0
(CDR X)
(CDR Y))))))).
This again simplifies, rewriting with PLUS-ADD1, CDR-CONS, and CAR-CONS,
and opening up VEC, B-OR, B-AND, B-EOR, BIT, B0, B0P, B1, BV-ADDER&CARRY,
and BV-TO-NAT, to:
T.
Case 1.8.
(IMPLIES
(AND
(LISTP X)
(EQUAL (CAR Y) 0)
(EQUAL C 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
0))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR X) 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(PLUS 0
(TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0))).
However this again simplifies, appealing to the lemmas PLUS-COMMUTATIVITY,
ADD1-EQUAL, and TIMES-DISTRIBUTES-PLUS-NEW, and unfolding B0, B0P, BIT,
B-AND, B-OR, VEC, EQUAL, and PLUS, to the formula:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR Y) 0)
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 (CDR X) (CDR Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))
(LISTP Y)
(EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y)))
(EQUAL (CAR X) 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY 0 X Y))
(TIMES 2
(BV-TO-NAT (BV-ADDER&CARRY 0
(CDR X)
(CDR Y)))))).
But this again simplifies, rewriting with CDR-CONS and CAR-CONS, and
expanding VEC, B-OR, B-AND, B-EOR, BIT, B0P, B0, BV-ADDER&CARRY, PLUS,
EQUAL, and BV-TO-NAT, to:
T.
Case 1.7.
(IMPLIES
(AND
(LISTP X)
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL C 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1))
(EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y)))
(NOT (EQUAL (CAR X) 0)))
(EQUAL (PLUS 1
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1)))
(ADD1 (ADD1 (PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1))))).
However this again simplifies, rewriting with PLUS-ADD1,
PLUS-COMMUTATIVITY, PLUS-ADD1-1, TIMES-ADD1, and
TIMES-DISTRIBUTES-PLUS-NEW, and expanding the functions SUB1, NUMBERP,
EQUAL, and PLUS, to:
T.
Case 1.6.
(IMPLIES
(AND
(LISTP X)
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(NOT (EQUAL C 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1))
(EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y)))
(EQUAL (CAR X) 0))
(EQUAL (PLUS 0
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1)))
(ADD1 (ADD1 (PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0))))).
But this again simplifies, rewriting with PLUS-ADD1, PLUS-COMMUTATIVITY,
PLUS-ADD1-1, TIMES-ADD1, and TIMES-DISTRIBUTES-PLUS-NEW, and expanding the
definitions of SUB1, NUMBERP, EQUAL, and PLUS, to:
T.
Case 1.5.
(IMPLIES
(AND
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1))
(NOT (LISTP Y))
(EQUAL (ADD1 (BV-LEN (VEC X))) 0))
(EQUAL (PLUS 0
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1)))
(ADD1 (ADD1 (TIMES 2 (BV-TO-NAT (VEC X))))))).
This again simplifies, using linear arithmetic, to:
T.
Case 1.4.
(IMPLIES
(AND
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(NOT (EQUAL (CAR Y) 0)))
(EQUAL (PLUS 1
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1)))
(ADD1 (ADD1 (PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
1))))),
which again simplifies, rewriting with PLUS-ADD1, PLUS-COMMUTATIVITY,
PLUS-ADD1-1, ADD1-EQUAL, TIMES-ADD1, and TIMES-DISTRIBUTES-PLUS-NEW, and
opening up the functions SUB1, NUMBERP, EQUAL, and PLUS, to:
T.
Case 1.3.
(IMPLIES
(AND
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(NOT (EQUAL C 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1))
(LISTP Y)
(EQUAL (ADD1 (BV-LEN (VEC X)))
(ADD1 (BV-LEN (VEC Y))))
(EQUAL (CAR Y) 0))
(EQUAL (PLUS 0
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1)))
(ADD1 (ADD1 (PLUS (TIMES 2 (BV-TO-NAT (VEC X)))
(TIMES 2 (BV-TO-NAT (VEC Y)))
0))))).
However this again simplifies, applying PLUS-ADD1, PLUS-COMMUTATIVITY,
PLUS-ADD1-1, ADD1-EQUAL, TIMES-ADD1, and TIMES-DISTRIBUTES-PLUS-NEW, and
unfolding SUB1, NUMBERP, EQUAL, and PLUS, to:
T.
Case 1.2.
(IMPLIES
(AND
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1))
(EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y)))
(NOT (EQUAL C 0)))
(EQUAL (PLUS 1
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1)))
(ADD1 (ADD1 (PLUS 1
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))))))).
However this again simplifies, appealing to the lemmas PLUS-ADD1,
PLUS-COMMUTATIVITY, PLUS-ADD1-1, and TIMES-ADD1, and expanding the
functions SUB1, NUMBERP, EQUAL, and PLUS, to:
T.
Case 1.1.
(IMPLIES
(AND
(LISTP X)
(NOT (EQUAL (CAR X) 0))
(LISTP Y)
(NOT (EQUAL (CAR Y) 0))
(EQUAL (BV-TO-NAT (BV-ADDER&CARRY (B-OR (B-AND (BIT X) (BIT Y))
(B-OR (B-AND (BIT X) C)
(B-AND (BIT Y) C)))
(VEC X)
(VEC Y)))
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1))
(EQUAL (BV-LEN (VEC X))
(BV-LEN (VEC Y)))
(EQUAL C 0))
(EQUAL (PLUS 0
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))
1)))
(ADD1 (ADD1 (PLUS 0
(TIMES 2
(PLUS (BV-TO-NAT (VEC X))
(BV-TO-NAT (VEC Y))))))))),
which again simplifies, rewriting with PLUS-ADD1, PLUS-COMMUTATIVITY,
PLUS-ADD1-1, and TIMES-ADD1, and unfolding B1, B0P, B0, BIT, B-AND, B-OR,
VEC, SUB1, NUMBERP, EQUAL, and PLUS, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.5 0.2 ]
BV-ADDER&CARRY-NAT
(PROVE-LEMMA BV-ADDER-NAT
(REWRITE)
(IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(BITP C))
(EQUAL (BV-TO-NAT (BV-ADDER C X Y))
(ADDER (BV-LEN X)
C
(BV-TO-NAT X)
(BV-TO-NAT Y))))
((DISABLE REMAINDER)))
This formula can be simplified, using the abbreviations AND, IMPLIES, HEAD,
and ADDER, to:
(IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(BITP C))
(EQUAL (BV-TO-NAT (BV-ADDER C X Y))
(REMAINDER (PLUS C (BV-TO-NAT X) (BV-TO-NAT Y))
(EXP 2 (BV-LEN X))))),
which simplifies, applying BV-ADDER-BRIDGE, BV-ADDER&CARRY-NAT, BV-HEAD-NAT,
PLUS-ADD1, SUB1-ADD1, and REMAINDER-ADD1, and opening up the functions BITP,
FIX-BIT, EQUAL, PLUS, and LESSP, to the following three new conjectures:
Case 3. (IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(EQUAL C 0)
(LESSP (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(EXP 2 (BV-LEN X))))
(EQUAL (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(REMAINDER (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(EXP 2 (BV-LEN X))))).
But this again simplifies, rewriting with REMAINDER-EXIT, to:
T.
Case 2. (IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(EQUAL C 1)
(NOT (EQUAL (EXP 2 (BV-LEN X)) 0))
(EQUAL (REMAINDER (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(EXP 2 (BV-LEN X)))
(SUB1 (EXP 2 (BV-LEN X))))
(LESSP (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(SUB1 (EXP 2 (BV-LEN X)))))
(EQUAL (ADD1 (PLUS (BV-TO-NAT X) (BV-TO-NAT Y)))
0)).
This again simplifies, using linear arithmetic and rewriting with
REMAINDER-EXIT, REMAINDER-LESSP-LINEAR, and ADD1-SUB1, to the new goal:
(IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(NOT (EQUAL (EXP 2 (BV-LEN X)) 0))
(EQUAL (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(SUB1 (EXP 2 (BV-LEN X)))))
(NOT (LESSP (SUB1 (EXP 2 (BV-LEN X)))
(SUB1 (EXP 2 (BV-LEN X)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (EQUAL (BV-LEN X) (BV-LEN Y))
(EQUAL C 1)
(NOT (EQUAL (EXP 2 (BV-LEN X)) 0))
(NOT (EQUAL (REMAINDER (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(EXP 2 (BV-LEN X)))
(SUB1 (EXP 2 (BV-LEN X)))))
(LESSP (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(SUB1 (EXP 2 (BV-LEN X)))))
(EQUAL (ADD1 (PLUS (BV-TO-NAT X) (BV-TO-NAT Y)))
(ADD1 (REMAINDER (PLUS (BV-TO-NAT X) (BV-TO-NAT Y))
(EXP 2 (BV-LEN X)))))),
which again simplifies, using linear arithmetic and applying REMAINDER-EXIT,
to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
BV-ADDER-NAT
(PROVE-LEMMA ADD-EVENP
(REWRITE)
(IMPLIES (AND (EVENP X) (EVENP Y))
(EVENP (ADD N X Y))))
WARNING: Note that the rewrite rule ADD-EVENP will be stored so as to apply
only to terms with the nonrecursive function symbol EVENP.
This conjecture can be simplified, using the abbreviations AND, IMPLIES, HEAD,
ADD, B0, BCAR, B0P, and EVENP, to:
(IMPLIES (AND (EQUAL (REMAINDER X 2) 0)
(EQUAL (REMAINDER Y 2) 0))
(EQUAL (REMAINDER (REMAINDER (PLUS X Y) (EXP 2 N))
2)
0)).
This simplifies, applying REMAINDER-PLUS2 and REMAINDER-REMAINDER-2, and
unfolding the definition of EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
ADD-EVENP
(DISABLE EVENP)
[ 0.0 0.0 0.0 ]
EVENP-OFF
(PROVE-LEMMA LOGNOT-0
(REWRITE)
(IMPLIES (NOT (NUMBERP X))
(AND (EQUAL (LOGNOT X Y) (LOGNOT 0 Y))
(EQUAL (LOGNOT Y X) (LOGNOT Y 0)))))
WARNING: Note that the rewrite rule LOGNOT-0 will be stored so as to apply
only to terms with the nonrecursive function symbol LOGNOT.
WARNING: Note that the rewrite rule LOGNOT-0 will be stored so as to apply
only to terms with the nonrecursive function symbol LOGNOT.
WARNING: Note that the proposed lemma LOGNOT-0 is to be stored as zero type
prescription rules, zero compound recognizer rules, zero linear rules, and two
replacement rules.
This simplifies, using linear arithmetic, applying REMAINDER-1, EXP-OF-2-0,
REMAINDER-EXIT, and REMAINDER-0, and expanding the definitions of SUB1,
DIFFERENCE, HEAD, EXP, LOGNOT, EQUAL, and AND, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LOGNOT-0
(PROVE-LEMMA LOGNOT-NAT-RANGEP
(REWRITE)
(NAT-RANGEP (LOGNOT N X) N))
WARNING: Note that the rewrite rule LOGNOT-NAT-RANGEP will be stored so as to
apply only to terms with the nonrecursive function symbol NAT-RANGEP.
This conjecture can be simplified, using the abbreviation NAT-RANGEP, to:
(LESSP (LOGNOT N X) (EXP 2 N)).
This simplifies, unfolding HEAD and LOGNOT, to:
(LESSP (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EXP 2 N)),
which again simplifies, using linear arithmetic, to two new goals:
Case 2. (IMPLIES (NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(LESSP (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EXP 2 N))),
which again simplifies, using linear arithmetic, applying the lemmas
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and unfolding EQUAL, to:
T.
Case 1. (IMPLIES (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N)))
(LESSP (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EXP 2 N))),
which again simplifies, using linear arithmetic, appealing to the lemmas
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and unfolding EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LOGNOT-NAT-RANGEP
(PROVE-LEMMA LOGNOT-LOGNOT
(REWRITE)
(EQUAL (LOGNOT N (LOGNOT N X))
(HEAD X N)))
WARNING: Note that the rewrite rule LOGNOT-LOGNOT will be stored so as to
apply only to terms with the nonrecursive function symbol LOGNOT.
This conjecture can be simplified, using the abbreviation HEAD, to the
conjecture:
(EQUAL (LOGNOT N (LOGNOT N X))
(REMAINDER X (EXP 2 N))).
This simplifies, applying REMAINDER-0, DIFFERENCE-DIFFERENCE1, DIFFERENCE-X-X,
DIFFERENCE-LESSP, REMAINDER-LESSP, DIFFERENCE=0, and REMAINDER-SUB1, and
unfolding the definitions of HEAD, LOGNOT, PLUS, EQUAL, and REMAINDER, to four
new goals:
Case 4. (IMPLIES (AND (NOT (EQUAL (EXP 2 N) 0))
(EQUAL (REMAINDER X (EXP 2 N)) 0))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N))))
(REMAINDER X (EXP 2 N)))),
which again simplifies, using linear arithmetic, to two new goals:
Case 4.2.
(IMPLIES (AND (NOT (LESSP (SUB1 (EXP 2 N)) (EXP 2 N)))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (REMAINDER X (EXP 2 N)) 0))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N))))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.1.
(IMPLIES (AND (LESSP (EXP 2 N) (SUB1 (EXP 2 N)))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (REMAINDER X (EXP 2 N)) 0))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N))))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NOT (EQUAL (EXP 2 N) 0))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N))))
(REMAINDER X (EXP 2 N)))),
which again simplifies, using linear arithmetic and appealing to the lemma
REMAINDER-LESSP-LINEAR, to:
T.
Case 2. (IMPLIES
(EQUAL (EXP 2 N) 0)
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))),
which again simplifies, using linear arithmetic, to four new formulas:
Case 2.4.
(IMPLIES
(AND (NOT (LESSP (SUB1 (DIFFERENCE 0 (REMAINDER X 0)))
0))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0)))))
(REMAINDER X 0))),
which again simplifies, using linear arithmetic, to two new conjectures:
Case 2.4.2.
(IMPLIES
(AND (NOT (LESSP (REMAINDER X 0) 0))
(NOT (LESSP (SUB1 (DIFFERENCE 0 (REMAINDER X 0)))
0))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0)))))
(REMAINDER X 0))),
which again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and opening up the function EQUAL, to:
T.
Case 2.4.1.
(IMPLIES
(AND (LESSP 0 (REMAINDER X 0))
(NOT (LESSP (SUB1 (DIFFERENCE 0 (REMAINDER X 0)))
0))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0)))))
(REMAINDER X 0))),
which again simplifies, using linear arithmetic, applying EXP-OF-2-0,
and expanding the definition of EQUAL, to:
T.
Case 2.3.
(IMPLIES
(AND (LESSP 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0))))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0)))))
(REMAINDER X 0))).
However this again simplifies, using linear arithmetic, to two new
formulas:
Case 2.3.2.
(IMPLIES
(AND (NOT (LESSP (REMAINDER X 0) 0))
(LESSP 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0))))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0)))))
(REMAINDER X 0))),
which again simplifies, using linear arithmetic, applying EXP-OF-2-0,
and unfolding the definition of EQUAL, to:
T.
Case 2.3.1.
(IMPLIES
(AND (LESSP 0 (REMAINDER X 0))
(LESSP 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0))))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0)))))
(REMAINDER X 0))).
This again simplifies, using linear arithmetic, applying EXP-OF-2-0, and
expanding EQUAL, to:
T.
Case 2.2.
(IMPLIES
(AND (NOT (LESSP (REMAINDER X 0) 0))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0)))))
(REMAINDER X 0))).
But this again simplifies, using linear arithmetic, rewriting with the
lemma EXP-OF-2-0, and expanding EQUAL, to:
T.
Case 2.1.
(IMPLIES
(AND (LESSP 0 (REMAINDER X 0))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE 0
(SUB1 (DIFFERENCE 0 (REMAINDER X 0)))))
(REMAINDER X 0))),
which again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and unfolding the function EQUAL, to:
T.
Case 1. (IMPLIES
(AND (NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))).
This again simplifies, using linear arithmetic, to four new formulas:
Case 1.4.
(IMPLIES
(AND (NOT (LESSP (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 1.4.2.
(IMPLIES
(AND (NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(NOT (LESSP (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and opening up the definition of
EQUAL, to:
T.
Case 1.4.1.
(IMPLIES
(AND (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N)))
(NOT (LESSP (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))).
However this again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and opening up the definition of
EQUAL, to:
T.
Case 1.3.
(IMPLIES
(AND (LESSP (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))).
This again simplifies, using linear arithmetic, to two new goals:
Case 1.3.2.
(IMPLIES
(AND (NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(LESSP (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and expanding the definition of
EQUAL, to:
T.
Case 1.3.1.
(IMPLIES
(AND (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N)))
(LESSP (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))).
But this again simplifies, using linear arithmetic, rewriting with the
lemmas REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and unfolding EQUAL, to:
T.
Case 1.2.
(IMPLIES
(AND (NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and expanding the definition of
EQUAL, to:
T.
Case 1.1.
(IMPLIES
(AND (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
0)))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))
(REMAINDER X (EXP 2 N)))).
But this again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and unfolding the definition of
EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LOGNOT-LOGNOT
(PROVE-LEMMA LOGNOT-CANCEL
(REWRITE)
(IMPLIES (AND (NAT-RANGEP X N)
(NAT-RANGEP Y N))
(EQUAL (EQUAL (LOGNOT N X) (LOGNOT N Y))
(EQUAL (FIX X) (FIX Y)))))
This formula can be simplified, using the abbreviations AND, IMPLIES, and
NAT-RANGEP, to the new formula:
(IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N)))
(EQUAL (EQUAL (LOGNOT N X) (LOGNOT N Y))
(EQUAL (FIX X) (FIX Y)))),
which simplifies, rewriting with REMAINDER-EXIT, and expanding HEAD, LOGNOT,
and FIX, to the following six new formulas:
Case 6. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NUMBERP Y)
(NUMBERP X)
(NOT (EQUAL X Y)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) X))
(SUB1 (DIFFERENCE (EXP 2 N) Y))))).
This again simplifies, using linear arithmetic, to two new conjectures:
Case 6.2.
(IMPLIES (AND (LESSP (EXP 2 N) X)
(LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NUMBERP Y)
(NUMBERP X)
(NOT (EQUAL X Y)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) X))
(SUB1 (DIFFERENCE (EXP 2 N) Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.1.
(IMPLIES (AND (LESSP (EXP 2 N) Y)
(LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NUMBERP Y)
(NUMBERP X)
(NOT (EQUAL X Y)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) X))
(SUB1 (DIFFERENCE (EXP 2 N) Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 5. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NUMBERP Y)
(NUMBERP X)
(EQUAL X Y))
(EQUAL (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) X))
(SUB1 (DIFFERENCE (EXP 2 N) Y)))
T)),
which again simplifies, expanding EQUAL, to:
T.
Case 4. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NUMBERP Y)
(NOT (NUMBERP X))
(NOT (EQUAL 0 Y)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Y))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (EXP 2 N) Y)
(LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NUMBERP Y)
(NOT (NUMBERP X))
(NOT (EQUAL 0 Y)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Y))))).
However this again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NUMBERP Y)
(NOT (NUMBERP X))
(EQUAL 0 Y))
(EQUAL (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Y)))
T)),
which again simplifies, unfolding LESSP, EQUAL, NUMBERP, and DIFFERENCE, to:
T.
Case 2. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NOT (NUMBERP Y))
(NUMBERP X)
(NOT (EQUAL X 0)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) X))
(SUB1 (DIFFERENCE (EXP 2 N) 0))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (EXP 2 N) X)
(LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NOT (NUMBERP Y))
(NUMBERP X)
(NOT (EQUAL X 0)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) X))
(SUB1 (DIFFERENCE (EXP 2 N) 0))))).
This again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N))
(NOT (NUMBERP Y))
(NUMBERP X)
(EQUAL X 0))
(EQUAL (EQUAL (SUB1 (DIFFERENCE (EXP 2 N) X))
(SUB1 (DIFFERENCE (EXP 2 N) 0)))
T)),
which again simplifies, expanding EQUAL, LESSP, NUMBERP, and DIFFERENCE, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LOGNOT-CANCEL
(PROVE-LEMMA LOGNOT-INT
(REWRITE)
(IMPLIES (AND (NAT-RANGEP X N) (NOT (ZEROP N)))
(EQUAL (NAT-TO-INT (LOGNOT N X) N)
(IPLUS -1 (INEG (NAT-TO-INT X N))))))
WARNING: Note that the rewrite rule LOGNOT-INT will be stored so as to apply
only to terms with the nonrecursive function symbol NAT-TO-INT.
This conjecture can be simplified, using the abbreviations ZEROP, NOT, AND,
IMPLIES, and NAT-RANGEP, to:
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL (NAT-TO-INT (LOGNOT N X) N)
(IPLUS -1 (INEG (NAT-TO-INT X N))))).
This simplifies, applying the lemma REMAINDER-EXIT, and opening up HEAD,
LOGNOT, and NAT-TO-INT, to the following four new formulas:
Case 4. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (NUMBERP X)))
(EQUAL (NAT-TO-INT (SUB1 (DIFFERENCE (EXP 2 N) 0))
N)
(IPLUS -1
(INEG (MINUS (DIFFERENCE (EXP 2 N) X)))))).
This again simplifies, using linear arithmetic, applying TIMES-LESSP, and
opening up the definitions of EXP, EQUAL, NUMBERP, and LESSP, to:
T.
Case 3. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NUMBERP X))
(EQUAL (NAT-TO-INT (SUB1 (DIFFERENCE (EXP 2 N) X))
N)
(IPLUS -1
(INEG (MINUS (DIFFERENCE (EXP 2 N) X)))))).
But this again simplifies, applying DIFFERENCE=0, NEGATIVE-GUTS-MINUS,
DIFFERENCE-DIFFERENCE1, TIMES-EQUAL-0, SUB1-ADD1, PLUS-COMMUTATIVITY,
PLUS-ADD1, and LESSP-OF-1, and opening up the functions EXP, NAT-TO-INT,
IZEROP, INTEGERP, NEGATIVE-GUTS, NEGP, FIX-INT, INEG, DIFFERENCE, EQUAL,
NUMBERP, and IPLUS, to the following three new goals:
Case 3.3.
(IMPLIES (AND (LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NUMBERP X)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
0)).
This again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and opening up the function EQUAL, to:
T.
Case 3.2.
(IMPLIES (AND (LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NUMBERP X)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
X))).
But this again simplifies, using linear arithmetic, to three new
conjectures:
Case 3.2.3.
(IMPLIES (AND (LESSP (TIMES 2 (EXP 2 (SUB1 N))) X)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NUMBERP X)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
X))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.2.2.
(IMPLIES (AND (LESSP (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
X)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NUMBERP X)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
X))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.2.1.
(IMPLIES (AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NUMBERP X)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
X))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.1.
(IMPLIES (AND (LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NUMBERP X))
(LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (TIMES 2 (EXP 2 (SUB1 N))) X)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NUMBERP X))
(LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X))
(EQUAL (NAT-TO-INT (SUB1 (DIFFERENCE (EXP 2 N) X))
N)
(IPLUS -1 (INEG X)))),
which again simplifies, using linear arithmetic, applying TIMES-LESSP, and
expanding the functions EXP, EQUAL, NUMBERP, NAT-TO-INT, NEGP, IZEROP,
INTEGERP, FIX-INT, and INEG, to the following four new goals:
Case 2.4.
(IMPLIES
(AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (EQUAL X 0))
(NOT (LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))))
(EQUAL
(MINUS (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))))
(IPLUS -1 (MINUS X)))).
However this again simplifies, rewriting with PLUS-ADD1,
NEGATIVE-GUTS-MINUS, and MINUS-EQUAL, and expanding the definitions of
NEGATIVE-GUTS, NEGP, and IPLUS, to:
(IMPLIES
(AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (EQUAL X 0))
(NOT (LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(ADD1 X))),
which again simplifies, using linear arithmetic, to three new conjectures:
Case 2.4.3.
(IMPLIES
(AND (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (EQUAL X 0))
(NOT (LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(ADD1 X))),
which again simplifies, using linear arithmetic, to two new conjectures:
Case 2.4.3.2.
(IMPLIES
(AND (NOT (LESSP X (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (EQUAL X 0))
(NOT (LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(ADD1 X))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.4.3.1.
(IMPLIES
(AND (LESSP (TIMES 2 (EXP 2 (SUB1 N))) X)
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (EQUAL X 0))
(NOT (LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(ADD1 X))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.4.2.
(IMPLIES
(AND (NOT (LESSP X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (EQUAL X 0))
(NOT (LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(ADD1 X))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.4.1.
(IMPLIES
(AND (LESSP (TIMES 2 (EXP 2 (SUB1 N))) X)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (EQUAL X 0))
(NOT (LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(ADD1 X))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (EQUAL X 0))
(LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N))))
(EQUAL (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(IPLUS -1 (MINUS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.2.
(IMPLIES
(AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(EQUAL X 0)
(NOT (LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N)))))
(EQUAL
(MINUS (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))))
(IPLUS -1 0))),
which again simplifies, applying the lemmas TIMES-EQUAL-0,
NEGATIVE-GUTS-MINUS, and MINUS-EQUAL, and opening up EQUAL, LESSP, NUMBERP,
DIFFERENCE, IPLUS, and NEGATIVE-GUTS, to the goal:
(IMPLIES (AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
1)).
However this again simplifies, using linear arithmetic, to two new
formulas:
Case 2.2.2.
(IMPLIES (AND (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
1)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
1)).
This again simplifies, using linear arithmetic, to:
T.
Case 2.2.1.
(IMPLIES (AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
1)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(EQUAL X 0)
(LESSP (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(EXP 2 (SUB1 N))))
(EQUAL (SUB1 (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(IPLUS -1 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (NUMBERP X)))
(EQUAL (NAT-TO-INT (SUB1 (DIFFERENCE (EXP 2 N) 0))
N)
(IPLUS -1 (INEG 0)))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
TIMES-LESSP and TIMES-EQUAL-0, and unfolding the functions EXP, EQUAL,
NUMBERP, LESSP, DIFFERENCE, NAT-TO-INT, INEG, and IPLUS, to two new goals:
Case 1.2.
(IMPLIES
(AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (NUMBERP X)))
(EQUAL (MINUS (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
-1)),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS and MINUS-EQUAL,
and unfolding the functions NEGATIVE-GUTS and NUMBERP, to the new
conjecture:
(IMPLIES (AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (NUMBERP X)))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
1)),
which again simplifies, using linear arithmetic, to two new goals:
Case 1.2.2.
(IMPLIES (AND (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (NUMBERP X)))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
1)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (NUMBERP X)))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
1)).
But this again simplifies, using linear arithmetic, to:
T.
Case 1.2.1.
(IMPLIES (AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (NUMBERP X)))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
1)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (NUMBERP X)))
(NOT (LESSP (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(EXP 2 (SUB1 N))))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.1 0.1 ]
LOGNOT-INT
(PROVE-LEMMA ADDER-LOGNOT
(REWRITE)
(IMPLIES (BITP C)
(EQUAL (LOGNOT N (ADDER N C X Y))
(ADDER N
(B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))))
((DISABLE PLUS DIFFERENCE)))
WARNING: Note that the rewrite rule ADDER-LOGNOT will be stored so as to
apply only to terms with the nonrecursive function symbol LOGNOT.
This formula can be simplified, using the abbreviations IMPLIES, HEAD, and
ADDER, to:
(IMPLIES (BITP C)
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))),
which simplifies, using linear arithmetic, rewriting with REMAINDER-0,
REMAINDER-PLUS2, REMAINDER-REMAINDER-EXP2, PLUS-ADD1, REMAINDER-EXIT,
REMAINDER-ADD1, and DIFFERENCE-0, and expanding the definitions of BITP, EQUAL,
HEAD, LOGNOT, B-NOT, REMAINDER, SUB1, and PLUS, to the following 18 new goals:
Case 18.(IMPLIES (AND (EQUAL C 0)
(LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))).
But this again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and expanding EQUAL, to:
T.
Case 17.(IMPLIES (AND (EQUAL C 0)
(NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))))
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))).
This again simplifies, using linear arithmetic, appealing to the lemmas
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and opening up EQUAL, to:
T.
Case 16.(IMPLIES (AND (EQUAL C 0)
(LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, applying the lemmas
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and expanding the definition of EQUAL,
to:
T.
Case 15.(IMPLIES (AND (EQUAL C 0)
(NOT (LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))))
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, applying
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and expanding EQUAL, to:
T.
Case 14.(IMPLIES
(AND
(EQUAL C 0)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
0)).
However this again simplifies, using linear arithmetic, to:
T.
Case 13.(IMPLIES (AND (EQUAL C 0)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
0)),
which again simplifies, applying REMAINDER-LESSP, LESSP-SUB1, DIFFERENCE=0,
and SUB1-OF-1, to the new conjecture:
(IMPLIES (AND (NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N)))
1)).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace Y by:
(PLUS Z (TIMES (EXP 2 N) V))
to eliminate (REMAINDER Y (EXP 2 N)) and (QUOTIENT Y (EXP 2 N)). We employ
REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. We thus obtain the following
three new formulas:
Case 13.3.
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N)))
1)).
This further simplifies, using linear arithmetic, applying REMAINDER-EXIT,
PLUS-COMMUTATIVITY, and REMAINDER-PLUS1, and opening up the definitions of
EQUAL and LESSP, to:
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
1)),
which again simplifies, using linear arithmetic, to three new conjectures:
Case 13.3.3.
(IMPLIES
(AND (NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
1)),
which finally simplifies, using linear arithmetic and applying
REMAINDER-LESSP-LINEAR, to:
T.
Case 13.3.2.
(IMPLIES
(AND (NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
1)).
This finally simplifies, using linear arithmetic, to:
T.
Case 13.3.1.
(IMPLIES
(AND (LESSP (EXP 2 N) 0)
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))
1)),
which finally simplifies, using linear arithmetic, to:
T.
Case 13.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N)))
1)),
which further simplifies, obviously, to:
T.
Case 13.1.
(IMPLIES
(AND (NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N)))
1)).
But this further simplifies, rewriting with PLUS-COMMUTATIVITY,
TIMES-COMMUTATIVITY, and REMAINDER-PLUS-PLUS-TIMES2, and unfolding the
functions ZEROP and NOT, to:
(IMPLIES
(AND (NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N)))
1)).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace X by:
(PLUS W (TIMES (EXP 2 N) D))
to eliminate (REMAINDER X (EXP 2 N)) and (QUOTIENT X (EXP 2 N)). We use
REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. We thus obtain the following
three new formulas:
Case 13.1.3.
(IMPLIES
(AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N)))
1)).
But this further simplifies, using linear arithmetic, appealing to the
lemmas REMAINDER-EXIT, PLUS-COMMUTATIVITY, and REMAINDER-PLUS2, and
opening up the definitions of EQUAL and LESSP, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N) Z) 1)).
This again simplifies, using linear arithmetic, to two new goals:
Case 13.1.3.2.
(IMPLIES (AND (NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N) Z) 1)),
which finally simplifies, using linear arithmetic, to:
T.
Case 13.1.3.1.
(IMPLIES (AND (LESSP (EXP 2 N) 0)
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N) Z) 1)),
which finally simplifies, using linear arithmetic, to:
T.
Case 13.1.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N))))
(EQUAL (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N)))
1)),
which finally simplifies, clearly, to:
T.
Case 13.1.1.
(IMPLIES
(AND (NUMBERP W)
(EQUAL (LESSP W (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(SUB1 (EXP 2 N))))
(EQUAL
(DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N)))
1)).
But this further simplifies, using linear arithmetic, applying the
lemmas PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, PLUS-ASSOCIATIVITY,
REMAINDER-EXIT, and REMAINDER-PLUS-PLUS-TIMES2, and opening up the
definitions of ZEROP and NOT, to two new formulas:
Case 13.1.1.2.
(IMPLIES
(AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N)))
(NOT (LESSP W (EXP 2 N))))
(EQUAL
(DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N)))
1)),
which finally simplifies, trivially, to:
T.
Case 13.1.1.1.
(IMPLIES (AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N)))
(NOT F))
(EQUAL (DIFFERENCE (EXP 2 N) (PLUS W Z))
1)).
But this again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (EXP 2 N) (PLUS W Z))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N)))
(NOT F))
(EQUAL (DIFFERENCE (EXP 2 N) (PLUS W Z))
1)).
But this finally simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES
(AND
(EQUAL C 0)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))))),
which again simplifies, applying REMAINDER-LESSP, to the new conjecture:
(IMPLIES
(AND
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace Y by:
(PLUS Z (TIMES (EXP 2 N) V))
to eliminate (REMAINDER Y (EXP 2 N)) and (QUOTIENT Y (EXP 2 N)). We rely
upon REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. We thus obtain the following
three new conjectures:
Case 12.3.
(IMPLIES
(AND
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))))).
This further simplifies, using linear arithmetic, applying REMAINDER-EXIT,
PLUS-COMMUTATIVITY, and REMAINDER-PLUS1, and expanding EQUAL and LESSP, to:
(IMPLIES
(AND
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))))),
which again simplifies, using linear arithmetic, to three new formulas:
Case 12.3.3.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))))),
which finally simplifies, using linear arithmetic and rewriting with
REMAINDER-LESSP-LINEAR, to:
T.
Case 12.3.2.
(IMPLIES
(AND
(NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))))).
But this finally simplifies, using linear arithmetic, to:
T.
Case 12.3.1.
(IMPLIES
(AND
(LESSP (EXP 2 N) 0)
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 12.2.
(IMPLIES
(AND
(NOT (NUMBERP (EXP 2 N)))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))))),
which further simplifies, clearly, to:
T.
Case 12.1.
(IMPLIES
(AND
(NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N))))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))))).
However this further simplifies, appealing to the lemmas
PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, and REMAINDER-PLUS-PLUS-TIMES2,
and opening up the definitions of ZEROP and NOT, to:
(IMPLIES
(AND
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))))).
Appealing to the lemma REMAINDER-QUOTIENT-ELIM, we now replace X by:
(PLUS W (TIMES (EXP 2 N) D))
to eliminate (REMAINDER X (EXP 2 N)) and (QUOTIENT X (EXP 2 N)). We
employ REMAINDER-LESSP, the type restriction lemma noted when REMAINDER
was introduced, and the type restriction lemma noted when QUOTIENT was
introduced to constrain the new variables. This generates three new
conjectures:
Case 12.1.3.
(IMPLIES
(AND
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))))),
which further simplifies, using linear arithmetic, appealing to the
lemmas REMAINDER-EXIT, PLUS-COMMUTATIVITY, and REMAINDER-PLUS2, and
opening up the definitions of EQUAL and LESSP, to the conjecture:
(IMPLIES
(AND
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) Z))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))))).
However this again simplifies, using linear arithmetic, to two new goals:
Case 12.1.3.2.
(IMPLIES
(AND
(NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) Z))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 12.1.3.1.
(IMPLIES
(AND
(LESSP (EXP 2 N) 0)
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) Z))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 12.1.2.
(IMPLIES
(AND
(NOT (NUMBERP (EXP 2 N)))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT
(EQUAL
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N))))
(ADD1
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))))),
which finally simplifies, trivially, to:
T.
Case 12.1.1.
(IMPLIES
(AND
(NUMBERP W)
(EQUAL (LESSP W (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1
(DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N))))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N))))).
But this further simplifies, using linear arithmetic, rewriting with
PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, PLUS-ASSOCIATIVITY,
REMAINDER-EXIT, and REMAINDER-PLUS-PLUS-TIMES2, and expanding the
definitions of ZEROP and NOT, to the following two new goals:
Case 12.1.1.2.
(IMPLIES
(AND
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(SUB1 (EXP 2 N))))
(NOT (LESSP W (EXP 2 N))))
(EQUAL
(SUB1
(DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N))))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N))))).
This finally simplifies, obviously, to:
T.
Case 12.1.1.1.
(IMPLIES
(AND
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(SUB1 (EXP 2 N))))
(NOT F))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (PLUS W Z)))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))))).
This again simplifies, using linear arithmetic, to two new goals:
Case 12.1.1.1.2.
(IMPLIES
(AND
(NOT (LESSP (PLUS W Z) (EXP 2 N)))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT
(EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(SUB1 (EXP 2 N))))
(NOT F))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) (PLUS W Z)))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 12.1.1.1.1.
(IMPLIES
(AND
(LESSP (EXP 2 N) (PLUS W Z))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT
(EQUAL (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(SUB1 (EXP 2 N))))
(NOT F))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) (PLUS W Z)))
(ADD1 (DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES
(AND (EQUAL C 0)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.(IMPLIES
(AND (EQUAL C 0)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))))),
which again simplifies, appealing to the lemma REMAINDER-LESSP, to the
conjecture:
(IMPLIES
(AND (NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))))).
Appealing to the lemma REMAINDER-QUOTIENT-ELIM, we now replace Y by:
(PLUS Z (TIMES (EXP 2 N) V))
to eliminate (REMAINDER Y (EXP 2 N)) and (QUOTIENT Y (EXP 2 N)). We rely
upon REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to constrain the new variables. We must thus prove three new
goals:
Case 10.3.
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))))),
which further simplifies, using linear arithmetic, applying REMAINDER-EXIT,
PLUS-COMMUTATIVITY, and REMAINDER-PLUS1, and opening up EQUAL and LESSP,
to:
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))))),
which again simplifies, using linear arithmetic and rewriting with
REMAINDER-LESSP-LINEAR, to the following three new goals:
Case 10.3.3.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))))).
However this finally simplifies, using linear arithmetic and rewriting
with REMAINDER-LESSP-LINEAR, to:
T.
Case 10.3.2.
(IMPLIES
(AND
(NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))))).
However this finally simplifies, using linear arithmetic, to:
T.
Case 10.3.1.
(IMPLIES
(AND
(LESSP (EXP 2 N) 0)
(NOT (NUMBERP Y))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 10.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Y) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))))),
which further simplifies, trivially, to:
T.
Case 10.1.
(IMPLIES
(AND (NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))))).
But this further simplifies, applying PLUS-COMMUTATIVITY,
TIMES-COMMUTATIVITY, and REMAINDER-PLUS-PLUS-TIMES2, and unfolding the
functions ZEROP and NOT, to:
(IMPLIES
(AND (NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace X by:
(PLUS W (TIMES (EXP 2 N) D))
to eliminate (REMAINDER X (EXP 2 N)) and (QUOTIENT X (EXP 2 N)). We rely
upon REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. This produces the following
three new goals:
Case 10.1.3.
(IMPLIES
(AND
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))))).
This further simplifies, using linear arithmetic, rewriting with
REMAINDER-EXIT, PLUS-COMMUTATIVITY, and REMAINDER-PLUS2, and unfolding
EQUAL and LESSP, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) Z))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 10.1.3.2.
(IMPLIES (AND (NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) Z))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 10.1.3.1.
(IMPLIES (AND (LESSP (EXP 2 N) 0)
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) Z))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 10.1.2.
(IMPLIES
(AND
(NOT (NUMBERP (EXP 2 N)))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS X Z) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))))),
which finally simplifies, trivially, to:
T.
Case 10.1.1.
(IMPLIES
(AND (NUMBERP W)
(EQUAL (LESSP W (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1
(DIFFERENCE (EXP 2 N)
(REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))))).
However this further simplifies, using linear arithmetic, applying
PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, PLUS-ASSOCIATIVITY,
REMAINDER-EXIT, and REMAINDER-PLUS-PLUS-TIMES2, and unfolding ZEROP, NOT,
and REMAINDER, to the following two new conjectures:
Case 10.1.1.2.
(IMPLIES
(AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N))))
(NOT (LESSP (PLUS W Z) (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(DIFFERENCE (PLUS W Z) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))))).
This again simplifies, using linear arithmetic, to two new goals:
Case 10.1.1.2.2.
(IMPLIES
(AND (NOT (LESSP (DIFFERENCE (PLUS W Z) (EXP 2 N))
(EXP 2 N)))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N))))
(NOT (LESSP (PLUS W Z) (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(DIFFERENCE (PLUS W Z) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 10.1.1.2.1.
(IMPLIES
(AND (LESSP (EXP 2 N)
(DIFFERENCE (PLUS W Z) (EXP 2 N)))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N))))
(NOT (LESSP (PLUS W Z) (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(DIFFERENCE (PLUS W Z) (EXP 2 N))))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 10.1.1.1.
(IMPLIES (AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(SUB1 (EXP 2 N))))
(LESSP (PLUS W Z) (EXP 2 N)))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (PLUS W Z)))
(ADD1 (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (EQUAL C 1)
(LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and opening up the definition of
EQUAL, to:
T.
Case 8. (IMPLIES (AND (EQUAL C 1)
(NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))))
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))).
However this again simplifies, using linear arithmetic, appealing to the
lemmas REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and opening up EQUAL, to:
T.
Case 7. (IMPLIES (AND (EQUAL C 1)
(LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and opening up the definition of
EQUAL, to:
T.
Case 6. (IMPLIES (AND (EQUAL C 1)
(NOT (LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))))
(EQUAL (LOGNOT N
(REMAINDER (PLUS C X Y) (EXP 2 N)))
(REMAINDER (PLUS (B-NOT C)
(LOGNOT N X)
(LOGNOT N Y))
(EXP 2 N)))).
However this again simplifies, using linear arithmetic, applying
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and expanding the definition of EQUAL,
to:
T.
Case 5. (IMPLIES (AND (EQUAL C 1)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER 0 (EXP 2 N))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N))))))).
This again simplifies, applying REMAINDER-LESSP and REMAINDER-0, to:
(IMPLIES (AND (NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N))))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace Y by:
(PLUS Z (TIMES (EXP 2 N) V))
to eliminate (REMAINDER Y (EXP 2 N)) and (QUOTIENT Y (EXP 2 N)). We rely
upon REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. We thus obtain the following
three new goals:
Case 5.3.
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N))))))).
But this further simplifies, using linear arithmetic, applying
REMAINDER-EXIT, PLUS-COMMUTATIVITY, REMAINDER-PLUS1, EXP-LESSP,
DIFFERENCE-X-X, DIFFERENCE-SUB1-SUB1, and CORRECTNESS-OF-CANCEL-EQUAL-PLUS,
and expanding the functions EQUAL, LESSP, NUMBERP, and FIX, to:
T.
Case 5.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N))))))).
This further simplifies, trivially, to:
T.
Case 5.1.
(IMPLIES
(AND (NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))).
This further simplifies, rewriting with PLUS-COMMUTATIVITY,
TIMES-COMMUTATIVITY, and REMAINDER-PLUS-PLUS-TIMES2, and opening up ZEROP
and NOT, to:
(IMPLIES
(AND (NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace X by:
(PLUS W (TIMES (EXP 2 N) D))
to eliminate (REMAINDER X (EXP 2 N)) and (QUOTIENT X (EXP 2 N)). We
employ REMAINDER-LESSP, the type restriction lemma noted when REMAINDER
was introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. This produces the following
three new conjectures:
Case 5.1.3.
(IMPLIES
(AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))).
But this further simplifies, using linear arithmetic, rewriting with
REMAINDER-EXIT, PLUS-COMMUTATIVITY, REMAINDER-PLUS2,
CORRECTNESS-OF-CANCEL-EQUAL-PLUS, LESSP-SUB1, DIFFERENCE=0, and
SUB1-OF-1, and unfolding the definitions of EQUAL, LESSP, and FIX, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(EQUAL Z (SUB1 (EXP 2 N))))
(EQUAL 1 (DIFFERENCE (EXP 2 N) Z))),
which finally simplifies, using linear arithmetic, to:
T.
Case 5.1.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))),
which finally simplifies, trivially, to:
T.
Case 5.1.1.
(IMPLIES
(AND (NUMBERP W)
(EQUAL (LESSP W (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N))
(EQUAL (REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W))))).
However this further simplifies, using linear arithmetic, applying
PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, PLUS-ASSOCIATIVITY,
REMAINDER-EXIT, and REMAINDER-PLUS-PLUS-TIMES2, and unfolding the
functions ZEROP, NOT, and REMAINDER, to the following two new
conjectures:
Case 5.1.1.2.
(IMPLIES (AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (LESSP (PLUS W Z) (EXP 2 N)))
(EQUAL (DIFFERENCE (PLUS W Z) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))).
However this finally simplifies, using linear arithmetic, to:
T.
Case 5.1.1.1.
(IMPLIES (AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(LESSP (PLUS W Z) (EXP 2 N))
(EQUAL (PLUS W Z) (SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))),
which again simplifies, using linear arithmetic, to two new goals:
Case 5.1.1.1.2.
(IMPLIES (AND (NOT (LESSP 0 (EXP 2 N)))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(LESSP (PLUS W Z) (EXP 2 N))
(EQUAL (PLUS W Z) (SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 5.1.1.1.1.
(IMPLIES (AND (LESSP (EXP 2 N) 0)
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(LESSP (PLUS W Z) (EXP 2 N))
(EQUAL (PLUS W Z) (SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES
(AND (EQUAL C 1)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (ADD1 (REMAINDER (PLUS X Y) (EXP 2 N)))
(EXP 2 N))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N))))))),
which again simplifies, applying REMAINDER-LESSP, REMAINDER-REMAINDER-EXP2,
and REMAINDER-ADD1, to the new conjecture:
(IMPLIES
(AND (NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Y) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N))))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace Y by:
(PLUS Z (TIMES (EXP 2 N) V))
to eliminate (REMAINDER Y (EXP 2 N)) and (QUOTIENT Y (EXP 2 N)). We employ
REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. We would thus like to prove the
following three new conjectures:
Case 4.3.
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Y) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N))))))).
However this further simplifies, using linear arithmetic, appealing to the
lemmas REMAINDER-EXIT, PLUS-COMMUTATIVITY, and REMAINDER-PLUS1, and
opening up the definitions of EQUAL and LESSP, to the formula:
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))).
This again simplifies, using linear arithmetic and applying
REMAINDER-LESSP-LINEAR, to:
T.
Case 4.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Y) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N))))))).
This further simplifies, clearly, to:
T.
Case 4.1.
(IMPLIES
(AND (NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))).
However this further simplifies, appealing to the lemmas
PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, and REMAINDER-PLUS-PLUS-TIMES2,
and expanding the functions ZEROP and NOT, to:
(IMPLIES
(AND (NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Z) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))).
Appealing to the lemma REMAINDER-QUOTIENT-ELIM, we now replace X by:
(PLUS W (TIMES (EXP 2 N) D))
to eliminate (REMAINDER X (EXP 2 N)) and (QUOTIENT X (EXP 2 N)). We use
REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to constrain the new variables. The result is three new goals:
Case 4.1.3.
(IMPLIES
(AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Z) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))),
which further simplifies, using linear arithmetic, rewriting with
REMAINDER-EXIT, PLUS-COMMUTATIVITY, and REMAINDER-PLUS2, and unfolding
the functions EQUAL and LESSP, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (EQUAL Z (SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (ADD1 Z)))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 4.1.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Z) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))))),
which finally simplifies, clearly, to:
T.
Case 4.1.1.
(IMPLIES
(AND (NUMBERP W)
(EQUAL (LESSP W (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N))
(NOT (EQUAL (REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1
(DIFFERENCE
(EXP 2 N)
(ADD1 (REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W))))).
This further simplifies, using linear arithmetic, rewriting with
PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, PLUS-ASSOCIATIVITY,
REMAINDER-EXIT, REMAINDER-PLUS-PLUS-TIMES2, DIFFERENCE-0, DIFFERENCE=0,
SUB1-OF-1, and PLUS-EQUAL-0, and expanding ZEROP, NOT, REMAINDER, and
SUB1, to the following three new goals:
Case 4.1.1.3.
(IMPLIES
(AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (LESSP (PLUS W Z) (EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS W Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (DIFFERENCE (PLUS W Z) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))).
This again simplifies, using linear arithmetic, to two new formulas:
Case 4.1.1.3.2.
(IMPLIES
(AND (NOT (LESSP (ADD1 (DIFFERENCE (PLUS W Z) (EXP 2 N)))
(EXP 2 N)))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (LESSP (PLUS W Z) (EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS W Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (DIFFERENCE (PLUS W Z) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 4.1.1.3.1.
(IMPLIES
(AND (LESSP (EXP 2 N)
(ADD1 (DIFFERENCE (PLUS W Z) (EXP 2 N))))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(NOT (LESSP (PLUS W Z) (EXP 2 N)))
(NOT (EQUAL (DIFFERENCE (PLUS W Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (DIFFERENCE (PLUS W Z) (EXP 2 N)))))
(PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z))))),
which finally simplifies, using linear arithmetic, to:
T.
Case 4.1.1.2.
(IMPLIES (AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(LESSP (PLUS W Z) (EXP 2 N))
(NOT (EQUAL (PLUS W Z) (SUB1 (EXP 2 N)))))
(EQUAL 1 (DIFFERENCE (EXP 2 N) W))),
which finally simplifies, using linear arithmetic, to:
T.
Case 4.1.1.1.
(IMPLIES (AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N))
(LESSP (PLUS W Z) (EXP 2 N))
(NOT (EQUAL (PLUS W Z) (SUB1 (EXP 2 N)))))
(EQUAL 1 (DIFFERENCE (EXP 2 N) Z))),
which finally simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES
(AND (EQUAL C 1)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER 0 (EXP 2 N))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))),
which again simplifies, applying REMAINDER-LESSP and REMAINDER-0, to the new
conjecture:
(IMPLIES
(AND (NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace Y by:
(PLUS Z (TIMES (EXP 2 N) V))
to eliminate (REMAINDER Y (EXP 2 N)) and (QUOTIENT Y (EXP 2 N)). We use
REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. We would thus like to prove the
following three new formulas:
Case 3.3.
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))).
However this further simplifies, using linear arithmetic, rewriting with
the lemmas REMAINDER-EXIT, PLUS-COMMUTATIVITY, REMAINDER-PLUS1, EXP-LESSP,
DIFFERENCE-X-X, DIFFERENCE-SUB1-SUB1, DIFFERENCE-0, DIFFERENCE=0, and
SUB1-OF-1, and opening up the definitions of EQUAL, LESSP, and NUMBERP, to
three new goals:
Case 3.3.3.
(IMPLIES
(AND
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))
(NOT (LESSP 0 (EXP 2 N))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.3.2.
(IMPLIES
(AND
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))
(LESSP (EXP 2 N) 0))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.3.1.
(IMPLIES
(AND
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))
(NOT (LESSP (EXP 2 N) 0))
(LESSP 0 (EXP 2 N)))
(EQUAL (DIFFERENCE (EXP 2 N) 0) 1)),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND
(NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))
(NOT (LESSP (EXP 2 N) 0))
(LESSP 0 (EXP 2 N)))
(EQUAL (DIFFERENCE (EXP 2 N) 0) 1)).
But this finally simplifies, using linear arithmetic, to:
T.
Case 3.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))),
which further simplifies, trivially, to:
T.
Case 3.1.
(IMPLIES
(AND (NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))).
But this further simplifies, applying PLUS-COMMUTATIVITY,
TIMES-COMMUTATIVITY, and REMAINDER-PLUS-PLUS-TIMES2, and opening up the
functions ZEROP and NOT, to the new formula:
(IMPLIES
(AND (NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace X by:
(PLUS W (TIMES (EXP 2 N) D))
to eliminate (REMAINDER X (EXP 2 N)) and (QUOTIENT X (EXP 2 N)). We
employ REMAINDER-LESSP, the type restriction lemma noted when REMAINDER
was introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. This produces the following
three new conjectures:
Case 3.1.3.
(IMPLIES
(AND
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))).
This further simplifies, using linear arithmetic, appealing to the
lemmas REMAINDER-EXIT, PLUS-COMMUTATIVITY, and REMAINDER-PLUS2, and
unfolding the functions EQUAL and LESSP, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(EQUAL Z (SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))).
This again simplifies, using linear arithmetic, to two new formulas:
Case 3.1.3.2.
(IMPLIES
(AND (NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP X))
(NUMBERP (SUB1 (EXP 2 N)))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) (SUB1 (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N)))))
(EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 3.1.3.1.
(IMPLIES
(AND (LESSP (EXP 2 N) 0)
(NOT (NUMBERP X))
(NUMBERP (SUB1 (EXP 2 N)))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) (SUB1 (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N)))))
(EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 3.1.2.
(IMPLIES
(AND
(NOT (NUMBERP (EXP 2 N)))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, trivially, to:
T.
Case 3.1.1.
(IMPLIES
(AND (NUMBERP W)
(EQUAL (LESSP W (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N)))
(EQUAL (REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N))
(SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N)))).
This further simplifies, using linear arithmetic, applying the lemmas
PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, PLUS-ASSOCIATIVITY,
REMAINDER-EXIT, and REMAINDER-PLUS-PLUS-TIMES2, and opening up the
definitions of ZEROP and NOT, to:
(IMPLIES (AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT F)
(EQUAL (PLUS W Z) (SUB1 (EXP 2 N))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) 0))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))).
But this finally simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES
(AND (EQUAL C 1)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (ADD1 (REMAINDER (PLUS X Y) (EXP 2 N)))
(EXP 2 N))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))),
which again simplifies, rewriting with REMAINDER-LESSP,
REMAINDER-REMAINDER-EXP2, and REMAINDER-ADD1, to:
(IMPLIES
(AND (NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Y) (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace Y by:
(PLUS Z (TIMES (EXP 2 N) V))
to eliminate (REMAINDER Y (EXP 2 N)) and (QUOTIENT Y (EXP 2 N)). We use
REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. We thus obtain the following
three new goals:
Case 2.3.
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Y) (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))).
But this further simplifies, using linear arithmetic, rewriting with the
lemmas REMAINDER-EXIT, PLUS-COMMUTATIVITY, and REMAINDER-PLUS1, and
expanding EQUAL and LESSP, to the goal:
(IMPLIES
(AND (NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))).
This again simplifies, using linear arithmetic, to five new goals:
Case 2.3.5.
(IMPLIES
(AND
(NOT (LESSP (ADD1 (REMAINDER X (EXP 2 N)))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, to three new formulas:
Case 2.3.5.3.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(NOT (LESSP (ADD1 (REMAINDER X (EXP 2 N)))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic and rewriting with
REMAINDER-LESSP-LINEAR, to:
T.
Case 2.3.5.2.
(IMPLIES
(AND
(NOT (LESSP 0 (EXP 2 N)))
(NOT (LESSP (ADD1 (REMAINDER X (EXP 2 N)))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))).
This finally simplifies, using linear arithmetic, to:
T.
Case 2.3.5.1.
(IMPLIES
(AND
(LESSP (EXP 2 N) 0)
(NOT (LESSP (ADD1 (REMAINDER X (EXP 2 N)))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.3.4.
(IMPLIES
(AND
(LESSP (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N))))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, to three new
conjectures:
Case 2.3.4.3.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(LESSP (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N))))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic and rewriting with
REMAINDER-LESSP-LINEAR, to:
T.
Case 2.3.4.2.
(IMPLIES
(AND
(NOT (LESSP 0 (EXP 2 N)))
(LESSP (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N))))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))).
However this finally simplifies, using linear arithmetic, to:
T.
Case 2.3.4.1.
(IMPLIES
(AND
(LESSP (EXP 2 N) 0)
(LESSP (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N))))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.3.3.
(IMPLIES
(AND
(NOT (LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic and rewriting with
REMAINDER-LESSP-LINEAR, to:
T.
Case 2.3.2.
(IMPLIES
(AND
(NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))).
This finally simplifies, using linear arithmetic, to:
T.
Case 2.3.1.
(IMPLIES
(AND
(LESSP (EXP 2 N) 0)
(NOT (NUMBERP Y))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER X (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER X (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.2.
(IMPLIES
(AND (NOT (NUMBERP (EXP 2 N)))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS X Y) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Y) (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER Y (EXP 2 N)))))
(EXP 2 N)))),
which further simplifies, obviously, to:
T.
Case 2.1.
(IMPLIES
(AND (NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Z (TIMES (EXP 2 N) V))
(EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))).
However this further simplifies, rewriting with PLUS-COMMUTATIVITY,
TIMES-COMMUTATIVITY, and REMAINDER-PLUS-PLUS-TIMES2, and expanding ZEROP
and NOT, to:
(IMPLIES
(AND (NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Z) (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace X by:
(PLUS W (TIMES (EXP 2 N) D))
to eliminate (REMAINDER X (EXP 2 N)) and (QUOTIENT X (EXP 2 N)). We rely
upon REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. This produces the following
three new formulas:
Case 2.1.3.
(IMPLIES
(AND
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Z) (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))).
This further simplifies, using linear arithmetic, rewriting with
REMAINDER-EXIT, PLUS-COMMUTATIVITY, and REMAINDER-PLUS2, and expanding
EQUAL and LESSP, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL Z (SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (ADD1 Z)))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, to four new conjectures:
Case 2.1.3.4.
(IMPLIES
(AND (NOT (LESSP (ADD1 Z) (EXP 2 N)))
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL Z (SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (ADD1 Z)))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 2.1.3.4.2.
(IMPLIES
(AND (NOT (LESSP 0 (EXP 2 N)))
(NOT (LESSP (ADD1 Z) (EXP 2 N)))
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL Z (SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (ADD1 Z)))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.1.3.4.1.
(IMPLIES
(AND (LESSP (EXP 2 N) 0)
(NOT (LESSP (ADD1 Z) (EXP 2 N)))
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL Z (SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (ADD1 Z)))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.1.3.3.
(IMPLIES
(AND (LESSP (EXP 2 N) (ADD1 Z))
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL Z (SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (ADD1 Z)))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.1.3.2.
(IMPLIES
(AND (NOT (LESSP 0 (EXP 2 N)))
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL Z (SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (ADD1 Z)))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.1.3.1.
(IMPLIES
(AND (LESSP (EXP 2 N) 0)
(NOT (NUMBERP X))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT (EQUAL Z (SUB1 (EXP 2 N)))))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N) (ADD1 Z)))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) 0))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.1.2.
(IMPLIES
(AND
(NOT (NUMBERP (EXP 2 N)))
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS X Z) (EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (REMAINDER (PLUS X Z) (EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER X (EXP 2 N)))))
(EXP 2 N)))),
which finally simplifies, trivially, to:
T.
Case 2.1.1.
(IMPLIES
(AND (NUMBERP W)
(EQUAL (LESSP W (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N)))
(NOT (EQUAL (REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N))
(SUB1 (EXP 2 N)))))
(EQUAL
(SUB1
(DIFFERENCE
(EXP 2 N)
(ADD1 (REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N)))).
But this further simplifies, using linear arithmetic, applying
PLUS-COMMUTATIVITY, TIMES-COMMUTATIVITY, PLUS-ASSOCIATIVITY,
REMAINDER-EXIT, and REMAINDER-PLUS-PLUS-TIMES2, and expanding ZEROP and
NOT, to the following two new conjectures:
Case 2.1.1.2.
(IMPLIES
(AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT F)
(NOT (EQUAL (PLUS W Z) (SUB1 (EXP 2 N))))
(NOT (LESSP W (EXP 2 N))))
(EQUAL
(SUB1
(DIFFERENCE
(EXP 2 N)
(ADD1 (REMAINDER (PLUS (PLUS W (TIMES (EXP 2 N) D)) Z)
(EXP 2 N)))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) Z))
(SUB1 (DIFFERENCE (EXP 2 N) W)))
(EXP 2 N)))).
This finally simplifies, obviously, to:
T.
Case 2.1.1.1.
(IMPLIES
(AND (NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT F)
(NOT (EQUAL (PLUS W Z) (SUB1 (EXP 2 N))))
(NOT F))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (PLUS W Z))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))).
This again simplifies, using linear arithmetic, to two new goals:
Case 2.1.1.1.2.
(IMPLIES
(AND (NOT (LESSP (ADD1 (PLUS W Z)) (EXP 2 N)))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT F)
(NOT (EQUAL (PLUS W Z) (SUB1 (EXP 2 N))))
(NOT F))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (PLUS W Z))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 2.1.1.1.1.
(IMPLIES
(AND (LESSP (EXP 2 N) (ADD1 (PLUS W Z)))
(NUMBERP W)
(LESSP W (EXP 2 N))
(NUMBERP D)
(NUMBERP Z)
(LESSP Z (EXP 2 N))
(NUMBERP V)
(NOT (LESSP (EXP 2 N) Z))
(NOT (LESSP (EXP 2 N) W))
(NOT (EQUAL (EXP 2 N) 0))
(NOT (LESSP (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))
(NOT F)
(NOT (EQUAL (PLUS W Z) (SUB1 (EXP 2 N))))
(NOT F))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(ADD1 (PLUS W Z))))
(DIFFERENCE (PLUS (SUB1 (DIFFERENCE (EXP 2 N) W))
(SUB1 (DIFFERENCE (EXP 2 N) Z)))
(EXP 2 N)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (EQUAL C 1)
(LESSP (REMAINDER Y (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER Y (EXP 2 N))))
(LESSP (REMAINDER X (EXP 2 N))
(EXP 2 N))
(NOT (LESSP (EXP 2 N)
(REMAINDER X (EXP 2 N))))
(EQUAL (EXP 2 N) 0))
(EQUAL (SUB1 (DIFFERENCE (EXP 2 N)
(REMAINDER (ADD1 (PLUS X Y))
(EXP 2 N))))
0)),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 5.0 0.3 ]
ADDER-LOGNOT
(DISABLE LOGNOT)
[ 0.0 0.0 0.0 ]
LOGNOT-OFF
(PROVE-LEMMA HEAD-0
(REWRITE)
(EQUAL (HEAD 0 N) 0))
WARNING: Note that the rewrite rule HEAD-0 will be stored so as to apply only
to terms with the nonrecursive function symbol HEAD.
This conjecture can be simplified, using the abbreviations REMAINDER-0 and
HEAD, to:
(EQUAL 0 0).
This simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
HEAD-0
(PROVE-LEMMA TAIL-0
(REWRITE)
(EQUAL (TAIL 0 N) 0))
WARNING: Note that the rewrite rule TAIL-0 will be stored so as to apply only
to terms with the nonrecursive function symbol TAIL.
This conjecture can be simplified, using the abbreviations QUOTIENT-0 and TAIL,
to:
(EQUAL 0 0).
This simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
TAIL-0
(PROVE-LEMMA HEAD-OF-0
(REWRITE)
(EQUAL (HEAD X 0) 0))
WARNING: Note that the rewrite rule HEAD-OF-0 will be stored so as to apply
only to terms with the nonrecursive function symbol HEAD.
This conjecture can be simplified, using the abbreviation HEAD, to:
(EQUAL (REMAINDER X (EXP 2 0)) 0).
This simplifies, rewriting with REMAINDER-1, and expanding EXP and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
HEAD-OF-0
(PROVE-LEMMA TAIL-OF-0
(REWRITE)
(EQUAL (TAIL X 0) (FIX X)))
WARNING: Note that the rewrite rule TAIL-OF-0 will be stored so as to apply
only to terms with the nonrecursive function symbol TAIL.
This conjecture can be simplified, using the abbreviation TAIL, to:
(EQUAL (QUOTIENT X (EXP 2 0))
(FIX X)).
This simplifies, rewriting with QUOTIENT-1, and expanding EXP and FIX, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
TAIL-OF-0
(PROVE-LEMMA HEAD-LESSP
(REWRITE)
(LESSP (HEAD X N) (EXP 2 N)))
WARNING: Note that the linear lemma HEAD-LESSP is being stored under the term
(HEAD X N), which is unusual because HEAD is a nonrecursive function symbol.
WARNING: Note that the proposed lemma HEAD-LESSP is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This formula can be simplified, using the abbreviations NOT, REMAINDER-LESSP,
and HEAD, to the following two new goals:
Case 2. (NOT (EQUAL (EXP 2 N) 0)).
This simplifies, using linear arithmetic, appealing to the lemma EXP-OF-2-0,
and unfolding the definition of EQUAL, to:
T.
Case 1. (NUMBERP (EXP 2 N)).
This simplifies, obviously, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
HEAD-LESSP
(PROVE-LEMMA TAIL-LESSP
(REWRITE)
(EQUAL (LESSP (TAIL X N) Y)
(LESSP X (TIMES (EXP 2 N) Y))))
This conjecture can be simplified, using the abbreviation TAIL, to:
(EQUAL (LESSP (QUOTIENT X (EXP 2 N)) Y)
(LESSP X (TIMES (EXP 2 N) Y))).
This simplifies, applying TIMES-COMMUTATIVITY and QUOTIENT-TIMES-LESSP, to two
new formulas:
Case 2. (IMPLIES (AND (EQUAL (EXP 2 N) 0) (EQUAL Y 0))
(EQUAL F
(LESSP X (TIMES Y (EXP 2 N))))),
which again simplifies, using linear arithmetic, appealing to the lemma
EXP-OF-2-0, and opening up the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (EQUAL (EXP 2 N) 0)
(NOT (EQUAL Y 0)))
(EQUAL (NUMBERP Y)
(LESSP X (TIMES Y (EXP 2 N))))),
which again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and expanding the definition of EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
TAIL-LESSP
(PROVE-LEMMA HEAD-LEQ
(REWRITE)
(NOT (LESSP X (HEAD X N))))
WARNING: Note that the linear lemma HEAD-LEQ is being stored under the term
(HEAD X N), which is unusual because HEAD is a nonrecursive function symbol.
WARNING: Note that the proposed lemma HEAD-LEQ is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This conjecture can be simplified, using the abbreviations NOT and HEAD, to:
(NOT (LESSP X (REMAINDER X (EXP 2 N)))).
Appealing to the lemma REMAINDER-QUOTIENT-ELIM, we now replace X by:
(PLUS Z (TIMES (EXP 2 N) V))
to eliminate (REMAINDER X (EXP 2 N)) and (QUOTIENT X (EXP 2 N)). We employ
REMAINDER-LESSP, the type restriction lemma noted when REMAINDER was
introduced, and the type restriction lemma noted when QUOTIENT was introduced
to constrain the new variables. The result is four new goals:
Case 4. (IMPLIES (NOT (NUMBERP X))
(NOT (LESSP X (REMAINDER X (EXP 2 N))))),
which simplifies, using linear arithmetic, applying the lemmas EXP-OF-2-0,
REMAINDER-LESSP-LINEAR, and REMAINDER-EXIT, and unfolding the definitions of
EQUAL, LESSP, and REMAINDER, to:
T.
Case 3. (IMPLIES (EQUAL (EXP 2 N) 0)
(NOT (LESSP X (REMAINDER X (EXP 2 N))))),
which simplifies, using linear arithmetic, rewriting with EXP-OF-2-0, and
unfolding EQUAL, to:
T.
Case 2. (IMPLIES (NOT (NUMBERP (EXP 2 N)))
(NOT (LESSP X (REMAINDER X (EXP 2 N))))).
This simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 N))
(NOT (ZEROP (EXP 2 N))))
(NUMBERP V)
(NOT (EQUAL (EXP 2 N) 0)))
(NOT (LESSP (PLUS Z (TIMES (EXP 2 N) V))
Z))).
However this simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
HEAD-LEQ
(PROVE-LEMMA TAIL-LEQ
(REWRITE)
(NOT (LESSP X (TAIL X N))))
WARNING: Note that the linear lemma TAIL-LEQ is being stored under the term
(TAIL X N), which is unusual because TAIL is a nonrecursive function symbol.
WARNING: Note that the proposed lemma TAIL-LEQ is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This conjecture can be simplified, using the abbreviations NOT and TAIL, to:
(NOT (LESSP X (QUOTIENT X (EXP 2 N)))).
This simplifies, using linear arithmetic and rewriting with QUOTIENT-LEQ, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
TAIL-LEQ
(PROVE-LEMMA TAIL-EQUAL-0
(REWRITE)
(EQUAL (EQUAL (TAIL X N) 0)
(NAT-RANGEP X N)))
This conjecture can be simplified, using the abbreviations NAT-RANGEP and TAIL,
to:
(EQUAL (EQUAL (QUOTIENT X (EXP 2 N)) 0)
(LESSP X (EXP 2 N))).
This simplifies, applying QUOTIENT-EQUAL-0, to three new goals:
Case 3. (IMPLIES (NOT (NUMBERP X))
(EQUAL T (LESSP X (EXP 2 N)))),
which again simplifies, expanding LESSP, to the goal:
(IMPLIES (NOT (NUMBERP X))
(NOT (EQUAL (EXP 2 N) 0))).
However this again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and unfolding the definition of EQUAL, to:
T.
Case 2. (IMPLIES (EQUAL X 0)
(EQUAL T (LESSP X (EXP 2 N)))),
which again simplifies, unfolding the functions EQUAL and LESSP, to the goal:
(NOT (EQUAL (EXP 2 N) 0)).
But this again simplifies, using linear arithmetic, applying EXP-OF-2-0, and
unfolding the function EQUAL, to:
T.
Case 1. (IMPLIES (EQUAL (EXP 2 N) 0)
(EQUAL T (LESSP X (EXP 2 N)))).
However this again simplifies, using linear arithmetic, applying EXP-OF-2-0,
and unfolding EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
TAIL-EQUAL-0
(PROVE-LEMMA HEAD-LEMMA
(REWRITE)
(IMPLIES (NAT-RANGEP X N)
(EQUAL (HEAD X N) (FIX X))))
WARNING: Note that the rewrite rule HEAD-LEMMA will be stored so as to apply
only to terms with the nonrecursive function symbol HEAD.
This conjecture can be simplified, using the abbreviations IMPLIES, HEAD, and
NAT-RANGEP, to:
(IMPLIES (LESSP X (EXP 2 N))
(EQUAL (REMAINDER X (EXP 2 N))
(FIX X))).
This simplifies, applying REMAINDER-EXIT, and unfolding the function FIX, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
HEAD-LEMMA
(PROVE-LEMMA TAIL-LEMMA
(REWRITE)
(IMPLIES (NAT-RANGEP X N)
(EQUAL (TAIL X N) 0)))
WARNING: Note that the rewrite rule TAIL-LEMMA will be stored so as to apply
only to terms with the nonrecursive function symbol TAIL.
This conjecture can be simplified, using the abbreviations QUOTIENT-EQUAL-0,
IMPLIES, TAIL, and NAT-RANGEP, to:
T.
This simplifies, obviously, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
TAIL-LEMMA
(PROVE-LEMMA REPLACE-0
(REWRITE)
(AND (EQUAL (REPLACE 0 X Y) (FIX Y))
(EQUAL (REPLACE N X 0) (HEAD X N))
(IMPLIES (AND (NAT-RANGEP X N)
(NAT-RANGEP Y N))
(EQUAL (REPLACE N X Y) (FIX X)))))
WARNING: Note that the rewrite rule REPLACE-0 will be stored so as to apply
only to terms with the nonrecursive function symbol REPLACE.
WARNING: Note that the rewrite rule REPLACE-0 will be stored so as to apply
only to terms with the nonrecursive function symbol REPLACE.
WARNING: Note that the rewrite rule REPLACE-0 will be stored so as to apply
only to terms with the nonrecursive function symbol REPLACE.
WARNING: Note that the proposed lemma REPLACE-0 is to be stored as zero type
prescription rules, zero compound recognizer rules, zero linear rules, and
three replacement rules.
This conjecture can be simplified, using the abbreviations IMPLIES, AND,
NAT-RANGEP, and HEAD, to three new formulas:
Case 3. (EQUAL (REPLACE 0 X Y) (FIX Y)),
which simplifies, rewriting with HEAD-OF-0, TIMES-1, TIMES-COMMUTATIVITY,
and TAIL-OF-0, and expanding the definitions of APP, EXP, EQUAL, PLUS,
REPLACE, and FIX, to:
T.
Case 2. (EQUAL (REPLACE N X 0)
(REMAINDER X (EXP 2 N))).
This simplifies, using linear arithmetic, rewriting with the lemmas
TIMES-ZERO, PLUS-COMMUTATIVITY, TAIL-LEMMA, and EXP-OF-2-0, and opening up
APP, HEAD, OR, ZEROP, PLUS, EQUAL, NAT-RANGEP, and REPLACE, to:
T.
Case 1. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP Y (EXP 2 N)))
(EQUAL (REPLACE N X Y) (FIX X))).
This simplifies, using linear arithmetic, rewriting with HEAD-LEMMA,
TIMES-ZERO, PLUS-COMMUTATIVITY, and TAIL-LEMMA, and unfolding the functions
APP, OR, ZEROP, EQUAL, PLUS, NAT-RANGEP, REPLACE, and FIX, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
REPLACE-0
(PROVE-LEMMA APP-0
(REWRITE)
(AND (EQUAL (APP N X 0) (HEAD X N))
(EQUAL (APP N 0 Y)
(TIMES Y (EXP 2 N)))
(EQUAL (APP 0 X Y) (FIX Y))))
WARNING: Note that the rewrite rule APP-0 will be stored so as to apply only
to terms with the nonrecursive function symbol APP.
WARNING: Note that the rewrite rule APP-0 will be stored so as to apply only
to terms with the nonrecursive function symbol APP.
WARNING: Note that the rewrite rule APP-0 will be stored so as to apply only
to terms with the nonrecursive function symbol APP.
WARNING: Note that the proposed lemma APP-0 is to be stored as zero type
prescription rules, zero compound recognizer rules, zero linear rules, and
three replacement rules.
This conjecture can be simplified, using the abbreviations AND and HEAD, to
three new formulas:
Case 3. (EQUAL (APP N X 0)
(REMAINDER X (EXP 2 N))),
which simplifies, appealing to the lemmas PLUS-COMMUTATIVITY and TIMES-ZERO,
and unfolding PLUS, EQUAL, ZEROP, OR, HEAD, and APP, to:
T.
Case 2. (EQUAL (APP N 0 Y)
(TIMES Y (EXP 2 N))),
which simplifies, using linear arithmetic, rewriting with the lemmas
HEAD-LEMMA and EXP-OF-2-0, and expanding the definitions of PLUS, NUMBERP,
EQUAL, NAT-RANGEP, and APP, to:
T.
Case 1. (EQUAL (APP 0 X Y) (FIX Y)),
which simplifies, applying TIMES-COMMUTATIVITY, TIMES-1, and HEAD-OF-0, and
unfolding the functions PLUS, EQUAL, EXP, APP, and FIX, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
APP-0
(PROVE-LEMMA LSL-UINT
(REWRITE)
(IMPLIES (UINT-RANGEP X (DIFFERENCE N CNT))
(EQUAL (NAT-TO-UINT (LSL N X CNT))
(TIMES (NAT-TO-UINT X) (EXP 2 CNT)))))
WARNING: Note that the rewrite rule LSL-UINT will be stored so as to apply
only to terms with the nonrecursive function symbol NAT-TO-UINT.
This conjecture can be simplified, using the abbreviations IMPLIES, HEAD, LSL,
and UINT-RANGEP, to:
(IMPLIES (LESSP X (EXP 2 (DIFFERENCE N CNT)))
(EQUAL (NAT-TO-UINT (REMAINDER (TIMES X (EXP 2 CNT))
(EXP 2 N)))
(TIMES (NAT-TO-UINT X) (EXP 2 CNT)))).
This simplifies, rewriting with the lemmas REMAINDER-EXIT, TIMES-COMMUTATIVITY,
and REMAINDER-TIMES-EXP2-1, and opening up the function NAT-TO-UINT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LSL-UINT
(PROVE-LEMMA LSR-UINT
(REWRITE)
(EQUAL (NAT-TO-UINT (LSR X CNT))
(QUOTIENT (NAT-TO-UINT X)
(EXP 2 CNT))))
WARNING: Note that the rewrite rule LSR-UINT will be stored so as to apply
only to terms with the nonrecursive function symbol NAT-TO-UINT.
This conjecture can be simplified, using the abbreviations TAIL and LSR, to
the goal:
(EQUAL (NAT-TO-UINT (QUOTIENT X (EXP 2 CNT)))
(QUOTIENT (NAT-TO-UINT X)
(EXP 2 CNT))).
This simplifies, opening up the definition of NAT-TO-UINT, to:
(IMPLIES (NOT (NUMBERP X))
(EQUAL (QUOTIENT X (EXP 2 CNT))
(QUOTIENT 0 (EXP 2 CNT)))),
which again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
QUOTIENT-EXIT, and QUOTIENT-0, and unfolding the definition of EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LSR-UINT
(PROVE-LEMMA REMAINDER-DIFF-LA NIL
(IMPLIES (AND (EQUAL (REMAINDER X Z) 0)
(LESSP Y Z))
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
(IF (LEQ X Y)
0
(IF (ZEROP Y) 0 (DIFFERENCE Z Y)))))
((USE (REMAINDER-PLUS2 (I (DIFFERENCE X Z))
(X (DIFFERENCE Z Y))
(J Z)))))
This formula simplifies, using linear arithmetic, applying the lemmas
PLUS-COMMUTATIVITY, DIFFERENCE-PLUS2, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, REMAINDER-0, DIFFERENCE-LESSP, and
DIFFERENCE-0, and expanding FIX, REMAINDER, EQUAL, DIFFERENCE, PLUS, IMPLIES,
LESSP, and ZEROP, to the following 16 new conjectures:
Case 16.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(NUMBERP Y)
(EQUAL (REMAINDER (DIFFERENCE X (PLUS Z Y))
Z)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (REMAINDER X Z) 0)).
This again simplifies, applying PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and DIFFERENCE-PLUS2, and expanding
the functions FIX, EQUAL, DIFFERENCE, NUMBERP, PLUS, and REMAINDER, to:
T.
Case 15.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(NUMBERP Y)
(EQUAL (REMAINDER (DIFFERENCE X (PLUS Z Y))
Z)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(EQUAL X 0))
(EQUAL (REMAINDER 0 Z) 0)).
This again simplifies, using linear arithmetic, to:
T.
Case 14.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(NUMBERP Y)
(EQUAL (REMAINDER (DIFFERENCE X (PLUS Z Y))
Z)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 Z) 0)),
which again simplifies, using linear arithmetic, applying DIFFERENCE-0,
PLUS-COMMUTATIVITY, and REMAINDER-0, and expanding the functions EQUAL, PLUS,
DIFFERENCE, NUMBERP, and LESSP, to:
T.
Case 13.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (REMAINDER (DIFFERENCE X (PLUS Z 0))
Z)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (REMAINDER X Z) 0)).
But this again simplifies, rewriting with PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and DIFFERENCE-PLUS2, and unfolding
the definitions of FIX, DIFFERENCE, EQUAL, PLUS, and REMAINDER, to:
T.
Case 12.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (REMAINDER (DIFFERENCE X (PLUS Z 0))
Z)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(EQUAL X 0))
(EQUAL (REMAINDER 0 Z) 0)).
This again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (PLUS Z (DIFFERENCE 0 Z)) Y)
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE 0 Z))
Y)
Z))
(EQUAL (REMAINDER (DIFFERENCE 0 (PLUS Z 0))
Z)
0)
(NOT (LESSP 0 Z))
(EQUAL (REMAINDER (DIFFERENCE 0 Z) Z)
0))
(EQUAL (REMAINDER 0 Z) 0)).
However this again simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (REMAINDER (DIFFERENCE X (PLUS Z 0))
Z)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 Z) 0)),
which again simplifies, using linear arithmetic, applying DIFFERENCE-0,
PLUS-COMMUTATIVITY, and REMAINDER-0, and unfolding EQUAL, PLUS, DIFFERENCE,
and LESSP, to:
T.
Case 10.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (REMAINDER X Z) 0)).
This again simplifies, rewriting with the lemmas PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and DIFFERENCE-PLUS2, and opening up
the functions EQUAL, LESSP, FIX, and DIFFERENCE, to:
T.
Case 9. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(EQUAL X 0))
(EQUAL (REMAINDER 0 Z) 0)),
which again simplifies, clearly, to:
T.
Case 8. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 Z) 0)).
This again simplifies, using linear arithmetic, applying DIFFERENCE-0 and
PLUS-COMMUTATIVITY, and unfolding the functions EQUAL, LESSP, PLUS, and
DIFFERENCE, to:
T.
Case 7. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (REMAINDER X Z) 0)).
But this again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(EQUAL X 0))
(EQUAL (REMAINDER 0 Z) 0)),
which again simplifies, trivially, to:
T.
Case 5. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
0)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 Z) 0)).
However this again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (REMAINDER (DIFFERENCE X (PLUS Z Y))
Z)
(DIFFERENCE Z Y))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(LESSP Y Z)
(NOT (LESSP Y X)))
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (REMAINDER (DIFFERENCE X (PLUS Z Y))
Z)
(DIFFERENCE Z Y))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(LESSP Y Z)
(LESSP Y X))
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
(DIFFERENCE Z Y))),
which again simplifies, using linear arithmetic, applying PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS2, DIFFERENCE-0,
REMAINDER-0, DIFFERENCE=0, and DIFFERENCE-DIFFERENCE1, and opening up the
definitions of FIX and REMAINDER, to:
T.
Case 2. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
(DIFFERENCE Z Y))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(LESSP Y Z)
(NOT (LESSP Y X)))
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
0)).
But this again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
(DIFFERENCE Z Y))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(LESSP Y Z)
(LESSP Y X))
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
(DIFFERENCE Z Y))),
which again simplifies, using linear arithmetic, to three new formulas:
Case 1.3.
(IMPLIES (AND (LESSP Z Y)
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
(DIFFERENCE Z Y))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(LESSP Y Z)
(LESSP Y X))
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
(DIFFERENCE Z Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
(DIFFERENCE Z Y))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(LESSP Y Z)
(LESSP Y X))
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
(DIFFERENCE Z Y))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
DIFFERENCE-0, PLUS-COMMUTATIVITY, and DIFFERENCE-LESSP, and expanding
EQUAL, PLUS, and LESSP, to:
T.
Case 1.1.
(IMPLIES (AND (NUMBERP X)
(NOT (LESSP Z Y))
(NOT (EQUAL X 0))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(LESSP (DIFFERENCE (PLUS X (DIFFERENCE X X))
Y)
X)
(EQUAL (DIFFERENCE (PLUS X (DIFFERENCE X X))
Y)
(DIFFERENCE X Y))
(NOT (LESSP X X))
(EQUAL (REMAINDER (DIFFERENCE X X) X)
0)
(LESSP Y X)
(LESSP Y X))
(EQUAL (REMAINDER (DIFFERENCE X Y) X)
(DIFFERENCE X Y))),
which again simplifies, applying DIFFERENCE-X-X, PLUS-COMMUTATIVITY,
DIFFERENCE-LESSP, REMAINDER-0, and REMAINDER-EXIT, and expanding EQUAL and
PLUS, to:
T.
Q.E.D.
[ 0.0 0.7 0.0 ]
REMAINDER-DIFF-LA
(PROVE-LEMMA ASL-INT-CROCK1
(REWRITE)
(IMPLIES (LESSP X
(EXP 2 (SUB1 (DIFFERENCE N S))))
(EQUAL (HEAD (TIMES X (EXP 2 S)) N)
(TIMES X (EXP 2 S)))))
WARNING: Note that the rewrite rule ASL-INT-CROCK1 will be stored so as to
apply only to terms with the nonrecursive function symbol HEAD.
This conjecture can be simplified, using the abbreviations IMPLIES and HEAD,
to the conjecture:
(IMPLIES (LESSP X
(EXP 2 (SUB1 (DIFFERENCE N S))))
(EQUAL (REMAINDER (TIMES X (EXP 2 S))
(EXP 2 N))
(TIMES X (EXP 2 S)))).
This simplifies, rewriting with DIFFERENCE=0, TIMES-COMMUTATIVITY,
REMAINDER-TIMES-EXP2-1, and CORRECTNESS-OF-CANCEL-EQUAL-TIMES, and opening up
the functions EXP, ZEROP, NOT, and FIX, to four new goals:
Case 4. (IMPLIES (AND (LESSP X
(EXP 2 (SUB1 (DIFFERENCE N S))))
(NOT (EQUAL (EXP 2 S) 0))
(NUMBERP X)
(LESSP S N))
(EQUAL (REMAINDER X
(TIMES 2
(EXP 2 (SUB1 (DIFFERENCE N S)))))
X)),
which again simplifies, using linear arithmetic and applying REMAINDER-EXIT,
to:
T.
Case 3. (IMPLIES (AND (LESSP X
(EXP 2 (SUB1 (DIFFERENCE N S))))
(NOT (EQUAL (EXP 2 S) 0))
(NUMBERP X)
(NOT (LESSP S N)))
(EQUAL (REMAINDER X 1) X)).
But this again simplifies, rewriting with the lemmas DIFFERENCE-0 and
LESSP-OF-1, and expanding SUB1, EXP, NUMBERP, REMAINDER, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (LESSP X
(EXP 2 (SUB1 (DIFFERENCE N S))))
(NOT (EQUAL (EXP 2 S) 0))
(NOT (NUMBERP X))
(LESSP S N))
(EQUAL (REMAINDER X
(TIMES 2
(EXP 2 (SUB1 (DIFFERENCE N S)))))
0)),
which again simplifies, using linear arithmetic, applying EXP-OF-2-0,
REMAINDER-EXIT, and REMAINDER-LESSP-LINEAR, and unfolding LESSP and EQUAL,
to:
T.
Case 1. (IMPLIES (AND (LESSP X
(EXP 2 (SUB1 (DIFFERENCE N S))))
(NOT (EQUAL (EXP 2 S) 0))
(NOT (NUMBERP X))
(NOT (LESSP S N)))
(EQUAL (REMAINDER X 1) 0)).
However this again simplifies, appealing to the lemmas DIFFERENCE-0,
LESSP-OF-1, and REMAINDER-1, and expanding the functions SUB1, EXP, and
EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
ASL-INT-CROCK1
(PROVE-LEMMA ASL-INT-CROCK2
(REWRITE)
(IMPLIES (AND (LEQ (TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X))
(EXP 2 (SUB1 N)))
(LESSP X (EXP 2 N)))
(EQUAL (HEAD (TIMES X (EXP 2 S)) N)
(DIFFERENCE (EXP 2 N)
(TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X)))))
((USE (REMAINDER-DIFF-LA (X (TIMES (EXP 2 N) (EXP 2 S)))
(Y (DIFFERENCE (TIMES (EXP 2 N) (EXP 2 S))
(TIMES X (EXP 2 S))))
(Z (EXP 2 N))))
(DISABLE EXP-PLUS)))
WARNING: Note that the rewrite rule ASL-INT-CROCK2 will be stored so as to
apply only to terms with the nonrecursive function symbol HEAD.
This formula can be simplified, using the abbreviations AND, IMPLIES, HEAD,
TIMES-DISTRIBUTES-DIFFERENCE1, and REMAINDER-TIMES, to:
(IMPLIES
(AND
(IMPLIES
(AND (EQUAL 0 0)
(LESSP (TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X))
(EXP 2 N)))
(EQUAL (REMAINDER (DIFFERENCE (TIMES (EXP 2 N) (EXP 2 S))
(TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X)))
(EXP 2 N))
(COND ((IF (LESSP (TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X))
(TIMES (EXP 2 N) (EXP 2 S)))
F T)
0)
((ZEROP (TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X)))
0)
(T (DIFFERENCE (EXP 2 N)
(TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X)))))))
(NOT (LESSP (EXP 2 (SUB1 N))
(TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X))))
(LESSP X (EXP 2 N)))
(EQUAL (REMAINDER (TIMES X (EXP 2 S))
(EXP 2 N))
(DIFFERENCE (EXP 2 N)
(TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X))))),
which simplifies, using linear arithmetic, rewriting with TIMES-COMMUTATIVITY,
TIMES-DISTRIBUTES-DIFFERENCE, CORRECTNESS-OF-CANCEL-LESSP-TIMES,
DIFFERENCE-LESSP, TIMES-EQUAL-0, DIFFERENCE=0, DIFFERENCE-0, TIMES-LESSP-1,
LESSP-OF-1, TIMES-ZERO, TIMES-1, SUB1-NNUMBERP, REMAINDER-0, TIMES-LESSP,
TIMES-COMMUTATIVITY1, TIMES-EXP2-LESSP, EXP-OF-2-0, DIFFERENCE-X-X, and
EXP-OF-2-1, and unfolding the definitions of EQUAL, EXP, AND, ZEROP, NOT, FIX,
IMPLIES, SUB1, LESSP, NUMBERP, DIFFERENCE, TIMES, REMAINDER, and OR, to the
following 13 new goals:
Case 13.(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (EXP 2 (SUB1 N))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))))
(LESSP X (TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (REMAINDER (TIMES X (EXP 2 S))
(TIMES 2 (EXP 2 (SUB1 N))))
0)).
But this again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES (AND (EQUAL N 0)
(NOT (LESSP (TIMES (EXP 2 S) (DIFFERENCE 1 X))
1))
(EQUAL (EXP 2 S) 0))
(NOT (EQUAL X 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES (AND (EQUAL N 0)
(NOT (LESSP (TIMES (EXP 2 S) (DIFFERENCE 1 X))
1))
(EQUAL (EXP 2 S) 0))
(NUMBERP X)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.(IMPLIES (AND (NOT (NUMBERP N))
(NOT (LESSP (TIMES (EXP 2 S) (DIFFERENCE 1 X))
1))
(EQUAL (EXP 2 S) 0))
(NOT (EQUAL X 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (NOT (NUMBERP N))
(NOT (LESSP (TIMES (EXP 2 S) (DIFFERENCE 1 X))
1))
(EQUAL (EXP 2 S) 0))
(NUMBERP X)),
which again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES
(AND
(EQUAL (EXP 2 S) 0)
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL
(REMAINDER (TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(TIMES 2 (EXP 2 (SUB1 N))))
0)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL 0 (TIMES 2 (EXP 2 (SUB1 N))))),
which again simplifies, using linear arithmetic, rewriting with the lemma
EXP-OF-2-0, and opening up the function EQUAL, to:
T.
Case 7. (IMPLIES (AND (EQUAL (EXP 2 S) 0)
(NOT (NUMBERP N))
(EQUAL (REMAINDER (TIMES (EXP 2 S)
(DIFFERENCE 1 (DIFFERENCE 1 X)))
1)
0))
(NOT (EQUAL X 0))),
which again simplifies, using linear arithmetic, applying EXP-OF-2-0, and
unfolding the function EQUAL, to:
T.
Case 6. (IMPLIES (AND (EQUAL (EXP 2 S) 0)
(NOT (NUMBERP N))
(EQUAL (REMAINDER (TIMES (EXP 2 S)
(DIFFERENCE 1 (DIFFERENCE 1 X)))
1)
0))
(NUMBERP X)).
This again simplifies, using linear arithmetic, applying EXP-OF-2-0, and
opening up EQUAL, to:
T.
Case 5. (IMPLIES (AND (EQUAL (EXP 2 S) 0)
(EQUAL N 0)
(EQUAL (REMAINDER (TIMES (EXP 2 S)
(DIFFERENCE 1 (DIFFERENCE 1 X)))
1)
0))
(NOT (EQUAL X 0))).
However this again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and unfolding the definition of EQUAL, to:
T.
Case 4. (IMPLIES (AND (EQUAL (EXP 2 S) 0)
(EQUAL N 0)
(EQUAL (REMAINDER (TIMES (EXP 2 S)
(DIFFERENCE 1 (DIFFERENCE 1 X)))
1)
0))
(NUMBERP X)),
which again simplifies, using linear arithmetic, rewriting with the lemma
EXP-OF-2-0, and opening up the definition of EQUAL, to:
T.
Case 3. (IMPLIES (AND (EQUAL N 0)
(NOT (LESSP X 1))
(EQUAL (REMAINDER (TIMES (EXP 2 S)
(DIFFERENCE 1 (DIFFERENCE 1 X)))
1)
0))
(NUMBERP X)),
which again simplifies, rewriting with LESSP-OF-1, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP N))
(NOT (LESSP X 1))
(EQUAL (REMAINDER (TIMES (EXP 2 S)
(DIFFERENCE 1 (DIFFERENCE 1 X)))
1)
0))
(NUMBERP X)).
But this again simplifies, rewriting with LESSP-OF-1, to:
T.
Case 1. (IMPLIES
(AND
(NOT (EQUAL (EXP 2 S) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0))
(NOT (EQUAL X 0))
(NUMBERP X)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(EQUAL
(REMAINDER (TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(TIMES 2 (EXP 2 (SUB1 N))))
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))))
(NOT (LESSP (EXP 2 (SUB1 N))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))))
(EQUAL (REMAINDER (TIMES X (EXP 2 S))
(TIMES 2 (EXP 2 (SUB1 N))))
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X))))).
However this again simplifies, using linear arithmetic, applying
TIMES-EQUAL-0, PLUS-COMMUTATIVITY, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
DIFFERENCE-DIFFERENCE2, and TIMES-COMMUTATIVITY, and expanding the
definitions of EQUAL, NUMBERP, and FIX, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
ASL-INT-CROCK2
(PROVE-LEMMA ASL-INT
(REWRITE)
(IMPLIES (AND (NAT-RANGEP X N)
(INT-RANGEP (NAT-TO-INT X N)
(DIFFERENCE N S)))
(EQUAL (NAT-TO-INT (ASL N X S) N)
(ITIMES (NAT-TO-INT X N) (EXP 2 S))))
((DISABLE HEAD)))
WARNING: Note that the rewrite rule ASL-INT will be stored so as to apply
only to terms with the nonrecursive function symbol NAT-TO-INT.
This formula can be simplified, using the abbreviations AND, IMPLIES, ASL, and
NAT-RANGEP, to:
(IMPLIES (AND (LESSP X (EXP 2 N))
(INT-RANGEP (NAT-TO-INT X N)
(DIFFERENCE N S)))
(EQUAL (NAT-TO-INT (HEAD (TIMES X (EXP 2 S)) N)
N)
(ITIMES (NAT-TO-INT X N) (EXP 2 S)))),
which simplifies, using linear arithmetic, applying TIMES-EQUAL-0, MINUS-EQUAL,
TIMES-COMMUTATIVITY, NEGATIVE-GUTS-MINUS, DIFFERENCE=0, TIMES-ZERO, EXP-OF-2-0,
and HEAD-LEMMA, and unfolding the functions NAT-TO-INT, FIX-INT, NUMBERP,
INTEGERP, NEGP, NEGATIVE-GUTS, ITIMES, OR, ZEROP, NAT-RANGEP, EQUAL,
DIFFERENCE, EXP, TIMES, and LESSP, to the following ten new formulas:
Case 10.(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(INT-RANGEP (MINUS (DIFFERENCE (EXP 2 N) X))
(DIFFERENCE N S))
(EQUAL (EXP 2 S) 0))
(EQUAL (HEAD (TIMES X (EXP 2 S)) N)
0)).
This again simplifies, using linear arithmetic, rewriting with the lemma
EXP-OF-2-0, and expanding the function EQUAL, to:
T.
Case 9. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(INT-RANGEP (MINUS (DIFFERENCE (EXP 2 N) X))
(DIFFERENCE N S))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) N)
(EXP 2 (SUB1 N)))))
(EQUAL (MINUS (DIFFERENCE (EXP 2 N)
(HEAD (TIMES X (EXP 2 S)) N)))
(MINUS (TIMES (EXP 2 S)
(DIFFERENCE (EXP 2 N) X))))),
which again simplifies, using linear arithmetic, applying the lemmas
NEGATIVE-GUTS-MINUS, DIFFERENCE=0, MINUS-EQUAL, LESSP-OF-1, DIFFERENCE-0,
EXP-OF-2-0, HEAD-OF-0, SUB1-NNUMBERP, TIMES-ZERO, and TIMES-COMMUTATIVITY,
and opening up the definitions of EXP, FIX-INT, NEGP, NEGATIVE-GUTS,
INTEGERP, INT-RANGEP, SUB1, NUMBERP, EQUAL, DIFFERENCE, MINUS, LESSP, OR,
and ZEROP, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP S N)
(NOT (LESSP (EXP 2 (SUB1 (DIFFERENCE N S)))
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) N)
(EXP 2 (SUB1 N)))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(HEAD (TIMES X (EXP 2 S)) N))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))).
Appealing to the lemma SUB1-ELIM, we now replace N by (ADD1 Z) to eliminate
(SUB1 N). We use the type restriction lemma noted when SUB1 was introduced
to constrain the new variable. The result is the formula:
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 Z) 0))
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP S (ADD1 Z))
(NOT (LESSP (EXP 2 (SUB1 (DIFFERENCE (ADD1 Z) S)))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) (ADD1 Z))
(EXP 2 Z))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 Z))
(HEAD (TIMES X (EXP 2 S)) (ADD1 Z)))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))).
But this further simplifies, using linear arithmetic, rewriting with the
lemmas SUB1-ADD1, TIMES-1, TIMES-COMMUTATIVITY, HEAD-LESSP, HEAD-LEMMA, and
TIMES-EQUAL-0, and expanding the functions LESSP, EQUAL, DIFFERENCE, EXP,
NAT-RANGEP, and NUMBERP, to the goal:
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(NOT (EQUAL S 0))
(NUMBERP S)
(NOT (LESSP (EXP 2 (SUB1 (DIFFERENCE Z (SUB1 S))))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) (ADD1 Z))
(EXP 2 Z))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 Z))
(HEAD (TIMES X (EXP 2 S)) (ADD1 Z)))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))).
This again simplifies, using linear arithmetic, rewriting with the lemmas
DIFFERENCE-SUB1-SUB1, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
DIFFERENCE-PLUS2, EXP-PLUS, TIMES-LESSP-LINEAR, SUB1-ADD1, ASL-INT-CROCK2,
and DIFFERENCE-DIFFERENCE2, and expanding the definitions of FIX and EXP, to:
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(NOT (EQUAL S 0))
(NUMBERP S)
(LESSP Z S)
(NOT (LESSP (EXP 2 0)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) (ADD1 Z))
(EXP 2 Z))))
(EQUAL (DIFFERENCE (TIMES 2 (EXP 2 Z))
(HEAD (TIMES X (EXP 2 S)) (ADD1 Z)))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))).
This finally simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(INT-RANGEP (MINUS (DIFFERENCE (EXP 2 N) X))
(DIFFERENCE N S))
(NOT (EQUAL (EXP 2 S) 0)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) N)
(EXP 2 (SUB1 N))))),
which again simplifies, using linear arithmetic, rewriting with
NEGATIVE-GUTS-MINUS, DIFFERENCE=0, LESSP-OF-1, DIFFERENCE-0, HEAD-OF-0, and
SUB1-NNUMBERP, and expanding the definitions of EXP, FIX-INT, NEGP,
NEGATIVE-GUTS, INTEGERP, INT-RANGEP, SUB1, NUMBERP, EQUAL, DIFFERENCE, MINUS,
and LESSP, to the following three new formulas:
Case 8.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP S N)
(NOT (LESSP (EXP 2 (SUB1 (DIFFERENCE N S)))
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
X)))
(NOT (EQUAL (EXP 2 S) 0)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) N)
(EXP 2 (SUB1 N))))).
Appealing to the lemma SUB1-ELIM, we now replace N by (ADD1 Z) to
eliminate (SUB1 N). We rely upon the type restriction lemma noted when
SUB1 was introduced to constrain the new variable. This generates the
formula:
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 Z) 0))
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP S (ADD1 Z))
(NOT (LESSP (EXP 2 (SUB1 (DIFFERENCE (ADD1 Z) S)))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (EQUAL (EXP 2 S) 0)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) (ADD1 Z))
(EXP 2 Z)))).
This further simplifies, rewriting with SUB1-ADD1, TIMES-1, and
TIMES-COMMUTATIVITY, and expanding the functions LESSP, EQUAL, DIFFERENCE,
and EXP, to the following nine new goals:
Case 8.3.9.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(EQUAL S 0)
(NOT (LESSP (EXP 2 Z)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (NUMBERP X)))
(NOT (LESSP (HEAD 0 (ADD1 Z)) (EXP 2 Z)))).
This again simplifies, using linear arithmetic, applying TIMES-LESSP,
and unfolding EQUAL, NUMBERP, and LESSP, to:
T.
Case 8.3.8.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(EQUAL S 0)
(NOT (LESSP (EXP 2 Z)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NUMBERP X))
(NOT (LESSP (HEAD X (ADD1 Z)) (EXP 2 Z)))).
This again simplifies, using linear arithmetic, applying the lemmas
SUB1-ADD1 and HEAD-LEMMA, and opening up the functions NAT-RANGEP and
EXP, to:
T.
Case 8.3.7.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(NOT (NUMBERP S))
(NOT (LESSP (EXP 2 Z)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (NUMBERP X)))
(NOT (LESSP (HEAD 0 (ADD1 Z)) (EXP 2 Z)))),
which again simplifies, using linear arithmetic, appealing to the lemma
TIMES-LESSP, and expanding EQUAL, NUMBERP, and LESSP, to:
T.
Case 8.3.6.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(NOT (NUMBERP S))
(NOT (LESSP (EXP 2 Z)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NUMBERP X))
(NOT (LESSP (HEAD X (ADD1 Z)) (EXP 2 Z)))),
which again simplifies, using linear arithmetic, rewriting with
SUB1-ADD1 and HEAD-LEMMA, and opening up the definitions of NAT-RANGEP
and EXP, to:
T.
Case 8.3.5.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(NOT (EQUAL S 0))
(NUMBERP S)
(NOT (LESSP (EXP 2 (SUB1 (DIFFERENCE Z (SUB1 S))))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (EQUAL (EXP 2 S) 0)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) (ADD1 Z))
(EXP 2 Z)))).
This again simplifies, using linear arithmetic, applying
DIFFERENCE-SUB1-SUB1, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
DIFFERENCE-PLUS2, EXP-PLUS, TIMES-LESSP-LINEAR, SUB1-ADD1, and
ASL-INT-CROCK2, and unfolding the functions FIX and EXP, to the
following two new goals:
Case 8.3.5.2.
(IMPLIES
(AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(NOT (EQUAL S 0))
(NUMBERP S)
(NOT (LESSP Z S))
(NOT (LESSP (EXP 2 (DIFFERENCE Z S))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (EQUAL (EXP 2 S) 0)))
(NOT
(LESSP (DIFFERENCE (TIMES 2 (EXP 2 Z))
(TIMES (EXP 2 S)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(EXP 2 Z)))).
However this finally simplifies, using linear arithmetic, applying
TIMES-LESSP-LINEAR, EXP-PLUS, DIFFERENCE-PLUS2, and
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and opening up the function FIX,
to:
T.
Case 8.3.5.1.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(NOT (EQUAL S 0))
(NUMBERP S)
(LESSP Z S)
(NOT (LESSP (EXP 2 0)
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (EQUAL (EXP 2 S) 0)))
(NOT (LESSP (HEAD (TIMES X (EXP 2 S)) (ADD1 Z))
(EXP 2 Z)))).
However this finally simplifies, using linear arithmetic, to:
T.
Case 8.3.4.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(EQUAL S 0)
(NOT (LESSP (EXP 2 (SUB1 (ADD1 Z)))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (NUMBERP X)))
(NOT (LESSP (HEAD 0 (ADD1 Z)) (EXP 2 Z)))),
which again simplifies, using linear arithmetic, applying TIMES-LESSP,
and unfolding the definitions of EQUAL, NUMBERP, and LESSP, to:
T.
Case 8.3.3.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(EQUAL S 0)
(NOT (LESSP (EXP 2 (SUB1 (ADD1 Z)))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NUMBERP X))
(NOT (LESSP (HEAD X (ADD1 Z)) (EXP 2 Z)))).
This again simplifies, using linear arithmetic, appealing to the lemmas
SUB1-ADD1 and HEAD-LEMMA, and expanding SUB1, EQUAL, LESSP, NAT-RANGEP,
and EXP, to:
T.
Case 8.3.2.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(NOT (NUMBERP S))
(NOT (LESSP (EXP 2 (SUB1 (ADD1 Z)))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NOT (NUMBERP X)))
(NOT (LESSP (HEAD 0 (ADD1 Z)) (EXP 2 Z)))),
which again simplifies, using linear arithmetic, appealing to the lemma
TIMES-LESSP, and opening up EQUAL, NUMBERP, and LESSP, to:
T.
Case 8.3.1.
(IMPLIES (AND (NUMBERP Z)
(LESSP X (TIMES 2 (EXP 2 Z)))
(NOT (LESSP X (EXP 2 Z)))
(LESSP (SUB1 S) Z)
(NOT (NUMBERP S))
(NOT (LESSP (EXP 2 (SUB1 (ADD1 Z)))
(DIFFERENCE (TIMES 2 (EXP 2 Z)) X)))
(NUMBERP X))
(NOT (LESSP (HEAD X (ADD1 Z)) (EXP 2 Z)))),
which again simplifies, using linear arithmetic, applying the lemmas
SUB1-NNUMBERP, SUB1-ADD1, and HEAD-LEMMA, and opening up EQUAL, LESSP,
NAT-RANGEP, and EXP, to:
T.
Case 8.2.
(IMPLIES (AND (EQUAL N 0)
(LESSP X 1)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (EXP 2 S) 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 8.1.
(IMPLIES (AND (NOT (NUMBERP N))
(LESSP X 1)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (EXP 2 S) 0)))
(NOT (EQUAL (HEAD (TIMES X (EXP 2 S)) N)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 7. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(INT-RANGEP (MINUS (DIFFERENCE (EXP 2 N) X))
(DIFFERENCE N S))
(EQUAL (EXP 2 S) 0))
(LESSP (HEAD (TIMES X (EXP 2 S)) N)
(EXP 2 (SUB1 N)))),
which again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and expanding the function EQUAL, to:
T.
Case 6. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(INT-RANGEP X (DIFFERENCE N S)))
(EQUAL (HEAD (TIMES X (EXP 2 S)) N)
(TIMES X (EXP 2 S)))).
However this again simplifies, using linear arithmetic, appealing to the
lemmas DIFFERENCE=0, TIMES-ZERO, EXP-OF-2-0, HEAD-LEMMA, ASL-INT-CROCK1,
LESSP-OF-1, DIFFERENCE-0, and SUB1-NNUMBERP, and unfolding EXP, FIX-INT,
INTEGERP, INT-RANGEP, OR, ZEROP, NAT-RANGEP, EQUAL, NUMBERP, SUB1, HEAD, and
LESSP, to:
T.
Case 5. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(INT-RANGEP X (DIFFERENCE N S)))
(LESSP (HEAD (TIMES X (EXP 2 S)) N)
(EXP 2 (SUB1 N)))),
which again simplifies, using linear arithmetic, rewriting with DIFFERENCE=0,
TIMES-ZERO, EXP-OF-2-0, HEAD-LEMMA, ASL-INT-CROCK1, TIMES-EXP2-LESSP,
LESSP-OF-1, DIFFERENCE-0, and SUB1-NNUMBERP, and unfolding the definitions
of EXP, FIX-INT, INTEGERP, INT-RANGEP, OR, ZEROP, NAT-RANGEP, EQUAL, NUMBERP,
LESSP, SUB1, and HEAD, to the following two new formulas:
Case 5.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (LESSP S N))
(EQUAL X 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))).
But this again simplifies, using linear arithmetic, to:
T.
Case 5.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(LESSP S N)
(LESSP X
(EXP 2 (SUB1 (DIFFERENCE N S)))))
(LESSP X
(EXP 2 (DIFFERENCE (SUB1 N) S)))),
which again simplifies, using linear arithmetic, applying TIMES-LESSP, and
unfolding the functions EQUAL and NUMBERP, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(LESSP S N)
(LESSP X
(EXP 2 (SUB1 (DIFFERENCE N S)))))
(LESSP X
(EXP 2 (DIFFERENCE (SUB1 N) S)))).
Applying the lemma SUB1-ELIM, replace N by (ADD1 Z) to eliminate (SUB1 N).
We rely upon the type restriction lemma noted when SUB1 was introduced to
restrict the new variable. This produces:
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 Z) 0))
(NOT (EQUAL (EXP 2 Z) 0))
(LESSP X (EXP 2 Z))
(NUMBERP X)
(LESSP S (ADD1 Z))
(LESSP X
(EXP 2
(SUB1 (DIFFERENCE (ADD1 Z) S)))))
(LESSP X (EXP 2 (DIFFERENCE Z S)))),
which further simplifies, applying SUB1-ADD1, and unfolding LESSP, EQUAL,
and DIFFERENCE, to the following five new formulas:
Case 5.1.5.
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (EXP 2 Z) 0))
(LESSP X (EXP 2 Z))
(NUMBERP X)
(EQUAL S 0)
(EQUAL Z 0))
(LESSP X (EXP 2 0))).
This finally simplifies, obviously, to:
T.
Case 5.1.4.
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (EXP 2 Z) 0))
(LESSP X (EXP 2 Z))
(NUMBERP X)
(NOT (NUMBERP S))
(EQUAL Z 0))
(LESSP X (EXP 2 0))).
This finally simplifies, clearly, to:
T.
Case 5.1.3.
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (EXP 2 Z) 0))
(LESSP X (EXP 2 Z))
(NUMBERP X)
(LESSP (SUB1 S) Z)
(NOT (EQUAL S 0))
(NUMBERP S)
(LESSP X
(EXP 2
(SUB1 (DIFFERENCE Z (SUB1 S))))))
(LESSP X (EXP 2 (DIFFERENCE Z S)))).
This again simplifies, appealing to the lemma DIFFERENCE-SUB1-SUB1, to:
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (EXP 2 Z) 0))
(LESSP X (EXP 2 Z))
(NUMBERP X)
(LESSP (SUB1 S) Z)
(NOT (EQUAL S 0))
(NUMBERP S)
(LESSP Z S)
(LESSP X (EXP 2 0)))
(LESSP X (EXP 2 (DIFFERENCE Z S)))).
This finally simplifies, using linear arithmetic, to:
T.
Case 5.1.2.
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (EXP 2 Z) 0))
(LESSP X (EXP 2 Z))
(NUMBERP X)
(LESSP (SUB1 S) Z)
(EQUAL S 0)
(LESSP X (EXP 2 (SUB1 (ADD1 Z))))
(EQUAL Z 0))
(LESSP X (EXP 2 0))),
which finally simplifies, clearly, to:
T.
Case 5.1.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (EXP 2 Z) 0))
(LESSP X (EXP 2 Z))
(NUMBERP X)
(LESSP (SUB1 S) Z)
(NOT (NUMBERP S))
(LESSP X (EXP 2 (SUB1 (ADD1 Z))))
(EQUAL Z 0))
(LESSP X (EXP 2 0))).
This finally simplifies, trivially, to:
T.
Case 4. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NOT (NUMBERP X))
(INT-RANGEP 0 (DIFFERENCE N S))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL 0 (ITIMES 0 (EXP 2 S)))).
But this again simplifies, using linear arithmetic, rewriting with the
lemmas SUB1-NNUMBERP, LESSP-OF-1, DIFFERENCE-0, TIMES-ZERO, and DIFFERENCE=0,
and opening up the definitions of EXP, LESSP, INT-RANGEP, EQUAL, ZEROP, OR,
NEGP, ITIMES, SUB1, FIX-INT, and NEGATIVEP, to:
T.
Case 3. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NOT (NUMBERP X))
(INT-RANGEP 0 (DIFFERENCE N S))
(EQUAL (EXP 2 (SUB1 N)) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL (MINUS 0)
(ITIMES (MINUS 0) (EXP 2 S)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NOT (NUMBERP X))
(INT-RANGEP 0 (DIFFERENCE N S))
(EQUAL (EXP 2 (SUB1 N)) 0)
(EQUAL N 0))
(EQUAL -1 (ITIMES -1 (EXP 2 S)))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NOT (NUMBERP X))
(INT-RANGEP 0 (DIFFERENCE N S))
(EQUAL (EXP 2 (SUB1 N)) 0)
(NOT (NUMBERP N)))
(EQUAL -1 (ITIMES -1 (EXP 2 S)))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 2.2 0.1 ]
ASL-INT
(DISABLE ASL-INT-CROCK1)
[ 0.0 0.0 0.0 ]
ASL-INT-CROCK1-OFF
(DISABLE ASL-INT-CROCK2)
[ 0.0 0.0 0.0 ]
ASL-INT-CROCK2-OFF
(PROVE-LEMMA QUOTIENT-DIFF-LA NIL
(IMPLIES (AND (EQUAL (REMAINDER X Z) 0)
(LESSP Y Z))
(EQUAL (QUOTIENT (DIFFERENCE X Y) Z)
(IF (ZEROP Y)
(QUOTIENT X Z)
(SUB1 (QUOTIENT X Z)))))
((USE (QUOTIENT-PLUS2 (I (DIFFERENCE X Z))
(X (DIFFERENCE Z Y))
(J Z)))))
This simplifies, using linear arithmetic, applying PLUS-COMMUTATIVITY,
DIFFERENCE-PLUS2, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, QUOTIENT-0, DIFFERENCE-LESSP,
DIFFERENCE-0, QUOTIENT-EXIT, SUB1-ADD1, and REMAINDER-0, and unfolding the
functions FIX, QUOTIENT, ADD1, IMPLIES, REMAINDER, EQUAL, LESSP, ZEROP, SUB1,
and DIFFERENCE, to the following 14 new goals:
Case 14.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(NUMBERP Y)
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z Y))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (QUOTIENT X Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))).
However this again simplifies, applying PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS2, and PLUS-ADD1, and
unfolding the definitions of FIX, EQUAL, DIFFERENCE, NUMBERP, PLUS, and
QUOTIENT, to:
T.
Case 13.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(NUMBERP Y)
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z Y))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(EQUAL X 0))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(NUMBERP Y)
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z Y))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic and rewriting with
QUOTIENT-LEQ, QUOTIENT-EXIT, REMAINDER-LESSP-LINEAR, and REMAINDER-EXIT, to
the new goal:
(IMPLIES (AND (LESSP X (PLUS Z 0))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
0)
Z))
(NUMBERP 0)
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z 0))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z 0))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (QUOTIENT X Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, rewriting with PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS2, and PLUS-ADD1, and
unfolding the definitions of FIX, DIFFERENCE, EQUAL, PLUS, and QUOTIENT, to:
T.
Case 10.(IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z 0))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(EQUAL X 0))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))).
However this again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (PLUS Z (DIFFERENCE 0 Z)) Y)
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE 0 Z))
Y)
Z))
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE 0 (PLUS Z 0))
Z))
(PLUS (QUOTIENT (DIFFERENCE 0 Z) Z)
1))
(NOT (LESSP 0 Z))
(EQUAL (REMAINDER (DIFFERENCE 0 Z) Z)
0))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE 0 Z) Z)))).
This again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z 0))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic and rewriting with the
lemmas QUOTIENT-LEQ, QUOTIENT-EXIT, REMAINDER-LESSP-LINEAR, and
REMAINDER-EXIT, to:
(IMPLIES (AND (LESSP X (PLUS Z 0))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z 0))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))).
However this again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES (AND (LESSP (PLUS Z (DIFFERENCE X Z)) Y)
(LESSP X (PLUS Z 0))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z 0))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL 0
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (QUOTIENT X Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 7. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL 0
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(EQUAL X 0))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (NUMBERP Y))
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL 0
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 5. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL 0
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (QUOTIENT X Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL 0
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(EQUAL X 0))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL Y 0)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL 0
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
1))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z)
(ADD1 (QUOTIENT (DIFFERENCE X Z) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z))
(EQUAL (ADD1 (QUOTIENT (DIFFERENCE X (PLUS Z Y))
Z))
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
0))
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(LESSP Y Z))
(EQUAL (QUOTIENT (DIFFERENCE X Y) Z)
(QUOTIENT (DIFFERENCE X Z) Z))),
which again simplifies, using linear arithmetic, rewriting with
PLUS-COMMUTATIVITY, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS2,
DIFFERENCE-0, QUOTIENT-0, and DIFFERENCE-DIFFERENCE1, and opening up the
definitions of FIX, ADD1, PLUS, EQUAL, and QUOTIENT, to:
T.
Case 1. (IMPLIES (AND (NOT (EQUAL Y 0))
(NUMBERP Y)
(LESSP (DIFFERENCE (PLUS Z (DIFFERENCE X Z))
Y)
Z)
(EQUAL 0
(PLUS (QUOTIENT (DIFFERENCE X Z) Z)
0))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (LESSP X Z))
(EQUAL (REMAINDER (DIFFERENCE X Z) Z)
0)
(LESSP Y Z))
(EQUAL (QUOTIENT (DIFFERENCE X Y) Z)
(QUOTIENT (DIFFERENCE X Z) Z))).
However this again simplifies, using linear arithmetic, applying
PLUS-COMMUTATIVITY, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS2,
DIFFERENCE-0, QUOTIENT-0, REMAINDER-EXIT, REMAINDER-LESSP-LINEAR,
QUOTIENT-EXIT, and DIFFERENCE=0, and unfolding the definitions of FIX, PLUS,
EQUAL, and LESSP, to:
T.
Q.E.D.
[ 0.0 0.7 0.0 ]
QUOTIENT-DIFF-LA
(PROVE-LEMMA REMAINDER-DIFF
(REWRITE)
(IMPLIES (EQUAL (REMAINDER X Z) 0)
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
(IF (OR (LEQ X Y)
(EQUAL (REMAINDER Y Z) 0))
0
(DIFFERENCE Z (REMAINDER Y Z)))))
((USE (REMAINDER-DIFF-LA (X (DIFFERENCE X
(TIMES Z (QUOTIENT Y Z))))
(Y (REMAINDER Y Z))))))
This conjecture can be simplified, using the abbreviations IMPLIES and
DIFFERENCE-DIFFERENCE1, to:
(IMPLIES
(AND
(IMPLIES
(AND (EQUAL (REMAINDER (DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))
Z)
0)
(LESSP (REMAINDER Y Z) Z))
(EQUAL (REMAINDER (DIFFERENCE X
(PLUS (TIMES Z (QUOTIENT Y Z))
(REMAINDER Y Z)))
Z)
(COND ((IF (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z))))
F T)
0)
((ZEROP (REMAINDER Y Z)) 0)
(T (DIFFERENCE Z (REMAINDER Y Z))))))
(EQUAL (REMAINDER X Z) 0))
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
(IF (OR (IF (LESSP Y X) F T)
(EQUAL (REMAINDER Y Z) 0))
0
(DIFFERENCE Z (REMAINDER Y Z))))).
This simplifies, using linear arithmetic, rewriting with
REMAINDER-DIFFERENCE-TIMES2, REMAINDER-LESSP, REMAINDER-QUOTIENT, REMAINDER-0,
and DIFFERENCE-0, and opening up EQUAL, AND, ZEROP, IMPLIES, REMAINDER, LESSP,
OR, and DIFFERENCE, to eight new conjectures:
Case 8. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(NOT (NUMBERP Y))
(EQUAL (REMAINDER (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 Z) 0)),
which again simplifies, using linear arithmetic, rewriting with DIFFERENCE-0
and REMAINDER-0, and expanding the definitions of LESSP, REMAINDER, and
EQUAL, to:
T.
Case 7. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(NOT (NUMBERP Y))
(EQUAL (REMAINDER (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(EQUAL X 0))
(EQUAL (REMAINDER 0 Z) 0)).
This again simplifies, obviously, to:
T.
Case 6. (IMPLIES (AND (NOT (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))))
(NOT (NUMBERP Y))
(EQUAL (REMAINDER (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 Z) 0)).
This again simplifies, using linear arithmetic, rewriting with the lemmas
TIMES-ZERO, TIMES-COMMUTATIVITY, DIFFERENCE-0, and REMAINDER-0, and
expanding the functions LESSP, REMAINDER, QUOTIENT, OR, ZEROP, and EQUAL, to:
T.
Case 5. (IMPLIES (AND (NOT (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))))
(NOT (NUMBERP Y))
(EQUAL (REMAINDER (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(EQUAL X 0))
(EQUAL (REMAINDER 0 Z) 0)),
which again simplifies, trivially, to:
T.
Case 4. (IMPLIES (AND (NOT (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))))
(NUMBERP Y)
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(LESSP Y X)
(NOT (EQUAL (REMAINDER Y Z) 0)))
(EQUAL 0
(DIFFERENCE Z (REMAINDER Y Z)))).
This again simplifies, applying REMAINDER-LESSP and DIFFERENCE=0, to:
(IMPLIES (AND (NOT (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))))
(NUMBERP Y)
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(LESSP Y X)
(NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (EQUAL Z 0)))
(NOT (NUMBERP Z))),
which again simplifies, using linear arithmetic and rewriting with
REMAINDER-LESSP-LINEAR, QUOTIENT-SHRINK-FAST, REMAINDER-EXIT, and
DIFFERENCE=0, to:
(IMPLIES (AND (NOT (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))))
(NUMBERP Y)
(LESSP X Y)
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(LESSP Y X)
(NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (EQUAL Z 0)))
(NOT (NUMBERP Z))),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z))))
(NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (NUMBERP Y))
(EQUAL (REMAINDER (DIFFERENCE X 0) Z)
(DIFFERENCE Z (REMAINDER Y Z)))
(EQUAL (REMAINDER X Z) 0)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 Z) 0)),
which again simplifies, using linear arithmetic, applying REMAINDER-EXIT,
QUOTIENT-EXIT, TIMES-ZERO, TIMES-COMMUTATIVITY, and DIFFERENCE-0, and
unfolding the definitions of OR, ZEROP, LESSP, REMAINDER, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z))))
(NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (NUMBERP Y))
(EQUAL (REMAINDER (DIFFERENCE X 0) Z)
(DIFFERENCE Z (REMAINDER Y Z)))
(EQUAL (REMAINDER X Z) 0)
(EQUAL X 0))
(EQUAL (REMAINDER 0 Z) 0)).
This again simplifies, trivially, to:
T.
Case 1. (IMPLIES (AND (LESSP (REMAINDER Y Z)
(DIFFERENCE X
(TIMES Z (QUOTIENT Y Z))))
(NOT (EQUAL (REMAINDER Y Z) 0))
(NUMBERP Y)
(EQUAL (REMAINDER (DIFFERENCE X Y) Z)
(DIFFERENCE Z (REMAINDER Y Z)))
(EQUAL (REMAINDER X Z) 0)
(NOT (LESSP Y X)))
(EQUAL (DIFFERENCE Z (REMAINDER Y Z))
0)).
This again simplifies, using linear arithmetic, applying the lemmas
DIFFERENCE-0, REMAINDER-0, REMAINDER-LESSP, and DIFFERENCE=0, and opening up
the definitions of EQUAL, LESSP, and REMAINDER, to:
T.
Q.E.D.
[ 0.0 0.3 0.1 ]
REMAINDER-DIFF
(PROVE-LEMMA QUOTIENT-DIFF
(REWRITE)
(IMPLIES (EQUAL (REMAINDER X Z) 0)
(EQUAL (QUOTIENT (DIFFERENCE X Y) Z)
(IF (EQUAL (REMAINDER Y Z) 0)
(DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))
(SUB1 (DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))))))
((USE (QUOTIENT-DIFF-LA (X (DIFFERENCE X
(TIMES Z (QUOTIENT Y Z))))
(Y (REMAINDER Y Z))))))
This formula can be simplified, using the abbreviations IMPLIES and
DIFFERENCE-DIFFERENCE1, to:
(IMPLIES
(AND
(IMPLIES
(AND (EQUAL (REMAINDER (DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))
Z)
0)
(LESSP (REMAINDER Y Z) Z))
(EQUAL (QUOTIENT (DIFFERENCE X
(PLUS (TIMES Z (QUOTIENT Y Z))
(REMAINDER Y Z)))
Z)
(IF (ZEROP (REMAINDER Y Z))
(QUOTIENT (DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))
Z)
(SUB1 (QUOTIENT (DIFFERENCE X
(TIMES Z (QUOTIENT Y Z)))
Z)))))
(EQUAL (REMAINDER X Z) 0))
(EQUAL (QUOTIENT (DIFFERENCE X Y) Z)
(IF (EQUAL (REMAINDER Y Z) 0)
(DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))
(SUB1 (DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z)))))),
which simplifies, using linear arithmetic, applying REMAINDER-TIMES,
REMAINDER-DIFF, REMAINDER-LESSP, REMAINDER-QUOTIENT,
QUOTIENT-DIFFERENCE-TIMES2, REMAINDER-0, DIFFERENCE-0, QUOTIENT-0,
QUOTIENT-EQUAL-0, QUOTIENT-TIMES-LESSP, and DIFFERENCE=0, and opening up the
functions EQUAL, AND, ZEROP, IMPLIES, QUOTIENT, DIFFERENCE, SUB1, REMAINDER,
and LESSP, to the following 22 new goals:
Case 22.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 0))
(EQUAL (REMAINDER X Z) 0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z) 0)).
This again simplifies, unfolding LESSP, REMAINDER, and EQUAL, to:
T.
Case 21.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 0))
(EQUAL (REMAINDER X Z) 0)
(EQUAL X 0))
(EQUAL (QUOTIENT 0 Z) 0)),
which again simplifies, unfolding the functions LESSP, REMAINDER, and EQUAL,
to:
T.
Case 20.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 0))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (NUMBERP Z)))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, expanding the definitions of REMAINDER and EQUAL, to:
T.
Case 19.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 0))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(EQUAL Z 0))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 18.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 0))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(LESSP X Z))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, using linear arithmetic, applying REMAINDER-EXIT,
and unfolding EQUAL, to:
T.
Case 17.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NUMBERP Y)
(EQUAL (QUOTIENT (DIFFERENCE X Y) Z)
(SUB1 0))
(EQUAL (REMAINDER X Z) 0))
(EQUAL (SUB1 0)
(SUB1 (DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))))).
However this again simplifies, using linear arithmetic, rewriting with the
lemmas QUOTIENT-SHRINK-FAST, DIFFERENCE-0, QUOTIENT-0, QUOTIENT-TIMES-LESSP,
and QUOTIENT-EQUAL-0, and expanding SUB1 and EQUAL, to:
T.
Case 16.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 (DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))))
(EQUAL (REMAINDER X Z) 0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z) 0)),
which again simplifies, opening up the functions LESSP, REMAINDER, and EQUAL,
to:
T.
Case 15.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 (DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))))
(EQUAL (REMAINDER X Z) 0)
(EQUAL X 0))
(EQUAL (QUOTIENT 0 Z) 0)),
which again simplifies, unfolding the definitions of LESSP, REMAINDER, and
EQUAL, to:
T.
Case 14.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 (DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (NUMBERP Z)))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, expanding the functions REMAINDER and EQUAL, to:
T.
Case 13.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 (DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(EQUAL Z 0))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, rewriting with REMAINDER-0, and opening up the
function EQUAL, to:
T.
Case 12.(IMPLIES (AND (NOT (EQUAL (REMAINDER Y Z) 0))
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(SUB1 (DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z))))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(LESSP X Z))
(EQUAL (QUOTIENT X Z) 0)).
But this again simplifies, using linear arithmetic, appealing to the lemma
REMAINDER-EXIT, and opening up the definition of EQUAL, to:
T.
Case 11.(IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z) 0)),
which again simplifies, applying TIMES-ZERO and TIMES-COMMUTATIVITY, and
opening up the functions LESSP, REMAINDER, EQUAL, QUOTIENT, OR, and ZEROP,
to:
T.
Case 10.(IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(EQUAL X 0))
(EQUAL (QUOTIENT 0 Z) 0)).
This again simplifies, rewriting with the lemmas TIMES-ZERO and
TIMES-COMMUTATIVITY, and opening up the definitions of LESSP, REMAINDER,
EQUAL, QUOTIENT, OR, and ZEROP, to:
T.
Case 9. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (NUMBERP Z)))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, rewriting with TIMES-ZERO and TIMES-COMMUTATIVITY,
and expanding REMAINDER, EQUAL, QUOTIENT, OR, ZEROP, and LESSP, to:
T.
Case 8. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(EQUAL Z 0))
(EQUAL (QUOTIENT X Z) 0)).
However this again simplifies, using linear arithmetic, to:
T.
Case 7. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(LESSP X Z))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, using linear arithmetic, applying REMAINDER-EXIT,
QUOTIENT-EXIT, TIMES-ZERO, and TIMES-COMMUTATIVITY, and opening up the
functions EQUAL, OR, ZEROP, and LESSP, to:
T.
Case 6. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(LESSP X (TIMES Z (QUOTIENT Y Z)))
(NUMBERP Y)
(EQUAL (QUOTIENT (DIFFERENCE X Y) Z)
0)
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL Z 0))
(NUMBERP Z))
(NOT (LESSP Y (TIMES Z (QUOTIENT X Z))))).
This again simplifies, using linear arithmetic and rewriting with
QUOTIENT-SHRINK-FAST, to:
T.
Case 5. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z)))
(EQUAL (REMAINDER X Z) 0)
(NOT (NUMBERP X)))
(EQUAL (QUOTIENT 0 Z) 0)).
However this again simplifies, using linear arithmetic, rewriting with
TIMES-ZERO, TIMES-COMMUTATIVITY, DIFFERENCE-0, and QUOTIENT-0, and unfolding
the definitions of LESSP, REMAINDER, EQUAL, QUOTIENT, OR, ZEROP, and
DIFFERENCE, to:
T.
Case 4. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z)))
(EQUAL (REMAINDER X Z) 0)
(EQUAL X 0))
(EQUAL (QUOTIENT 0 Z) 0)).
But this again simplifies, applying TIMES-ZERO, TIMES-COMMUTATIVITY,
QUOTIENT-0, and REMAINDER-0, and opening up the functions LESSP, REMAINDER,
EQUAL, QUOTIENT, OR, ZEROP, and DIFFERENCE, to:
T.
Case 3. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z)))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (NUMBERP Z)))
(EQUAL (QUOTIENT X Z) 0)).
But this again simplifies, applying the lemmas TIMES-ZERO and
TIMES-COMMUTATIVITY, and opening up the definitions of REMAINDER, EQUAL,
QUOTIENT, OR, ZEROP, LESSP, and DIFFERENCE, to:
T.
Case 2. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z)))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(EQUAL Z 0))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, appealing to the lemmas REMAINDER-0 and QUOTIENT-0,
and unfolding the functions EQUAL, TIMES, LESSP, and DIFFERENCE, to:
T.
Case 1. (IMPLIES (AND (EQUAL (REMAINDER Y Z) 0)
(NOT (LESSP X (TIMES Z (QUOTIENT Y Z))))
(NOT (NUMBERP Y))
(EQUAL (QUOTIENT (DIFFERENCE X 0) Z)
(DIFFERENCE (QUOTIENT X Z)
(QUOTIENT Y Z)))
(EQUAL (REMAINDER X Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(LESSP X Z))
(EQUAL (QUOTIENT X Z) 0)),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-EXIT, QUOTIENT-EXIT, TIMES-ZERO, and TIMES-COMMUTATIVITY, and
expanding the functions EQUAL, OR, ZEROP, LESSP, and DIFFERENCE, to:
T.
Q.E.D.
[ 0.0 0.9 0.1 ]
QUOTIENT-DIFF
(PROVE-LEMMA QUOTIENT-EXP-LESSP
(REWRITE)
(IMPLIES (LEQ CNT N)
(EQUAL (LESSP (QUOTIENT X (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT)))
(LESSP X (EXP 2 N)))))
WARNING: the previously added lemma, QUOTIENT-TIMES-LESSP, could be applied
whenever the newly proposed QUOTIENT-EXP-LESSP could!
This conjecture simplifies, appealing to the lemmas
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS2, EXP-PLUS, and
QUOTIENT-TIMES-LESSP, and opening up FIX, to three new formulas:
Case 3. (IMPLIES (AND (NOT (LESSP N CNT))
(NOT (EQUAL (EXP 2 CNT) 0))
(NOT (NUMBERP N)))
(EQUAL (LESSP X (EXP 2 0))
(LESSP X (EXP 2 N)))),
which again simplifies, applying LESSP-OF-1, and opening up LESSP, EXP, and
EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (LESSP N CNT))
(EQUAL (EXP 2 CNT) 0)
(EQUAL (EXP 2 (DIFFERENCE N CNT)) 0))
(EQUAL F (LESSP X (EXP 2 N)))).
This again simplifies, using linear arithmetic, applying EXP-OF-2-0, and
unfolding the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (LESSP N CNT))
(EQUAL (EXP 2 CNT) 0)
(NOT (EQUAL (EXP 2 (DIFFERENCE N CNT)) 0)))
(EQUAL T (LESSP X (EXP 2 N)))).
This again simplifies, using linear arithmetic, applying EXP-OF-2-0, and
unfolding the definition of EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
QUOTIENT-EXP-LESSP
(PROVE-LEMMA LESSP-TIMES-EXP-1S
(REWRITE)
(IMPLIES (EQUAL (PLUS M N) (FIX K))
(EQUAL (LESSP (PLUS X
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(EXP 2 (SUB1 K)))
(IF (ZEROP N)
(LESSP X (EXP 2 (SUB1 (PLUS M N))))
F)))
((INDUCT (PLUS X Y))))
This formula can be simplified, using the abbreviations ZEROP, IMPLIES, NOT,
OR, and AND, to the following two new conjectures:
Case 2. (IMPLIES (AND (ZEROP X)
(EQUAL (PLUS M N) (FIX K)))
(EQUAL (LESSP (PLUS X
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(EXP 2 (SUB1 K)))
(IF (ZEROP N)
(LESSP X (EXP 2 (SUB1 (PLUS M N))))
F))).
This simplifies, rewriting with SUB1-NNUMBERP, SUB1-OF-1, TIMES-EQUAL-0, and
LESSP-OF-1, and opening up the functions ZEROP, FIX, EQUAL, PLUS, EXP, SUB1,
and LESSP, to 18 new conjectures:
Case 2.18.
(IMPLIES (AND (EQUAL X 0)
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (EQUAL (EXP 2 N) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.17.
(IMPLIES (AND (EQUAL X 0)
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (EQUAL (EXP 2 M) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.16.
(IMPLIES (AND (EQUAL X 0)
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL (EQUAL (EXP 2 N) 1) F)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.15.
(IMPLIES (AND (EQUAL X 0)
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(EQUAL N 0)
(NOT (EQUAL (EXP 2 M) 0))
(NOT (EQUAL (EXP 2 N) 0)))
(EQUAL (EQUAL (EXP 2 N) 1) T)),
which again simplifies, applying PLUS-COMMUTATIVITY, and opening up the
definitions of EQUAL, PLUS, and EXP, to:
T.
Case 2.14.
(IMPLIES (AND (EQUAL X 0)
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (NUMBERP N))
(NOT (EQUAL (EXP 2 M) 0))
(NOT (EQUAL (EXP 2 N) 0)))
(EQUAL (EQUAL (EXP 2 N) 1) T)).
But this again simplifies, rewriting with the lemma PLUS-EQUAL-0, and
opening up the functions EXP and EQUAL, to:
T.
Case 2.13.
(IMPLIES (AND (EQUAL X 0)
(NUMBERP K)
(EQUAL (PLUS M N) K)
(EQUAL (EXP 2 (SUB1 K)) 0))
(EQUAL (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
F)),
which again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and expanding the definition of EQUAL, to:
T.
Case 2.12.
(IMPLIES (AND (EQUAL X 0)
(NUMBERP K)
(EQUAL (PLUS M N) K)
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
F)).
This again simplifies, clearly, to:
(IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N))
(NOT (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 (PLUS M N)))))),
which we will name *1.
Case 2.11.
(IMPLIES (AND (EQUAL X 0)
(NUMBERP K)
(EQUAL (PLUS M N) K)
(NOT (NUMBERP N))
(NOT (EQUAL (EXP 2 (SUB1 K)) 0)))
(EQUAL (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
T)).
This again simplifies, applying TIMES-ZERO and TIMES-COMMUTATIVITY, and
unfolding the definitions of EXP, SUB1, OR, ZEROP, EQUAL, and LESSP, to:
T.
Case 2.10.
(IMPLIES (AND (EQUAL X 0)
(NUMBERP K)
(EQUAL (PLUS M N) K)
(EQUAL N 0)
(NOT (EQUAL (EXP 2 (SUB1 K)) 0)))
(EQUAL (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
T)).
But this again simplifies, rewriting with the lemmas PLUS-COMMUTATIVITY,
TIMES-ZERO, and TIMES-COMMUTATIVITY, and unfolding EQUAL, PLUS, EXP, SUB1,
TIMES, LESSP, OR, and ZEROP, to:
T.
Case 2.9.
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (EQUAL (EXP 2 N) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.8.
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (EQUAL (EXP 2 M) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.7.
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL (EQUAL (EXP 2 N) 1) F)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.6.
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(EQUAL N 0)
(NOT (EQUAL (EXP 2 M) 0))
(NOT (EQUAL (EXP 2 N) 0)))
(EQUAL (EQUAL (EXP 2 N) 1) T)),
which again simplifies, rewriting with PLUS-COMMUTATIVITY, and expanding
the definitions of EQUAL, PLUS, and EXP, to:
T.
Case 2.5.
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (NUMBERP N))
(NOT (EQUAL (EXP 2 M) 0))
(NOT (EQUAL (EXP 2 N) 0)))
(EQUAL (EQUAL (EXP 2 N) 1) T)).
However this again simplifies, applying PLUS-EQUAL-0, and expanding the
functions EXP and EQUAL, to:
T.
Case 2.4.
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP K)
(EQUAL (PLUS M N) K)
(EQUAL (EXP 2 (SUB1 K)) 0))
(EQUAL (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
F)).
But this again simplifies, using linear arithmetic, applying EXP-OF-2-0,
and unfolding the definition of EQUAL, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP K)
(EQUAL (PLUS M N) K)
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
F)).
This again simplifies, clearly, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 (PLUS M N)))))),
which we will name *2.
Case 2.2.
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP K)
(EQUAL (PLUS M N) K)
(NOT (NUMBERP N))
(NOT (EQUAL (EXP 2 (SUB1 K)) 0)))
(EQUAL (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
T)).
But this again simplifies, rewriting with TIMES-ZERO and
TIMES-COMMUTATIVITY, and opening up the functions EXP, SUB1, OR, ZEROP,
EQUAL, and LESSP, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (NUMBERP X))
(NUMBERP K)
(EQUAL (PLUS M N) K)
(EQUAL N 0)
(NOT (EQUAL (EXP 2 (SUB1 K)) 0)))
(EQUAL (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
T)).
However this again simplifies, applying PLUS-COMMUTATIVITY, TIMES-ZERO,
and TIMES-COMMUTATIVITY, and expanding the functions EQUAL, PLUS, EXP,
SUB1, TIMES, LESSP, OR, and ZEROP, to:
T.
Case 1. (IMPLIES
(AND (NOT (EQUAL X 0))
(NUMBERP X)
(IMPLIES (EQUAL (PLUS M N) (FIX K))
(EQUAL (LESSP (PLUS (SUB1 X)
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(EXP 2 (SUB1 K)))
(IF (ZEROP N)
(LESSP (SUB1 X)
(EXP 2 (SUB1 (PLUS M N))))
F)))
(EQUAL (PLUS M N) (FIX K)))
(EQUAL (LESSP (PLUS X
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(EXP 2 (SUB1 K)))
(IF (ZEROP N)
(LESSP X (EXP 2 (SUB1 (PLUS M N))))
F))).
This simplifies, applying the lemmas PLUS-EQUAL-0, PLUS-COMMUTATIVITY,
SUB1-NNUMBERP, LESSP-OF-1, SUB1-ADD1, TIMES-ZERO, and TIMES-COMMUTATIVITY,
and opening up the functions FIX, ZEROP, IMPLIES, EXP, SUB1, TIMES, EQUAL,
PLUS, LESSP, and OR, to the following six new formulas:
Case 1.6.
(IMPLIES (AND (NOT (EQUAL X 0))
(NUMBERP X)
(NUMBERP K)
(NOT (EQUAL (FIX K) K))
(EQUAL (PLUS M N) K)
(NOT (NUMBERP N))
(NOT (EQUAL (EXP 2 (SUB1 K)) 0)))
(EQUAL (LESSP (PLUS (SUB1 X)
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(SUB1 (EXP 2 (SUB1 K))))
(LESSP X (EXP 2 (SUB1 K))))).
But this again simplifies, opening up FIX, to:
T.
Case 1.5.
(IMPLIES (AND (NOT (EQUAL X 0))
(NUMBERP X)
(NUMBERP K)
(NOT (EQUAL (FIX K) K))
(EQUAL (PLUS M N) K)
(EQUAL N 0)
(NOT (EQUAL (EXP 2 (SUB1 K)) 0)))
(EQUAL (LESSP (PLUS (SUB1 X)
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(SUB1 (EXP 2 (SUB1 K))))
(LESSP X (EXP 2 (SUB1 K))))),
which again simplifies, rewriting with the lemma PLUS-COMMUTATIVITY, and
expanding EQUAL, PLUS, and FIX, to:
T.
Case 1.4.
(IMPLIES (AND (NOT (EQUAL X 0))
(NUMBERP X)
(NUMBERP K)
(NOT (EQUAL (FIX K) K))
(EQUAL (PLUS M N) K)
(NOT (NUMBERP N))
(EQUAL (EXP 2 (SUB1 K)) 0))
(EQUAL F (LESSP X (EXP 2 (SUB1 K))))),
which again simplifies, using linear arithmetic, applying EXP-OF-2-0, and
expanding EQUAL, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL X 0))
(NUMBERP X)
(NUMBERP K)
(NOT (EQUAL (FIX K) K))
(EQUAL (PLUS M N) K)
(EQUAL N 0)
(EQUAL (EXP 2 (SUB1 K)) 0))
(EQUAL F (LESSP X (EXP 2 (SUB1 K))))).
This again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and unfolding EQUAL, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL X 0))
(NUMBERP X)
(NUMBERP K)
(NOT (EQUAL (FIX K) K))
(EQUAL (PLUS M N) K)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (EXP 2 (SUB1 K)) 0)))
(EQUAL (LESSP (PLUS (SUB1 X)
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(SUB1 (EXP 2 (SUB1 K))))
F)).
This again simplifies, opening up the definition of FIX, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (LESSP (PLUS (SUB1 X)
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(EXP 2 (SUB1 K)))
F)
(NUMBERP K)
(EQUAL (PLUS M N) K)
(NOT (EQUAL (EXP 2 (SUB1 K)) 0)))
(NOT (LESSP (PLUS (SUB1 X)
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(SUB1 (EXP 2 (SUB1 K)))))),
which again simplifies, trivially, to the new formula:
(IMPLIES (AND (NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (PLUS (SUB1 X)
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(EXP 2 (SUB1 (PLUS M N)))))
(NOT (EQUAL (EXP 2 (SUB1 (PLUS M N))) 0)))
(NOT (LESSP (PLUS (SUB1 X)
(TIMES (EXP 2 M) (SUB1 (EXP 2 N))))
(SUB1 (EXP 2 (SUB1 (PLUS M N))))))),
which again simplifies, using linear arithmetic, to:
T.
So next consider:
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 (PLUS M N)))))),
named *2 above. But this conjecture is subsumed by the subgoal we named *1
above.
So next consider:
(IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N))
(NOT (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 (PLUS M N)))))),
which we named *1 above. Let us appeal to the induction principle. Three
inductions are suggested by terms in the conjecture. They merge into two
likely candidate inductions. However, only one is unflawed. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP M) (p M N))
(IMPLIES (AND (NOT (ZEROP M)) (p (SUB1 M) N))
(p M N))).
Linear arithmetic, the lemmas SUB1-LESSEQP and SUB1-LESSP, and the definition
of ZEROP inform us that the measure (COUNT M) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme leads to two new goals:
Case 2. (IMPLIES (AND (ZEROP M)
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 (PLUS M N)))))),
which simplifies, appealing to the lemma TIMES-1, and opening up the
definitions of ZEROP, EXP, EQUAL, and PLUS, to two new formulas:
Case 2.2.
(IMPLIES (AND (EQUAL M 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (LESSP (SUB1 (EXP 2 N))
(EXP 2 (SUB1 N))))),
which again simplifies, unfolding EXP, to:
(IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N))
(NOT (LESSP (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(EXP 2 (SUB1 N))))).
However this again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and opening up the function EQUAL, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (NUMBERP M))
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (LESSP (SUB1 (EXP 2 N))
(EXP 2 (SUB1 N))))),
which again simplifies, unfolding EXP, to the goal:
(IMPLIES (AND (NOT (NUMBERP M))
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (LESSP (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(EXP 2 (SUB1 N))))).
But this again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and opening up the function EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP M))
(NOT (LESSP (TIMES (EXP 2 (SUB1 M))
(SUB1 (EXP 2 N)))
(EXP 2 (SUB1 (PLUS (SUB1 M) N)))))
(NOT (EQUAL N 0))
(NUMBERP N))
(NOT (LESSP (TIMES (EXP 2 M) (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 (PLUS M N)))))),
which simplifies, applying TIMES-ASSOCIATIVITY, SUB1-ADD1, PLUS-EQUAL-0,
SUB1-OF-1, and CORRECTNESS-OF-CANCEL-LESSP-TIMES, and opening up the
functions ZEROP, EXP, PLUS, NOT, FIX, and AND, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.1 ]
LESSP-TIMES-EXP-1S
(PROVE-LEMMA LESSP-APP-1S
(REWRITE)
(IMPLIES (EQUAL (PLUS M N) (FIX K))
(EQUAL (LESSP (APP M X (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
(IF (ZEROP N)
(LESSP (HEAD X M)
(EXP 2 (SUB1 (PLUS M N))))
F))))
This formula can be simplified, using the abbreviations IMPLIES and HEAD, to:
(IMPLIES (EQUAL (PLUS M N) (FIX K))
(EQUAL (LESSP (APP M X (SUB1 (EXP 2 N)))
(EXP 2 (SUB1 K)))
(IF (ZEROP N)
(LESSP (REMAINDER X (EXP 2 M))
(EXP 2 (SUB1 (PLUS M N))))
F))),
which simplifies, rewriting with TIMES-COMMUTATIVITY, SUB1-NNUMBERP, SUB1-OF-1,
TIMES-EQUAL-0, PLUS-EQUAL-0, LESSP-OF-1, PLUS-COMMUTATIVITY, and
LESSP-TIMES-EXP-1S, and unfolding the functions FIX, HEAD, APP, EXP, ZEROP,
SUB1, EQUAL, and PLUS, to the following 13 new goals:
Case 13.(IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (REMAINDER X (EXP 2 M)) 0))
(NOT (EQUAL (EXP 2 M) 0))).
But this again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (REMAINDER X (EXP 2 M)) 0))
(NOT (EQUAL (EXP 2 N) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (NUMBERP N))
(NOT (EQUAL (REMAINDER X (EXP 2 M)) 0)))
(EQUAL F
(EQUAL (REMAINDER X (EXP 2 M)) 0))),
which again simplifies, obviously, to:
T.
Case 10.(IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(EQUAL N 0)
(NOT (EQUAL (REMAINDER X (EXP 2 M)) 0)))
(EQUAL F
(EQUAL (REMAINDER X (EXP 2 M)) 0))).
This again simplifies, obviously, to:
T.
Case 9. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(EQUAL N 0)
(EQUAL (REMAINDER X (EXP 2 M)) 0)
(EQUAL (EXP 2 M) 0))
(EQUAL T
(EQUAL (REMAINDER X (EXP 2 M)) 0))).
However this again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and expanding EQUAL, to:
T.
Case 8. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(EQUAL N 0)
(EQUAL (REMAINDER X (EXP 2 M)) 0)
(EQUAL (EXP 2 N) 0))
(EQUAL T
(EQUAL (REMAINDER X (EXP 2 M)) 0))),
which again simplifies, applying PLUS-COMMUTATIVITY and REMAINDER-1, and
expanding the functions EQUAL, PLUS, and EXP, to:
T.
Case 7. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (NUMBERP N))
(EQUAL (REMAINDER X (EXP 2 M)) 0)
(EQUAL (EXP 2 M) 0))
(EQUAL T
(EQUAL (REMAINDER X (EXP 2 M)) 0))).
This again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and opening up EQUAL, to:
T.
Case 6. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (NUMBERP N))
(EQUAL (REMAINDER X (EXP 2 M)) 0)
(EQUAL (EXP 2 N) 0))
(EQUAL T
(EQUAL (REMAINDER X (EXP 2 M)) 0))).
This again simplifies, appealing to the lemmas PLUS-EQUAL-0 and REMAINDER-1,
and unfolding the definitions of EXP and EQUAL, to:
T.
Case 5. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (NUMBERP N))
(EQUAL (REMAINDER X (EXP 2 M)) 0)
(NOT (EQUAL (EXP 2 M) 0))
(NOT (EQUAL (EXP 2 N) 0)))
(EQUAL (EQUAL (EXP 2 N) 1)
(EQUAL (REMAINDER X (EXP 2 M)) 0))),
which again simplifies, applying PLUS-EQUAL-0 and REMAINDER-1, and opening
up the functions EXP and EQUAL, to:
T.
Case 4. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(EQUAL N 0)
(EQUAL (REMAINDER X (EXP 2 M)) 0)
(NOT (EQUAL (EXP 2 M) 0))
(NOT (EQUAL (EXP 2 N) 0)))
(EQUAL (EQUAL (EXP 2 N) 1)
(EQUAL (REMAINDER X (EXP 2 M)) 0))).
This again simplifies, appealing to the lemmas PLUS-COMMUTATIVITY and
REMAINDER-1, and unfolding EQUAL, PLUS, and EXP, to:
T.
Case 3. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (REMAINDER X (EXP 2 M)) 0))
(EQUAL (EQUAL (EXP 2 N) 1) F)),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NUMBERP K)
(EQUAL (PLUS M N) K)
(EQUAL N 0)
(NUMBERP M))
(EQUAL (LESSP (REMAINDER X (EXP 2 M))
(EXP 2 (SUB1 M)))
(LESSP (REMAINDER X (EXP 2 M))
(EXP 2 (SUB1 K))))),
which again simplifies, appealing to the lemma PLUS-COMMUTATIVITY, and
opening up EQUAL, PLUS, and EXP, to:
T.
Case 1. (IMPLIES (AND (NUMBERP K)
(EQUAL (PLUS M N) K)
(EQUAL N 0)
(NOT (NUMBERP M)))
(EQUAL (LESSP (REMAINDER X (EXP 2 M))
(EXP 2 (SUB1 0)))
(LESSP (REMAINDER X (EXP 2 M))
(EXP 2 (SUB1 K))))),
which again simplifies, appealing to the lemmas PLUS-COMMUTATIVITY and
REMAINDER-1, and unfolding EQUAL, PLUS, NUMBERP, EXP, SUB1, and LESSP, to:
T.
Q.E.D.
[ 0.0 0.1 0.1 ]
LESSP-APP-1S
(PROVE-LEMMA TIMES-SUB1
(REWRITE)
(EQUAL (TIMES (SUB1 Y) X)
(DIFFERENCE (TIMES X Y) X))
((USE (TIMES-DISTRIBUTES-DIFFERENCE (Z 1)))))
WARNING: the previously added lemma, TIMES-COMMUTATIVITY, could be applied
whenever the newly proposed TIMES-SUB1 could!
This conjecture can be simplified, using the abbreviations DIFFERENCE-SUB1 and
TIMES-DISTRIBUTES-DIFFERENCE, to:
(IMPLIES (EQUAL (TIMES X (SUB1 Y))
(TIMES X (SUB1 Y)))
(EQUAL (TIMES (SUB1 Y) X)
(DIFFERENCE (TIMES X Y) X))).
This simplifies, rewriting with TIMES-COMMUTATIVITY, to:
(EQUAL (TIMES X (SUB1 Y))
(DIFFERENCE (TIMES X Y) X)).
Appealing to the lemma SUB1-ELIM, we now replace Y by (ADD1 Z) to eliminate
(SUB1 Y). We rely upon the type restriction lemma noted when SUB1 was
introduced to constrain the new variable. The result is three new conjectures:
Case 3. (IMPLIES (EQUAL Y 0)
(EQUAL (TIMES X (SUB1 Y))
(DIFFERENCE (TIMES X Y) X))),
which further simplifies, using linear arithmetic, applying TIMES-ZERO,
TIMES-COMMUTATIVITY, and DIFFERENCE-0, and opening up the definitions of
SUB1, OR, ZEROP, and EQUAL, to:
T.
Case 2. (IMPLIES (NOT (NUMBERP Y))
(EQUAL (TIMES X (SUB1 Y))
(DIFFERENCE (TIMES X Y) X))).
However this further simplifies, using linear arithmetic, applying
SUB1-NNUMBERP, TIMES-ZERO, TIMES-COMMUTATIVITY, and DIFFERENCE-0, and
opening up OR, ZEROP, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 Z) 0)))
(EQUAL (TIMES X Z)
(DIFFERENCE (TIMES X (ADD1 Z)) X))).
But this further simplifies, rewriting with TIMES-ADD1 and
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and unfolding the function FIX, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
TIMES-SUB1
(PROVE-LEMMA DIFFERENCE-APP-1S
(REWRITE)
(IMPLIES (EQUAL (PLUS M N) (FIX K))
(EQUAL (DIFFERENCE (EXP 2 K)
(APP M X (SUB1 (EXP 2 N))))
(DIFFERENCE (EXP 2 M) (HEAD X M)))))
This conjecture can be simplified, using the abbreviations IMPLIES and HEAD,
to the goal:
(IMPLIES (EQUAL (PLUS M N) (FIX K))
(EQUAL (DIFFERENCE (EXP 2 K)
(APP M X (SUB1 (EXP 2 N))))
(DIFFERENCE (EXP 2 M)
(REMAINDER X (EXP 2 M))))).
This simplifies, using linear arithmetic, rewriting with PLUS-COMMUTATIVITY,
TIMES-SUB1, DIFFERENCE-0, EXP-OF-2-0, and EXP-PLUS, and unfolding the
functions FIX, EXP, PLUS, EQUAL, HEAD, APP, LESSP, SUB1, NUMBERP, and
DIFFERENCE, to three new goals:
Case 3. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(NOT (EQUAL (REMAINDER X (EXP 2 M)) 0)))
(EQUAL 0
(DIFFERENCE (EXP 2 M)
(REMAINDER X (EXP 2 M))))),
which again simplifies, applying PLUS-EQUAL-0 and REMAINDER-1, and expanding
the definitions of EXP and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (PLUS M N) 0)
(EQUAL (REMAINDER X (EXP 2 M)) 0))
(EQUAL 1
(DIFFERENCE (EXP 2 M)
(REMAINDER X (EXP 2 M))))).
This again simplifies, applying PLUS-EQUAL-0 and REMAINDER-1, and expanding
the definitions of EXP, EQUAL, and DIFFERENCE, to:
T.
Case 1. (IMPLIES (AND (NUMBERP K) (EQUAL (PLUS M N) K))
(EQUAL (DIFFERENCE (EXP 2 K)
(PLUS (REMAINDER X (EXP 2 M))
(DIFFERENCE (EXP 2 K) (EXP 2 M))))
(DIFFERENCE (EXP 2 M)
(REMAINDER X (EXP 2 M))))).
This again simplifies, using linear arithmetic, to three new goals:
Case 1.3.
(IMPLIES (AND (LESSP (EXP 2 (PLUS M N))
(PLUS (REMAINDER X (EXP 2 M))
(DIFFERENCE (EXP 2 (PLUS M N))
(EXP 2 M))))
(NUMBERP (PLUS M N)))
(EQUAL (DIFFERENCE (EXP 2 (PLUS M N))
(PLUS (REMAINDER X (EXP 2 M))
(DIFFERENCE (EXP 2 (PLUS M N))
(EXP 2 M))))
(DIFFERENCE (EXP 2 M)
(REMAINDER X (EXP 2 M))))),
which again simplifies, using linear arithmetic, applying the lemmas
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and expanding the definition of
EQUAL, to the formula:
(IMPLIES (AND (LESSP (EXP 2 (PLUS M N)) (EXP 2 M))
(LESSP (EXP 2 (PLUS M N))
(PLUS (REMAINDER X (EXP 2 M))
(DIFFERENCE (EXP 2 (PLUS M N))
(EXP 2 M))))
(NUMBERP (PLUS M N)))
(EQUAL (DIFFERENCE (EXP 2 (PLUS M N))
(PLUS (REMAINDER X (EXP 2 M))
(DIFFERENCE (EXP 2 (PLUS M N))
(EXP 2 M))))
(DIFFERENCE (EXP 2 M)
(REMAINDER X (EXP 2 M))))).
But this again simplifies, applying CORRECTNESS-OF-CANCEL-LESSP-PLUS and
EXP-LESSP, and expanding EQUAL and NUMBERP, to:
T.
Case 1.2.
(IMPLIES (AND (LESSP (EXP 2 M)
(REMAINDER X (EXP 2 M)))
(NUMBERP (PLUS M N)))
(EQUAL (DIFFERENCE (EXP 2 (PLUS M N))
(PLUS (REMAINDER X (EXP 2 M))
(DIFFERENCE (EXP 2 (PLUS M N))
(EXP 2 M))))
(DIFFERENCE (EXP 2 M)
(REMAINDER X (EXP 2 M))))).
However this again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and expanding EQUAL, to:
T.
Case 1.1.
(IMPLIES (AND (LESSP (EXP 2 (PLUS M N)) (EXP 2 M))
(NUMBERP (PLUS M N)))
(EQUAL (DIFFERENCE (EXP 2 (PLUS M N))
(PLUS (REMAINDER X (EXP 2 M))
(DIFFERENCE (EXP 2 (PLUS M N))
(EXP 2 M))))
(DIFFERENCE (EXP 2 M)
(REMAINDER X (EXP 2 M))))).
However this again simplifies, applying CORRECTNESS-OF-CANCEL-LESSP-PLUS
and EXP-LESSP, and expanding the functions EQUAL and NUMBERP, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
DIFFERENCE-APP-1S
(DISABLE TIMES-SUB1)
[ 0.0 0.0 0.0 ]
TIMES-SUB1-OFF
(PROVE-LEMMA ASR-INT-CROCK
(REWRITE)
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LEQ CNT N))
(EQUAL (LESSP (APP (DIFFERENCE N CNT)
(QUOTIENT X (EXP 2 CNT))
(SUB1 (EXP 2 CNT)))
(EXP 2 (SUB1 N)))
F))
((DISABLE APP)))
This conjecture simplifies, using linear arithmetic, applying DIFFERENCE-PLUS1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, PLUS-COMMUTATIVITY, QUOTIENT-EXP-LESSP,
HEAD-LEMMA, EXP-PLUS, QUOTIENT-TIMES-LESSP, LESSP-APP-1S, LESSP-OF-1,
QUOTIENT-1, APP-0, DIFFERENCE-0, and SUB1-NNUMBERP, and unfolding EXP, FIX,
NAT-RANGEP, EQUAL, PLUS, DIFFERENCE, SUB1, LESSP, and NUMBERP, to six new
goals:
Case 6. (IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT))
(NOT (NUMBERP CNT))
(EQUAL (EXP 2 CNT) 0))
(EQUAL (EXP 2 (SUB1 N)) 0)),
which again simplifies, unfolding LESSP, EXP, and EQUAL, to:
T.
Case 5. (IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT))
(EQUAL CNT 0)
(EQUAL (EXP 2 CNT) 0))
(EQUAL (EXP 2 (SUB1 N)) 0)),
which again simplifies, expanding the definitions of EQUAL, LESSP, and EXP,
to:
T.
Case 4. (IMPLIES (AND (EQUAL N 0)
(LESSP X 1)
(NOT (EQUAL X 0))
(NUMBERP X))
(NOT (EQUAL CNT 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (EQUAL N 0)
(LESSP X 1)
(NOT (EQUAL X 0))
(NUMBERP X))
(NUMBERP CNT)),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP N))
(LESSP X 1)
(NOT (EQUAL X 0))
(NUMBERP X))
(NOT (EQUAL CNT 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP N))
(LESSP X 1)
(NOT (EQUAL X 0))
(NUMBERP X))
(NUMBERP CNT)),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
ASR-INT-CROCK
(PROVE-LEMMA ASR-INT
(REWRITE)
(IMPLIES (NAT-RANGEP X N)
(EQUAL (NAT-TO-INT (ASR N X I) N)
(IF (NEGATIVEP (NAT-TO-INT X N))
(IF (EQUAL (IREMAINDER (NAT-TO-INT X N)
(EXP 2 I))
0)
(IQUOTIENT (NAT-TO-INT X N) (EXP 2 I))
(IPLUS -1
(IQUOTIENT (NAT-TO-INT X N)
(EXP 2 I))))
(IQUOTIENT (NAT-TO-INT X N)
(EXP 2 I)))))
((DISABLE APP EXP QUOTIENT-TIMES-LESSP)))
WARNING: Note that the rewrite rule ASR-INT will be stored so as to apply
only to terms with the nonrecursive function symbol NAT-TO-INT.
This formula can be simplified, using the abbreviations IMPLIES and NAT-RANGEP,
to the new formula:
(IMPLIES (LESSP X (EXP 2 N))
(EQUAL (NAT-TO-INT (ASR N X I) N)
(IF (NEGATIVEP (NAT-TO-INT X N))
(IF (EQUAL (IREMAINDER (NAT-TO-INT X N)
(EXP 2 I))
0)
(IQUOTIENT (NAT-TO-INT X N) (EXP 2 I))
(IPLUS -1
(IQUOTIENT (NAT-TO-INT X N)
(EXP 2 I))))
(IQUOTIENT (NAT-TO-INT X N)
(EXP 2 I))))),
which simplifies, unfolding the definitions of TAIL, ASR, NAT-TO-INT, NEGP,
and IQUOTIENT, to eight new formulas:
Case 8. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NOT (NUMBERP X)))
(EQUAL (NAT-TO-INT (QUOTIENT X (EXP 2 I)) N)
(QUOTIENT 0 (EXP 2 I)))),
which again simplifies, using linear arithmetic, applying EXP-OF-2-0,
QUOTIENT-EXIT, and QUOTIENT-0, and expanding the functions LESSP, EQUAL,
NUMBERP, and NAT-TO-INT, to:
T.
Case 7. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NOT (NEGATIVEP X)))
(EQUAL (NAT-TO-INT (QUOTIENT X (EXP 2 I)) N)
(QUOTIENT X (EXP 2 I)))).
But this again simplifies, unfolding the definition of NAT-TO-INT, to the
conjecture:
(IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X))
(LESSP (QUOTIENT X (EXP 2 I))
(EXP 2 (SUB1 N)))).
However this again simplifies, using linear arithmetic and applying
QUOTIENT-LEQ, to:
T.
Case 6. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NEGATIVEP X)
(EQUAL (IREMAINDER X (EXP 2 I)) 0))
(EQUAL (NAT-TO-INT (QUOTIENT X (EXP 2 I)) N)
(IQUOTIENT X (EXP 2 I)))).
This again simplifies, trivially, to:
T.
Case 5. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X)
(NEGATIVEP X)
(NOT (EQUAL (IREMAINDER X (EXP 2 I)) 0)))
(EQUAL (NAT-TO-INT (QUOTIENT X (EXP 2 I)) N)
(IPLUS -1 (IQUOTIENT X (EXP 2 I))))).
This again simplifies, trivially, to:
T.
Case 4. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL (IREMAINDER (MINUS (DIFFERENCE (EXP 2 N) X))
(EXP 2 I))
0)
(LESSP N I))
(EQUAL (NAT-TO-INT (SUB1 (EXP 2 N)) N)
(IQUOTIENT (MINUS (DIFFERENCE (EXP 2 N) X))
(EXP 2 I)))).
But this again simplifies, using linear arithmetic, applying REMAINDER-EXIT,
EXP-LESSP, DIFFERENCE-LESSP1, NEGATIVE-GUTS-MINUS, and DIFFERENCE=0, and
unfolding the functions FIX-INT, INTEGERP, NUMBERP, EQUAL, ABS, NEGP,
NEGATIVE-GUTS, and IREMAINDER, to:
T.
Case 3. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL (IREMAINDER (MINUS (DIFFERENCE (EXP 2 N) X))
(EXP 2 I))
0)
(NOT (LESSP N I)))
(EQUAL (NAT-TO-INT (APP (DIFFERENCE N I)
(QUOTIENT X (EXP 2 I))
(SUB1 (EXP 2 I)))
N)
(IQUOTIENT (MINUS (DIFFERENCE (EXP 2 N) X))
(EXP 2 I)))).
But this again simplifies, using linear arithmetic, applying MINUS-EQUAL,
REMAINDER-DIFF, REMAINDER-EXP, NEGATIVE-GUTS-MINUS, DIFFERENCE=0,
DIFFERENCE-APP-1S, HEAD-LEMMA, QUOTIENT-EXP-LESSP, PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS1, ASR-INT-CROCK,
QUOTIENT-DIFF, and QUOTIENT-EXP, and unfolding the functions FIX-INT,
NUMBERP, INTEGERP, LESSP, EQUAL, ABS, NEGP, NEGATIVE-GUTS, IREMAINDER,
NAT-RANGEP, FIX, NAT-TO-INT, and IQUOTIENT, to the following three new
conjectures:
Case 3.3.
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL (DIFFERENCE (EXP 2 I)
(REMAINDER X (EXP 2 I)))
0)
(NOT (LESSP N I))
(NOT (EQUAL (REMAINDER X (EXP 2 I)) 0)))
(EQUAL (MINUS (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I))))
(MINUS (SUB1 (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I))))))).
However this again simplifies, using linear arithmetic and applying
REMAINDER-LESSP-LINEAR, to the new conjecture:
(IMPLIES (AND (LESSP (EXP 2 I)
(REMAINDER X (EXP 2 I)))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL (DIFFERENCE (EXP 2 I)
(REMAINDER X (EXP 2 I)))
0)
(NOT (LESSP N I))
(NOT (EQUAL (REMAINDER X (EXP 2 I)) 0)))
(EQUAL (MINUS (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I))))
(MINUS (SUB1 (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I))))))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and opening up EQUAL, to:
T.
Case 3.2.
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL (DIFFERENCE (EXP 2 I)
(REMAINDER X (EXP 2 I)))
0)
(NOT (LESSP N I))
(EQUAL (REMAINDER X (EXP 2 I)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I)))
0))).
This again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and unfolding EQUAL, to:
T.
Case 3.1.
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL (DIFFERENCE (EXP 2 I)
(REMAINDER X (EXP 2 I)))
0)
(NOT (LESSP N I))
(NOT (EQUAL (REMAINDER X (EXP 2 I)) 0)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I))))
0))).
However this again simplifies, using linear arithmetic and applying the
lemma REMAINDER-LESSP-LINEAR, to the formula:
(IMPLIES (AND (LESSP (EXP 2 I)
(REMAINDER X (EXP 2 I)))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL (DIFFERENCE (EXP 2 I)
(REMAINDER X (EXP 2 I)))
0)
(NOT (LESSP N I))
(NOT (EQUAL (REMAINDER X (EXP 2 I)) 0)))
(NOT (EQUAL (SUB1 (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I))))
0))).
This again simplifies, using linear arithmetic, appealing to the lemmas
REMAINDER-LESSP-LINEAR and EXP-OF-2-0, and unfolding the function EQUAL,
to:
T.
Case 2. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (EQUAL (IREMAINDER (MINUS (DIFFERENCE (EXP 2 N) X))
(EXP 2 I))
0))
(LESSP N I))
(EQUAL (NAT-TO-INT (SUB1 (EXP 2 N)) N)
(IPLUS -1
(IQUOTIENT (MINUS (DIFFERENCE (EXP 2 N) X))
(EXP 2 I))))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-EXIT, EXP-LESSP, DIFFERENCE-LESSP1, NEGATIVE-GUTS-MINUS,
DIFFERENCE=0, and QUOTIENT-EXIT, and expanding FIX-INT, INTEGERP, NUMBERP,
EQUAL, ABS, NEGP, NEGATIVE-GUTS, IREMAINDER, NAT-TO-INT, MINUS, IQUOTIENT,
and IPLUS, to the following two new formulas:
Case 2.2.
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N I))
(EQUAL (MINUS (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N))))
-1)).
But this again simplifies, applying NEGATIVE-GUTS-MINUS and MINUS-EQUAL,
and expanding NEGATIVE-GUTS and NUMBERP, to:
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N I))
(EQUAL (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N)))
1)),
which again simplifies, using linear arithmetic, to two new conjectures:
Case 2.2.2.
(IMPLIES (AND (LESSP (EXP 2 N) (SUB1 (EXP 2 N)))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N I))
(EQUAL (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N)))
1)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (EQUAL (EXP 2 N) 0)
(LESSP (EXP 2 N) (SUB1 (EXP 2 N)))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N I))
(EQUAL (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N)))
1)).
But this again simplifies, using linear arithmetic, to:
T.
Case 2.2.1.
(IMPLIES (AND (EQUAL (EXP 2 N) 0)
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N I))
(EQUAL (DIFFERENCE (EXP 2 N)
(SUB1 (EXP 2 N)))
1)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N I))
(NOT (LESSP (SUB1 (EXP 2 N))
(EXP 2 (SUB1 N))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (EQUAL (IREMAINDER (MINUS (DIFFERENCE (EXP 2 N) X))
(EXP 2 I))
0))
(NOT (LESSP N I)))
(EQUAL (NAT-TO-INT (APP (DIFFERENCE N I)
(QUOTIENT X (EXP 2 I))
(SUB1 (EXP 2 I)))
N)
(IPLUS -1
(IQUOTIENT (MINUS (DIFFERENCE (EXP 2 N) X))
(EXP 2 I))))),
which again simplifies, using linear arithmetic, rewriting with MINUS-EQUAL,
REMAINDER-DIFF, REMAINDER-EXP, NEGATIVE-GUTS-MINUS, DIFFERENCE=0,
DIFFERENCE-APP-1S, HEAD-LEMMA, QUOTIENT-EXP-LESSP, PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS1, ASR-INT-CROCK,
SUB1-OF-1, QUOTIENT-DIFF, and QUOTIENT-EXP, and unfolding the functions
FIX-INT, NUMBERP, INTEGERP, LESSP, EQUAL, ABS, NEGP, NEGATIVE-GUTS,
IREMAINDER, NAT-RANGEP, FIX, NAT-TO-INT, and IQUOTIENT, to the following two
new goals:
Case 1.2.
(IMPLIES
(AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (EQUAL (REMAINDER X (EXP 2 I)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 I)
(REMAINDER X (EXP 2 I)))
0))
(NOT (LESSP N I))
(NOT (EQUAL (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I)))
1)))
(EQUAL (MINUS (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I))))
(IPLUS -1
(MINUS (SUB1 (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I)))))))).
But this again simplifies, applying REMAINDER-LESSP, DIFFERENCE=0,
PLUS-ADD1, ADD1-SUB1, NEGATIVE-GUTS-MINUS, QUOTIENT-EXP-LESSP, and
SUB1-OF-1, and expanding the definitions of NEGATIVE-GUTS, NEGP, and IPLUS,
to:
T.
Case 1.1.
(IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (EQUAL (REMAINDER X (EXP 2 I)) 0))
(NOT (EQUAL (DIFFERENCE (EXP 2 I)
(REMAINDER X (EXP 2 I)))
0))
(NOT (LESSP N I))
(EQUAL (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I)))
1))
(EQUAL (MINUS (DIFFERENCE (EXP 2 (DIFFERENCE N I))
(QUOTIENT X (EXP 2 I))))
(IPLUS -1 0))).
But this again simplifies, appealing to the lemmas REMAINDER-LESSP and
DIFFERENCE=0, and expanding the definitions of IPLUS and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.6 0.1 ]
ASR-INT
(DISABLE ASR-INT-CROCK)
[ 0.0 0.0 0.0 ]
ASR-INT-CROCK-OFF
(DISABLE QUOTIENT-EXP-LESSP)
[ 0.0 0.0 0.0 ]
QUOTIENT-EXP-LESSP-OFF
(DISABLE REMAINDER-DIFF)
[ 0.0 0.0 0.0 ]
REMAINDER-DIFF-OFF
(DISABLE QUOTIENT-DIFF)
[ 0.0 0.0 0.0 ]
QUOTIENT-DIFF-OFF
(PROVE-LEMMA LSL-0
(REWRITE)
(EQUAL (LSL N X 0) (HEAD X N)))
WARNING: Note that the rewrite rule LSL-0 will be stored so as to apply only
to terms with the nonrecursive function symbol LSL.
This conjecture can be simplified, using the abbreviations HEAD and LSL, to
the conjecture:
(EQUAL (REMAINDER (TIMES X (EXP 2 0))
(EXP 2 N))
(REMAINDER X (EXP 2 N))).
This simplifies, applying TIMES-1 and TIMES-COMMUTATIVITY, and unfolding the
definition of EXP, to:
(IMPLIES (NOT (NUMBERP X))
(EQUAL (REMAINDER 0 (EXP 2 N))
(REMAINDER X (EXP 2 N)))).
However this again simplifies, using linear arithmetic, appealing to the
lemmas REMAINDER-0, EXP-OF-2-0, and REMAINDER-EXIT, and expanding EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LSL-0
(PROVE-LEMMA LSL-NAT-RANGEP
(REWRITE)
(NAT-RANGEP (LSL N X CNT) N))
WARNING: Note that the rewrite rule LSL-NAT-RANGEP will be stored so as to
apply only to terms with the nonrecursive function symbol NAT-RANGEP.
This formula can be simplified, using the abbreviations NOT, REMAINDER-LESSP,
HEAD, LSL, and NAT-RANGEP, to the following two new goals:
Case 2. (NOT (EQUAL (EXP 2 N) 0)).
This simplifies, using linear arithmetic, applying EXP-OF-2-0, and opening
up the definition of EQUAL, to:
T.
Case 1. (NUMBERP (EXP 2 N)),
which simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LSL-NAT-RANGEP
(PROVE-LEMMA LSL-LSL
(REWRITE)
(EQUAL (LSL N (LSL N X CNT1) CNT2)
(LSL N X (PLUS CNT1 CNT2))))
WARNING: Note that the rewrite rule LSL-LSL will be stored so as to apply
only to terms with the nonrecursive function symbol LSL.
This conjecture can be simplified, using the abbreviations HEAD and LSL, to
the goal:
(EQUAL (REMAINDER (TIMES (REMAINDER (TIMES X (EXP 2 CNT1))
(EXP 2 N))
(EXP 2 CNT2))
(EXP 2 N))
(REMAINDER (TIMES X (EXP 2 (PLUS CNT1 CNT2)))
(EXP 2 N))).
This simplifies, applying the lemmas TIMES-COMMUTATIVITY,
REMAINDER-TIMES-EXP2-1, TIMES-ASSOCIATIVITY, DIFFERENCE-DIFFERENCE1,
REMAINDER-REMAINDER-EXP2, REMAINDER-TIMES-EXP2-2, and TIMES-COMMUTATIVITY1, to
the following two new goals:
Case 2. (IMPLIES
(NOT (LESSP (DIFFERENCE N CNT1)
(DIFFERENCE N (PLUS CNT1 CNT2))))
(EQUAL (TIMES (EXP 2 CNT1)
(EXP 2 CNT2)
(REMAINDER X
(EXP 2
(DIFFERENCE N (PLUS CNT1 CNT2)))))
(TIMES (EXP 2 (PLUS CNT1 CNT2))
(REMAINDER X
(EXP 2
(DIFFERENCE N (PLUS CNT1 CNT2))))))).
However this again simplifies, applying CORRECTNESS-OF-CANCEL-EQUAL-TIMES
and EXP-PLUS, and unfolding the functions ZEROP, NOT, and FIX, to:
T.
Case 1. (IMPLIES
(LESSP (DIFFERENCE N CNT1)
(DIFFERENCE N (PLUS CNT1 CNT2)))
(EQUAL (TIMES (EXP 2 CNT1)
(EXP 2 CNT2)
(REMAINDER X
(EXP 2 (DIFFERENCE N CNT1))))
(TIMES (EXP 2 (PLUS CNT1 CNT2))
(REMAINDER X
(EXP 2
(DIFFERENCE N (PLUS CNT1 CNT2))))))).
This again simplifies, using linear arithmetic, to the goal:
(IMPLIES
(AND (LESSP N (PLUS CNT1 CNT2))
(LESSP (DIFFERENCE N CNT1)
(DIFFERENCE N (PLUS CNT1 CNT2))))
(EQUAL (TIMES (EXP 2 CNT1)
(EXP 2 CNT2)
(REMAINDER X
(EXP 2 (DIFFERENCE N CNT1))))
(TIMES (EXP 2 (PLUS CNT1 CNT2))
(REMAINDER X
(EXP 2
(DIFFERENCE N (PLUS CNT1 CNT2))))))).
But this again simplifies, using linear arithmetic, applying DIFFERENCE-0,
and unfolding EQUAL and LESSP, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
LSL-LSL
(PROVE-LEMMA LSR-0
(REWRITE)
(EQUAL (LSR X 0) (FIX X)))
WARNING: Note that the rewrite rule LSR-0 will be stored so as to apply only
to terms with the nonrecursive function symbol LSR.
This conjecture can be simplified, using the abbreviations TAIL and LSR, to:
(EQUAL (QUOTIENT X (EXP 2 0))
(FIX X)).
This simplifies, rewriting with QUOTIENT-1, and expanding EXP and FIX, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LSR-0
(PROVE-LEMMA LSR-NAT-RANGEP
(REWRITE)
(IMPLIES (NAT-RANGEP X N)
(NAT-RANGEP (LSR X CNT) N)))
WARNING: Note that the rewrite rule LSR-NAT-RANGEP will be stored so as to
apply only to terms with the nonrecursive function symbol NAT-RANGEP.
This conjecture can be simplified, using the abbreviations IMPLIES, TAIL, LSR,
and NAT-RANGEP, to the conjecture:
(IMPLIES (LESSP X (EXP 2 N))
(LESSP (QUOTIENT X (EXP 2 CNT))
(EXP 2 N))).
This simplifies, using linear arithmetic and applying QUOTIENT-LEQ, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LSR-NAT-RANGEP
(PROVE-LEMMA LSR-LSR
(REWRITE)
(EQUAL (LSR (LSR X CNT1) CNT2)
(LSR X (PLUS CNT1 CNT2))))
WARNING: Note that the rewrite rule LSR-LSR will be stored so as to apply
only to terms with the nonrecursive function symbol LSR.
This formula can be simplified, using the abbreviations EXP-PLUS,
QUOTIENT-QUOTIENT, TAIL, and LSR, to:
(EQUAL (QUOTIENT X (EXP 2 (PLUS CNT1 CNT2)))
(QUOTIENT X
(EXP 2 (PLUS CNT1 CNT2)))),
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LSR-LSR
(PROVE-LEMMA ASL-0
(REWRITE)
(EQUAL (ASL N X 0) (HEAD X N)))
WARNING: Note that the rewrite rule ASL-0 will be stored so as to apply only
to terms with the nonrecursive function symbol ASL.
This conjecture can be simplified, using the abbreviations HEAD and ASL, to
the conjecture:
(EQUAL (REMAINDER (TIMES X (EXP 2 0))
(EXP 2 N))
(REMAINDER X (EXP 2 N))).
This simplifies, applying TIMES-1 and TIMES-COMMUTATIVITY, and unfolding the
definition of EXP, to:
(IMPLIES (NOT (NUMBERP X))
(EQUAL (REMAINDER 0 (EXP 2 N))
(REMAINDER X (EXP 2 N)))).
However this again simplifies, using linear arithmetic, appealing to the
lemmas REMAINDER-0, EXP-OF-2-0, and REMAINDER-EXIT, and expanding EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
ASL-0
(PROVE-LEMMA ASL-NAT-RANGEP
(REWRITE)
(NAT-RANGEP (ASL N X CNT) N))
WARNING: Note that the rewrite rule ASL-NAT-RANGEP will be stored so as to
apply only to terms with the nonrecursive function symbol NAT-RANGEP.
This formula can be simplified, using the abbreviations NOT, REMAINDER-LESSP,
HEAD, ASL, and NAT-RANGEP, to the following two new goals:
Case 2. (NOT (EQUAL (EXP 2 N) 0)).
This simplifies, using linear arithmetic, applying EXP-OF-2-0, and opening
up the definition of EQUAL, to:
T.
Case 1. (NUMBERP (EXP 2 N)),
which simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ASL-NAT-RANGEP
(PROVE-LEMMA ASL-ASL
(REWRITE)
(EQUAL (ASL N (ASL N X CNT1) CNT2)
(ASL N X (PLUS CNT1 CNT2))))
WARNING: Note that the rewrite rule ASL-ASL will be stored so as to apply
only to terms with the nonrecursive function symbol ASL.
This conjecture can be simplified, using the abbreviations HEAD and ASL, to
the goal:
(EQUAL (REMAINDER (TIMES (REMAINDER (TIMES X (EXP 2 CNT1))
(EXP 2 N))
(EXP 2 CNT2))
(EXP 2 N))
(REMAINDER (TIMES X (EXP 2 (PLUS CNT1 CNT2)))
(EXP 2 N))).
This simplifies, applying the lemmas TIMES-COMMUTATIVITY,
REMAINDER-TIMES-EXP2-1, TIMES-ASSOCIATIVITY, DIFFERENCE-DIFFERENCE1,
REMAINDER-REMAINDER-EXP2, REMAINDER-TIMES-EXP2-2, and TIMES-COMMUTATIVITY1, to
the following two new goals:
Case 2. (IMPLIES
(NOT (LESSP (DIFFERENCE N CNT1)
(DIFFERENCE N (PLUS CNT1 CNT2))))
(EQUAL (TIMES (EXP 2 CNT1)
(EXP 2 CNT2)
(REMAINDER X
(EXP 2
(DIFFERENCE N (PLUS CNT1 CNT2)))))
(TIMES (EXP 2 (PLUS CNT1 CNT2))
(REMAINDER X
(EXP 2
(DIFFERENCE N (PLUS CNT1 CNT2))))))).
However this again simplifies, applying CORRECTNESS-OF-CANCEL-EQUAL-TIMES
and EXP-PLUS, and unfolding the functions ZEROP, NOT, and FIX, to:
T.
Case 1. (IMPLIES
(LESSP (DIFFERENCE N CNT1)
(DIFFERENCE N (PLUS CNT1 CNT2)))
(EQUAL (TIMES (EXP 2 CNT1)
(EXP 2 CNT2)
(REMAINDER X
(EXP 2 (DIFFERENCE N CNT1))))
(TIMES (EXP 2 (PLUS CNT1 CNT2))
(REMAINDER X
(EXP 2
(DIFFERENCE N (PLUS CNT1 CNT2))))))).
This again simplifies, using linear arithmetic, to the goal:
(IMPLIES
(AND (LESSP N (PLUS CNT1 CNT2))
(LESSP (DIFFERENCE N CNT1)
(DIFFERENCE N (PLUS CNT1 CNT2))))
(EQUAL (TIMES (EXP 2 CNT1)
(EXP 2 CNT2)
(REMAINDER X
(EXP 2 (DIFFERENCE N CNT1))))
(TIMES (EXP 2 (PLUS CNT1 CNT2))
(REMAINDER X
(EXP 2
(DIFFERENCE N (PLUS CNT1 CNT2))))))).
But this again simplifies, using linear arithmetic, applying DIFFERENCE-0,
and unfolding EQUAL and LESSP, to:
T.
Q.E.D.
[ 0.0 0.2 0.3 ]
ASL-ASL
(PROVE-LEMMA ASR-0
(REWRITE)
(IMPLIES (NAT-RANGEP X N)
(EQUAL (ASR N X 0) (FIX X))))
WARNING: Note that the rewrite rule ASR-0 will be stored so as to apply only
to terms with the nonrecursive function symbol ASR.
This formula can be simplified, using the abbreviations IMPLIES and NAT-RANGEP,
to the new conjecture:
(IMPLIES (LESSP X (EXP 2 N))
(EQUAL (ASR N X 0) (FIX X))),
which simplifies, rewriting with APP-0 and TAIL-OF-0, and opening up HEAD,
SUB1, EXP, DIFFERENCE, LESSP, EQUAL, ASR, and FIX, to the following six new
formulas:
Case 6. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (NUMBERP X))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (NUMBERP N)))
(EQUAL (REMAINDER 0 (EXP 2 0)) 0)).
However this again simplifies, applying LESSP-OF-1 and SUB1-NNUMBERP, and
unfolding the definition of EXP, to:
T.
Case 5. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (NUMBERP X))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL N 0))
(EQUAL (REMAINDER 0 (EXP 2 0)) 0)).
This again simplifies, rewriting with LESSP-OF-1, and opening up the
definitions of EXP and SUB1, to:
T.
Case 4. (IMPLIES (AND (LESSP X (EXP 2 N))
(NOT (NUMBERP X))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL (REMAINDER 0 (EXP 2 N)) 0)).
But this again simplifies, using linear arithmetic, applying TIMES-LESSP,
and opening up EXP, EQUAL, NUMBERP, and LESSP, to:
T.
Case 3. (IMPLIES (AND (LESSP X (EXP 2 N))
(NUMBERP X)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (NUMBERP N)))
(EQUAL (REMAINDER X (EXP 2 0)) X)).
But this again simplifies, rewriting with the lemmas LESSP-OF-1 and
SUB1-NNUMBERP, and opening up the functions EXP, NUMBERP, and LESSP, to:
T.
Case 2. (IMPLIES (AND (LESSP X (EXP 2 N))
(NUMBERP X)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(EQUAL N 0))
(EQUAL (REMAINDER X (EXP 2 0)) X)),
which again simplifies, rewriting with the lemma LESSP-OF-1, and opening up
the functions EXP, NUMBERP, SUB1, and LESSP, to:
T.
Case 1. (IMPLIES (AND (LESSP X (EXP 2 N))
(NUMBERP X)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL (REMAINDER X (EXP 2 N)) X)),
which again simplifies, rewriting with the lemma REMAINDER-EXIT, and opening
up the definition of EXP, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
ASR-0
(PROVE-LEMMA ASR-NAT-RANGEP
(REWRITE)
(IMPLIES (NAT-RANGEP X N)
(NAT-RANGEP (ASR N X CNT) N))
((USE (LESSP-PLUS-TIMES-EXP2 (X (QUOTIENT X (EXP 2 CNT)))
(Y (SUB1 (EXP 2 CNT)))
(I (DIFFERENCE N CNT))))))
WARNING: Note that the rewrite rule ASR-NAT-RANGEP will be stored so as to
apply only to terms with the nonrecursive function symbol NAT-RANGEP.
This formula can be simplified, using the abbreviations IMPLIES and NAT-RANGEP,
to:
(IMPLIES
(AND
(IMPLIES (LESSP (QUOTIENT X (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT)))
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(IF (ZEROP (SUB1 (EXP 2 CNT)))
(LESSP (QUOTIENT X (EXP 2 CNT))
(EXP 2 N))
(LESSP (SUB1 (EXP 2 CNT))
(EXP 2
(DIFFERENCE N (DIFFERENCE N CNT)))))))
(LESSP X (EXP 2 N)))
(LESSP (ASR N X CNT) (EXP 2 N))),
which simplifies, rewriting with EXP-PLUS, QUOTIENT-TIMES-LESSP, SUB1-OF-1,
PLUS-COMMUTATIVITY, APP-0, QUOTIENT-0, TIMES-ZERO, and QUOTIENT-1, and
expanding ZEROP, IMPLIES, APP, HEAD, TAIL, ASR, TIMES, SUB1, OR, EQUAL, and
LESSP, to the following 16 new formulas:
Case 16.(IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(NOT (LESSP X
(EXP 2
(PLUS CNT (DIFFERENCE N CNT)))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))).
This again simplifies, using linear arithmetic, to:
(IMPLIES (AND (EQUAL (EXP 2 N) 0)
(NOT (EQUAL (EXP 2 CNT) 0))
(NOT (LESSP X
(EXP 2
(PLUS CNT (DIFFERENCE N CNT)))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))).
However this again simplifies, using linear arithmetic, to:
T.
Case 15.(IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(NOT (LESSP X
(EXP 2
(PLUS CNT (DIFFERENCE N CNT)))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT)))
(LESSP (PLUS (TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT)))
(REMAINDER (QUOTIENT X (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))),
which again simplifies, rewriting with the lemmas
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS2, LESSP-OF-1, and
SUB1-NNUMBERP, and expanding FIX, EXP, and LESSP, to:
T.
Case 14.(IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(NOT (LESSP X
(EXP 2
(PLUS CNT (DIFFERENCE N CNT)))))
(LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N))))
(LESSP (QUOTIENT X (EXP 2 CNT))
(EXP 2 N))),
which again simplifies, using linear arithmetic and applying QUOTIENT-LEQ,
to:
T.
Case 13.(IMPLIES (AND (EQUAL (EXP 2 CNT) 0)
(EQUAL (EXP 2 (DIFFERENCE N CNT)) 0)
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))).
This again simplifies, using linear arithmetic, to:
(IMPLIES (AND (EQUAL (EXP 2 N) 0)
(EQUAL (EXP 2 CNT) 0)
(EQUAL (EXP 2 (DIFFERENCE N CNT)) 0)
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))).
This again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES (AND (EQUAL (EXP 2 CNT) 0)
(EQUAL (EXP 2 (DIFFERENCE N CNT)) 0)
(LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N))))
(LESSP 0 (EXP 2 N))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES (AND (EQUAL (EXP 2 CNT) 0)
(EQUAL (EXP 2 (DIFFERENCE N CNT)) 0)
(LESSP X (EXP 2 N))
(NOT (LESSP N CNT)))
(LESSP 0 (EXP 2 N))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.(IMPLIES (AND (EQUAL (EXP 2 CNT) 0)
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
T)
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))),
which again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (EQUAL (EXP 2 CNT) 0)
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
T)
(LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N))))
(LESSP 0 (EXP 2 N))),
which again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES (AND (EQUAL (EXP 2 CNT) 0)
(NOT (EQUAL (EXP 2 N) 0))
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
T)
(LESSP X (EXP 2 N))
(NOT (LESSP N CNT)))
(LESSP 0 (EXP 2 N))),
which again simplifies, using linear arithmetic, to:
T.
Case 7. (IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(NOT (EQUAL (EXP 2 CNT) 1))
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP (SUB1 (EXP 2 CNT))
(EXP 2
(DIFFERENCE N (DIFFERENCE N CNT)))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (EQUAL (EXP 2 N) 0)
(NOT (EQUAL (EXP 2 CNT) 0))
(NOT (EQUAL (EXP 2 CNT) 1))
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP (SUB1 (EXP 2 CNT))
(EXP 2
(DIFFERENCE N (DIFFERENCE N CNT)))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))).
But this again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(NOT (EQUAL (EXP 2 CNT) 1))
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP (SUB1 (EXP 2 CNT))
(EXP 2
(DIFFERENCE N (DIFFERENCE N CNT)))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT)))
(LESSP (PLUS (TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT)))
(REMAINDER (QUOTIENT X (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))),
which again simplifies, applying PLUS-COMMUTATIVITY,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-DIFFERENCE2, TIMES-EQUAL-0,
TIMES-ZERO, QUOTIENT-1, REMAINDER-LESSP, LESSP-OF-1, SUB1-NNUMBERP,
QUOTIENT-TIMES-LESSP, EXP-PLUS, DIFFERENCE-PLUS2, REMAINDER-EXIT, and
LESSP-SUB1, and unfolding the functions EXP, FIX, LESSP, SUB1, DIFFERENCE,
OR, EQUAL, NUMBERP, ZEROP, and PLUS, to:
(IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(NOT (EQUAL (EXP 2 CNT) 1))
(NOT (NUMBERP CNT))
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(TIMES 2 (EXP 2 (SUB1 N))))
(LESSP (SUB1 (EXP 2 CNT)) (EXP 2 0)))
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))),
which again simplifies, using linear arithmetic, applying the lemma
EXP-OF-2-0, and expanding the definition of EQUAL, to:
T.
Case 5. (IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(NOT (EQUAL (EXP 2 CNT) 1))
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP (SUB1 (EXP 2 CNT))
(EXP 2
(DIFFERENCE N (DIFFERENCE N CNT)))))
(LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N))))
(LESSP (QUOTIENT X (EXP 2 CNT))
(EXP 2 N))),
which again simplifies, using linear arithmetic and applying QUOTIENT-LEQ,
to:
T.
Case 4. (IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(EQUAL (EXP 2 CNT) 1)
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP X (EXP 2 (PLUS CNT N))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))).
However this again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES (AND (EQUAL (EXP 2 N) 0)
(NOT (EQUAL 1 0))
(EQUAL (EXP 2 CNT) 1)
(EQUAL (LESSP (PLUS (QUOTIENT X 1)
(TIMES (SUB1 1)
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP X (EXP 2 (PLUS CNT N))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(LESSP N CNT))
(LESSP (SUB1 (EXP 2 N)) (EXP 2 N))).
But this again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(EQUAL (EXP 2 CNT) 1)
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP X (EXP 2 (PLUS CNT N))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT))
(NOT (NUMBERP X)))
(LESSP (REMAINDER 0
(EXP 2 (DIFFERENCE N CNT)))
(EXP 2 N))),
which again simplifies, applying the lemmas QUOTIENT-1, TIMES-ZERO,
LESSP-OF-1, SUB1-NNUMBERP, and REMAINDER-0, and opening up EQUAL, SUB1, OR,
ZEROP, PLUS, EXP, LESSP, and TIMES, to:
(IMPLIES (AND (EQUAL (EXP 2 CNT) 1)
(NOT (EQUAL (EXP 2 (PLUS CNT N)) 0))
(NOT (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0))
(EQUAL (EXP 2 (SUB1 N)) 0)
(NOT (LESSP N CNT))
(NOT (NUMBERP X))
(NOT (EQUAL N 0)))
(NOT (NUMBERP N))).
But this again simplifies, using linear arithmetic, rewriting with the lemma
EXP-OF-2-0, and opening up EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(EQUAL (EXP 2 CNT) 1)
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP X (EXP 2 (PLUS CNT N))))
(LESSP X (EXP 2 N))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT))
(NUMBERP X))
(LESSP (REMAINDER X
(EXP 2 (DIFFERENCE N CNT)))
(EXP 2 N))),
which again simplifies, appealing to the lemmas QUOTIENT-1, TIMES-ZERO,
PLUS-COMMUTATIVITY, LESSP-OF-1, and SUB1-NNUMBERP, and opening up EQUAL,
SUB1, OR, ZEROP, PLUS, EXP, and LESSP, to:
(IMPLIES (AND (EQUAL (EXP 2 CNT) 1)
(NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(LESSP X (EXP 2 (PLUS CNT N))))
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT))
(NUMBERP X))
(LESSP (REMAINDER X
(EXP 2 (DIFFERENCE N CNT)))
(TIMES 2 (EXP 2 (SUB1 N))))).
This again simplifies, obviously, to the new conjecture:
(IMPLIES (AND (EQUAL (EXP 2 CNT) 1)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (PLUS CNT N)))
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT))
(NUMBERP X))
(LESSP (REMAINDER X
(EXP 2 (DIFFERENCE N CNT)))
(TIMES 2 (EXP 2 (SUB1 N))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace X by:
(PLUS Z
(TIMES (EXP 2 (DIFFERENCE N CNT)) V))
to eliminate (REMAINDER X (EXP 2 (DIFFERENCE N CNT))) and:
(QUOTIENT X
(EXP 2 (DIFFERENCE N CNT)))
. We use REMAINDER-LESSP, the type restriction lemma noted when REMAINDER
was introduced, and the type restriction lemma noted when QUOTIENT was
introduced to restrict the new variables. We thus obtain the following
three new conjectures:
Case 2.3.
(IMPLIES (AND (EQUAL (EXP 2 (DIFFERENCE N CNT)) 0)
(EQUAL (EXP 2 CNT) 1)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (PLUS CNT N)))
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT))
(NUMBERP X))
(LESSP (REMAINDER X
(EXP 2 (DIFFERENCE N CNT)))
(TIMES 2 (EXP 2 (SUB1 N))))).
However this further simplifies, using linear arithmetic, appealing to the
lemma EXP-OF-2-0, and unfolding the definition of EQUAL, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (NUMBERP (EXP 2 (DIFFERENCE N CNT))))
(EQUAL (EXP 2 CNT) 1)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (PLUS CNT N)))
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (LESSP N CNT))
(NUMBERP X))
(LESSP (REMAINDER X
(EXP 2 (DIFFERENCE N CNT)))
(TIMES 2 (EXP 2 (SUB1 N))))),
which further simplifies, trivially, to:
T.
Case 2.1.
(IMPLIES (AND (NUMBERP Z)
(EQUAL (LESSP Z (EXP 2 (DIFFERENCE N CNT)))
(NOT (ZEROP (EXP 2 (DIFFERENCE N CNT)))))
(NUMBERP V)
(NOT (EQUAL (EXP 2 (DIFFERENCE N CNT)) 0))
(EQUAL (EXP 2 CNT) 1)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP (PLUS Z
(TIMES (EXP 2 (DIFFERENCE N CNT)) V))
(EXP 2 (PLUS CNT N)))
(LESSP (PLUS Z
(TIMES (EXP 2 (DIFFERENCE N CNT)) V))
(TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP (PLUS Z
(TIMES (EXP 2 (DIFFERENCE N CNT)) V))
(EXP 2 (SUB1 N))))
(NOT (LESSP N CNT)))
(LESSP Z (TIMES 2 (EXP 2 (SUB1 N))))).
But this further simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NOT (EQUAL (EXP 2 CNT) 0))
(EQUAL (EXP 2 CNT) 1)
(EQUAL (LESSP (PLUS (QUOTIENT X (EXP 2 CNT))
(TIMES (SUB1 (EXP 2 CNT))
(EXP 2 (DIFFERENCE N CNT))))
(EXP 2 N))
(LESSP X (EXP 2 (PLUS CNT N))))
(LESSP X (EXP 2 N))
(LESSP X (EXP 2 (SUB1 N)))
(NOT (NUMBERP X)))
(LESSP 0 (EXP 2 N))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.7 0.0 ]
ASR-NAT-RANGEP
(PROVE-LEMMA MBIT-MEANS-LESSP
(REWRITE)
(IMPLIES (NAT-RANGEP X N)
(EQUAL (BITN X (SUB1 N))
(IF (LESSP X (EXP 2 (SUB1 N))) 0 1))))
WARNING: Note that the rewrite rule MBIT-MEANS-LESSP will be stored so as to
apply only to terms with the nonrecursive function symbol BITN.
This conjecture can be simplified, using the abbreviations IMPLIES, TAIL, BCAR,
BITN, and NAT-RANGEP, to:
(IMPLIES (LESSP X (EXP 2 N))
(EQUAL (REMAINDER (QUOTIENT X (EXP 2 (SUB1 N)))
2)
(IF (LESSP X (EXP 2 (SUB1 N))) 0 1))).
This simplifies, applying the lemmas QUOTIENT-TIMES-LESSP, TIMES-COMMUTATIVITY,
REMAINDER-EXIT, QUOTIENT-1, LESSP-OF-1, and SUB1-NNUMBERP, and opening up EXP,
NUMBERP, EQUAL, and SUB1, to the following eight new formulas:
Case 8. (IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N)))))
(EQUAL (QUOTIENT X (EXP 2 (SUB1 N)))
1)).
This again simplifies, using linear arithmetic, applying QUOTIENT-EXIT, and
opening up the definitions of ADD1 and QUOTIENT, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(NOT (LESSP X (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))),
which again simplifies, using linear arithmetic, applying EXP-OF-2-0, and
opening up the function EQUAL, to:
T.
Case 7. (IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (TIMES 2 (EXP 2 (SUB1 N))))
(LESSP X (EXP 2 (SUB1 N))))
(EQUAL (QUOTIENT X (EXP 2 (SUB1 N)))
0)).
But this again simplifies, using linear arithmetic, applying TIMES-LESSP and
QUOTIENT-EXIT, and opening up EQUAL and NUMBERP, to:
T.
Case 6. (IMPLIES (AND (EQUAL N 0)
(LESSP X 1)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 2) 0)).
But this again simplifies, rewriting with the lemma LESSP-OF-1, and
unfolding the definitions of REMAINDER and EQUAL, to:
T.
Case 5. (IMPLIES (AND (EQUAL N 0)
(LESSP X 1)
(EQUAL X 0)
(NUMBERP X))
(EQUAL (REMAINDER X 2) 0)),
which again simplifies, unfolding LESSP, NUMBERP, REMAINDER, and EQUAL, to:
T.
Case 4. (IMPLIES (AND (EQUAL N 0)
(LESSP X 1)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (REMAINDER X 2) 1)),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NOT (NUMBERP N))
(LESSP X 1)
(NOT (NUMBERP X)))
(EQUAL (REMAINDER 0 2) 0)),
which again simplifies, appealing to the lemma LESSP-OF-1, and opening up
the functions REMAINDER and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP N))
(LESSP X 1)
(EQUAL X 0)
(NUMBERP X))
(EQUAL (REMAINDER X 2) 0)),
which again simplifies, unfolding the definitions of LESSP, NUMBERP,
REMAINDER, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP N))
(LESSP X 1)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (REMAINDER X 2) 1)),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
MBIT-MEANS-LESSP
(PROVE-LEMMA EXP2-LESSP
(REWRITE)
(IMPLIES (LESSP I J)
(LESSP (EXP 2 I) (EXP 2 J))))
WARNING: When the linear lemma EXP2-LESSP is stored under (EXP 2 J) it
contains the free variable I which will be chosen by instantiating the
hypothesis (LESSP I J).
WARNING: When the linear lemma EXP2-LESSP is stored under (EXP 2 I) it
contains the free variable J which will be chosen by instantiating the
hypothesis (LESSP I J).
WARNING: Note that the proposed lemma EXP2-LESSP is to be stored as zero type
prescription rules, zero compound recognizer rules, two linear rules, and zero
replacement rules.
This conjecture simplifies, applying EXP-LESSP, and expanding the functions
EQUAL and NUMBERP, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EXP2-LESSP
(PROVE-LEMMA EXT-INT
(REWRITE)
(IMPLIES (AND (NAT-RANGEP X N) (LESSP N SIZE))
(EQUAL (NAT-TO-INT (EXT N X SIZE) SIZE)
(NAT-TO-INT X N)))
((DISABLE APP EXP PLUS)))
WARNING: Note that the rewrite rule EXT-INT will be stored so as to apply
only to terms with the nonrecursive function symbol NAT-TO-INT.
This formula can be simplified, using the abbreviations AND, IMPLIES, and
NAT-RANGEP, to the new formula:
(IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP N SIZE))
(EQUAL (NAT-TO-INT (EXT N X SIZE) SIZE)
(NAT-TO-INT X N))),
which simplifies, using linear arithmetic, appealing to the lemmas HEAD-LEMMA
and MBIT-MEANS-LESSP, and unfolding the functions B0P, B0, NAT-RANGEP, EXT,
and NAT-TO-INT, to three new goals:
Case 3. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP N SIZE)
(NOT (LESSP X (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (APP N X
(SUB1 (EXP 2 (DIFFERENCE SIZE N))))
SIZE)
(MINUS (DIFFERENCE (EXP 2 N) X)))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
DIFFERENCE-APP-1S, HEAD-LEMMA, LESSP-APP-1S, DIFFERENCE=0,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-PLUS2, NEGATIVE-GUTS-MINUS,
and MINUS-EQUAL, and opening up NAT-RANGEP, FIX, and NAT-TO-INT, to:
(IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP N SIZE)
(NOT (LESSP X (EXP 2 (SUB1 N))))
(NOT (NUMBERP X)))
(EQUAL (DIFFERENCE (EXP 2 N) 0)
(DIFFERENCE (EXP 2 N) X))).
But this again simplifies, expanding LESSP, EQUAL, and DIFFERENCE, to:
T.
Case 2. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP N SIZE)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X))
(EQUAL (NAT-TO-INT X SIZE) X)),
which again simplifies, unfolding NAT-TO-INT, to the conjecture:
(IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP N SIZE)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X))
(LESSP X (EXP 2 (SUB1 SIZE)))).
Appealing to the lemma SUB1-ELIM, we now replace N by (ADD1 Z) to eliminate
(SUB1 N). We use the type restriction lemma noted when SUB1 was introduced
to constrain the new variable. This generates three new conjectures:
Case 2.3.
(IMPLIES (AND (EQUAL N 0)
(LESSP X (EXP 2 N))
(LESSP N SIZE)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X))
(LESSP X (EXP 2 (SUB1 SIZE)))),
which further simplifies, applying the lemma LESSP-OF-1, and expanding the
definitions of EXP, EQUAL, LESSP, SUB1, and NUMBERP, to the formula:
(IMPLIES (AND (EQUAL X 0)
(NOT (EQUAL SIZE 0))
(NUMBERP SIZE))
(NOT (EQUAL (EXP 2 (SUB1 SIZE)) 0))).
However this again simplifies, using linear arithmetic, applying
EXP-OF-2-0, and expanding the function EQUAL, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (NUMBERP N))
(LESSP X (EXP 2 N))
(LESSP N SIZE)
(LESSP X (EXP 2 (SUB1 N)))
(NUMBERP X))
(LESSP X (EXP 2 (SUB1 SIZE)))).
This further simplifies, rewriting with SUB1-NNUMBERP and LESSP-OF-1, and
unfolding the functions LESSP, EXP, NUMBERP, and EQUAL, to:
(IMPLIES (AND (NOT (NUMBERP N))
(LESSP X (EXP 2 N))
(NOT (EQUAL SIZE 0))
(NUMBERP SIZE)
(EQUAL X 0))
(NOT (EQUAL (EXP 2 (SUB1 SIZE)) 0))),
which again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and expanding the definition of EQUAL, to:
T.
Case 2.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 Z) 0))
(LESSP X (EXP 2 (ADD1 Z)))
(LESSP (ADD1 Z) SIZE)
(LESSP X (EXP 2 Z))
(NUMBERP X))
(LESSP X (EXP 2 (SUB1 SIZE)))).
This further simplifies, applying SUB1-ADD1, and opening up the definition
of LESSP, to:
(IMPLIES (AND (NUMBERP Z)
(LESSP X (EXP 2 (ADD1 Z)))
(NOT (EQUAL SIZE 0))
(NUMBERP SIZE)
(LESSP Z (SUB1 SIZE))
(LESSP X (EXP 2 Z))
(NUMBERP X))
(LESSP X (EXP 2 (SUB1 SIZE)))),
which again simplifies, using linear arithmetic and rewriting with the
lemma EXP2-LESSP, to:
T.
Case 1. (IMPLIES (AND (LESSP X (EXP 2 N))
(LESSP N SIZE)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (NUMBERP X)))
(EQUAL (NAT-TO-INT 0 SIZE) 0)),
which again simplifies, unfolding the definitions of LESSP, NUMBERP,
DIFFERENCE, EQUAL, and NAT-TO-INT, to:
(IMPLIES (AND (NOT (EQUAL (EXP 2 N) 0))
(LESSP N SIZE)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (NUMBERP X)))
(NOT (EQUAL (EXP 2 (SUB1 SIZE)) 0))).
This again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and unfolding the definition of EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EXT-INT
(DISABLE EXP2-LESSP)
[ 0.0 0.0 0.0 ]
EXP2-LESSP-OFF
(DEFN ADDER-INT-END
(N C X Y)
(NAT-TO-INT (REMAINDER (PLUS (FIX-BIT C)
(INT-TO-NAT X N)
(INT-TO-NAT Y N))
(EXP 2 N))
N))
Note that:
(OR (NUMBERP (ADDER-INT-END N C X Y))
(NEGATIVEP (ADDER-INT-END N C X Y)))
is a theorem.
[ 0.0 0.0 0.0 ]
ADDER-INT-END
(PROVE-LEMMA PLUS-TO-IPLUS
(REWRITE)
(IMPLIES (AND (INTEGERP X)
(INTEGERP Y)
(INT-RANGEP X N)
(INT-RANGEP Y N))
(EQUAL (ADDER-INT-END N C X Y)
(IF (INT-RANGEP (IPLUS X (IPLUS Y (FIX-BIT C)))
N)
(IPLUS X (IPLUS Y (FIX-BIT C)))
(IF (NEGATIVEP X)
(IPLUS X
(IPLUS Y
(IPLUS (FIX-BIT C) (EXP 2 N))))
(IPLUS X
(IPLUS Y
(IPLUS (FIX-BIT C)
(MINUS (EXP 2 N)))))))))
((DISABLE TIMES-DISTRIBUTES-PLUS-NEW
CORRECTNESS-OF-CANCEL-LESSP-PLUS)
(ENABLE TIMES-DISTRIBUTES-PLUS)))
WARNING: Note that the rewrite rule PLUS-TO-IPLUS will be stored so as to
apply only to terms with the nonrecursive function symbol ADDER-INT-END.
This simplifies, rewriting with PLUS-COMMUTATIVITY1, PLUS-COMMUTATIVITY,
REMAINDER-1, DIFFERENCE-SUB1, LESSP-OF-1, and SUB1-NNUMBERP, and unfolding
NEGP, NEGATIVE-GUTS, INTEGERP, FIX-INT, INT-RANGEP, INT-TO-NAT, FIX-BIT, B0,
B0P, B1, ADDER-INT-END, IPLUS, EQUAL, NAT-TO-INT, EXP, PLUS, NEGATIVEP, MINUS,
LESSP, and NUMBERP, to 18 new formulas:
Case 18.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(EQUAL C 0)
(NOT (LESSP (PLUS X Y 0)
(EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X Y 0) (EXP 2 N))
N)
(IPLUS X
(IPLUS Y
(IPLUS 0 (MINUS (EXP 2 N))))))),
which again simplifies, using linear arithmetic, rewriting with
PLUS-COMMUTATIVITY, REMAINDER-EXIT, TIMES-LESSP, NEGATIVE-GUTS-MINUS,
TIMES-EQUAL-0, and MINUS-EQUAL, and expanding EQUAL, PLUS, EXP, NAT-TO-INT,
DIFFERENCE, NEGATIVE-GUTS, NUMBERP, NEGP, and IPLUS, to the following two
new conjectures:
Case 18.2.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP (PLUS X Y) (EXP 2 (SUB1 N))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (MINUS (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS X Y)))
(IPLUS X
(IPLUS Y
(MINUS (TIMES 2 (EXP 2 (SUB1 N)))))))).
However this again simplifies, using linear arithmetic, rewriting with
TIMES-LESSP, NEGATIVE-GUTS-MINUS, TIMES-EQUAL-0, DIFFERENCE-DIFFERENCE2,
DIFFERENCE-0, DIFFERENCE-DIFFERENCE1, PLUS-COMMUTATIVITY, and DIFFERENCE=0,
and unfolding the functions NEGATIVE-GUTS, EQUAL, NUMBERP, NEGP, and IPLUS,
to:
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP (PLUS X Y) (EXP 2 (SUB1 N))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(LESSP X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 18.1.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP (PLUS X Y) (EXP 2 (SUB1 N))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (MINUS (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS X Y)))
(IPLUS X (IPLUS Y 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 17.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(EQUAL C 0)
(LESSP (PLUS X Y 0) (EXP 2 (SUB1 N))))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X Y 0) (EXP 2 N))
N)
(PLUS X Y 0))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
PLUS-COMMUTATIVITY and REMAINDER-EXIT, and opening up EQUAL, PLUS, EXP, and
NAT-TO-INT, to:
T.
Case 16.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (LESSP (PLUS X Y 1)
(EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X Y 1) (EXP 2 N))
N)
(IPLUS X
(IPLUS Y
(IPLUS 1 (MINUS (EXP 2 N))))))),
which again simplifies, using linear arithmetic, rewriting with PLUS-ADD1,
PLUS-COMMUTATIVITY, PLUS-ADD1-1, SUB1-ADD1, REMAINDER-ADD1, DIFFERENCE-0,
TIMES-EQUAL-0, REMAINDER-EXIT, DIFFERENCE-SUB1, TIMES-LESSP, EXP-OF-2-0,
SUB1-TYPE-RESTRICTION, NEGATIVE-GUTS-MINUS, and MINUS-EQUAL, and opening up
LESSP, TIMES, EXP, EQUAL, MINUS, NAT-TO-INT, IPLUS, NEGP, NUMBERP, and
NEGATIVE-GUTS, to the following four new formulas:
Case 16.4.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))).
But this again simplifies, using linear arithmetic, to:
T.
Case 16.3.
(IMPLIES
(AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (PLUS X Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 16.2.
(IMPLIES
(AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (PLUS X Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (ADD1 (PLUS X Y)) N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, rewriting with
TIMES-EQUAL-0, SUB1-ADD1, DIFFERENCE-0, NEGATIVE-GUTS-MINUS, TIMES-EQUAL-1,
and SUB1-OF-1, and opening up the functions DIFFERENCE, EQUAL, NUMBERP,
EXP, LESSP, NAT-TO-INT, NEGATIVE-GUTS, NEGP, and IPLUS, to the following
three new formulas:
Case 16.2.3.
(IMPLIES
(AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (PLUS X Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0))
(EQUAL
(NAT-TO-INT (ADD1 (PLUS X Y)) N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))).
However this again simplifies, using linear arithmetic, to:
T.
Case 16.2.2.
(IMPLIES
(AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (PLUS X Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0))
(NOT (LESSP Y
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (MINUS (DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(PLUS X Y)))
(IPLUS X 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 16.2.1.
(IMPLIES
(AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (PLUS X Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0))
(LESSP Y
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (MINUS (DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
(PLUS X Y)))
(IPLUS X
(MINUS (DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
Y))))),
which again simplifies, using linear arithmetic, rewriting with the
lemmas TIMES-EQUAL-0, DIFFERENCE-DIFFERENCE2, DIFFERENCE-0,
DIFFERENCE-DIFFERENCE1, PLUS-COMMUTATIVITY, NEGATIVE-GUTS-MINUS, and
DIFFERENCE=0, and opening up the definitions of EQUAL, NUMBERP,
NEGATIVE-GUTS, NEGP, and IPLUS, to:
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (PLUS X Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP Y
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP X
(DIFFERENCE (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))
Y))).
This again simplifies, using linear arithmetic, to:
T.
Case 16.1.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N)))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (ADD1 (PLUS X Y)) N)
(IPLUS X (IPLUS Y 1)))),
which again simplifies, using linear arithmetic, to:
T.
Case 15.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(LESSP (PLUS X Y 1) (EXP 2 (SUB1 N))))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X Y 1) (EXP 2 N))
N)
(PLUS X Y 1))),
which again simplifies, using linear arithmetic, rewriting with PLUS-ADD1,
PLUS-COMMUTATIVITY, PLUS-ADD1-1, SUB1-ADD1, TIMES-EQUAL-0, REMAINDER-EXIT,
and REMAINDER-ADD1, and opening up the functions LESSP, EXP, EQUAL, and
NUMBERP, to the following two new formulas:
Case 15.2.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N))))
(NOT (EQUAL (PLUS X Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (ADD1 (PLUS X Y)) N)
(ADD1 (PLUS X Y)))).
This again simplifies, rewriting with SUB1-ADD1, and opening up LESSP and
NAT-TO-INT, to:
T.
Case 15.1.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (PLUS X Y)
(SUB1 (EXP 2 (SUB1 N))))
(EQUAL (PLUS X Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT 0 N)
(ADD1 (PLUS X Y)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 14.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(EQUAL N 0)
(EQUAL X 0)
(EQUAL Y 0)
(NOT (EQUAL C 0)))
(EQUAL 0 (SUB1 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 13.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (NUMBERP N))
(EQUAL X 0)
(EQUAL Y 0)
(NOT (EQUAL C 0)))
(EQUAL 0 (SUB1 1))),
which again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL C 0)
(NOT (INT-RANGEP (IPLUS X (IPLUS Y 0)) N)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X
(IPLUS Y
(IPLUS 0 (MINUS (EXP 2 N))))))),
which again simplifies, using linear arithmetic, rewriting with
MINUS-NEGATIVE-GUTS, DIFFERENCE-PLUS2, REMAINDER-EXIT,
DIFFERENCE-DIFFERENCE1, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, TIMES-EQUAL-0,
TIMES-LESSP, NEGATIVE-GUTS-MINUS, and MINUS-EQUAL, and unfolding
NEGATIVE-GUTS, DIFFERENCE, LESSP, EQUAL, NEGP, IPLUS, EXP, PLUS, FIX,
NUMBERP, and REMAINDER, to the following six new conjectures:
Case 12.6.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X
(IPLUS Y
(IPLUS 0 (MINUS (EXP 2 N))))))).
But this again simplifies, using linear arithmetic, appealing to the
lemmas NEGATIVE-GUTS-MINUS, DIFFERENCE-PLUS2, REMAINDER-EXIT,
DIFFERENCE-DIFFERENCE2, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
PLUS-COMMUTATIVITY, TIMES-LESSP, TIMES-EQUAL-0, and MINUS-EQUAL, and
opening up the definitions of NEGATIVE-GUTS, NEGP, IPLUS, INT-RANGEP, EXP,
EQUAL, PLUS, FIX, NAT-TO-INT, DIFFERENCE, and NUMBERP, to five new goals:
Case 12.6.5.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X
(IPLUS Y
(IPLUS 0 (MINUS (EXP 2 N))))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (LESSP (NEGATIVE-GUTS Y) X)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X
(IPLUS Y
(IPLUS 0 (MINUS (EXP 2 N))))))).
However this again simplifies, using linear arithmetic, to:
T.
Case 12.6.4.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(EXP 2 (SUB1 N)))))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
(IPLUS X
(IPLUS Y
(MINUS (TIMES 2 (EXP 2 (SUB1 N)))))))),
which again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES
(AND (LESSP (NEGATIVE-GUTS Y) X)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(EXP 2 (SUB1 N)))))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
(IPLUS X
(IPLUS Y
(MINUS (TIMES 2 (EXP 2 (SUB1 N)))))))).
However this again simplifies, using linear arithmetic, to:
T.
Case 12.6.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(EXP 2 (SUB1 N))))
(EQUAL (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(IPLUS X
(IPLUS Y
(MINUS (TIMES 2 (EXP 2 (SUB1 N)))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 12.6.2.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(EQUAL (EXP 2 (SUB1 N)) 0)
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(EXP 2 (SUB1 N)))))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
(IPLUS X (IPLUS Y 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 12.6.1.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(EQUAL (EXP 2 (SUB1 N)) 0)
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(EXP 2 (SUB1 N))))
(EQUAL (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(IPLUS X (IPLUS Y 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 12.5.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
N)
(IPLUS X
(IPLUS Y
(MINUS (TIMES 2 (EXP 2 (SUB1 N)))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 12.4.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X (NEGATIVE-GUTS Y))
N)
(IPLUS X
(IPLUS Y
(MINUS (TIMES 2 (EXP 2 (SUB1 N)))))))),
which again simplifies, applying the lemma DIFFERENCE-LESSP1, and opening
up the definitions of NEGATIVE-GUTS, NEGP, IPLUS, and INT-RANGEP, to:
T.
Case 12.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
N)
(IPLUS X (IPLUS Y 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 12.2.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X
(IPLUS Y
(MINUS (TIMES 2 (EXP 2 (SUB1 N)))))))),
which again simplifies, unfolding the definitions of NEGATIVE-GUTS and
EQUAL, to:
T.
Case 12.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 0)
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X (IPLUS Y 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL C 0)
(INT-RANGEP (IPLUS X (IPLUS Y 0)) N))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X (IPLUS Y 0)))),
which again simplifies, using linear arithmetic, appealing to the lemmas
MINUS-NEGATIVE-GUTS, DIFFERENCE-PLUS2, REMAINDER-EXIT,
DIFFERENCE-DIFFERENCE1, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, TIMES-EQUAL-0,
and PLUS-COMMUTATIVITY, and expanding NEGATIVE-GUTS, DIFFERENCE, LESSP,
EQUAL, NEGP, IPLUS, EXP, PLUS, FIX, NUMBERP, and REMAINDER, to six new
conjectures:
Case 11.6.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X Y) N)
(LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X (IPLUS Y 0)))),
which again simplifies, using linear arithmetic, rewriting with
NEGATIVE-GUTS-MINUS, DIFFERENCE-PLUS2, REMAINDER-EXIT,
DIFFERENCE-DIFFERENCE2, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
PLUS-COMMUTATIVITY, and MINUS-NEGATIVE-GUTS, and opening up the functions
NEGATIVE-GUTS, NEGP, IPLUS, INT-RANGEP, EXP, EQUAL, PLUS, FIX, NAT-TO-INT,
DIFFERENCE, and LESSP, to the following two new formulas:
Case 11.6.2.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X (IPLUS Y 0)))).
This again simplifies, using linear arithmetic, to:
T.
Case 11.6.1.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(EXP 2 (SUB1 N))))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.5.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X Y) N)
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
N)
(DIFFERENCE X (NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.4.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X Y) N)
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
N)
(DIFFERENCE X (NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X Y) N)
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X (NEGATIVE-GUTS Y))
N)
(DIFFERENCE X (NEGATIVE-GUTS Y)))),
which again simplifies, applying DIFFERENCE-LESSP1, and expanding
NEGATIVE-GUTS, NEGP, IPLUS, INT-RANGEP, and NAT-TO-INT, to:
T.
Case 11.2.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 0) N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
X)).
However this again simplifies, expanding the functions NEGATIVE-GUTS and
EQUAL, to:
T.
Case 11.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 0) N)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 0)
(TIMES 2 (EXP 2 (SUB1 N))))
N)
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (INT-RANGEP (IPLUS X (IPLUS Y 1)) N)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 1
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X
(IPLUS Y
(IPLUS 1 (MINUS (EXP 2 N))))))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
DIFFERENCE-0, DIFFERENCE-SUB1, TIMES-EQUAL-0, PLUS-ADD1, PLUS-ADD1-1,
REMAINDER-ADD1, TIMES-LESSP, EXP-OF-2-0, SUB1-TYPE-RESTRICTION,
NEGATIVE-GUTS-MINUS, MINUS-EQUAL, SUB1-ADD1, DIFFERENCE-PLUS2,
REMAINDER-EXIT, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE=0, and
DIFFERENCE-SUB1-SUB1, and opening up the functions NEGATIVE-GUTS, DIFFERENCE,
EQUAL, NUMBERP, SUB1, LESSP, NEGP, IPLUS, EXP, FIX, and REMAINDER, to 14 new
conjectures:
Case 10.14.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (REMAINDER (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, expanding the definitions of NEGATIVE-GUTS and
EQUAL, to:
T.
Case 10.13.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (REMAINDER (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL
(NAT-TO-INT (ADD1 (REMAINDER (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N)))))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, expanding the definitions of NEGATIVE-GUTS and
EQUAL, to:
T.
Case 10.12.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (ADD1 (PLUS X 0)) N)
(IPLUS X (IPLUS Y 1)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.11.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 1
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X
(IPLUS Y
(IPLUS 1 (MINUS (EXP 2 N))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.10.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 10.9.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.8.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.7.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.6.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (NEGATIVE-GUTS Y) 1)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N)) 1))
(NOT (EQUAL C 0))
(NOT (LESSP 1 1))
(NOT (EQUAL 1 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP X (SUB1 1)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 1)
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
1))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
1)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X (SUB1 1)) N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))).
However this again simplifies, rewriting with LESSP-OF-1 and
PLUS-COMMUTATIVITY, and expanding the definitions of NEGATIVE-GUTS, EQUAL,
LESSP, PLUS, NEGP, IPLUS, and INT-RANGEP, to:
T.
Case 10.5.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(IPLUS X (IPLUS Y 1)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 10.4.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
NEGATIVE-GUTS-MINUS, SUB1-OF-1, MINUS-EQUAL, DIFFERENCE-PLUS2,
REMAINDER-EXIT, DIFFERENCE-LESSP1, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE=0, DIFFERENCE-SUB1-SUB1,
TIMES-EQUAL-0, TIMES-EQUAL-1, DIFFERENCE-0, PLUS-EQUAL-0, TIMES-PLUS-LESSP,
PLUS-ADD1, ADD1-SUB1, and TIMES-LESSP, and opening up the functions
NEGATIVE-GUTS, NUMBERP, NEGP, IPLUS, FIX, LESSP, EQUAL, REMAINDER, SUB1,
DIFFERENCE, and NAT-TO-INT, to 21 new formulas:
Case 10.4.21.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.20.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.19.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.18.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.17.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)).
But this again simplifies, using linear arithmetic, to:
T.
Case 10.4.16.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.15.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.14.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.13.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.12.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, appealing to the lemmas
NEGATIVE-GUTS-MINUS, DIFFERENCE-DIFFERENCE2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, PLUS-COMMUTATIVITY, DIFFERENCE=0,
and DIFFERENCE-SUB1-SUB1, and unfolding the definitions of INT-RANGEP,
FIX, EXP, LESSP, and NAT-TO-INT, to three new formulas:
Case 10.4.12.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.12.2.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.12.1.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (LESSP (SUB1 (NEGATIVE-GUTS Y)) X)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))).
But this again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(LESSP (SUB1 (NEGATIVE-GUTS Y)) X)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X))
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))).
However this finally simplifies, using linear arithmetic, to:
T.
Case 10.4.11.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.10.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.9.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.8.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.7.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
0)).
But this again simplifies, using linear arithmetic, to:
T.
Case 10.4.6.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, applying the lemma DIFFERENCE-LESSP1, and
opening up the function INT-RANGEP, to:
T.
Case 10.4.5.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.4.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.4.2.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (INT-RANGEP (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
X)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 10.4.1.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS Y) 1)
(NOT (INT-RANGEP (PLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N)))
(EQUAL (EXP 2 (SUB1 N)) 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X
(ADD1 (TIMES 2 (EXP 2 (SUB1 N)))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X
(IPLUS Y
(MINUS (SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.2.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N))
(EQUAL (EXP 2 (SUB1 N)) 0)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X (IPLUS Y 1)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.1.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N))
(EQUAL (EXP 2 (SUB1 N)) 0)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X
(ADD1 (TIMES 2 (EXP 2 (SUB1 N)))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X (IPLUS Y 1)))),
which again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(INT-RANGEP (IPLUS X (IPLUS Y 1)) N))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 1
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X (IPLUS Y 1)))),
which again simplifies, using linear arithmetic, applying DIFFERENCE-0,
DIFFERENCE-SUB1, TIMES-EQUAL-0, PLUS-ADD1, PLUS-ADD1-1, REMAINDER-ADD1,
PLUS-COMMUTATIVITY, SUB1-TYPE-RESTRICTION, SUB1-ADD1, DIFFERENCE-PLUS2,
REMAINDER-EXIT, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE=0, DIFFERENCE-SUB1-SUB1,
LESSP-OF-1, NEGATIVE-GUTS-MINUS, SUB1-OF-1, and MINUS-EQUAL, and unfolding
NEGATIVE-GUTS, DIFFERENCE, EQUAL, NUMBERP, SUB1, LESSP, NEGP, IPLUS, EXP,
FIX, REMAINDER, and PLUS, to the following 14 new goals:
Case 9.14.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 1) N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (REMAINDER (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT 0 N) (ADD1 X))).
But this again simplifies, unfolding the functions NEGATIVE-GUTS and EQUAL,
to:
T.
Case 9.13.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 1) N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (REMAINDER (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL
(NAT-TO-INT (ADD1 (REMAINDER (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N)))))
N)
(ADD1 X))),
which again simplifies, opening up the definitions of NEGATIVE-GUTS and
EQUAL, to:
T.
Case 9.12.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 1) N)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (ADD1 (PLUS X 0)) N)
(ADD1 X))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.11.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X 0) N)
(LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS X 1
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X (IPLUS Y 1)))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.10.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X 0) N)
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 9.9.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X 0) N)
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 9.8.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X 0) N)
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
X)),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X 0) N)
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
X)).
But this again simplifies, using linear arithmetic, to:
T.
Case 9.7.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X 0) N)
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 9.6.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X 0) N)
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 9.5.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X 0) N)
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
X)),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (NEGATIVE-GUTS Y) 1)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N)) 1))
(NOT (EQUAL C 0))
(NOT (LESSP 1 1))
(NOT (EQUAL 1 0))
(INT-RANGEP (IPLUS X 0) N)
(NOT (LESSP X (SUB1 1)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 1)
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
1))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
1)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X (SUB1 1)) N)
X)).
However this again simplifies, applying the lemmas LESSP-OF-1,
PLUS-COMMUTATIVITY, PLUS-EQUAL-0, TIMES-EQUAL-0, and DIFFERENCE-SUB1, and
expanding the definitions of NEGATIVE-GUTS, EQUAL, LESSP, PLUS, NEGP,
IPLUS, INT-RANGEP, SUB1, NUMBERP, and DIFFERENCE, to two new formulas:
Case 9.5.2.
(IMPLIES
(AND (EQUAL (NEGATIVE-GUTS Y) 1)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (SUB1 (PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL X 0)))
(EQUAL (NAT-TO-INT X N) X)),
which again simplifies, opening up the function NAT-TO-INT, to:
T.
Case 9.5.1.
(IMPLIES
(AND (EQUAL (NEGATIVE-GUTS Y) 1)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (SUB1 (PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL X 0))
(EQUAL (NAT-TO-INT 0 N) X)),
which again simplifies, expanding NUMBERP, EQUAL, LESSP, PLUS, and
NAT-TO-INT, to:
T.
Case 9.4.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X
(ADD1 (TIMES 2 (EXP 2 (SUB1 N)))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(PLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X)))),
which again simplifies, using linear arithmetic, rewriting with
NEGATIVE-GUTS-MINUS, SUB1-OF-1, DIFFERENCE-PLUS2, REMAINDER-EXIT,
DIFFERENCE-DIFFERENCE2, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
PLUS-COMMUTATIVITY, DIFFERENCE=0, and DIFFERENCE-SUB1-SUB1, and unfolding
NEGATIVE-GUTS, NEGP, IPLUS, INT-RANGEP, FIX, EXP, LESSP, and NAT-TO-INT,
to the following four new formulas:
Case 9.3.4.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y))))
(EQUAL
(NAT-TO-INT
(REMAINDER (PLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 9.3.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.3.2.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (LESSP 0 (SUB1 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.3.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS Y))
X)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(LESSP X (SUB1 (NEGATIVE-GUTS Y)))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.2.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y)))))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, applying
NEGATIVE-GUTS-MINUS, SUB1-OF-1, DIFFERENCE-LESSP1, DIFFERENCE-PLUS2,
REMAINDER-EXIT, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE=0, DIFFERENCE-SUB1-SUB1,
and TIMES-EQUAL-0, and expanding NEGATIVE-GUTS, NEGP, IPLUS, INT-RANGEP,
FIX, LESSP, NUMBERP, EQUAL, and REMAINDER, to the following six new
formulas:
Case 9.2.6.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y))))).
This again simplifies, using linear arithmetic, to:
T.
Case 9.2.5.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.2.4.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y))))).
This again simplifies, using linear arithmetic, to:
T.
Case 9.2.3.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS Y)))
N)
(DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.2.2.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
(DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.2.1.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (LESSP X (SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS Y))
(PLUS X (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (PLUS X (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS Y))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y)))
N)
(DIFFERENCE X
(SUB1 (NEGATIVE-GUTS Y))))),
which again simplifies, rewriting with DIFFERENCE-LESSP1, and unfolding
the function NAT-TO-INT, to:
T.
Case 9.1.
(IMPLIES
(AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X (EXP 2 (SUB1 N)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (NEGATIVE-GUTS Y) 1))
(EQUAL
(NAT-TO-INT (REMAINDER (PLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(PLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y)))))).
This again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(EQUAL C 0)
(NOT (INT-RANGEP (IPLUS X (PLUS Y 0)) N)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS Y 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS X)))
(EXP 2 N))
N)
(IPLUS X (PLUS Y (EXP 2 N) 0)))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
PLUS-COMMUTATIVITY, DIFFERENCE-PLUS2, REMAINDER-EXIT, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, TIMES-EQUAL-0, PLUS-EQUAL-0,
DIFFERENCE-0, and DIFFERENCE-LESSP1, and opening up the definitions of
NEGATIVE-GUTS, EQUAL, PLUS, NEGP, IPLUS, EXP, FIX, NUMBERP, REMAINDER, and
DIFFERENCE, to 18 new goals:
Case 8.18.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.17.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.16.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))),
which again simplifies, rewriting with the lemma DIFFERENCE-LESSP1, and
unfolding the functions NEGATIVE-GUTS and INT-RANGEP, to:
T.
Case 8.15.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(EQUAL (NEGATIVE-GUTS X) 0)
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.14.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, trivially, to:
T.
Case 8.13.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))).
However this again simplifies, using linear arithmetic, to:
T.
Case 8.12.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (EQUAL Y 0))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.11.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.10.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL Y 0)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS (NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.9.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.8.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS,
DIFFERENCE-DIFFERENCE2, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and
PLUS-COMMUTATIVITY, and unfolding the functions NEGATIVE-GUTS, INT-RANGEP,
FIX, EXP, and NAT-TO-INT, to:
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS X) Y))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(EXP 2 (SUB1 N)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Y)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS X) Y))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(EXP 2 (SUB1 N)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 8.7.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.6.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(EQUAL (NEGATIVE-GUTS X) 0)
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.5.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.4.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.3.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (EQUAL Y 0))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.2.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.1.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL Y 0)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS (NEGATIVE-GUTS X)))),
which again simplifies, trivially, to:
T.
Case 7. (IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(EQUAL C 0)
(INT-RANGEP (IPLUS X (PLUS Y 0)) N))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS Y 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS X)))
(EXP 2 N))
N)
(IPLUS X (PLUS Y 0)))).
But this again simplifies, using linear arithmetic, applying
PLUS-COMMUTATIVITY, DIFFERENCE-PLUS2, REMAINDER-EXIT, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, TIMES-EQUAL-0, and DIFFERENCE-LESSP1,
and opening up the functions NEGATIVE-GUTS, EQUAL, PLUS, NEGP, IPLUS, EXP,
FIX, NUMBERP, and REMAINDER, to the following six new formulas:
Case 7.6.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(DIFFERENCE Y (NEGATIVE-GUTS X)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 7.5.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(DIFFERENCE Y (NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 7.4.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(INT-RANGEP (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(DIFFERENCE Y (NEGATIVE-GUTS X)))),
which again simplifies, applying DIFFERENCE-LESSP1, and opening up
NEGATIVE-GUTS, INT-RANGEP, and NAT-TO-INT, to:
T.
Case 7.3.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 7.2.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N)
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y)))),
which again simplifies, using linear arithmetic, appealing to the lemmas
NEGATIVE-GUTS-MINUS, DIFFERENCE-DIFFERENCE2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and PLUS-COMMUTATIVITY, and opening
up the functions NEGATIVE-GUTS, INT-RANGEP, FIX, EXP, and NAT-TO-INT, to:
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (NEGATIVE-GUTS X) Y)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(EXP 2 (SUB1 N))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 7.1.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y)))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES
(AND (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(LESSP Y (NEGATIVE-GUTS X))
(INT-RANGEP (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y (NEGATIVE-GUTS X))
N)
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (INT-RANGEP (IPLUS X (PLUS Y 1)) N)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS Y 1
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS X)))
(EXP 2 N))
N)
(IPLUS X (PLUS Y (EXP 2 N) 1)))),
which again simplifies, using linear arithmetic, applying PLUS-ADD1,
PLUS-COMMUTATIVITY, SUB1-ADD1, TIMES-EQUAL-0, PLUS-ADD1-1, REMAINDER-ADD1,
DIFFERENCE-PLUS2, REMAINDER-EXIT, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE=0, DIFFERENCE-SUB1-SUB1,
DIFFERENCE-0, and DIFFERENCE-LESSP1, and unfolding the definitions of
NEGATIVE-GUTS, DIFFERENCE, LESSP, NEGP, IPLUS, EXP, NUMBERP, EQUAL, FIX,
REMAINDER, and MINUS, to the following 27 new conjectures:
Case 6.27.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (INT-RANGEP (ADD1 Y) N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (REMAINDER (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT 0 N)
(ADD1 (PLUS X Y
(TIMES 2 (EXP 2 (SUB1 N))))))).
This again simplifies, opening up the functions NEGATIVE-GUTS and EQUAL,
to:
T.
Case 6.26.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (INT-RANGEP (ADD1 Y) N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (REMAINDER (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL
(NAT-TO-INT (ADD1 (REMAINDER (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N)))))
N)
(ADD1 (PLUS X Y
(TIMES 2 (EXP 2 (SUB1 N))))))),
which again simplifies, expanding the definitions of NEGATIVE-GUTS and
EQUAL, to:
T.
Case 6.25.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (INT-RANGEP (ADD1 Y) N))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (ADD1 (PLUS Y 0)) N)
(ADD1 (PLUS X Y
(TIMES 2 (EXP 2 (SUB1 N))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.24.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.23.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.22.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to the formula:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))).
However this again simplifies, using linear arithmetic, to:
T.
Case 6.21.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.20.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.19.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, applying DIFFERENCE-LESSP1, and unfolding the
definitions of NEGATIVE-GUTS and INT-RANGEP, to:
T.
Case 6.18.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))).
This again simplifies, using linear arithmetic, to:
T.
Case 6.17.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.16.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.15.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.14.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.13.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(NOT (INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.12.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.11.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.10.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS,
DIFFERENCE-DIFFERENCE2, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
PLUS-COMMUTATIVITY, DIFFERENCE=0, and DIFFERENCE-SUB1-SUB1, and unfolding
the definitions of NEGATIVE-GUTS, INT-RANGEP, FIX, EXP, LESSP, and
NAT-TO-INT, to the following two new formulas:
Case 6.10.2.
(IMPLIES
(AND (NEGATIVEP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (EXP 2 (SUB1 N))))).
But this again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (LESSP (SUB1 (NEGATIVE-GUTS X)) Y)
(NEGATIVEP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (EXP 2 (SUB1 N))))).
This again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(LESSP (SUB1 (NEGATIVE-GUTS X)) Y)
(NEGATIVEP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (EXP 2 (SUB1 N))))).
This again simplifies, using linear arithmetic, to:
T.
Case 6.10.1.
(IMPLIES
(AND (NEGATIVEP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.9.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.8.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.7.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.6.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.5.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.4.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.3.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.2.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6.1.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 5. (IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(INT-RANGEP (IPLUS X (PLUS Y 1)) N))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS Y 1
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS X)))
(EXP 2 N))
N)
(IPLUS X (PLUS Y 1)))),
which again simplifies, using linear arithmetic, rewriting with PLUS-ADD1,
PLUS-COMMUTATIVITY, SUB1-ADD1, TIMES-EQUAL-0, PLUS-ADD1-1, REMAINDER-ADD1,
DIFFERENCE-PLUS2, REMAINDER-EXIT, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE=0, DIFFERENCE-SUB1-SUB1,
and DIFFERENCE-LESSP1, and expanding NEGATIVE-GUTS, DIFFERENCE, LESSP, NEGP,
IPLUS, EXP, NUMBERP, EQUAL, PLUS, FIX, and REMAINDER, to the following 15
new goals:
Case 5.15.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(EQUAL (NEGATIVE-GUTS X) 0)
(INT-RANGEP (ADD1 Y) N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (REMAINDER (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT 0 N) (ADD1 Y))).
But this again simplifies, expanding NEGATIVE-GUTS and EQUAL, to:
T.
Case 5.14.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(EQUAL (NEGATIVE-GUTS X) 0)
(INT-RANGEP (ADD1 Y) N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL (REMAINDER (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL
(NAT-TO-INT (ADD1 (REMAINDER (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(TIMES 2 (EXP 2 (SUB1 N)))))
N)
(ADD1 Y))),
which again simplifies, unfolding the functions NEGATIVE-GUTS and EQUAL,
to:
T.
Case 5.13.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(EQUAL (NEGATIVE-GUTS X) 0)
(INT-RANGEP (ADD1 Y) N)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (ADD1 (PLUS Y 0)) N)
(ADD1 Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.12.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(NOT (LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.11.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.10.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to the formula:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X))))).
This again simplifies, using linear arithmetic, to:
T.
Case 5.9.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.8.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.7.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (SUB1 (NEGATIVE-GUTS X))))
(INT-RANGEP (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, rewriting with DIFFERENCE-LESSP1, and expanding
the functions NEGATIVE-GUTS, INT-RANGEP, and NAT-TO-INT, to:
T.
Case 5.6.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N)
(NOT (LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 5.5.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N)
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.4.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N)
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y)))),
which again simplifies, using linear arithmetic, rewriting with
NEGATIVE-GUTS-MINUS, DIFFERENCE-DIFFERENCE2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, PLUS-COMMUTATIVITY, DIFFERENCE=0,
and DIFFERENCE-SUB1-SUB1, and opening up the functions NEGATIVE-GUTS,
INT-RANGEP, FIX, EXP, LESSP, and NAT-TO-INT, to the following two new
conjectures:
Case 5.4.2.
(IMPLIES
(AND (NEGATIVEP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y)))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (EXP 2 (SUB1 N)))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 5.4.1.
(IMPLIES
(AND (NEGATIVEP X)
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y)))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.3.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.2.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.1.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(LESSP Y (EXP 2 (SUB1 N)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (SUB1 (NEGATIVE-GUTS X)))
(INT-RANGEP (MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y))
N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (NEGATIVE-GUTS X))
(PLUS Y (TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (PLUS Y (TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE Y
(SUB1 (NEGATIVE-GUTS X)))
N)
(MINUS (DIFFERENCE (SUB1 (NEGATIVE-GUTS X))
Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL C 0)
(NOT (INT-RANGEP (IPLUS X (IPLUS Y 0)) N)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS X))
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X
(IPLUS Y (PLUS (EXP 2 N) 0))))),
which again simplifies, using linear arithmetic, rewriting with
MINUS-NEGATIVE-GUTS, DIFFERENCE-PLUS1, DIFFERENCE-DIFFERENCE1,
DIFFERENCE-PLUS2, REMAINDER-0, REMAINDER-EXIT, PLUS-EQUAL-0,
DIFFERENCE-LESSP, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, PLUS-ASSOCIATIVITY,
TIMES-EQUAL-0, REMAINDER-PLUS-DIFFERENCE2, PLUS-COMMUTATIVITY, DIFFERENCE-0,
TIMES-DISTRIBUTES-DIFFERENCE1, TIMES-COMMUTATIVITY, and TIMES-ZERO, and
opening up the definitions of NEGATIVE-GUTS, DIFFERENCE, LESSP, EQUAL, NEGP,
IPLUS, EXP, FIX, NUMBERP, REMAINDER, PLUS, TIMES, ZEROP, and OR, to the
following 15 new formulas:
Case 4.15.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 4.14.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.13.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, applying the lemmas
NEGATIVE-GUTS-MINUS, DIFFERENCE-DIFFERENCE2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, PLUS-COMMUTATIVITY1,
PLUS-COMMUTATIVITY, DIFFERENCE-DIFFERENCE1, and DIFFERENCE-0, and opening
up the functions NEGATIVE-GUTS, NEGP, IPLUS, INT-RANGEP, EXP, NAT-TO-INT,
and MINUS, to four new formulas:
Case 4.13.4.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.13.3.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.13.2.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))))
(LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(EXP 2 (SUB1 N)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))))
(LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(EXP 2 (SUB1 N)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 4.13.1.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (EXP 2 (SUB1 N))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(EXP 2 (SUB1 N))))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.12.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(IPLUS X (MINUS (NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.11.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.10.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X Y) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(IPLUS X (MINUS 0)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 4.9.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.8.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))),
which again simplifies, expanding NEGATIVE-GUTS and EQUAL, to:
T.
Case 4.7.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT 0 N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, appealing to the lemma
EXP-OF-2-0, and opening up EQUAL, to:
T.
Case 4.6.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (NAT-TO-INT 0 N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))),
which again simplifies, expanding NEGATIVE-GUTS and EQUAL, to:
T.
Case 4.5.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.4.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT 0 N) (MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.3.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT 0 N) (MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.2.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N)) 0))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
N)
(MINUS 0))).
But this again simplifies, using linear arithmetic, to:
T.
Case 4.1.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT 0 N)
(MINUS (NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL C 0)
(INT-RANGEP (IPLUS X (IPLUS Y 0)) N))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS 0
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS X))
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X (IPLUS Y 0)))),
which again simplifies, using linear arithmetic, rewriting with
MINUS-NEGATIVE-GUTS, DIFFERENCE-PLUS1, DIFFERENCE-DIFFERENCE1,
DIFFERENCE-PLUS2, REMAINDER-0, REMAINDER-EXIT, PLUS-EQUAL-0,
DIFFERENCE-LESSP, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, PLUS-ASSOCIATIVITY,
TIMES-EQUAL-0, REMAINDER-PLUS-DIFFERENCE2, DIFFERENCE-0,
TIMES-DISTRIBUTES-DIFFERENCE1, TIMES-COMMUTATIVITY, TIMES-ZERO, and
PLUS-COMMUTATIVITY, and opening up the definitions of NEGATIVE-GUTS,
DIFFERENCE, LESSP, EQUAL, NEGP, IPLUS, EXP, FIX, NUMBERP, REMAINDER, TIMES,
PLUS, ZEROP, and OR, to the following nine new formulas:
Case 3.9.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X Y) N)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))).
This again simplifies, using linear arithmetic, to:
T.
Case 3.8.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X Y) N)
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.7.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(INT-RANGEP (IPLUS X Y) N)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
NEGATIVE-GUTS-MINUS, DIFFERENCE-DIFFERENCE2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, PLUS-COMMUTATIVITY1, and
PLUS-COMMUTATIVITY, and unfolding the functions NEGATIVE-GUTS, NEGP, IPLUS,
INT-RANGEP, EXP, and NAT-TO-INT, to two new conjectures:
Case 3.7.2.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (EXP 2 (SUB1 N))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
N)
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.7.1.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (EXP 2 (SUB1 N))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(EXP 2 (SUB1 N))))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.6.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 0) N)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 3.5.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 0) N)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
N)
X)),
which again simplifies, unfolding the functions NEGATIVE-GUTS and EQUAL,
to:
T.
Case 3.4.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 0) N)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT 0 N) X)),
which again simplifies, using linear arithmetic, to:
T.
Case 3.3.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 0) N)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N)))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
N)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 3.2.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 0) N)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT 0 N) 0)),
which again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and expanding the function EQUAL, to:
T.
Case 3.1.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(INT-RANGEP (IPLUS X 0) N)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(NEGATIVE-GUTS X))
(TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT 0 N) 0)).
This again simplifies, opening up the functions NEGATIVE-GUTS and EQUAL,
to:
T.
Case 2. (IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (INT-RANGEP (IPLUS X (IPLUS Y 1)) N)))
(EQUAL (NAT-TO-INT (REMAINDER (PLUS 1
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS X))
(DIFFERENCE (EXP 2 N)
(NEGATIVE-GUTS Y)))
(EXP 2 N))
N)
(IPLUS X
(IPLUS Y (PLUS (EXP 2 N) 1))))),
which again simplifies, using linear arithmetic, applying DIFFERENCE-0,
DIFFERENCE-SUB1, TIMES-EQUAL-0, DIFFERENCE-PLUS1, PLUS-ADD1, SUB1-ADD1,
DIFFERENCE-PLUS2, PLUS-COMMUTATIVITY, PLUS-ADD1-1, DIFFERENCE-DIFFERENCE1,
PLUS-EQUAL-0, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE=0,
DIFFERENCE-SUB1-SUB1, REMAINDER-0, DIFFERENCE-LESSP, and SUB1-OF-1, and
expanding the functions NEGATIVE-GUTS, DIFFERENCE, EQUAL, NUMBERP, SUB1,
LESSP, NEGP, IPLUS, EXP, PLUS, MINUS, FIX, REMAINDER, and TIMES, to the
following 26 new formulas:
Case 2.26.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL
(NAT-TO-INT (REMAINDER (ADD1 (PLUS (TIMES 2 (EXP 2 (SUB1 N))) 0))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(ADD1 (TIMES 2 (EXP 2 (SUB1 N)))))).
This again simplifies, using linear arithmetic, rewriting with EXP-OF-2-0,
and expanding EQUAL, to:
T.
Case 2.25.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL
(NAT-TO-INT (REMAINDER (ADD1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(ADD1 (TIMES 2 (EXP 2 (SUB1 N)))))).
However this again simplifies, expanding the functions NEGATIVE-GUTS and
EQUAL, to:
T.
Case 2.24.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS X))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL
(NAT-TO-INT
(REMAINDER (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N))) 0)
(SUB1 (NEGATIVE-GUTS X)))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.23.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL
(NAT-TO-INT
(REMAINDER (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS X))))),
which again simplifies, expanding NEGATIVE-GUTS and EQUAL, to:
T.
Case 2.22.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS X)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL
(NAT-TO-INT
(REMAINDER (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N))) 0)
(SUB1 (NEGATIVE-GUTS X)))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.21.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (INT-RANGEP (IPLUS X 1) N))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0)))
(EQUAL
(NAT-TO-INT
(REMAINDER (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (NEGATIVE-GUTS X)))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(MINUS 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.20.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))).
However this again simplifies, using linear arithmetic, to:
T.
Case 2.19.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.18.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 2.17.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
1)))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.16.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
1)))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (NEGATIVE-GUTS Y) 1)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N)) 1))
(NOT (EQUAL C 0))
(NOT (LESSP 1 1))
(NOT (EQUAL 1 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 1)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X) 1))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X) 1)))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X) 1))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X) 1) 1)))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X) 1)))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 1))))).
This again simplifies, using linear arithmetic, applying LESSP-OF-1,
MINUS-NEGATIVE-GUTS, PLUS-ADD1, PLUS-COMMUTATIVITY, SUB1-ADD1,
PLUS-EQUAL-0, TIMES-EQUAL-0, ADD1-EQUAL, DIFFERENCE-DIFFERENCE2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-0, and DIFFERENCE-SUB1,
and unfolding NEGATIVE-GUTS, EQUAL, LESSP, DIFFERENCE, NEGP, IPLUS, SUB1,
NUMBERP, FIX, EXP, NAT-TO-INT, MINUS, and PLUS, to the following two new
formulas:
Case 2.16.2.
(IMPLIES
(AND
(EQUAL (NEGATIVE-GUTS Y) 1)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (INT-RANGEP X N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (NEGATIVE-GUTS X)
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (SUB1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (SUB1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))).
However this again simplifies, using linear arithmetic, to:
(IMPLIES
(AND
(EQUAL (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
0)
(EQUAL (NEGATIVE-GUTS Y) 1)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (INT-RANGEP X N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (NEGATIVE-GUTS X)
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (SUB1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (SUB1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 2.16.1.
(IMPLIES
(AND
(EQUAL (NEGATIVE-GUTS Y) 1)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (INT-RANGEP X N))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (NEGATIVE-GUTS X)
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (SUB1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE (SUB1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NEGATIVE-GUTS X))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))))
(LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS X))
(EXP 2 (SUB1 N)))),
which again simplifies, opening up the functions NEGATIVE-GUTS and
INT-RANGEP, to:
T.
Case 2.15.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.14.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
1))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to the formula:
(IMPLIES
(AND (EQUAL (NEGATIVE-GUTS Y) 1)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N)) 1))
(NOT (EQUAL C 0))
(NOT (LESSP 1 1))
(NOT (EQUAL 1 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 1)))
(LESSP (SUB1 1)
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
1))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
1)
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (NEGATIVE-GUTS X) 1) 1))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 1))))).
This again simplifies, using linear arithmetic, appealing to the lemmas
LESSP-OF-1, DIFFERENCE-0, PLUS-EQUAL-0, TIMES-EQUAL-0, DIFFERENCE-SUB1,
PLUS-ADD1, PLUS-COMMUTATIVITY, and ADD1-EQUAL, and unfolding NEGATIVE-GUTS,
EQUAL, LESSP, MINUS, DIFFERENCE, NEGP, IPLUS, SUB1, NUMBERP, PLUS, and
NAT-TO-INT, to the conjecture:
(IMPLIES (AND (EQUAL (NEGATIVE-GUTS Y) 1)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (EQUAL C 0))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (INT-RANGEP 0 N)))
(LESSP (SUB1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N)))))).
This again simplifies, unfolding the definitions of NEGATIVE-GUTS and
EQUAL, to:
T.
Case 2.13.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
1))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.12.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.11.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.10.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.9.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
1)))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.8.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
1)))
(EQUAL (NAT-TO-INT (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.7.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))
(EQUAL (EXP 2 (SUB1 N)) 0))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.6.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
1))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.5.
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(NOT (LESSP 1 (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (INT-RANGEP (IPLUS X 0) N))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))
(LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(NOT (LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
1))
(EQUAL (NAT-TO-INT 0 N)
(IPLUS X (MINUS 0)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.4.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N))
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL
(NAT-TO-INT (REMAINDER (ADD1 (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X
(ADD1 (TIMES 2 (EXP 2 (SUB1 N))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.3.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL
(NAT-TO-INT
(REMAINDER (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X
(ADD1 (TIMES 2 (EXP 2 (SUB1 N))))))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.2.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL Y (MINUS 0)))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (INT-RANGEP (IPLUS X
(MINUS (SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))
(EQUAL
(NAT-TO-INT
(REMAINDER (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, applying the lemmas
MINUS-NEGATIVE-GUTS, DIFFERENCE-0, NEGATIVE-GUTS-MINUS, SUB1-OF-1,
MINUS-EQUAL, REMAINDER-EXIT, DIFFERENCE-DIFFERENCE1,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, PLUS-COMMUTATIVITY, DIFFERENCE=0,
PLUS-EQUAL-0, DIFFERENCE-SUB1-SUB1, TIMES-EQUAL-0, DIFFERENCE-DIFFERENCE2,
TIMES-LESSP, PLUS-ADD1, SUB1-ADD1, and DIFFERENCE-LESSP, and expanding the
functions NEGATIVE-GUTS, DIFFERENCE, LESSP, NUMBERP, NEGP, IPLUS, FIX,
EQUAL, REMAINDER, MINUS, SUB1, and PLUS, to 33 new goals:
Case 2.2.33.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(EQUAL
(NAT-TO-INT
(REMAINDER (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(EQUAL
(NAT-TO-INT
(REMAINDER (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(TIMES 2 (EXP 2 (SUB1 N))))
N)
(IPLUS X
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y)))))).
This again simplifies, using linear arithmetic, to:
T.
Case 2.2.32.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to the formula:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y)))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 2.2.31.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(SUB1 (NEGATIVE-GUTS X))))
(LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(LESSP 0
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.2.30.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N)))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y)))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 2.2.29.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0 (SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
N)
(DIFFERENCE (TIMES 2 (EXP 2 (SUB1 N)))
(PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y)))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES
(AND (EQUAL (TIMES 2 (EXP 2 (SUB1 N))) 0)
(NEGATIVEP X)
(NOT (EQUAL X (MINUS 0)))
(NEGATIVEP Y)
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS X)))
(NOT (LESSP (EXP 2 (SUB1 N))
(NEGATIVE-GUTS Y)))
(NOT (EQUAL C 0))
(LESSP 1 (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 1))
(NOT (INT-RANGEP (MINUS (PLUS (NEGATIVE-GUTS X)
(SUB1 (NEGATIVE-GUTS Y))))
N))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (NEGATIVE-GUTS Y))))
(NOT (LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(SUB1 (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))))
(NOT (EQUAL (EXP 2 (SUB1 N)) 0))
(LESSP (TIMES 2 (EXP 2 (SUB1 N)))
(NEGATIVE-GUTS Y))
(NOT (LESSP 0 (SUB1 (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(LESSP (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(SUB1 (TIMES 2 (EXP 2 (SUB1 N))))))
(EQUAL (NAT-TO-INT (DIFFERENCE (PLUS (TIMES 2 (EXP 2 (SUB1 N)))
(TIMES 2 (EXP 2 (SUB1 N))))