(NOTE-LIB "naturals" T)
Loading ./numbers/naturals.lib
Finished loading ./numbers/naturals.lib
Loading ./numbers/naturals.o
Finished loading ./numbers/naturals.o
(#./numbers/naturals.lib #./numbers/naturals)
(DEFN INTEGERP
(X)
(COND ((NUMBERP X) T)
((NEGATIVEP X)
(NOT (ZEROP (NEGATIVE-GUTS X))))
(T F)))
Note that (OR (FALSEP (INTEGERP X)) (TRUEP (INTEGERP X))) is a theorem.
[ 0.0 0.0 0.0 ]
INTEGERP
(DEFN FIX-INT
(X)
(IF (INTEGERP X) X 0))
Note that (OR (NUMBERP (FIX-INT X)) (EQUAL (FIX-INT X) X)) is a theorem.
[ 0.0 0.0 0.0 ]
FIX-INT
(DEFN IZEROP
(I)
(EQUAL (FIX-INT I) 0))
Observe that (OR (FALSEP (IZEROP I)) (TRUEP (IZEROP I))) is a theorem.
[ 0.0 0.0 0.0 ]
IZEROP
(DEFN ILESSP
(I J)
(IF (NEGATIVEP I)
(IF (NEGATIVEP J)
(LESSP (NEGATIVE-GUTS J)
(NEGATIVE-GUTS I))
(IF (EQUAL I (MINUS 0))
(LESSP 0 J)
T))
(IF (NEGATIVEP J) F (LESSP I J))))
Note that (OR (FALSEP (ILESSP I J)) (TRUEP (ILESSP I J))) is a theorem.
[ 0.0 0.0 0.0 ]
ILESSP
(DEFN ILEQ (I J) (NOT (ILESSP J I)))
Note that (OR (FALSEP (ILEQ I J)) (TRUEP (ILEQ I J))) is a theorem.
[ 0.0 0.0 0.0 ]
ILEQ
(DEFN IPLUS
(X Y)
(IF (NEGATIVEP X)
(IF (NEGATIVEP Y)
(IF (AND (ZEROP (NEGATIVE-GUTS X))
(ZEROP (NEGATIVE-GUTS Y)))
0
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
(IF (LESSP Y (NEGATIVE-GUTS X))
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
(DIFFERENCE Y (NEGATIVE-GUTS X))))
(IF (NEGATIVEP Y)
(IF (LESSP X (NEGATIVE-GUTS Y))
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
(DIFFERENCE X (NEGATIVE-GUTS Y)))
(PLUS X Y))))
From the definition we can conclude that:
(OR (NUMBERP (IPLUS X Y))
(NEGATIVEP (IPLUS X Y)))
is a theorem.
[ 0.0 0.0 0.0 ]
IPLUS
(DEFN INEG
(X)
(IF (NEGATIVEP X)
(NEGATIVE-GUTS X)
(IF (ZEROP X) 0 (MINUS X))))
From the definition we can conclude that:
(OR (NUMBERP (INEG X))
(NEGATIVEP (INEG X)))
is a theorem.
[ 0.0 0.0 0.0 ]
INEG
(DEFN IDIFFERENCE
(X Y)
(IPLUS X (INEG Y)))
Note that (OR (NUMBERP (IDIFFERENCE X Y)) (NEGATIVEP (IDIFFERENCE X Y)))
is a theorem.
[ 0.0 0.0 0.0 ]
IDIFFERENCE
(DEFN IABS
(I)
(IF (NEGATIVEP I)
(NEGATIVE-GUTS I)
(FIX I)))
Observe that (NUMBERP (IABS I)) is a theorem.
[ 0.0 0.0 0.0 ]
IABS
(DEFN ITIMES
(I J)
(IF (NEGATIVEP I)
(IF (NEGATIVEP J)
(TIMES (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
(FIX-INT (MINUS (TIMES (NEGATIVE-GUTS I) J))))
(IF (NEGATIVEP J)
(FIX-INT (MINUS (TIMES I (NEGATIVE-GUTS J))))
(TIMES I J))))
Note that (OR (NUMBERP (ITIMES I J)) (NEGATIVEP (ITIMES I J))) is a
theorem.
[ 0.0 0.0 0.0 ]
ITIMES
(DEFN IQUOTIENT
(I J)
(IF (EQUAL (FIX-INT J) 0)
0
(IF (NEGATIVEP I)
(IF (NEGATIVEP J)
(IF (EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
(ADD1 (QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))
(IF (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(FIX-INT (MINUS (QUOTIENT (NEGATIVE-GUTS I) J)))
(FIX-INT (MINUS (ADD1 (QUOTIENT (NEGATIVE-GUTS I) J))))))
(IF (NEGATIVEP J)
(FIX-INT (MINUS (QUOTIENT I (NEGATIVE-GUTS J))))
(QUOTIENT I J)))))
Observe that (OR (NUMBERP (IQUOTIENT I J)) (NEGATIVEP (IQUOTIENT I J)))
is a theorem.
[ 0.0 0.0 0.0 ]
IQUOTIENT
(DEFN IREMAINDER
(I J)
(IDIFFERENCE I
(ITIMES J (IQUOTIENT I J))))
Observe that (OR (NUMBERP (IREMAINDER I J)) (NEGATIVEP (IREMAINDER I J)))
is a theorem.
[ 0.0 0.0 0.0 ]
IREMAINDER
(DEFN IDIV
(I J)
(IF (EQUAL (FIX-INT J) 0)
0
(IF (NEGATIVEP I)
(IF (NEGATIVEP J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
(IF (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(FIX-INT (MINUS (QUOTIENT (NEGATIVE-GUTS I) J)))
(FIX-INT (MINUS (ADD1 (QUOTIENT (NEGATIVE-GUTS I) J))))))
(IF (NEGATIVEP J)
(IF (EQUAL (REMAINDER I (NEGATIVE-GUTS J))
0)
(FIX-INT (MINUS (QUOTIENT I (NEGATIVE-GUTS J))))
(FIX-INT (MINUS (ADD1 (QUOTIENT I (NEGATIVE-GUTS J))))))
(QUOTIENT I J)))))
Observe that (OR (NUMBERP (IDIV I J)) (NEGATIVEP (IDIV I J))) is a
theorem.
[ 0.0 0.0 0.0 ]
IDIV
(DEFN IMOD
(I J)
(IDIFFERENCE (FIX-INT I)
(ITIMES J (IDIV I J))))
From the definition we can conclude that:
(OR (NUMBERP (IMOD I J))
(NEGATIVEP (IMOD I J)))
is a theorem.
[ 0.0 0.0 0.0 ]
IMOD
(DEFN IQUO
(I J)
(IF (EQUAL (FIX-INT J) 0)
0
(IF (NEGATIVEP I)
(IF (NEGATIVEP J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
(FIX-INT (MINUS (QUOTIENT (NEGATIVE-GUTS I) J))))
(IF (NEGATIVEP J)
(FIX-INT (MINUS (QUOTIENT I (NEGATIVE-GUTS J))))
(QUOTIENT I J)))))
Observe that (OR (NUMBERP (IQUO I J)) (NEGATIVEP (IQUO I J))) is a
theorem.
[ 0.0 0.0 0.0 ]
IQUO
(DEFN IREM
(I J)
(IDIFFERENCE (FIX-INT I)
(ITIMES J (IQUO I J))))
From the definition we can conclude that:
(OR (NUMBERP (IREM I J))
(NEGATIVEP (IREM I J)))
is a theorem.
[ 0.0 0.0 0.0 ]
IREM
(DEFTHEORY INTEGER-DEFNS
(INTEGERP FIX-INT ILESSP IPLUS INEG IABS ITIMES IQUOTIENT
IREMAINDER IDIV IMOD IQUO IREM ILEQ IDIFFERENCE IZEROP))
[ 0.0 0.0 0.0 ]
INTEGER-DEFNS
(DISABLE INTEGERP)
[ 0.0 0.0 0.0 ]
INTEGERP-OFF
(DISABLE FIX-INT)
[ 0.0 0.0 0.0 ]
FIX-INT-OFF
(DISABLE ILESSP)
[ 0.0 0.0 0.0 ]
ILESSP-OFF
(DISABLE IPLUS)
[ 0.0 0.0 0.0 ]
IPLUS-OFF
(DISABLE INEG)
[ 0.0 0.0 0.0 ]
INEG-OFF
(DISABLE IABS)
[ 0.0 0.0 0.0 ]
IABS-OFF
(DISABLE ITIMES)
[ 0.0 0.0 0.0 ]
ITIMES-OFF
(LEMMA INTEGERP-FIX-INT
(REWRITE)
(INTEGERP (FIX-INT X))
((ENABLE INTEGERP FIX-INT)))
This conjecture can be simplified, using the abbreviation INTEGERP, to the
goal:
(IMPLIES (NOT (NUMBERP (FIX-INT X)))
(IF (NEGATIVEP (FIX-INT X))
(IF (EQUAL (NEGATIVE-GUTS (FIX-INT X)) 0)
F T)
F)).
This simplifies, opening up the functions INTEGERP and FIX-INT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INTEGERP-FIX-INT
(LEMMA INTEGERP-IPLUS
(REWRITE)
(INTEGERP (IPLUS X Y))
((ENABLE INTEGERP IPLUS)))
This formula can be simplified, using the abbreviation INTEGERP, to the new
formula:
(IMPLIES (NOT (NUMBERP (IPLUS X Y)))
(IF (NEGATIVEP (IPLUS X Y))
(IF (EQUAL (NEGATIVE-GUTS (IPLUS X Y)) 0)
F T)
F)),
which simplifies, applying MINUS-NEGATIVE-GUTS and NEGATIVE-GUTS-MINUS, and
opening up the definitions of PLUS, EQUAL, and IPLUS, to the following four
new formulas:
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS X)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS X) Y)
0))).
But this again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NUMBERP Y))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(NOT (EQUAL (NEGATIVE-GUTS (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
0))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, to:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(LESSP X (NEGATIVE-GUTS Y)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) X)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INTEGERP-IPLUS
(LEMMA INTEGERP-IDIFFERENCE
(REWRITE)
(INTEGERP (IDIFFERENCE X Y))
((ENABLE INTEGERP-IPLUS IDIFFERENCE)))
This formula can be simplified, using the abbreviation IDIFFERENCE, to the new
formula:
(INTEGERP (IPLUS X (INEG Y))),
which simplifies, applying INTEGERP-IPLUS, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INTEGERP-IDIFFERENCE
(LEMMA INTEGERP-INEG
(REWRITE)
(INTEGERP (INEG X))
((ENABLE INTEGERP INEG)))
This conjecture can be simplified, using the abbreviation INTEGERP, to the
goal:
(IMPLIES (NOT (NUMBERP (INEG X)))
(IF (NEGATIVEP (INEG X))
(IF (EQUAL (NEGATIVE-GUTS (INEG X)) 0)
F T)
F)).
This simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and expanding the
definition of INEG, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INTEGERP-INEG
(LEMMA INTEGERP-IABS
(REWRITE)
(INTEGERP (IABS X))
((ENABLE INTEGERP IABS)))
This conjecture can be simplified, using the abbreviation INTEGERP, to the
goal:
(IMPLIES (NOT (NUMBERP (IABS X)))
(IF (NEGATIVEP (IABS X))
(IF (EQUAL (NEGATIVE-GUTS (IABS X)) 0)
F T)
F)).
This simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INTEGERP-IABS
(LEMMA INTEGERP-ITIMES
(REWRITE)
(INTEGERP (ITIMES X Y))
((ENABLE INTEGERP ITIMES FIX-INT)))
This formula can be simplified, using the abbreviation INTEGERP, to the new
formula:
(IMPLIES (NOT (NUMBERP (ITIMES X Y)))
(IF (NEGATIVEP (ITIMES X Y))
(IF (EQUAL (NEGATIVE-GUTS (ITIMES X Y)) 0)
F T)
F)),
which simplifies, applying NEGATIVE-GUTS-MINUS, and opening up the definitions
of FIX-INT, INTEGERP, and ITIMES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INTEGERP-ITIMES
(LEMMA FIX-INT-REMOVER
(REWRITE)
(IMPLIES (INTEGERP X)
(EQUAL (FIX-INT X) X))
((ENABLE FIX-INT INTEGERP)))
This simplifies, unfolding INTEGERP and FIX-INT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
FIX-INT-REMOVER
(LEMMA FIX-INT-FIX-INT
(REWRITE)
(EQUAL (FIX-INT (FIX-INT X))
(FIX-INT X))
((ENABLE FIX-INT INTEGERP)))
This formula simplifies, unfolding the definitions of INTEGERP and FIX-INT, to
the following four new goals:
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (FIX-INT X) X)).
This again simplifies, unfolding the definitions of INTEGERP and FIX-INT, to:
T.
Case 3. (IMPLIES (NUMBERP X)
(EQUAL (FIX-INT X) X)),
which again simplifies, expanding the functions INTEGERP and FIX-INT, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (FIX-INT 0) 0)),
which again simplifies, unfolding INTEGERP, NUMBERP, FIX-INT, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X)))
(EQUAL (FIX-INT 0) 0)),
which again simplifies, expanding INTEGERP, NUMBERP, FIX-INT, and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
FIX-INT-FIX-INT
(LEMMA FIX-INT-IPLUS
(REWRITE)
(EQUAL (FIX-INT (IPLUS A B))
(IPLUS A B))
((ENABLE FIX-INT INTEGERP IPLUS)))
This conjecture simplifies, appealing to the lemma MINUS-NEGATIVE-GUTS, and
expanding the functions PLUS, EQUAL, and IPLUS, to the following eight new
goals:
Case 8. (IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (FIX-INT (DIFFERENCE A (NEGATIVE-GUTS B)))
(DIFFERENCE A (NEGATIVE-GUTS B)))).
This again simplifies, unfolding the definitions of INTEGERP and FIX-INT, to:
T.
Case 7. (IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (FIX-INT (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
the definitions of INTEGERP and FIX-INT, to the new conjecture:
(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS B) A)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B)))
(EQUAL (FIX-INT (PLUS A B))
(PLUS A B))),
which again simplifies, unfolding INTEGERP and FIX-INT, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (FIX-INT (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))))),
which again simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
unfolding the functions INTEGERP and FIX-INT, to:
(IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
0))).
This again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (FIX-INT 0) 0)),
which again simplifies, expanding the functions INTEGERP, NUMBERP, FIX-INT,
and EQUAL, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (FIX-INT B) B)),
which again simplifies, expanding the definitions of INTEGERP and FIX-INT,
to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (FIX-INT (DIFFERENCE B (NEGATIVE-GUTS A)))
(DIFFERENCE B (NEGATIVE-GUTS A)))),
which again simplifies, expanding INTEGERP and FIX-INT, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (FIX-INT (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and expanding the
definitions of INTEGERP and FIX-INT, to the new conjecture:
(IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS A) B)
0))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
FIX-INT-IPLUS
(LEMMA FIX-INT-IDIFFERENCE
(REWRITE)
(EQUAL (FIX-INT (IDIFFERENCE A B))
(IDIFFERENCE A B))
((ENABLE FIX-INT-IPLUS IDIFFERENCE)))
This formula can be simplified, using the abbreviations FIX-INT-IPLUS and
IDIFFERENCE, to the new conjecture:
(EQUAL (IPLUS A (INEG B))
(IPLUS A (INEG B))),
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
FIX-INT-IDIFFERENCE
(LEMMA FIX-INT-INEG
(REWRITE)
(EQUAL (FIX-INT (INEG X)) (INEG X))
((ENABLE FIX-INT INTEGERP INEG)))
This formula simplifies, unfolding the definition of INEG, to the following
four new goals:
Case 4. (IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NUMBERP X)))
(EQUAL (FIX-INT 0) 0)).
This again simplifies, unfolding the definitions of INTEGERP, NUMBERP,
FIX-INT, and EQUAL, to:
T.
Case 3. (IMPLIES (AND (NOT (NEGATIVEP X)) (EQUAL X 0))
(EQUAL (FIX-INT 0) 0)),
which again simplifies, expanding the functions NEGATIVEP, INTEGERP, NUMBERP,
FIX-INT, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (FIX-INT (MINUS X))
(MINUS X))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and unfolding
the definitions of INTEGERP and FIX-INT, to:
T.
Case 1. (IMPLIES (NEGATIVEP X)
(EQUAL (FIX-INT (NEGATIVE-GUTS X))
(NEGATIVE-GUTS X))).
This again simplifies, expanding the functions INTEGERP and FIX-INT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
FIX-INT-INEG
(LEMMA FIX-INT-IABS
(REWRITE)
(EQUAL (FIX-INT (IABS X)) (IABS X))
((ENABLE INTEGERP FIX-INT IABS)))
This formula simplifies, unfolding the definitions of IABS, INTEGERP, and
FIX-INT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
FIX-INT-IABS
(LEMMA FIX-INT-ITIMES
(REWRITE)
(EQUAL (FIX-INT (ITIMES X Y))
(ITIMES X Y))
((ENABLE INTEGERP ITIMES FIX-INT)))
This conjecture simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
expanding the functions FIX-INT, INTEGERP, and ITIMES, to the following six
new goals:
Case 6. (IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (EQUAL (TIMES X (NEGATIVE-GUTS Y))
0)))
(EQUAL (FIX-INT (MINUS (TIMES X (NEGATIVE-GUTS Y))))
(MINUS (TIMES X (NEGATIVE-GUTS Y))))).
This again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
INTEGERP and FIX-INT, to:
T.
Case 5. (IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(EQUAL (TIMES X (NEGATIVE-GUTS Y)) 0))
(EQUAL (FIX-INT 0) 0)).
However this again simplifies, expanding the functions INTEGERP, NUMBERP,
FIX-INT, and EQUAL, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL (TIMES (NEGATIVE-GUTS X) Y) 0))
(EQUAL (FIX-INT 0) 0)),
which again simplifies, expanding INTEGERP, NUMBERP, FIX-INT, and EQUAL, to:
T.
Case 3. (IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y)))
(EQUAL (FIX-INT (TIMES X Y))
(TIMES X Y))),
which again simplifies, unfolding INTEGERP and FIX-INT, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP X) (NEGATIVEP Y))
(EQUAL (FIX-INT (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))),
which again simplifies, opening up the functions INTEGERP and FIX-INT, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL (TIMES (NEGATIVE-GUTS X) Y)
0)))
(EQUAL (FIX-INT (MINUS (TIMES (NEGATIVE-GUTS X) Y)))
(MINUS (TIMES (NEGATIVE-GUTS X) Y)))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and opening up
the definitions of INTEGERP and FIX-INT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
FIX-INT-ITIMES
(LEMMA INEG-IPLUS
(REWRITE)
(EQUAL (INEG (IPLUS A B))
(IPLUS (INEG A) (INEG B)))
((ENABLE IPLUS INEG PLUS-ZERO-ARG2)))
This simplifies, rewriting with MINUS-NEGATIVE-GUTS, and expanding PLUS, EQUAL,
IPLUS, and INEG, to 24 new formulas:
Case 24.(IMPLIES (AND (NOT (NEGATIVEP B))
(EQUAL B 0)
(NOT (NEGATIVEP A))
(EQUAL A 0))
(EQUAL (INEG (PLUS A B))
(IPLUS 0 0))),
which again simplifies, opening up the definitions of NEGATIVEP, PLUS, EQUAL,
INEG, and IPLUS, to:
T.
Case 23.(IMPLIES (AND (NOT (NEGATIVEP B))
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(EQUAL (INEG (PLUS A B))
(IPLUS 0 0))),
which again simplifies, applying the lemma PLUS-ZERO-ARG2, and expanding
NEGATIVEP, ZEROP, EQUAL, INEG, PLUS, and IPLUS, to:
T.
Case 22.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NUMBERP B))
(NOT (NEGATIVEP A))
(EQUAL A 0))
(EQUAL (INEG (PLUS A B))
(IPLUS 0 0))),
which again simplifies, applying the lemma PLUS-ZERO-ARG2, and opening up
the functions NEGATIVEP, ZEROP, NUMBERP, EQUAL, INEG, PLUS, and IPLUS, to:
T.
Case 21.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NUMBERP B))
(NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(EQUAL (INEG (PLUS A B))
(IPLUS 0 0))),
which again simplifies, applying the lemma PLUS-ZERO-ARG2, and opening up
ZEROP, EQUAL, NEGATIVEP, INEG, PLUS, and IPLUS, to:
T.
Case 20.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NUMBERP B))
(NOT (NEGATIVEP A))
(NOT (EQUAL A 0))
(NUMBERP A))
(EQUAL (INEG (PLUS A B))
(IPLUS (MINUS A) 0))),
which again simplifies, applying the lemmas PLUS-ZERO-ARG2 and
NEGATIVE-GUTS-MINUS, and opening up ZEROP, INEG, DIFFERENCE, LESSP, EQUAL,
NEGATIVEP, and IPLUS, to:
T.
Case 19.(IMPLIES (AND (NOT (NEGATIVEP B))
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NOT (EQUAL A 0))
(NUMBERP A))
(EQUAL (INEG (PLUS A B))
(IPLUS (MINUS A) 0))),
which again simplifies, rewriting with the lemmas PLUS-ZERO-ARG2 and
NEGATIVE-GUTS-MINUS, and expanding the definitions of NEGATIVEP, ZEROP, INEG,
DIFFERENCE, LESSP, EQUAL, and IPLUS, to:
T.
Case 18.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NUMBERP B))
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (INEG (DIFFERENCE B (NEGATIVE-GUTS A)))
(IPLUS (NEGATIVE-GUTS A) 0))),
which again simplifies, expanding the definitions of LESSP, DIFFERENCE,
EQUAL, NEGATIVEP, INEG, PLUS, and IPLUS, to:
T.
Case 17.(IMPLIES (AND (NOT (NEGATIVEP B))
(EQUAL B 0)
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (INEG (DIFFERENCE B (NEGATIVE-GUTS A)))
(IPLUS (NEGATIVE-GUTS A) 0))),
which again simplifies, unfolding the definitions of NEGATIVEP, EQUAL, LESSP,
DIFFERENCE, INEG, PLUS, and IPLUS, to:
T.
Case 16.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NUMBERP B))
(NEGATIVEP A)
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (INEG (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))
(IPLUS (NEGATIVE-GUTS A) 0))),
which again simplifies, rewriting with MINUS-NEGATIVE-GUTS and
PLUS-ZERO-ARG2, and unfolding LESSP, DIFFERENCE, INEG, ZEROP, NEGATIVEP, and
IPLUS, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP B))
(EQUAL B 0)
(NEGATIVEP A)
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (INEG (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))
(IPLUS (NEGATIVE-GUTS A) 0))).
But this again simplifies, applying the lemmas MINUS-NEGATIVE-GUTS and
PLUS-ZERO-ARG2, and unfolding the functions NEGATIVEP, EQUAL, LESSP,
DIFFERENCE, INEG, ZEROP, and IPLUS, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(EQUAL (INEG (PLUS A B))
(IPLUS 0 (MINUS B)))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
the functions PLUS, INEG, DIFFERENCE, LESSP, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (NEGATIVEP A))
(EQUAL A 0))
(EQUAL (INEG (PLUS A B))
(IPLUS 0 (MINUS B)))).
But this again simplifies, applying NEGATIVE-GUTS-MINUS, and expanding the
definitions of NEGATIVEP, EQUAL, PLUS, INEG, DIFFERENCE, LESSP, and IPLUS,
to:
T.
Case 12.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (NEGATIVEP A))
(NOT (EQUAL A 0))
(NUMBERP A))
(EQUAL (INEG (PLUS A B))
(IPLUS (MINUS A) (MINUS B)))).
However this again simplifies, applying NEGATIVE-GUTS-MINUS, and expanding
the functions INEG and IPLUS, to:
(IMPLIES (AND (NOT (EQUAL B 0))
(NUMBERP B)
(NOT (EQUAL A 0))
(NUMBERP A))
(NOT (EQUAL (PLUS A B) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (INEG (DIFFERENCE B (NEGATIVE-GUTS A)))
(IPLUS (NEGATIVE-GUTS A) (MINUS B)))),
which again simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
expanding INEG and IPLUS, to three new formulas:
Case 11.3.
(IMPLIES (AND (NOT (EQUAL B 0))
(NUMBERP B)
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A)))
(EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0))
(EQUAL 0
(DIFFERENCE (NEGATIVE-GUTS A) B))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS A) B)
(NOT (EQUAL B 0))
(NUMBERP B)
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A)))
(EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0))
(EQUAL 0
(DIFFERENCE (NEGATIVE-GUTS A) B))).
This again simplifies, using linear arithmetic, to:
T.
Case 11.2.
(IMPLIES (AND (NOT (EQUAL B 0))
(NUMBERP B)
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A)))
(NOT (LESSP (NEGATIVE-GUTS A) B)))
(EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 11.1.
(IMPLIES (AND (NOT (EQUAL B 0))
(NUMBERP B)
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A)))
(LESSP (NEGATIVE-GUTS A) B))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NEGATIVEP A)
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (INEG (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))
(IPLUS (NEGATIVE-GUTS A) (MINUS B)))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
the definitions of INEG and IPLUS, to the new formula:
(IMPLIES (AND (NOT (EQUAL B 0))
(NUMBERP B)
(NEGATIVEP A)
(LESSP B (NEGATIVE-GUTS A)))
(NOT (LESSP (NEGATIVE-GUTS A) B))),
which again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP A))
(NOT (NUMBERP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (INEG (DIFFERENCE A (NEGATIVE-GUTS B)))
(IPLUS 0 (NEGATIVE-GUTS B)))),
which again simplifies, expanding LESSP, DIFFERENCE, EQUAL, NEGATIVEP, INEG,
PLUS, and IPLUS, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP A))
(EQUAL A 0)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (INEG (DIFFERENCE A (NEGATIVE-GUTS B)))
(IPLUS 0 (NEGATIVE-GUTS B)))),
which again simplifies, expanding the definitions of NEGATIVEP, EQUAL, LESSP,
DIFFERENCE, INEG, PLUS, and IPLUS, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP A))
(NOT (NUMBERP A))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (INEG (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))
(IPLUS 0 (NEGATIVE-GUTS B)))),
which again simplifies, applying MINUS-NEGATIVE-GUTS, and unfolding LESSP,
DIFFERENCE, INEG, PLUS, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP A))
(EQUAL A 0)
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (INEG (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))
(IPLUS 0 (NEGATIVE-GUTS B)))).
But this again simplifies, rewriting with the lemma MINUS-NEGATIVE-GUTS, and
expanding NEGATIVEP, EQUAL, LESSP, DIFFERENCE, INEG, PLUS, and IPLUS, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP A))
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (INEG (DIFFERENCE A (NEGATIVE-GUTS B)))
(IPLUS (MINUS A) (NEGATIVE-GUTS B)))),
which again simplifies, rewriting with the lemma NEGATIVE-GUTS-MINUS, and
unfolding the functions INEG and IPLUS, to three new formulas:
Case 5.3.
(IMPLIES (AND (NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
0))
(EQUAL 0
(DIFFERENCE (NEGATIVE-GUTS B) A))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS B) A)
(NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
0))
(EQUAL 0
(DIFFERENCE (NEGATIVE-GUTS B) A))).
But this again simplifies, using linear arithmetic, to:
T.
Case 5.2.
(IMPLIES (AND (NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(NOT (LESSP (NEGATIVE-GUTS B) A)))
(EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.1.
(IMPLIES (AND (NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(LESSP (NEGATIVE-GUTS B) A))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP A))
(NOT (EQUAL A 0))
(NUMBERP A)
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (INEG (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))
(IPLUS (MINUS A) (NEGATIVE-GUTS B)))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
INEG and IPLUS, to:
(IMPLIES (AND (NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(LESSP A (NEGATIVE-GUTS B)))
(NOT (LESSP (NEGATIVE-GUTS B) A))),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (INEG (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))))
(IPLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))),
which again simplifies, applying the lemma NEGATIVE-GUTS-MINUS, and opening
up INEG and IPLUS, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (INEG 0)
(IPLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))),
which again simplifies, opening up EQUAL, NEGATIVEP, INEG, PLUS, and IPLUS,
to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (INEG B)
(IPLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))),
which again simplifies, expanding the functions INEG, PLUS, EQUAL, NEGATIVEP,
and IPLUS, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
INEG-IPLUS
(LEMMA INEG-INEG
(REWRITE)
(EQUAL (INEG (INEG X)) (FIX-INT X))
((ENABLE INEG FIX-INT INTEGERP)))
This formula simplifies, unfolding the definitions of INEG, INTEGERP, and
FIX-INT, to the following six new goals:
Case 6. (IMPLIES (AND (NUMBERP X)
(NOT (NEGATIVEP X))
(EQUAL X 0))
(EQUAL (INEG 0) X)).
This again simplifies, unfolding the definitions of NUMBERP, NEGATIVEP,
EQUAL, and INEG, to:
T.
Case 5. (IMPLIES (AND (NUMBERP X)
(NOT (NEGATIVEP X))
(NOT (EQUAL X 0)))
(EQUAL (INEG (MINUS X)) X)),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and opening up INEG,
to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (INEG (NEGATIVE-GUTS X)) X)).
However this again simplifies, applying MINUS-NEGATIVE-GUTS, and unfolding
the definition of INEG, to:
T.
Case 3. (IMPLIES (AND (NUMBERP X) (NEGATIVEP X))
(EQUAL (INEG (NEGATIVE-GUTS X)) X)).
This again simplifies, obviously, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X)))
(EQUAL (INEG 0) 0)).
But this again simplifies, unfolding the functions EQUAL, NEGATIVEP, and
INEG, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP X))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (INEG (NEGATIVE-GUTS X)) 0)),
which again simplifies, unfolding the functions EQUAL, NEGATIVEP, and INEG,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INEG-INEG
(LEMMA INEG-FIX-INT
(REWRITE)
(EQUAL (INEG (FIX-INT X)) (INEG X))
((ENABLE INEG FIX-INT INTEGERP)))
This formula simplifies, unfolding the definitions of INTEGERP, FIX-INT, and
INEG, to the following six new goals:
Case 6. (IMPLIES (AND (NOT (NEGATIVEP X))
(EQUAL X 0)
(NUMBERP X))
(EQUAL (INEG X) 0)).
This again simplifies, unfolding the definitions of NEGATIVEP, NUMBERP,
EQUAL, and INEG, to:
T.
Case 5. (IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NUMBERP X)))
(EQUAL (INEG 0) 0)),
which again simplifies, expanding the functions EQUAL, NEGATIVEP, and INEG,
to:
T.
Case 4. (IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (INEG X) (MINUS X))),
which again simplifies, unfolding INEG, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (INEG X) (NEGATIVE-GUTS X))),
which again simplifies, expanding INEG, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP X) (NUMBERP X))
(EQUAL (INEG X) (NEGATIVE-GUTS X))),
which again simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (INEG 0) (NEGATIVE-GUTS X))).
But this again simplifies, unfolding the functions EQUAL, NEGATIVEP, and
INEG, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INEG-FIX-INT
(LEMMA INEG-OF-NON-INTEGERP
(REWRITE)
(IMPLIES (NOT (INTEGERP X))
(EQUAL (INEG X) 0))
((ENABLE INEG INTEGERP)))
This conjecture can be simplified, using the abbreviations INTEGERP, NOT, and
IMPLIES, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (IF (NEGATIVEP X)
(IF (EQUAL (NEGATIVE-GUTS X) 0) F T)
F)))
(EQUAL (INEG X) 0)).
This simplifies, expanding INEG and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INEG-OF-NON-INTEGERP
(DISABLE INEG-OF-NON-INTEGERP)
[ 0.0 0.0 0.0 ]
INEG-OF-NON-INTEGERP-OFF
(LEMMA INEG-0
(REWRITE)
(EQUAL (INEG 0) 0)
((ENABLE INEG)))
This formula simplifies, unfolding the definitions of EQUAL, NEGATIVEP, and
INEG, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
INEG-0
(LEMMA IPLUS-LEFT-ID
(REWRITE)
(IMPLIES (NOT (INTEGERP X))
(EQUAL (IPLUS X Y) (FIX-INT Y)))
((ENABLE INTEGERP IPLUS FIX-INT)))
This formula can be simplified, using the abbreviations INTEGERP, NOT, and
IMPLIES, to:
(IMPLIES (AND (NOT (NUMBERP X))
(NOT (IF (NEGATIVEP X)
(IF (EQUAL (NEGATIVE-GUTS X) 0) F T)
F)))
(EQUAL (IPLUS X Y) (FIX-INT Y))),
which simplifies, rewriting with the lemma MINUS-NEGATIVE-GUTS, and expanding
the functions PLUS, DIFFERENCE, LESSP, IPLUS, INTEGERP, FIX-INT, and EQUAL, to
three new conjectures:
Case 3. (IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(NUMBERP Y)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL 0 Y)),
which again simplifies, trivially, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NUMBERP Y)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL 0 Y)).
This again simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NUMBERP Y)
(NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL 0 Y)).
This again simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-LEFT-ID
(DISABLE IPLUS-LEFT-ID)
[ 0.0 0.0 0.0 ]
IPLUS-LEFT-ID-OFF
(LEMMA IPLUS-RIGHT-ID
(REWRITE)
(IMPLIES (NOT (INTEGERP Y))
(EQUAL (IPLUS X Y) (FIX-INT X)))
((ENABLE INTEGERP IPLUS FIX-INT PLUS-ZERO-ARG2)))
This formula can be simplified, using the abbreviations INTEGERP, NOT, and
IMPLIES, to:
(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (IF (NEGATIVEP Y)
(IF (EQUAL (NEGATIVE-GUTS Y) 0) F T)
F)))
(EQUAL (IPLUS X Y) (FIX-INT X))),
which simplifies, rewriting with the lemmas PLUS-ZERO-ARG2 and
MINUS-NEGATIVE-GUTS, and expanding the functions ZEROP, DIFFERENCE, LESSP,
IPLUS, INTEGERP, FIX-INT, and EQUAL, to three new conjectures:
Case 3. (IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NUMBERP X)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL 0 X)),
which again simplifies, trivially, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP Y))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NUMBERP X)
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(EQUAL X 0))
(EQUAL 0 X)).
This again simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP Y))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NUMBERP X)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL 0 X)).
This again simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-RIGHT-ID
(DISABLE IPLUS-RIGHT-ID)
[ 0.0 0.0 0.0 ]
IPLUS-RIGHT-ID-OFF
(LEMMA IPLUS-0-LEFT
(REWRITE)
(EQUAL (IPLUS 0 X) (FIX-INT X))
((ENABLE IPLUS FIX-INT INTEGERP)))
This simplifies, rewriting with MINUS-NEGATIVE-GUTS, and unfolding PLUS,
DIFFERENCE, LESSP, EQUAL, NEGATIVEP, IPLUS, INTEGERP, and FIX-INT, to:
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL 0 X)),
which again simplifies, obviously, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-0-LEFT
(LEMMA IPLUS-0-RIGHT
(REWRITE)
(EQUAL (IPLUS X 0) (FIX-INT X))
((ENABLE IPLUS FIX-INT INTEGERP)))
This simplifies, rewriting with MINUS-NEGATIVE-GUTS, and unfolding DIFFERENCE,
LESSP, EQUAL, NEGATIVEP, IPLUS, INTEGERP, and FIX-INT, to the following three
new conjectures:
Case 3. (IMPLIES (AND (NUMBERP X) (NOT (NEGATIVEP X)))
(EQUAL (PLUS X 0) X)).
However this again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NUMBERP X)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL 0 X)),
which again simplifies, clearly, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X)))
(EQUAL (PLUS X 0) 0)).
This again simplifies, opening up the functions NUMBERP, PLUS, and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-0-RIGHT
(LEMMA COMMUTATIVITY2-OF-IPLUS
(REWRITE)
(EQUAL (IPLUS X (IPLUS Y Z))
(IPLUS Y (IPLUS X Z)))
((ENABLE IPLUS COMMUTATIVITY2-OF-PLUS)))
This simplifies, rewriting with MINUS-NEGATIVE-GUTS, and expanding PLUS, EQUAL,
and IPLUS, to 32 new formulas:
Case 32.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (IPLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, opening up the definition of IPLUS, to the goal:
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (PLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(PLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))).
This again simplifies, using linear arithmetic, to:
T.
Case 31.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, applying the lemma NEGATIVE-GUTS-MINUS, and opening
up the function IPLUS, to two new goals:
Case 31.2.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(PLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 31.2.2.
(IMPLIES (AND (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(PLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) Y)
(LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(PLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))).
This again simplifies, using linear arithmetic, to:
T.
Case 31.2.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(PLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, to:
T.
Case 31.1.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y)))).
This again simplifies, using linear arithmetic, to:
T.
Case 30.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
the definition of IPLUS, to the following four new formulas:
Case 30.4.
(IMPLIES
(AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y)))
(EQUAL (MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X))
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE X (NEGATIVE-GUTS Z)))))).
However this again simplifies, appealing to the lemmas NEGATIVE-GUTS-MINUS
and MINUS-EQUAL, to the formula:
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X)
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE X (NEGATIVE-GUTS Z))))).
This again simplifies, using linear arithmetic, to two new conjectures:
Case 30.4.2.
(IMPLIES (AND (LESSP (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X)
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, to:
T.
Case 30.4.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y)
(DIFFERENCE X (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X)
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, to:
T.
Case 30.3.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))))
(EQUAL (DIFFERENCE X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))
(DIFFERENCE (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))))
(EQUAL (DIFFERENCE X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))
(DIFFERENCE (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 30.2.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y))))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, to:
T.
Case 30.1.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP (DIFFERENCE X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Y)))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 29.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL (IPLUS X 0)
(IPLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, opening up the definitions of EQUAL, LESSP,
NEGATIVEP, IPLUS, and DIFFERENCE, to three new goals:
Case 29.3.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (PLUS X 0) (IPLUS Y X))),
which again simplifies, unfolding DIFFERENCE, LESSP, EQUAL, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP Z)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (PLUS X 0) X)).
This again simplifies, using linear arithmetic, to:
T.
Case 29.2.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(EQUAL X 0))
(EQUAL (PLUS X 0) (IPLUS Y 0))),
which again simplifies, expanding NEGATIVEP, PLUS, DIFFERENCE, LESSP,
IPLUS, and EQUAL, to:
T.
Case 29.1.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NUMBERP X)))
(EQUAL (PLUS X 0) (IPLUS Y 0))),
which again simplifies, opening up the functions NUMBERP, PLUS, DIFFERENCE,
LESSP, NEGATIVEP, IPLUS, and EQUAL, to:
T.
Case 28.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (IPLUS X Z)
(IPLUS Y
(DIFFERENCE X (NEGATIVE-GUTS Z))))),
which again simplifies, expanding the functions IPLUS, DIFFERENCE, LESSP,
and EQUAL, to:
T.
Case 27.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (IPLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS Y
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) X))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
IPLUS, to the following two new conjectures:
Case 27.2.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (PLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))).
This again simplifies, using linear arithmetic, to two new conjectures:
Case 27.2.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (PLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 27.2.1.
(IMPLIES (AND (LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X))
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (PLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X))
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (PLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 27.1.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(NOT (LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(NOT (LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 26.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS Y
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) X))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and opening up
the definition of IPLUS, to the following four new conjectures:
Case 26.4.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(EQUAL (MINUS (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X))
(MINUS (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y)))).
However this again simplifies, applying the lemmas NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to:
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y))).
But this again simplifies, using linear arithmetic, to four new formulas:
Case 26.4.4.
(IMPLIES (AND (LESSP (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(LESSP (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y))).
This again simplifies, using linear arithmetic, to:
T.
Case 26.4.3.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 26.4.2.
(IMPLIES (AND (LESSP (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y))),
which again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(LESSP (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y))).
But this again simplifies, using linear arithmetic, to:
T.
Case 26.4.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) Y)
X)
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Z) X)
Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 26.3.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to three new conjectures:
Case 26.3.3.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 26.3.2.
(IMPLIES (AND (LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X))
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X))
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 26.3.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 26.2.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X))))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X))))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y)))).
This again simplifies, using linear arithmetic, to:
T.
Case 26.1.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))),
which again simplifies, using linear arithmetic, to the formula:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS Z) X)))
(LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))).
This again simplifies, using linear arithmetic, to:
T.
Case 25.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS Y
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) X))))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and unfolding the
definition of IPLUS, to the following two new goals:
Case 25.2.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X))
(MINUS (PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS Z) X))))).
But this again simplifies, rewriting with the lemmas NEGATIVE-GUTS-MINUS
and MINUS-EQUAL, to the conjecture:
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X)
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS Z) X)))).
However this again simplifies, using linear arithmetic, to two new goals:
Case 25.2.2.
(IMPLIES (AND (LESSP (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X)
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 25.2.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) X)
(NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (DIFFERENCE (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
X)
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 25.1.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 24.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL (IPLUS X 0)
(IPLUS Y
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 23.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (IPLUS X Z)
(IPLUS Y
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) X))))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and opening up IPLUS,
PLUS, and EQUAL, to the new conjecture:
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(LESSP X (NEGATIVE-GUTS Z))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Z) X)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 22.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NOT (NEGATIVEP Y)))
(EQUAL (IPLUS X (PLUS Y Z))
(IPLUS Y (PLUS X Z)))),
which again simplifies, applying COMMUTATIVITY2-OF-PLUS, and expanding the
definition of IPLUS, to:
T.
Case 21.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (IPLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS Y (PLUS X Z)))).
This again simplifies, opening up the function IPLUS, to two new conjectures:
Case 21.2.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (PLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (PLUS X Z) (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (PLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 21.1.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(NOT (LESSP (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 20.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS Y (PLUS X Z)))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and expanding IPLUS,
to the following four new formulas:
Case 20.4.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(LESSP (PLUS X Z) (NEGATIVE-GUTS Y)))
(EQUAL (MINUS (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Y) Z)
X))
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y)
(PLUS X Z))))).
However this again simplifies, rewriting with NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to the new formula:
(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(LESSP (PLUS X Z) (NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Y) Z)
X)
(DIFFERENCE (NEGATIVE-GUTS Y)
(PLUS X Z)))),
which again simplifies, using linear arithmetic, to three new formulas:
Case 20.4.3.
(IMPLIES (AND (LESSP (DIFFERENCE (NEGATIVE-GUTS Y) Z)
X)
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(LESSP (PLUS X Z) (NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Y) Z)
X)
(DIFFERENCE (NEGATIVE-GUTS Y)
(PLUS X Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 20.4.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) Z)
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(LESSP (PLUS X Z) (NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Y) Z)
X)
(DIFFERENCE (NEGATIVE-GUTS Y)
(PLUS X Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 20.4.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) (PLUS X Z))
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(LESSP (PLUS X Z) (NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS Y) Z)
X)
(DIFFERENCE (NEGATIVE-GUTS Y)
(PLUS X Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 20.3.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to two new goals:
Case 20.3.2.
(IMPLIES (AND (LESSP (PLUS X Z) (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 20.3.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) Z)
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))))
(EQUAL (DIFFERENCE X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 20.2.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (LESSP (PLUS X Z) (NEGATIVE-GUTS Y))))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) Z)
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (LESSP (PLUS X Z) (NEGATIVE-GUTS Y))))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 20.1.
(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(LESSP (PLUS X Z) (NEGATIVE-GUTS Y)))
(LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))),
which again simplifies, using linear arithmetic, to:
T.
Case 19.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (IPLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS Y
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z)))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
the function IPLUS, to the following four new formulas:
Case 19.4.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(LESSP Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Y (NEGATIVE-GUTS Z))))
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y)))).
This again simplifies, applying the lemmas NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to the formula:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(LESSP Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y))).
This again simplifies, using linear arithmetic, to two new goals:
Case 19.4.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X)
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(LESSP Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 19.4.1.
(IMPLIES (AND (LESSP (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y)
(NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(LESSP Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 19.3.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (LESSP (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X))
(DIFFERENCE Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, to the formula:
(IMPLIES (AND (LESSP Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z)))
(NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (LESSP (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X))
(DIFFERENCE Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
This again simplifies, using linear arithmetic, to:
T.
Case 19.2.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (LESSP Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z)))))
(NOT (LESSP (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 19.1.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(LESSP Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))
(LESSP (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X))),
which again simplifies, using linear arithmetic, to:
T.
Case 18.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS Y
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z)))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
the function IPLUS, to the following two new conjectures:
Case 18.2.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y)))).
However this again simplifies, applying NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to the new conjecture:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 18.2.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) Y)
(NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 18.2.1.
(IMPLIES (AND (LESSP (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y)
(NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Z) Y))
(DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 18.1.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(LESSP Y
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 17.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS Y
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z)))))),
which again simplifies, applying NEGATIVE-GUTS-MINUS and
COMMUTATIVITY2-OF-PLUS, and opening up the definition of IPLUS, to:
T.
Case 16.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL (IPLUS X 0)
(IPLUS Y
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z)))))).
However this again simplifies, rewriting with MINUS-NEGATIVE-GUTS and
NEGATIVE-GUTS-MINUS, and opening up the functions DIFFERENCE, LESSP, EQUAL,
NEGATIVEP, and IPLUS, to the following two new conjectures:
Case 16.2.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL X
(MINUS (PLUS 0 (NEGATIVE-GUTS X) 0)))).
However this again simplifies, applying NEGATIVE-GUTS-MINUS, and unfolding
EQUAL and PLUS, to:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL X
(MINUS (PLUS (NEGATIVE-GUTS X) 0)))).
Applying the lemma NEGATIVE-GUTS-ELIM, replace X by (MINUS V) to eliminate
(NEGATIVE-GUTS X). We employ the type restriction lemma noted when
NEGATIVE-GUTS was introduced to restrict the new variable. We would thus
like to prove:
(IMPLIES (AND (NUMBERP V)
(NEGATIVEP Z)
(NOT (EQUAL V 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL (MINUS V) (MINUS (PLUS V 0)))),
which further simplifies, applying the lemmas NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to:
(IMPLIES (AND (NUMBERP V)
(NEGATIVEP Z)
(NOT (EQUAL V 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL V (PLUS V 0))).
But this finally simplifies, using linear arithmetic, to:
T.
Case 16.1.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X) 0)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 15.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (IPLUS X Z)
(IPLUS Y
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z)))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and unfolding
the functions IPLUS, PLUS, and EQUAL, to:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 14.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (IPLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS Y 0))),
which again simplifies, opening up the definitions of EQUAL, LESSP,
DIFFERENCE, NEGATIVEP, and IPLUS, to three new conjectures:
Case 14.3.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y))
(EQUAL (IPLUS X Y) (PLUS Y 0))),
which again simplifies, unfolding the functions DIFFERENCE, LESSP, EQUAL,
and IPLUS, to the conjecture:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (EQUAL Y 0))
(NUMBERP Y))
(EQUAL Y (PLUS Y 0))).
But this again simplifies, using linear arithmetic, to:
T.
Case 14.2.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (IPLUS X 0) (PLUS Y 0))),
which again simplifies, expanding the functions NEGATIVEP, DIFFERENCE,
LESSP, IPLUS, PLUS, and EQUAL, to:
T.
Case 14.1.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (IPLUS X 0) (PLUS Y 0))),
which again simplifies, opening up DIFFERENCE, LESSP, NEGATIVEP, IPLUS,
NUMBERP, PLUS, and EQUAL, to:
T.
Case 13.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS Y 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS Y 0))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS and
MINUS-NEGATIVE-GUTS, and opening up the definitions of EQUAL, IPLUS,
DIFFERENCE, LESSP, and NEGATIVEP, to the following two new conjectures:
Case 12.2.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (MINUS (PLUS 0 (NEGATIVE-GUTS Y) 0))
Y)).
But this again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and opening
up the definitions of EQUAL and PLUS, to:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS Y) 0))
Y)).
Applying the lemma NEGATIVE-GUTS-ELIM, replace X by (MINUS V) to eliminate
(NEGATIVE-GUTS X). We employ the type restriction lemma noted when
NEGATIVE-GUTS was introduced to restrict the new variable. We thus obtain:
(IMPLIES (AND (NUMBERP V)
(NEGATIVEP Z)
(EQUAL V 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS Y) 0))
Y)),
which further simplifies, rewriting with the lemma NEGATIVE-GUTS-MINUS,
and opening up the function NUMBERP, to:
(IMPLIES (AND (NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS Y) 0))
Y)).
Appealing to the lemma NEGATIVE-GUTS-ELIM, we now replace Z by (MINUS V)
to eliminate (NEGATIVE-GUTS Z). We rely upon the type restriction lemma
noted when NEGATIVE-GUTS was introduced to constrain the new variable.
The result is:
(IMPLIES (AND (NUMBERP V)
(EQUAL V 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS Y) 0))
Y)).
But this further simplifies, applying NEGATIVE-GUTS-MINUS, and expanding
NUMBERP, to:
(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS Y) 0))
Y)).
Applying the lemma NEGATIVE-GUTS-ELIM, replace Y by (MINUS V) to eliminate
(NEGATIVE-GUTS Y). We use the type restriction lemma noted when
NEGATIVE-GUTS was introduced to restrict the new variable. We thus obtain
the new conjecture:
(IMPLIES (AND (NUMBERP V) (NOT (EQUAL V 0)))
(EQUAL (MINUS (PLUS V 0)) (MINUS V))),
which further simplifies, rewriting with the lemmas NEGATIVE-GUTS-MINUS
and MINUS-EQUAL, to:
(IMPLIES (AND (NUMBERP V) (NOT (EQUAL V 0)))
(EQUAL (PLUS V 0) V)).
But this finally simplifies, using linear arithmetic, to:
T.
Case 12.1.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS Y) 0)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (IPLUS X 0) (IPLUS Y 0))),
which again simplifies, opening up the functions DIFFERENCE, LESSP,
NEGATIVEP, IPLUS, and EQUAL, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (IPLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS Y Z))),
which again simplifies, unfolding DIFFERENCE, LESSP, EQUAL, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (DIFFERENCE Y (NEGATIVE-GUTS Z))
0))
(EQUAL 0
(DIFFERENCE Y (NEGATIVE-GUTS Z)))).
This again simplifies, clearly, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS Y Z))).
However this again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and
expanding the definitions of PLUS, EQUAL, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Z) Y)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS Y Z))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
the functions PLUS, EQUAL, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (IPLUS X Z) (IPLUS Y Z))),
which again simplifies, applying MINUS-NEGATIVE-GUTS, and unfolding the
functions PLUS, EQUAL, and IPLUS, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NOT (NEGATIVEP Y)))
(EQUAL (IPLUS X (PLUS Y Z))
(IPLUS Y
(DIFFERENCE Z (NEGATIVE-GUTS X))))).
However this again simplifies, unfolding the function IPLUS, to two new
conjectures:
Case 6.2.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NOT (NEGATIVEP Y)))
(EQUAL (DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X))
(PLUS Y
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (PLUS Y Z) (NEGATIVE-GUTS X))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NOT (NEGATIVEP Y)))
(EQUAL (DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X))
(PLUS Y
(DIFFERENCE Z (NEGATIVE-GUTS X))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 6.1.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NOT (NEGATIVEP Y)))
(NOT (LESSP (PLUS Y Z)
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (IPLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS Y
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, unfolding the function IPLUS, to four new
conjectures:
Case 5.4.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y)))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y))))
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X)))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS and MINUS-EQUAL,
to:
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to two new conjectures:
Case 5.4.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.4.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X)))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.3.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))
(DIFFERENCE (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))
(DIFFERENCE (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 5.2.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y))))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 5.1.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y)))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))),
which again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS Y
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
expanding the definitions of PLUS, EQUAL, and IPLUS, to six new goals:
Case 4.6.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y))))
(EQUAL (NEGATIVE-GUTS X) 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.5.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y))))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.4.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.3.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y))))
(EQUAL 0
(DIFFERENCE (DIFFERENCE Z (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.2.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X)))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS and MINUS-EQUAL,
to:
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to two new goals:
Case 4.2.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) Z)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.2.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X)))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X))))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.1.
(IMPLIES
(AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS X)))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0)))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z))
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y)
(DIFFERENCE Z (NEGATIVE-GUTS X)))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS and MINUS-EQUAL,
and opening up EQUAL, LESSP, and DIFFERENCE, to the following two new
formulas:
Case 4.1.2.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0))
(NOT (NUMBERP Z)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
(DIFFERENCE (NEGATIVE-GUTS Y) 0))).
But this again simplifies, expanding the functions LESSP, DIFFERENCE,
and EQUAL, to:
T.
Case 4.1.1.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0))
(EQUAL Z 0))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
(DIFFERENCE (NEGATIVE-GUTS Y) 0))),
which again simplifies, trivially, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y)))
(EQUAL (IPLUS X (PLUS Y Z))
(IPLUS Y
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Z))))).
However this again simplifies, rewriting with the lemma NEGATIVE-GUTS-MINUS,
and unfolding the definition of IPLUS, to four new goals:
Case 3.4.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS X)
(PLUS Y Z)))
(MINUS (DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y)))),
which again simplifies, applying the lemmas NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to:
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(PLUS Y Z))
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y))).
This again simplifies, using linear arithmetic, to three new formulas:
Case 3.4.3.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) (PLUS Y Z))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(PLUS Y Z))
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Z)
(LESSP (NEGATIVE-GUTS X) (PLUS Y Z))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(PLUS Y Z))
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y))).
However this again simplifies, using linear arithmetic, to:
T.
Case 3.4.2.
(IMPLIES (AND (LESSP (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(PLUS Y Z))
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Z)
(LESSP (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(PLUS Y Z))
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y))).
However this again simplifies, using linear arithmetic, to:
T.
Case 3.4.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Z)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(PLUS Y Z))
(DIFFERENCE (DIFFERENCE (NEGATIVE-GUTS X) Z)
Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.3.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(NOT (LESSP (PLUS Y Z) (NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to two new conjectures:
Case 3.3.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Z)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(NOT (LESSP (PLUS Y Z) (NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.3.1.
(IMPLIES (AND (LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(NOT (LESSP (PLUS Y Z) (NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Z)
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(NOT (LESSP (PLUS Y Z) (NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X))
(DIFFERENCE Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))).
This again simplifies, using linear arithmetic, to:
T.
Case 3.2.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z))))
(NOT (LESSP (PLUS Y Z)
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.1.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(LESSP (PLUS Y Z) (NEGATIVE-GUTS X))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Z)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(LESSP Y
(DIFFERENCE (NEGATIVE-GUTS X) Z)))
(LESSP (PLUS Y Z) (NEGATIVE-GUTS X))).
This again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (IPLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS Y
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Z))))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and unfolding the
functions IPLUS, PLUS, and EQUAL, to the following six new conjectures:
Case 2.6.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))).
However this again simplifies, using linear arithmetic, to:
T.
Case 2.5.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X) Z)
0))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.4.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS X) Z)
0)))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.3.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y))))
(MINUS (PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS and MINUS-EQUAL,
to the new goal:
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to two new conjectures:
Case 2.3.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.3.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Z)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.2.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))))
(EQUAL (DIFFERENCE (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X)))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS X)
(DIFFERENCE Z (NEGATIVE-GUTS Y))))
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, opening up EQUAL, LESSP, and DIFFERENCE, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS Y
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Z))))),
which again simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
opening up the definitions of PLUS, EQUAL, and IPLUS, to eight new goals:
Case 1.8.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0)))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z))
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, trivially, to:
T.
Case 1.7.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Z)))).
This again simplifies, using linear arithmetic, to:
T.
Case 1.6.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z))
(MINUS (PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.5.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(MINUS (PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z))))),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS and MINUS-EQUAL,
to the new conjecture:
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 1.5.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) Z)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.5.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Z)
(NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS Y) Z))
(PLUS (NEGATIVE-GUTS Y)
(DIFFERENCE (NEGATIVE-GUTS X) Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.4.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS X) Z)
0))
(EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.3.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X) Z)
0))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.2.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (DIFFERENCE (NEGATIVE-GUTS X) Z)
0))
(EQUAL (NEGATIVE-GUTS X) 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS X))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS Y) Z)
0))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.2 0.4 ]
COMMUTATIVITY2-OF-IPLUS
(LEMMA COMMUTATIVITY-OF-IPLUS
(REWRITE)
(EQUAL (IPLUS X Y) (IPLUS Y X))
((ENABLE IPLUS COMMUTATIVITY2-OF-IPLUS)))
WARNING: the newly proposed lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the previously added lemma COMMUTATIVITY2-OF-IPLUS could.
WARNING: the newly proposed lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the previously added lemma IPLUS-0-RIGHT could.
WARNING: the newly proposed lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the previously added lemma IPLUS-0-LEFT could.
This formula simplifies, rewriting with MINUS-NEGATIVE-GUTS, and expanding the
functions PLUS, EQUAL, and IPLUS, to four new conjectures:
Case 4. (IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP X)))
(EQUAL (PLUS X Y) (PLUS Y X))),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X))))),
which again simplifies, appealing to the lemmas NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to:
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL Y
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X))))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, to:
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL Y
(MINUS (PLUS (NEGATIVE-GUTS Y) 0)))).
Applying the lemma NEGATIVE-GUTS-ELIM, replace Y by (MINUS Z) to eliminate
(NEGATIVE-GUTS Y). We rely upon the type restriction lemma noted when
NEGATIVE-GUTS was introduced to restrict the new variable. This produces
the new conjecture:
(IMPLIES (AND (NUMBERP Z)
(NEGATIVEP X)
(NOT (EQUAL Z 0))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (MINUS Z) (MINUS (PLUS Z 0)))),
which further simplifies, rewriting with NEGATIVE-GUTS-MINUS and MINUS-EQUAL,
to the new goal:
(IMPLIES (AND (NUMBERP Z)
(NEGATIVEP X)
(NOT (EQUAL Z 0))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL Z (PLUS Z 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
X)),
which again simplifies, rewriting with NEGATIVE-GUTS-MINUS, to:
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X) 0))
X)).
Applying the lemma NEGATIVE-GUTS-ELIM, replace Y by (MINUS Z) to eliminate
(NEGATIVE-GUTS Y). We rely upon the type restriction lemma noted when
NEGATIVE-GUTS was introduced to restrict the new variable. We would thus
like to prove:
(IMPLIES (AND (NUMBERP Z)
(NEGATIVEP X)
(EQUAL Z 0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X) 0))
X)),
which further simplifies, rewriting with NEGATIVE-GUTS-MINUS, and unfolding
NUMBERP, to:
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (MINUS (PLUS (NEGATIVE-GUTS X) 0))
X)).
Applying the lemma NEGATIVE-GUTS-ELIM, replace X by (MINUS Z) to eliminate
(NEGATIVE-GUTS X). We use the type restriction lemma noted when
NEGATIVE-GUTS was introduced to restrict the new variable. We thus obtain:
(IMPLIES (AND (NUMBERP Z) (NOT (EQUAL Z 0)))
(EQUAL (MINUS (PLUS Z 0)) (MINUS Z))),
which further simplifies, appealing to the lemmas NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to:
(IMPLIES (AND (NUMBERP Z) (NOT (EQUAL Z 0)))
(EQUAL (PLUS Z 0) Z)).
This finally simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
COMMUTATIVITY-OF-IPLUS
(LEMMA ASSOCIATIVITY-OF-IPLUS
(REWRITE)
(EQUAL (IPLUS (IPLUS X Y) Z)
(IPLUS X (IPLUS Y Z)))
((ENABLE IPLUS)
(ENABLE-THEORY ADDITION)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed ASSOCIATIVITY-OF-IPLUS could!
This simplifies, rewriting with MINUS-NEGATIVE-GUTS, and expanding PLUS, EQUAL,
and IPLUS, to 31 new formulas:
Case 31.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP X)))
(EQUAL (IPLUS (PLUS X Y) Z)
(IPLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, applying the lemmas
EQUAL-PLUS-0, DIFFERENCE-LEQ-ARG1, PLUS-DIFFERENCE-ARG2, and PLUS-ZERO-ARG2,
and opening up the definitions of DIFFERENCE, IPLUS, and ZEROP, to three new
conjectures:
Case 31.3.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP X))
(NOT (LESSP (NEGATIVE-GUTS Z) Y))
(NOT (NUMBERP X)))
(EQUAL (DIFFERENCE (PLUS X Y)
(NEGATIVE-GUTS Z))
0)),
which again simplifies, using linear arithmetic, to two new goals:
Case 31.3.2.
(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP X))
(NOT (LESSP (NEGATIVE-GUTS Z) Y))
(NOT (NUMBERP X)))
(EQUAL (DIFFERENCE (PLUS X Y)
(NEGATIVE-GUTS Z))
0)),
which again simplifies, appealing to the lemma PLUS-ZERO-ARG2, and
unfolding the functions LESSP, ZEROP, DIFFERENCE, and EQUAL, to:
T.
Case 31.3.1.
(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP (NEGATIVE-GUTS Z)))
(NEGATIVEP Z)
(NOT (LESSP (NEGATIVE-GUTS Z)
(NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP X))
(NOT (LESSP (NEGATIVE-GUTS Z)
(NEGATIVE-GUTS Z)))
(NOT (NUMBERP X)))
(EQUAL (DIFFERENCE (PLUS X (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS Z))
0)),
which again simplifies, rewriting with the lemma DIFFERENCE-X-X, and
expanding the functions PLUS and EQUAL, to:
T.
Case 31.2.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP X))
(NOT (LESSP (NEGATIVE-GUTS Z) Y))
(NUMBERP X))
(EQUAL (DIFFERENCE (PLUS X Y)
(NEGATIVE-GUTS Z))
X)),
which again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES (AND (LESSP (PLUS X Y) (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP X))
(NOT (LESSP (NEGATIVE-GUTS Z) Y))
(NUMBERP X))
(EQUAL (DIFFERENCE (PLUS X Y)
(NEGATIVE-GUTS Z))
X)).
But this again simplifies, using linear arithmetic, to:
T.
Case 31.1.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (NEGATIVEP X)))
(NOT (LESSP (PLUS X Y)
(NEGATIVE-GUTS Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 30.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X))))
(EQUAL (IPLUS (DIFFERENCE Y (NEGATIVE-GUTS X))
Z)
(IPLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z))))),
which again simplifies, applying DIFFERENCE-DIFFERENCE-ARG1,
DIFFERENCE-DIFFERENCE-ARG2, and COMMUTATIVITY-OF-PLUS, and expanding IPLUS,
to the following two new formulas:
Case 30.2.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (LESSP (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X))))
(NOT (LESSP (DIFFERENCE Y (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Z)))).
This again simplifies, using linear arithmetic, to:
T.
Case 30.1.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE Y (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Z))),
which again simplifies, using linear arithmetic, to:
T.
Case 29.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X)))
(EQUAL (IPLUS (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
Z)
(IPLUS X
(DIFFERENCE Y (NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, appealing to the lemmas
PLUS-DIFFERENCE-ARG1, EQUAL-DIFFERENCE-0, NEGATIVE-GUTS-MINUS,
DIFFERENCE-DIFFERENCE-ARG1, DIFFERENCE-LEQ-ARG1, COMMUTATIVITY-OF-PLUS, and
DIFFERENCE-DIFFERENCE-ARG2, and opening up the definition of IPLUS, to:
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X)))
(LESSP (DIFFERENCE Y (NEGATIVE-GUTS Z))
(NEGATIVE-GUTS X))).
This again simplifies, using linear arithmetic, to:
T.
Case 28.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP X)))
(EQUAL (IPLUS (PLUS X Y) Z)
(IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y))))),
which again simplifies, appealing to the lemmas DIFFERENCE-DIFFERENCE-ARG2,
DIFFERENCE-DIFFERENCE-ARG1, COMMUTATIVITY-OF-PLUS, and NEGATIVE-GUTS-MINUS,
and opening up the definition of IPLUS, to four new conjectures:
Case 28.4.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP X))
(LESSP (NEGATIVE-GUTS Z) Y)
(NUMBERP X)
(NOT (LESSP (PLUS X Y) (NEGATIVE-GUTS Z))))
(EQUAL (DIFFERENCE (PLUS X Y)
(NEGATIVE-GUTS Z))
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 28.3.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP X))
(LESSP (NEGATIVE-GUTS Z) Y)
(NOT (NUMBERP X))
(NOT (LESSP (PLUS X Y) (NEGATIVE-GUTS Z))))
(EQUAL (DIFFERENCE (PLUS X Y)
(NEGATIVE-GUTS Z))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 28.2.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP X))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y))))
(NOT (LESSP (PLUS X Y)
(NEGATIVE-GUTS Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 28.1.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP X))
(LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(LESSP (PLUS X Y) (NEGATIVE-GUTS Z))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Z) Y)
(NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (NEGATIVEP X))
(LESSP X
(DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(LESSP (PLUS X Y) (NEGATIVE-GUTS Z))).
But this again simplifies, using linear arithmetic, to:
T.
Case 27.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X))))
(EQUAL (IPLUS (DIFFERENCE Y (NEGATIVE-GUTS X))
Z)
(IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y))))),
which again simplifies, using linear arithmetic, rewriting with
DIFFERENCE-DIFFERENCE-ARG1, DIFFERENCE-LEQ-ARG1, DIFFERENCE-DIFFERENCE-ARG2,
COMMUTATIVITY-OF-PLUS, PLUS-DIFFERENCE-ARG2, EQUAL-DIFFERENCE-0, and
NEGATIVE-GUTS-MINUS, and unfolding IPLUS, PLUS, and EQUAL, to the following
two new conjectures:
Case 27.2.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y))
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))).
This again simplifies, expanding EQUAL, LESSP, and PLUS, to:
T.
Case 27.1.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X))))
(LESSP (DIFFERENCE Y (NEGATIVE-GUTS X))
(NEGATIVE-GUTS Z))),
which again simplifies, using linear arithmetic, to:
T.
Case 26.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X)))
(EQUAL (IPLUS (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
Z)
(IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y))))),
which again simplifies, rewriting with PLUS-DIFFERENCE-ARG1,
EQUAL-DIFFERENCE-0, NEGATIVE-GUTS-MINUS, and PLUS-DIFFERENCE-ARG2, and
expanding the definitions of IPLUS, PLUS, and EQUAL, to the new formula:
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(LESSP Y (NEGATIVE-GUTS Z))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (MINUS (DIFFERENCE (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))
Y))
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 25.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NOT (NEGATIVEP X)))
(EQUAL (IPLUS (PLUS X Y) Z)
(IPLUS X (PLUS Y Z)))),
which again simplifies, applying ASSOCIATIVITY-OF-PLUS, and unfolding the
definition of IPLUS, to:
T.
Case 24.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X))))
(EQUAL (IPLUS (DIFFERENCE Y (NEGATIVE-GUTS X))
Z)
(IPLUS X (PLUS Y Z)))).
This again simplifies, using linear arithmetic, appealing to the lemmas
PLUS-DIFFERENCE-ARG1, EQUAL-PLUS-0, and DIFFERENCE-LEQ-ARG1, and expanding
PLUS, EQUAL, IPLUS, and DIFFERENCE, to three new goals:
Case 24.3.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (LESSP (NEGATIVE-GUTS X) Y))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 24.3.2.
(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (LESSP (NEGATIVE-GUTS X) Y))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X)))),
which again simplifies, applying the lemma PLUS-ZERO-ARG2, and opening
up LESSP, ZEROP, DIFFERENCE, and EQUAL, to:
T.
Case 24.3.1.
(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP (NEGATIVE-GUTS X)))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (LESSP (NEGATIVE-GUTS X)
(NEGATIVE-GUTS X)))
(NOT (LESSP (NEGATIVE-GUTS X)
(NEGATIVE-GUTS X)))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS (NEGATIVE-GUTS X) Z)
(NEGATIVE-GUTS X)))),
which again simplifies, applying PLUS-ZERO-ARG2 and DIFFERENCE-X-X, and
unfolding the definitions of ZEROP and EQUAL, to:
T.
Case 24.2.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (LESSP (NEGATIVE-GUTS X) Y))
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X)))).
However this again simplifies, using linear arithmetic, to the formula:
(IMPLIES (AND (LESSP (PLUS Y Z) (NEGATIVE-GUTS X))
(NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (LESSP (NEGATIVE-GUTS X) Y))
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 24.1.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X))))
(NOT (LESSP (PLUS Y Z)
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 23.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X)))
(EQUAL (IPLUS (MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y))
Z)
(IPLUS X (PLUS Y Z)))),
which again simplifies, rewriting with DIFFERENCE-DIFFERENCE-ARG2,
COMMUTATIVITY-OF-PLUS, DIFFERENCE-DIFFERENCE-ARG1, and NEGATIVE-GUTS-MINUS,
and unfolding the definition of IPLUS, to the following four new formulas:
Case 23.4.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS X) Y)))
(LESSP (NEGATIVE-GUTS X) Y)
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 23.3.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS X) Y)))
(LESSP (NEGATIVE-GUTS X) Y)
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS Y Z)
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 23.2.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X))
(NOT (LESSP (PLUS Y Z) (NEGATIVE-GUTS X))))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS X) Y)))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Y)
(NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X))
(NOT (LESSP (PLUS Y Z) (NEGATIVE-GUTS X))))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS X) Y)))).
This again simplifies, using linear arithmetic, to:
T.
Case 23.1.
(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X))
(LESSP (PLUS Y Z) (NEGATIVE-GUTS X)))
(LESSP Z
(DIFFERENCE (NEGATIVE-GUTS X) Y))),
which again simplifies, using linear arithmetic, to:
T.
Case 22.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y))))
(EQUAL (IPLUS (DIFFERENCE X (NEGATIVE-GUTS Y))
Z)
(IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))))),
which again simplifies, applying DIFFERENCE-DIFFERENCE-ARG1,
DIFFERENCE-DIFFERENCE-ARG2, COMMUTATIVITY-OF-PLUS, and NEGATIVE-GUTS-MINUS,
and unfolding IPLUS, to the following two new formulas:
Case 22.2.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))))
(NOT (LESSP (DIFFERENCE X (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS Z)))).
This again simplifies, using linear arithmetic, to:
T.
Case 22.1.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(LESSP (DIFFERENCE X (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS Z))),
which again simplifies, using linear arithmetic, to:
T.
Case 21.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (IPLUS (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
Z)
(IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))))),
which again simplifies, using linear arithmetic, applying
PLUS-DIFFERENCE-ARG1, EQUAL-DIFFERENCE-0, NEGATIVE-GUTS-MINUS, and
DIFFERENCE-LEQ-ARG1, and opening up the definition of IPLUS, to the new goal:
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y)))
(LESSP X
(PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 20.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (IPLUS (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
Z)
(IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))))),
which again simplifies, rewriting with ASSOCIATIVITY-OF-PLUS, EQUAL-PLUS-0,
and NEGATIVE-GUTS-MINUS, and expanding the definition of IPLUS, to:
T.
Case 19.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (IPLUS Y Z)
(IPLUS X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))))).
This again simplifies, appealing to the lemmas EQUAL-PLUS-0 and
NEGATIVE-GUTS-MINUS, and opening up the definitions of IPLUS, PLUS, and
EQUAL, to:
T.
Case 18.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y))))
(EQUAL (IPLUS (DIFFERENCE X (NEGATIVE-GUTS Y))
Z)
(IPLUS X 0))),
which again simplifies, applying the lemma PLUS-ZERO-ARG2, and expanding the
definitions of EQUAL, LESSP, DIFFERENCE, ZEROP, NEGATIVEP, and IPLUS, to
three new goals:
Case 18.3.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP X))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0 Z) 0)),
which again simplifies, unfolding the definitions of DIFFERENCE, LESSP,
NEGATIVEP, IPLUS, and EQUAL, to:
T.
Case 18.2.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP X))
(NUMBERP X)
(NOT (EQUAL X 0)))
(EQUAL (IPLUS X Z) X)),
which again simplifies, opening up DIFFERENCE, LESSP, EQUAL, and IPLUS, to:
T.
Case 18.1.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP X))
(NUMBERP X)
(EQUAL X 0))
(EQUAL (IPLUS 0 Z) X)),
which again simplifies, unfolding the functions NEGATIVEP, NUMBERP,
DIFFERENCE, LESSP, IPLUS, and EQUAL, to:
T.
Case 17.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (IPLUS (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
Z)
(IPLUS X 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 16.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (IPLUS (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
Z)
(IPLUS X 0))),
which again simplifies, applying PLUS-ZERO-ARG2 and MINUS-NEGATIVE-GUTS, and
expanding the definitions of ZEROP, IPLUS, DIFFERENCE, LESSP, EQUAL, and
NEGATIVEP, to:
T.
Case 15.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (IPLUS 0 Z) (IPLUS X 0))).
This again simplifies, expanding the definitions of DIFFERENCE, LESSP,
NEGATIVEP, IPLUS, and EQUAL, to:
T.
Case 14.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y))))
(EQUAL (IPLUS (DIFFERENCE X (NEGATIVE-GUTS Y))
Z)
(IPLUS X Z))),
which again simplifies, expanding the functions EQUAL, LESSP, DIFFERENCE,
and IPLUS, to six new goals:
Case 14.6.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS X Z)
(DIFFERENCE X (NEGATIVE-GUTS Z)))),
which again simplifies, opening up the definition of IPLUS, to:
T.
Case 14.5.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(EQUAL X 0))
(EQUAL (IPLUS 0 Z)
(DIFFERENCE X (NEGATIVE-GUTS Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 14.4.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Z)))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0 Z)
(DIFFERENCE X (NEGATIVE-GUTS Z)))),
which again simplifies, unfolding the function LESSP, to:
T.
Case 14.3.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Z))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS X Z)
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, expanding the definition of IPLUS, to:
T.
Case 14.2.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Z))
(EQUAL X 0))
(EQUAL (IPLUS 0 Z)
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) X)))),
which again simplifies, rewriting with MINUS-NEGATIVE-GUTS, and unfolding
NEGATIVEP, EQUAL, LESSP, DIFFERENCE, and IPLUS, to:
T.
Case 14.1.
(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Z))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0 Z)
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) X)))).
However this again simplifies, rewriting with MINUS-NEGATIVE-GUTS, and
unfolding the definitions of LESSP, DIFFERENCE, EQUAL, NEGATIVEP, and
IPLUS, to:
T.
Case 13.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (IPLUS (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
Z)
(IPLUS X Z))).
But this again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (IPLUS (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
Z)
(IPLUS X Z))),
which again simplifies, applying PLUS-ZERO-ARG2 and MINUS-NEGATIVE-GUTS, and
unfolding the definitions of ZEROP and IPLUS, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (IPLUS 0 Z) (IPLUS X Z))).
However this again simplifies, appealing to the lemma MINUS-NEGATIVE-GUTS,
and unfolding DIFFERENCE, LESSP, EQUAL, NEGATIVEP, IPLUS, and PLUS, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y))))
(EQUAL (IPLUS (DIFFERENCE X (NEGATIVE-GUTS Y))
Z)
(IPLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y))))),
which again simplifies, rewriting with the lemmas PLUS-DIFFERENCE-ARG1,
PLUS-DIFFERENCE-ARG2, and PLUS-ZERO-ARG2, and expanding the definitions of
PLUS, EQUAL, IPLUS, and ZEROP, to seven new conjectures:
Case 10.7.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP X)
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP Z))
(EQUAL Z X)),
which again simplifies, using linear arithmetic, to:
T.
Case 10.6.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP X)
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NOT (NUMBERP Z)))
(EQUAL 0 X)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NUMBERP Z)))
(EQUAL 0 (NEGATIVE-GUTS Y))).
But this again simplifies, unfolding the definition of LESSP, to:
T.
Case 10.5.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP X)
(LESSP (NEGATIVE-GUTS Y) X))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
X)),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (PLUS X Z) (NEGATIVE-GUTS Y))
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP X)
(LESSP (NEGATIVE-GUTS Y) X))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
X)).
However this again simplifies, using linear arithmetic, to:
T.
Case 10.4.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (NUMBERP X))
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP Z))
(EQUAL Z 0)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NUMBERP X))
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP (NEGATIVE-GUTS Y)))
(EQUAL (NEGATIVE-GUTS Y) 0)).
However this again simplifies, opening up the function LESSP, to:
T.
Case 10.3.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (NUMBERP X))
(LESSP (NEGATIVE-GUTS Y) X))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
0)),
which again simplifies, using linear arithmetic, to two new conjectures:
Case 10.3.2.
(IMPLIES (AND (NOT (NUMBERP Z))
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (NUMBERP X))
(LESSP (NEGATIVE-GUTS Y) X))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
0)),
which again simplifies, expanding the definitions of LESSP and EQUAL, to:
T.
Case 10.3.1.
(IMPLIES (AND (NUMBERP Z)
(NEGATIVEP Y)
(NOT (NEGATIVEP (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NUMBERP X))
(LESSP (NEGATIVE-GUTS Y) X))
(EQUAL (DIFFERENCE (PLUS X (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS Y))
0)),
which again simplifies, unfolding LESSP, to:
T.
Case 10.2.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (PLUS X Z) (NEGATIVE-GUTS Y))
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 10.1.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to two new goals:
Case 10.1.2.
(IMPLIES (AND (NOT (NUMBERP X))
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, opening up the definitions of LESSP and EQUAL,
to:
T.
Case 10.1.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS (NEGATIVE-GUTS Y) Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, unfolding LESSP and NEGATIVEP, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (IPLUS (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
Z)
(IPLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
DIFFERENCE-DIFFERENCE-ARG2, COMMUTATIVITY-OF-PLUS,
DIFFERENCE-DIFFERENCE-ARG1, DIFFERENCE-LEQ-ARG1, NEGATIVE-GUTS-MINUS,
PLUS-DIFFERENCE-ARG2, and PLUS-ZERO-ARG2, and unfolding MINUS, IPLUS, and
ZEROP, to eight new formulas:
Case 9.8.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (NEGATIVE-GUTS Y) Z)
(LESSP (NEGATIVE-GUTS Y) X)
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.7.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (NEGATIVE-GUTS Y) Z)
(LESSP (NEGATIVE-GUTS Y) X)
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 9.6.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (NUMBERP X))
(NOT (LESSP (NEGATIVE-GUTS Y) X)))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
0)),
which again simplifies, using linear arithmetic, to two new goals:
Case 9.6.2.
(IMPLIES (AND (NOT (NUMBERP Z))
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (NUMBERP X))
(NOT (LESSP (NEGATIVE-GUTS Y) X)))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
0)),
which again simplifies, expanding the functions LESSP and EQUAL, to:
T.
Case 9.6.1.
(IMPLIES (AND (NUMBERP Z)
(NEGATIVEP Y)
(NOT (NEGATIVEP (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NUMBERP X))
(NOT (LESSP (NEGATIVE-GUTS Y) X)))
(EQUAL (DIFFERENCE (PLUS X (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS Y))
0)),
which again simplifies, applying DIFFERENCE-X-X, and unfolding LESSP,
PLUS, and EQUAL, to:
T.
Case 9.5.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (NUMBERP X))
(LESSP (NEGATIVE-GUTS Y) X)
(NUMBERP Z))
(EQUAL Z 0)).
But this again simplifies, using linear arithmetic, to:
T.
Case 9.4.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP X)
(NOT (LESSP (NEGATIVE-GUTS Y) X)))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
X)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (PLUS X Z) (NEGATIVE-GUTS Y))
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP X)
(NOT (LESSP (NEGATIVE-GUTS Y) X)))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
X)).
This again simplifies, using linear arithmetic, to:
T.
Case 9.3.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP X)
(LESSP (NEGATIVE-GUTS Y) X)
(NUMBERP Z))
(EQUAL Z X)),
which again simplifies, using linear arithmetic, to:
T.
Case 9.2.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NUMBERP X)
(LESSP (NEGATIVE-GUTS Y) X)
(NOT (NUMBERP Z)))
(EQUAL 0 X)),
which again simplifies, using linear arithmetic, to:
T.
Case 9.1.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) X)
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (IPLUS (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
Z)
(IPLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y))))),
which again simplifies, rewriting with the lemmas NEGATIVE-GUTS-MINUS,
DIFFERENCE-DIFFERENCE-ARG1, COMMUTATIVITY-OF-PLUS, and
DIFFERENCE-DIFFERENCE-ARG2, and opening up the definition of IPLUS, to two
new goals:
Case 8.2.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X))))
(NOT (LESSP Z
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 8.1.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP (DIFFERENCE Z (NEGATIVE-GUTS Y))
(NEGATIVE-GUTS X)))
(LESSP Z
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (IPLUS 0 Z)
(IPLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y))))),
which again simplifies, unfolding the functions EQUAL, LESSP, PLUS,
NEGATIVEP, IPLUS, and DIFFERENCE, to three new formulas:
Case 7.3.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL Z 0))
(NUMBERP Z))
(EQUAL Z (IPLUS X Z))),
which again simplifies, opening up DIFFERENCE, LESSP, EQUAL, and IPLUS, to:
T.
Case 7.2.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (NUMBERP Z)))
(EQUAL 0 (IPLUS X 0))),
which again simplifies, expanding the functions DIFFERENCE, LESSP,
NEGATIVEP, IPLUS, and EQUAL, to:
T.
Case 7.1.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL Z 0)
(NUMBERP Z))
(EQUAL Z (IPLUS X 0))),
which again simplifies, opening up NEGATIVEP, NUMBERP, DIFFERENCE, LESSP,
IPLUS, and EQUAL, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (IPLUS Y Z)
(IPLUS X
(DIFFERENCE Z (NEGATIVE-GUTS Y))))),
which again simplifies, rewriting with DIFFERENCE-DIFFERENCE-ARG1 and
PLUS-ZERO-ARG2, and opening up IPLUS, ZEROP, LESSP, and EQUAL, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y))))
(EQUAL (IPLUS (DIFFERENCE X (NEGATIVE-GUTS Y))
Z)
(IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z))))).
This again simplifies, using linear arithmetic, applying
PLUS-DIFFERENCE-ARG1, DIFFERENCE-DIFFERENCE-ARG2, DIFFERENCE-DIFFERENCE-ARG1,
DIFFERENCE-LEQ-ARG1, COMMUTATIVITY-OF-PLUS, and NEGATIVE-GUTS-MINUS, and
opening up the functions PLUS, EQUAL, IPLUS, and MINUS, to the following
eight new formulas:
Case 5.8.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))).
This again simplifies, using linear arithmetic, to two new goals:
Case 5.8.2.
(IMPLIES (AND (NOT (NUMBERP X))
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, opening up LESSP, to:
T.
Case 5.8.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Y)))
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS (NEGATIVE-GUTS Y) Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, rewriting with the lemmas PLUS-ZERO-ARG2 and
DIFFERENCE-X-X, and opening up the functions LESSP, ZEROP, and EQUAL, to:
T.
Case 5.7.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (PLUS X Z) (NEGATIVE-GUTS Y))
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 5.6.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NUMBERP X)
(LESSP (NEGATIVE-GUTS Y) X))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.5.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NUMBERP X)
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NOT (NUMBERP Z)))
(EQUAL 0 X)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.4.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NUMBERP X)
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP Z))
(EQUAL Z X)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.3.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (NUMBERP X))
(LESSP (NEGATIVE-GUTS Y) X))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.2.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (NUMBERP X))
(NOT (LESSP (NEGATIVE-GUTS Y) X))
(NUMBERP Z))
(EQUAL Z 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.1.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y))))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) Z)
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y))))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y)))
(EQUAL (IPLUS (MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X))
Z)
(IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z))))),
which again simplifies, appealing to the lemmas DIFFERENCE-DIFFERENCE-ARG2,
COMMUTATIVITY-OF-PLUS, DIFFERENCE-DIFFERENCE-ARG1, and NEGATIVE-GUTS-MINUS,
and opening up the function IPLUS, to nine new formulas:
Case 4.9.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(LESSP (NEGATIVE-GUTS Y) X)
(NUMBERP Z))
(EQUAL Z
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.8.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(LESSP (NEGATIVE-GUTS Y) X)
(NOT (NUMBERP Z)))
(EQUAL 0
(DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.7.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (NEGATIVE-GUTS Y) Z)
(NUMBERP X)
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(NOT (LESSP (NEGATIVE-GUTS Y) X)))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
X)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.6.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (NEGATIVE-GUTS Y) Z)
(NUMBERP X)
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(LESSP (NEGATIVE-GUTS Y) X)
(NUMBERP Z))
(EQUAL Z X)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.5.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (NEGATIVE-GUTS Y) Z)
(NUMBERP X)
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(LESSP (NEGATIVE-GUTS Y) X)
(NOT (NUMBERP Z)))
(EQUAL 0 X)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.4.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (NUMBERP X))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(NOT (LESSP (NEGATIVE-GUTS Y) X)))
(EQUAL (DIFFERENCE (PLUS X Z)
(NEGATIVE-GUTS Y))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.3.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP (NEGATIVE-GUTS Y) Z)
(NOT (NUMBERP X))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))
(LESSP (NEGATIVE-GUTS Y) X)
(NUMBERP Z))
(EQUAL Z 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.2.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) X)
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z))))
(NOT (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 4.1.
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS Y) Z)
(NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(LESSP X
(DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(LESSP Z
(DIFFERENCE (NEGATIVE-GUTS Y) X))).
But this again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (IPLUS (MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))
Z)
(IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z))))),
which again simplifies, using linear arithmetic, rewriting with
DIFFERENCE-LEQ-ARG1, NEGATIVE-GUTS-MINUS, and PLUS-DIFFERENCE-ARG2, and
expanding the definition of IPLUS, to:
(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(LESSP Z
(PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (IPLUS 0 Z)
(IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z))))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(LESSP Z (NEGATIVE-GUTS Y))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (IPLUS Y Z)
(IPLUS X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z))))),
which again simplifies, rewriting with PLUS-DIFFERENCE-ARG2,
EQUAL-DIFFERENCE-0, and NEGATIVE-GUTS-MINUS, and expanding IPLUS, PLUS, and
EQUAL, to:
T.
Q.E.D.
[ 0.0 0.3 0.1 ]
ASSOCIATIVITY-OF-IPLUS
(LEMMA IPLUS-CANCELLATION-1
(REWRITE)
(EQUAL (EQUAL (IPLUS A B) (IPLUS A C))
(EQUAL (FIX-INT B) (FIX-INT C)))
((ENABLE IPLUS FIX-INT INTEGERP)
(ENABLE-THEORY ADDITION)))
This conjecture simplifies, applying MINUS-NEGATIVE-GUTS, and expanding the
functions PLUS, EQUAL, IPLUS, INTEGERP, and FIX-INT, to 209 new conjectures:
Case 209.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B))),
which again simplifies, clearly, to:
T.
Case 208.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C))))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
This again simplifies, clearly, to:
T.
Case 207.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B))).
This again simplifies, trivially, to:
T.
Case 206.
(IMPLIES (AND (NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C))))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 205.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL 0 C))),
which again simplifies, trivially, to:
T.
Case 204.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NEGATIVEP B)))
(LESSP B (NEGATIVE-GUTS A))).
This again simplifies, obviously, to:
T.
Case 203.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(NEGATIVEP B)).
This again simplifies, trivially, to:
T.
Case 202.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B))).
This again simplifies, trivially, to:
T.
Case 201.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NEGATIVEP B))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
This again simplifies, trivially, to:
T.
Case 200.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL B 0)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B))).
This again simplifies, using linear arithmetic, to:
T.
Case 199.
(IMPLIES (AND (NOT (NUMBERP C))
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B)
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C))))
(NOT (LESSP A (NEGATIVE-GUTS B)))),
which again simplifies, obviously, to:
T.
Case 198.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B))).
This again simplifies, clearly, to:
T.
Case 197.
(IMPLIES (AND (NOT (NUMBERP C))
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C))))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
This again simplifies, trivially, to:
T.
Case 196.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0))
(NOT (LESSP B (NEGATIVE-GUTS A)))).
This again simplifies, using linear arithmetic, to:
T.
Case 195.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(LESSP B (NEGATIVE-GUTS A))),
which again simplifies, opening up the function LESSP, to:
T.
Case 194.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (NEGATIVEP A)))
(NOT (LESSP A (NEGATIVE-GUTS C)))),
which again simplifies, using linear arithmetic, to:
T.
Case 193.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NEGATIVEP B))
(NOT (EQUAL (NEGATIVE-GUTS B) 0))),
which again simplifies, obviously, to:
T.
Case 192.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL B 0)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (NEGATIVEP B)))
(NOT (LESSP B (NEGATIVE-GUTS A)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 191.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL B 0)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NEGATIVEP B)))
(LESSP B (NEGATIVE-GUTS A))),
which again simplifies, using linear arithmetic, to:
T.
Case 190.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL B 0)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(NEGATIVEP B)),
which again simplifies, using linear arithmetic, to:
T.
Case 189.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A)))
(NOT (EQUAL (NEGATIVE-GUTS A) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 188.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A))))
(EQUAL (NEGATIVE-GUTS A) 0)),
which again simplifies, unfolding the function LESSP, to:
T.
Case 187.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NEGATIVEP A)))
(NOT (LESSP A (NEGATIVE-GUTS B)))),
which again simplifies, using linear arithmetic, to:
T.
Case 186.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A)))
(LESSP B (NEGATIVE-GUTS A))),
which again simplifies, unfolding LESSP, to:
T.
Case 185.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A))))
(NOT (LESSP B (NEGATIVE-GUTS A)))),
which again simplifies, expanding the definitions of LESSP and EQUAL, to:
T.
Case 184.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (NEGATIVEP B)))
(LESSP B (NEGATIVE-GUTS A))),
which again simplifies, using linear arithmetic, to:
T.
Case 183.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0))
(NOT (EQUAL (NEGATIVE-GUTS B) 0))),
which again simplifies, obviously, to:
T.
Case 182.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (NEGATIVEP B)))
(NOT (LESSP B (NEGATIVE-GUTS A)))).
However this again simplifies, unfolding the definitions of LESSP and
NEGATIVEP, to:
T.
Case 181.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NEGATIVEP B))
(EQUAL (NEGATIVE-GUTS A) 0)),
which again simplifies, clearly, to:
T.
Case 180.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NEGATIVEP B))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
This again simplifies, clearly, to:
T.
Case 179.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0))
(NOT (EQUAL B 0))).
This again simplifies, obviously, to:
T.
Case 178.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A))))
(EQUAL (NEGATIVE-GUTS A) 0)).
This again simplifies, obviously, to:
T.
Case 177.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C)))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
This again simplifies, obviously, to:
T.
Case 176.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B))).
This again simplifies, obviously, to:
T.
Case 175.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C))))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
This again simplifies, trivially, to:
T.
Case 174.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0))
(NOT (EQUAL (NEGATIVE-GUTS C) 0))).
This again simplifies, clearly, to:
T.
Case 173.
(IMPLIES (AND (NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A)))
(NOT (EQUAL (NEGATIVE-GUTS A) 0))).
However this again simplifies, using linear arithmetic, to:
T.
Case 172.
(IMPLIES (AND (NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A))))
(EQUAL (NEGATIVE-GUTS A) 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 171.
(IMPLIES (AND (NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C)))
(NOT (LESSP A (NEGATIVE-GUTS B)))),
which again simplifies, using linear arithmetic, to:
T.
Case 170.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B))),
which again simplifies, obviously, to:
T.
Case 169.
(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A)))
(LESSP B (NEGATIVE-GUTS A))).
However this again simplifies, unfolding the functions NEGATIVEP, EQUAL, and
LESSP, to:
T.
Case 168.
(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A))))
(NOT (LESSP B (NEGATIVE-GUTS A)))),
which again simplifies, using linear arithmetic, to:
T.
Case 167.
(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0))
(NOT (LESSP B (NEGATIVE-GUTS A)))),
which again simplifies, trivially, to:
T.
Case 166.
(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(LESSP B (NEGATIVE-GUTS A))).
This again simplifies, clearly, to:
T.
Case 165.
(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NEGATIVEP C))
(NOT (LESSP A (NEGATIVE-GUTS C)))).
This again simplifies, obviously, to:
T.
Case 164.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL 0 C))).
This again simplifies, trivially, to:
T.
Case 163.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B))
(NOT (EQUAL B 0))).
This again simplifies, trivially, to:
T.
Case 162.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B))
(NOT (EQUAL (NEGATIVE-GUTS B) 0))).
This again simplifies, clearly, to:
T.
Case 161.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (NEGATIVEP B)))
(LESSP B (NEGATIVE-GUTS A))).
This again simplifies, trivially, to:
T.
Case 160.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0))
(NOT (EQUAL (NEGATIVE-GUTS B) 0))).
This again simplifies, clearly, to:
T.
Case 159.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (NEGATIVEP B)))
(NOT (LESSP B (NEGATIVE-GUTS A)))).
This again simplifies, clearly, to:
T.
Case 158.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NEGATIVEP B))
(EQUAL (NEGATIVE-GUTS A) 0)).
This again simplifies, obviously, to:
T.
Case 157.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NEGATIVEP B)))
(NOT (LESSP B (NEGATIVE-GUTS A)))).
This again simplifies, clearly, to:
T.
Case 156.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NEGATIVEP B)))
(LESSP B (NEGATIVE-GUTS A))).
This again simplifies, obviously, to:
T.
Case 155.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C))
(NEGATIVEP B))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
This again simplifies, trivially, to:
T.
Case 154.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(LESSP A (NEGATIVE-GUTS C)))
(NEGATIVEP B)).
This again simplifies, clearly, to:
T.
Case 153.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B))).
This again simplifies, trivially, to:
T.
Case 152.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NEGATIVEP B))
(NOT (LESSP A (NEGATIVE-GUTS B)))).
This again simplifies, clearly, to:
T.
Case 151.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NEGATIVEP B))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, obviously, to:
T.
Case 150.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, trivially, to:
T.
Case 149.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, trivially, to:
T.
Case 148.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NEGATIVEP B))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, clearly, to:
T.
Case 147.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B 0))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, rewriting with PLUS-ZERO-ARG2, MINUS-NEGATIVE-GUTS,
NEGATIVE-GUTS-MINUS, and CORRECTNESS-OF-CANCEL-EQUAL-PLUS, and opening up
the functions ZEROP and FIX, to:
T.
Case 146.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NEGATIVEP B))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, trivially, to:
T.
Case 145.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
But this again simplifies, rewriting with PLUS-ZERO-ARG2,
MINUS-NEGATIVE-GUTS, NEGATIVE-GUTS-MINUS, and
CORRECTNESS-OF-CANCEL-EQUAL-PLUS, and expanding ZEROP and FIX, to:
T.
Case 144.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
But this again simplifies, applying the lemmas NEGATIVE-GUTS-MINUS,
CORRECTNESS-OF-CANCEL-EQUAL-PLUS, and MINUS-EQUAL, and expanding FIX, to:
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (NEGATIVE-GUTS B)
(NEGATIVE-GUTS C)))).
This again simplifies, obviously, to:
T.
Case 143.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(LESSP A (NEGATIVE-GUTS C))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A))))).
This again simplifies, trivially, to:
T.
Case 142.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(LESSP A (NEGATIVE-GUTS C))
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A))))).
This again simplifies, obviously, to:
T.
Case 141.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(LESSP A (NEGATIVE-GUTS C))
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A))))).
This again simplifies, clearly, to:
T.
Case 140.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A))))).
This again simplifies, clearly, to:
T.
Case 139.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A))))).
This again simplifies, using linear arithmetic, to:
T.
Case 138.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A))))),
which again simplifies, trivially, to:
T.
Case 137.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A))))).
This again simplifies, using linear arithmetic, to:
T.
Case 136.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A))))),
which again simplifies, applying the lemmas NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to the goal:
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS B) A)
(DIFFERENCE (NEGATIVE-GUTS C) A)))).
Appealing to the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, we now
replace C by (MINUS X) to eliminate (NEGATIVE-GUTS C) and X by (PLUS A Z) to
eliminate (DIFFERENCE X A). We employ the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to constrain the new variables. This generates
two new goals:
Case 136.2.
(IMPLIES (AND (LESSP X A)
(NUMBERP X)
(NOT (EQUAL X 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B (MINUS X)))
(NOT (NEGATIVEP A))
(LESSP A X)
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS B) A)
(DIFFERENCE X A)))),
which further simplifies, using linear arithmetic, to:
T.
Case 136.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS A Z) A))
(NOT (EQUAL (PLUS A Z) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B (MINUS (PLUS A Z))))
(NOT (NEGATIVEP A))
(LESSP A (PLUS A Z))
(LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS B) A)
Z))),
which further simplifies, applying CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
PLUS-DIFFERENCE-ARG2, and MINUS-NEGATIVE-GUTS, and expanding FIX, to:
T.
Case 135.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))).
This again simplifies, clearly, to:
T.
Case 134.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))).
This again simplifies, trivially, to:
T.
Case 133.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))).
This again simplifies, obviously, to:
T.
Case 132.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))).
This again simplifies, clearly, to:
T.
Case 131.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))).
However this again simplifies, using linear arithmetic, to:
T.
Case 130.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))),
which again simplifies, obviously, to:
T.
Case 129.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 128.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))).
Applying the lemma DIFFERENCE-ELIM, replace A by (PLUS (NEGATIVE-GUTS B) X)
to eliminate (DIFFERENCE A (NEGATIVE-GUTS B)). We use the type restriction
lemma noted when DIFFERENCE was introduced to restrict the new variable. We
would thus like to prove the following two new conjectures:
Case 128.2.
(IMPLIES (AND (NOT (NUMBERP A))
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C))))).
This further simplifies, expanding LESSP, to:
T.
Case 128.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (LESSP (PLUS (NEGATIVE-GUTS B) X)
(NEGATIVE-GUTS C)))
(NOT (LESSP (PLUS (NEGATIVE-GUTS B) X)
(NEGATIVE-GUTS B))))
(NOT (EQUAL X
(DIFFERENCE (PLUS (NEGATIVE-GUTS B) X)
(NEGATIVE-GUTS C))))),
which further simplifies, rewriting with the lemmas COMMUTATIVITY-OF-PLUS
and CORRECTNESS-OF-CANCEL-LESSP-PLUS, to the formula:
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (LESSP (PLUS X (NEGATIVE-GUTS B))
(NEGATIVE-GUTS C))))
(NOT (EQUAL X
(DIFFERENCE (PLUS X (NEGATIVE-GUTS B))
(NEGATIVE-GUTS C))))).
Appealing to the lemma NEGATIVE-GUTS-ELIM, we now replace C by (MINUS Z)
to eliminate (NEGATIVE-GUTS C). We rely upon the type restriction lemma
noted when NEGATIVE-GUTS was introduced to constrain the new variable. We
must thus prove:
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL Z 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B (MINUS Z)))
(NOT (LESSP (PLUS X (NEGATIVE-GUTS B)) Z)))
(NOT (EQUAL X
(DIFFERENCE (PLUS X (NEGATIVE-GUTS B))
Z)))).
Appealing to the lemma NEGATIVE-GUTS-ELIM, we now replace B by (MINUS V)
to eliminate (NEGATIVE-GUTS B). We rely upon the type restriction lemma
noted when NEGATIVE-GUTS was introduced to constrain the new variable. We
must thus prove:
(IMPLIES (AND (NUMBERP V)
(NUMBERP Z)
(NOT (EQUAL Z 0))
(NOT (EQUAL V 0))
(NOT (EQUAL (MINUS V) (MINUS Z)))
(NOT (LESSP (PLUS X V) Z)))
(NOT (EQUAL X (DIFFERENCE (PLUS X V) Z)))).
But this further simplifies, rewriting with NEGATIVE-GUTS-MINUS,
MINUS-EQUAL, and COMMUTATIVITY-OF-PLUS, to the new conjecture:
(IMPLIES (AND (NUMBERP V)
(NUMBERP Z)
(NOT (EQUAL Z 0))
(NOT (EQUAL V 0))
(NOT (EQUAL V Z))
(NOT (LESSP (PLUS V X) Z)))
(NOT (EQUAL X (DIFFERENCE (PLUS V X) Z)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 127.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(EQUAL B C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (EQUAL B C) T)),
which again simplifies, expanding the definition of EQUAL, to:
T.
Case 126.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NEGATIVEP B))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)),
which again simplifies, trivially, to:
T.
Case 125.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, trivially, to:
T.
Case 124.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, trivially, to:
T.
Case 123.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(EQUAL B 0)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NEGATIVEP B))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, obviously, to:
T.
Case 122.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
But this again simplifies, rewriting with the lemmas PLUS-ZERO-ARG2 and
MINUS-NEGATIVE-GUTS, and opening up ZEROP and EQUAL, to:
T.
Case 121.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B 0)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)),
which again simplifies, trivially, to:
T.
Case 120.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NEGATIVEP B))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, obviously, to:
T.
Case 119.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, obviously, to:
T.
Case 118.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
But this again simplifies, unfolding EQUAL, to:
T.
Case 117.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)),
which again simplifies, trivially, to:
T.
Case 116.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)).
This again simplifies, using linear arithmetic, to:
T.
Case 115.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)),
which again simplifies, trivially, to:
T.
Case 114.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(EQUAL B 0)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)).
However this again simplifies, using linear arithmetic, to:
T.
Case 113.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)),
which again simplifies, using linear arithmetic, to:
T.
Case 112.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B 0)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)),
which again simplifies, using linear arithmetic, to:
T.
Case 111.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)),
which again simplifies, trivially, to:
T.
Case 110.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)).
This again simplifies, obviously, to:
T.
Case 109.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
T)).
But this again simplifies, opening up the function EQUAL, to:
T.
Case 108.
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)),
which again simplifies, trivially, to:
T.
Case 107.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NOT (LESSP A (NEGATIVE-GUTS C))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, clearly, to:
T.
Case 106.
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, trivially, to:
T.
Case 105.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, clearly, to:
T.
Case 104.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
But this again simplifies, unfolding EQUAL, LESSP, and DIFFERENCE, to:
T.
Case 103.
(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)),
which again simplifies, trivially, to:
T.
Case 102.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, trivially, to:
T.
Case 101.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, clearly, to:
T.
Case 100.
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
But this again simplifies, unfolding the definition of EQUAL, to:
T.
Case 99.(IMPLIES (AND (NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (EQUAL 0 C) T)),
which again simplifies, trivially, to:
T.
Case 98.(IMPLIES (AND (NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0)))
(EQUAL (EQUAL 0 C) T)).
This again simplifies, obviously, to:
T.
Case 97.(IMPLIES (AND (NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
C))).
However this again simplifies, using linear arithmetic, to:
T.
Case 96.(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
C))),
which again simplifies, using linear arithmetic, to:
T.
Case 95.(IMPLIES (AND (NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
C))),
which again simplifies, obviously, to:
T.
Case 94.(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
C))).
This again simplifies, trivially, to:
T.
Case 93.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, trivially, to:
T.
Case 92.(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, clearly, to:
T.
Case 91.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, appealing to the lemmas PLUS-ZERO-ARG2,
MINUS-NEGATIVE-GUTS, and NEGATIVE-GUTS-MINUS, and unfolding ZEROP, to:
(IMPLIES (AND (NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
A))).
This again simplifies, clearly, to:
(IMPLIES (AND (NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
A))).
Applying the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, replace A by
(MINUS X) to eliminate (NEGATIVE-GUTS A) and X by (PLUS B Z) to eliminate
(DIFFERENCE X B). We use the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to restrict the new variables. We thus obtain the
following three new conjectures:
Case 91.3.
(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
A))).
This further simplifies, trivially, to:
T.
Case 91.2.
(IMPLIES (AND (LESSP X B)
(NUMBERP X)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (EQUAL X 0))
(LESSP B X))
(NOT (EQUAL (MINUS (DIFFERENCE X B))
(MINUS X)))).
But this further simplifies, using linear arithmetic, to:
T.
Case 91.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS B Z) B))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (EQUAL (PLUS B Z) 0))
(LESSP B (PLUS B Z)))
(NOT (EQUAL (MINUS Z)
(MINUS (PLUS B Z))))),
which further simplifies, rewriting with CORRECTNESS-OF-CANCEL-LESSP-PLUS,
EQUAL-PLUS-0, NEGATIVE-GUTS-MINUS, and CORRECTNESS-OF-CANCEL-EQUAL-PLUS,
and opening up FIX, ZEROP, and NOT, to:
T.
Case 90.(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))).
This again simplifies, applying NEGATIVE-GUTS-MINUS and MINUS-EQUAL, to:
(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS A) B)
(PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))),
which again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS A) B)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS A) B)
(PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 89.(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C)))))),
which again simplifies, rewriting with MINUS-NEGATIVE-GUTS,
NEGATIVE-GUTS-MINUS, and CORRECTNESS-OF-CANCEL-EQUAL-PLUS, and unfolding
LESSP, DIFFERENCE, and FIX, to:
T.
Case 88.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (NEGATIVEP B)))
(NOT (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C))))).
This again simplifies, obviously, to:
T.
Case 87.(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NOT (LESSP A (NEGATIVE-GUTS C))))
(NOT (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C))))).
This again simplifies, trivially, to:
T.
Case 86.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (NEGATIVEP B)))
(NOT (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 85.(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (NEGATIVEP B)))
(NOT (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C))))),
which again simplifies, using linear arithmetic, to:
T.
Case 84.(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C))))
(NOT (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C))))),
which again simplifies, using linear arithmetic, to:
T.
Case 83.(IMPLIES (AND (NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
C)
T)),
which again simplifies, obviously, to:
T.
Case 82.(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
C)
T)).
This again simplifies, clearly, to:
T.
Case 81.(IMPLIES (AND (NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
C)
T)).
This again simplifies, obviously, to:
T.
Case 80.(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
C)
T)).
This again simplifies, clearly, to:
T.
Case 79.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, trivially, to:
T.
Case 78.(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, trivially, to:
T.
Case 77.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL B 0)
(NEGATIVEP A)
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
However this again simplifies, applying MINUS-NEGATIVE-GUTS and
PLUS-ZERO-ARG2, and opening up NEGATIVEP, EQUAL, LESSP, DIFFERENCE, and
ZEROP, to:
T.
Case 76.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
But this again simplifies, applying MINUS-NEGATIVE-GUTS and PLUS-ZERO-ARG2,
and unfolding the functions LESSP, DIFFERENCE, ZEROP, and EQUAL, to:
T.
Case 75.(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, trivially, to:
T.
Case 74.(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
T)).
This again simplifies, clearly, to:
T.
Case 73.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NEGATIVEP C)
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, trivially, to:
T.
Case 72.(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NEGATIVEP C))
(EQUAL (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, trivially, to:
T.
Case 71.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
But this again simplifies, appealing to the lemma PLUS-ZERO-ARG2, and
expanding the definitions of NEGATIVEP, ZEROP, EQUAL, and DIFFERENCE, to:
T.
Case 70.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (NEGATIVEP A)))
(EQUAL (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)),
which again simplifies, rewriting with PLUS-ZERO-ARG2, and expanding the
definitions of ZEROP, EQUAL, and DIFFERENCE, to:
T.
Case 69.(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, clearly, to:
T.
Case 68.(IMPLIES (AND (NEGATIVEP C)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NOT (NEGATIVEP A)))
(EQUAL (EQUAL (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C)))
T)).
This again simplifies, clearly, to:
T.
Case 67.(IMPLIES (AND (NUMBERP C)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (EQUAL B 0) T)).
This again simplifies, obviously, to:
T.
Case 66.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL B 0)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (EQUAL B 0) T)).
This again simplifies, trivially, to:
T.
Case 65.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0)
T)).
This again simplifies, obviously, to:
T.
Case 64.(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0)
T)).
This again simplifies, trivially, to:
T.
Case 63.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL B 0)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0)
T)).
This again simplifies, expanding NEGATIVEP, DIFFERENCE, and EQUAL, to:
T.
Case 62.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0)
T)),
which again simplifies, using linear arithmetic, rewriting with
DIFFERENCE-LEQ-ARG1, and unfolding the definition of EQUAL, to:
T.
Case 61.(IMPLIES (AND (NOT (NUMBERP C))
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS C) 0)
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0))).
However this again simplifies, using linear arithmetic, to:
T.
Case 60.(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0))),
which again simplifies, obviously, to:
T.
Case 59.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NEGATIVEP C)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
0))).
This again simplifies, clearly, to:
T.
Case 58.(IMPLIES (AND (NUMBERP C)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(NOT (EQUAL B
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
This again simplifies, using linear arithmetic, to:
T.
Case 57.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (EQUAL B 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(NOT (EQUAL B
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))),
which again simplifies, using linear arithmetic, to:
T.
Case 56.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))),
which again simplifies, obviously, to:
T.
Case 55.(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
This again simplifies, appealing to the lemmas PLUS-ZERO-ARG2,
MINUS-NEGATIVE-GUTS, and NEGATIVE-GUTS-MINUS, and opening up ZEROP, to:
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL A
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
This again simplifies, obviously, to:
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL A
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
Applying the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, replace A by
(MINUS X) to eliminate (NEGATIVE-GUTS A) and X by (PLUS C Z) to eliminate
(DIFFERENCE X C). We use the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to restrict the new variables. This produces the
following three new conjectures:
Case 55.3.
(IMPLIES (AND (NOT (NEGATIVEP A))
(NUMBERP C)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL A
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
This further simplifies, trivially, to:
T.
Case 55.2.
(IMPLIES (AND (LESSP X C)
(NUMBERP X)
(NUMBERP C)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(LESSP C X)
(NOT (EQUAL X 0)))
(NOT (EQUAL (MINUS X)
(MINUS (DIFFERENCE X C))))).
However this further simplifies, using linear arithmetic, to:
T.
Case 55.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS C Z) C))
(NUMBERP C)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(LESSP C (PLUS C Z))
(NOT (EQUAL (PLUS C Z) 0)))
(NOT (EQUAL (MINUS (PLUS C Z))
(MINUS Z)))),
which further simplifies, applying CORRECTNESS-OF-CANCEL-LESSP-PLUS,
EQUAL-PLUS-0, NEGATIVE-GUTS-MINUS, and CORRECTNESS-OF-CANCEL-EQUAL-PLUS,
and expanding FIX, ZEROP, and NOT, to:
T.
Case 54.(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
But this again simplifies, rewriting with the lemmas NEGATIVE-GUTS-MINUS and
MINUS-EQUAL, to the formula:
(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
(DIFFERENCE (NEGATIVE-GUTS A) C)))).
This again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS A) C)
(NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
(DIFFERENCE (NEGATIVE-GUTS A) C)))).
This again simplifies, using linear arithmetic, to:
T.
Case 53.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))),
which again simplifies, obviously, to:
T.
Case 52.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
But this again simplifies, rewriting with MINUS-NEGATIVE-GUTS,
NEGATIVE-GUTS-MINUS, and CORRECTNESS-OF-CANCEL-EQUAL-PLUS, and expanding the
functions LESSP, DIFFERENCE, and FIX, to:
T.
Case 51.(IMPLIES (AND (NUMBERP C)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(NOT (EQUAL B
(DIFFERENCE C (NEGATIVE-GUTS A))))).
This again simplifies, trivially, to:
T.
Case 50.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (EQUAL B 0))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(NOT (EQUAL B
(DIFFERENCE C (NEGATIVE-GUTS A))))).
This again simplifies, obviously, to:
T.
Case 49.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C)))).
This again simplifies, obviously, to:
T.
Case 48.(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 47.(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C)))),
which again simplifies, using linear arithmetic, to:
T.
Case 46.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C)))),
which again simplifies, obviously, to:
T.
Case 45.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 44.(IMPLIES (AND (NUMBERP C)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (EQUAL B
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)),
which again simplifies, clearly, to:
T.
Case 43.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (EQUAL B
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
This again simplifies, clearly, to:
T.
Case 42.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
This again simplifies, obviously, to:
T.
Case 41.(IMPLIES (AND (NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
This again simplifies, applying PLUS-ZERO-ARG2 and MINUS-NEGATIVE-GUTS, and
opening up the definitions of NEGATIVEP, EQUAL, LESSP, ZEROP, and DIFFERENCE,
to:
T.
Case 40.(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
This again simplifies, clearly, to:
T.
Case 39.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(EQUAL B 0)
(NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
This again simplifies, trivially, to:
T.
Case 38.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
This again simplifies, rewriting with PLUS-ZERO-ARG2 and MINUS-NEGATIVE-GUTS,
and opening up the functions LESSP, ZEROP, DIFFERENCE, and EQUAL, to:
T.
Case 37.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B 0)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (EQUAL (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
This again simplifies, obviously, to:
T.
Case 36.(IMPLIES (AND (NUMBERP C)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (EQUAL B
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)).
This again simplifies, obviously, to:
T.
Case 35.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (EQUAL B
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)).
This again simplifies, clearly, to:
T.
Case 34.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C))
(NEGATIVEP B))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
T)).
This again simplifies, trivially, to:
T.
Case 33.(IMPLIES (AND (NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C)))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
T)).
But this again simplifies, rewriting with PLUS-ZERO-ARG2, and expanding the
definitions of NEGATIVEP, EQUAL, DIFFERENCE, and ZEROP, to:
(IMPLIES (AND (NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NEGATIVEP A))
(NUMBERP A)
(EQUAL A 0))
(EQUAL 0 A)),
which again simplifies, trivially, to:
T.
Case 32.(IMPLIES (AND (NUMBERP C)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C)))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
T)).
This again simplifies, obviously, to:
T.
Case 31.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NEGATIVEP B))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
T)).
This again simplifies, trivially, to:
T.
Case 30.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NEGATIVEP A)))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
T)).
This again simplifies, applying the lemma PLUS-ZERO-ARG2, and expanding the
definitions of EQUAL, DIFFERENCE, and ZEROP, to:
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NEGATIVEP A))
(NUMBERP A)
(EQUAL A 0))
(EQUAL 0 A)).
This again simplifies, clearly, to:
T.
Case 29.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL B 0)
(NOT (NEGATIVEP A)))
(EQUAL (EQUAL (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
T)).
This again simplifies, obviously, to:
T.
Case 28.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (EQUAL 0
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)).
This again simplifies, trivially, to:
T.
Case 27.(IMPLIES (AND (NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (EQUAL 0
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)).
But this again simplifies, opening up NEGATIVEP, DIFFERENCE, and EQUAL, to:
T.
Case 26.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (EQUAL 0
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)),
which again simplifies, obviously, to:
T.
Case 25.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (EQUAL 0
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)).
However this again simplifies, using linear arithmetic, applying
DIFFERENCE-LEQ-ARG1, and unfolding EQUAL, to:
T.
Case 24.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
This again simplifies, opening up the definition of EQUAL, to:
T.
Case 23.(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)),
which again simplifies, appealing to the lemma MINUS-NEGATIVE-GUTS, and
opening up NEGATIVEP, EQUAL, LESSP, and DIFFERENCE, to:
T.
Case 22.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)),
which again simplifies, applying MINUS-NEGATIVE-GUTS, and opening up LESSP,
NEGATIVEP, EQUAL, and DIFFERENCE, to:
T.
Case 21.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A)))
(EQUAL (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)).
However this again simplifies, appealing to the lemma MINUS-NEGATIVE-GUTS,
and opening up the definitions of LESSP, DIFFERENCE, and EQUAL, to:
T.
Case 20.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)),
which again simplifies, unfolding the function EQUAL, to:
T.
Case 19.(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)),
which again simplifies, using linear arithmetic, applying
DIFFERENCE-LEQ-ARG1, and unfolding the functions NEGATIVEP, LESSP,
DIFFERENCE, and EQUAL, to:
T.
Case 18.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)).
However this again simplifies, using linear arithmetic, rewriting with
DIFFERENCE-LEQ-ARG1, and opening up the definitions of NEGATIVEP, EQUAL,
LESSP, and DIFFERENCE, to:
T.
Case 17.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)).
However this again simplifies, using linear arithmetic, rewriting with
DIFFERENCE-LEQ-ARG1, and unfolding LESSP and EQUAL, to:
T.
Case 16.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(EQUAL B C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C))
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (PLUS A B) (PLUS A C))
T)).
But this again simplifies, unfolding the function EQUAL, to:
T.
Case 15.(IMPLIES (AND (NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(EQUAL 0 C)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C)))
(EQUAL (EQUAL (PLUS A B) (PLUS A C))
T)),
which again simplifies, applying PLUS-ZERO-ARG2, and opening up NEGATIVEP,
ZEROP, and EQUAL, to:
T.
Case 14.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(EQUAL B 0)
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP B)))
(EQUAL (EQUAL (PLUS A B) (PLUS A C))
T)).
This again simplifies, rewriting with PLUS-ZERO-ARG2, and expanding the
definitions of NEGATIVEP, ZEROP, and EQUAL, to:
T.
Case 13.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (NEGATIVEP A)))
(EQUAL (EQUAL (PLUS A B) (PLUS A C))
T)).
However this again simplifies, rewriting with PLUS-ZERO-ARG2, and unfolding
the functions ZEROP and EQUAL, to:
T.
Case 12.(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
This again simplifies, rewriting with MINUS-NEGATIVE-GUTS and
NEGATIVE-GUTS-MINUS, and opening up the definitions of LESSP and DIFFERENCE,
to:
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
A))),
which again simplifies, clearly, to:
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
A))).
Applying the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, replace A by
(MINUS X) to eliminate (NEGATIVE-GUTS A) and X by (PLUS B Z) to eliminate
(DIFFERENCE X B). We employ the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to restrict the new variables. We would thus like
to prove the following three new conjectures:
Case 12.3.
(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
A))).
This further simplifies, obviously, to:
T.
Case 12.2.
(IMPLIES (AND (LESSP X B)
(NUMBERP X)
(NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (EQUAL X 0))
(LESSP B X))
(NOT (EQUAL (MINUS (DIFFERENCE X B))
(MINUS X)))).
However this further simplifies, using linear arithmetic, to:
T.
Case 12.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS B Z) B))
(NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (EQUAL (PLUS B Z) 0))
(LESSP B (PLUS B Z)))
(NOT (EQUAL (MINUS Z)
(MINUS (PLUS B Z))))),
which further simplifies, rewriting with CORRECTNESS-OF-CANCEL-LESSP-PLUS,
EQUAL-PLUS-0, NEGATIVE-GUTS-MINUS, and CORRECTNESS-OF-CANCEL-EQUAL-PLUS,
and unfolding the functions FIX, ZEROP, and NOT, to:
T.
Case 11.(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
But this again simplifies, rewriting with MINUS-NEGATIVE-GUTS and
NEGATIVE-GUTS-MINUS, and expanding the functions LESSP and DIFFERENCE, to:
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL A
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))),
which again simplifies, obviously, to:
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL A
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
Applying the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, replace A by
(MINUS X) to eliminate (NEGATIVE-GUTS A) and X by (PLUS C Z) to eliminate
(DIFFERENCE X C). We rely upon the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to restrict the new variables. This produces the
following three new conjectures:
Case 11.3.
(IMPLIES (AND (NOT (NEGATIVEP A))
(NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (EQUAL A
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))).
This further simplifies, obviously, to:
T.
Case 11.2.
(IMPLIES (AND (LESSP X C)
(NUMBERP X)
(NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(LESSP C X)
(NOT (EQUAL X 0)))
(NOT (EQUAL (MINUS X)
(MINUS (DIFFERENCE X C))))).
But this further simplifies, using linear arithmetic, to:
T.
Case 11.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS C Z) C))
(NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(LESSP C (PLUS C Z))
(NOT (EQUAL (PLUS C Z) 0)))
(NOT (EQUAL (MINUS (PLUS C Z))
(MINUS Z)))),
which further simplifies, rewriting with the lemmas
CORRECTNESS-OF-CANCEL-LESSP-PLUS, EQUAL-PLUS-0, NEGATIVE-GUTS-MINUS, and
CORRECTNESS-OF-CANCEL-EQUAL-PLUS, and opening up FIX, ZEROP, and NOT, to:
T.
Case 10.(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(LESSP C (NEGATIVE-GUTS A))
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C))))),
which again simplifies, applying NEGATIVE-GUTS-MINUS and MINUS-EQUAL, to:
(IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS A) B)
(DIFFERENCE (NEGATIVE-GUTS A) C)))),
which again simplifies, using linear arithmetic, to two new conjectures:
Case 10.2.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS A) B)
(NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS A) B)
(DIFFERENCE (NEGATIVE-GUTS A) C)))),
which again simplifies, using linear arithmetic, to:
T.
Case 10.1.
(IMPLIES (AND (LESSP (NEGATIVE-GUTS A) C)
(NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (DIFFERENCE (NEGATIVE-GUTS A) B)
(DIFFERENCE (NEGATIVE-GUTS A) C)))),
which again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A))))),
which again simplifies, using linear arithmetic, appealing to the lemma
DIFFERENCE-LEQ-ARG1, and unfolding LESSP, EQUAL, and DIFFERENCE, to:
T.
Case 8. (IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A))))),
which again simplifies, using linear arithmetic, rewriting with
DIFFERENCE-LEQ-ARG1, and unfolding LESSP, EQUAL, and DIFFERENCE, to:
T.
Case 7. (IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (EQUAL (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL 0
(DIFFERENCE C (NEGATIVE-GUTS A))))),
which again simplifies, clearly, to:
T.
Case 5. (IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (EQUAL 0 C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A)))
(EQUAL (NEGATIVE-GUTS A) 0))
(NOT (EQUAL 0
(DIFFERENCE C (NEGATIVE-GUTS A))))).
But this again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NEGATIVEP A)
(NOT (NEGATIVEP C))
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL 0
(DIFFERENCE C (NEGATIVE-GUTS A))))),
which again simplifies, obviously, to:
T.
Case 3. (IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP B)))
(NOT (EQUAL (PLUS A B) (PLUS A C)))).
But this again simplifies, rewriting with the lemma PLUS-ZERO-ARG2, and
unfolding the definition of ZEROP, to two new conjectures:
Case 3.2.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(NOT (EQUAL (PLUS A B) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.1.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP C))
(NUMBERP B)
(NOT (EQUAL B 0))
(NOT (NEGATIVEP A))
(NUMBERP A))
(NOT (EQUAL (PLUS A B) A))),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C)))
(NOT (EQUAL (PLUS A B) (PLUS A C)))),
which again simplifies, rewriting with PLUS-ZERO-ARG2, and expanding ZEROP,
to the following two new conjectures:
Case 2.2.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(NOT (EQUAL 0 (PLUS A C)))).
This again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NUMBERP C)
(NOT (NUMBERP B))
(NOT (NEGATIVEP B))
(NOT (EQUAL 0 C))
(NOT (NEGATIVEP A))
(NUMBERP A))
(NOT (EQUAL A (PLUS A C)))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NUMBERP C)
(NUMBERP B)
(NOT (EQUAL B C))
(NOT (NEGATIVEP A))
(NOT (NEGATIVEP C))
(NOT (NEGATIVEP B)))
(NOT (EQUAL (PLUS A B) (PLUS A C)))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.8 0.5 ]
IPLUS-CANCELLATION-1
(LEMMA IPLUS-CANCELLATION-2
(REWRITE)
(EQUAL (EQUAL (IPLUS B A) (IPLUS C A))
(EQUAL (FIX-INT B) (FIX-INT C)))
((USE (IPLUS-CANCELLATION-1))
(ENABLE COMMUTATIVITY-OF-IPLUS)))
This conjecture simplifies, appealing to the lemma COMMUTATIVITY-OF-IPLUS, and
opening up EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-CANCELLATION-2
(LEMMA IPLUS-INEG1
(REWRITE)
(EQUAL (IPLUS (INEG A) A) 0)
((ENABLE IPLUS INEG INTEGERP FIX-INT)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed IPLUS-INEG1 could!
This simplifies, unfolding INEG, to four new formulas:
Case 4. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(EQUAL (IPLUS 0 A) 0)),
which again simplifies, unfolding PLUS, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 3. (IMPLIES (AND (NOT (NEGATIVEP A)) (EQUAL A 0))
(EQUAL (IPLUS 0 A) 0)),
which again simplifies, expanding the functions NEGATIVEP, PLUS, IPLUS, and
EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (EQUAL A 0))
(NUMBERP A))
(EQUAL (IPLUS (MINUS A) A) 0)),
which again simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
unfolding the function IPLUS, to two new formulas:
Case 2.2.
(IMPLIES (AND (NOT (EQUAL A 0)) (NUMBERP A))
(EQUAL (DIFFERENCE A A) 0)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP A A)
(NOT (EQUAL A 0))
(NUMBERP A))
(EQUAL (DIFFERENCE A A) 0)).
This again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL A 0)) (NUMBERP A))
(NOT (LESSP A A))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (NEGATIVEP A)
(EQUAL (IPLUS (NEGATIVE-GUTS A) A)
0)),
which again simplifies, opening up IPLUS, to two new conjectures:
Case 1.2.
(IMPLIES (NEGATIVEP A)
(EQUAL (DIFFERENCE (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A))
0)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A))
(NEGATIVEP A))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A))
0)).
This again simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (NEGATIVEP A)
(NOT (LESSP (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A)))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-INEG1
(LEMMA IPLUS-INEG2
(REWRITE)
(EQUAL (IPLUS A (INEG A)) 0)
((ENABLE IPLUS INEG INTEGERP FIX-INT)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed IPLUS-INEG2 could!
This simplifies, unfolding INEG, to four new formulas:
Case 4. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(EQUAL (IPLUS A 0) 0)),
which again simplifies, unfolding PLUS, NUMBERP, NEGATIVEP, IPLUS, and EQUAL,
to:
T.
Case 3. (IMPLIES (AND (NOT (NEGATIVEP A)) (EQUAL A 0))
(EQUAL (IPLUS A 0) 0)),
which again simplifies, expanding the functions NEGATIVEP, PLUS, IPLUS, and
EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (EQUAL A 0))
(NUMBERP A))
(EQUAL (IPLUS A (MINUS A)) 0)),
which again simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
unfolding the function IPLUS, to two new formulas:
Case 2.2.
(IMPLIES (AND (NOT (EQUAL A 0)) (NUMBERP A))
(EQUAL (DIFFERENCE A A) 0)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP A A)
(NOT (EQUAL A 0))
(NUMBERP A))
(EQUAL (DIFFERENCE A A) 0)).
This again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL A 0)) (NUMBERP A))
(NOT (LESSP A A))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (NEGATIVEP A)
(EQUAL (IPLUS A (NEGATIVE-GUTS A))
0)),
which again simplifies, opening up IPLUS, to two new conjectures:
Case 1.2.
(IMPLIES (NEGATIVEP A)
(EQUAL (DIFFERENCE (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A))
0)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A))
(NEGATIVEP A))
(EQUAL (DIFFERENCE (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A))
0)).
This again simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (NEGATIVEP A)
(NOT (LESSP (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A)))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-INEG2
(LEMMA IPLUS-FIX-INT1
(REWRITE)
(EQUAL (IPLUS (FIX-INT A) B)
(IPLUS A B))
((ENABLE IPLUS FIX-INT INTEGERP PLUS-ZERO-ARG2)
(DO-NOT-INDUCT T)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed IPLUS-FIX-INT1 could!
This conjecture simplifies, appealing to the lemma MINUS-NEGATIVE-GUTS, and
expanding the functions INTEGERP, FIX-INT, PLUS, EQUAL, and IPLUS, to the
following 17 new goals:
Case 17.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(NUMBERP A))
(EQUAL (IPLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS B)))).
This again simplifies, unfolding the definition of IPLUS, to:
T.
Case 16.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(NOT (NUMBERP A)))
(EQUAL (IPLUS 0 B)
(DIFFERENCE A (NEGATIVE-GUTS B)))),
which again simplifies, unfolding the definitions of LESSP, DIFFERENCE,
NEGATIVEP, IPLUS, and EQUAL, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B))
(NUMBERP A))
(EQUAL (IPLUS A B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))),
which again simplifies, unfolding the definition of IPLUS, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B))
(NOT (NUMBERP A)))
(EQUAL (IPLUS 0 B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))),
which again simplifies, rewriting with the lemma MINUS-NEGATIVE-GUTS, and
unfolding LESSP, DIFFERENCE, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(NUMBERP A))
(EQUAL (IPLUS A B) (PLUS A B))),
which again simplifies, opening up the function IPLUS, to:
T.
Case 12.(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(NOT (NUMBERP A)))
(EQUAL (IPLUS 0 B) (PLUS A B))),
which again simplifies, unfolding the functions PLUS, EQUAL, NEGATIVEP, and
IPLUS, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (IPLUS A B)
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))))),
which again simplifies, unfolding IPLUS, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0)
(NUMBERP A))
(EQUAL (IPLUS A B) 0)),
which again simplifies, clearly, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NUMBERP A)))
(EQUAL (IPLUS 0 B) 0)).
This again simplifies, unfolding DIFFERENCE, LESSP, NEGATIVEP, IPLUS, and
EQUAL, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NUMBERP A))
(EQUAL (IPLUS A B) B)),
which again simplifies, clearly, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(NOT (NUMBERP A)))
(EQUAL (IPLUS 0 B) B)).
This again simplifies, applying MINUS-NEGATIVE-GUTS, and opening up the
functions DIFFERENCE, LESSP, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A)))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (IPLUS A B)
(DIFFERENCE B (NEGATIVE-GUTS A)))).
But this again simplifies, expanding the function IPLUS, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A)))
(NUMBERP A))
(EQUAL (IPLUS A B)
(DIFFERENCE B (NEGATIVE-GUTS A)))),
which again simplifies, trivially, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A)))
(NOT (NUMBERP A))
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (IPLUS 0 B)
(DIFFERENCE B (NEGATIVE-GUTS A)))).
But this again simplifies, unfolding EQUAL, LESSP, PLUS, NEGATIVEP, IPLUS,
and DIFFERENCE, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (IPLUS A B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))),
which again simplifies, opening up the function IPLUS, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A))
(NUMBERP A))
(EQUAL (IPLUS A B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))),
which again simplifies, trivially, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A))
(NOT (NUMBERP A))
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (IPLUS 0 B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))).
However this again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-FIX-INT1
(LEMMA IPLUS-FIX-INT2
(REWRITE)
(EQUAL (IPLUS A (FIX-INT B))
(IPLUS A B))
((ENABLE IPLUS FIX-INT INTEGERP PLUS-ZERO-ARG2)
(DO-NOT-INDUCT T)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed IPLUS-FIX-INT2 could!
This conjecture simplifies, appealing to the lemma MINUS-NEGATIVE-GUTS, and
expanding the functions INTEGERP, FIX-INT, PLUS, EQUAL, and IPLUS, to the
following 18 new goals:
Case 18.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (IPLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS B)))).
This again simplifies, unfolding the definition of IPLUS, to:
T.
Case 17.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(NUMBERP B))
(EQUAL (IPLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS B)))),
which again simplifies, obviously, to:
T.
Case 16.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (LESSP A (NEGATIVE-GUTS B)))
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (IPLUS A 0)
(DIFFERENCE A (NEGATIVE-GUTS B)))).
This again simplifies, rewriting with PLUS-ZERO-ARG2, and expanding the
definitions of EQUAL, LESSP, ZEROP, NEGATIVEP, IPLUS, and DIFFERENCE, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B))
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (IPLUS A B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))).
But this again simplifies, unfolding IPLUS, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B))
(NUMBERP B))
(EQUAL (IPLUS A B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))),
which again simplifies, trivially, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(LESSP A (NEGATIVE-GUTS B))
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (IPLUS A 0)
(MINUS (DIFFERENCE (NEGATIVE-GUTS B) A)))).
However this again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(NUMBERP B))
(EQUAL (IPLUS A B) (PLUS A B))),
which again simplifies, expanding the function IPLUS, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(NOT (NUMBERP B)))
(EQUAL (IPLUS A 0) (PLUS A B))),
which again simplifies, applying PLUS-ZERO-ARG2, and opening up the
definitions of ZEROP, NEGATIVEP, and IPLUS, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (IPLUS A B)
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))))).
This again simplifies, unfolding IPLUS, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NUMBERP B))
(EQUAL (IPLUS A B)
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))))),
which again simplifies, clearly, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (IPLUS A 0)
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))))).
This again simplifies, applying MINUS-NEGATIVE-GUTS and PLUS-ZERO-ARG2, and
opening up the functions DIFFERENCE, LESSP, EQUAL, NEGATIVEP, IPLUS, and
ZEROP, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0)
(NUMBERP B))
(EQUAL (IPLUS A B) 0)).
This again simplifies, clearly, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0)
(NOT (NUMBERP B)))
(EQUAL (IPLUS A 0) 0)).
This again simplifies, opening up the functions DIFFERENCE, LESSP, NEGATIVEP,
IPLUS, and EQUAL, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (IPLUS A B) B)),
which again simplifies, rewriting with MINUS-NEGATIVE-GUTS, and unfolding
the definitions of PLUS, EQUAL, and IPLUS, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A)))
(NUMBERP B))
(EQUAL (IPLUS A B)
(DIFFERENCE B (NEGATIVE-GUTS A)))).
But this again simplifies, opening up the function IPLUS, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (LESSP B (NEGATIVE-GUTS A)))
(NOT (NUMBERP B)))
(EQUAL (IPLUS A 0)
(DIFFERENCE B (NEGATIVE-GUTS A)))),
which again simplifies, unfolding LESSP, DIFFERENCE, NEGATIVEP, IPLUS, and
EQUAL, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A))
(NUMBERP B))
(EQUAL (IPLUS A B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))),
which again simplifies, expanding the function IPLUS, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(LESSP B (NEGATIVE-GUTS A))
(NOT (NUMBERP B)))
(EQUAL (IPLUS A 0)
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) B)))),
which again simplifies, applying MINUS-NEGATIVE-GUTS, and expanding the
functions LESSP, DIFFERENCE, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-FIX-INT2
(LEMMA IDIFFERENCE-FIX-INT1
(REWRITE)
(EQUAL (IDIFFERENCE (FIX-INT A) B)
(IDIFFERENCE A B))
((ENABLE IDIFFERENCE IPLUS-FIX-INT1)
(DO-NOT-INDUCT T)))
WARNING: Note that the rewrite rule IDIFFERENCE-FIX-INT1 will be stored so as
to apply only to terms with the nonrecursive function symbol IDIFFERENCE.
This formula can be simplified, using the abbreviations IPLUS-FIX-INT1 and
IDIFFERENCE, to the new conjecture:
(EQUAL (IPLUS A (INEG B))
(IPLUS A (INEG B))),
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IDIFFERENCE-FIX-INT1
(LEMMA IDIFFERENCE-FIX-INT2
(REWRITE)
(EQUAL (IDIFFERENCE A (FIX-INT B))
(IDIFFERENCE A B))
((ENABLE IDIFFERENCE IPLUS-FIX-INT2 INEG-FIX-INT)
(DO-NOT-INDUCT T)))
WARNING: Note that the rewrite rule IDIFFERENCE-FIX-INT2 will be stored so as
to apply only to terms with the nonrecursive function symbol IDIFFERENCE.
This formula can be simplified, using the abbreviations INEG-FIX-INT and
IDIFFERENCE, to the new conjecture:
(EQUAL (IPLUS A (INEG B))
(IPLUS A (INEG B))),
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IDIFFERENCE-FIX-INT2
(DEFN CANCEL-INEG-AUX
(X Y)
(COND ((LISTP X)
(COND ((EQUAL (CAR X) 'INEG)
(COND ((EQUAL Y (CADR X)) ''0)
((LISTP Y)
(IF (EQUAL (CAR Y) 'IPLUS)
(COND ((EQUAL (CADR Y) (CADR X))
(LIST 'FIX-INT (CADDR Y)))
((CANCEL-INEG-AUX X (CADDR Y))
(LIST 'IPLUS
(CADR Y)
(CANCEL-INEG-AUX X (CADDR Y))))
(T F))
F))
(T F)))
((NLISTP Y) F)
((EQUAL (CAR Y) 'INEG)
(IF (EQUAL X (CADR Y)) ''0 F))
((EQUAL (CAR Y) 'IPLUS)
(COND ((LISTP (CADR Y))
(COND ((EQUAL (CAADR Y) 'INEG)
(COND ((EQUAL X (CADADR Y))
(LIST 'FIX-INT (CADDR Y)))
((CANCEL-INEG-AUX X (CADDR Y))
(LIST 'IPLUS
(CADR Y)
(CANCEL-INEG-AUX X (CADDR Y))))
(T F)))
((CANCEL-INEG-AUX X (CADDR Y))
(LIST 'IPLUS
(CADR Y)
(CANCEL-INEG-AUX X (CADDR Y))))
(T F)))
((CANCEL-INEG-AUX X (CADDR Y))
(LIST 'IPLUS
(CADR Y)
(CANCEL-INEG-AUX X (CADDR Y))))
(T F)))
(T F)))
((NLISTP Y) F)
((EQUAL (CAR Y) 'INEG)
(IF (EQUAL X (CADR Y)) ''0 F))
((EQUAL (CAR Y) 'IPLUS)
(COND ((LISTP (CADR Y))
(COND ((EQUAL (CAADR Y) 'INEG)
(COND ((EQUAL X (CADADR Y))
(LIST 'FIX-INT (CADDR Y)))
((CANCEL-INEG-AUX X (CADDR Y))
(LIST 'IPLUS
(CADR Y)
(CANCEL-INEG-AUX X (CADDR Y))))
(T F)))
((CANCEL-INEG-AUX X (CADDR Y))
(LIST 'IPLUS
(CADR Y)
(CANCEL-INEG-AUX X (CADDR Y))))
(T F)))
((CANCEL-INEG-AUX X (CADDR Y))
(LIST 'IPLUS
(CADR Y)
(CANCEL-INEG-AUX X (CADDR Y))))
(T F)))
(T F)))
Linear arithmetic, the lemmas CAR-LESSEQP, CDR-LESSEQP, and CDR-LESSP,
and the definitions of EQUAL and NLISTP inform us that the measure (COUNT Y)
decreases according to the well-founded relation LESSP in each recursive call.
Hence, CANCEL-INEG-AUX is accepted under the principle of definition. From
the definition we can conclude that:
(OR (FALSEP (CANCEL-INEG-AUX X Y))
(LISTP (CANCEL-INEG-AUX X Y)))
is a theorem.
[ 0.0 0.1 0.0 ]
CANCEL-INEG-AUX
(DEFN CANCEL-INEG
(X)
(IF (LISTP X)
(IF (EQUAL (CAR X) 'IPLUS)
(IF (CANCEL-INEG-AUX (CADR X) (CADDR X))
(CANCEL-INEG-AUX (CADR X) (CADDR X))
X)
X)
X))
Note that (OR (LISTP (CANCEL-INEG X)) (EQUAL (CANCEL-INEG X) X)) is a
theorem.
[ 0.0 0.0 0.0 ]
CANCEL-INEG
(PROVE-LEMMA EVAL$-LIST-CONS
(REWRITE)
(EQUAL (EVAL$ 'LIST (CONS X Y) A)
(CONS (EVAL$ T X A)
(EVAL$ 'LIST Y A))))
This conjecture simplifies, applying CDR-CONS and CAR-CONS, and opening up the
definitions of EQUAL and EVAL$, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-LIST-CONS
(PROVE-LEMMA EVAL$-LIST-NLISTP
(REWRITE)
(IMPLIES (NLISTP X)
(EQUAL (EVAL$ 'LIST X A) NIL)))
This conjecture can be simplified, using the abbreviations NLISTP and IMPLIES,
to:
(IMPLIES (NOT (LISTP X))
(EQUAL (EVAL$ 'LIST X A) NIL)).
This simplifies, expanding EQUAL and EVAL$, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-LIST-NLISTP
(PROVE-LEMMA EVAL$-LITATOM
(REWRITE)
(IMPLIES (LITATOM X)
(EQUAL (EVAL$ T X A)
(CDR (ASSOC X A)))))
This conjecture simplifies, expanding the definitions of EQUAL and EVAL$, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-LITATOM
(ENABLE EVAL$-QUOTE)
[ 0.0 0.0 0.0 ]
EVAL$-QUOTE-ON
(PROVE-LEMMA EVAL$-OTHER
(REWRITE)
(IMPLIES (AND (NOT (LITATOM X)) (NLISTP X))
(EQUAL (EVAL$ T X A) X)))
This formula can be simplified, using the abbreviations NLISTP, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (NOT (LITATOM X))
(NOT (LISTP X)))
(EQUAL (EVAL$ T X A) X)),
which simplifies, unfolding the definitions of EQUAL and EVAL$, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-OTHER
(DISABLE EVAL$)
[ 0.0 0.0 0.0 ]
EVAL$-OFF
(DEFN EVAL$-CANCEL-INEG-AUX-FN
(X Y A)
(IF (AND (LISTP X) (EQUAL (CAR X) 'INEG))
(COND ((EQUAL Y (CADR X)) 0)
(T (LET ((Y1 (CADR Y)) (Y2 (CADDR Y)))
(IF (EQUAL Y1 (CADR X))
(FIX-INT (EVAL$ T Y2 A))
(IF (LISTP Y)
(IPLUS (EVAL$ T Y1 A)
(EVAL$-CANCEL-INEG-AUX-FN X Y2 A))
0)))))
(COND ((EQUAL (CAR Y) 'INEG) 0)
(T (LET ((Y1 (CADR Y)) (Y2 (CADDR Y)))
(IF (AND (LISTP Y1)
(EQUAL (CAR Y1) 'INEG)
(EQUAL X (CADR Y1)))
(FIX-INT (EVAL$ T Y2 A))
(IF (LISTP Y)
(IPLUS (EVAL$ T Y1 A)
(EVAL$-CANCEL-INEG-AUX-FN X Y2 A))
0)))))))
Linear arithmetic and the lemmas CAR-LESSEQP, CDR-LESSEQP, and CDR-LESSP
can be used to show that the measure (COUNT Y) decreases according to the
well-founded relation LESSP in each recursive call. Hence,
EVAL$-CANCEL-INEG-AUX-FN is accepted under the principle of definition.
[ 0.0 0.0 0.0 ]
EVAL$-CANCEL-INEG-AUX-FN
(PROVE-LEMMA EVAL$-CANCEL-INEG-AUX-IS-ITS-FN
(REWRITE)
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X Y) F))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))))
Call the conjecture *1.
We will appeal to induction. Three 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 (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(EQUAL Y (CADR X)))
(p X Y A))
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(EQUAL (CADR Y) (CADR X)))
(p X Y A))
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) (CADR X)))
(CANCEL-INEG-AUX X (CADDR Y))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) (CADR X)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'IPLUS)))
(p X Y A))
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(NOT (LISTP Y)))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NLISTP Y))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(EQUAL (CAR Y) 'INEG)
(EQUAL X (CADR Y)))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(EQUAL (CAR Y) 'INEG)
(NOT (EQUAL X (CADR Y))))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(EQUAL X (CADADR Y)))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX X (CADDR Y))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(NOT (EQUAL (CAR Y) 'IPLUS)))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X)) (NLISTP Y))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(EQUAL (CAR Y) 'INEG)
(EQUAL X (CADR Y)))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(EQUAL (CAR Y) 'INEG)
(NOT (EQUAL X (CADR Y))))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(EQUAL X (CADADR Y)))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX X (CADDR Y))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(p X (CADDR Y) A))
(p X Y A))
(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(NOT (EQUAL (CAR Y) 'IPLUS)))
(p X Y A))).
Linear arithmetic, the lemmas CAR-LESSEQP, CDR-LESSEQP, and CDR-LESSP, and the
definitions of EQUAL and NLISTP inform us that the measure (COUNT Y) decreases
according to the well-founded relation LESSP in each induction step of the
scheme. The above induction scheme leads to the following 28 new conjectures:
Case 28.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(EQUAL Y (CADR X))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, rewriting with EVAL$-QUOTE, and opening up the functions
EQUAL, CANCEL-INEG-AUX, CAR, and EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 27.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(EQUAL (CADR Y) (CADR X))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, rewriting with REWRITE-EVAL$ and CAR-CONS, and opening up
the definitions of CANCEL-INEG-AUX, EQUAL, and EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 26.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) (CADR X)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$ T
(CANCEL-INEG-AUX X (CADDR Y))
A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, appealing to the lemmas REWRITE-EVAL$, CAR-CONS, and
CDR-CONS, and unfolding CANCEL-INEG-AUX, EQUAL, and EVAL$-CANCEL-INEG-AUX-FN,
to:
T.
Case 25.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) (CADR X)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, expanding the definitions of CANCEL-INEG-AUX and EQUAL, to:
T.
Case 24.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'IPLUS))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, opening up the definitions of CANCEL-INEG-AUX and EQUAL, to:
T.
Case 23.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(NOT (LISTP Y))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, opening up CANCEL-INEG-AUX and EQUAL, to:
T.
Case 22.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NLISTP Y)
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, expanding the definitions of NLISTP and CANCEL-INEG-AUX, to:
T.
Case 21.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(EQUAL (CAR Y) 'INEG)
(EQUAL X (CADR Y))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, applying EVAL$-QUOTE, and expanding the definitions of
NLISTP, EQUAL, CANCEL-INEG-AUX, CAR, and EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 20.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(EQUAL (CAR Y) 'INEG)
(NOT (EQUAL X (CADR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, opening up the functions NLISTP, CANCEL-INEG-AUX, and
EQUAL, to:
T.
Case 19.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(EQUAL X (CADADR Y))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, applying REWRITE-EVAL$ and CAR-CONS, and unfolding the
definitions of NLISTP, EQUAL, CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN,
to:
T.
Case 18.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$ T
(CANCEL-INEG-AUX X (CADDR Y))
A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, applying REWRITE-EVAL$, CAR-CONS, and CDR-CONS, and
unfolding the definitions of NLISTP, EQUAL, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 17.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, unfolding NLISTP, EQUAL, and CANCEL-INEG-AUX, to:
T.
Case 16.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$ T
(CANCEL-INEG-AUX X (CADDR Y))
A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, applying REWRITE-EVAL$, CAR-CONS, and CDR-CONS, and
opening up NLISTP, EQUAL, CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 15.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, opening up NLISTP, EQUAL, and CANCEL-INEG-AUX, to:
T.
Case 14.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$ T
(CANCEL-INEG-AUX X (CADDR Y))
A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, and CDR-CONS, and
unfolding NLISTP, EQUAL, CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 13.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, unfolding the functions NLISTP, EQUAL, and CANCEL-INEG-AUX,
to:
T.
Case 12.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(NOT (EQUAL (CAR Y) 'IPLUS))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, opening up the definitions of NLISTP and CANCEL-INEG-AUX,
to:
T.
Case 11.(IMPLIES (AND (NOT (LISTP X))
(NLISTP Y)
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, opening up NLISTP and CANCEL-INEG-AUX, to:
T.
Case 10.(IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(EQUAL (CAR Y) 'INEG)
(EQUAL X (CADR Y))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, applying the lemma EVAL$-QUOTE, and expanding the
functions NLISTP, EQUAL, CANCEL-INEG-AUX, CAR, and EVAL$-CANCEL-INEG-AUX-FN,
to:
T.
Case 9. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(EQUAL (CAR Y) 'INEG)
(NOT (EQUAL X (CADR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, opening up the functions NLISTP, CANCEL-INEG-AUX, and
EQUAL, to:
T.
Case 8. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(EQUAL X (CADADR Y))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, applying REWRITE-EVAL$ and CAR-CONS, and unfolding the
functions NLISTP, EQUAL, CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 7. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$ T
(CANCEL-INEG-AUX X (CADDR Y))
A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, appealing to the lemmas REWRITE-EVAL$, CAR-CONS, and
CDR-CONS, and expanding the functions NLISTP, EQUAL, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 6. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, expanding the definitions of NLISTP, EQUAL, and
CANCEL-INEG-AUX, to:
T.
Case 5. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$ T
(CANCEL-INEG-AUX X (CADDR Y))
A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, appealing to the lemmas REWRITE-EVAL$, CAR-CONS, and
CDR-CONS, and expanding the functions NLISTP, EQUAL, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 4. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, opening up the functions NLISTP, EQUAL, and CANCEL-INEG-AUX,
to:
T.
Case 3. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$ T
(CANCEL-INEG-AUX X (CADDR Y))
A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))).
This simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, and CDR-CONS, and
expanding the functions NLISTP, EQUAL, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
T.
Case 2. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, opening up NLISTP, EQUAL, and CANCEL-INEG-AUX, to:
T.
Case 1. (IMPLIES (AND (NOT (LISTP X))
(NOT (NLISTP Y))
(NOT (EQUAL (CAR Y) 'INEG))
(NOT (EQUAL (CAR Y) 'IPLUS))
(CANCEL-INEG-AUX X Y))
(EQUAL (EVAL$ T (CANCEL-INEG-AUX X Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X Y A))),
which simplifies, opening up NLISTP and CANCEL-INEG-AUX, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.0 ]
EVAL$-CANCEL-INEG-AUX-IS-ITS-FN
(PROVE-LEMMA IPLUS-INEG3
(REWRITE)
(EQUAL (IPLUS (INEG X) (IPLUS X Y))
(FIX-INT Y))
((ENABLE-THEORY INTEGER-DEFNS)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed IPLUS-INEG3 could!
WARNING: the previously added lemma, COMMUTATIVITY2-OF-IPLUS, could be
applied whenever the newly proposed IPLUS-INEG3 could!
This conjecture simplifies, applying MINUS-NEGATIVE-GUTS, and unfolding the
functions INEG, PLUS, EQUAL, IPLUS, INTEGERP, and FIX-INT, to 34 new goals:
Case 34.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(EQUAL X 0))
(EQUAL (IPLUS 0
(DIFFERENCE X (NEGATIVE-GUTS Y)))
Y)),
which again simplifies, clearly, to:
T.
Case 33.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0
(DIFFERENCE X (NEGATIVE-GUTS Y)))
Y)).
This again simplifies, clearly, to:
T.
Case 32.(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(EQUAL X 0))
(EQUAL (IPLUS 0
(DIFFERENCE X (NEGATIVE-GUTS Y)))
Y)).
This again simplifies, using linear arithmetic, to:
T.
Case 31.(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0
(DIFFERENCE X (NEGATIVE-GUTS Y)))
Y)),
which again simplifies, opening up LESSP, to:
T.
Case 30.(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS (MINUS X)
(DIFFERENCE X (NEGATIVE-GUTS Y)))
Y)),
which again simplifies, using linear arithmetic, applying the lemmas
DIFFERENCE-DIFFERENCE-ARG1, DIFFERENCE-LEQ-ARG1, COMMUTATIVITY-OF-PLUS,
MINUS-NEGATIVE-GUTS, DIFFERENCE-DIFFERENCE-ARG2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and NEGATIVE-GUTS-MINUS, and opening
up FIX and IPLUS, to:
(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (EQUAL X 0))
(NUMBERP X))
(LESSP (DIFFERENCE X (NEGATIVE-GUTS Y))
X)).
However this again simplifies, using linear arithmetic, to:
T.
Case 29.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS (MINUS X)
(DIFFERENCE X (NEGATIVE-GUTS Y)))
Y)),
which again simplifies, obviously, to:
T.
Case 28.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(LESSP X (NEGATIVE-GUTS Y))
(EQUAL X 0))
(EQUAL (IPLUS 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
Y)).
This again simplifies, clearly, to:
T.
Case 27.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(LESSP X (NEGATIVE-GUTS Y))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
Y)).
This again simplifies, obviously, to:
T.
Case 26.(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(EQUAL X 0))
(EQUAL (IPLUS 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
Y)).
This again simplifies, appealing to the lemmas MINUS-NEGATIVE-GUTS,
FIX-INT-REMOVER, and IPLUS-0-LEFT, and expanding the functions NEGATIVEP,
EQUAL, LESSP, DIFFERENCE, and INTEGERP, to:
T.
Case 25.(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
Y)),
which again simplifies, appealing to the lemmas MINUS-NEGATIVE-GUTS,
FIX-INT-REMOVER, and IPLUS-0-LEFT, and opening up LESSP, DIFFERENCE, and
INTEGERP, to:
T.
Case 24.(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS (MINUS X)
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
Y)),
which again simplifies, appealing to the lemmas MINUS-NEGATIVE-GUTS,
PLUS-DIFFERENCE-ARG2, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and
NEGATIVE-GUTS-MINUS, and opening up FIX and IPLUS, to:
T.
Case 23.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(LESSP X (NEGATIVE-GUTS Y))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS (MINUS X)
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
Y)),
which again simplifies, clearly, to:
T.
Case 22.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0 (PLUS X Y)) Y)).
But this again simplifies, applying the lemmas FIX-INT-REMOVER and
IPLUS-0-LEFT, and unfolding the definitions of PLUS and INTEGERP, to:
T.
Case 21.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(EQUAL X 0))
(EQUAL (IPLUS 0 (PLUS X Y)) Y)),
which again simplifies, applying FIX-INT-REMOVER and IPLUS-0-LEFT, and
opening up the definitions of NEGATIVEP, EQUAL, PLUS, and INTEGERP, to:
T.
Case 20.(IMPLIES (AND (NUMBERP Y)
(NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS (MINUS X) (PLUS X Y))
Y)).
However this again simplifies, applying
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, CORRECTNESS-OF-CANCEL-LESSP-PLUS, and
NEGATIVE-GUTS-MINUS, and unfolding FIX and IPLUS, to:
T.
Case 19.(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (IPLUS (NEGATIVE-GUTS X)
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
Y)).
But this again simplifies, applying the lemmas MINUS-NEGATIVE-GUTS,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, CORRECTNESS-OF-CANCEL-LESSP-PLUS, and
NEGATIVE-GUTS-MINUS, and expanding the functions NOT, ZEROP, FIX, and IPLUS,
to:
T.
Case 18.(IMPLIES (AND (NUMBERP Y)
(NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (IPLUS (NEGATIVE-GUTS X)
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
Y)),
which again simplifies, clearly, to:
T.
Case 17.(IMPLIES (AND (NUMBERP Y)
(NEGATIVEP X)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (IPLUS (NEGATIVE-GUTS X) 0)
Y)).
This again simplifies, obviously, to:
T.
Case 16.(IMPLIES (AND (NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (IPLUS (NEGATIVE-GUTS X) Y)
Y)).
This again simplifies, applying FIX-INT-REMOVER and IPLUS-0-LEFT, and
expanding the definition of INTEGERP, to:
T.
Case 15.(IMPLIES (AND (NUMBERP Y)
(NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS X))))
(EQUAL (IPLUS (NEGATIVE-GUTS X)
(DIFFERENCE Y (NEGATIVE-GUTS X)))
Y)).
However this again simplifies, rewriting with PLUS-DIFFERENCE-ARG2,
PLUS-ZERO-ARG2, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and
COMMUTATIVITY-OF-PLUS, and opening up the functions ZEROP, FIX, and IPLUS,
to:
(IMPLIES (AND (NUMBERP Y)
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X)))
(NOT (LESSP (NEGATIVE-GUTS X) Y)))
(EQUAL (NEGATIVE-GUTS X) Y)),
which again simplifies, using linear arithmetic, to:
T.
Case 14.(IMPLIES (AND (NUMBERP Y)
(NEGATIVEP X)
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS X)))
(EQUAL (IPLUS (NEGATIVE-GUTS X)
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y)))
Y)),
which again simplifies, using linear arithmetic, applying
DIFFERENCE-DIFFERENCE-ARG2, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS,
COMMUTATIVITY-OF-PLUS, DIFFERENCE-DIFFERENCE-ARG1, DIFFERENCE-LEQ-ARG1, and
NEGATIVE-GUTS-MINUS, and expanding the functions FIX, MINUS, and IPLUS, to
the following two new formulas:
Case 14.2.
(IMPLIES (AND (NUMBERP Y)
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X))
(LESSP (NEGATIVE-GUTS X) Y))
(EQUAL (NEGATIVE-GUTS X) Y)).
However this again simplifies, using linear arithmetic, to:
T.
Case 14.1.
(IMPLIES (AND (NUMBERP Y)
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X)))
(NOT (LESSP (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS X) Y)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS X) Y)
(NUMBERP Y)
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X)))
(NOT (LESSP (NEGATIVE-GUTS X)
(DIFFERENCE (NEGATIVE-GUTS X) Y)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 13.(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NOT (NEGATIVEP X))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0 (PLUS X Y)) 0)),
which again simplifies, rewriting with PLUS-ZERO-ARG2, and unfolding the
functions ZEROP, IPLUS, and EQUAL, to:
T.
Case 12.(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NOT (NEGATIVEP X))
(EQUAL X 0))
(EQUAL (IPLUS 0 (PLUS X Y)) 0)).
However this again simplifies, rewriting with PLUS-ZERO-ARG2, and opening up
the definitions of NEGATIVEP, ZEROP, NUMBERP, IPLUS, and EQUAL, to:
T.
Case 11.(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NOT (NEGATIVEP X))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS (MINUS X) (PLUS X Y))
0)).
But this again simplifies, rewriting with the lemmas PLUS-ZERO-ARG2,
DIFFERENCE-X-X, NEGATIVE-GUTS-MINUS, and COMMUTATIVITY-OF-IPLUS, and
expanding ZEROP, MINUS, and IPLUS, to the conjecture:
(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NOT (EQUAL X 0))
(NUMBERP X))
(NOT (LESSP X X))).
However this again simplifies, using linear arithmetic, to:
T.
Case 10.(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NEGATIVEP X)
(NOT (LESSP Y (NEGATIVE-GUTS X))))
(EQUAL (IPLUS (NEGATIVE-GUTS X)
(DIFFERENCE Y (NEGATIVE-GUTS X)))
0)),
which again simplifies, using linear arithmetic, appealing to the lemma
DIFFERENCE-LEQ-ARG1, and expanding the functions LESSP, IPLUS, and EQUAL, to:
T.
Case 9. (IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NEGATIVEP X)
(LESSP Y (NEGATIVE-GUTS X)))
(EQUAL (IPLUS (NEGATIVE-GUTS X)
(MINUS (DIFFERENCE (NEGATIVE-GUTS X) Y)))
0)),
which again simplifies, rewriting with MINUS-NEGATIVE-GUTS, DIFFERENCE-X-X,
and COMMUTATIVITY-OF-IPLUS, and opening up the functions LESSP, DIFFERENCE,
MINUS, and IPLUS, to:
(IMPLIES (AND (NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(NOT (LESSP (NEGATIVE-GUTS X)
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES (AND (NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0
(DIFFERENCE X (NEGATIVE-GUTS Y)))
0)),
which again simplifies, using linear arithmetic, applying
DIFFERENCE-LEQ-ARG1, and expanding the functions EQUAL, LESSP, and IPLUS, to:
T.
Case 7. (IMPLIES (AND (NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(EQUAL X 0))
(EQUAL (IPLUS 0
(DIFFERENCE X (NEGATIVE-GUTS Y)))
0)).
However this again simplifies, unfolding the functions NEGATIVEP, LESSP,
DIFFERENCE, IPLUS, and EQUAL, to:
T.
Case 6. (IMPLIES (AND (NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (NEGATIVEP X))
(NOT (LESSP X (NEGATIVE-GUTS Y)))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS (MINUS X)
(DIFFERENCE X (NEGATIVE-GUTS Y)))
0)),
which again simplifies, rewriting with the lemmas DIFFERENCE-X-X,
NEGATIVE-GUTS-MINUS, and COMMUTATIVITY-OF-IPLUS, and expanding EQUAL, LESSP,
DIFFERENCE, MINUS, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL X 0))
(NUMBERP X))
(NOT (LESSP X X))).
But this again simplifies, using linear arithmetic, to:
T.
Case 5. (IMPLIES (AND (NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (NUMBERP X)))
(EQUAL (IPLUS 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(EQUAL X 0))
(EQUAL (IPLUS 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (NEGATIVEP X))
(LESSP X (NEGATIVE-GUTS Y))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (IPLUS (MINUS X)
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) X)))
0)),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (IPLUS (NEGATIVE-GUTS X)
(MINUS (PLUS (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))))
0)),
which again simplifies, applying PLUS-ZERO-ARG2, MINUS-NEGATIVE-GUTS,
DIFFERENCE-X-X, and COMMUTATIVITY-OF-IPLUS, and opening up the definitions
of ZEROP, MINUS, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(NOT (LESSP (NEGATIVE-GUTS X)
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (IPLUS (NEGATIVE-GUTS X) 0)
0)),
which again simplifies, expanding IPLUS and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
IPLUS-INEG3
(PROVE-LEMMA IPLUS-INEG4
(REWRITE)
(EQUAL (IPLUS X (IPLUS (INEG X) Y))
(FIX-INT Y))
((USE (IPLUS-INEG3 (X (INEG X)) (Y Y)))))
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed IPLUS-INEG4 could!
WARNING: the previously added lemma, COMMUTATIVITY2-OF-IPLUS, could be
applied whenever the newly proposed IPLUS-INEG4 could!
This conjecture can be simplified, using the abbreviations IPLUS-FIX-INT1 and
INEG-INEG, to the formula:
T.
This simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-INEG4
(PROVE-LEMMA IPLUS-INEG-PROMOTE
(REWRITE)
(EQUAL (IPLUS Y (INEG X))
(IPLUS (INEG X) Y)))
WARNING: the newly proposed lemma, IPLUS-INEG-PROMOTE, could be applied
whenever the previously added lemma IPLUS-INEG2 could.
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed IPLUS-INEG-PROMOTE could!
This conjecture simplifies, applying COMMUTATIVITY-OF-IPLUS, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-INEG-PROMOTE
(PROVE-LEMMA IPLUS-X-Y-INEG-X
(REWRITE)
(EQUAL (IPLUS X (IPLUS Y (INEG X)))
(FIX-INT Y)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-IPLUS, could be applied
whenever the newly proposed IPLUS-X-Y-INEG-X could!
WARNING: the previously added lemma, COMMUTATIVITY2-OF-IPLUS, could be
applied whenever the newly proposed IPLUS-X-Y-INEG-X could!
This formula can be simplified, using the abbreviations IPLUS-INEG4 and
IPLUS-INEG-PROMOTE, to:
(EQUAL (FIX-INT Y) (FIX-INT Y)),
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-X-Y-INEG-X
(DISABLE IPLUS-INEG-PROMOTE)
[ 0.0 0.0 0.0 ]
IPLUS-INEG-PROMOTE-OFF
(PROVE-LEMMA CORRECTNESS-OF-CANCEL-INEG-AUX
(REWRITE)
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X Y) F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A))))
((INDUCT (CANCEL-INEG-AUX X Y))))
This conjecture can be simplified, using the abbreviations NLISTP, IMPLIES,
NOT, OR, and AND, to 28 new conjectures:
Case 28.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(EQUAL Y (CADR X))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, unfolding the functions EQUAL, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (LISTP X) (EQUAL (CAR X) 'INEG))
(EQUAL 0
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADR X) A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X) and V by (CONS W D) to eliminate (CAR V) and
(CDR V). We must thus prove two new goals:
Case 28.2.
(IMPLIES (AND (NOT (LISTP V)) (EQUAL Z 'INEG))
(EQUAL 0
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T (CAR V) A)))),
which further simplifies, rewriting with REWRITE-EVAL$, CAR-NLISTP, and
EVAL$-OTHER, and opening up INEG, IPLUS, and EQUAL, to:
T.
Case 28.1.
(IMPLIES (EQUAL Z 'INEG)
(EQUAL 0
(IPLUS (EVAL$ T (CONS Z (CONS W D)) A)
(EVAL$ T W A)))).
But this further simplifies, applying REWRITE-EVAL$, CAR-CONS, and
IPLUS-INEG1, and opening up the function EQUAL, to:
T.
Case 27.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(EQUAL (CADR Y) (CADR X))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, unfolding EQUAL, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(EQUAL (CADR Y) (CADR X)))
(EQUAL (FIX-INT (EVAL$ T (CADDR Y) A))
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X) and V by (CONS W D) to eliminate (CAR V) and (CDR V).
We would thus like to prove the following two new goals:
Case 27.2.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'INEG)
(NOT (EQUAL Y (CAR V)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(EQUAL (CADR Y) (CAR V)))
(EQUAL (FIX-INT (EVAL$ T (CADDR Y) A))
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T Y A)))).
But this further simplifies, applying the lemmas CAR-NLISTP, REWRITE-EVAL$,
EVAL$-OTHER, and IPLUS-0-LEFT, and unfolding the function INEG, to:
(IMPLIES (AND (NOT (LISTP V))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(EQUAL (CADR Y) 0))
(EQUAL (FIX-INT (EVAL$ T (CADDR Y) A))
(FIX-INT (EVAL$ T Y A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS Z W) to
eliminate (CAR Y) and (CDR Y), W by (CONS D C) to eliminate (CAR W) and
(CDR W), and C by (CONS W X1) to eliminate (CAR C) and (CDR C). The
result is three new conjectures:
Case 27.2.3.
(IMPLIES (AND (NOT (LISTP W))
(NOT (LISTP V))
(EQUAL Z 'IPLUS)
(EQUAL (CAR W) 0))
(EQUAL (FIX-INT (EVAL$ T (CADR W) A))
(FIX-INT (EVAL$ T (CONS Z W) A)))),
which further simplifies, rewriting with the lemmas CAR-NLISTP,
CDR-NLISTP, EVAL$-OTHER, and REWRITE-EVAL$, and expanding EQUAL, CAR,
FIX-INT, and IPLUS, to:
T.
Case 27.2.2.
(IMPLIES (AND (NOT (LISTP C))
(NOT (LISTP V))
(EQUAL Z 'IPLUS)
(EQUAL D 0))
(EQUAL (FIX-INT (EVAL$ T (CAR C) A))
(FIX-INT (EVAL$ T (CONS Z (CONS D C)) A)))),
which further simplifies, applying CAR-NLISTP, EVAL$-OTHER,
REWRITE-EVAL$, CAR-CONS, and CDR-CONS, and unfolding the definitions of
FIX-INT, IPLUS, and EQUAL, to:
T.
Case 27.2.1.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'IPLUS)
(EQUAL D 0))
(EQUAL (FIX-INT (EVAL$ T W A))
(FIX-INT (EVAL$ T
(CONS Z (CONS D (CONS W X1)))
A)))).
But this further simplifies, rewriting with REWRITE-EVAL$, CAR-CONS,
EVAL$-OTHER, CDR-CONS, IPLUS-0-LEFT, and FIX-INT-FIX-INT, to:
T.
Case 27.1.
(IMPLIES (AND (EQUAL Z 'INEG)
(NOT (EQUAL Y W))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(EQUAL (CADR Y) W))
(EQUAL (FIX-INT (EVAL$ T (CADDR Y) A))
(IPLUS (EVAL$ T (CONS Z (CONS W D)) A)
(EVAL$ T Y A)))).
But this further simplifies, applying the lemmas REWRITE-EVAL$, CAR-CONS,
and COMMUTATIVITY-OF-IPLUS, to the goal:
(IMPLIES (AND (NOT (EQUAL Y (CADR Y)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS))
(EQUAL (FIX-INT (EVAL$ T (CADDR Y) A))
(IPLUS (EVAL$ T Y A)
(INEG (EVAL$ T (CADR Y) A))))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS V Z) to
eliminate (CDR Y) and (CAR Y), Z by (CONS W D) to eliminate (CAR Z) and
(CDR Z), and D by (CONS Z C) to eliminate (CAR D) and (CDR D). We must
thus prove three new conjectures:
Case 27.1.3.
(IMPLIES (AND (NOT (LISTP Z))
(NOT (EQUAL (CONS V Z) (CAR Z)))
(EQUAL V 'IPLUS))
(EQUAL (FIX-INT (EVAL$ T (CADR Z) A))
(IPLUS (EVAL$ T (CONS V Z) A)
(INEG (EVAL$ T (CAR Z) A))))),
which further simplifies, rewriting with the lemmas CAR-NLISTP,
CDR-NLISTP, EVAL$-OTHER, and REWRITE-EVAL$, and opening up the functions
CAR, FIX-INT, IPLUS, INEG, and EQUAL, to:
T.
Case 27.1.2.
(IMPLIES (AND (NOT (LISTP D))
(NOT (EQUAL (CONS V (CONS W D)) W))
(EQUAL V 'IPLUS))
(EQUAL (FIX-INT (EVAL$ T (CAR D) A))
(IPLUS (EVAL$ T (CONS V (CONS W D)) A)
(INEG (EVAL$ T W A))))),
which further simplifies, rewriting with CAR-NLISTP, EVAL$-OTHER,
REWRITE-EVAL$, CAR-CONS, CDR-CONS, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS,
IPLUS-INEG2, and IPLUS-FIX-INT1, and expanding the definitions of
FIX-INT and EQUAL, to:
T.
Case 27.1.1.
(IMPLIES (AND (NOT (EQUAL (CONS V (CONS W (CONS Z C)))
W))
(EQUAL V 'IPLUS))
(EQUAL (FIX-INT (EVAL$ T Z A))
(IPLUS (EVAL$ T
(CONS V (CONS W (CONS Z C)))
A)
(INEG (EVAL$ T W A))))).
However this further simplifies, appealing to the lemmas REWRITE-EVAL$,
CAR-CONS, CDR-CONS, IPLUS-X-Y-INEG-X, and ASSOCIATIVITY-OF-IPLUS, to:
T.
Case 26.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) (CADR X)))
(CANCEL-INEG-AUX X (CADDR Y))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, expanding the definitions of NOT, IMPLIES, EQUAL,
CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) (CADR X)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X) and V by (CONS W D) to eliminate (CAR V) and
(CDR V). This generates two new conjectures:
Case 26.2.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'INEG)
(NOT (EQUAL Y (CAR V)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) (CAR V)))
(CANCEL-INEG-AUX (CONS Z V) (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A)
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A))
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T Y A)))),
which further simplifies, applying CAR-NLISTP, REWRITE-EVAL$, EVAL$-OTHER,
IPLUS-0-LEFT, and IPLUS-FIX-INT2, and expanding INEG, to:
(IMPLIES (AND (NOT (LISTP V))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) 0))
(CANCEL-INEG-AUX (CONS 'INEG V)
(CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS 'INEG V)
(CADDR Y)
A)
(FIX-INT (EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$ T (CADDR Y) A))
(FIX-INT (EVAL$ T Y A)))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS Z W) to eliminate
(CAR Y) and (CDR Y), W by (CONS D C) to eliminate (CAR W) and (CDR W), and
C by (CONS W X1) to eliminate (CAR C) and (CDR C). We would thus like to
prove the following three new conjectures:
Case 26.2.3.
(IMPLIES (AND (NOT (LISTP W))
(NOT (LISTP V))
(EQUAL Z 'IPLUS)
(NOT (EQUAL (CAR W) 0))
(CANCEL-INEG-AUX (CONS 'INEG V)
(CADR W))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS 'INEG V)
(CADR W)
A)
(FIX-INT (EVAL$ T (CADR W) A))))
(EQUAL (IPLUS (EVAL$ T (CAR W) A)
(EVAL$ T (CADR W) A))
(FIX-INT (EVAL$ T (CONS Z W) A)))).
But this further simplifies, rewriting with the lemma CAR-NLISTP, and
opening up the function EQUAL, to:
T.
Case 26.2.2.
(IMPLIES (AND (NOT (LISTP C))
(NOT (LISTP V))
(EQUAL Z 'IPLUS)
(NOT (EQUAL D 0))
(CANCEL-INEG-AUX (CONS 'INEG V)
(CAR C))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS 'INEG V)
(CAR C)
A)
(FIX-INT (EVAL$ T (CAR C) A))))
(EQUAL (IPLUS (EVAL$ T D A)
(EVAL$ T (CAR C) A))
(FIX-INT (EVAL$ T (CONS Z (CONS D C)) A)))),
which further simplifies, rewriting with CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, REWRITE-EVAL$, and
FIX-INT-FIX-INT, and expanding the definitions of EQUAL, CANCEL-INEG-AUX,
EVAL$-CANCEL-INEG-AUX-FN, and FIX-INT, to:
T.
Case 26.2.1.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'IPLUS)
(NOT (EQUAL D 0))
(CANCEL-INEG-AUX (CONS 'INEG V) W)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS 'INEG V)
W A)
(FIX-INT (EVAL$ T W A))))
(EQUAL (IPLUS (EVAL$ T D A) (EVAL$ T W A))
(FIX-INT (EVAL$ T
(CONS Z (CONS D (CONS W X1)))
A)))).
This further simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
FIX-INT-IPLUS, to:
T.
Case 26.1.
(IMPLIES (AND (EQUAL Z 'INEG)
(NOT (EQUAL Y W))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) W))
(CANCEL-INEG-AUX (CONS Z (CONS W D))
(CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z (CONS W D))
(CADDR Y)
A)
(IPLUS (EVAL$ T (CONS Z (CONS W D)) A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z (CONS W D))
(CADDR Y)
A))
(IPLUS (EVAL$ T (CONS Z (CONS W D)) A)
(EVAL$ T Y A)))).
But this further simplifies, applying REWRITE-EVAL$, CAR-CONS,
COMMUTATIVITY2-OF-IPLUS, and COMMUTATIVITY-OF-IPLUS, to:
(IMPLIES
(AND (NOT (EQUAL Y W))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) W))
(CANCEL-INEG-AUX (CONS 'INEG (CONS W D))
(CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS 'INEG (CONS W D))
(CADDR Y)
A)
(IPLUS (INEG (EVAL$ T W A))
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CADR Y) A)
(EVAL$ T (CADDR Y) A)))
(IPLUS (EVAL$ T Y A)
(INEG (EVAL$ T W A))))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS Z V) to eliminate
(CAR Y) and (CDR Y), V by (CONS C X1) to eliminate (CAR V) and (CDR V),
and X1 by (CONS V Z1) to eliminate (CAR X1) and (CDR X1). We would thus
like to prove the following three new goals:
Case 26.1.3.
(IMPLIES
(AND (NOT (LISTP V))
(NOT (EQUAL (CONS Z V) W))
(EQUAL Z 'IPLUS)
(NOT (EQUAL (CAR V) W))
(CANCEL-INEG-AUX (CONS 'INEG (CONS W D))
(CADR V))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS 'INEG (CONS W D))
(CADR V)
A)
(IPLUS (INEG (EVAL$ T W A))
(EVAL$ T (CADR V) A))))
(EQUAL (IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CAR V) A)
(EVAL$ T (CADR V) A)))
(IPLUS (EVAL$ T (CONS Z V) A)
(INEG (EVAL$ T W A))))).
But this further simplifies, rewriting with CAR-NLISTP, CDR-NLISTP,
CDR-CONS, and CAR-CONS, and unfolding the definitions of CAR, LISTP,
EQUAL, and CANCEL-INEG-AUX, to:
T.
Case 26.1.2.
(IMPLIES
(AND (NOT (LISTP X1))
(NOT (EQUAL (CONS Z (CONS C X1)) W))
(EQUAL Z 'IPLUS)
(NOT (EQUAL C W))
(CANCEL-INEG-AUX (CONS 'INEG (CONS W D))
(CAR X1))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS 'INEG (CONS W D))
(CAR X1)
A)
(IPLUS (INEG (EVAL$ T W A))
(EVAL$ T (CAR X1) A))))
(EQUAL (IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T C A)
(EVAL$ T (CAR X1) A)))
(IPLUS (EVAL$ T (CONS Z (CONS C X1)) A)
(INEG (EVAL$ T W A))))).
This further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, IPLUS-FIX-INT2,
REWRITE-EVAL$, and IPLUS-FIX-INT1, and expanding LISTP, EQUAL,
CANCEL-INEG-AUX, EVAL$-CANCEL-INEG-AUX-FN, INEG, and IPLUS, to:
T.
Case 26.1.1.
(IMPLIES
(AND (NOT (EQUAL (CONS Z (CONS C (CONS V Z1)))
W))
(EQUAL Z 'IPLUS)
(NOT (EQUAL C W))
(CANCEL-INEG-AUX (CONS 'INEG (CONS W D))
V)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS 'INEG (CONS W D))
V A)
(IPLUS (INEG (EVAL$ T W A))
(EVAL$ T V A))))
(EQUAL (IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T C A) (EVAL$ T V A)))
(IPLUS (EVAL$ T
(CONS Z (CONS C (CONS V Z1)))
A)
(INEG (EVAL$ T W A))))).
However this further simplifies, applying COMMUTATIVITY-OF-IPLUS,
COMMUTATIVITY2-OF-IPLUS, REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
ASSOCIATIVITY-OF-IPLUS, to:
T.
Case 25.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (EQUAL (CADR Y) (CADR X)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, opening up the definitions of EQUAL, NOT, IMPLIES, and
CANCEL-INEG-AUX, to:
T.
Case 24.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'IPLUS))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, unfolding the functions EQUAL and CANCEL-INEG-AUX, to:
T.
Case 23.(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'INEG)
(NOT (EQUAL Y (CADR X)))
(NOT (LISTP Y))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, unfolding the definitions of EQUAL and CANCEL-INEG-AUX, to:
T.
Case 22.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(NOT (LISTP Y))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, opening up the definitions of CANCEL-INEG-AUX and EQUAL, to:
T.
Case 21.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'INEG)
(EQUAL X (CADR Y))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, appealing to the lemma COMMUTATIVITY-OF-IPLUS, and opening
up EQUAL, CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to the new formula:
(IMPLIES (AND (LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'INEG))
(EQUAL 0
(IPLUS (EVAL$ T Y A)
(EVAL$ T (CADR Y) A)))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS V Z) to eliminate
(CDR Y) and (CAR Y), Z by (CONS W D) to eliminate (CAR Z) and (CDR Z), and W
by (CONS Z C) to eliminate (CAR W) and (CDR W). We would thus like to prove
the following two new goals:
Case 21.2.
(IMPLIES (AND (NOT (LISTP Z))
(LISTP (CAR Z))
(NOT (EQUAL (CAAR Z) 'INEG))
(EQUAL V 'INEG))
(EQUAL 0
(IPLUS (EVAL$ T (CONS V Z) A)
(EVAL$ T (CAR Z) A)))).
This further simplifies, applying CAR-NLISTP, and opening up the function
LISTP, to:
T.
Case 21.1.
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(EQUAL V 'INEG))
(EQUAL 0
(IPLUS (EVAL$ T
(CONS V (CONS (CONS Z C) D))
A)
(EVAL$ T (CONS Z C) A)))).
However this further simplifies, rewriting with the lemmas REWRITE-EVAL$,
CAR-CONS, and IPLUS-INEG1, and opening up EQUAL, to:
T.
Case 20.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'INEG)
(NOT (EQUAL X (CADR Y)))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, opening up EQUAL and CANCEL-INEG-AUX, to:
T.
Case 19.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(EQUAL X (CADADR Y))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, applying the lemma COMMUTATIVITY-OF-IPLUS, and expanding
the definitions of EQUAL, CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (LISTP (CADADR Y))
(NOT (EQUAL (CAADADR Y) 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG))
(EQUAL (FIX-INT (EVAL$ T (CADDR Y) A))
(IPLUS (EVAL$ T Y A)
(EVAL$ T (CADADR Y) A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS V Z) to
eliminate (CDR Y) and (CAR Y), Z by (CONS W D) to eliminate (CAR Z) and
(CDR Z), W by (CONS C Z) to eliminate (CDR W) and (CAR W), Z by (CONS W X1)
to eliminate (CAR Z) and (CDR Z), W by (CONS Z Z1) to eliminate (CAR W) and
(CDR W), D by (CONS W V1) to eliminate (CAR D) and (CDR D), and D by
(CONS W X1) to eliminate (CAR D) and (CDR D). This generates five new
formulas:
Case 19.5.
(IMPLIES (AND (NOT (LISTP Z))
(LISTP (CADAR Z))
(NOT (EQUAL (CAADAR Z) 'INEG))
(EQUAL V 'IPLUS)
(LISTP (CAR Z))
(EQUAL (CAAR Z) 'INEG))
(EQUAL (FIX-INT (EVAL$ T (CADR Z) A))
(IPLUS (EVAL$ T (CONS V Z) A)
(EVAL$ T (CADAR Z) A)))),
which further simplifies, applying CAR-NLISTP, and opening up the
functions CDR, CAR, and LISTP, to:
T.
Case 19.4.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP Z))
(LISTP (CAR Z))
(NOT (EQUAL (CAAR Z) 'INEG))
(EQUAL V 'IPLUS)
(EQUAL C 'INEG))
(EQUAL (FIX-INT (EVAL$ T (CAR D) A))
(IPLUS (EVAL$ T
(CONS V (CONS (CONS C Z) D))
A)
(EVAL$ T (CAR Z) A)))).
However this further simplifies, appealing to the lemma CAR-NLISTP, and
expanding LISTP, to:
T.
Case 19.3.
(IMPLIES (AND (NOT (LISTP Z))
(LISTP (CAR Z))
(NOT (EQUAL (CAAR Z) 'INEG))
(EQUAL V 'IPLUS)
(EQUAL C 'INEG))
(EQUAL (FIX-INT (EVAL$ T W A))
(IPLUS (EVAL$ T
(CONS V (CONS (CONS C Z) (CONS W X1)))
A)
(EVAL$ T (CAR Z) A)))),
which further simplifies, appealing to the lemma CAR-NLISTP, and unfolding
the definition of LISTP, to:
T.
Case 19.2.
(IMPLIES
(AND (NOT (LISTP D))
(NOT (EQUAL Z 'INEG))
(EQUAL V 'IPLUS)
(EQUAL C 'INEG))
(EQUAL (FIX-INT (EVAL$ T (CAR D) A))
(IPLUS (EVAL$ T
(CONS V
(CONS (CONS C (CONS (CONS Z Z1) X1))
D))
A)
(EVAL$ T (CONS Z Z1) A)))),
which further simplifies, rewriting with CAR-NLISTP, EVAL$-OTHER,
REWRITE-EVAL$, CAR-CONS, CDR-CONS, FIX-INT-INEG, IPLUS-0-LEFT,
COMMUTATIVITY-OF-IPLUS, and IPLUS-INEG1, and expanding the functions
FIX-INT and EQUAL, to:
T.
Case 19.1.
(IMPLIES
(AND (NOT (EQUAL Z 'INEG))
(EQUAL V 'IPLUS)
(EQUAL C 'INEG))
(EQUAL (FIX-INT (EVAL$ T W A))
(IPLUS (EVAL$ T
(CONS V
(CONS (CONS C (CONS (CONS Z Z1) X1))
(CONS W V1)))
A)
(EVAL$ T (CONS Z Z1) A)))).
However this further simplifies, appealing to the lemmas REWRITE-EVAL$,
CAR-CONS, CDR-CONS, COMMUTATIVITY-OF-IPLUS, IPLUS-INEG1, IPLUS-0-LEFT, and
ASSOCIATIVITY-OF-IPLUS, to:
T.
Case 18.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, opening up the definitions of EQUAL, NOT, IMPLIES,
CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X). The result is:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL (CONS Z V) (CADADR Y)))
(CANCEL-INEG-AUX (CONS Z V) (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A)
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A))
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T Y A)))).
This further simplifies, rewriting with COMMUTATIVITY-OF-IPLUS, to the new
conjecture:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL (CONS Z V) (CADADR Y)))
(CANCEL-INEG-AUX (CONS Z V) (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A)
(IPLUS (EVAL$ T (CADDR Y) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A))
(IPLUS (EVAL$ T Y A)
(EVAL$ T (CONS Z V) A)))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS W D) to eliminate
(CAR Y) and (CDR Y), D by (CONS C X1) to eliminate (CAR D) and (CDR D), C by
(CONS D Z1) to eliminate (CAR C) and (CDR C), Z1 by (CONS C V1) to eliminate
(CAR Z1) and (CDR Z1), X1 by (CONS Z1 W1) to eliminate (CAR X1) and (CDR X1),
and X1 by (CONS C V1) to eliminate (CAR X1) and (CDR X1). This produces the
following five new formulas:
Case 18.5.
(IMPLIES (AND (NOT (LISTP D))
(NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(LISTP (CAR D))
(EQUAL (CAAR D) 'INEG)
(NOT (EQUAL (CONS Z V) (CADAR D)))
(CANCEL-INEG-AUX (CONS Z V) (CADR D))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADR D)
A)
(IPLUS (EVAL$ T (CADR D) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CAR D) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADR D)
A))
(IPLUS (EVAL$ T (CONS W D) A)
(EVAL$ T (CONS Z V) A)))).
But this further simplifies, applying the lemma CAR-NLISTP, and opening up
the function LISTP, to:
T.
Case 18.4.
(IMPLIES (AND (NOT (LISTP X1))
(NOT (LISTP Z1))
(NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(EQUAL D 'INEG)
(NOT (EQUAL (CONS Z V) (CAR Z1)))
(CANCEL-INEG-AUX (CONS Z V) (CAR X1))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CAR X1)
A)
(IPLUS (EVAL$ T (CAR X1) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CONS D Z1) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CAR X1)
A))
(IPLUS (EVAL$ T
(CONS W (CONS (CONS D Z1) X1))
A)
(EVAL$ T (CONS Z V) A)))),
which further simplifies, appealing to the lemmas CAR-NLISTP and CAR-CONS,
and expanding the functions LISTP and CANCEL-INEG-AUX, to:
T.
Case 18.3.
(IMPLIES (AND (NOT (LISTP Z1))
(NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(EQUAL D 'INEG)
(NOT (EQUAL (CONS Z V) (CAR Z1)))
(CANCEL-INEG-AUX (CONS Z V) C)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A)
(IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CONS D Z1) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A))
(IPLUS (EVAL$ T
(CONS W
(CONS (CONS D Z1) (CONS C V1)))
A)
(EVAL$ T (CONS Z V) A)))),
which further simplifies, rewriting with the lemmas CAR-NLISTP,
REWRITE-EVAL$, EVAL$-OTHER, IPLUS-0-LEFT, CAR-CONS, CDR-CONS, and
IPLUS-FIX-INT1, and expanding the definition of INEG, to:
(IMPLIES (AND (NOT (LISTP Z1))
(NOT (EQUAL Z 'INEG))
(CANCEL-INEG-AUX (CONS Z V) C)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A)
(IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (FIX-INT (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A))
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A))).
We use the above equality hypothesis by substituting:
(IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A))
for (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V) C A) and throwing away the
equality. We thus obtain:
(IMPLIES (AND (NOT (LISTP Z1))
(NOT (EQUAL Z 'INEG))
(CANCEL-INEG-AUX (CONS Z V) C))
(EQUAL (FIX-INT (IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A)))
(IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A)))),
which finally simplifies, rewriting with FIX-INT-IPLUS, to:
T.
Case 18.2.
(IMPLIES (AND (NOT (LISTP X1))
(NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(EQUAL D 'INEG)
(NOT (EQUAL (CONS Z V) C))
(CANCEL-INEG-AUX (CONS Z V) (CAR X1))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CAR X1)
A)
(IPLUS (EVAL$ T (CAR X1) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CONS D (CONS C V1)) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CAR X1)
A))
(IPLUS (EVAL$ T
(CONS W
(CONS (CONS D (CONS C V1)) X1))
A)
(EVAL$ T (CONS Z V) A)))).
But this further simplifies, applying CAR-NLISTP and CAR-CONS, and
expanding LISTP and CANCEL-INEG-AUX, to:
T.
Case 18.1.
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(EQUAL D 'INEG)
(NOT (EQUAL (CONS Z V) C))
(CANCEL-INEG-AUX (CONS Z V) Z1)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
Z1 A)
(IPLUS (EVAL$ T Z1 A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CONS D (CONS C V1)) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
Z1 A))
(IPLUS (EVAL$ T
(CONS W
(CONS (CONS D (CONS C V1))
(CONS Z1 W1)))
A)
(EVAL$ T (CONS Z V) A)))).
But this further simplifies, appealing to the lemmas REWRITE-EVAL$,
CAR-CONS, CDR-CONS, COMMUTATIVITY-OF-IPLUS, and ASSOCIATIVITY-OF-IPLUS, to
the conjecture:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(NOT (EQUAL (CONS Z V) C))
(CANCEL-INEG-AUX (CONS Z V) Z1)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
Z1 A)
(IPLUS (EVAL$ T Z1 A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (INEG (EVAL$ T C A))
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
Z1 A))
(IPLUS (EVAL$ T Z1 A)
(IPLUS (INEG (EVAL$ T C A))
(EVAL$ T (CONS Z V) A))))).
We now use the above equality hypothesis by substituting:
(IPLUS (EVAL$ T Z1 A)
(EVAL$ T (CONS Z V) A))
for (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V) Z1 A) and throwing away the
equality. We would thus like to prove the new goal:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(NOT (EQUAL (CONS Z V) C))
(CANCEL-INEG-AUX (CONS Z V) Z1))
(EQUAL (IPLUS (INEG (EVAL$ T C A))
(IPLUS (EVAL$ T Z1 A)
(EVAL$ T (CONS Z V) A)))
(IPLUS (EVAL$ T Z1 A)
(IPLUS (INEG (EVAL$ T C A))
(EVAL$ T (CONS Z V) A))))),
which finally simplifies, rewriting with COMMUTATIVITY2-OF-IPLUS, to:
T.
Case 17.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, unfolding the functions EQUAL, NOT, IMPLIES, and
CANCEL-INEG-AUX, to:
T.
Case 16.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX X (CADDR Y))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, unfolding the definitions of EQUAL, NOT, IMPLIES,
CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to the new conjecture:
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X). We would thus like to prove:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX (CONS Z V) (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A)
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A))
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T Y A)))),
which further simplifies, rewriting with COMMUTATIVITY-OF-IPLUS, to:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX (CONS Z V) (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A)
(IPLUS (EVAL$ T (CADDR Y) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A))
(IPLUS (EVAL$ T Y A)
(EVAL$ T (CONS Z V) A)))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS W D) to eliminate
(CAR Y) and (CDR Y), D by (CONS C X1) to eliminate (CAR D) and (CDR D), C by
(CONS D Z1) to eliminate (CAR C) and (CDR C), and X1 by (CONS C V1) to
eliminate (CAR X1) and (CDR X1). We thus obtain the following three new
formulas:
Case 16.3.
(IMPLIES (AND (NOT (LISTP D))
(NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(LISTP (CAR D))
(NOT (EQUAL (CAAR D) 'INEG))
(CANCEL-INEG-AUX (CONS Z V) (CADR D))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADR D)
A)
(IPLUS (EVAL$ T (CADR D) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CAR D) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADR D)
A))
(IPLUS (EVAL$ T (CONS W D) A)
(EVAL$ T (CONS Z V) A)))).
This further simplifies, applying CAR-NLISTP, and opening up the function
LISTP, to:
T.
Case 16.2.
(IMPLIES (AND (NOT (LISTP X1))
(NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(NOT (EQUAL D 'INEG))
(CANCEL-INEG-AUX (CONS Z V) (CAR X1))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CAR X1)
A)
(IPLUS (EVAL$ T (CAR X1) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CONS D Z1) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CAR X1)
A))
(IPLUS (EVAL$ T
(CONS W (CONS (CONS D Z1) X1))
A)
(EVAL$ T (CONS Z V) A)))).
This further simplifies, appealing to the lemmas CAR-NLISTP and CAR-CONS,
and unfolding LISTP and CANCEL-INEG-AUX, to:
T.
Case 16.1.
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(NOT (EQUAL D 'INEG))
(CANCEL-INEG-AUX (CONS Z V) C)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A)
(IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CONS D Z1) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A))
(IPLUS (EVAL$ T
(CONS W
(CONS (CONS D Z1) (CONS C V1)))
A)
(EVAL$ T (CONS Z V) A)))),
which further simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS,
COMMUTATIVITY-OF-IPLUS, and ASSOCIATIVITY-OF-IPLUS, to the new goal:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(NOT (EQUAL D 'INEG))
(CANCEL-INEG-AUX (CONS Z V) C)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A)
(IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CONS D Z1) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
C A))
(IPLUS (EVAL$ T C A)
(IPLUS (EVAL$ T (CONS D Z1) A)
(EVAL$ T (CONS Z V) A))))).
We use the above equality hypothesis by substituting:
(IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A))
for (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V) C A) and throwing away the
equality. We must thus prove the goal:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(NOT (EQUAL D 'INEG))
(CANCEL-INEG-AUX (CONS Z V) C))
(EQUAL (IPLUS (EVAL$ T (CONS D Z1) A)
(IPLUS (EVAL$ T C A)
(EVAL$ T (CONS Z V) A)))
(IPLUS (EVAL$ T C A)
(IPLUS (EVAL$ T (CONS D Z1) A)
(EVAL$ T (CONS Z V) A))))).
However this finally simplifies, rewriting with COMMUTATIVITY2-OF-IPLUS,
to:
T.
Case 15.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, expanding the functions EQUAL, NOT, IMPLIES, and
CANCEL-INEG-AUX, to:
T.
Case 14.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, opening up EQUAL, NOT, IMPLIES, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X). We thus obtain:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX (CONS Z V) (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A)
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A))
(IPLUS (EVAL$ T (CONS Z V) A)
(EVAL$ T Y A)))),
which further simplifies, rewriting with COMMUTATIVITY-OF-IPLUS, to the new
conjecture:
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX (CONS Z V) (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A)
(IPLUS (EVAL$ T (CADDR Y) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADDR Y)
A))
(IPLUS (EVAL$ T Y A)
(EVAL$ T (CONS Z V) A)))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS W D) to eliminate
(CAR Y) and (CDR Y), D by (CONS C X1) to eliminate (CAR D) and (CDR D), and
X1 by (CONS D Z1) to eliminate (CAR X1) and (CDR X1). This produces the
following three new goals:
Case 14.3.
(IMPLIES (AND (NOT (LISTP D))
(NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(NOT (LISTP (CAR D)))
(CANCEL-INEG-AUX (CONS Z V) (CADR D))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADR D)
A)
(IPLUS (EVAL$ T (CADR D) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T (CAR D) A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CADR D)
A))
(IPLUS (EVAL$ T (CONS W D) A)
(EVAL$ T (CONS Z V) A)))).
However this further simplifies, applying the lemmas CAR-NLISTP,
CDR-NLISTP, and CAR-CONS, and unfolding the definitions of LISTP, CAR, and
CANCEL-INEG-AUX, to:
T.
Case 14.2.
(IMPLIES (AND (NOT (LISTP X1))
(NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(NOT (LISTP C))
(CANCEL-INEG-AUX (CONS Z V) (CAR X1))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CAR X1)
A)
(IPLUS (EVAL$ T (CAR X1) A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T C A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
(CAR X1)
A))
(IPLUS (EVAL$ T (CONS W (CONS C X1)) A)
(EVAL$ T (CONS Z V) A)))),
which further simplifies, rewriting with the lemmas CAR-NLISTP and
CAR-CONS, and expanding the functions LISTP and CANCEL-INEG-AUX, to:
T.
Case 14.1.
(IMPLIES (AND (NOT (EQUAL Z 'INEG))
(EQUAL W 'IPLUS)
(NOT (LISTP C))
(CANCEL-INEG-AUX (CONS Z V) D)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
D A)
(IPLUS (EVAL$ T D A)
(EVAL$ T (CONS Z V) A))))
(EQUAL (IPLUS (EVAL$ T C A)
(EVAL$-CANCEL-INEG-AUX-FN (CONS Z V)
D A))
(IPLUS (EVAL$ T
(CONS W (CONS C (CONS D Z1)))
A)
(EVAL$ T (CONS Z V) A)))),
which further simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
ASSOCIATIVITY-OF-IPLUS, to:
T.
Case 13.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, unfolding the definitions of EQUAL, NOT, IMPLIES, and
CANCEL-INEG-AUX, to:
T.
Case 12.(IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'INEG))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(NOT (EQUAL (CAR Y) 'IPLUS))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, unfolding the definitions of CANCEL-INEG-AUX and EQUAL, to:
T.
Case 11.(IMPLIES (AND (NOT (LISTP X))
(NOT (LISTP Y))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, expanding the functions CANCEL-INEG-AUX and EQUAL, to:
T.
Case 10.(IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(EQUAL (CAR Y) 'INEG)
(EQUAL X (CADR Y))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, appealing to the lemma COMMUTATIVITY-OF-IPLUS, and
unfolding EQUAL, CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (NOT (LISTP (CADR Y)))
(LISTP Y)
(EQUAL (CAR Y) 'INEG))
(EQUAL 0
(IPLUS (EVAL$ T Y A)
(EVAL$ T (CADR Y) A)))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS V Z) to eliminate
(CDR Y) and (CAR Y) and Z by (CONS W D) to eliminate (CAR Z) and (CDR Z).
This produces the following two new goals:
Case 10.2.
(IMPLIES (AND (NOT (LISTP Z))
(NOT (LISTP (CAR Z)))
(EQUAL V 'INEG))
(EQUAL 0
(IPLUS (EVAL$ T (CONS V Z) A)
(EVAL$ T (CAR Z) A)))).
This further simplifies, rewriting with CAR-NLISTP, REWRITE-EVAL$, and
EVAL$-OTHER, and unfolding the functions LISTP, INEG, IPLUS, and EQUAL, to:
T.
Case 10.1.
(IMPLIES (AND (NOT (LISTP W)) (EQUAL V 'INEG))
(EQUAL 0
(IPLUS (EVAL$ T (CONS V (CONS W D)) A)
(EVAL$ T W A)))).
However this further simplifies, appealing to the lemmas REWRITE-EVAL$,
CAR-CONS, and IPLUS-INEG1, and opening up the function EQUAL, to:
T.
Case 9. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(EQUAL (CAR Y) 'INEG)
(NOT (EQUAL X (CADR Y)))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, opening up EQUAL and CANCEL-INEG-AUX, to:
T.
Case 8. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(EQUAL X (CADADR Y))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, rewriting with the lemma COMMUTATIVITY-OF-IPLUS, and
opening up the definitions of EQUAL, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to the conjecture:
(IMPLIES (AND (NOT (LISTP (CADADR Y)))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG))
(EQUAL (FIX-INT (EVAL$ T (CADDR Y) A))
(IPLUS (EVAL$ T Y A)
(EVAL$ T (CADADR Y) A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS V Z) to
eliminate (CDR Y) and (CAR Y), Z by (CONS W D) to eliminate (CAR Z) and
(CDR Z), W by (CONS C Z) to eliminate (CDR W) and (CAR W), Z by (CONS W X1)
to eliminate (CAR Z) and (CDR Z), D by (CONS Z Z1) to eliminate (CAR D) and
(CDR D), and D by (CONS W X1) to eliminate (CAR D) and (CDR D). We must
thus prove five new formulas:
Case 8.5.
(IMPLIES (AND (NOT (LISTP Z))
(NOT (LISTP (CADAR Z)))
(EQUAL V 'IPLUS)
(LISTP (CAR Z))
(EQUAL (CAAR Z) 'INEG))
(EQUAL (FIX-INT (EVAL$ T (CADR Z) A))
(IPLUS (EVAL$ T (CONS V Z) A)
(EVAL$ T (CADAR Z) A)))),
which further simplifies, applying CAR-NLISTP, and expanding the functions
CDR, CAR, and LISTP, to:
T.
Case 8.4.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP Z))
(NOT (LISTP (CAR Z)))
(EQUAL V 'IPLUS)
(EQUAL C 'INEG))
(EQUAL (FIX-INT (EVAL$ T (CAR D) A))
(IPLUS (EVAL$ T
(CONS V (CONS (CONS C Z) D))
A)
(EVAL$ T (CAR Z) A)))).
But this further simplifies, applying CAR-NLISTP, EVAL$-OTHER,
REWRITE-EVAL$, CAR-CONS, and CDR-CONS, and expanding the functions LISTP,
FIX-INT, INEG, IPLUS, and EQUAL, to:
T.
Case 8.3.
(IMPLIES (AND (NOT (LISTP Z))
(NOT (LISTP (CAR Z)))
(EQUAL V 'IPLUS)
(EQUAL C 'INEG))
(EQUAL (FIX-INT (EVAL$ T W A))
(IPLUS (EVAL$ T
(CONS V (CONS (CONS C Z) (CONS W X1)))
A)
(EVAL$ T (CAR Z) A)))).
However this further simplifies, rewriting with CAR-NLISTP, REWRITE-EVAL$,
CAR-CONS, EVAL$-OTHER, CDR-CONS, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
IPLUS-FIX-INT1, and opening up LISTP and INEG, to:
T.
Case 8.2.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP W))
(EQUAL V 'IPLUS)
(EQUAL C 'INEG))
(EQUAL (FIX-INT (EVAL$ T (CAR D) A))
(IPLUS (EVAL$ T
(CONS V (CONS (CONS C (CONS W X1)) D))
A)
(EVAL$ T W A)))).
But this further simplifies, rewriting with CAR-NLISTP, EVAL$-OTHER,
REWRITE-EVAL$, CAR-CONS, CDR-CONS, FIX-INT-INEG, IPLUS-0-LEFT,
COMMUTATIVITY-OF-IPLUS, and IPLUS-INEG1, and unfolding FIX-INT and EQUAL,
to:
T.
Case 8.1.
(IMPLIES (AND (NOT (LISTP W))
(EQUAL V 'IPLUS)
(EQUAL C 'INEG))
(EQUAL (FIX-INT (EVAL$ T Z A))
(IPLUS (EVAL$ T
(CONS V
(CONS (CONS C (CONS W X1))
(CONS Z Z1)))
A)
(EVAL$ T W A)))).
However this further simplifies, appealing to the lemmas REWRITE-EVAL$,
CAR-CONS, CDR-CONS, COMMUTATIVITY-OF-IPLUS, IPLUS-INEG1, IPLUS-0-LEFT, and
ASSOCIATIVITY-OF-IPLUS, to:
T.
Case 7. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, expanding EQUAL, NOT, IMPLIES, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS Z V) to
eliminate (CAR Y) and (CDR Y), V by (CONS W D) to eliminate (CAR V) and
(CDR V), W by (CONS V C) to eliminate (CAR W) and (CDR W), C by (CONS W X1)
to eliminate (CAR C) and (CDR C), D by (CONS C Z1) to eliminate (CAR D) and
(CDR D), and D by (CONS W X1) to eliminate (CAR D) and (CDR D). We must
thus prove five new conjectures:
Case 7.5.
(IMPLIES (AND (NOT (LISTP V))
(NOT (LISTP X))
(EQUAL Z 'IPLUS)
(LISTP (CAR V))
(EQUAL (CAAR V) 'INEG)
(NOT (EQUAL X (CADAR V)))
(CANCEL-INEG-AUX X (CADR V))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADR V)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADR V) A))))
(EQUAL (IPLUS (EVAL$ T (CAR V) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADR V)
A))
(IPLUS (EVAL$ T X A)
(EVAL$ T (CONS Z V) A)))),
which further simplifies, rewriting with CAR-NLISTP, and unfolding the
definition of LISTP, to:
T.
Case 7.4.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP C))
(NOT (LISTP X))
(EQUAL Z 'IPLUS)
(EQUAL V 'INEG)
(NOT (EQUAL X (CAR C)))
(CANCEL-INEG-AUX X (CAR D))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X (CAR D) A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CAR D) A))))
(EQUAL (IPLUS (EVAL$ T (CONS V C) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CAR D)
A))
(IPLUS (EVAL$ T X A)
(EVAL$ T
(CONS Z (CONS (CONS V C) D))
A)))).
This further simplifies, applying the lemma CAR-NLISTP, and expanding the
definitions of LISTP and CANCEL-INEG-AUX, to:
T.
Case 7.3.
(IMPLIES (AND (NOT (LISTP C))
(NOT (LISTP X))
(EQUAL Z 'IPLUS)
(EQUAL V 'INEG)
(NOT (EQUAL X (CAR C)))
(CANCEL-INEG-AUX X W)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X W A)
(IPLUS (EVAL$ T X A) (EVAL$ T W A))))
(EQUAL (IPLUS (EVAL$ T (CONS V C) A)
(EVAL$-CANCEL-INEG-AUX-FN X W A))
(IPLUS (EVAL$ T X A)
(EVAL$ T
(CONS Z (CONS (CONS V C) (CONS W X1)))
A)))),
which further simplifies, rewriting with CAR-NLISTP,
COMMUTATIVITY-OF-IPLUS, REWRITE-EVAL$, EVAL$-OTHER, IPLUS-0-LEFT, CAR-CONS,
CDR-CONS, and IPLUS-FIX-INT2, and unfolding the definition of INEG, to:
(IMPLIES (AND (NOT (LISTP C))
(NOT (LISTP X))
(NOT (EQUAL X 0))
(CANCEL-INEG-AUX X W)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X W A)
(IPLUS (EVAL$ T W A) (EVAL$ T X A))))
(EQUAL (FIX-INT (EVAL$-CANCEL-INEG-AUX-FN X W A))
(EVAL$-CANCEL-INEG-AUX-FN X W A))).
We now use the above equality hypothesis by substituting:
(IPLUS (EVAL$ T W A) (EVAL$ T X A))
for (EVAL$-CANCEL-INEG-AUX-FN X W A) and throwing away the equality. The
result is the conjecture:
(IMPLIES (AND (NOT (LISTP C))
(NOT (LISTP X))
(NOT (EQUAL X 0))
(CANCEL-INEG-AUX X W))
(EQUAL (FIX-INT (IPLUS (EVAL$ T W A) (EVAL$ T X A)))
(IPLUS (EVAL$ T W A) (EVAL$ T X A)))).
This further simplifies, rewriting with FIX-INT-IPLUS, to:
T.
Case 7.2.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X))
(EQUAL Z 'IPLUS)
(EQUAL V 'INEG)
(NOT (EQUAL X W))
(CANCEL-INEG-AUX X (CAR D))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X (CAR D) A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CAR D) A))))
(EQUAL (IPLUS (EVAL$ T (CONS V (CONS W X1)) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CAR D)
A))
(IPLUS (EVAL$ T X A)
(EVAL$ T
(CONS Z (CONS (CONS V (CONS W X1)) D))
A)))).
This further simplifies, appealing to the lemma CAR-NLISTP, and expanding
the functions LISTP and CANCEL-INEG-AUX, to:
T.
Case 7.1.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL Z 'IPLUS)
(EQUAL V 'INEG)
(NOT (EQUAL X W))
(CANCEL-INEG-AUX X C)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X C A)
(IPLUS (EVAL$ T X A) (EVAL$ T C A))))
(EQUAL (IPLUS (EVAL$ T (CONS V (CONS W X1)) A)
(EVAL$-CANCEL-INEG-AUX-FN X C A))
(IPLUS (EVAL$ T X A)
(EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS C Z1)))
A)))),
which further simplifies, rewriting with COMMUTATIVITY-OF-IPLUS,
REWRITE-EVAL$, CAR-CONS, CDR-CONS, and COMMUTATIVITY2-OF-IPLUS, to the new
goal:
(IMPLIES (AND (NOT (LISTP X))
(NOT (EQUAL X W))
(CANCEL-INEG-AUX X C)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X C A)
(IPLUS (EVAL$ T C A) (EVAL$ T X A))))
(EQUAL (IPLUS (INEG (EVAL$ T W A))
(EVAL$-CANCEL-INEG-AUX-FN X C A))
(IPLUS (EVAL$ T C A)
(IPLUS (EVAL$ T X A)
(INEG (EVAL$ T W A)))))).
We now use the above equality hypothesis by substituting:
(IPLUS (EVAL$ T C A) (EVAL$ T X A))
for (EVAL$-CANCEL-INEG-AUX-FN X C A) and throwing away the equality. We
must thus prove:
(IMPLIES (AND (NOT (LISTP X))
(NOT (EQUAL X W))
(CANCEL-INEG-AUX X C))
(EQUAL (IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T C A) (EVAL$ T X A)))
(IPLUS (EVAL$ T C A)
(IPLUS (EVAL$ T X A)
(INEG (EVAL$ T W A)))))).
This further simplifies, applying COMMUTATIVITY-OF-IPLUS and
COMMUTATIVITY2-OF-IPLUS, to:
T.
Case 6. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(EQUAL (CAADR Y) 'INEG)
(NOT (EQUAL X (CADADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, opening up EQUAL, NOT, IMPLIES, and CANCEL-INEG-AUX, to:
T.
Case 5. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX X (CADDR Y))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, expanding EQUAL, NOT, IMPLIES, CANCEL-INEG-AUX, and
EVAL$-CANCEL-INEG-AUX-FN, to:
(IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS Z V) to eliminate
(CAR Y) and (CDR Y), V by (CONS W D) to eliminate (CAR V) and (CDR V), W by
(CONS V C) to eliminate (CAR W) and (CDR W), and D by (CONS W X1) to
eliminate (CAR D) and (CDR D). We thus obtain the following three new
conjectures:
Case 5.3.
(IMPLIES (AND (NOT (LISTP V))
(NOT (LISTP X))
(EQUAL Z 'IPLUS)
(LISTP (CAR V))
(NOT (EQUAL (CAAR V) 'INEG))
(CANCEL-INEG-AUX X (CADR V))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADR V)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADR V) A))))
(EQUAL (IPLUS (EVAL$ T (CAR V) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADR V)
A))
(IPLUS (EVAL$ T X A)
(EVAL$ T (CONS Z V) A)))).
This further simplifies, rewriting with CAR-NLISTP, and opening up LISTP,
to:
T.
Case 5.2.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X))
(EQUAL Z 'IPLUS)
(NOT (EQUAL V 'INEG))
(CANCEL-INEG-AUX X (CAR D))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X (CAR D) A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CAR D) A))))
(EQUAL (IPLUS (EVAL$ T (CONS V C) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CAR D)
A))
(IPLUS (EVAL$ T X A)
(EVAL$ T
(CONS Z (CONS (CONS V C) D))
A)))).
But this further simplifies, applying CAR-NLISTP, and unfolding the
functions LISTP and CANCEL-INEG-AUX, to:
T.
Case 5.1.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL Z 'IPLUS)
(NOT (EQUAL V 'INEG))
(CANCEL-INEG-AUX X W)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X W A)
(IPLUS (EVAL$ T X A) (EVAL$ T W A))))
(EQUAL (IPLUS (EVAL$ T (CONS V C) A)
(EVAL$-CANCEL-INEG-AUX-FN X W A))
(IPLUS (EVAL$ T X A)
(EVAL$ T
(CONS Z (CONS (CONS V C) (CONS W X1)))
A)))).
But this further simplifies, rewriting with COMMUTATIVITY-OF-IPLUS,
REWRITE-EVAL$, CAR-CONS, CDR-CONS, and COMMUTATIVITY2-OF-IPLUS, to:
(IMPLIES (AND (NOT (LISTP X))
(NOT (EQUAL V 'INEG))
(CANCEL-INEG-AUX X W)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X W A)
(IPLUS (EVAL$ T W A) (EVAL$ T X A))))
(EQUAL (IPLUS (EVAL$-CANCEL-INEG-AUX-FN X W A)
(EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T W A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CONS V C) A))))).
We use the above equality hypothesis by substituting:
(IPLUS (EVAL$ T W A) (EVAL$ T X A))
for (EVAL$-CANCEL-INEG-AUX-FN X W A) and throwing away the equality. The
result is:
(IMPLIES (AND (NOT (LISTP X))
(NOT (EQUAL V 'INEG))
(CANCEL-INEG-AUX X W))
(EQUAL (IPLUS (IPLUS (EVAL$ T W A) (EVAL$ T X A))
(EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T W A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CONS V C) A))))).
However this further simplifies, rewriting with ASSOCIATIVITY-OF-IPLUS, to:
T.
Case 4. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(LISTP (CADR Y))
(NOT (EQUAL (CAADR Y) 'INEG))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, expanding the functions EQUAL, NOT, IMPLIES, and
CANCEL-INEG-AUX, to:
T.
Case 3. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
This simplifies, expanding the definitions of EQUAL, NOT, IMPLIES,
CANCEL-INEG-AUX, and EVAL$-CANCEL-INEG-AUX-FN, to the new formula:
(IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(CANCEL-INEG-AUX X (CADDR Y))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(EQUAL (IPLUS (EVAL$ T (CADR Y) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A))
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS Z V) to eliminate
(CAR Y) and (CDR Y), V by (CONS W D) to eliminate (CAR V) and (CDR V), and D
by (CONS V C) to eliminate (CAR D) and (CDR D). We thus obtain the
following three new conjectures:
Case 3.3.
(IMPLIES (AND (NOT (LISTP V))
(NOT (LISTP X))
(EQUAL Z 'IPLUS)
(NOT (LISTP (CAR V)))
(CANCEL-INEG-AUX X (CADR V))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADR V)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADR V) A))))
(EQUAL (IPLUS (EVAL$ T (CAR V) A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CADR V)
A))
(IPLUS (EVAL$ T X A)
(EVAL$ T (CONS Z V) A)))).
But this further simplifies, applying CAR-NLISTP and CDR-NLISTP, and
opening up LISTP, CAR, and CANCEL-INEG-AUX, to:
T.
Case 3.2.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X))
(EQUAL Z 'IPLUS)
(NOT (LISTP W))
(CANCEL-INEG-AUX X (CAR D))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X (CAR D) A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CAR D) A))))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$-CANCEL-INEG-AUX-FN X
(CAR D)
A))
(IPLUS (EVAL$ T X A)
(EVAL$ T (CONS Z (CONS W D)) A)))).
This further simplifies, applying the lemma CAR-NLISTP, and opening up the
functions LISTP and CANCEL-INEG-AUX, to:
T.
Case 3.1.
(IMPLIES (AND (NOT (LISTP X))
(EQUAL Z 'IPLUS)
(NOT (LISTP W))
(CANCEL-INEG-AUX X V)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X V A)
(IPLUS (EVAL$ T X A) (EVAL$ T V A))))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$-CANCEL-INEG-AUX-FN X V A))
(IPLUS (EVAL$ T X A)
(EVAL$ T
(CONS Z (CONS W (CONS V C)))
A)))),
which further simplifies, applying COMMUTATIVITY-OF-IPLUS, REWRITE-EVAL$,
CAR-CONS, CDR-CONS, and COMMUTATIVITY2-OF-IPLUS, to:
(IMPLIES (AND (NOT (LISTP X))
(NOT (LISTP W))
(CANCEL-INEG-AUX X V)
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X V A)
(IPLUS (EVAL$ T V A) (EVAL$ T X A))))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$-CANCEL-INEG-AUX-FN X V A))
(IPLUS (EVAL$ T V A)
(IPLUS (EVAL$ T W A)
(EVAL$ T X A))))).
We now use the above equality hypothesis by substituting:
(IPLUS (EVAL$ T V A) (EVAL$ T X A))
for (EVAL$-CANCEL-INEG-AUX-FN X V A) and throwing away the equality. We
must thus prove the conjecture:
(IMPLIES (AND (NOT (LISTP X))
(NOT (LISTP W))
(CANCEL-INEG-AUX X V))
(EQUAL (IPLUS (EVAL$ T W A)
(IPLUS (EVAL$ T V A) (EVAL$ T X A)))
(IPLUS (EVAL$ T V A)
(IPLUS (EVAL$ T W A)
(EVAL$ T X A))))).
This further simplifies, applying the lemma COMMUTATIVITY2-OF-IPLUS, to:
T.
Case 2. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(EQUAL (CAR Y) 'IPLUS)
(NOT (LISTP (CADR Y)))
(NOT (CANCEL-INEG-AUX X (CADDR Y)))
(IMPLIES (NOT (EQUAL (CANCEL-INEG-AUX X (CADDR Y))
F))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X
(CADDR Y)
A)
(IPLUS (EVAL$ T X A)
(EVAL$ T (CADDR Y) A))))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, unfolding EQUAL, NOT, IMPLIES, and CANCEL-INEG-AUX, to:
T.
Case 1. (IMPLIES (AND (NOT (LISTP X))
(LISTP Y)
(NOT (EQUAL (CAR Y) 'INEG))
(NOT (EQUAL (CAR Y) 'IPLUS))
(NOT (EQUAL (CANCEL-INEG-AUX X Y) F)))
(EQUAL (EVAL$-CANCEL-INEG-AUX-FN X Y A)
(IPLUS (EVAL$ T X A) (EVAL$ T Y A)))),
which simplifies, unfolding the functions CANCEL-INEG-AUX and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.9 0.2 ]
CORRECTNESS-OF-CANCEL-INEG-AUX
(PROVE-LEMMA CORRECTNESS-OF-CANCEL-INEG
((META IPLUS))
(EQUAL (EVAL$ T X A)
(EVAL$ T (CANCEL-INEG X) A))
((DISABLE CANCEL-INEG-AUX)))
This formula simplifies, opening up the function CANCEL-INEG, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'IPLUS)
(CANCEL-INEG-AUX (CADR X) (CADDR X)))
(EQUAL (EVAL$ T X A)
(EVAL$ T
(CANCEL-INEG-AUX (CADR X) (CADDR X))
A))),
which again simplifies, rewriting with CORRECTNESS-OF-CANCEL-INEG-AUX and
EVAL$-CANCEL-INEG-AUX-IS-ITS-FN, to the new goal:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'IPLUS)
(CANCEL-INEG-AUX (CADR X) (CADDR X)))
(EQUAL (EVAL$ T X A)
(IPLUS (EVAL$ T (CADR X) A)
(EVAL$ T (CADDR X) A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate (CAR X)
and (CDR X), V by (CONS W D) to eliminate (CAR V) and (CDR V), and D by
(CONS V C) to eliminate (CAR D) and (CDR D). This produces the following
three new conjectures:
Case 3. (IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'IPLUS)
(CANCEL-INEG-AUX (CAR V) (CADR V)))
(EQUAL (EVAL$ T (CONS Z V) A)
(IPLUS (EVAL$ T (CAR V) A)
(EVAL$ T (CADR V) A)))).
This further simplifies, applying CAR-NLISTP and CDR-NLISTP, and opening up
CAR and CANCEL-INEG-AUX, to:
T.
Case 2. (IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'IPLUS)
(CANCEL-INEG-AUX W (CAR D)))
(EQUAL (EVAL$ T (CONS Z (CONS W D)) A)
(IPLUS (EVAL$ T W A)
(EVAL$ T (CAR D) A)))).
This further simplifies, appealing to the lemmas CAR-NLISTP, REWRITE-EVAL$,
CAR-CONS, CDR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, and COMMUTATIVITY-OF-IPLUS,
to:
T.
Case 1. (IMPLIES (AND (EQUAL Z 'IPLUS)
(CANCEL-INEG-AUX W V))
(EQUAL (EVAL$ T
(CONS Z (CONS W (CONS V C)))
A)
(IPLUS (EVAL$ T W A) (EVAL$ T V A)))),
which further simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS,
and COMMUTATIVITY-OF-IPLUS, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
CORRECTNESS-OF-CANCEL-INEG
(DISABLE CORRECTNESS-OF-CANCEL-INEG-AUX)
[ 0.0 0.0 0.0 ]
CORRECTNESS-OF-CANCEL-INEG-AUX-OFF
(DEFN IPLUS-FRINGE
(X)
(IF (LISTP X)
(IF (EQUAL (CAR X) 'IPLUS)
(APPEND (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))
(LIST X))
(LIST X)))
Linear arithmetic and the lemmas CAR-LESSEQP, CDR-LESSEQP, and CDR-LESSP
establish that the measure (COUNT X) decreases according to the well-founded
relation LESSP in each recursive call. Hence, IPLUS-FRINGE is accepted under
the principle of definition. From the definition we can conclude that
(LISTP (IPLUS-FRINGE X)) is a theorem.
[ 0.0 0.0 0.0 ]
IPLUS-FRINGE
(PROVE-LEMMA LESSP-COUNT-LISTP-CDR
(REWRITE)
(IMPLIES (LISTP (CDR X))
(LESSP (COUNT (CDR X)) (COUNT X))))
WARNING: Note that the proposed lemma LESSP-COUNT-LISTP-CDR is to be stored
as zero type prescription rules, zero compound recognizer rules, one linear
rule, and zero replacement rules.
This conjecture simplifies, using linear arithmetic and rewriting with
CDR-LESSEQP, to:
(IMPLIES (AND (EQUAL (COUNT (CDR X)) (COUNT X))
(LISTP (CDR X)))
(LESSP (COUNT X) (COUNT X))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS V Z) to eliminate (CDR X)
and (CAR X). This produces the following two new goals:
Case 2. (IMPLIES (AND (NOT (LISTP X))
(EQUAL (COUNT (CDR X)) (COUNT X))
(LISTP (CDR X)))
(LESSP (COUNT X) (COUNT X))).
But this further simplifies, applying CDR-NLISTP, and opening up COUNT and
LISTP, to:
T.
Case 1. (IMPLIES (AND (EQUAL (COUNT Z) (COUNT (CONS V Z)))
(LISTP Z))
(LESSP (COUNT (CONS V Z))
(COUNT (CONS V Z)))).
However this further simplifies, rewriting with the lemma COUNT-CONS, to:
(IMPLIES (AND (EQUAL (COUNT Z)
(ADD1 (PLUS (COUNT V) (COUNT Z))))
(LISTP Z))
(LESSP (COUNT Z) (COUNT Z))).
But this again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LESSP-COUNT-LISTP-CDR
(DEFN IPLUS-TREE-REC
(L)
(IF (NLISTP (CDR L))
(CAR L)
(LIST 'IPLUS
(CAR L)
(IPLUS-TREE-REC (CDR L)))))
Linear arithmetic, the lemmas CDR-LESSEQP and LESSP-COUNT-LISTP-CDR, and
the definition of NLISTP can be used to establish that the measure (COUNT L)
decreases according to the well-founded relation LESSP in each recursive call.
Hence, IPLUS-TREE-REC is accepted under the principle of definition.
[ 0.0 0.0 0.0 ]
IPLUS-TREE-REC
(DEFN IPLUS-TREE
(L)
(IF (LISTP L)
(IF (LISTP (CDR L))
(IPLUS-TREE-REC L)
(LIST 'FIX-INT (CAR L)))
''0))
[ 0.0 0.0 0.0 ]
IPLUS-TREE
(DEFN IPLUS-LIST
(X)
(IF (LISTP X)
(IPLUS (CAR X) (IPLUS-LIST (CDR X)))
0))
Linear arithmetic and the lemma CDR-LESSP inform us that the measure
(COUNT X) decreases according to the well-founded relation LESSP in each
recursive call. Hence, IPLUS-LIST is accepted under the definitional
principle. From the definition we can conclude that:
(OR (NUMBERP (IPLUS-LIST X))
(NEGATIVEP (IPLUS-LIST X)))
is a theorem.
[ 0.0 0.0 0.0 ]
IPLUS-LIST
(PROVE-LEMMA INTEGERP-IPLUS-LIST
(REWRITE)
(INTEGERP (IPLUS-LIST X)))
Call the conjecture *1.
Let us appeal to the induction principle. There is only one suggested
induction. We will induct according to the following scheme:
(AND (IMPLIES (AND (LISTP X) (p (CDR X)))
(p X))
(IMPLIES (NOT (LISTP X)) (p X))).
Linear arithmetic and the lemma CDR-LESSP inform us 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 two new goals:
Case 2. (IMPLIES (AND (LISTP X)
(INTEGERP (IPLUS-LIST (CDR X))))
(INTEGERP (IPLUS-LIST X))),
which simplifies, applying INTEGERP-IPLUS, and expanding the function
IPLUS-LIST, to:
T.
Case 1. (IMPLIES (NOT (LISTP X))
(INTEGERP (IPLUS-LIST X))).
This simplifies, expanding IPLUS-LIST and INTEGERP, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.3 ]
INTEGERP-IPLUS-LIST
(PROVE-LEMMA EVAL$-IPLUS-TREE-REC
(REWRITE)
(EQUAL (EVAL$ T (IPLUS-TREE-REC X) A)
(IF (LISTP X)
(IF (LISTP (CDR X))
(IPLUS-LIST (EVAL$ 'LIST X A))
(EVAL$ T (CAR X) A))
0)))
This simplifies, opening up IPLUS-TREE-REC, to the following three new goals:
Case 3. (IMPLIES (AND (NOT (LISTP X))
(NOT (LISTP (CDR X))))
(EQUAL (EVAL$ T (CAR X) A) 0)).
This again simplifies, applying CDR-NLISTP, CAR-NLISTP, and EVAL$-OTHER, and
expanding LISTP and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (LISTP X)) (LISTP (CDR X)))
(EQUAL (EVAL$ T
(LIST 'IPLUS
(CAR X)
(IPLUS-TREE-REC (CDR X)))
A)
0)).
This again simplifies, applying the lemma CDR-NLISTP, and expanding the
definition of LISTP, to:
T.
Case 1. (IMPLIES (AND (LISTP X) (LISTP (CDR X)))
(EQUAL (EVAL$ T
(LIST 'IPLUS
(CAR X)
(IPLUS-TREE-REC (CDR X)))
A)
(IPLUS-LIST (EVAL$ 'LIST X A)))),
which again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, and CDR-CONS,
to:
(IMPLIES (AND (LISTP X) (LISTP (CDR X)))
(EQUAL (IPLUS (EVAL$ T (CAR X) A)
(EVAL$ T (IPLUS-TREE-REC (CDR X)) A))
(IPLUS-LIST (EVAL$ 'LIST X A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS V Z) to eliminate
(CDR X) and (CAR X). We thus obtain:
(IMPLIES (LISTP Z)
(EQUAL (IPLUS (EVAL$ T V A)
(EVAL$ T (IPLUS-TREE-REC Z) A))
(IPLUS-LIST (EVAL$ 'LIST (CONS V Z) A)))),
which further simplifies, appealing to the lemmas EVAL$-LIST-CONS, CDR-CONS,
CAR-CONS, INTEGERP-IPLUS-LIST, FIX-INT-REMOVER, and IPLUS-CANCELLATION-1,
and unfolding IPLUS-LIST, to:
(IMPLIES (LISTP Z)
(EQUAL (FIX-INT (EVAL$ T (IPLUS-TREE-REC Z) A))
(IPLUS-LIST (EVAL$ 'LIST Z A)))),
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 (EVAL$ T (IPLUS-TREE-REC X) A)
(IF (LISTP X)
(IF (LISTP (CDR X))
(IPLUS-LIST (EVAL$ 'LIST X A))
(EVAL$ T (CAR X) A))
0)).
We gave this the name *1 above. Perhaps we can prove it by induction. There
is only one plausible induction. We will induct according to the following
scheme:
(AND (IMPLIES (NLISTP (CDR X)) (p X A))
(IMPLIES (AND (NOT (NLISTP (CDR X)))
(p (CDR X) A))
(p X A))).
Linear arithmetic, the lemmas CDR-LESSEQP and LESSP-COUNT-LISTP-CDR, and the
definition of 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 leads to two new conjectures:
Case 2. (IMPLIES (NLISTP (CDR X))
(EQUAL (EVAL$ T (IPLUS-TREE-REC X) A)
(IF (LISTP X)
(IF (LISTP (CDR X))
(IPLUS-LIST (EVAL$ 'LIST X A))
(EVAL$ T (CAR X) A))
0))),
which simplifies, unfolding the functions NLISTP and IPLUS-TREE-REC, to:
(IMPLIES (AND (NOT (LISTP (CDR X)))
(NOT (LISTP X)))
(EQUAL (EVAL$ T (CAR X) A) 0)).
This again simplifies, rewriting with the lemmas CDR-NLISTP, CAR-NLISTP, and
EVAL$-OTHER, and unfolding LISTP and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (NLISTP (CDR X)))
(EQUAL (EVAL$ T (IPLUS-TREE-REC (CDR X)) A)
(IF (LISTP (CDR X))
(IF (LISTP (CDDR X))
(IPLUS-LIST (EVAL$ 'LIST (CDR X) A))
(EVAL$ T (CADR X) A))
0)))
(EQUAL (EVAL$ T (IPLUS-TREE-REC X) A)
(IF (LISTP X)
(IF (LISTP (CDR X))
(IPLUS-LIST (EVAL$ 'LIST X A))
(EVAL$ T (CAR X) A))
0))),
which simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, and CDR-CONS, and
unfolding the definitions of NLISTP and IPLUS-TREE-REC, to the following
four new goals:
Case 1.4.
(IMPLIES (AND (LISTP (CDR X))
(NOT (LISTP (CDDR X)))
(EQUAL (EVAL$ T (IPLUS-TREE-REC (CDR X)) A)
(EVAL$ T (CADR X) A))
(NOT (LISTP X)))
(EQUAL (IPLUS (EVAL$ T (CAR X) A)
(EVAL$ T (CADR X) A))
0)).
However this again simplifies, applying CDR-NLISTP, and unfolding the
definition of LISTP, to:
T.
Case 1.3.
(IMPLIES (AND (LISTP (CDR X))
(NOT (LISTP (CDDR X)))
(EQUAL (EVAL$ T (IPLUS-TREE-REC (CDR X)) A)
(EVAL$ T (CADR X) A))
(LISTP X))
(EQUAL (IPLUS (EVAL$ T (CAR X) A)
(EVAL$ T (CADR X) A))
(IPLUS-LIST (EVAL$ 'LIST X A)))).
But this further simplifies, unfolding the function IPLUS-TREE-REC, to:
(IMPLIES (AND (LISTP (CDR X))
(NOT (LISTP (CDDR X)))
(LISTP X))
(EQUAL (IPLUS (EVAL$ T (CAR X) A)
(EVAL$ T (CADR X) A))
(IPLUS-LIST (EVAL$ 'LIST X A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS V Z) to
eliminate (CDR X) and (CAR X) and Z by (CONS D W) to eliminate (CDR Z) and
(CAR Z). This generates:
(IMPLIES (NOT (LISTP W))
(EQUAL (IPLUS (EVAL$ T V A) (EVAL$ T D A))
(IPLUS-LIST (EVAL$ 'LIST
(CONS V (CONS D W))
A)))).
This further simplifies, applying COMMUTATIVITY-OF-IPLUS,
EVAL$-LIST-NLISTP, EVAL$-LIST-CONS, CDR-CONS, CAR-CONS, IPLUS-0-LEFT, and
IPLUS-FIX-INT2, and unfolding the function IPLUS-LIST, to:
T.
Case 1.2.
(IMPLIES (AND (LISTP (CDR X))
(LISTP (CDDR X))
(EQUAL (EVAL$ T (IPLUS-TREE-REC (CDR X)) A)
(IPLUS-LIST (EVAL$ 'LIST (CDR X) A)))
(NOT (LISTP X)))
(EQUAL (IPLUS (EVAL$ T (CAR X) A)
(EVAL$ T (IPLUS-TREE-REC (CDR X)) A))
0)).
However this again simplifies, applying CDR-NLISTP, and expanding the
function LISTP, to:
T.
Case 1.1.
(IMPLIES (AND (LISTP (CDR X))
(LISTP (CDDR X))
(EQUAL (EVAL$ T (IPLUS-TREE-REC (CDR X)) A)
(IPLUS-LIST (EVAL$ 'LIST (CDR X) A)))
(LISTP X))
(EQUAL (IPLUS (EVAL$ T (CAR X) A)
(EVAL$ T (IPLUS-TREE-REC (CDR X)) A))
(IPLUS-LIST (EVAL$ 'LIST X A)))).
However this further simplifies, rewriting with the lemmas REWRITE-EVAL$,
CAR-CONS, and CDR-CONS, and opening up the function IPLUS-TREE-REC, to:
(IMPLIES (AND (LISTP (CDR X))
(LISTP (CDDR X))
(EQUAL (IPLUS (EVAL$ T (CADR X) A)
(EVAL$ T (IPLUS-TREE-REC (CDDR X)) A))
(IPLUS-LIST (EVAL$ 'LIST (CDR X) A)))
(LISTP X))
(EQUAL (IPLUS (EVAL$ T (CAR X) A)
(IPLUS-LIST (EVAL$ 'LIST (CDR X) A)))
(IPLUS-LIST (EVAL$ 'LIST X A)))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS V Z) to
eliminate (CDR X) and (CAR X) and Z by (CONS D W) to eliminate (CDR Z) and
(CAR Z). The result is:
(IMPLIES (AND (LISTP W)
(EQUAL (IPLUS (EVAL$ T D A)
(EVAL$ T (IPLUS-TREE-REC W) A))
(IPLUS-LIST (EVAL$ 'LIST (CONS D W) A))))
(EQUAL (IPLUS (EVAL$ T V A)
(IPLUS-LIST (EVAL$ 'LIST (CONS D W) A)))
(IPLUS-LIST (EVAL$ 'LIST
(CONS V (CONS D W))
A)))).
This further simplifies, applying EVAL$-LIST-CONS, CDR-CONS, CAR-CONS,
INTEGERP-IPLUS-LIST, FIX-INT-REMOVER, IPLUS-CANCELLATION-1, IPLUS-FIX-INT2,
and COMMUTATIVITY2-OF-IPLUS, and opening up IPLUS-LIST, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-IPLUS-TREE-REC
(PROVE-LEMMA EVAL$-IPLUS-TREE
(REWRITE)
(EQUAL (EVAL$ T (IPLUS-TREE X) A)
(IPLUS-LIST (EVAL$ 'LIST X A))))
This conjecture simplifies, expanding the definition of IPLUS-TREE, to the
following three new formulas:
Case 3. (IMPLIES (NOT (LISTP X))
(EQUAL (EVAL$ T ''0 A)
(IPLUS-LIST (EVAL$ 'LIST X A)))).
This again simplifies, applying EVAL$-QUOTE and EVAL$-LIST-NLISTP, and
opening up CAR, IPLUS-LIST, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (LISTP X) (LISTP (CDR X)))
(EQUAL (EVAL$ T (IPLUS-TREE-REC X) A)
(IPLUS-LIST (EVAL$ 'LIST X A)))).
This again simplifies, applying EVAL$-IPLUS-TREE-REC, to:
T.
Case 1. (IMPLIES (AND (LISTP X) (NOT (LISTP (CDR X))))
(EQUAL (EVAL$ T (LIST 'FIX-INT (CAR X)) A)
(IPLUS-LIST (EVAL$ 'LIST X A)))).
But this again simplifies, rewriting with REWRITE-EVAL$ and CAR-CONS, to:
(IMPLIES (AND (LISTP X) (NOT (LISTP (CDR X))))
(EQUAL (FIX-INT (EVAL$ T (CAR X) A))
(IPLUS-LIST (EVAL$ 'LIST X A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS V Z) to eliminate
(CDR X) and (CAR X). We thus obtain:
(IMPLIES (NOT (LISTP Z))
(EQUAL (FIX-INT (EVAL$ T V A))
(IPLUS-LIST (EVAL$ 'LIST (CONS V Z) A)))),
which further simplifies, rewriting with EVAL$-LIST-NLISTP, EVAL$-LIST-CONS,
COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, and CAR-CONS, and expanding
the definition of IPLUS-LIST, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-IPLUS-TREE
(PROVE-LEMMA EVAL$-LIST-APPEND
(REWRITE)
(EQUAL (EVAL$ 'LIST (APPEND X Y) A)
(APPEND (EVAL$ 'LIST X A)
(EVAL$ 'LIST Y A))))
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 (AND (LISTP X) (p (CDR X) Y A))
(p X Y A))
(IMPLIES (NOT (LISTP X)) (p X Y A))).
Linear arithmetic and the lemma CDR-LESSP 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 the following two new
formulas:
Case 2. (IMPLIES (AND (LISTP X)
(EQUAL (EVAL$ 'LIST (APPEND (CDR X) Y) A)
(APPEND (EVAL$ 'LIST (CDR X) A)
(EVAL$ 'LIST Y A))))
(EQUAL (EVAL$ 'LIST (APPEND X Y) A)
(APPEND (EVAL$ 'LIST X A)
(EVAL$ 'LIST Y A)))).
This simplifies, applying the lemma EVAL$-LIST-CONS, and expanding the
function APPEND, to:
(IMPLIES (AND (LISTP X)
(EQUAL (EVAL$ 'LIST (APPEND (CDR X) Y) A)
(APPEND (EVAL$ 'LIST (CDR X) A)
(EVAL$ 'LIST Y A))))
(EQUAL (CONS (EVAL$ T (CAR X) A)
(EVAL$ 'LIST (APPEND (CDR X) Y) A))
(APPEND (EVAL$ 'LIST X A)
(EVAL$ 'LIST Y A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS V Z) to eliminate
(CDR X) and (CAR X). This produces:
(IMPLIES (EQUAL (EVAL$ 'LIST (APPEND Z Y) A)
(APPEND (EVAL$ 'LIST Z A)
(EVAL$ 'LIST Y A)))
(EQUAL (CONS (EVAL$ T V A)
(EVAL$ 'LIST (APPEND Z Y) A))
(APPEND (EVAL$ 'LIST (CONS V Z) A)
(EVAL$ 'LIST Y A)))),
which further simplifies, rewriting with the lemmas EVAL$-LIST-CONS,
CDR-CONS, and CAR-CONS, and opening up the definition of APPEND, to:
T.
Case 1. (IMPLIES (NOT (LISTP X))
(EQUAL (EVAL$ 'LIST (APPEND X Y) A)
(APPEND (EVAL$ 'LIST X A)
(EVAL$ 'LIST Y A)))),
which simplifies, appealing to the lemma EVAL$-LIST-NLISTP, and unfolding
the functions APPEND and LISTP, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-LIST-APPEND
(DEFN CANCEL-IPLUS
(X)
(IF
(LISTP X)
(IF
(EQUAL (CAR X) 'EQUAL)
(COND
((LISTP (CADR X))
(COND
((EQUAL (CAADR X) 'IPLUS)
(COND
((LISTP (CADDR X))
(COND
((EQUAL (CAADDR X) 'IPLUS)
(IF (LISTP (BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))
(LIST 'EQUAL
(IPLUS-TREE (BAGDIFF (IPLUS-FRINGE (CADR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))))
(IPLUS-TREE (BAGDIFF (IPLUS-FRINGE (CADDR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))))
X))
((MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(LIST 'IF
(LIST 'INTEGERP (CADDR X))
(CONS 'EQUAL
(CONS (IPLUS-TREE (DELETE (CADDR X)
(IPLUS-FRINGE (CADR X))))
'('0)))
(LIST 'QUOTE F)))
(T X)))
((MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(LIST 'IF
(LIST 'INTEGERP (CADDR X))
(CONS 'EQUAL
(CONS (IPLUS-TREE (DELETE (CADDR X)
(IPLUS-FRINGE (CADR X))))
'('0)))
(LIST 'QUOTE F)))
(T X)))
((LISTP (CADDR X))
(IF (EQUAL (CAADDR X) 'IPLUS)
(IF (MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(LIST 'IF
(LIST 'INTEGERP (CADR X))
(LIST 'EQUAL
''0
(IPLUS-TREE (DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))))
(LIST 'QUOTE F))
X)
X))
(T X)))
((LISTP (CADDR X))
(IF (EQUAL (CAADDR X) 'IPLUS)
(IF (MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(LIST 'IF
(LIST 'INTEGERP (CADR X))
(LIST 'EQUAL
''0
(IPLUS-TREE (DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))))
(LIST 'QUOTE F))
X)
X))
(T X))
X)
X))
Note that (OR (LISTP (CANCEL-IPLUS X)) (EQUAL (CANCEL-IPLUS X) X)) is a
theorem.
[ 0.0 0.0 0.0 ]
CANCEL-IPLUS
(LEMMA EVAL$-CANCEL-IPLUS
(REWRITE)
(EQUAL
(EVAL$ T (CANCEL-IPLUS X) A)
(IF
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL))
(IF (AND (LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS))
(LET ((XS (IPLUS-FRINGE (CADR X)))
(YS (IPLUS-FRINGE (CADDR X))))
(LET ((BAGINT (BAGINT XS YS)))
(IF (LISTP BAGINT)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(BAGDIFF XS (BAGINT XS YS))
A))
(IPLUS-LIST (EVAL$ 'LIST
(BAGDIFF YS (BAGINT XS YS))
A)))
(EVAL$ T X A))))
(IF (AND (LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X))))
(IF (INTEGERP (EVAL$ T (CADDR X) A))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(DELETE (CADDR X)
(IPLUS-FRINGE (CADR X)))
A))
0)
F)
(IF (AND (LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X))))
(IF (INTEGERP (EVAL$ T (CADR X) A))
(EQUAL 0
(IPLUS-LIST (EVAL$ 'LIST
(DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))
A)))
F)
(EVAL$ T X A))))
(EVAL$ T X A)))
((ENABLE EVAL$-IPLUS-TREE CANCEL-IPLUS EVAL$-LIST-CONS EVAL$-LITATOM
EVAL$-QUOTE)
(DISABLE EVAL$)))
This simplifies, expanding CANCEL-IPLUS and AND, to nine new formulas:
Case 9. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (EQUAL (CAADR X) 'IPLUS))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(NOT (INTEGERP (EVAL$ T (CADR X) A))))
(EQUAL
(EVAL$ T
(LIST 'IF
(LIST 'INTEGERP (CADR X))
(LIST 'EQUAL
''0
(IPLUS-TREE (DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))))
(LIST 'QUOTE F))
A)
F)),
which again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS,
and EVAL$-QUOTE, and expanding the definitions of CAR and EQUAL, to:
T.
Case 8. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (LISTP (CADR X)))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(NOT (INTEGERP (EVAL$ T (CADR X) A))))
(EQUAL
(EVAL$ T
(LIST 'IF
(LIST 'INTEGERP (CADR X))
(LIST 'EQUAL
''0
(IPLUS-TREE (DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))))
(LIST 'QUOTE F))
A)
F)).
But this again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS,
and EVAL$-QUOTE, and expanding the functions CAR and EQUAL, to:
T.
Case 7. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (EQUAL (CAADR X) 'IPLUS))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(INTEGERP (EVAL$ T (CADR X) A)))
(EQUAL
(EVAL$ T
(LIST 'IF
(LIST 'INTEGERP (CADR X))
(LIST 'EQUAL
''0
(IPLUS-TREE (DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))))
(LIST 'QUOTE F))
A)
(EQUAL 0
(IPLUS-LIST (EVAL$ 'LIST
(DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))
A))))).
However this again simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS,
EVAL$-QUOTE, and EVAL$-IPLUS-TREE, and opening up the function CAR, to:
T.
Case 6. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (LISTP (CADR X)))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(INTEGERP (EVAL$ T (CADR X) A)))
(EQUAL
(EVAL$ T
(LIST 'IF
(LIST 'INTEGERP (CADR X))
(LIST 'EQUAL
''0
(IPLUS-TREE (DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))))
(LIST 'QUOTE F))
A)
(EQUAL 0
(IPLUS-LIST (EVAL$ 'LIST
(DELETE (CADR X)
(IPLUS-FRINGE (CADDR X)))
A))))).
But this again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS,
EVAL$-QUOTE, and EVAL$-IPLUS-TREE, and unfolding the definition of CAR, to:
T.
Case 5. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (EQUAL (CAADDR X) 'IPLUS))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(INTEGERP (EVAL$ T (CADDR X) A)))
(EQUAL
(EVAL$ T
(LIST 'IF
(LIST 'INTEGERP (CADDR X))
(CONS 'EQUAL
(CONS (IPLUS-TREE (DELETE (CADDR X)
(IPLUS-FRINGE (CADR X))))
'('0)))
(LIST 'QUOTE F))
A)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(DELETE (CADDR X)
(IPLUS-FRINGE (CADR X)))
A))
0))).
This again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS,
EVAL$-IPLUS-TREE, and EVAL$-QUOTE, and unfolding the function CAR, to:
T.
Case 4. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (LISTP (CADDR X)))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(INTEGERP (EVAL$ T (CADDR X) A)))
(EQUAL
(EVAL$ T
(LIST 'IF
(LIST 'INTEGERP (CADDR X))
(CONS 'EQUAL
(CONS (IPLUS-TREE (DELETE (CADDR X)
(IPLUS-FRINGE (CADR X))))
'('0)))
(LIST 'QUOTE F))
A)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(DELETE (CADDR X)
(IPLUS-FRINGE (CADR X)))
A))
0))).
But this again simplifies, applying the lemmas REWRITE-EVAL$, CAR-CONS,
CDR-CONS, EVAL$-IPLUS-TREE, and EVAL$-QUOTE, and unfolding CAR, to:
T.
Case 3. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (EQUAL (CAADDR X) 'IPLUS))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(NOT (INTEGERP (EVAL$ T (CADDR X) A))))
(EQUAL
(EVAL$ T
(LIST 'IF
(LIST 'INTEGERP (CADDR X))
(CONS 'EQUAL
(CONS (IPLUS-TREE (DELETE (CADDR X)
(IPLUS-FRINGE (CADR X))))
'('0)))
(LIST 'QUOTE F))
A)
F)),
which again simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
EVAL$-QUOTE, and opening up CAR and EQUAL, to:
T.
Case 2. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (LISTP (CADDR X)))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(NOT (INTEGERP (EVAL$ T (CADDR X) A))))
(EQUAL
(EVAL$ T
(LIST 'IF
(LIST 'INTEGERP (CADDR X))
(CONS 'EQUAL
(CONS (IPLUS-TREE (DELETE (CADDR X)
(IPLUS-FRINGE (CADR X))))
'('0)))
(LIST 'QUOTE F))
A)
F)).
This again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
EVAL$-QUOTE, and expanding the functions CAR and EQUAL, to:
T.
Case 1. (IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))))
(EQUAL
(EVAL$ T
(LIST 'EQUAL
(IPLUS-TREE (BAGDIFF (IPLUS-FRINGE (CADR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))))
(IPLUS-TREE (BAGDIFF (IPLUS-FRINGE (CADDR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))))
A)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(BAGDIFF (IPLUS-FRINGE (CADR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))
A))
(IPLUS-LIST (EVAL$ 'LIST
(BAGDIFF (IPLUS-FRINGE (CADDR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))
A))))).
This again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS,
EVAL$-IPLUS-TREE, and CDR-CONS, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
EVAL$-CANCEL-IPLUS
(DISABLE CANCEL-IPLUS)
[ 0.0 0.0 0.0 ]
CANCEL-IPLUS-OFF
(PROVE-LEMMA EVAL$-IPLUS-LIST-DELETE
(REWRITE)
(IMPLIES (MEMBER Z Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z Y) A))
(IDIFFERENCE (IPLUS-LIST (EVAL$ 'LIST Y A))
(EVAL$ T Z A)))))
This formula can be simplified, using the abbreviations IMPLIES and
IDIFFERENCE, to the new conjecture:
(IMPLIES (MEMBER Z Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z Y) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (EVAL$ T Z A))))),
which simplifies, rewriting with COMMUTATIVITY-OF-IPLUS, to the new formula:
(IMPLIES (MEMBER Z Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z Y) A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))),
which we will name *1.
Perhaps we can prove it by induction. Two 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 Y) (p Z Y A))
(IMPLIES (AND (NOT (NLISTP Y))
(EQUAL Z (CAR Y)))
(p Z Y A))
(IMPLIES (AND (NOT (NLISTP Y))
(NOT (EQUAL Z (CAR Y)))
(p Z (CDR Y) A))
(p Z Y A))).
Linear arithmetic, the lemmas CDR-LESSEQP and CDR-LESSP, and the definition of
NLISTP inform us that the measure (COUNT Y) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme generates the following four new conjectures:
Case 4. (IMPLIES (AND (NLISTP Y) (MEMBER Z Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z Y) A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
This simplifies, rewriting with MEMBER-NON-LIST, and expanding the function
NLISTP, to:
T.
Case 3. (IMPLIES (AND (NOT (NLISTP Y))
(EQUAL Z (CAR Y))
(MEMBER Z Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z Y) A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))),
which simplifies, unfolding the definitions of NLISTP, MEMBER, and DELETE,
to:
(IMPLIES (LISTP Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (CDR Y) A))
(IPLUS (INEG (EVAL$ T (CAR Y) A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS V X) to
eliminate (CDR Y) and (CAR Y). This generates:
(EQUAL (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS (INEG (EVAL$ T V A))
(IPLUS-LIST (EVAL$ 'LIST (CONS V X) A)))).
But this further simplifies, applying EVAL$-LIST-CONS, CDR-CONS, CAR-CONS,
CORRECTNESS-OF-CANCEL-INEG, INTEGERP-IPLUS-LIST, and FIX-INT-REMOVER, and
opening up the definition of IPLUS-LIST, to:
T.
Case 2. (IMPLIES (AND (NOT (NLISTP Y))
(NOT (EQUAL Z (CAR Y)))
(NOT (MEMBER Z (CDR Y)))
(MEMBER Z Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z Y) A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
This simplifies, opening up the definitions of NLISTP and MEMBER, to:
T.
Case 1. (IMPLIES (AND (NOT (NLISTP Y))
(NOT (EQUAL Z (CAR Y)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z (CDR Y)) A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST (CDR Y) A))))
(MEMBER Z Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z Y) A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
This simplifies, rewriting with the lemmas EVAL$-LIST-CONS, CDR-CONS, and
CAR-CONS, and expanding the functions NLISTP, MEMBER, DELETE, and IPLUS-LIST,
to the new goal:
(IMPLIES
(AND (LISTP Y)
(NOT (EQUAL Z (CAR Y)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z (CDR Y)) A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST (CDR Y) A))))
(MEMBER Z (CDR Y)))
(EQUAL (IPLUS (EVAL$ T (CAR Y) A)
(IPLUS-LIST (EVAL$ 'LIST (DELETE Z (CDR Y)) A)))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
Applying the lemma CAR-CDR-ELIM, replace Y by (CONS X V) to eliminate
(CAR Y) and (CDR Y). We thus obtain:
(IMPLIES (AND (NOT (EQUAL Z X))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (DELETE Z V) A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST V A))))
(MEMBER Z V))
(EQUAL (IPLUS (EVAL$ T X A)
(IPLUS-LIST (EVAL$ 'LIST (DELETE Z V) A)))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS-LIST (EVAL$ 'LIST (CONS X V) A))))),
which further simplifies, applying EVAL$-LIST-CONS, CDR-CONS, CAR-CONS, and
COMMUTATIVITY2-OF-IPLUS, and expanding the function IPLUS-LIST, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-IPLUS-LIST-DELETE
(PROVE-LEMMA EVAL$-IPLUS-LIST-BAGDIFF
(REWRITE)
(IMPLIES (SUBBAGP X Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (BAGDIFF Y X) A))
(IDIFFERENCE (IPLUS-LIST (EVAL$ 'LIST Y A))
(IPLUS-LIST (EVAL$ 'LIST X A))))))
This formula can be simplified, using the abbreviations IMPLIES and
IDIFFERENCE, to:
(IMPLIES (SUBBAGP X Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (BAGDIFF Y X) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST X A)))))),
which we will name *1.
We will appeal to induction. Two 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 (AND (LISTP X)
(MEMBER (CAR X) Y)
(p (DELETE (CAR X) Y) (CDR X) A))
(p Y X A))
(IMPLIES (AND (LISTP X)
(NOT (MEMBER (CAR X) Y))
(p Y (CDR X) A))
(p Y X A))
(IMPLIES (NOT (LISTP X)) (p Y X A))).
Linear arithmetic and the lemma CDR-LESSP 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 Y. The above induction scheme produces five new formulas:
Case 5. (IMPLIES (AND (LISTP X)
(MEMBER (CAR X) Y)
(NOT (SUBBAGP (CDR X) (DELETE (CAR X) Y)))
(SUBBAGP X Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (BAGDIFF Y X) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST X A)))))),
which simplifies, opening up SUBBAGP, to:
T.
Case 4. (IMPLIES
(AND (LISTP X)
(MEMBER (CAR X) Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(BAGDIFF (DELETE (CAR X) Y) (CDR X))
A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST (DELETE (CAR X) Y) A))
(INEG (IPLUS-LIST (EVAL$ 'LIST (CDR X) A)))))
(SUBBAGP X Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (BAGDIFF Y X) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST X A)))))),
which simplifies, applying the lemmas COMMUTATIVITY-OF-IPLUS,
EVAL$-IPLUS-LIST-DELETE, and ASSOCIATIVITY-OF-IPLUS, and opening up the
definitions of IDIFFERENCE, SUBBAGP, and BAGDIFF, to the conjecture:
(IMPLIES
(AND
(LISTP X)
(MEMBER (CAR X) Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(BAGDIFF (DELETE (CAR X) Y) (CDR X))
A))
(IPLUS (INEG (EVAL$ T (CAR X) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST (CDR X) A))))))
(SUBBAGP (CDR X) (DELETE (CAR X) Y)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(BAGDIFF (DELETE (CAR X) Y) (CDR X))
A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST X A)))))).
However this further simplifies, applying the lemma BAGDIFF-DELETE, to the
formula:
(IMPLIES
(AND
(LISTP X)
(MEMBER (CAR X) Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(DELETE (CAR X) (BAGDIFF Y (CDR X)))
A))
(IPLUS (INEG (EVAL$ T (CAR X) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST (CDR X) A))))))
(SUBBAGP (CDR X) (DELETE (CAR X) Y)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(DELETE (CAR X) (BAGDIFF Y (CDR X)))
A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST X A)))))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X). The result is the conjecture:
(IMPLIES
(AND (MEMBER Z Y)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(DELETE Z (BAGDIFF Y V))
A))
(IPLUS (INEG (EVAL$ T Z A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST V A))))))
(SUBBAGP V (DELETE Z Y)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(DELETE Z (BAGDIFF Y V))
A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST (CONS Z V) A)))))).
But this further simplifies, rewriting with the lemmas EVAL$-LIST-CONS,
CDR-CONS, CAR-CONS, INEG-IPLUS, and COMMUTATIVITY2-OF-IPLUS, and expanding
the definition of IPLUS-LIST, to:
T.
Case 3. (IMPLIES (AND (LISTP X)
(NOT (MEMBER (CAR X) Y))
(NOT (SUBBAGP (CDR X) Y))
(SUBBAGP X Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (BAGDIFF Y X) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST X A)))))),
which simplifies, expanding the definition of SUBBAGP, to:
T.
Case 2. (IMPLIES
(AND (LISTP X)
(NOT (MEMBER (CAR X) Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (BAGDIFF Y (CDR X)) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST (CDR X) A)))))
(SUBBAGP X Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (BAGDIFF Y X) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST X A)))))),
which simplifies, expanding the definition of SUBBAGP, to:
T.
Case 1. (IMPLIES (AND (NOT (LISTP X)) (SUBBAGP X Y))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (BAGDIFF Y X) A))
(IPLUS (IPLUS-LIST (EVAL$ 'LIST Y A))
(INEG (IPLUS-LIST (EVAL$ 'LIST X A)))))),
which simplifies, rewriting with SUBBAGP-CDR2, EVAL$-LIST-NLISTP,
INTEGERP-IPLUS-LIST, FIX-INT-REMOVER, IPLUS-0-LEFT, and
COMMUTATIVITY-OF-IPLUS, and expanding the definitions of SUBBAGP, BAGDIFF,
IPLUS-LIST, and INEG, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.0 ]
EVAL$-IPLUS-LIST-BAGDIFF
(PROVE-LEMMA IPLUS-LIST-APPEND
(REWRITE)
(EQUAL (IPLUS-LIST (APPEND X Y))
(IPLUS (IPLUS-LIST X)
(IPLUS-LIST Y))))
Call the conjecture *1.
Perhaps we can prove it by induction. 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 (AND (LISTP X) (p (CDR X) Y))
(p X Y))
(IMPLIES (NOT (LISTP X)) (p X Y))).
Linear arithmetic and the lemma CDR-LESSP 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 leads to two
new goals:
Case 2. (IMPLIES (AND (LISTP X)
(EQUAL (IPLUS-LIST (APPEND (CDR X) Y))
(IPLUS (IPLUS-LIST (CDR X))
(IPLUS-LIST Y))))
(EQUAL (IPLUS-LIST (APPEND X Y))
(IPLUS (IPLUS-LIST X)
(IPLUS-LIST Y)))),
which simplifies, applying the lemmas COMMUTATIVITY-OF-IPLUS, CDR-CONS,
CAR-CONS, and ASSOCIATIVITY-OF-IPLUS, and opening up the definitions of
APPEND and IPLUS-LIST, to:
T.
Case 1. (IMPLIES (NOT (LISTP X))
(EQUAL (IPLUS-LIST (APPEND X Y))
(IPLUS (IPLUS-LIST X)
(IPLUS-LIST Y)))),
which simplifies, rewriting with INTEGERP-IPLUS-LIST, FIX-INT-REMOVER, and
IPLUS-0-LEFT, and opening up the functions APPEND and IPLUS-LIST, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-LIST-APPEND
(DISABLE IPLUS-TREE)
[ 0.0 0.0 0.0 ]
IPLUS-TREE-OFF
(LEMMA NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS
(REWRITE)
(IMPLIES (NOT (INTEGERP A))
(EQUAL (EQUAL A (IPLUS B C)) F))
((USE (INTEGERP-IPLUS (X B) (Y C)))
(ENABLE INTEGERP)
(DO-NOT-INDUCT T)))
This formula can be simplified, using the abbreviations INTEGERP, NOT, and
IMPLIES, to:
(IMPLIES (AND (INTEGERP (IPLUS B C))
(NOT (NUMBERP A))
(NOT (IF (NEGATIVEP A)
(IF (EQUAL (NEGATIVE-GUTS A) 0) F T)
F)))
(EQUAL (EQUAL A (IPLUS B C)) F)),
which simplifies, unfolding the definition of INTEGERP, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS
(PROVE-LEMMA IPLUS-LIST-EVAL$-FRINGE
(REWRITE)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (IPLUS-FRINGE X) A))
(FIX-INT (EVAL$ T X A)))
((INDUCT (IPLUS-FRINGE X))))
This conjecture can be simplified, using the abbreviations NOT, OR, and AND,
to three new conjectures:
Case 3. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'IPLUS)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(IPLUS-FRINGE (CADDR X))
A))
(FIX-INT (EVAL$ T (CADDR X) A)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(IPLUS-FRINGE (CADR X))
A))
(FIX-INT (EVAL$ T (CADR X) A))))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (IPLUS-FRINGE X) A))
(FIX-INT (EVAL$ T X A)))),
which simplifies, rewriting with EVAL$-LIST-APPEND, IPLUS-FIX-INT1,
IPLUS-FIX-INT2, and IPLUS-LIST-APPEND, and expanding the definitions of
EQUAL and IPLUS-FRINGE, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'IPLUS)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(IPLUS-FRINGE (CADDR X))
A))
(FIX-INT (EVAL$ T (CADDR X) A)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(IPLUS-FRINGE (CADR X))
A))
(FIX-INT (EVAL$ T (CADR X) A))))
(EQUAL (IPLUS (EVAL$ T (CADR X) A)
(EVAL$ T (CADDR X) A))
(FIX-INT (EVAL$ T X A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X), V by (CONS D W) to eliminate (CDR V) and (CAR V), and W
by (CONS V C) to eliminate (CAR W) and (CDR W). This produces the following
three new conjectures:
Case 3.3.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'IPLUS)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(IPLUS-FRINGE (CADR V))
A))
(FIX-INT (EVAL$ T (CADR V) A)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(IPLUS-FRINGE (CAR V))
A))
(FIX-INT (EVAL$ T (CAR V) A))))
(EQUAL (IPLUS (EVAL$ T (CAR V) A)
(EVAL$ T (CADR V) A))
(FIX-INT (EVAL$ T (CONS Z V) A)))).
But this further simplifies, rewriting with CDR-NLISTP, EVAL$-OTHER,
EVAL$-LIST-NLISTP, EVAL$-LIST-CONS, CAR-NLISTP, and REWRITE-EVAL$, and
opening up CAR, IPLUS-FRINGE, CONS, IPLUS-LIST, FIX-INT, EQUAL, and IPLUS,
to:
T.
Case 3.2.
(IMPLIES (AND (NOT (LISTP W))
(EQUAL Z 'IPLUS)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST
(IPLUS-FRINGE (CAR W))
A))
(FIX-INT (EVAL$ T (CAR W) A)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (IPLUS-FRINGE D) A))
(FIX-INT (EVAL$ T D A))))
(EQUAL (IPLUS (EVAL$ T D A)
(EVAL$ T (CAR W) A))
(FIX-INT (EVAL$ T (CONS Z (CONS D W)) A)))).
This further simplifies, rewriting with CAR-NLISTP, EVAL$-OTHER,
EVAL$-LIST-NLISTP, EVAL$-LIST-CONS, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS,
REWRITE-EVAL$, CAR-CONS, CDR-CONS, and FIX-INT-FIX-INT, and unfolding the
definitions of IPLUS-FRINGE, CONS, IPLUS-LIST, FIX-INT, and EQUAL, to:
T.
Case 3.1.
(IMPLIES (AND (EQUAL Z 'IPLUS)
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (IPLUS-FRINGE V) A))
(FIX-INT (EVAL$ T V A)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (IPLUS-FRINGE D) A))
(FIX-INT (EVAL$ T D A))))
(EQUAL (IPLUS (EVAL$ T D A) (EVAL$ T V A))
(FIX-INT (EVAL$ T
(CONS Z (CONS D (CONS V C)))
A)))).
This further simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
FIX-INT-IPLUS, to:
T.
Case 2. (IMPLIES (AND (LISTP X)
(NOT (EQUAL (CAR X) 'IPLUS)))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (IPLUS-FRINGE X) A))
(FIX-INT (EVAL$ T X A)))).
This simplifies, rewriting with EVAL$-LIST-NLISTP, EVAL$-LIST-CONS,
COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, and CAR-CONS, and expanding
IPLUS-FRINGE and IPLUS-LIST, to:
T.
Case 1. (IMPLIES (NOT (LISTP X))
(EQUAL (IPLUS-LIST (EVAL$ 'LIST (IPLUS-FRINGE X) A))
(FIX-INT (EVAL$ T X A)))),
which simplifies, applying EVAL$-LIST-NLISTP, EVAL$-LIST-CONS,
COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, and CAR-CONS, and expanding
the definitions of IPLUS-FRINGE and IPLUS-LIST, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-LIST-EVAL$-FRINGE
(PROVE-LEMMA IPLUS-INEG5-LEMMA-1
(REWRITE)
(IMPLIES (INTEGERP X)
(EQUAL (EQUAL X (IPLUS Y (IPLUS (INEG Z) W)))
(EQUAL X
(IPLUS (INEG Z) (IPLUS Y W))))))
This conjecture simplifies, rewriting with the lemmas COMMUTATIVITY-OF-IPLUS
and COMMUTATIVITY2-OF-IPLUS, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-INEG5-LEMMA-1
(PROVE-LEMMA IPLUS-INEG5-LEMMA-2
(REWRITE)
(IMPLIES (AND (INTEGERP X) (INTEGERP V))
(EQUAL (EQUAL X (IPLUS (INEG Z) V))
(EQUAL (IPLUS X Z) V))))
This conjecture simplifies, applying COMMUTATIVITY-OF-IPLUS, to two new
conjectures:
Case 2. (IMPLIES (AND (INTEGERP X)
(INTEGERP V)
(NOT (EQUAL (IPLUS X Z) V)))
(NOT (EQUAL X (IPLUS V (INEG Z))))),
which again simplifies, rewriting with INTEGERP-IPLUS,
CORRECTNESS-OF-CANCEL-INEG, FIX-INT-REMOVER, IPLUS-0-LEFT,
COMMUTATIVITY-OF-IPLUS, and ASSOCIATIVITY-OF-IPLUS, to:
T.
Case 1. (IMPLIES (AND (INTEGERP X)
(INTEGERP V)
(EQUAL (IPLUS X Z) V))
(EQUAL (EQUAL X (IPLUS V (INEG Z)))
T)).
This again simplifies, applying INTEGERP-IPLUS, CORRECTNESS-OF-CANCEL-INEG,
FIX-INT-REMOVER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
ASSOCIATIVITY-OF-IPLUS, and expanding the function EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-INEG5-LEMMA-2
(LEMMA IPLUS-INEG5
(REWRITE)
(IMPLIES (INTEGERP X)
(EQUAL (EQUAL X (IPLUS Y (IPLUS (INEG Z) W)))
(EQUAL (IPLUS X Z) (IPLUS Y W))))
((ENABLE IPLUS-INEG5-LEMMA-1 IPLUS-INEG5-LEMMA-2 INTEGERP-IPLUS)))
WARNING: the previously added lemma, IPLUS-INEG5-LEMMA-1, could be applied
whenever the newly proposed IPLUS-INEG5 could!
This formula simplifies, rewriting with INTEGERP-IPLUS, IPLUS-INEG5-LEMMA-2,
and IPLUS-INEG5-LEMMA-1, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-INEG5
(DISABLE IPLUS-INEG5-LEMMA-1)
[ 0.0 0.0 0.0 ]
IPLUS-INEG5-LEMMA-1-OFF
(DISABLE IPLUS-INEG5-LEMMA-2)
[ 0.0 0.0 0.0 ]
IPLUS-INEG5-LEMMA-2-OFF
(LEMMA IPLUS-INEG6
(REWRITE)
(IMPLIES (INTEGERP X)
(EQUAL (EQUAL X (IPLUS Y (IPLUS W (INEG Z))))
(EQUAL (IPLUS X Z) (IPLUS Y W))))
((USE (IPLUS-INEG5)
(COMMUTATIVITY-OF-IPLUS (X W)
(Y (INEG Z))))))
This formula simplifies, expanding the functions IMPLIES and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-INEG6
(PROVE-LEMMA EVAL$-IPLUS
(REWRITE)
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'IPLUS))
(EQUAL (EVAL$ T X A)
(IPLUS (EVAL$ T (CADR X) A)
(EVAL$ T (CADDR X) A)))))
.
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate (CAR X)
and (CDR X), V by (CONS W D) to eliminate (CAR V) and (CDR V), and D by
(CONS V C) to eliminate (CAR D) and (CDR D). We would thus like to prove the
following three new goals:
Case 3. (IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'IPLUS))
(EQUAL (EVAL$ T (CONS Z V) A)
(IPLUS (EVAL$ T (CAR V) A)
(EVAL$ T (CADR V) A)))).
But this simplifies, applying REWRITE-EVAL$, CAR-NLISTP, EVAL$-OTHER, and
CDR-NLISTP, and expanding CAR, IPLUS, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'IPLUS))
(EQUAL (EVAL$ T (CONS Z (CONS W D)) A)
(IPLUS (EVAL$ T W A)
(EVAL$ T (CAR D) A)))).
But this simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS,
CAR-NLISTP, EVAL$-OTHER, IPLUS-0-LEFT, and COMMUTATIVITY-OF-IPLUS, to:
T.
Case 1. (IMPLIES (EQUAL Z 'IPLUS)
(EQUAL (EVAL$ T
(CONS Z (CONS W (CONS V C)))
A)
(IPLUS (EVAL$ T W A) (EVAL$ T V A)))).
This simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
COMMUTATIVITY-OF-IPLUS, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EVAL$-IPLUS
(PROVE-LEMMA IPLUS-INEG7
(REWRITE)
(EQUAL (EQUAL 0 (IPLUS X (INEG Y)))
(EQUAL (FIX-INT Y) (FIX-INT X)))
((ENABLE-THEORY INTEGER-DEFNS)))
This formula simplifies, expanding INEG, INTEGERP, and FIX-INT, to 40 new
conjectures:
Case 40.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL Y X))
(NEGATIVEP Y))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))),
which again simplifies, clearly, to:
T.
Case 39.(IMPLIES (AND (NUMBERP X)
(NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL 0 X)))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))).
But this again simplifies, applying the lemmas FIX-INT-REMOVER, IPLUS-0-LEFT,
and COMMUTATIVITY-OF-IPLUS, and opening up INTEGERP, to:
T.
Case 38.(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL Y X)))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))),
which again simplifies, applying EQUAL-PLUS-0, and expanding IPLUS, to:
T.
Case 37.(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(NUMBERP Y)
(NOT (EQUAL Y 0))
(NEGATIVEP Y))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))).
This again simplifies, obviously, to:
T.
Case 36.(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL Y 0)))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))).
But this again simplifies, opening up PLUS and IPLUS, to:
T.
Case 35.(IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NUMBERP Y)
(NOT (EQUAL Y 0))
(NEGATIVEP Y))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))),
which again simplifies, obviously, to:
T.
Case 34.(IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL Y 0)))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))).
This again simplifies, unfolding the functions PLUS, DIFFERENCE, LESSP,
EQUAL, and IPLUS, to:
T.
Case 33.(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NUMBERP Y)
(NOT (EQUAL Y X))
(NEGATIVEP Y))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))),
which again simplifies, clearly, to:
T.
Case 32.(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL 0 X)))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))).
This again simplifies, applying FIX-INT-REMOVER, IPLUS-0-LEFT, and
COMMUTATIVITY-OF-IPLUS, and expanding the definition of INTEGERP, to:
T.
Case 31.(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL Y X)))
(NOT (EQUAL 0
(IPLUS X (NEGATIVE-GUTS Y))))).
This again simplifies, opening up the function IPLUS, to the goal:
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL Y X))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X))))
(NOT (EQUAL 0
(DIFFERENCE (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X))))).
This again simplifies, appealing to the lemma EQUAL-DIFFERENCE-0, to:
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (EQUAL Y X))
(NOT (LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X))))
(LESSP (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))).
But this again simplifies, using linear arithmetic, to:
(IMPLIES (AND (EQUAL (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL Y X))
(NOT (LESSP (NEGATIVE-GUTS X)
(NEGATIVE-GUTS X))))
(LESSP (NEGATIVE-GUTS X)
(NEGATIVE-GUTS X))).
This again simplifies, obviously, to:
T.
Case 30.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(EQUAL Y X)
(NEGATIVEP Y))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
This again simplifies, obviously, to:
T.
Case 29.(IMPLIES (AND (NUMBERP X)
(NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL 0 X))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
However this again simplifies, expanding the definitions of NUMBERP, IPLUS,
and EQUAL, to:
T.
Case 28.(IMPLIES (AND (NUMBERP X)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL Y X))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)),
which again simplifies, obviously, to:
T.
Case 27.(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(NUMBERP Y)
(EQUAL Y 0)
(NEGATIVEP Y))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
This again simplifies, clearly, to:
T.
Case 26.(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
However this again simplifies, appealing to the lemmas IPLUS-0-LEFT and
COMMUTATIVITY-OF-IPLUS, and unfolding INTEGERP, FIX-INT, and EQUAL, to:
T.
Case 25.(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL Y 0))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)),
which again simplifies, trivially, to:
T.
Case 24.(IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NUMBERP Y)
(EQUAL Y 0)
(NEGATIVEP Y))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
This again simplifies, obviously, to:
T.
Case 23.(IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
This again simplifies, appealing to the lemmas IPLUS-0-LEFT and
COMMUTATIVITY-OF-IPLUS, and unfolding the definitions of INTEGERP, EQUAL,
and FIX-INT, to:
T.
Case 22.(IMPLIES (AND (NOT (NUMBERP X))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0)
(NEGATIVEP Y)
(EQUAL Y 0))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)),
which again simplifies, obviously, to:
T.
Case 21.(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NUMBERP Y)
(EQUAL Y X)
(NEGATIVEP Y))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
This again simplifies, trivially, to:
T.
Case 20.(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NUMBERP Y))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL 0 X))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
This again simplifies, obviously, to:
T.
Case 19.(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL Y X))
(EQUAL (EQUAL 0 (IPLUS X (NEGATIVE-GUTS Y)))
T)).
This again simplifies, applying DIFFERENCE-X-X, and opening up MINUS and
IPLUS, to:
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(NOT (LESSP (NEGATIVE-GUTS X)
(NEGATIVE-GUTS X)))),
which again simplifies, using linear arithmetic, to:
T.
Case 18.(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NOT (EQUAL 0 X)))
(NOT (EQUAL 0 (IPLUS X 0)))),
which again simplifies, applying the lemmas FIX-INT-REMOVER, IPLUS-0-LEFT,
and COMMUTATIVITY-OF-IPLUS, and unfolding INTEGERP, to:
T.
Case 17.(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NUMBERP Y)
(NOT (EQUAL Y X))
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(NOT (EQUAL 0 (IPLUS X 0)))),
which again simplifies, applying FIX-INT-REMOVER, IPLUS-0-LEFT, and
COMMUTATIVITY-OF-IPLUS, and opening up NUMBERP, NEGATIVEP, and INTEGERP, to:
T.
Case 16.(IMPLIES (AND (NUMBERP X)
(NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(NOT (EQUAL 0 X)))
(NOT (EQUAL 0 (IPLUS X 0)))).
This again simplifies, rewriting with FIX-INT-REMOVER, IPLUS-0-LEFT, and
COMMUTATIVITY-OF-IPLUS, and expanding the function INTEGERP, to:
T.
Case 15.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL Y X))
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(NOT (EQUAL 0 (IPLUS X 0)))).
This again simplifies, rewriting with FIX-INT-REMOVER, IPLUS-0-LEFT, and
COMMUTATIVITY-OF-IPLUS, and opening up the definitions of NUMBERP, NEGATIVEP,
and INTEGERP, to:
T.
Case 14.(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(EQUAL Y X)
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (EQUAL 0 (IPLUS X 0)) T)).
But this again simplifies, opening up the functions NUMBERP, NEGATIVEP,
IPLUS, and EQUAL, to:
T.
Case 13.(IMPLIES (AND (NUMBERP X)
(NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(EQUAL 0 X))
(EQUAL (EQUAL 0 (IPLUS X 0)) T)),
which again simplifies, unfolding NUMBERP, IPLUS, and EQUAL, to:
T.
Case 12.(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(EQUAL Y 0)
(NOT (NEGATIVEP Y)))
(EQUAL (EQUAL 0 (IPLUS X 0)) T)),
which again simplifies, rewriting with IPLUS-0-LEFT and
COMMUTATIVITY-OF-IPLUS, and unfolding the functions NEGATIVEP, INTEGERP,
FIX-INT, and EQUAL, to:
T.
Case 11.(IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(NOT (NUMBERP Y))
(NOT (NEGATIVEP Y)))
(EQUAL (EQUAL 0 (IPLUS X 0)) T)).
This again simplifies, applying IPLUS-0-LEFT and COMMUTATIVITY-OF-IPLUS, and
unfolding INTEGERP, FIX-INT, and EQUAL, to:
T.
Case 10.(IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(EQUAL Y 0)
(NOT (NEGATIVEP Y)))
(EQUAL (EQUAL 0 (IPLUS X 0)) T)).
However this again simplifies, applying the lemmas IPLUS-0-LEFT and
COMMUTATIVITY-OF-IPLUS, and expanding the functions NEGATIVEP, INTEGERP,
EQUAL, and FIX-INT, to:
T.
Case 9. (IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (NUMBERP Y))
(NOT (NEGATIVEP Y)))
(EQUAL (EQUAL 0 (IPLUS X 0)) T)),
which again simplifies, applying IPLUS-0-LEFT and COMMUTATIVITY-OF-IPLUS,
and unfolding INTEGERP, EQUAL, and FIX-INT, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NUMBERP Y)
(EQUAL Y X)
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (EQUAL 0 (IPLUS X 0)) T)).
This again simplifies, obviously, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP X)
(NOT (NUMBERP Y))
(NOT (NEGATIVEP Y))
(EQUAL 0 X))
(EQUAL (EQUAL 0 (IPLUS X 0)) T)).
This again simplifies, clearly, to:
T.
Case 6. (IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL Y X))
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0)))
(NOT (EQUAL 0 (IPLUS X (MINUS Y))))).
But this again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and unfolding
the function IPLUS, to the new formula:
(IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(NOT (EQUAL Y X))
(NOT (EQUAL Y 0))
(NOT (LESSP X Y)))
(NOT (EQUAL 0 (DIFFERENCE X Y)))),
which again simplifies, using linear arithmetic, to:
T.
Case 5. (IMPLIES (AND (NOT (NUMBERP X))
(NOT (NEGATIVEP X))
(NUMBERP Y)
(NOT (EQUAL Y 0))
(NOT (NEGATIVEP Y)))
(NOT (EQUAL 0 (IPLUS X (MINUS Y))))),
which again simplifies, rewriting with the lemma NEGATIVE-GUTS-MINUS, and
opening up the definitions of DIFFERENCE, LESSP, and IPLUS, to:
T.
Case 4. (IMPLIES (AND (NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0)
(NUMBERP Y)
(NOT (EQUAL Y 0))
(NOT (NEGATIVEP Y)))
(NOT (EQUAL 0 (IPLUS X (MINUS Y))))),
which again simplifies, applying the lemma NEGATIVE-GUTS-MINUS, and opening
up the definitions of DIFFERENCE, LESSP, PLUS, EQUAL, and IPLUS, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NUMBERP Y)
(NOT (EQUAL Y X))
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0)))
(NOT (EQUAL 0 (IPLUS X (MINUS Y))))),
which again simplifies, rewriting with COMMUTATIVITY-OF-PLUS and
NEGATIVE-GUTS-MINUS, and opening up the function IPLUS, to:
T.
Case 2. (IMPLIES (AND (NUMBERP X)
(NUMBERP Y)
(EQUAL Y X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0)))
(EQUAL (EQUAL 0 (IPLUS X (MINUS Y)))
T)).
This again simplifies, rewriting with the lemmas DIFFERENCE-X-X and
NEGATIVE-GUTS-MINUS, and opening up the functions MINUS and IPLUS, to:
(IMPLIES (AND (NUMBERP X) (NOT (EQUAL X 0)))
(NOT (LESSP X X))).
But this again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NUMBERP Y)
(EQUAL Y X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0)))
(EQUAL (EQUAL 0 (IPLUS X (MINUS Y)))
T)),
which again simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.1 0.1 ]
IPLUS-INEG7
(PROVE-LEMMA CORRECTNESS-OF-CANCEL-IPLUS
((META EQUAL))
(EQUAL (EVAL$ T X A)
(EVAL$ T (CANCEL-IPLUS X) A)))
This formula simplifies, appealing to the lemmas SUBBAGP-BAGINT1, EVAL$-IPLUS,
FIX-INT-IPLUS, IPLUS-LIST-EVAL$-FRINGE, ASSOCIATIVITY-OF-IPLUS,
EVAL$-IPLUS-LIST-BAGDIFF, SUBBAGP-BAGINT2, INTEGERP-IPLUS,
CORRECTNESS-OF-CANCEL-INEG, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS,
IPLUS-FIX-INT2, IPLUS-INEG6, EVAL$-IPLUS-LIST-DELETE, FIX-INT-REMOVER,
IPLUS-INEG5, COMMUTATIVITY2-OF-IPLUS, and EVAL$-CANCEL-IPLUS, and expanding
the functions IDIFFERENCE and INTEGERP, to the following nine new formulas:
Case 9. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (EQUAL (CAADR X) 'IPLUS))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(NOT (INTEGERP (EVAL$ T (CADR X) A))))
(EQUAL (EVAL$ T X A) F)).
This again simplifies, obviously, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (EQUAL (CAADR X) 'IPLUS))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(NOT (INTEGERP (EVAL$ T (CADR X) A))))
(NOT (EVAL$ T X A))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and (CDR V), W by
(CONS V C) to eliminate (CAR W) and (CDR W), D by (CONS W X1) to eliminate
(CAR D) and (CDR D), W by (CONS D Z1) to eliminate (CAR W) and (CDR W), D by
(CONS V C) to eliminate (CAR D) and (CDR D), and V by (CONS D X1) to
eliminate (CAR V) and (CDR V). We would thus like to prove the following
five new conjectures:
Case 9.5.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAAR V) 'IPLUS))
(LISTP (CADR V))
(EQUAL (CAADR V) 'IPLUS)
(MEMBER (CAR V)
(IPLUS-FRINGE (CADR V)))
(NOT (INTEGERP (EVAL$ T (CAR V) A))))
(NOT (EVAL$ T (CONS Z V) A))).
This further simplifies, rewriting with CAR-NLISTP and CDR-NLISTP, and
opening up the definitions of CAR, EQUAL, and LISTP, to:
T.
Case 9.4.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CAR D)))
(NOT (INTEGERP (EVAL$ T W A))))
(NOT (EVAL$ T (CONS Z (CONS W D)) A))).
But this further simplifies, applying CAR-NLISTP, and opening up EQUAL and
LISTP, to:
T.
Case 9.3.
(IMPLIES (AND (NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CONS D X1)))
(NOT (INTEGERP (EVAL$ T W A))))
(NOT (EVAL$ T
(CONS Z (CONS W (CONS (CONS D X1) C)))
A))).
But this further simplifies, rewriting with the lemmas CAR-NLISTP,
REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS, and opening up the function EQUAL,
to:
T.
Case 9.2.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CAR D)))
(NOT (INTEGERP (EVAL$ T (CONS V C) A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A))),
which further simplifies, rewriting with the lemma CAR-NLISTP, and opening
up the function LISTP, to:
T.
Case 9.1.
(IMPLIES (AND (EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CONS D Z1)))
(NOT (INTEGERP (EVAL$ T (CONS V C) A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D Z1) X1)))
A))),
which further simplifies, rewriting with the lemmas REWRITE-EVAL$,
CAR-CONS, CDR-CONS, and NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS, to:
T.
Case 8. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (LISTP (CADR X)))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(NOT (INTEGERP (EVAL$ T (CADR X) A))))
(EQUAL (EVAL$ T X A) F)),
which again simplifies, obviously, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (LISTP (CADR X)))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(NOT (INTEGERP (EVAL$ T (CADR X) A))))
(NOT (EVAL$ T X A))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and (CDR V), D by
(CONS V C) to eliminate (CAR D) and (CDR D), and V by (CONS D X1) to
eliminate (CAR V) and (CDR V). We would thus like to prove the following
three new conjectures:
Case 8.3.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(NOT (LISTP (CAR V)))
(LISTP (CADR V))
(EQUAL (CAADR V) 'IPLUS)
(MEMBER (CAR V)
(IPLUS-FRINGE (CADR V)))
(NOT (INTEGERP (EVAL$ T (CAR V) A))))
(NOT (EVAL$ T (CONS Z V) A))).
However this further simplifies, applying CAR-NLISTP and CDR-NLISTP, and
unfolding LISTP and CAR, to:
T.
Case 8.2.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(NOT (LISTP W))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CAR D)))
(NOT (INTEGERP (EVAL$ T W A))))
(NOT (EVAL$ T (CONS Z (CONS W D)) A))).
But this further simplifies, applying the lemma CAR-NLISTP, and expanding
the function LISTP, to:
T.
Case 8.1.
(IMPLIES (AND (EQUAL Z 'EQUAL)
(NOT (LISTP W))
(EQUAL D 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CONS D X1)))
(NOT (INTEGERP (EVAL$ T W A))))
(NOT (EVAL$ T
(CONS Z (CONS W (CONS (CONS D X1) C)))
A))),
which further simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS, to:
T.
Case 7. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (EQUAL (CAADR X) 'IPLUS))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(INTEGERP (EVAL$ T (CADR X) A)))
(EQUAL (EVAL$ T X A)
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A)))))).
This again simplifies, obviously, to the following two new conjectures:
Case 7.2.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (EQUAL (CAADR X) 'IPLUS))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(INTEGERP (EVAL$ T (CADR X) A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T (CADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A))))))
(NOT (EVAL$ T X A))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), W by (CONS V C) to eliminate (CAR W) and (CDR W), D by
(CONS W X1) to eliminate (CAR D) and (CDR D), W by (CONS D Z1) to
eliminate (CAR W) and (CDR W), Z1 by (CONS W V1) to eliminate (CAR Z1) and
(CDR Z1), V1 by (CONS Z1 W1) to eliminate (CAR V1) and (CDR V1), D by
(CONS V C) to eliminate (CAR D) and (CDR D), V by (CONS D X1) to eliminate
(CAR V) and (CDR V), X1 by (CONS V Z1) to eliminate (CAR X1) and (CDR X1),
and Z1 by (CONS X1 V1) to eliminate (CAR Z1) and (CDR Z1). The result is
nine new formulas:
Case 7.2.9.
(IMPLIES
(AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAAR V) 'IPLUS))
(LISTP (CADR V))
(EQUAL (CAADR V) 'IPLUS)
(MEMBER (CAR V)
(IPLUS-FRINGE (CADR V)))
(INTEGERP (EVAL$ T (CAR V) A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T (CAR V) A))
(IPLUS (EVAL$ T (CADADR V) A)
(EVAL$ T (CADDADR V) A))))))
(NOT (EVAL$ T (CONS Z V) A))),
which further simplifies, rewriting with CAR-NLISTP and CDR-NLISTP, and
opening up the functions CAR, EQUAL, and LISTP, to:
T.
Case 7.2.8.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CAR D)))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A))))))
(NOT (EVAL$ T (CONS Z (CONS W D)) A))).
This further simplifies, applying CAR-NLISTP, and opening up the
definitions of EQUAL and LISTP, to:
T.
Case 7.2.7.
(IMPLIES (AND (NOT (LISTP X1))
(NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CONS D X1)))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CAR X1) A)
(EVAL$ T (CADR X1) A))))))
(NOT (EVAL$ T
(CONS Z (CONS W (CONS (CONS D X1) C)))
A))).
But this further simplifies, rewriting with CAR-NLISTP, CDR-NLISTP,
CDR-CONS, CAR-CONS, MEMBER-NON-LIST, and EVAL$-OTHER, and expanding
EQUAL, APPEND, CAR, IPLUS-FRINGE, CDR, LISTP, MEMBER, INTEGERP, INEG,
and IPLUS, to:
T.
Case 7.2.6.
(IMPLIES (AND (NOT (LISTP Z1))
(NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER W
(IPLUS-FRINGE (CONS D (CONS V Z1))))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T V A)
(EVAL$ T (CAR Z1) A))))))
(NOT (EVAL$ T
(CONS Z
(CONS W
(CONS (CONS D (CONS V Z1)) C)))
A))).
But this further simplifies, rewriting with CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS,
IPLUS-FIX-INT2, FIX-INT-REMOVER, IPLUS-INEG7, and REWRITE-EVAL$, and
expanding the functions EQUAL and IPLUS-FRINGE, to:
T.
Case 7.2.5.
(IMPLIES
(AND (NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER W
(IPLUS-FRINGE (CONS D (CONS V (CONS X1 V1)))))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T V A)
(EVAL$ T X1 A))))))
(NOT (EVAL$ T
(CONS Z
(CONS W
(CONS (CONS D (CONS V (CONS X1 V1)))
C)))
A))).
This further simplifies, rewriting with CAR-NLISTP, CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, COMMUTATIVITY2-OF-IPLUS, FIX-INT-REMOVER,
IPLUS-0-LEFT, IPLUS-INEG6, and REWRITE-EVAL$, and unfolding the
functions EQUAL, IPLUS-FRINGE, and INTEGERP, to:
T.
Case 7.2.4.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CAR D)))
(INTEGERP (EVAL$ T (CONS V C) A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A))))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A))).
However this further simplifies, rewriting with CAR-NLISTP, and opening
up the definition of LISTP, to:
T.
Case 7.2.3.
(IMPLIES (AND (NOT (LISTP Z1))
(EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CONS D Z1)))
(INTEGERP (EVAL$ T (CONS V C) A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T (CAR Z1) A)
(EVAL$ T (CADR Z1) A))))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D Z1) X1)))
A))).
But this further simplifies, rewriting with the lemmas CDR-NLISTP,
CAR-NLISTP, CDR-CONS, CAR-CONS, and MEMBER-NON-LIST, and expanding
APPEND, CAR, IPLUS-FRINGE, EQUAL, CDR, LISTP, and MEMBER, to:
T.
Case 7.2.2.
(IMPLIES (AND (NOT (LISTP V1))
(EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CONS D (CONS W V1))))
(INTEGERP (EVAL$ T (CONS V C) A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T W A)
(EVAL$ T (CAR V1) A))))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D (CONS W V1)) X1)))
A))),
which further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, IPLUS-FIX-INT2,
FIX-INT-REMOVER, IPLUS-INEG7, and REWRITE-EVAL$, and unfolding
IPLUS-FRINGE and EQUAL, to:
T.
Case 7.2.1.
(IMPLIES
(AND (EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CONS D (CONS W (CONS Z1 W1)))))
(INTEGERP (EVAL$ T (CONS V C) A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T W A)
(EVAL$ T Z1 A))))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D (CONS W (CONS Z1 W1)))
X1)))
A))).
However this further simplifies, appealing to the lemmas CDR-CONS,
CAR-CONS, COMMUTATIVITY-OF-IPLUS, COMMUTATIVITY2-OF-IPLUS,
FIX-INT-REMOVER, IPLUS-0-LEFT, IPLUS-INEG6, and REWRITE-EVAL$, and
expanding the functions EQUAL, IPLUS-FRINGE, and INTEGERP, to:
T.
Case 7.1.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (EQUAL (CAADR X) 'IPLUS))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(INTEGERP (EVAL$ T (CADR X) A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A)))))
(EQUAL (EVAL$ T X A) T)).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and (CDR V), W
by (CONS V C) to eliminate (CAR W) and (CDR W), D by (CONS W X1) to
eliminate (CAR D) and (CDR D), W by (CONS D Z1) to eliminate (CAR W) and
(CDR W), Z1 by (CONS W V1) to eliminate (CAR Z1) and (CDR Z1), V1 by
(CONS Z1 W1) to eliminate (CAR V1) and (CDR V1), D by (CONS V C) to
eliminate (CAR D) and (CDR D), V by (CONS D X1) to eliminate (CAR V) and
(CDR V), X1 by (CONS V Z1) to eliminate (CAR X1) and (CDR X1), and Z1 by
(CONS X1 V1) to eliminate (CAR Z1) and (CDR Z1). This produces the
following nine new goals:
Case 7.1.9.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAAR V) 'IPLUS))
(LISTP (CADR V))
(EQUAL (CAADR V) 'IPLUS)
(MEMBER (CAR V)
(IPLUS-FRINGE (CADR V)))
(INTEGERP (EVAL$ T (CAR V) A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CAR V) A))
(IPLUS (EVAL$ T (CADADR V) A)
(EVAL$ T (CADDADR V) A)))))
(EQUAL (EVAL$ T (CONS Z V) A) T)).
However this further simplifies, applying the lemmas CAR-NLISTP and
CDR-NLISTP, and expanding the definitions of CAR, EQUAL, and LISTP, to:
T.
Case 7.1.8.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CAR D)))
(INTEGERP (EVAL$ T W A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A)))))
(EQUAL (EVAL$ T (CONS Z (CONS W D)) A)
T)),
which further simplifies, rewriting with CAR-NLISTP, and unfolding EQUAL
and LISTP, to:
T.
Case 7.1.7.
(IMPLIES (AND (NOT (LISTP X1))
(NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CONS D X1)))
(INTEGERP (EVAL$ T W A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CAR X1) A)
(EVAL$ T (CADR X1) A)))))
(EQUAL (EVAL$ T
(CONS Z (CONS W (CONS (CONS D X1) C)))
A)
T)).
This further simplifies, rewriting with the lemmas CAR-NLISTP,
CDR-NLISTP, CDR-CONS, CAR-CONS, MEMBER-NON-LIST, EVAL$-OTHER, and
REWRITE-EVAL$, and expanding EQUAL, APPEND, CAR, IPLUS-FRINGE, CDR,
LISTP, MEMBER, INTEGERP, INEG, and IPLUS, to:
T.
Case 7.1.6.
(IMPLIES (AND (NOT (LISTP Z1))
(NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER W
(IPLUS-FRINGE (CONS D (CONS V Z1))))
(INTEGERP (EVAL$ T W A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T V A)
(EVAL$ T (CAR Z1) A)))))
(EQUAL (EVAL$ T
(CONS Z
(CONS W
(CONS (CONS D (CONS V Z1)) C)))
A)
T)),
which further simplifies, applying the lemmas CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS,
IPLUS-FIX-INT2, FIX-INT-REMOVER, IPLUS-INEG7, and REWRITE-EVAL$, and
opening up the definitions of EQUAL and IPLUS-FRINGE, to:
T.
Case 7.1.5.
(IMPLIES
(AND (NOT (LISTP W))
(EQUAL Z 'EQUAL)
(NOT (EQUAL (CAR W) 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER W
(IPLUS-FRINGE (CONS D (CONS V (CONS X1 V1)))))
(INTEGERP (EVAL$ T W A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T V A)
(EVAL$ T X1 A)))))
(EQUAL (EVAL$ T
(CONS Z
(CONS W
(CONS (CONS D (CONS V (CONS X1 V1)))
C)))
A)
T)),
which further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, COMMUTATIVITY2-OF-IPLUS, FIX-INT-REMOVER,
IPLUS-0-LEFT, IPLUS-INEG6, and REWRITE-EVAL$, and opening up the
definitions of EQUAL, IPLUS-FRINGE, and INTEGERP, to:
T.
Case 7.1.4.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CAR D)))
(INTEGERP (EVAL$ T (CONS V C) A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A)))))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A)
T)).
This further simplifies, applying CAR-NLISTP, and expanding the
definition of LISTP, to:
T.
Case 7.1.3.
(IMPLIES (AND (NOT (LISTP Z1))
(EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CONS D Z1)))
(INTEGERP (EVAL$ T (CONS V C) A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T (CAR Z1) A)
(EVAL$ T (CADR Z1) A)))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D Z1) X1)))
A)
T)).
But this further simplifies, applying CDR-NLISTP, CAR-NLISTP, CDR-CONS,
CAR-CONS, and MEMBER-NON-LIST, and unfolding APPEND, CAR, IPLUS-FRINGE,
EQUAL, CDR, LISTP, and MEMBER, to:
T.
Case 7.1.2.
(IMPLIES (AND (NOT (LISTP V1))
(EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CONS D (CONS W V1))))
(INTEGERP (EVAL$ T (CONS V C) A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T W A)
(EVAL$ T (CAR V1) A)))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D (CONS W V1)) X1)))
A)
T)).
This further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, IPLUS-FIX-INT2,
FIX-INT-REMOVER, IPLUS-INEG7, and REWRITE-EVAL$, and unfolding
IPLUS-FRINGE and EQUAL, to:
T.
Case 7.1.1.
(IMPLIES
(AND (EQUAL Z 'EQUAL)
(NOT (EQUAL V 'IPLUS))
(EQUAL D 'IPLUS)
(MEMBER (CONS V C)
(IPLUS-FRINGE (CONS D (CONS W (CONS Z1 W1)))))
(INTEGERP (EVAL$ T (CONS V C) A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CONS V C) A))
(IPLUS (EVAL$ T W A)
(EVAL$ T Z1 A)))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D (CONS W (CONS Z1 W1)))
X1)))
A)
T)).
This further simplifies, rewriting with CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, COMMUTATIVITY2-OF-IPLUS, FIX-INT-REMOVER,
IPLUS-0-LEFT, IPLUS-INEG6, and REWRITE-EVAL$, and expanding the
definitions of EQUAL, IPLUS-FRINGE, and INTEGERP, to:
T.
Case 6. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (LISTP (CADR X)))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(INTEGERP (EVAL$ T (CADR X) A)))
(EQUAL (EVAL$ T X A)
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A)))))).
This again simplifies, trivially, to the following two new formulas:
Case 6.2.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (LISTP (CADR X)))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(INTEGERP (EVAL$ T (CADR X) A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T (CADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A))))))
(NOT (EVAL$ T X A))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), D by (CONS V C) to eliminate (CAR D) and (CDR D), V by
(CONS D X1) to eliminate (CAR V) and (CDR V), X1 by (CONS V Z1) to
eliminate (CAR X1) and (CDR X1), and Z1 by (CONS X1 V1) to eliminate
(CAR Z1) and (CDR Z1). This generates five new formulas:
Case 6.2.5.
(IMPLIES
(AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(NOT (LISTP (CAR V)))
(LISTP (CADR V))
(EQUAL (CAADR V) 'IPLUS)
(MEMBER (CAR V)
(IPLUS-FRINGE (CADR V)))
(INTEGERP (EVAL$ T (CAR V) A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T (CAR V) A))
(IPLUS (EVAL$ T (CADADR V) A)
(EVAL$ T (CADDADR V) A))))))
(NOT (EVAL$ T (CONS Z V) A))),
which further simplifies, rewriting with the lemmas CAR-NLISTP and
CDR-NLISTP, and unfolding the functions LISTP and CAR, to:
T.
Case 6.2.4.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(NOT (LISTP W))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CAR D)))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A))))))
(NOT (EVAL$ T (CONS Z (CONS W D)) A))),
which further simplifies, applying CAR-NLISTP, and expanding the
function LISTP, to:
T.
Case 6.2.3.
(IMPLIES (AND (NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(NOT (LISTP W))
(EQUAL D 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CONS D X1)))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CAR X1) A)
(EVAL$ T (CADR X1) A))))))
(NOT (EVAL$ T
(CONS Z (CONS W (CONS (CONS D X1) C)))
A))).
This further simplifies, rewriting with CDR-NLISTP, CAR-NLISTP, CDR-CONS,
CAR-CONS, MEMBER-NON-LIST, and EVAL$-OTHER, and opening up APPEND, CAR,
IPLUS-FRINGE, EQUAL, CDR, LISTP, MEMBER, INTEGERP, INEG, and IPLUS, to:
T.
Case 6.2.2.
(IMPLIES (AND (NOT (LISTP Z1))
(EQUAL Z 'EQUAL)
(NOT (LISTP W))
(EQUAL D 'IPLUS)
(MEMBER W
(IPLUS-FRINGE (CONS D (CONS V Z1))))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T V A)
(EVAL$ T (CAR Z1) A))))))
(NOT (EVAL$ T
(CONS Z
(CONS W
(CONS (CONS D (CONS V Z1)) C)))
A))).
This further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, IPLUS-FIX-INT2,
FIX-INT-REMOVER, IPLUS-INEG7, and REWRITE-EVAL$, and opening up the
functions IPLUS-FRINGE and EQUAL, to:
T.
Case 6.2.1.
(IMPLIES
(AND (EQUAL Z 'EQUAL)
(NOT (LISTP W))
(EQUAL D 'IPLUS)
(MEMBER W
(IPLUS-FRINGE (CONS D (CONS V (CONS X1 V1)))))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T V A)
(EVAL$ T X1 A))))))
(NOT (EVAL$ T
(CONS Z
(CONS W
(CONS (CONS D (CONS V (CONS X1 V1)))
C)))
A))).
This further simplifies, rewriting with CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, COMMUTATIVITY2-OF-IPLUS, FIX-INT-REMOVER,
IPLUS-0-LEFT, IPLUS-INEG6, and REWRITE-EVAL$, and expanding the
functions EQUAL, IPLUS-FRINGE, and INTEGERP, to:
T.
Case 6.1.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(NOT (LISTP (CADR X)))
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(MEMBER (CADR X)
(IPLUS-FRINGE (CADDR X)))
(INTEGERP (EVAL$ T (CADR X) A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A)))))
(EQUAL (EVAL$ T X A) T)).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), D by (CONS V C) to eliminate (CAR D) and (CDR D), V by
(CONS D X1) to eliminate (CAR V) and (CDR V), X1 by (CONS V Z1) to
eliminate (CAR X1) and (CDR X1), and Z1 by (CONS X1 V1) to eliminate
(CAR Z1) and (CDR Z1). The result is five new formulas:
Case 6.1.5.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(NOT (LISTP (CAR V)))
(LISTP (CADR V))
(EQUAL (CAADR V) 'IPLUS)
(MEMBER (CAR V)
(IPLUS-FRINGE (CADR V)))
(INTEGERP (EVAL$ T (CAR V) A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T (CAR V) A))
(IPLUS (EVAL$ T (CADADR V) A)
(EVAL$ T (CADDADR V) A)))))
(EQUAL (EVAL$ T (CONS Z V) A) T)),
which further simplifies, applying CAR-NLISTP and CDR-NLISTP, and
expanding LISTP and CAR, to:
T.
Case 6.1.4.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(NOT (LISTP W))
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CAR D)))
(INTEGERP (EVAL$ T W A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A)))))
(EQUAL (EVAL$ T (CONS Z (CONS W D)) A)
T)).
This further simplifies, rewriting with CAR-NLISTP, and unfolding the
definition of LISTP, to:
T.
Case 6.1.3.
(IMPLIES (AND (NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(NOT (LISTP W))
(EQUAL D 'IPLUS)
(MEMBER W (IPLUS-FRINGE (CONS D X1)))
(INTEGERP (EVAL$ T W A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T (CAR X1) A)
(EVAL$ T (CADR X1) A)))))
(EQUAL (EVAL$ T
(CONS Z (CONS W (CONS (CONS D X1) C)))
A)
T)).
This further simplifies, rewriting with CDR-NLISTP, CAR-NLISTP, CDR-CONS,
CAR-CONS, MEMBER-NON-LIST, EVAL$-OTHER, and REWRITE-EVAL$, and expanding
the definitions of APPEND, CAR, IPLUS-FRINGE, EQUAL, CDR, LISTP, MEMBER,
INTEGERP, INEG, and IPLUS, to:
T.
Case 6.1.2.
(IMPLIES (AND (NOT (LISTP Z1))
(EQUAL Z 'EQUAL)
(NOT (LISTP W))
(EQUAL D 'IPLUS)
(MEMBER W
(IPLUS-FRINGE (CONS D (CONS V Z1))))
(INTEGERP (EVAL$ T W A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T V A)
(EVAL$ T (CAR Z1) A)))))
(EQUAL (EVAL$ T
(CONS Z
(CONS W
(CONS (CONS D (CONS V Z1)) C)))
A)
T)).
However this further simplifies, rewriting with the lemmas CAR-NLISTP,
CDR-CONS, CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS,
IPLUS-FIX-INT2, FIX-INT-REMOVER, IPLUS-INEG7, and REWRITE-EVAL$, and
unfolding IPLUS-FRINGE and EQUAL, to:
T.
Case 6.1.1.
(IMPLIES
(AND (EQUAL Z 'EQUAL)
(NOT (LISTP W))
(EQUAL D 'IPLUS)
(MEMBER W
(IPLUS-FRINGE (CONS D (CONS V (CONS X1 V1)))))
(INTEGERP (EVAL$ T W A))
(EQUAL 0
(IPLUS (INEG (EVAL$ T W A))
(IPLUS (EVAL$ T V A)
(EVAL$ T X1 A)))))
(EQUAL (EVAL$ T
(CONS Z
(CONS W
(CONS (CONS D (CONS V (CONS X1 V1)))
C)))
A)
T)),
which further simplifies, rewriting with CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, COMMUTATIVITY2-OF-IPLUS, FIX-INT-REMOVER,
IPLUS-0-LEFT, IPLUS-INEG6, and REWRITE-EVAL$, and opening up the
functions EQUAL, IPLUS-FRINGE, and INTEGERP, to:
T.
Case 5. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (EQUAL (CAADDR X) 'IPLUS))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(NOT (INTEGERP (EVAL$ T (CADDR X) A))))
(EQUAL (EVAL$ T X A) F)).
This again simplifies, obviously, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (EQUAL (CAADDR X) 'IPLUS))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(NOT (INTEGERP (EVAL$ T (CADDR X) A))))
(NOT (EVAL$ T X A))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and (CDR V), W by
(CONS V C) to eliminate (CAR W) and (CDR W), D by (CONS W X1) to eliminate
(CAR D) and (CDR D), and W by (CONS D Z1) to eliminate (CAR W) and (CDR W).
We thus obtain the following four new goals:
Case 5.4.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(LISTP (CAR V))
(EQUAL (CAAR V) 'IPLUS)
(NOT (EQUAL (CAADR V) 'IPLUS))
(MEMBER (CADR V)
(IPLUS-FRINGE (CAR V)))
(NOT (INTEGERP (EVAL$ T (CADR V) A))))
(NOT (EVAL$ T (CONS Z V) A))).
This further simplifies, applying CAR-NLISTP, and unfolding the function
LISTP, to:
T.
Case 5.3.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAAR D) 'IPLUS))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V C)))
(NOT (INTEGERP (EVAL$ T (CAR D) A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A))).
However this further simplifies, applying CAR-NLISTP and EVAL$-OTHER, and
unfolding the functions CAR, EQUAL, and INTEGERP, to:
T.
Case 5.2.
(IMPLIES (AND (NOT (LISTP W))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAR W) 'IPLUS))
(MEMBER W (IPLUS-FRINGE (CONS V C)))
(NOT (INTEGERP (EVAL$ T W A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) (CONS W X1)))
A))).
This further simplifies, applying the lemmas CAR-NLISTP, REWRITE-EVAL$,
CAR-CONS, CDR-CONS, and NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS, and opening
up the definition of EQUAL, to:
T.
Case 5.1.
(IMPLIES (AND (EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL D 'IPLUS))
(MEMBER (CONS D Z1)
(IPLUS-FRINGE (CONS V C)))
(NOT (INTEGERP (EVAL$ T (CONS D Z1) A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D Z1) X1)))
A))),
which further simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS, to:
T.
Case 4. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (LISTP (CADDR X)))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(NOT (INTEGERP (EVAL$ T (CADDR X) A))))
(EQUAL (EVAL$ T X A) F)).
This again simplifies, trivially, to:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (LISTP (CADDR X)))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(NOT (INTEGERP (EVAL$ T (CADDR X) A))))
(NOT (EVAL$ T X A))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate
(CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and (CDR V), W by
(CONS V C) to eliminate (CAR W) and (CDR W), and D by (CONS W X1) to
eliminate (CAR D) and (CDR D). This produces the following three new goals:
Case 4.3.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(LISTP (CAR V))
(EQUAL (CAAR V) 'IPLUS)
(NOT (LISTP (CADR V)))
(MEMBER (CADR V)
(IPLUS-FRINGE (CAR V)))
(NOT (INTEGERP (EVAL$ T (CADR V) A))))
(NOT (EVAL$ T (CONS Z V) A))).
But this further simplifies, applying CAR-NLISTP, and opening up the
function LISTP, to:
T.
Case 4.2.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP (CAR D)))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V C)))
(NOT (INTEGERP (EVAL$ T (CAR D) A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A))).
But this further simplifies, applying CAR-NLISTP and EVAL$-OTHER, and
expanding the functions LISTP and INTEGERP, to:
T.
Case 4.1.
(IMPLIES (AND (EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP W))
(MEMBER W (IPLUS-FRINGE (CONS V C)))
(NOT (INTEGERP (EVAL$ T W A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) (CONS W X1)))
A))).
This further simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS, and
NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS, to:
T.
Case 3. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (EQUAL (CAADDR X) 'IPLUS))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(INTEGERP (EVAL$ T (CADDR X) A)))
(EQUAL (EVAL$ T X A)
(EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(EVAL$ T (CADDR X) A)))).
This again simplifies, obviously, to the following two new formulas:
Case 3.2.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (EQUAL (CAADDR X) 'IPLUS))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(INTEGERP (EVAL$ T (CADDR X) A))
(NOT (EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(EVAL$ T (CADDR X) A))))
(NOT (EVAL$ T X A))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), W by (CONS V C) to eliminate (CAR W) and (CDR W), C by
(CONS W X1) to eliminate (CAR C) and (CDR C), X1 by (CONS C Z1) to
eliminate (CAR X1) and (CDR X1), D by (CONS X1 V1) to eliminate (CAR D)
and (CDR D), X1 by (CONS D W1) to eliminate (CAR X1) and (CDR X1), D by
(CONS C Z1) to eliminate (CAR D) and (CDR D), C by (CONS D V1) to
eliminate (CAR C) and (CDR C), D by (CONS W X1) to eliminate (CAR D) and
(CDR D), and W by (CONS D Z1) to eliminate (CAR W) and (CDR W). We must
thus prove ten new formulas:
Case 3.2.10.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(LISTP (CAR V))
(EQUAL (CAAR V) 'IPLUS)
(NOT (EQUAL (CAADR V) 'IPLUS))
(MEMBER (CADR V)
(IPLUS-FRINGE (CAR V)))
(INTEGERP (EVAL$ T (CADR V) A))
(NOT (EQUAL (IPLUS (EVAL$ T (CADAR V) A)
(EVAL$ T (CADDAR V) A))
(EVAL$ T (CADR V) A))))
(NOT (EVAL$ T (CONS Z V) A))),
which further simplifies, appealing to the lemma CAR-NLISTP, and opening
up the definition of LISTP, to:
T.
Case 3.2.9.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAAR D) 'IPLUS))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T (CAR D) A))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T (CAR D) A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A))),
which further simplifies, applying CAR-NLISTP, CDR-NLISTP, CDR-CONS,
CAR-CONS, and EVAL$-OTHER, and unfolding CAR, EQUAL, APPEND,
IPLUS-FRINGE, MEMBER, INTEGERP, and IPLUS, to:
T.
Case 3.2.8.
(IMPLIES (AND (NOT (LISTP W))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAR W) 'IPLUS))
(MEMBER W (IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T W A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) (CONS W X1)))
A))).
But this further simplifies, applying the lemmas CAR-NLISTP, CDR-NLISTP,
CDR-CONS, CAR-CONS, MEMBER-NON-LIST, and EVAL$-OTHER, and expanding the
definitions of EQUAL, APPEND, CAR, IPLUS-FRINGE, CDR, LISTP, MEMBER,
INTEGERP, and IPLUS, to:
T.
Case 3.2.7.
(IMPLIES (AND (NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL D 'IPLUS))
(MEMBER (CONS D Z1)
(IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T (CONS D Z1) A))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T (CONS D Z1) A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D Z1) X1)))
A))),
which further simplifies, rewriting with CDR-NLISTP, CAR-NLISTP,
CDR-CONS, CAR-CONS, and MEMBER-NON-LIST, and opening up the definitions
of APPEND, CAR, IPLUS-FRINGE, EQUAL, CDR, LISTP, and MEMBER, to:
T.
Case 3.2.6.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAAR D) 'IPLUS))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T (CAR D) A))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T (CAR D) A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V (CONS W X1)) D))
A))).
But this further simplifies, appealing to the lemmas CAR-NLISTP,
CDR-CONS, CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS,
and REWRITE-EVAL$, and opening up the definitions of CAR, EQUAL,
IPLUS-FRINGE, and INTEGERP, to:
T.
Case 3.2.5.
(IMPLIES (AND (NOT (LISTP C))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAR C) 'IPLUS))
(MEMBER C
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T C A))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T C A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS C Z1)))
A))),
which further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$,
and unfolding EQUAL and IPLUS-FRINGE, to:
T.
Case 3.2.4.
(IMPLIES (AND (NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL D 'IPLUS))
(MEMBER (CONS D V1)
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T (CONS D V1) A))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T (CONS D V1) A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS (CONS D V1) Z1)))
A))).
However this further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$,
and unfolding the definitions of IPLUS-FRINGE and EQUAL, to:
T.
Case 3.2.3.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAAR D) 'IPLUS))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T (CAR D) A))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T (CAR D) A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
D))
A))).
This further simplifies, applying the lemmas CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and
opening up the functions CAR, EQUAL, IPLUS-FRINGE, and INTEGERP, to:
T.
Case 3.2.2.
(IMPLIES (AND (NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAR X1) 'IPLUS))
(MEMBER X1
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T X1 A))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T X1 A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS X1 V1)))
A))),
which further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and opening up the functions
EQUAL and IPLUS-FRINGE, to:
T.
Case 3.2.1.
(IMPLIES (AND (EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL D 'IPLUS))
(MEMBER (CONS D W1)
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T (CONS D W1) A))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T (CONS D W1) A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS (CONS D W1) V1)))
A))).
However this further simplifies, rewriting with CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and expanding the definitions
of EQUAL and IPLUS-FRINGE, to:
T.
Case 3.1.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (EQUAL (CAADDR X) 'IPLUS))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(INTEGERP (EVAL$ T (CADDR X) A))
(EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(EVAL$ T (CADDR X) A)))
(EQUAL (EVAL$ T X A) T)).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), W by (CONS V C) to eliminate (CAR W) and (CDR W), C by
(CONS W X1) to eliminate (CAR C) and (CDR C), X1 by (CONS C Z1) to
eliminate (CAR X1) and (CDR X1), D by (CONS X1 V1) to eliminate (CAR D)
and (CDR D), X1 by (CONS D W1) to eliminate (CAR X1) and (CDR X1), D by
(CONS C Z1) to eliminate (CAR D) and (CDR D), C by (CONS D V1) to
eliminate (CAR C) and (CDR C), D by (CONS W X1) to eliminate (CAR D) and
(CDR D), and W by (CONS D Z1) to eliminate (CAR W) and (CDR W). This
generates ten new conjectures:
Case 3.1.10.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(LISTP (CAR V))
(EQUAL (CAAR V) 'IPLUS)
(NOT (EQUAL (CAADR V) 'IPLUS))
(MEMBER (CADR V)
(IPLUS-FRINGE (CAR V)))
(INTEGERP (EVAL$ T (CADR V) A))
(EQUAL (IPLUS (EVAL$ T (CADAR V) A)
(EVAL$ T (CADDAR V) A))
(EVAL$ T (CADR V) A)))
(EQUAL (EVAL$ T (CONS Z V) A) T)),
which further simplifies, applying CAR-NLISTP, and unfolding LISTP, to:
T.
Case 3.1.9.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAAR D) 'IPLUS))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T (CAR D) A))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T (CAR D) A)))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A)
T)).
But this further simplifies, rewriting with the lemmas CAR-NLISTP,
CDR-NLISTP, CDR-CONS, CAR-CONS, EVAL$-OTHER, and REWRITE-EVAL$, and
expanding CAR, EQUAL, APPEND, IPLUS-FRINGE, MEMBER, INTEGERP, and IPLUS,
to:
T.
Case 3.1.8.
(IMPLIES (AND (NOT (LISTP W))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAR W) 'IPLUS))
(MEMBER W (IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T W A))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T W A)))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V C) (CONS W X1)))
A)
T)),
which further simplifies, rewriting with the lemmas CAR-NLISTP,
CDR-NLISTP, CDR-CONS, CAR-CONS, MEMBER-NON-LIST, EVAL$-OTHER, and
REWRITE-EVAL$, and unfolding the functions EQUAL, APPEND, CAR,
IPLUS-FRINGE, CDR, LISTP, MEMBER, INTEGERP, and IPLUS, to:
T.
Case 3.1.7.
(IMPLIES (AND (NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL D 'IPLUS))
(MEMBER (CONS D Z1)
(IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T (CONS D Z1) A))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T (CONS D Z1) A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D Z1) X1)))
A)
T)),
which further simplifies, applying CDR-NLISTP, CAR-NLISTP, CDR-CONS,
CAR-CONS, and MEMBER-NON-LIST, and opening up APPEND, CAR, IPLUS-FRINGE,
EQUAL, CDR, LISTP, and MEMBER, to:
T.
Case 3.1.6.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAAR D) 'IPLUS))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T (CAR D) A))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T (CAR D) A)))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V (CONS W X1)) D))
A)
T)).
But this further simplifies, rewriting with CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
REWRITE-EVAL$, and opening up the functions CAR, EQUAL, IPLUS-FRINGE,
and INTEGERP, to:
T.
Case 3.1.5.
(IMPLIES (AND (NOT (LISTP C))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAR C) 'IPLUS))
(MEMBER C
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T C A))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T C A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS C Z1)))
A)
T)).
However this further simplifies, rewriting with CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
REWRITE-EVAL$, and expanding EQUAL and IPLUS-FRINGE, to:
T.
Case 3.1.4.
(IMPLIES (AND (NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL D 'IPLUS))
(MEMBER (CONS D V1)
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T (CONS D V1) A))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T (CONS D V1) A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS (CONS D V1) Z1)))
A)
T)).
This further simplifies, rewriting with CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$,
and unfolding the functions IPLUS-FRINGE and EQUAL, to:
T.
Case 3.1.3.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAAR D) 'IPLUS))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T (CAR D) A))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T (CAR D) A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
D))
A)
T)).
But this further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and unfolding
the functions CAR, EQUAL, IPLUS-FRINGE, and INTEGERP, to:
T.
Case 3.1.2.
(IMPLIES (AND (NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL (CAR X1) 'IPLUS))
(MEMBER X1
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T X1 A))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T X1 A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS X1 V1)))
A)
T)).
But this further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and opening up EQUAL and
IPLUS-FRINGE, to:
T.
Case 3.1.1.
(IMPLIES (AND (EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (EQUAL D 'IPLUS))
(MEMBER (CONS D W1)
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T (CONS D W1) A))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T (CONS D W1) A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS (CONS D W1) V1)))
A)
T)).
But this further simplifies, applying CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and unfolding EQUAL and
IPLUS-FRINGE, to:
T.
Case 2. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (LISTP (CADDR X)))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(INTEGERP (EVAL$ T (CADDR X) A)))
(EQUAL (EVAL$ T X A)
(EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(EVAL$ T (CADDR X) A)))).
This again simplifies, clearly, to the following two new formulas:
Case 2.2.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (LISTP (CADDR X)))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(INTEGERP (EVAL$ T (CADDR X) A))
(NOT (EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(EVAL$ T (CADDR X) A))))
(NOT (EVAL$ T X A))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), W by (CONS V C) to eliminate (CAR W) and (CDR W), C by
(CONS W X1) to eliminate (CAR C) and (CDR C), X1 by (CONS C Z1) to
eliminate (CAR X1) and (CDR X1), D by (CONS X1 V1) to eliminate (CAR D)
and (CDR D), D by (CONS C Z1) to eliminate (CAR D) and (CDR D), and D by
(CONS W X1) to eliminate (CAR D) and (CDR D). The result is seven new
goals:
Case 2.2.7.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(LISTP (CAR V))
(EQUAL (CAAR V) 'IPLUS)
(NOT (LISTP (CADR V)))
(MEMBER (CADR V)
(IPLUS-FRINGE (CAR V)))
(INTEGERP (EVAL$ T (CADR V) A))
(NOT (EQUAL (IPLUS (EVAL$ T (CADAR V) A)
(EVAL$ T (CADDAR V) A))
(EVAL$ T (CADR V) A))))
(NOT (EVAL$ T (CONS Z V) A))),
which further simplifies, appealing to the lemma CAR-NLISTP, and
unfolding the function LISTP, to:
T.
Case 2.2.6.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP (CAR D)))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T (CAR D) A))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T (CAR D) A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A))),
which further simplifies, rewriting with CAR-NLISTP, CDR-NLISTP,
CDR-CONS, CAR-CONS, and EVAL$-OTHER, and expanding the definitions of
LISTP, APPEND, CAR, IPLUS-FRINGE, EQUAL, MEMBER, INTEGERP, and IPLUS, to:
T.
Case 2.2.5.
(IMPLIES (AND (NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP W))
(MEMBER W (IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T W A))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T W A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) (CONS W X1)))
A))).
This further simplifies, appealing to the lemmas CDR-NLISTP, CAR-NLISTP,
CDR-CONS, CAR-CONS, MEMBER-NON-LIST, and EVAL$-OTHER, and opening up the
definitions of APPEND, CAR, IPLUS-FRINGE, EQUAL, CDR, LISTP, MEMBER,
INTEGERP, and IPLUS, to:
T.
Case 2.2.4.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP (CAR D)))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T (CAR D) A))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T (CAR D) A))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V (CONS W X1)) D))
A))),
which further simplifies, applying the lemmas CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
REWRITE-EVAL$, and expanding the definitions of LISTP, IPLUS-FRINGE,
EQUAL, and INTEGERP, to:
T.
Case 2.2.3.
(IMPLIES (AND (NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP C))
(MEMBER C
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T C A))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T C A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS C Z1)))
A))),
which further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$,
and opening up IPLUS-FRINGE and EQUAL, to:
T.
Case 2.2.2.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP (CAR D)))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T (CAR D) A))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T (CAR D) A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
D))
A))).
But this further simplifies, rewriting with the lemmas CAR-NLISTP,
CDR-CONS, CAR-CONS, EVAL$-OTHER, COMMUTATIVITY-OF-IPLUS, and
REWRITE-EVAL$, and opening up LISTP, EQUAL, IPLUS-FRINGE, and INTEGERP,
to:
T.
Case 2.2.1.
(IMPLIES (AND (EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP X1))
(MEMBER X1
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T X1 A))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T X1 A))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS X1 V1)))
A))),
which further simplifies, applying CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and opening up EQUAL and
IPLUS-FRINGE, to:
T.
Case 2.1.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(NOT (LISTP (CADDR X)))
(MEMBER (CADDR X)
(IPLUS-FRINGE (CADR X)))
(INTEGERP (EVAL$ T (CADDR X) A))
(EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(EVAL$ T (CADDR X) A)))
(EQUAL (EVAL$ T X A) T)).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), W by (CONS V C) to eliminate (CAR W) and (CDR W), C by
(CONS W X1) to eliminate (CAR C) and (CDR C), X1 by (CONS C Z1) to
eliminate (CAR X1) and (CDR X1), D by (CONS X1 V1) to eliminate (CAR D)
and (CDR D), D by (CONS C Z1) to eliminate (CAR D) and (CDR D), and D by
(CONS W X1) to eliminate (CAR D) and (CDR D). The result is seven new
formulas:
Case 2.1.7.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(LISTP (CAR V))
(EQUAL (CAAR V) 'IPLUS)
(NOT (LISTP (CADR V)))
(MEMBER (CADR V)
(IPLUS-FRINGE (CAR V)))
(INTEGERP (EVAL$ T (CADR V) A))
(EQUAL (IPLUS (EVAL$ T (CADAR V) A)
(EVAL$ T (CADDAR V) A))
(EVAL$ T (CADR V) A)))
(EQUAL (EVAL$ T (CONS Z V) A) T)),
which further simplifies, applying CAR-NLISTP, and expanding the
definition of LISTP, to:
T.
Case 2.1.6.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP (CAR D)))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T (CAR D) A))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T (CAR D) A)))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A)
T)).
This further simplifies, appealing to the lemmas CAR-NLISTP, CDR-NLISTP,
CDR-CONS, CAR-CONS, EVAL$-OTHER, and REWRITE-EVAL$, and opening up the
definitions of LISTP, APPEND, CAR, IPLUS-FRINGE, EQUAL, MEMBER, INTEGERP,
and IPLUS, to:
T.
Case 2.1.5.
(IMPLIES (AND (NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP W))
(MEMBER W (IPLUS-FRINGE (CONS V C)))
(INTEGERP (EVAL$ T W A))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(EVAL$ T W A)))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V C) (CONS W X1)))
A)
T)),
which further simplifies, applying CDR-NLISTP, CAR-NLISTP, CDR-CONS,
CAR-CONS, MEMBER-NON-LIST, EVAL$-OTHER, and REWRITE-EVAL$, and expanding
the functions APPEND, CAR, IPLUS-FRINGE, EQUAL, CDR, LISTP, MEMBER,
INTEGERP, and IPLUS, to:
T.
Case 2.1.4.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP (CAR D)))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T (CAR D) A))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T (CAR D) A)))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V (CONS W X1)) D))
A)
T)).
However this further simplifies, appealing to the lemmas CAR-NLISTP,
CDR-CONS, CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS,
and REWRITE-EVAL$, and expanding the definitions of LISTP, IPLUS-FRINGE,
EQUAL, and INTEGERP, to:
T.
Case 2.1.3.
(IMPLIES (AND (NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP C))
(MEMBER C
(IPLUS-FRINGE (CONS V (CONS W X1))))
(INTEGERP (EVAL$ T C A))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(EVAL$ T C A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS C Z1)))
A)
T)),
which further simplifies, rewriting with CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$,
and unfolding IPLUS-FRINGE and EQUAL, to:
T.
Case 2.1.2.
(IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP (CAR D)))
(MEMBER (CAR D)
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T (CAR D) A))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T (CAR D) A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
D))
A)
T)).
However this further simplifies, rewriting with CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and
unfolding the definitions of LISTP, EQUAL, IPLUS-FRINGE, and INTEGERP,
to:
T.
Case 2.1.1.
(IMPLIES (AND (EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(NOT (LISTP X1))
(MEMBER X1
(IPLUS-FRINGE (CONS V (CONS W (CONS C Z1)))))
(INTEGERP (EVAL$ T X1 A))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(EVAL$ T X1 A)))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS X1 V1)))
A)
T)).
But this further simplifies, rewriting with CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and unfolding the definitions
of EQUAL and IPLUS-FRINGE, to:
T.
Case 1. (IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))))
(EQUAL (EVAL$ T X A)
(EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A))))).
This again simplifies, obviously, to the following two new goals:
Case 1.2.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))
(NOT (EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A)))))
(NOT (EVAL$ T X A))).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), W by (CONS V C) to eliminate (CAR W) and (CDR W), C by
(CONS W X1) to eliminate (CAR C) and (CDR C), X1 by (CONS C Z1) to
eliminate (CAR X1) and (CDR X1), D by (CONS X1 V1) to eliminate (CAR D)
and (CDR D), X1 by (CONS D W1) to eliminate (CAR X1) and (CDR X1), W1 by
(CONS X1 D1) to eliminate (CAR W1) and (CDR W1), D1 by (CONS W1 C1) to
eliminate (CAR D1) and (CDR D1), D by (CONS C Z1) to eliminate (CAR D) and
(CDR D), C by (CONS D V1) to eliminate (CAR C) and (CDR C), V1 by
(CONS C W1) to eliminate (CAR V1) and (CDR V1), W1 by (CONS V1 D1) to
eliminate (CAR W1) and (CDR W1), D by (CONS W X1) to eliminate (CAR D) and
(CDR D), W by (CONS D Z1) to eliminate (CAR W) and (CDR W), Z1 by
(CONS W V1) to eliminate (CAR Z1) and (CDR Z1), and V1 by (CONS Z1 W1) to
eliminate (CAR V1) and (CDR V1). We must thus prove 13 new formulas:
Case 1.2.13.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(LISTP (CAR V))
(EQUAL (CAAR V) 'IPLUS)
(LISTP (CADR V))
(EQUAL (CAADR V) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CAR V))
(IPLUS-FRINGE (CADR V))))
(NOT (EQUAL (IPLUS (EVAL$ T (CADAR V) A)
(EVAL$ T (CADDAR V) A))
(IPLUS (EVAL$ T (CADADR V) A)
(EVAL$ T (CADDADR V) A)))))
(NOT (EVAL$ T (CONS Z V) A))),
which further simplifies, applying CAR-NLISTP, and expanding LISTP, to:
T.
Case 1.2.12.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V C))
(IPLUS-FRINGE (CAR D))))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A)))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A))).
This further simplifies, appealing to the lemma CAR-NLISTP, and
unfolding the definition of LISTP, to:
T.
Case 1.2.11.
(IMPLIES (AND (NOT (LISTP Z1))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V C))
(IPLUS-FRINGE (CONS D Z1))))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(IPLUS (EVAL$ T (CAR Z1) A)
(EVAL$ T (CADR Z1) A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D Z1) X1)))
A))),
which further simplifies, rewriting with CDR-NLISTP, CAR-NLISTP,
CDR-CONS, CAR-CONS, and EVAL$-OTHER, and expanding the definitions of
APPEND, CAR, IPLUS-FRINGE, EQUAL, BAGINT, LISTP, and IPLUS, to:
T.
Case 1.2.10.
(IMPLIES (AND (NOT (LISTP V1))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V C))
(IPLUS-FRINGE (CONS D (CONS W V1)))))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(IPLUS (EVAL$ T W A)
(EVAL$ T (CAR V1) A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D (CONS W V1)) X1)))
A))).
But this further simplifies, applying the lemmas CDR-NLISTP, CAR-NLISTP,
CDR-CONS, CAR-CONS, MEMBER-DELETE, EVAL$-OTHER, IPLUS-0-LEFT,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and unfolding APPEND, CAR,
IPLUS-FRINGE, EQUAL, CDR, LISTP, BAGINT, CONS, and IPLUS, to:
T.
Case 1.2.9.
(IMPLIES
(AND
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V C))
(IPLUS-FRINGE (CONS D (CONS W (CONS Z1 W1))))))
(NOT (EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(IPLUS (EVAL$ T W A)
(EVAL$ T Z1 A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D (CONS W (CONS Z1 W1)))
X1)))
A))),
which further simplifies, applying CDR-NLISTP, CAR-NLISTP, CDR-CONS,
CAR-CONS, MEMBER-DELETE, EVAL$-OTHER, and REWRITE-EVAL$, and opening up
APPEND, CAR, IPLUS-FRINGE, EQUAL, CDR, LISTP, BAGINT, CONS, and IPLUS,
to:
T.
Case 1.2.8.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W X1)))
(IPLUS-FRINGE (CAR D))))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A)))))
(NOT (EVAL$ T
(CONS Z (CONS (CONS V (CONS W X1)) D))
A))).
But this further simplifies, applying the lemma CAR-NLISTP, and opening
up the definition of LISTP, to:
T.
Case 1.2.7.
(IMPLIES (AND (NOT (LISTP V1))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W X1)))
(IPLUS-FRINGE (CONS D V1))))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(IPLUS (EVAL$ T (CAR V1) A)
(EVAL$ T (CADR V1) A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS (CONS D V1) Z1)))
A))),
which further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
CDR-NLISTP, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
REWRITE-EVAL$, and expanding the definitions of IPLUS-FRINGE, EQUAL,
APPEND, CAR, and IPLUS, to:
T.
Case 1.2.6.
(IMPLIES (AND (NOT (LISTP W1))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W X1)))
(IPLUS-FRINGE (CONS D (CONS C W1)))))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(IPLUS (EVAL$ T C A)
(EVAL$ T (CAR W1) A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS (CONS D (CONS C W1)) Z1)))
A))).
However this further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$,
and unfolding IPLUS-FRINGE and EQUAL, to:
T.
Case 1.2.5.
(IMPLIES
(AND
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W X1)))
(IPLUS-FRINGE (CONS D (CONS C (CONS V1 D1))))))
(NOT (EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(IPLUS (EVAL$ T C A)
(EVAL$ T V1 A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS (CONS D (CONS C (CONS V1 D1)))
Z1)))
A))).
But this further simplifies, applying CAR-NLISTP, CDR-CONS, CAR-CONS,
EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$,
and opening up IPLUS-FRINGE and EQUAL, to:
T.
Case 1.2.4.
(IMPLIES
(AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W (CONS C Z1))))
(IPLUS-FRINGE (CAR D))))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
D))
A))).
This further simplifies, applying the lemma CAR-NLISTP, and opening up
the function LISTP, to:
T.
Case 1.2.3.
(IMPLIES
(AND (NOT (LISTP W1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W (CONS C Z1))))
(IPLUS-FRINGE (CONS D W1))))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(IPLUS (EVAL$ T (CAR W1) A)
(EVAL$ T (CADR W1) A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS (CONS D W1) V1)))
A))),
which further simplifies, rewriting with CDR-CONS, CAR-CONS, CDR-NLISTP,
CAR-NLISTP, COMMUTATIVITY-OF-IPLUS, EVAL$-OTHER, and REWRITE-EVAL$, and
unfolding the functions EQUAL, IPLUS-FRINGE, APPEND, CAR, and IPLUS, to:
T.
Case 1.2.2.
(IMPLIES
(AND (NOT (LISTP D1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W (CONS C Z1))))
(IPLUS-FRINGE (CONS D (CONS X1 D1)))))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(IPLUS (EVAL$ T X1 A)
(EVAL$ T (CAR D1) A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS (CONS D (CONS X1 D1)) V1)))
A))).
However this further simplifies, rewriting with the lemmas CDR-CONS,
CAR-CONS, CAR-NLISTP, COMMUTATIVITY-OF-IPLUS, EVAL$-OTHER, IPLUS-0-LEFT,
and REWRITE-EVAL$, and expanding the functions EQUAL and IPLUS-FRINGE,
to:
T.
Case 1.2.1.
(IMPLIES
(AND
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W (CONS C Z1))))
(IPLUS-FRINGE (CONS D (CONS X1 (CONS W1 C1))))))
(NOT (EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(IPLUS (EVAL$ T X1 A)
(EVAL$ T W1 A)))))
(NOT (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS (CONS D (CONS X1 (CONS W1 C1)))
V1)))
A))),
which further simplifies, rewriting with CDR-CONS, CAR-CONS,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and expanding EQUAL and
IPLUS-FRINGE, to:
T.
Case 1.1.
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'EQUAL)
(LISTP (CADR X))
(EQUAL (CAADR X) 'IPLUS)
(LISTP (CADDR X))
(EQUAL (CAADDR X) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))
(EQUAL (IPLUS (EVAL$ T (CADADR X) A)
(EVAL$ T (CADDADR X) A))
(IPLUS (EVAL$ T (CADADDR X) A)
(EVAL$ T (CADDADDR X) A))))
(EQUAL (EVAL$ T X A) T)).
Appealing to the lemma CAR-CDR-ELIM, we now replace X by (CONS Z V) to
eliminate (CAR X) and (CDR X), V by (CONS W D) to eliminate (CAR V) and
(CDR V), W by (CONS V C) to eliminate (CAR W) and (CDR W), C by
(CONS W X1) to eliminate (CAR C) and (CDR C), X1 by (CONS C Z1) to
eliminate (CAR X1) and (CDR X1), D by (CONS X1 V1) to eliminate (CAR D)
and (CDR D), X1 by (CONS D W1) to eliminate (CAR X1) and (CDR X1), W1 by
(CONS X1 D1) to eliminate (CAR W1) and (CDR W1), D1 by (CONS W1 C1) to
eliminate (CAR D1) and (CDR D1), D by (CONS C Z1) to eliminate (CAR D) and
(CDR D), C by (CONS D V1) to eliminate (CAR C) and (CDR C), V1 by
(CONS C W1) to eliminate (CAR V1) and (CDR V1), W1 by (CONS V1 D1) to
eliminate (CAR W1) and (CDR W1), D by (CONS W X1) to eliminate (CAR D) and
(CDR D), W by (CONS D Z1) to eliminate (CAR W) and (CDR W), Z1 by
(CONS W V1) to eliminate (CAR Z1) and (CDR Z1), and V1 by (CONS Z1 W1) to
eliminate (CAR V1) and (CDR V1). The result is 13 new goals:
Case 1.1.13.
(IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'EQUAL)
(LISTP (CAR V))
(EQUAL (CAAR V) 'IPLUS)
(LISTP (CADR V))
(EQUAL (CAADR V) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CAR V))
(IPLUS-FRINGE (CADR V))))
(EQUAL (IPLUS (EVAL$ T (CADAR V) A)
(EVAL$ T (CADDAR V) A))
(IPLUS (EVAL$ T (CADADR V) A)
(EVAL$ T (CADDADR V) A))))
(EQUAL (EVAL$ T (CONS Z V) A) T)),
which further simplifies, applying CAR-NLISTP, and unfolding LISTP, to:
T.
Case 1.1.12.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V C))
(IPLUS-FRINGE (CAR D))))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A))))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V C) D))
A)
T)).
But this further simplifies, rewriting with CAR-NLISTP, and unfolding
the definition of LISTP, to:
T.
Case 1.1.11.
(IMPLIES (AND (NOT (LISTP Z1))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V C))
(IPLUS-FRINGE (CONS D Z1))))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(IPLUS (EVAL$ T (CAR Z1) A)
(EVAL$ T (CADR Z1) A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D Z1) X1)))
A)
T)).
This further simplifies, applying the lemmas CDR-NLISTP, CAR-NLISTP,
CDR-CONS, CAR-CONS, EVAL$-OTHER, and REWRITE-EVAL$, and unfolding APPEND,
CAR, IPLUS-FRINGE, EQUAL, BAGINT, LISTP, and IPLUS, to:
T.
Case 1.1.10.
(IMPLIES (AND (NOT (LISTP V1))
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V C))
(IPLUS-FRINGE (CONS D (CONS W V1)))))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(IPLUS (EVAL$ T W A)
(EVAL$ T (CAR V1) A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D (CONS W V1)) X1)))
A)
T)),
which further simplifies, applying CDR-NLISTP, CAR-NLISTP, CDR-CONS,
CAR-CONS, MEMBER-DELETE, EVAL$-OTHER, IPLUS-0-LEFT,
COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and unfolding APPEND, CAR,
IPLUS-FRINGE, EQUAL, CDR, LISTP, BAGINT, CONS, and IPLUS, to:
T.
Case 1.1.9.
(IMPLIES
(AND
(NOT (LISTP C))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V C))
(IPLUS-FRINGE (CONS D (CONS W (CONS Z1 W1))))))
(EQUAL (IPLUS (EVAL$ T (CAR C) A)
(EVAL$ T (CADR C) A))
(IPLUS (EVAL$ T W A) (EVAL$ T Z1 A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V C)
(CONS (CONS D (CONS W (CONS Z1 W1)))
X1)))
A)
T)).
However this further simplifies, rewriting with the lemmas CDR-NLISTP,
CAR-NLISTP, CDR-CONS, CAR-CONS, MEMBER-DELETE, EVAL$-OTHER, and
REWRITE-EVAL$, and opening up the definitions of APPEND, CAR,
IPLUS-FRINGE, EQUAL, CDR, LISTP, BAGINT, CONS, and IPLUS, to:
T.
Case 1.1.8.
(IMPLIES (AND (NOT (LISTP D))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W X1)))
(IPLUS-FRINGE (CAR D))))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A))))
(EQUAL (EVAL$ T
(CONS Z (CONS (CONS V (CONS W X1)) D))
A)
T)),
which further simplifies, applying the lemma CAR-NLISTP, and opening up
the definition of LISTP, to:
T.
Case 1.1.7.
(IMPLIES (AND (NOT (LISTP V1))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W X1)))
(IPLUS-FRINGE (CONS D V1))))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(IPLUS (EVAL$ T (CAR V1) A)
(EVAL$ T (CADR V1) A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS (CONS D V1) Z1)))
A)
T)),
which further simplifies, rewriting with CAR-NLISTP, CDR-CONS, CAR-CONS,
CDR-NLISTP, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
REWRITE-EVAL$, and opening up the functions IPLUS-FRINGE, EQUAL, APPEND,
CAR, and IPLUS, to:
T.
Case 1.1.6.
(IMPLIES (AND (NOT (LISTP W1))
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W X1)))
(IPLUS-FRINGE (CONS D (CONS C W1)))))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(IPLUS (EVAL$ T C A)
(EVAL$ T (CAR W1) A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS (CONS D (CONS C W1)) Z1)))
A)
T)).
This further simplifies, rewriting with the lemmas CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
REWRITE-EVAL$, and opening up the functions IPLUS-FRINGE and EQUAL, to:
T.
Case 1.1.5.
(IMPLIES
(AND
(NOT (LISTP X1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W X1)))
(IPLUS-FRINGE (CONS D (CONS C (CONS V1 D1))))))
(EQUAL (IPLUS (EVAL$ T W A)
(EVAL$ T (CAR X1) A))
(IPLUS (EVAL$ T C A) (EVAL$ T V1 A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W X1))
(CONS (CONS D (CONS C (CONS V1 D1)))
Z1)))
A)
T)),
which further simplifies, appealing to the lemmas CAR-NLISTP, CDR-CONS,
CAR-CONS, EVAL$-OTHER, IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and
REWRITE-EVAL$, and opening up IPLUS-FRINGE and EQUAL, to:
T.
Case 1.1.4.
(IMPLIES
(AND (NOT (LISTP D))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(LISTP (CAR D))
(EQUAL (CAAR D) 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W (CONS C Z1))))
(IPLUS-FRINGE (CAR D))))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(IPLUS (EVAL$ T (CADAR D) A)
(EVAL$ T (CADDAR D) A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
D))
A)
T)),
which further simplifies, rewriting with CAR-NLISTP, and opening up
LISTP, to:
T.
Case 1.1.3.
(IMPLIES
(AND (NOT (LISTP W1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W (CONS C Z1))))
(IPLUS-FRINGE (CONS D W1))))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(IPLUS (EVAL$ T (CAR W1) A)
(EVAL$ T (CADR W1) A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS (CONS D W1) V1)))
A)
T)).
This further simplifies, applying CDR-CONS, CAR-CONS, CDR-NLISTP,
CAR-NLISTP, COMMUTATIVITY-OF-IPLUS, EVAL$-OTHER, and REWRITE-EVAL$, and
opening up the functions EQUAL, IPLUS-FRINGE, APPEND, CAR, and IPLUS, to:
T.
Case 1.1.2.
(IMPLIES
(AND (NOT (LISTP D1))
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W (CONS C Z1))))
(IPLUS-FRINGE (CONS D (CONS X1 D1)))))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(IPLUS (EVAL$ T X1 A)
(EVAL$ T (CAR D1) A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS (CONS D (CONS X1 D1)) V1)))
A)
T)).
However this further simplifies, applying CDR-CONS, CAR-CONS, CAR-NLISTP,
COMMUTATIVITY-OF-IPLUS, EVAL$-OTHER, IPLUS-0-LEFT, and REWRITE-EVAL$,
and unfolding the definitions of EQUAL and IPLUS-FRINGE, to:
T.
Case 1.1.1.
(IMPLIES
(AND
(EQUAL Z 'EQUAL)
(EQUAL V 'IPLUS)
(EQUAL D 'IPLUS)
(LISTP (BAGINT (IPLUS-FRINGE (CONS V (CONS W (CONS C Z1))))
(IPLUS-FRINGE (CONS D (CONS X1 (CONS W1 C1))))))
(EQUAL (IPLUS (EVAL$ T W A) (EVAL$ T C A))
(IPLUS (EVAL$ T X1 A)
(EVAL$ T W1 A))))
(EQUAL (EVAL$ T
(CONS Z
(CONS (CONS V (CONS W (CONS C Z1)))
(CONS (CONS D (CONS X1 (CONS W1 C1)))
V1)))
A)
T)).
However this further simplifies, rewriting with the lemmas CDR-CONS,
CAR-CONS, COMMUTATIVITY-OF-IPLUS, and REWRITE-EVAL$, and unfolding the
definitions of EQUAL and IPLUS-FRINGE, to:
T.
Q.E.D.
[ 0.0 0.9 0.3 ]
CORRECTNESS-OF-CANCEL-IPLUS
(DISABLE IPLUS-INEG5)
[ 0.0 0.0 0.0 ]
IPLUS-INEG5-OFF
(DISABLE IPLUS-INEG6)
[ 0.0 0.0 0.0 ]
IPLUS-INEG6-OFF
(PROVE-LEMMA ILESSP-FIX-INT-1
(REWRITE)
(EQUAL (ILESSP (FIX-INT X) Y)
(ILESSP X Y))
((ENABLE-THEORY INTEGER-DEFNS)))
This conjecture simplifies, opening up the functions INTEGERP, FIX-INT, LESSP,
EQUAL, NEGATIVE-GUTS, and ILESSP, to the following 16 new goals:
Case 16.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(EQUAL Y 0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ILESSP X Y) F)).
But this again simplifies, expanding the definitions of NEGATIVEP,
NEGATIVE-GUTS, and EQUAL, to:
T.
Case 15.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(EQUAL Y 0)
(NUMBERP X))
(EQUAL (ILESSP X Y) F)),
which again simplifies, obviously, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NUMBERP X))
(EQUAL (ILESSP X Y) F)).
However this again simplifies, expanding the functions ILESSP and EQUAL, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (NUMBERP X)))
(EQUAL (ILESSP 0 Y) F)),
which again simplifies, expanding NEGATIVEP, ILESSP, and EQUAL, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(EQUAL Y 0)
(NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (ILESSP 0 Y) F)),
which again simplifies, unfolding NEGATIVEP, NUMBERP, NEGATIVE-GUTS, EQUAL,
and ILESSP, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NUMBERP X))
(EQUAL (ILESSP X Y) (LESSP X Y))),
which again simplifies, opening up the function ILESSP, to:
T.
Case 10.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NOT (NUMBERP X)))
(EQUAL (ILESSP 0 Y) (LESSP X Y))),
which again simplifies, unfolding the functions LESSP, EQUAL, NEGATIVEP, and
ILESSP, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ILESSP X Y)
(LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X)))),
which again simplifies, unfolding ILESSP, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NUMBERP X))
(EQUAL (ILESSP X Y)
(LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X)))),
which again simplifies, clearly, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (ILESSP 0 Y)
(LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X)))).
This again simplifies, unfolding NEGATIVEP, ILESSP, EQUAL, and LESSP, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL X (MINUS 0)))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ILESSP X Y) T)),
which again simplifies, expanding the definitions of NEGATIVE-GUTS, ILESSP,
and EQUAL, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL X (MINUS 0)))
(NUMBERP X))
(EQUAL (ILESSP X Y) T)),
which again simplifies, clearly, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL X (MINUS 0)))
(NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (ILESSP 0 Y) T)).
But this again simplifies, opening up NEGATIVE-GUTS and EQUAL, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(NOT (EQUAL Y 0))
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ILESSP X Y) (NUMBERP Y))),
which again simplifies, expanding NEGATIVEP, NEGATIVE-GUTS, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(NOT (EQUAL Y 0))
(NUMBERP X))
(EQUAL (ILESSP X Y) (NUMBERP Y))),
which again simplifies, trivially, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(NOT (EQUAL Y 0))
(NOT (NUMBERP X))
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (ILESSP 0 Y) (NUMBERP Y))).
However this again simplifies, expanding the definitions of NEGATIVEP,
NUMBERP, NEGATIVE-GUTS, EQUAL, LESSP, and ILESSP, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ILESSP-FIX-INT-1
(PROVE-LEMMA ILESSP-FIX-INT-2
(REWRITE)
(EQUAL (ILESSP X (FIX-INT Y))
(ILESSP X Y))
((ENABLE-THEORY INTEGER-DEFNS)))
This conjecture simplifies, opening up the functions INTEGERP, FIX-INT, LESSP,
EQUAL, NEGATIVE-GUTS, and ILESSP, to the following 14 new goals:
Case 14.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(EQUAL Y 0)
(NUMBERP Y))
(EQUAL (ILESSP X Y) F)).
But this again simplifies, expanding the definitions of NEGATIVEP, NUMBERP,
ILESSP, and EQUAL, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ILESSP X Y) F)),
which again simplifies, unfolding ILESSP and EQUAL, to:
T.
Case 12.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NUMBERP Y))
(EQUAL (ILESSP X Y) F)),
which again simplifies, clearly, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (NUMBERP Y))
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (ILESSP X 0) F)).
However this again simplifies, expanding LESSP, EQUAL, NEGATIVEP, and ILESSP,
to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(EQUAL Y 0)
(NOT (NUMBERP Y)))
(EQUAL (ILESSP X 0) F)),
which again simplifies, obviously, to:
T.
Case 9. (IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NUMBERP Y))
(EQUAL (ILESSP X Y) (LESSP X Y))).
This again simplifies, opening up the function ILESSP, to:
T.
Case 8. (IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (ILESSP X 0) (LESSP X Y))),
which again simplifies, unfolding the functions LESSP, EQUAL, NEGATIVEP, and
ILESSP, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ILESSP X Y)
(LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X)))),
which again simplifies, unfolding ILESSP, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NUMBERP Y))
(EQUAL (ILESSP X Y)
(LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X)))),
which again simplifies, clearly, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (NUMBERP Y))
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (ILESSP X 0)
(LESSP (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS X)))).
This again simplifies, unfolding LESSP, NEGATIVE-GUTS, NEGATIVEP, ILESSP,
and EQUAL, to two new formulas:
Case 5.2.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(NOT (EQUAL X (MINUS 0)))),
which again simplifies, expanding the definitions of NEGATIVEP,
NEGATIVE-GUTS, and EQUAL, to:
T.
Case 5.1.
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL X (MINUS 0))),
which again simplifies, opening up the definitions of NEGATIVE-GUTS and
EQUAL, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL X (MINUS 0)))
(NUMBERP Y))
(EQUAL (ILESSP X Y) T)),
which again simplifies, expanding the functions NEGATIVE-GUTS, ILESSP, and
EQUAL, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL X (MINUS 0)))
(NOT (NUMBERP Y)))
(EQUAL (ILESSP X 0) T)),
which again simplifies, opening up the functions NEGATIVE-GUTS, NEGATIVEP,
ILESSP, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(NOT (EQUAL Y 0))
(NUMBERP Y))
(EQUAL (ILESSP X Y) (NUMBERP Y))),
which again simplifies, unfolding NEGATIVEP, LESSP, EQUAL, and ILESSP, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL X (MINUS 0))
(NOT (EQUAL Y 0))
(NOT (NUMBERP Y)))
(EQUAL (ILESSP X 0) (NUMBERP Y))),
which again simplifies, opening up the functions NEGATIVEP, ILESSP, and
EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ILESSP-FIX-INT-2
(DEFN MAKE-CANCEL-IPLUS-INEQUALITY-1
(X Y)
(LIST 'ILESSP
(IPLUS-TREE (BAGDIFF X (BAGINT X Y)))
(IPLUS-TREE (BAGDIFF Y (BAGINT X Y)))))
Observe that (LISTP (MAKE-CANCEL-IPLUS-INEQUALITY-1 X Y)) is a theorem.
[ 0.0 0.0 0.0 ]
MAKE-CANCEL-IPLUS-INEQUALITY-1
(DEFN CANCEL-IPLUS-ILESSP-1
(X)
(IF (LISTP X)
(IF (EQUAL (CAR X) 'ILESSP)
(MAKE-CANCEL-IPLUS-INEQUALITY-1 (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))
X)
X))
From the definition we can conclude that:
(OR (LISTP (CANCEL-IPLUS-ILESSP-1 X))
(EQUAL (CANCEL-IPLUS-ILESSP-1 X) X))
is a theorem.
[ 0.0 0.0 0.0 ]
CANCEL-IPLUS-ILESSP-1
(PROVE-LEMMA LESSP-DIFFERENCE-PLUS-ARG1
(REWRITE)
(EQUAL (LESSP W (DIFFERENCE (PLUS W Y) X))
(LESSP X Y)))
Call the conjecture *1.
Perhaps we can prove it by induction. Five 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 (OR (EQUAL (DIFFERENCE (PLUS W Y) X) 0)
(NOT (NUMBERP (DIFFERENCE (PLUS W Y) X))))
(p W Y X))
(IMPLIES (AND (NOT (OR (EQUAL (DIFFERENCE (PLUS W Y) X) 0)
(NOT (NUMBERP (DIFFERENCE (PLUS W Y) X)))))
(OR (EQUAL W 0) (NOT (NUMBERP W))))
(p W Y X))
(IMPLIES (AND (NOT (OR (EQUAL (DIFFERENCE (PLUS W Y) X) 0)
(NOT (NUMBERP (DIFFERENCE (PLUS W Y) X)))))
(NOT (OR (EQUAL W 0) (NOT (NUMBERP W))))
(p (SUB1 W) Y X))
(p W Y X))).
Linear arithmetic, the lemmas SUB1-LESSEQP and SUB1-LESSP, and the definitions
of OR and NOT can be used to prove that the measure (COUNT W) decreases
according to the well-founded relation LESSP in each induction step of the
scheme. The above induction scheme leads to three new goals:
Case 3. (IMPLIES (OR (EQUAL (DIFFERENCE (PLUS W Y) X) 0)
(NOT (NUMBERP (DIFFERENCE (PLUS W Y) X))))
(EQUAL (LESSP W (DIFFERENCE (PLUS W Y) X))
(LESSP X Y))),
which simplifies, applying the lemmas EQUAL-DIFFERENCE-0,
DIFFERENCE-LEQ-ARG1, and PLUS-ZERO-ARG2, and opening up the definitions of
PLUS, NOT, OR, EQUAL, LESSP, ZEROP, and NUMBERP, to:
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(NOT (LESSP X (ADD1 (PLUS (SUB1 W) Y)))))
(NOT (LESSP X Y))).
However this again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NOT (OR (EQUAL (DIFFERENCE (PLUS W Y) X) 0)
(NOT (NUMBERP (DIFFERENCE (PLUS W Y) X)))))
(OR (EQUAL W 0) (NOT (NUMBERP W))))
(EQUAL (LESSP W (DIFFERENCE (PLUS W Y) X))
(LESSP X Y))),
which simplifies, appealing to the lemmas EQUAL-DIFFERENCE-0 and
PLUS-ZERO-ARG2, and unfolding the functions PLUS, NOT, OR, EQUAL, NUMBERP,
ZEROP, DIFFERENCE, and LESSP, to:
T.
Case 1. (IMPLIES (AND (NOT (OR (EQUAL (DIFFERENCE (PLUS W Y) X) 0)
(NOT (NUMBERP (DIFFERENCE (PLUS W Y) X)))))
(NOT (OR (EQUAL W 0) (NOT (NUMBERP W))))
(EQUAL (LESSP (SUB1 W)
(DIFFERENCE (PLUS (SUB1 W) Y) X))
(LESSP X Y)))
(EQUAL (LESSP W (DIFFERENCE (PLUS W Y) X))
(LESSP X Y))),
which simplifies, rewriting with the lemmas EQUAL-DIFFERENCE-0, SUB1-ADD1,
and DIFFERENCE-SUB1-ARG2, and expanding the functions PLUS, NOT, OR,
DIFFERENCE, EQUAL, and NUMBERP, to four new conjectures:
Case 1.4.
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(LESSP X (ADD1 (PLUS (SUB1 W) Y)))
(EQUAL (LESSP (SUB1 W)
(DIFFERENCE (PLUS (SUB1 W) Y) X))
(LESSP X Y))
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (LESSP (PLUS (SUB1 W) Y) X)))
(EQUAL (LESSP W
(ADD1 (DIFFERENCE (PLUS (SUB1 W) Y) X)))
(LESSP X Y))),
which again simplifies, applying SUB1-ADD1, and expanding the function
LESSP, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(LESSP X (ADD1 (PLUS (SUB1 W) Y)))
(EQUAL (LESSP (SUB1 W)
(DIFFERENCE (PLUS (SUB1 W) Y) X))
(LESSP X Y))
(NOT (EQUAL X 0))
(NUMBERP X)
(LESSP (PLUS (SUB1 W) Y) X))
(EQUAL (LESSP W 0) (LESSP X Y))).
This again simplifies, using linear arithmetic, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(LESSP X (ADD1 (PLUS (SUB1 W) Y)))
(EQUAL (LESSP (SUB1 W)
(DIFFERENCE (PLUS (SUB1 W) Y) X))
(LESSP X Y))
(EQUAL X 0))
(EQUAL (LESSP W (ADD1 (PLUS (SUB1 W) Y)))
(LESSP X Y))),
which again simplifies, applying EQUAL-PLUS-0, EQUAL-SUB1-0,
CORRECTNESS-OF-CANCEL-LESSP-PLUS, and SUB1-ADD1, and expanding EQUAL,
LESSP, DIFFERENCE, NOT, ZEROP, FIX, SUB1, and NUMBERP, to the following
two new formulas:
Case 1.2.2.
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(NOT (EQUAL Y 0))
(NOT (EQUAL W 1))
(EQUAL (LESSP (SUB1 W) (PLUS (SUB1 W) Y))
(NUMBERP Y))
(NUMBERP Y))
(EQUAL T (NUMBERP Y))).
This again simplifies, obviously, to:
T.
Case 1.2.1.
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(NOT (EQUAL Y 0))
(NOT (EQUAL W 1))
(EQUAL (LESSP (SUB1 W) (PLUS (SUB1 W) Y))
(NUMBERP Y))
(NOT (NUMBERP Y)))
(EQUAL F (NUMBERP Y))).
This again simplifies, trivially, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(LESSP X (ADD1 (PLUS (SUB1 W) Y)))
(EQUAL (LESSP (SUB1 W)
(DIFFERENCE (PLUS (SUB1 W) Y) X))
(LESSP X Y))
(NOT (NUMBERP X)))
(EQUAL (LESSP W (ADD1 (PLUS (SUB1 W) Y)))
(LESSP X Y))).
But this again simplifies, rewriting with CORRECTNESS-OF-CANCEL-LESSP-PLUS
and SUB1-ADD1, and opening up the definitions of LESSP, NOT, ZEROP, FIX,
and EQUAL, to the following two new formulas:
Case 1.1.2.
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(NOT (EQUAL Y 0))
(EQUAL (LESSP (SUB1 W)
(DIFFERENCE (PLUS (SUB1 W) Y) X))
(NUMBERP Y))
(NOT (NUMBERP X))
(NUMBERP Y))
(EQUAL T (NUMBERP Y))).
This again simplifies, trivially, to:
T.
Case 1.1.1.
(IMPLIES (AND (NOT (EQUAL W 0))
(NUMBERP W)
(NOT (EQUAL Y 0))
(EQUAL (LESSP (SUB1 W)
(DIFFERENCE (PLUS (SUB1 W) Y) X))
(NUMBERP Y))
(NOT (NUMBERP X))
(NOT (NUMBERP Y)))
(EQUAL F (NUMBERP Y))).
This again simplifies, clearly, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
LESSP-DIFFERENCE-PLUS-ARG1
(PROVE-LEMMA LESSP-DIFFERENCE-PLUS-ARG1-COMMUTED
(REWRITE)
(EQUAL (LESSP W (DIFFERENCE (PLUS Y W) X))
(LESSP X Y)))
This simplifies, rewriting with COMMUTATIVITY-OF-PLUS and
LESSP-DIFFERENCE-PLUS-ARG1, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LESSP-DIFFERENCE-PLUS-ARG1-COMMUTED
(PROVE-LEMMA IPLUS-CANCELLATION-1-FOR-ILESSP
(REWRITE)
(EQUAL (ILESSP (IPLUS A B) (IPLUS A C))
(ILESSP B C))
((ENABLE-THEORY INTEGER-DEFNS)))
This simplifies, rewriting with MINUS-NEGATIVE-GUTS, and expanding PLUS, EQUAL,
IPLUS, LESSP, NEGATIVE-GUTS, and ILESSP, to 46 new formulas:
Case 46.(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C))))
(EQUAL (ILESSP (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C)))
F)),
which again simplifies, opening up the definition of ILESSP, to the goal:
(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C))))
(NOT (LESSP (PLUS A B)
(DIFFERENCE A (NEGATIVE-GUTS C))))).
This again simplifies, using linear arithmetic, to:
T.
Case 45.(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C)))
(EQUAL (ILESSP (PLUS A B)
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
F)),
which again simplifies, opening up the definitions of ILESSP and EQUAL, to:
T.
Case 44.(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (ILESSP (DIFFERENCE B (NEGATIVE-GUTS A))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
F)),
which again simplifies, unfolding the functions ILESSP and EQUAL, to:
T.
Case 43.(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
F)),
which again simplifies, rewriting with the lemma NEGATIVE-GUTS-MINUS, and
expanding the function ILESSP, to the goal:
(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (LESSP (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))
(DIFFERENCE (NEGATIVE-GUTS A) B)))).
This again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES (AND (LESSP (NEGATIVE-GUTS A) B)
(NOT (NEGATIVEP B))
(NEGATIVEP C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(LESSP B (NEGATIVE-GUTS A)))
(NOT (LESSP (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))
(DIFFERENCE (NEGATIVE-GUTS A) B)))).
This again simplifies, using linear arithmetic, to:
T.
Case 42.(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (ILESSP (DIFFERENCE B (NEGATIVE-GUTS A))
0)
F)),
which again simplifies, unfolding the definitions of EQUAL, LESSP,
DIFFERENCE, NEGATIVEP, and ILESSP, to:
T.
Case 41.(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
0)
F)),
which again simplifies, using linear arithmetic, to:
T.
Case 40.(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (ILESSP (DIFFERENCE B (NEGATIVE-GUTS A))
C)
F)),
which again simplifies, unfolding EQUAL, LESSP, DIFFERENCE, and ILESSP, to:
T.
Case 39.(IMPLIES (AND (NOT (NEGATIVEP B))
(NEGATIVEP C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
C)
F)),
which again simplifies, using linear arithmetic, to:
T.
Case 38.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NOT (NEGATIVEP A)))
(EQUAL (ILESSP (PLUS A B) (PLUS A C))
(LESSP B C))),
which again simplifies, applying the lemma CORRECTNESS-OF-CANCEL-LESSP-PLUS,
and unfolding the functions FIX and ILESSP, to three new formulas:
Case 38.3.
(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NOT (NEGATIVEP A))
(NOT (NUMBERP C))
(NOT (NUMBERP B)))
(EQUAL (LESSP 0 0) (LESSP B C))),
which again simplifies, opening up the functions LESSP and EQUAL, to:
T.
Case 38.2.
(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NOT (NEGATIVEP A))
(NOT (NUMBERP C))
(NUMBERP B))
(EQUAL (LESSP B 0) (LESSP B C))),
which again simplifies, expanding the definitions of EQUAL and LESSP, to:
T.
Case 38.1.
(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NOT (NEGATIVEP A))
(NUMBERP C)
(NOT (NUMBERP B)))
(EQUAL (LESSP 0 C) (LESSP B C))),
which again simplifies, unfolding the functions EQUAL and LESSP, to:
T.
Case 37.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (ILESSP (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A)))
(LESSP B C))),
which again simplifies, opening up the definition of ILESSP, to the goal:
(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (LESSP (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A)))
(LESSP B C))).
Appealing to the lemma DIFFERENCE-ELIM, we now replace C by:
(PLUS (NEGATIVE-GUTS A) X)
to eliminate (DIFFERENCE C (NEGATIVE-GUTS A)). We use the type restriction
lemma noted when DIFFERENCE was introduced to constrain the new variable.
We must thus prove two new formulas:
Case 37.2.
(IMPLIES (AND (NOT (NUMBERP C))
(NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (LESSP (DIFFERENCE B (NEGATIVE-GUTS A))
(DIFFERENCE C (NEGATIVE-GUTS A)))
(LESSP B C))),
which further simplifies, using linear arithmetic, applying
DIFFERENCE-LEQ-ARG1, and unfolding the definitions of LESSP, EQUAL, and
DIFFERENCE, to:
T.
Case 37.1.
(IMPLIES (AND (NUMBERP X)
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(NOT (LESSP (PLUS (NEGATIVE-GUTS A) X)
(NEGATIVE-GUTS A)))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (LESSP (DIFFERENCE B (NEGATIVE-GUTS A))
X)
(LESSP B
(PLUS (NEGATIVE-GUTS A) X)))).
This further simplifies, applying the lemmas COMMUTATIVITY-OF-PLUS and
CORRECTNESS-OF-CANCEL-LESSP-PLUS, to the formula:
(IMPLIES (AND (NUMBERP X)
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (LESSP (DIFFERENCE B (NEGATIVE-GUTS A))
X)
(LESSP B
(PLUS X (NEGATIVE-GUTS A))))).
Appealing to the lemma DIFFERENCE-ELIM, we now replace B by:
(PLUS (NEGATIVE-GUTS A) Z)
to eliminate (DIFFERENCE B (NEGATIVE-GUTS A)). We use the type
restriction lemma noted when DIFFERENCE was introduced to constrain the
new variable. We must thus prove two new conjectures:
Case 37.1.2.
(IMPLIES (AND (NOT (NUMBERP B))
(NUMBERP X)
(NOT (NEGATIVEP B))
(NEGATIVEP A)
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (LESSP (DIFFERENCE B (NEGATIVE-GUTS A))
X)
(LESSP B
(PLUS X (NEGATIVE-GUTS A))))),
which finally simplifies, using linear arithmetic, applying
DIFFERENCE-LEQ-ARG1 and PLUS-ZERO-ARG2, and unfolding the definitions of
LESSP, EQUAL, and ZEROP, to:
T.
Case 37.1.1.
(IMPLIES (AND (NUMBERP Z)
(NUMBERP X)
(NEGATIVEP A)
(NOT (LESSP (PLUS (NEGATIVE-GUTS A) Z)
(NEGATIVE-GUTS A))))
(EQUAL (LESSP Z X)
(LESSP (PLUS (NEGATIVE-GUTS A) Z)
(PLUS X (NEGATIVE-GUTS A))))).
This finally simplifies, appealing to the lemmas COMMUTATIVITY-OF-PLUS
and CORRECTNESS-OF-CANCEL-LESSP-PLUS, and expanding FIX, to:
T.
Case 36.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(DIFFERENCE C (NEGATIVE-GUTS A)))
(LESSP B C))),
which again simplifies, appealing to the lemmas EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and opening up NEGATIVE-GUTS and ILESSP, to:
(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(LESSP B (NEGATIVE-GUTS A)))
(LESSP B C)).
But this again simplifies, using linear arithmetic, to:
T.
Case 35.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(EQUAL (ILESSP (DIFFERENCE B (NEGATIVE-GUTS A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
(LESSP B C))),
which again simplifies, unfolding the function ILESSP, to:
(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (LESSP B (NEGATIVE-GUTS A))))
(NOT (LESSP B C))).
This again simplifies, using linear arithmetic, to:
T.
Case 34.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS A) B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
(LESSP B C))),
which again simplifies, applying the lemma NEGATIVE-GUTS-MINUS, and
unfolding the function ILESSP, to the formula:
(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(LESSP B (NEGATIVE-GUTS A)))
(EQUAL (LESSP (DIFFERENCE (NEGATIVE-GUTS A) C)
(DIFFERENCE (NEGATIVE-GUTS A) B))
(LESSP B C))).
Appealing to the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, we now
replace A by (MINUS X) to eliminate (NEGATIVE-GUTS A), X by (PLUS C Z) to
eliminate (DIFFERENCE X C), and X by (PLUS B Z) to eliminate
(DIFFERENCE X B). We rely upon the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to constrain the new variables. We must thus
prove three new goals:
Case 34.3.
(IMPLIES (AND (LESSP X B)
(LESSP X C)
(NUMBERP X)
(NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(LESSP C X)
(LESSP B X))
(EQUAL (LESSP (DIFFERENCE X C)
(DIFFERENCE X B))
(LESSP B C))),
which further simplifies, using linear arithmetic, to:
T.
Case 34.2.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS B Z) B))
(LESSP (PLUS B Z) C)
(NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(LESSP C (PLUS B Z))
(LESSP B (PLUS B Z)))
(EQUAL (LESSP (DIFFERENCE (PLUS B Z) C) Z)
(LESSP B C))),
which further simplifies, using linear arithmetic, to:
T.
Case 34.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS C Z) C))
(NOT (NEGATIVEP B))
(NOT (NEGATIVEP C))
(LESSP C (PLUS C Z))
(LESSP B (PLUS C Z)))
(EQUAL (LESSP Z (DIFFERENCE (PLUS C Z) B))
(LESSP B C))),
which further simplifies, applying CORRECTNESS-OF-CANCEL-LESSP-PLUS and
LESSP-DIFFERENCE-PLUS-ARG1-COMMUTED, and unfolding the functions FIX,
ZEROP, and NOT, to:
T.
Case 33.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (ILESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))).
But this again simplifies, expanding the function ILESSP, to:
(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (LESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))).
Appealing to the lemma DIFFERENCE-ELIM, we now replace A by:
(PLUS (NEGATIVE-GUTS B) X)
to eliminate (DIFFERENCE A (NEGATIVE-GUTS B)). We rely upon the type
restriction lemma noted when DIFFERENCE was introduced to constrain the new
variable. We must thus prove two new formulas:
Case 33.2.
(IMPLIES (AND (NOT (NUMBERP A))
(NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (LESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(DIFFERENCE A (NEGATIVE-GUTS C)))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))),
which further simplifies, using linear arithmetic, applying
DIFFERENCE-LEQ-ARG1, and unfolding LESSP and EQUAL, to:
T.
Case 33.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP B)
(NEGATIVEP C)
(NOT (LESSP (PLUS (NEGATIVE-GUTS B) X)
(NEGATIVE-GUTS C)))
(NOT (LESSP (PLUS (NEGATIVE-GUTS B) X)
(NEGATIVE-GUTS B))))
(EQUAL (LESSP X
(DIFFERENCE (PLUS (NEGATIVE-GUTS B) X)
(NEGATIVE-GUTS C)))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))).
This further simplifies, applying COMMUTATIVITY-OF-PLUS,
CORRECTNESS-OF-CANCEL-LESSP-PLUS, and LESSP-DIFFERENCE-PLUS-ARG1, to:
T.
Case 32.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(DIFFERENCE A (NEGATIVE-GUTS C)))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))).
This again simplifies, appealing to the lemmas EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and unfolding the functions NEGATIVE-GUTS and ILESSP,
to:
(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS C)))
(LESSP A (NEGATIVE-GUTS B)))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B))).
However this again simplifies, using linear arithmetic, to:
T.
Case 31.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (ILESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))),
which again simplifies, expanding the definition of ILESSP, to the goal:
(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(NOT (LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 30.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(MINUS (DIFFERENCE (NEGATIVE-GUTS C) A)))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and expanding ILESSP,
to the new goal:
(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS C))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (LESSP (DIFFERENCE (NEGATIVE-GUTS C) A)
(DIFFERENCE (NEGATIVE-GUTS B) A))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))).
Applying the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, replace C by
(MINUS X) to eliminate (NEGATIVE-GUTS C) and X by (PLUS A Z) to eliminate
(DIFFERENCE X A). We use the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to restrict the new variables. We thus obtain the
following two new goals:
Case 30.2.
(IMPLIES (AND (LESSP X A)
(NUMBERP X)
(NEGATIVEP B)
(NOT (NEGATIVEP A))
(LESSP A X)
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (LESSP (DIFFERENCE X A)
(DIFFERENCE (NEGATIVE-GUTS B) A))
(LESSP X (NEGATIVE-GUTS B)))).
However this further simplifies, using linear arithmetic, to:
T.
Case 30.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS A Z) A))
(NEGATIVEP B)
(NOT (NEGATIVEP A))
(LESSP A (PLUS A Z))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS B) A))
(LESSP (PLUS A Z)
(NEGATIVE-GUTS B)))),
which further simplifies, rewriting with CORRECTNESS-OF-CANCEL-LESSP-PLUS,
and opening up the definitions of FIX, ZEROP, and NOT, to:
(IMPLIES (AND (NUMBERP Z)
(NEGATIVEP B)
(NOT (NEGATIVEP A))
(NOT (EQUAL Z 0))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (LESSP Z
(DIFFERENCE (NEGATIVE-GUTS B) A))
(LESSP (PLUS A Z)
(NEGATIVE-GUTS B)))).
Applying the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, replace B by
(MINUS X) to eliminate (NEGATIVE-GUTS B) and X by (PLUS A V) to eliminate
(DIFFERENCE X A). We rely upon the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to restrict the new variables. We would thus
like to prove the following two new conjectures:
Case 30.1.2.
(IMPLIES (AND (LESSP X A)
(NUMBERP X)
(NUMBERP Z)
(NOT (NEGATIVEP A))
(NOT (EQUAL Z 0))
(LESSP A X))
(EQUAL (LESSP Z (DIFFERENCE X A))
(LESSP (PLUS A Z) X))).
This finally simplifies, using linear arithmetic, to:
T.
Case 30.1.1.
(IMPLIES (AND (NUMBERP V)
(NOT (LESSP (PLUS A V) A))
(NUMBERP Z)
(NOT (NEGATIVEP A))
(NOT (EQUAL Z 0))
(LESSP A (PLUS A V)))
(EQUAL (LESSP Z V)
(LESSP (PLUS A Z) (PLUS A V)))),
which finally simplifies, applying the lemma
CORRECTNESS-OF-CANCEL-LESSP-PLUS, and opening up the definitions of FIX,
ZEROP, and NOT, to:
T.
Case 29.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ILESSP (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS C))))
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))),
which again simplifies, appealing to the lemmas
CORRECTNESS-OF-CANCEL-LESSP-PLUS and NEGATIVE-GUTS-MINUS, and unfolding the
functions FIX and ILESSP, to:
T.
Case 28.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ILESSP 0 0)
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))),
which again simplifies, expanding the definitions of ILESSP, LESSP, and
EQUAL, to:
T.
Case 27.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS C) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ILESSP B 0)
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))),
which again simplifies, unfolding NEGATIVE-GUTS, NEGATIVEP, ILESSP, EQUAL,
and LESSP, to:
T.
Case 26.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ILESSP 0 C)
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))),
which again simplifies, unfolding the functions NEGATIVEP, ILESSP, EQUAL,
and LESSP, to:
T.
Case 25.(IMPLIES (AND (NEGATIVEP B)
(NEGATIVEP C)
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS C) 0))
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ILESSP B C)
(LESSP (NEGATIVE-GUTS C)
(NEGATIVE-GUTS B)))),
which again simplifies, expanding the definition of ILESSP, to:
T.
Case 24.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (ILESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
T)),
which again simplifies, unfolding NEGATIVE-GUTS and ILESSP, to:
(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(LESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))).
Appealing to the lemma DIFFERENCE-ELIM, we now replace A by:
(PLUS (NEGATIVE-GUTS B) X)
to eliminate (DIFFERENCE A (NEGATIVE-GUTS B)). We employ the type
restriction lemma noted when DIFFERENCE was introduced to constrain the new
variable. We must thus prove two new goals:
Case 24.2.
(IMPLIES (AND (NOT (NUMBERP A))
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(LESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))),
which further simplifies, using linear arithmetic, applying
DIFFERENCE-LEQ-ARG1, and unfolding the functions NEGATIVE-GUTS, LESSP,
PLUS, and EQUAL, to the following two new conjectures:
Case 24.2.2.
(IMPLIES (AND (NOT (NUMBERP A))
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (NEGATIVEP A))
(EQUAL (NEGATIVE-GUTS B) 0))
(NOT (EQUAL C 0))).
However this again simplifies, expanding NEGATIVEP, NEGATIVE-GUTS, and
EQUAL, to:
T.
Case 24.2.1.
(IMPLIES (AND (NOT (NUMBERP A))
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (NEGATIVEP A))
(EQUAL (NEGATIVE-GUTS B) 0))
(NUMBERP C)),
which again simplifies, unfolding the definitions of NEGATIVE-GUTS and
EQUAL, to:
T.
Case 24.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (LESSP (PLUS (NEGATIVE-GUTS B) X)
(NEGATIVE-GUTS B))))
(LESSP X
(PLUS (PLUS (NEGATIVE-GUTS B) X) C))),
which further simplifies, rewriting with COMMUTATIVITY-OF-PLUS,
CORRECTNESS-OF-CANCEL-LESSP-PLUS, COMMUTATIVITY2-OF-PLUS,
ASSOCIATIVITY-OF-PLUS, and EQUAL-PLUS-0, and expanding the definitions of
NEGATIVE-GUTS, ZEROP, and NOT, to the following two new goals:
Case 24.1.2.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (NUMBERP C)))
(NOT (EQUAL (NEGATIVE-GUTS B) 0))).
But this again simplifies, unfolding NEGATIVE-GUTS and EQUAL, to:
T.
Case 24.1.1.
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS B) 0))),
which again simplifies, expanding the functions NEGATIVEP, NEGATIVE-GUTS,
and EQUAL, to:
T.
Case 23.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(PLUS A C))
T)),
which again simplifies, appealing to the lemmas EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and opening up the definitions of NEGATIVE-GUTS, ILESSP,
and EQUAL, to:
T.
Case 22.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ILESSP (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)),
which again simplifies, rewriting with EQUAL-PLUS-0 and NEGATIVE-GUTS-MINUS,
and unfolding the definitions of NEGATIVE-GUTS, ILESSP, and EQUAL, to:
T.
Case 21.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ILESSP 0
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)).
This again simplifies, unfolding NEGATIVE-GUTS and EQUAL, to:
T.
Case 20.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ILESSP B
(DIFFERENCE C (NEGATIVE-GUTS A)))
T)),
which again simplifies, unfolding the definitions of NEGATIVE-GUTS, EQUAL,
LESSP, DIFFERENCE, and ILESSP, to:
T.
Case 19.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ILESSP (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and opening up
NEGATIVE-GUTS and ILESSP, to the new goal:
(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(LESSP (DIFFERENCE (NEGATIVE-GUTS A) C)
(PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))).
Applying the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, replace A by
(MINUS X) to eliminate (NEGATIVE-GUTS A) and X by (PLUS C Z) to eliminate
(DIFFERENCE X C). We use the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to restrict the new variables. This produces the
following two new formulas:
Case 19.2.
(IMPLIES (AND (LESSP X C)
(NUMBERP X)
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(LESSP C X)
(NOT (EQUAL X 0)))
(LESSP (DIFFERENCE X C)
(PLUS X (NEGATIVE-GUTS B)))).
But this further simplifies, using linear arithmetic, to:
T.
Case 19.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS C Z) C))
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(LESSP C (PLUS C Z))
(NOT (EQUAL (PLUS C Z) 0)))
(LESSP Z
(PLUS (PLUS C Z) (NEGATIVE-GUTS B)))),
which further simplifies, rewriting with the lemmas
CORRECTNESS-OF-CANCEL-LESSP-PLUS, EQUAL-PLUS-0, and ASSOCIATIVITY-OF-PLUS,
and expanding the functions NEGATIVE-GUTS, FIX, ZEROP, and NOT, to two new
formulas:
Case 19.1.2.
(IMPLIES (AND (NUMBERP Z)
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (EQUAL Z 0))
(NOT (NUMBERP C)))
(NOT (EQUAL (NEGATIVE-GUTS B) 0))),
which again simplifies, unfolding the functions NEGATIVE-GUTS and EQUAL,
to:
T.
Case 19.1.1.
(IMPLIES (AND (NUMBERP Z)
(NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NOT (EQUAL Z 0))
(EQUAL C 0))
(NOT (EQUAL (NEGATIVE-GUTS B) 0))),
which again simplifies, expanding the functions NEGATIVEP, NEGATIVE-GUTS,
and EQUAL, to:
T.
Case 18.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ILESSP 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)),
which again simplifies, using linear arithmetic, to:
T.
Case 17.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(NOT (EQUAL B (MINUS 0)))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ILESSP B
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
T)),
which again simplifies, using linear arithmetic, to:
T.
Case 16.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(EQUAL C 0)
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (ILESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
F)),
which again simplifies, rewriting with the lemma PLUS-ZERO-ARG2, and
unfolding NEGATIVEP, NEGATIVE-GUTS, EQUAL, LESSP, DIFFERENCE, and ZEROP, to
three new formulas:
Case 16.3.
(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(NOT (ILESSP 0 0))),
which again simplifies, opening up the definition of ILESSP, to:
T.
Case 16.2.
(IMPLIES (AND (NOT (NEGATIVEP A))
(NUMBERP A)
(NOT (EQUAL A 0)))
(NOT (ILESSP A A))),
which again simplifies, opening up the function ILESSP, to:
(IMPLIES (AND (NUMBERP A) (NOT (EQUAL A 0)))
(NOT (LESSP A A))).
However this again simplifies, using linear arithmetic, to:
T.
Case 16.1.
(IMPLIES (AND (NOT (NEGATIVEP A))
(NUMBERP A)
(EQUAL A 0))
(NOT (ILESSP 0 A))),
which again simplifies, opening up NEGATIVEP, NUMBERP, and ILESSP, to:
T.
Case 15.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(EQUAL C 0)
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(PLUS A C))
F)),
which again simplifies, opening up the functions NEGATIVEP, NEGATIVE-GUTS,
EQUAL, and LESSP, to:
T.
Case 14.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(EQUAL C 0)
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ILESSP (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(DIFFERENCE C (NEGATIVE-GUTS A)))
F)),
which again simplifies, using linear arithmetic, to:
T.
Case 13.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(EQUAL C 0)
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ILESSP 0
(DIFFERENCE C (NEGATIVE-GUTS A)))
F)),
which again simplifies, opening up NEGATIVEP, LESSP, NEGATIVE-GUTS, EQUAL,
DIFFERENCE, and ILESSP, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(EQUAL C 0)
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ILESSP B
(DIFFERENCE C (NEGATIVE-GUTS A)))
F)),
which again simplifies, opening up NEGATIVEP, LESSP, NEGATIVE-GUTS, and
EQUAL, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(EQUAL C 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ILESSP (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
F)),
which again simplifies, rewriting with the lemmas PLUS-ZERO-ARG2 and
MINUS-NEGATIVE-GUTS, and opening up the functions NEGATIVEP, EQUAL, LESSP,
NEGATIVE-GUTS, ZEROP, DIFFERENCE, and ILESSP, to:
(IMPLIES (AND (NEGATIVEP A)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NOT (LESSP (NEGATIVE-GUTS A)
(NEGATIVE-GUTS A)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(EQUAL C 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ILESSP 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
F)),
which again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(EQUAL C 0)
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ILESSP B
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
F)),
which again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(NOT (EQUAL C 0))
(NOT (NEGATIVEP A))
(NOT (LESSP A (NEGATIVE-GUTS B))))
(EQUAL (ILESSP (DIFFERENCE A (NEGATIVE-GUTS B))
(PLUS A C))
(NUMBERP C))),
which again simplifies, unfolding the functions NEGATIVEP, NEGATIVE-GUTS,
EQUAL, LESSP, DIFFERENCE, and ILESSP, to three new conjectures:
Case 8.3.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (NEGATIVEP A))
(NOT (EQUAL A 0))
(NUMBERP A))
(EQUAL (LESSP A (PLUS A C))
(NUMBERP C))),
which again simplifies, appealing to the lemma
CORRECTNESS-OF-CANCEL-LESSP-PLUS, and unfolding the functions FIX, ZEROP,
and NOT, to two new formulas:
Case 8.3.2.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (EQUAL A 0))
(NUMBERP A)
(NUMBERP C))
(EQUAL T (NUMBERP C))),
which again simplifies, obviously, to:
T.
Case 8.3.1.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (NUMBERP C)))
(EQUAL F (NUMBERP C))).
This again simplifies, obviously, to:
T.
Case 8.2.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (NEGATIVEP A))
(EQUAL A 0))
(EQUAL (LESSP 0 (PLUS A C))
(NUMBERP C))).
But this again simplifies, opening up the functions NEGATIVEP, EQUAL, PLUS,
and LESSP, to two new conjectures:
Case 8.2.2.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NUMBERP C))
(EQUAL T (NUMBERP C))),
which again simplifies, trivially, to:
T.
Case 8.2.1.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (NUMBERP C)))
(EQUAL F (NUMBERP C))).
This again simplifies, trivially, to:
T.
Case 8.1.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (NEGATIVEP A))
(NOT (NUMBERP A)))
(EQUAL (LESSP 0 (PLUS A C))
(NUMBERP C))).
This again simplifies, unfolding the definitions of PLUS, EQUAL, and LESSP,
to two new conjectures:
Case 8.1.2.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (NEGATIVEP A))
(NOT (NUMBERP A))
(NUMBERP C))
(EQUAL T (NUMBERP C))),
which again simplifies, trivially, to:
T.
Case 8.1.1.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (NEGATIVEP A))
(NOT (NUMBERP A))
(NOT (NUMBERP C)))
(EQUAL F (NUMBERP C))).
This again simplifies, trivially, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(NOT (EQUAL C 0))
(NOT (NEGATIVEP A))
(LESSP A (NEGATIVE-GUTS B)))
(EQUAL (ILESSP (MINUS (DIFFERENCE (NEGATIVE-GUTS B) A))
(PLUS A C))
(NUMBERP C))).
But this again simplifies, expanding NEGATIVEP, NEGATIVE-GUTS, EQUAL, and
LESSP, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ILESSP (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(DIFFERENCE C (NEGATIVE-GUTS A)))
(NUMBERP C))),
which again simplifies, appealing to the lemmas PLUS-ZERO-ARG2 and
MINUS-NEGATIVE-GUTS, and expanding NEGATIVEP, NEGATIVE-GUTS, ZEROP, and
ILESSP, to the conjecture:
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(NUMBERP C)).
However this again simplifies, expanding the function LESSP, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ILESSP 0
(DIFFERENCE C (NEGATIVE-GUTS A)))
(NUMBERP C))),
which again simplifies, expanding the definitions of NEGATIVEP, EQUAL, LESSP,
NEGATIVE-GUTS, DIFFERENCE, and ILESSP, to two new goals:
Case 5.2.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NUMBERP C))
(EQUAL T (NUMBERP C))),
which again simplifies, clearly, to:
T.
Case 5.1.
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (NUMBERP C)))
(EQUAL F (NUMBERP C))).
This again simplifies, obviously, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(NOT (LESSP C (NEGATIVE-GUTS A)))
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ILESSP B
(DIFFERENCE C (NEGATIVE-GUTS A)))
(NUMBERP C))).
However this again simplifies, opening up the definitions of NEGATIVEP,
EQUAL, LESSP, and NEGATIVE-GUTS, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ILESSP (MINUS (PLUS (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
(NUMBERP C))),
which again simplifies, rewriting with PLUS-ZERO-ARG2, MINUS-NEGATIVE-GUTS,
and NEGATIVE-GUTS-MINUS, and expanding the definitions of NEGATIVEP,
NEGATIVE-GUTS, ZEROP, and ILESSP, to:
(IMPLIES (AND (NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (LESSP (DIFFERENCE (NEGATIVE-GUTS A) C)
(NEGATIVE-GUTS A))
(NUMBERP C))).
Applying the lemmas NEGATIVE-GUTS-ELIM and DIFFERENCE-ELIM, replace A by
(MINUS X) to eliminate (NEGATIVE-GUTS A) and X by (PLUS C Z) to eliminate
(DIFFERENCE X C). We employ the type restriction lemma noted when
NEGATIVE-GUTS was introduced and the type restriction lemma noted when
DIFFERENCE was introduced to restrict the new variables. This produces the
following two new formulas:
Case 3.2.
(IMPLIES (AND (LESSP X C)
(NUMBERP X)
(NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(LESSP C X)
(NOT (EQUAL X 0)))
(EQUAL (LESSP (DIFFERENCE X C) X)
(NUMBERP C))).
However this further simplifies, using linear arithmetic, to:
T.
Case 3.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (LESSP (PLUS C Z) C))
(NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(LESSP C (PLUS C Z))
(NOT (EQUAL (PLUS C Z) 0)))
(EQUAL (LESSP Z (PLUS C Z))
(NUMBERP C))),
which further simplifies, rewriting with the lemmas
CORRECTNESS-OF-CANCEL-LESSP-PLUS and EQUAL-PLUS-0, and expanding the
definitions of FIX, ZEROP, and NOT, to two new formulas:
Case 3.1.2.
(IMPLIES (AND (NUMBERP Z)
(NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (EQUAL Z 0))
(NUMBERP C))
(EQUAL T (NUMBERP C))),
which again simplifies, clearly, to:
T.
Case 3.1.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (NEGATIVEP C))
(NOT (EQUAL C 0))
(NOT (EQUAL Z 0))
(NOT (NUMBERP C)))
(EQUAL F (NUMBERP C))).
This again simplifies, obviously, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ILESSP 0
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
(NUMBERP C))).
But this again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP B)
(NOT (NEGATIVEP C))
(EQUAL B (MINUS 0))
(NOT (EQUAL C 0))
(NEGATIVEP A)
(LESSP C (NEGATIVE-GUTS A))
(EQUAL (NEGATIVE-GUTS A) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ILESSP B
(MINUS (DIFFERENCE (NEGATIVE-GUTS A) C)))
(NUMBERP C))),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.3 0.2 ]
IPLUS-CANCELLATION-1-FOR-ILESSP
(PROVE-LEMMA IPLUS-CANCELLATION-2-FOR-ILESSP
(REWRITE)
(EQUAL (ILESSP (IPLUS B A) (IPLUS C A))
(ILESSP B C)))
This simplifies, rewriting with COMMUTATIVITY-OF-IPLUS and
IPLUS-CANCELLATION-1-FOR-ILESSP, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IPLUS-CANCELLATION-2-FOR-ILESSP
(PROVE-LEMMA CORRECTNESS-OF-CANCEL-IPLUS-ILESSP-LEMMA NIL
(EQUAL (EVAL$ T X A)
(EVAL$ T
(CANCEL-IPLUS-ILESSP-1 X)
A)))
This formula simplifies, opening up the functions
MAKE-CANCEL-IPLUS-INEQUALITY-1 and CANCEL-IPLUS-ILESSP-1, to:
(IMPLIES
(AND (LISTP X)
(EQUAL (CAR X) 'ILESSP))
(EQUAL
(EVAL$ T X A)
(EVAL$ T
(LIST 'ILESSP
(IPLUS-TREE (BAGDIFF (IPLUS-FRINGE (CADR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))))
(IPLUS-TREE (BAGDIFF (IPLUS-FRINGE (CADDR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))))
A))),
which again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS,
SUBBAGP-BAGINT1, IPLUS-LIST-EVAL$-FRINGE, IDIFFERENCE-FIX-INT1,
EVAL$-IPLUS-LIST-BAGDIFF, EVAL$-IPLUS-TREE, CDR-CONS, SUBBAGP-BAGINT2, and
IPLUS-CANCELLATION-2-FOR-ILESSP, and opening up IDIFFERENCE, to the new
formula:
(IMPLIES (AND (LISTP X)
(EQUAL (CAR X) 'ILESSP))
(EQUAL (EVAL$ T X A)
(ILESSP (EVAL$ T (CADR X) A)
(EVAL$ T (CADDR X) A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS Z V) to eliminate (CAR X)
and (CDR X), V by (CONS W D) to eliminate (CAR V) and (CDR V), and D by
(CONS V C) to eliminate (CAR D) and (CDR D). We would thus like to prove the
following three new conjectures:
Case 3. (IMPLIES (AND (NOT (LISTP V))
(EQUAL Z 'ILESSP))
(EQUAL (EVAL$ T (CONS Z V) A)
(ILESSP (EVAL$ T (CAR V) A)
(EVAL$ T (CADR V) A)))).
This further simplifies, rewriting with REWRITE-EVAL$, CAR-NLISTP,
EVAL$-OTHER, and CDR-NLISTP, and opening up the definitions of CAR, ILESSP,
and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (LISTP D))
(EQUAL Z 'ILESSP))
(EQUAL (EVAL$ T (CONS Z (CONS W D)) A)
(ILESSP (EVAL$ T W A)
(EVAL$ T (CAR D) A)))).
But this further simplifies, applying REWRITE-EVAL$, CAR-CONS, CDR-CONS,
CAR-NLISTP, and EVAL$-OTHER, to:
T.
Case 1. (IMPLIES (EQUAL Z 'ILESSP)
(EQUAL (EVAL$ T
(CONS Z (CONS W (CONS V C)))
A)
(ILESSP (EVAL$ T W A)
(EVAL$ T V A)))).
However this further simplifies, appealing to the lemmas REWRITE-EVAL$,
CAR-CONS, and CDR-CONS, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
CORRECTNESS-OF-CANCEL-IPLUS-ILESSP-LEMMA
(DEFN IPLUS-TREE-NO-FIX-INT
(L)
(IF (LISTP L)
(IPLUS-TREE-REC L)
''0))
[ 0.0 0.0 0.0 ]
IPLUS-TREE-NO-FIX-INT
(PROVE-LEMMA EVAL$-ILESSP-IPLUS-TREE-NO-FIX-INT
(REWRITE)
(EQUAL (ILESSP (EVAL$ T (IPLUS-TREE-NO-FIX-INT X) A)
(EVAL$ T (IPLUS-TREE-NO-FIX-INT Y) A))
(ILESSP (EVAL$ T (IPLUS-TREE X) A)
(EVAL$ T (IPLUS-TREE Y) A))))
This formula can be simplified, using the abbreviation EVAL$-IPLUS-TREE, to:
(EQUAL (ILESSP (EVAL$ T (IPLUS-TREE-NO-FIX-INT X) A)
(EVAL$ T (IPLUS-TREE-NO-FIX-INT Y) A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST Y A)))),
which simplifies, expanding the definition of IPLUS-TREE-NO-FIX-INT, to four
new conjectures:
Case 4. (IMPLIES (AND (NOT (LISTP Y)) (NOT (LISTP X)))
(EQUAL (ILESSP (EVAL$ T ''0 A)
(EVAL$ T ''0 A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))),
which again simplifies, appealing to the lemmas EVAL$-QUOTE and
EVAL$-LIST-NLISTP, and unfolding the definitions of CAR, ILESSP, IPLUS-LIST,
and EQUAL, to:
T.
Case 3. (IMPLIES (AND (NOT (LISTP Y)) (LISTP X))
(EQUAL (ILESSP (EVAL$ T (IPLUS-TREE-REC X) A)
(EVAL$ T ''0 A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))),
which again simplifies, rewriting with EVAL$-IPLUS-TREE-REC, EVAL$-QUOTE,
and EVAL$-LIST-NLISTP, and expanding the definitions of CAR and IPLUS-LIST,
to the new conjecture:
(IMPLIES (AND (NOT (LISTP Y))
(LISTP X)
(NOT (LISTP (CDR X))))
(EQUAL (ILESSP (EVAL$ T (CAR X) A) 0)
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
0))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS V Z) to eliminate
(CDR X) and (CAR X). This produces:
(IMPLIES (AND (NOT (LISTP Y)) (NOT (LISTP Z)))
(EQUAL (ILESSP (EVAL$ T V A) 0)
(ILESSP (IPLUS-LIST (EVAL$ 'LIST (CONS V Z) A))
0))),
which further simplifies, applying EVAL$-LIST-NLISTP, EVAL$-LIST-CONS,
COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, CAR-CONS, and
ILESSP-FIX-INT-1, and opening up IPLUS-LIST, to:
T.
Case 2. (IMPLIES (AND (LISTP Y) (NOT (LISTP X)))
(EQUAL (ILESSP (EVAL$ T ''0 A)
(EVAL$ T (IPLUS-TREE-REC Y) A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
But this again simplifies, applying the lemmas EVAL$-QUOTE,
EVAL$-IPLUS-TREE-REC, and EVAL$-LIST-NLISTP, and opening up the definitions
of CAR and IPLUS-LIST, to:
(IMPLIES (AND (LISTP Y)
(NOT (LISTP X))
(NOT (LISTP (CDR Y))))
(EQUAL (ILESSP 0 (EVAL$ T (CAR Y) A))
(ILESSP 0
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS V Z) to
eliminate (CDR Y) and (CAR Y). The result is:
(IMPLIES (AND (NOT (LISTP X)) (NOT (LISTP Z)))
(EQUAL (ILESSP 0 (EVAL$ T V A))
(ILESSP 0
(IPLUS-LIST (EVAL$ 'LIST (CONS V Z) A))))).
However this further simplifies, applying EVAL$-LIST-NLISTP, EVAL$-LIST-CONS,
COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, CAR-CONS, and
ILESSP-FIX-INT-2, and unfolding IPLUS-LIST, to:
T.
Case 1. (IMPLIES (AND (LISTP Y) (LISTP X))
(EQUAL (ILESSP (EVAL$ T (IPLUS-TREE-REC X) A)
(EVAL$ T (IPLUS-TREE-REC Y) A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
But this again simplifies, applying EVAL$-IPLUS-TREE-REC, to the following
three new formulas:
Case 1.3.
(IMPLIES (AND (LISTP Y)
(LISTP X)
(NOT (LISTP (CDR Y)))
(NOT (LISTP (CDR X))))
(EQUAL (ILESSP (EVAL$ T (CAR X) A)
(EVAL$ T (CAR Y) A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS V Z) to
eliminate (CDR Y) and (CAR Y). This generates the goal:
(IMPLIES (AND (LISTP X)
(NOT (LISTP Z))
(NOT (LISTP (CDR X))))
(EQUAL (ILESSP (EVAL$ T (CAR X) A)
(EVAL$ T V A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST (CONS V Z) A))))).
However this further simplifies, rewriting with EVAL$-LIST-NLISTP,
EVAL$-LIST-CONS, COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, CAR-CONS,
and ILESSP-FIX-INT-2, and unfolding the function IPLUS-LIST, to:
(IMPLIES (AND (LISTP X)
(NOT (LISTP Z))
(NOT (LISTP (CDR X))))
(EQUAL (ILESSP (EVAL$ T (CAR X) A)
(EVAL$ T V A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(EVAL$ T V A)))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS D W) to eliminate
(CDR X) and (CAR X). We thus obtain:
(IMPLIES (AND (NOT (LISTP Z)) (NOT (LISTP W)))
(EQUAL (ILESSP (EVAL$ T D A) (EVAL$ T V A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST (CONS D W) A))
(EVAL$ T V A)))),
which finally simplifies, applying EVAL$-LIST-NLISTP, EVAL$-LIST-CONS,
COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, CAR-CONS, and
ILESSP-FIX-INT-1, and unfolding IPLUS-LIST, to:
T.
Case 1.2.
(IMPLIES (AND (LISTP Y)
(LISTP X)
(NOT (LISTP (CDR Y)))
(LISTP (CDR X)))
(EQUAL (ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(EVAL$ T (CAR Y) A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS V Z) to
eliminate (CDR Y) and (CAR Y). This generates the conjecture:
(IMPLIES (AND (LISTP X)
(NOT (LISTP Z))
(LISTP (CDR X)))
(EQUAL (ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(EVAL$ T V A))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST (CONS V Z) A))))).
However this further simplifies, applying EVAL$-LIST-NLISTP,
EVAL$-LIST-CONS, COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, CAR-CONS,
and ILESSP-FIX-INT-2, and unfolding IPLUS-LIST, to:
T.
Case 1.1.
(IMPLIES (AND (LISTP Y)
(LISTP X)
(LISTP (CDR Y))
(NOT (LISTP (CDR X))))
(EQUAL (ILESSP (EVAL$ T (CAR X) A)
(IPLUS-LIST (EVAL$ 'LIST Y A)))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST Y A))))).
Appealing to the lemma CAR-CDR-ELIM, we now replace Y by (CONS V Z) to
eliminate (CDR Y) and (CAR Y). We must thus prove:
(IMPLIES (AND (LISTP X)
(LISTP Z)
(NOT (LISTP (CDR X))))
(EQUAL (ILESSP (EVAL$ T (CAR X) A)
(IPLUS-LIST (EVAL$ 'LIST (CONS V Z) A)))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS-LIST (EVAL$ 'LIST (CONS V Z) A))))).
This further simplifies, applying EVAL$-LIST-CONS, CDR-CONS, and CAR-CONS,
and opening up the function IPLUS-LIST, to:
(IMPLIES (AND (LISTP X)
(LISTP Z)
(NOT (LISTP (CDR X))))
(EQUAL (ILESSP (EVAL$ T (CAR X) A)
(IPLUS (EVAL$ T V A)
(IPLUS-LIST (EVAL$ 'LIST Z A))))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST X A))
(IPLUS (EVAL$ T V A)
(IPLUS-LIST (EVAL$ 'LIST Z A)))))).
Applying the lemma CAR-CDR-ELIM, replace X by (CONS D W) to eliminate
(CDR X) and (CAR X). We thus obtain the new formula:
(IMPLIES (AND (LISTP Z) (NOT (LISTP W)))
(EQUAL (ILESSP (EVAL$ T D A)
(IPLUS (EVAL$ T V A)
(IPLUS-LIST (EVAL$ 'LIST Z A))))
(ILESSP (IPLUS-LIST (EVAL$ 'LIST (CONS D W) A))
(IPLUS (EVAL$ T V A)
(IPLUS-LIST (EVAL$ 'LIST Z A)))))),
which finally simplifies, rewriting with EVAL$-LIST-NLISTP,
EVAL$-LIST-CONS, COMMUTATIVITY-OF-IPLUS, IPLUS-0-LEFT, CDR-CONS, CAR-CONS,
and ILESSP-FIX-INT-1, and unfolding the function IPLUS-LIST, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
EVAL$-ILESSP-IPLUS-TREE-NO-FIX-INT
(DISABLE IPLUS-TREE-NO-FIX-INT)
[ 0.0 0.0 0.0 ]
IPLUS-TREE-NO-FIX-INT-OFF
(LEMMA MAKE-CANCEL-IPLUS-INEQUALITY-SIMPLIFIER
(REWRITE)
(EQUAL (EVAL$ T
(MAKE-CANCEL-IPLUS-INEQUALITY-1 X Y)
A)
(EVAL$ T
(LIST 'ILESSP
(IPLUS-TREE-NO-FIX-INT (BAGDIFF X (BAGINT X Y)))
(IPLUS-TREE-NO-FIX-INT (BAGDIFF Y (BAGINT X Y))))
A))
((ENABLE MAKE-CANCEL-IPLUS-INEQUALITY-1
EVAL$-ILESSP-IPLUS-TREE-NO-FIX-INT)
(DISABLE EVAL$)))
This conjecture simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS,
and EVAL$-ILESSP-IPLUS-TREE-NO-FIX-INT, and opening up
MAKE-CANCEL-IPLUS-INEQUALITY-1, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MAKE-CANCEL-IPLUS-INEQUALITY-SIMPLIFIER
(DEFN CANCEL-IPLUS-ILESSP
(X)
(IF
(LISTP X)
(IF
(EQUAL (CAR X) 'ILESSP)
(IF
(LISTP (BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))
(LIST 'ILESSP
(IPLUS-TREE-NO-FIX-INT (BAGDIFF (IPLUS-FRINGE (CADR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))))
(IPLUS-TREE-NO-FIX-INT (BAGDIFF (IPLUS-FRINGE (CADDR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))))
X)
X)
X))
Note that:
(OR (LISTP (CANCEL-IPLUS-ILESSP X))
(EQUAL (CANCEL-IPLUS-ILESSP X) X))
is a theorem.
[ 0.0 0.0 0.0 ]
CANCEL-IPLUS-ILESSP
(DISABLE MAKE-CANCEL-IPLUS-INEQUALITY-1)
[ 0.0 0.0 0.0 ]
MAKE-CANCEL-IPLUS-INEQUALITY-1-OFF
(PROVE-LEMMA CORRECTNESS-OF-CANCEL-IPLUS-ILESSP
((META ILESSP))
(EQUAL (EVAL$ T X A)
(EVAL$ T (CANCEL-IPLUS-ILESSP X) A))
((USE (CORRECTNESS-OF-CANCEL-IPLUS-ILESSP-LEMMA))))
This simplifies, expanding CANCEL-IPLUS-ILESSP-1 and CANCEL-IPLUS-ILESSP, to
the conjecture:
(IMPLIES
(AND
(EQUAL (EVAL$ T X A)
(EVAL$ T
(MAKE-CANCEL-IPLUS-INEQUALITY-1 (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))
A))
(LISTP X)
(EQUAL (CAR X) 'ILESSP)
(LISTP (BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))))
(EQUAL
(EVAL$ T X A)
(EVAL$ T
(LIST 'ILESSP
(IPLUS-TREE-NO-FIX-INT (BAGDIFF (IPLUS-FRINGE (CADR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X)))))
(IPLUS-TREE-NO-FIX-INT (BAGDIFF (IPLUS-FRINGE (CADDR X))
(BAGINT (IPLUS-FRINGE (CADR X))
(IPLUS-FRINGE (CADDR X))))))
A))).
This again simplifies, rewriting with REWRITE-EVAL$, CAR-CONS, CDR-CONS,
SUBBAGP-BAGINT1, IPLUS-LIST-EVAL$-FRINGE, IDIFFERENCE-FIX-INT1,
EVAL$-IPLUS-LIST-BAGDIFF, EVAL$-IPLUS-TREE, SUBBAGP-BAGINT2,
IPLUS-CANCELLATION-2-FOR-ILESSP, EVAL$-ILESSP-IPLUS-TREE-NO-FIX-INT, and
MAKE-CANCEL-IPLUS-INEQUALITY-SIMPLIFIER, and unfolding the function
IDIFFERENCE, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
CORRECTNESS-OF-CANCEL-IPLUS-ILESSP
(LEMMA ITIMES-ZERO1
(REWRITE)
(IMPLIES (EQUAL (FIX-INT X) 0)
(EQUAL (ITIMES X Y) 0))
((ENABLE ITIMES TIMES FIX-INT INTEGERP)
(DO-NOT-INDUCT T)))
This simplifies, opening up the functions INTEGERP, FIX-INT, EQUAL,
NEGATIVE-GUTS, NEGATIVEP, NUMBERP, MINUS, TIMES, and ITIMES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ITIMES-ZERO1
(PROVE-LEMMA ITIMES-0-LEFT
(REWRITE)
(EQUAL (ITIMES 0 Y) 0))
This simplifies, rewriting with ITIMES-ZERO1, and unfolding EQUAL and FIX-INT,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ITIMES-0-LEFT
(DISABLE ITIMES-ZERO1)
[ 0.0 0.0 0.0 ]
ITIMES-ZERO1-OFF
(LEMMA ITIMES-ZERO2
(REWRITE)
(IMPLIES (EQUAL (FIX-INT Y) 0)
(EQUAL (ITIMES X Y) 0))
((ENABLE ITIMES FIX-INT INTEGERP TIMES-ZERO)
(DO-NOT-INDUCT T)))
This simplifies, appealing to the lemma TIMES-ZERO, and opening up the
definitions of INTEGERP, FIX-INT, EQUAL, NEGATIVE-GUTS, NEGATIVEP, NUMBERP,
MINUS, ZEROP, and ITIMES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ITIMES-ZERO2
(PROVE-LEMMA ITIMES-0-RIGHT
(REWRITE)
(EQUAL (ITIMES X 0) 0))
This simplifies, rewriting with ITIMES-ZERO2, and unfolding EQUAL and FIX-INT,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ITIMES-0-RIGHT
(DISABLE ITIMES-ZERO2)
[ 0.0 0.0 0.0 ]
ITIMES-ZERO2-OFF
(LEMMA ITIMES-FIX-INT1
(REWRITE)
(EQUAL (ITIMES (FIX-INT A) B)
(ITIMES A B))
((ENABLE ITIMES FIX-INT INTEGERP)
(DO-NOT-INDUCT T)))
This conjecture simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
expanding the functions INTEGERP, FIX-INT, and ITIMES, to the following 15 new
goals:
Case 15.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL (TIMES A (NEGATIVE-GUTS B)) 0))
(NUMBERP A))
(EQUAL (ITIMES A B)
(MINUS (TIMES A (NEGATIVE-GUTS B))))).
This again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL (TIMES A (NEGATIVE-GUTS B)) 0))
(NOT (NUMBERP A)))
(EQUAL (ITIMES 0 B)
(MINUS (TIMES A (NEGATIVE-GUTS B))))).
However this again simplifies, expanding the functions TIMES and EQUAL, to:
T.
Case 13.(IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(EQUAL (TIMES (NEGATIVE-GUTS A) B) 0)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ITIMES A B) 0)),
which again simplifies, expanding FIX-INT, EQUAL, NEGATIVE-GUTS, NEGATIVEP,
NUMBERP, INTEGERP, MINUS, and ITIMES, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(EQUAL (TIMES (NEGATIVE-GUTS A) B) 0)
(NUMBERP A))
(EQUAL (ITIMES A B) 0)),
which again simplifies, obviously, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(EQUAL (TIMES A (NEGATIVE-GUTS B)) 0)
(NUMBERP A))
(EQUAL (ITIMES A B) 0)).
This again simplifies, opening up the functions FIX-INT, EQUAL,
NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS, and ITIMES, to:
T.
Case 10.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(EQUAL (TIMES A (NEGATIVE-GUTS B)) 0)
(NOT (NUMBERP A)))
(EQUAL (ITIMES 0 B) 0)),
which again simplifies, unfolding the functions TIMES, EQUAL, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, NEGATIVEP, and ITIMES, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(EQUAL (TIMES (NEGATIVE-GUTS A) B) 0)
(NOT (NUMBERP A))
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (ITIMES 0 B) 0)),
which again simplifies, unfolding EQUAL, TIMES, NEGATIVEP, and ITIMES, to:
T.
Case 8. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(NUMBERP A))
(EQUAL (ITIMES A B) (TIMES A B))),
which again simplifies, expanding ITIMES, to:
T.
Case 7. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(NOT (NUMBERP A)))
(EQUAL (ITIMES 0 B) (TIMES A B))),
which again simplifies, unfolding TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ITIMES A B)
(TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))),
which again simplifies, expanding the definition of ITIMES, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NUMBERP A))
(EQUAL (ITIMES A B)
(TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))),
which again simplifies, clearly, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (NUMBERP A))
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (ITIMES 0 B)
(TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))).
But this again simplifies, opening up FIX-INT, NEGATIVE-GUTS, NUMBERP,
INTEGERP, MINUS, TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL (TIMES (NEGATIVE-GUTS A) B) 0))
(NOT (EQUAL (NEGATIVE-GUTS A) 0)))
(EQUAL (ITIMES A B)
(MINUS (TIMES (NEGATIVE-GUTS A) B)))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, and unfolding the
functions FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL (TIMES (NEGATIVE-GUTS A) B) 0))
(NUMBERP A))
(EQUAL (ITIMES A B)
(MINUS (TIMES (NEGATIVE-GUTS A) B)))).
This again simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL (TIMES (NEGATIVE-GUTS A) B) 0))
(NOT (NUMBERP A))
(EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (ITIMES 0 B)
(MINUS (TIMES (NEGATIVE-GUTS A) B)))).
This again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ITIMES-FIX-INT1
(LEMMA ITIMES-FIX-INT2
(REWRITE)
(EQUAL (ITIMES A (FIX-INT B))
(ITIMES A B))
((ENABLE ITIMES FIX-INT INTEGERP TIMES-ZERO)
(DO-NOT-INDUCT T)))
This conjecture simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
expanding the functions INTEGERP, FIX-INT, and ITIMES, to the following 15 new
goals:
Case 15.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL (TIMES A (NEGATIVE-GUTS B)) 0))
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ITIMES A B)
(MINUS (TIMES A (NEGATIVE-GUTS B))))).
This again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and expanding
FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL (TIMES A (NEGATIVE-GUTS B)) 0))
(NUMBERP B))
(EQUAL (ITIMES A B)
(MINUS (TIMES A (NEGATIVE-GUTS B))))).
This again simplifies, clearly, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL (TIMES A (NEGATIVE-GUTS B)) 0))
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ITIMES A 0)
(MINUS (TIMES A (NEGATIVE-GUTS B))))).
However this again simplifies, applying TIMES-ZERO, and unfolding the
functions ZEROP and EQUAL, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(EQUAL (TIMES (NEGATIVE-GUTS A) B) 0)
(NUMBERP B))
(EQUAL (ITIMES A B) 0)).
However this again simplifies, expanding FIX-INT, EQUAL, NEGATIVE-GUTS,
NEGATIVEP, NUMBERP, INTEGERP, MINUS, and ITIMES, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(EQUAL (TIMES A (NEGATIVE-GUTS B)) 0)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ITIMES A B) 0)),
which again simplifies, unfolding the functions FIX-INT, EQUAL,
NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS, and ITIMES, to:
T.
Case 10.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(EQUAL (TIMES A (NEGATIVE-GUTS B)) 0)
(NUMBERP B))
(EQUAL (ITIMES A B) 0)),
which again simplifies, clearly, to:
T.
Case 9. (IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(EQUAL (TIMES A (NEGATIVE-GUTS B)) 0)
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ITIMES A 0) 0)).
However this again simplifies, applying TIMES-ZERO, and opening up the
definitions of ZEROP, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(EQUAL (TIMES (NEGATIVE-GUTS A) B) 0)
(NOT (NUMBERP B)))
(EQUAL (ITIMES A 0) 0)).
This again simplifies, rewriting with TIMES-ZERO, and unfolding the
definitions of ZEROP, EQUAL, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP,
MINUS, NEGATIVEP, and ITIMES, to:
T.
Case 7. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(NUMBERP B))
(EQUAL (ITIMES A B) (TIMES A B))).
This again simplifies, expanding the definition of ITIMES, to:
T.
Case 6. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(NOT (NUMBERP B)))
(EQUAL (ITIMES A 0) (TIMES A B))),
which again simplifies, applying the lemma TIMES-ZERO, and opening up ZEROP,
NEGATIVEP, ITIMES, and EQUAL, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (EQUAL (NEGATIVE-GUTS B) 0)))
(EQUAL (ITIMES A B)
(TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))),
which again simplifies, expanding ITIMES, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NUMBERP B))
(EQUAL (ITIMES A B)
(TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))),
which again simplifies, trivially, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(NOT (NUMBERP B))
(EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (ITIMES A 0)
(TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B)))).
However this again simplifies, applying TIMES-ZERO, and expanding the
functions FIX-INT, EQUAL, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, ZEROP,
NEGATIVEP, and ITIMES, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL (TIMES (NEGATIVE-GUTS A) B) 0))
(NUMBERP B))
(EQUAL (ITIMES A B)
(MINUS (TIMES (NEGATIVE-GUTS A) B)))).
But this again simplifies, applying the lemma NEGATIVE-GUTS-MINUS, and
unfolding FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL (TIMES (NEGATIVE-GUTS A) B) 0))
(NOT (NUMBERP B)))
(EQUAL (ITIMES A 0)
(MINUS (TIMES (NEGATIVE-GUTS A) B)))),
which again simplifies, applying TIMES-ZERO, and opening up the definitions
of ZEROP and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ITIMES-FIX-INT2
(LEMMA COMMUTATIVITY-OF-ITIMES
(REWRITE)
(EQUAL (ITIMES X Y) (ITIMES Y X))
((ENABLE ITIMES FIX-INT INTEGERP)
(ENABLE-THEORY MULTIPLICATION)
(DO-NOT-INDUCT T)))
WARNING: the newly proposed lemma, COMMUTATIVITY-OF-ITIMES, could be applied
whenever the previously added lemma ITIMES-FIX-INT2 could.
WARNING: the newly proposed lemma, COMMUTATIVITY-OF-ITIMES, could be applied
whenever the previously added lemma ITIMES-FIX-INT1 could.
WARNING: the newly proposed lemma, COMMUTATIVITY-OF-ITIMES, could be applied
whenever the previously added lemma ITIMES-0-RIGHT could.
WARNING: the newly proposed lemma, COMMUTATIVITY-OF-ITIMES, could be applied
whenever the previously added lemma ITIMES-0-LEFT could.
This formula simplifies, rewriting with EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS,
and COMMUTATIVITY-OF-TIMES, and expanding the functions FIX-INT, INTEGERP, and
ITIMES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
COMMUTATIVITY-OF-ITIMES
(LEMMA ITIMES-DISTRIBUTES-OVER-IPLUS-PROOF NIL
(EQUAL (ITIMES X (IPLUS Y Z))
(IPLUS (ITIMES X Y) (ITIMES X Z)))
((ENABLE ITIMES IPLUS INTEGERP FIX-INT COMMUTATIVITY2-OF-IPLUS
ASSOCIATIVITY-OF-IPLUS)
(ENABLE-THEORY MULTIPLICATION ADDITION)
(DO-NOT-INDUCT T)))
This simplifies, appealing to the lemmas MINUS-NEGATIVE-GUTS, EQUAL-TIMES-0,
NEGATIVE-GUTS-MINUS, and COMMUTATIVITY-OF-TIMES, and opening up the
definitions of PLUS, EQUAL, IPLUS, FIX-INT, INTEGERP, and ITIMES, to 54 new
goals:
Case 54.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (NUMBERP X))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS 0 0))),
which again simplifies, appealing to the lemmas TIMES-DISTRIBUTES-OVER-PLUS
and NEGATIVE-GUTS-MINUS, and unfolding FIX-INT, EQUAL, NEGATIVE-GUTS,
NEGATIVEP, NUMBERP, INTEGERP, MINUS, PLUS, TIMES, ITIMES, and IPLUS, to:
T.
Case 53.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL X 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS 0 0))),
which again simplifies, rewriting with the lemmas
TIMES-DISTRIBUTES-OVER-PLUS and NEGATIVE-GUTS-MINUS, and expanding the
functions NEGATIVEP, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, PLUS,
TIMES, EQUAL, ITIMES, and IPLUS, to:
T.
Case 52.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL (ITIMES X 0) (IPLUS 0 0))),
which again simplifies, applying the lemma COMMUTATIVITY-OF-TIMES, and
opening up the definitions of TIMES, EQUAL, NEGATIVEP, ITIMES, PLUS, and
IPLUS, to:
T.
Case 51.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (NUMBERP X))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (ITIMES X Z) (IPLUS 0 0))),
which again simplifies, unfolding the functions FIX-INT, EQUAL,
NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS, TIMES, ITIMES, PLUS, and
IPLUS, to:
T.
Case 50.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL X 0)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (ITIMES X Z) (IPLUS 0 0))),
which again simplifies, opening up the functions NEGATIVEP, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, ITIMES, PLUS, and
IPLUS, to:
T.
Case 49.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL X 0)
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (ITIMES X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS (TIMES X Y) 0))),
which again simplifies, applying the lemma TIMES-DISTRIBUTES-OVER-DIFFERENCE,
and opening up NEGATIVEP, DIFFERENCE, TIMES, EQUAL, ITIMES, PLUS, and IPLUS,
to:
T.
Case 48.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (NUMBERP X))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (ITIMES X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS (TIMES X Y) 0))),
which again simplifies, applying the lemma TIMES-DISTRIBUTES-OVER-DIFFERENCE,
and opening up DIFFERENCE, TIMES, ITIMES, PLUS, NEGATIVEP, IPLUS, and EQUAL,
to:
T.
Case 47.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (ITIMES X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS (TIMES X Y) 0))),
which again simplifies, rewriting with the lemmas PLUS-ZERO-ARG2 and
CORRECTNESS-OF-CANCEL-EQUAL-TIMES, and expanding the definitions of EQUAL,
LESSP, DIFFERENCE, ITIMES, ZEROP, NEGATIVEP, IPLUS, FIX, and OR, to:
(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y))
(NOT (EQUAL X 0))
(NUMBERP X)
(NUMBERP Y)
(EQUAL Y 0))
(EQUAL 0 Y)).
This again simplifies, obviously, to:
T.
Case 46.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL X 0)
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS (TIMES X Y) 0))).
However this again simplifies, applying TIMES-DISTRIBUTES-OVER-DIFFERENCE
and NEGATIVE-GUTS-MINUS, and unfolding NEGATIVEP, FIX-INT, NEGATIVE-GUTS,
NUMBERP, INTEGERP, MINUS, DIFFERENCE, TIMES, EQUAL, ITIMES, PLUS, and IPLUS,
to:
T.
Case 45.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (NUMBERP X))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS (TIMES X Y) 0))).
However this again simplifies, appealing to the lemmas
TIMES-DISTRIBUTES-OVER-DIFFERENCE and NEGATIVE-GUTS-MINUS, and opening up
the definitions of FIX-INT, EQUAL, NEGATIVE-GUTS, NEGATIVEP, NUMBERP,
INTEGERP, MINUS, DIFFERENCE, TIMES, ITIMES, PLUS, and IPLUS, to:
T.
Case 44.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS (TIMES X Y) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 43.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS (MINUS (TIMES X (NEGATIVE-GUTS Y)))
(MINUS (TIMES X (NEGATIVE-GUTS Z)))))),
which again simplifies, rewriting with EQUAL-PLUS-0, EQUAL-TIMES-0,
TIMES-DISTRIBUTES-OVER-PLUS, and NEGATIVE-GUTS-MINUS, and expanding the
functions FIX-INT, INTEGERP, ITIMES, and IPLUS, to:
T.
Case 42.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (ITIMES X Z)
(IPLUS 0
(MINUS (TIMES X (NEGATIVE-GUTS Z)))))).
But this again simplifies, using linear arithmetic, applying EQUAL-TIMES-0,
NEGATIVE-GUTS-MINUS, and LESSP-TIMES1, and expanding the definitions of
FIX-INT, INTEGERP, ITIMES, DIFFERENCE, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 41.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (ITIMES X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS (TIMES X Y)
(MINUS (TIMES X (NEGATIVE-GUTS Z)))))).
However this again simplifies, applying TIMES-DISTRIBUTES-OVER-DIFFERENCE,
CORRECTNESS-OF-CANCEL-LESSP-TIMES, and NEGATIVE-GUTS-MINUS, and expanding
the functions ITIMES, AND, FIX, NOT, ZEROP, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z)))
(NOT (NUMBERP Y)))
(NOT (LESSP 0 (NEGATIVE-GUTS Z)))),
which again simplifies, opening up the definition of LESSP, to:
T.
Case 40.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS (TIMES X Y)
(MINUS (TIMES X (NEGATIVE-GUTS Z)))))),
which again simplifies, applying EQUAL-DIFFERENCE-0,
CORRECTNESS-OF-CANCEL-LESSP-TIMES, TIMES-DISTRIBUTES-OVER-DIFFERENCE, and
NEGATIVE-GUTS-MINUS, and unfolding FIX-INT, AND, FIX, NOT, ZEROP, INTEGERP,
ITIMES, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(LESSP Y (NEGATIVE-GUTS Z))
(NOT (NUMBERP Y))
(NOT (LESSP 0 (NEGATIVE-GUTS Z))))
(EQUAL 0
(DIFFERENCE (TIMES X Y)
(TIMES X (NEGATIVE-GUTS Z))))),
which again simplifies, using linear arithmetic, to:
T.
Case 39.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS (MINUS (TIMES X (NEGATIVE-GUTS Y)))
0))),
which again simplifies, using linear arithmetic, applying PLUS-ZERO-ARG2,
MINUS-NEGATIVE-GUTS, EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, and LESSP-TIMES1,
and expanding the definitions of ZEROP, FIX-INT, INTEGERP, ITIMES,
DIFFERENCE, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 38.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(EQUAL X 0)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (ITIMES X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS 0 (TIMES X Z)))).
But this again simplifies, appealing to the lemma
TIMES-DISTRIBUTES-OVER-DIFFERENCE, and unfolding the definitions of
NEGATIVEP, DIFFERENCE, TIMES, EQUAL, ITIMES, PLUS, and IPLUS, to:
T.
Case 37.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (NUMBERP X))
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (ITIMES X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS 0 (TIMES X Z)))),
which again simplifies, rewriting with the lemma
TIMES-DISTRIBUTES-OVER-DIFFERENCE, and unfolding the definitions of
DIFFERENCE, TIMES, ITIMES, PLUS, NEGATIVEP, IPLUS, and EQUAL, to:
T.
Case 36.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (ITIMES X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS 0 (TIMES X Z)))),
which again simplifies, applying CORRECTNESS-OF-CANCEL-EQUAL-TIMES, and
unfolding the definitions of EQUAL, LESSP, DIFFERENCE, ITIMES, PLUS,
NEGATIVEP, IPLUS, ZEROP, FIX, and OR, to the new conjecture:
(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL X 0))
(NUMBERP X)
(NUMBERP Z)
(EQUAL Z 0))
(EQUAL 0 Z)),
which again simplifies, clearly, to:
T.
Case 35.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(EQUAL X 0)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS 0 (TIMES X Z)))).
However this again simplifies, appealing to the lemmas
TIMES-DISTRIBUTES-OVER-DIFFERENCE and NEGATIVE-GUTS-MINUS, and opening up
NEGATIVEP, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, DIFFERENCE,
TIMES, EQUAL, ITIMES, PLUS, and IPLUS, to:
T.
Case 34.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (NUMBERP X))
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS 0 (TIMES X Z)))),
which again simplifies, applying the lemmas
TIMES-DISTRIBUTES-OVER-DIFFERENCE and NEGATIVE-GUTS-MINUS, and opening up
FIX-INT, EQUAL, NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS,
DIFFERENCE, TIMES, ITIMES, PLUS, and IPLUS, to:
T.
Case 33.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS 0 (TIMES X Z)))),
which again simplifies, using linear arithmetic, to:
T.
Case 32.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (ITIMES X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS (MINUS (TIMES X (NEGATIVE-GUTS Y)))
(TIMES X Z)))),
which again simplifies, applying TIMES-DISTRIBUTES-OVER-DIFFERENCE,
CORRECTNESS-OF-CANCEL-LESSP-TIMES, and NEGATIVE-GUTS-MINUS, and opening up
ITIMES, AND, FIX, NOT, ZEROP, and IPLUS, to:
(IMPLIES (AND (NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (LESSP Z (NEGATIVE-GUTS Y)))
(NOT (NUMBERP Z)))
(NOT (LESSP 0 (NEGATIVE-GUTS Y)))),
which again simplifies, unfolding the function LESSP, to:
T.
Case 31.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS (MINUS (TIMES X (NEGATIVE-GUTS Y)))
(TIMES X Z)))),
which again simplifies, rewriting with EQUAL-DIFFERENCE-0,
CORRECTNESS-OF-CANCEL-LESSP-TIMES, TIMES-DISTRIBUTES-OVER-DIFFERENCE, and
NEGATIVE-GUTS-MINUS, and unfolding FIX-INT, AND, FIX, NOT, ZEROP, INTEGERP,
ITIMES, and IPLUS, to:
(IMPLIES (AND (NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(LESSP Z (NEGATIVE-GUTS Y))
(NOT (NUMBERP Z))
(NOT (LESSP 0 (NEGATIVE-GUTS Y))))
(EQUAL 0
(DIFFERENCE (TIMES X Z)
(TIMES X (NEGATIVE-GUTS Y))))),
which again simplifies, using linear arithmetic, to:
T.
Case 30.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NOT (NEGATIVEP Y)))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS (TIMES X Y) (TIMES X Z)))),
which again simplifies, rewriting with TIMES-DISTRIBUTES-OVER-PLUS, and
unfolding the functions ITIMES and IPLUS, to:
T.
Case 29.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES X
(MINUS (PLUS (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
But this again simplifies, applying TIMES-DISTRIBUTES-OVER-PLUS and
NEGATIVE-GUTS-MINUS, and unfolding the functions ITIMES and IPLUS, to:
T.
Case 28.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL (ITIMES X 0)
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
But this again simplifies, applying COMMUTATIVITY-OF-TIMES, and opening up
FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, NEGATIVEP,
ITIMES, PLUS, and IPLUS, to:
T.
Case 27.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (ITIMES X Z)
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
But this again simplifies, applying COMMUTATIVITY-OF-TIMES, and unfolding
ITIMES, EQUAL, TIMES, PLUS, NEGATIVEP, and IPLUS, to:
T.
Case 26.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(EQUAL Y 0)
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (ITIMES X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS 0
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
However this again simplifies, applying COMMUTATIVITY-OF-TIMES, and
unfolding NEGATIVEP, EQUAL, LESSP, DIFFERENCE, FIX-INT, NEGATIVE-GUTS,
NUMBERP, INTEGERP, MINUS, TIMES, ITIMES, PLUS, and IPLUS, to:
T.
Case 25.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (ITIMES X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS 0
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
This again simplifies, using linear arithmetic, applying DIFFERENCE-LEQ-ARG1
and COMMUTATIVITY-OF-TIMES, and opening up the definitions of LESSP, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, NEGATIVEP, ITIMES,
PLUS, and IPLUS, to:
T.
Case 24.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (ITIMES X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS 0
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
But this again simplifies, rewriting with TIMES-DISTRIBUTES-OVER-DIFFERENCE,
and opening up the definitions of FIX-INT, NEGATIVE-GUTS, NEGATIVEP, NUMBERP,
INTEGERP, MINUS, DIFFERENCE, TIMES, EQUAL, ITIMES, PLUS, and IPLUS, to:
T.
Case 23.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(EQUAL Y 0)
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS 0
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
However this again simplifies, applying MINUS-NEGATIVE-GUTS, and unfolding
the definitions of NEGATIVEP, EQUAL, LESSP, DIFFERENCE, ITIMES, PLUS, and
IPLUS, to:
T.
Case 22.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS 0
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
But this again simplifies, applying the lemma MINUS-NEGATIVE-GUTS, and
opening up LESSP, DIFFERENCE, ITIMES, PLUS, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 21.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(EQUAL (NEGATIVE-GUTS X) 0)
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS 0
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))),
which again simplifies, applying TIMES-DISTRIBUTES-OVER-DIFFERENCE and
NEGATIVE-GUTS-MINUS, and expanding DIFFERENCE, TIMES, EQUAL, ITIMES, PLUS,
NEGATIVEP, and IPLUS, to:
T.
Case 20.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (LESSP Y (NEGATIVE-GUTS Z))))
(EQUAL (ITIMES X
(DIFFERENCE Y (NEGATIVE-GUTS Z)))
(IPLUS (MINUS (TIMES Y (NEGATIVE-GUTS X)))
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
This again simplifies, rewriting with EQUAL-DIFFERENCE-0,
CORRECTNESS-OF-CANCEL-LESSP-TIMES, NEGATIVE-GUTS-MINUS,
TIMES-DISTRIBUTES-OVER-DIFFERENCE, COMMUTATIVITY-OF-TIMES, and
DIFFERENCE-LEQ-ARG1, and expanding the functions FIX-INT, AND, FIX, NOT,
ZEROP, INTEGERP, ITIMES, and IPLUS, to:
T.
Case 19.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (NEGATIVE-GUTS Z)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Z) Y)))
(IPLUS (MINUS (TIMES Y (NEGATIVE-GUTS X)))
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
But this again simplifies, rewriting with the lemmas
TIMES-DISTRIBUTES-OVER-DIFFERENCE, COMMUTATIVITY-OF-TIMES,
NEGATIVE-GUTS-MINUS, and CORRECTNESS-OF-CANCEL-LESSP-TIMES, and unfolding
the functions ITIMES, AND, FIX, NOT, ZEROP, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(LESSP Y (NEGATIVE-GUTS Z)))
(NOT (LESSP (NEGATIVE-GUTS Z) Y))).
However this again simplifies, using linear arithmetic, to:
T.
Case 18.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (ITIMES X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))),
which again simplifies, applying COMMUTATIVITY-OF-TIMES, and unfolding the
definitions of NEGATIVEP, EQUAL, LESSP, DIFFERENCE, FIX-INT, NEGATIVE-GUTS,
NUMBERP, INTEGERP, MINUS, TIMES, ITIMES, PLUS, and IPLUS, to:
T.
Case 17.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (ITIMES X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))).
This again simplifies, using linear arithmetic, applying DIFFERENCE-LEQ-ARG1
and COMMUTATIVITY-OF-TIMES, and unfolding the definitions of LESSP, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, NEGATIVEP, ITIMES,
PLUS, and IPLUS, to:
T.
Case 16.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL (NEGATIVE-GUTS X) 0)
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (ITIMES X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))).
But this again simplifies, applying the lemma
TIMES-DISTRIBUTES-OVER-DIFFERENCE, and opening up the definitions of FIX-INT,
NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS, DIFFERENCE, TIMES, EQUAL,
ITIMES, PLUS, and IPLUS, to:
T.
Case 15.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))),
which again simplifies, appealing to the lemmas MINUS-NEGATIVE-GUTS and
PLUS-ZERO-ARG2, and unfolding the functions NEGATIVEP, EQUAL, LESSP,
DIFFERENCE, ITIMES, ZEROP, and IPLUS, to:
T.
Case 14.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))),
which again simplifies, applying MINUS-NEGATIVE-GUTS and PLUS-ZERO-ARG2, and
expanding LESSP, DIFFERENCE, ITIMES, ZEROP, NEGATIVEP, and IPLUS, to:
T.
Case 13.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL (NEGATIVE-GUTS X) 0)
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))).
However this again simplifies, rewriting with
TIMES-DISTRIBUTES-OVER-DIFFERENCE and NEGATIVE-GUTS-MINUS, and expanding
DIFFERENCE, TIMES, EQUAL, ITIMES, PLUS, NEGATIVEP, and IPLUS, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (NEGATIVEP Y)))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS 0 0))).
However this again simplifies, applying TIMES-DISTRIBUTES-OVER-PLUS, and
expanding the functions FIX-INT, NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP,
MINUS, PLUS, TIMES, EQUAL, ITIMES, and IPLUS, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS 0 0))).
However this again simplifies, applying PLUS-ZERO-ARG2 and
COMMUTATIVITY-OF-TIMES, and unfolding the definitions of ZEROP, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, NEGATIVEP, ITIMES,
PLUS, and IPLUS, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS 0 0))).
However this again simplifies, appealing to the lemmas PLUS-ZERO-ARG2 and
COMMUTATIVITY-OF-TIMES, and unfolding NEGATIVEP, ZEROP, NUMBERP, FIX-INT,
NEGATIVE-GUTS, INTEGERP, MINUS, TIMES, EQUAL, ITIMES, PLUS, and IPLUS, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS 0 0))),
which again simplifies, rewriting with the lemmas PLUS-ZERO-ARG2 and
COMMUTATIVITY-OF-TIMES, and expanding the definitions of NEGATIVEP, ZEROP,
FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, ITIMES, PLUS,
and IPLUS, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS 0 0))),
which again simplifies, applying COMMUTATIVITY-OF-TIMES, and unfolding the
functions NEGATIVEP, PLUS, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS,
TIMES, EQUAL, ITIMES, and IPLUS, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS (MINUS (TIMES Y (NEGATIVE-GUTS X)))
0))).
However this again simplifies, using linear arithmetic, applying the lemmas
PLUS-ZERO-ARG2, EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, COMMUTATIVITY-OF-TIMES,
and LESSP-TIMES1, and unfolding the definitions of ZEROP, FIX-INT, INTEGERP,
ITIMES, DIFFERENCE, EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS (MINUS (TIMES Y (NEGATIVE-GUTS X)))
0))),
which again simplifies, using linear arithmetic, applying the lemmas
PLUS-ZERO-ARG2, EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, COMMUTATIVITY-OF-TIMES,
and LESSP-TIMES1, and opening up the definitions of NEGATIVEP, ZEROP,
FIX-INT, INTEGERP, ITIMES, DIFFERENCE, EQUAL, and IPLUS, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(NOT (LESSP Z (NEGATIVE-GUTS Y))))
(EQUAL (ITIMES X
(DIFFERENCE Z (NEGATIVE-GUTS Y)))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
(MINUS (TIMES Z (NEGATIVE-GUTS X)))))),
which again simplifies, applying EQUAL-DIFFERENCE-0,
CORRECTNESS-OF-CANCEL-LESSP-TIMES, NEGATIVE-GUTS-MINUS,
TIMES-DISTRIBUTES-OVER-DIFFERENCE, COMMUTATIVITY-OF-TIMES, and
DIFFERENCE-LEQ-ARG1, and opening up the definitions of FIX-INT, AND, FIX,
NOT, ZEROP, INTEGERP, ITIMES, and IPLUS, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y)))
(EQUAL (ITIMES X
(MINUS (DIFFERENCE (NEGATIVE-GUTS Y) Z)))
(IPLUS (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
(MINUS (TIMES Z (NEGATIVE-GUTS X)))))).
However this again simplifies, appealing to the lemmas
TIMES-DISTRIBUTES-OVER-DIFFERENCE, COMMUTATIVITY-OF-TIMES,
NEGATIVE-GUTS-MINUS, and CORRECTNESS-OF-CANCEL-LESSP-TIMES, and opening up
the definitions of ITIMES, AND, FIX, NOT, ZEROP, and IPLUS, to the formula:
(IMPLIES (AND (NEGATIVEP X)
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(LESSP Z (NEGATIVE-GUTS Y)))
(NOT (LESSP (NEGATIVE-GUTS Y) Z))).
This again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS 0
(MINUS (TIMES Z (NEGATIVE-GUTS X)))))),
which again simplifies, using linear arithmetic, rewriting with
EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, COMMUTATIVITY-OF-TIMES, and LESSP-TIMES1,
and unfolding the definitions of PLUS, FIX-INT, INTEGERP, ITIMES, DIFFERENCE,
EQUAL, NEGATIVEP, and IPLUS, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS 0
(MINUS (TIMES Z (NEGATIVE-GUTS X)))))).
However this again simplifies, using linear arithmetic, appealing to the
lemmas EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, COMMUTATIVITY-OF-TIMES, and
LESSP-TIMES1, and expanding the functions NEGATIVEP, EQUAL, PLUS, FIX-INT,
INTEGERP, ITIMES, DIFFERENCE, and IPLUS, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y))
(EQUAL (ITIMES X (PLUS Y Z))
(IPLUS (MINUS (TIMES Y (NEGATIVE-GUTS X)))
(MINUS (TIMES Z (NEGATIVE-GUTS X)))))),
which again simplifies, applying EQUAL-PLUS-0, EQUAL-TIMES-0,
NEGATIVE-GUTS-MINUS, TIMES-DISTRIBUTES-OVER-PLUS, and COMMUTATIVITY-OF-TIMES,
and opening up the functions FIX-INT, INTEGERP, ITIMES, and IPLUS, to:
T.
Q.E.D.
[ 0.0 0.4 0.3 ]
ITIMES-DISTRIBUTES-OVER-IPLUS-PROOF
(LEMMA ITIMES-DISTRIBUTES-OVER-IPLUS
(REWRITE)
(AND (EQUAL (ITIMES X (IPLUS Y Z))
(IPLUS (ITIMES X Y) (ITIMES X Z)))
(EQUAL (ITIMES (IPLUS X Y) Z)
(IPLUS (ITIMES X Z) (ITIMES Y Z))))
((USE (ITIMES-DISTRIBUTES-OVER-IPLUS-PROOF (X X)
(Y Y)
(Z Z))
(ITIMES-DISTRIBUTES-OVER-IPLUS-PROOF (X Z)
(Y X)
(Z Y)))
(ENABLE COMMUTATIVITY-OF-ITIMES)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-ITIMES, could be
applied whenever the newly proposed ITIMES-DISTRIBUTES-OVER-IPLUS could!
WARNING: the previously added lemma, COMMUTATIVITY-OF-ITIMES, could be
applied whenever the newly proposed ITIMES-DISTRIBUTES-OVER-IPLUS could!
WARNING: Note that the proposed lemma ITIMES-DISTRIBUTES-OVER-IPLUS is to be
stored as zero type prescription rules, zero compound recognizer rules, zero
linear rules, and two replacement rules.
This formula simplifies, applying COMMUTATIVITY-OF-ITIMES, and opening up the
definition of AND, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ITIMES-DISTRIBUTES-OVER-IPLUS
(LEMMA COMMUTATIVITY2-OF-ITIMES
(REWRITE)
(EQUAL (ITIMES X (ITIMES Y Z))
(ITIMES Y (ITIMES X Z)))
((ENABLE ITIMES INTEGERP FIX-INT)
(ENABLE-THEORY MULTIPLICATION)
(DO-NOT-INDUCT T)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-ITIMES, could be
applied whenever the newly proposed COMMUTATIVITY2-OF-ITIMES could!
This simplifies, rewriting with EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, and
COMMUTATIVITY-OF-TIMES, and expanding FIX-INT, INTEGERP, and ITIMES, to 34 new
formulas:
Case 34.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL (NEGATIVE-GUTS X) 0)
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (ITIMES X 0) (ITIMES Y 0))),
which again simplifies, opening up the definitions of FIX-INT, EQUAL,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, NEGATIVEP, and ITIMES, to:
T.
Case 33.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NEGATIVEP Y))
(EQUAL (ITIMES X 0) (ITIMES Y 0))),
which again simplifies, applying the lemma COMMUTATIVITY-OF-TIMES, and
expanding FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL,
NEGATIVEP, and ITIMES, to:
T.
Case 32.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NEGATIVEP Y))
(EQUAL (ITIMES X 0) (ITIMES Y 0))),
which again simplifies, applying the lemma COMMUTATIVITY-OF-TIMES, and
opening up the functions NEGATIVEP, FIX-INT, NEGATIVE-GUTS, NUMBERP,
INTEGERP, MINUS, TIMES, EQUAL, and ITIMES, to:
T.
Case 31.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP Y)))
(EQUAL (ITIMES X 0) (ITIMES Y 0))),
which again simplifies, applying the lemma COMMUTATIVITY-OF-TIMES, and
opening up TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 30.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (NUMBERP X))
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (ITIMES X 0) (ITIMES Y 0))),
which again simplifies, applying the lemmas COMMUTATIVITY-OF-TIMES and
TIMES-ZERO, and opening up ZEROP, NEGATIVEP, ITIMES, and EQUAL, to:
T.
Case 29.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (NUMBERP X))
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (ITIMES X 0) (ITIMES Y 0))),
which again simplifies, rewriting with the lemmas COMMUTATIVITY-OF-TIMES and
TIMES-ZERO, and expanding the definitions of NEGATIVEP, ZEROP, ITIMES, TIMES,
and EQUAL, to:
T.
Case 28.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL X 0)
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (ITIMES X 0) (ITIMES Y 0))),
which again simplifies, applying COMMUTATIVITY-OF-TIMES and TIMES-ZERO, and
expanding NEGATIVEP, TIMES, ITIMES, ZEROP, and EQUAL, to:
T.
Case 27.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL X 0)
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (ITIMES X 0) (ITIMES Y 0))).
This again simplifies, clearly, to:
T.
Case 26.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (NUMBERP X))
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (ITIMES X
(MINUS (TIMES Y (NEGATIVE-GUTS Z))))
(ITIMES Y 0))).
However this again simplifies, rewriting with NEGATIVE-GUTS-MINUS and
COMMUTATIVITY-OF-TIMES, and expanding the functions FIX-INT, EQUAL,
NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS, TIMES, and ITIMES, to:
T.
Case 25.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL X 0)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (ITIMES X
(MINUS (TIMES Y (NEGATIVE-GUTS Z))))
(ITIMES Y 0))).
But this again simplifies, rewriting with NEGATIVE-GUTS-MINUS and
COMMUTATIVITY-OF-TIMES, and opening up the definitions of NEGATIVEP, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, and ITIMES, to:
T.
Case 24.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL X 0)
(NEGATIVEP Y))
(EQUAL (ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))
(ITIMES Y 0))).
However this again simplifies, appealing to the lemma COMMUTATIVITY-OF-TIMES,
and opening up the definitions of NEGATIVEP, TIMES, EQUAL, ITIMES, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, and MINUS, to:
T.
Case 23.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (NUMBERP X))
(NEGATIVEP Y))
(EQUAL (ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))
(ITIMES Y 0))),
which again simplifies, applying COMMUTATIVITY-OF-TIMES, and unfolding TIMES,
ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, EQUAL, and
NEGATIVEP, to:
T.
Case 22.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP Y))
(EQUAL (ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))
(ITIMES Y 0))).
This again simplifies, applying the lemma COMMUTATIVITY-OF-TIMES, and
opening up the functions EQUAL, TIMES, NEGATIVEP, ITIMES, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, and MINUS, to:
T.
Case 21.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (ITIMES X 0)
(ITIMES Y
(MINUS (TIMES X (NEGATIVE-GUTS Z)))))),
which again simplifies, appealing to the lemmas COMMUTATIVITY-OF-TIMES,
COMMUTATIVITY2-OF-TIMES, and NEGATIVE-GUTS-MINUS, and expanding TIMES, EQUAL,
NEGATIVEP, ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, and MINUS, to:
T.
Case 20.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (ITIMES X 0)
(ITIMES Y
(MINUS (TIMES X (NEGATIVE-GUTS Z)))))),
which again simplifies, rewriting with COMMUTATIVITY-OF-TIMES and
NEGATIVE-GUTS-MINUS, and opening up the definitions of NEGATIVEP, TIMES,
EQUAL, ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, and MINUS, to:
T.
Case 19.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y))
(EQUAL (ITIMES X
(MINUS (TIMES Y (NEGATIVE-GUTS Z))))
(ITIMES Y
(MINUS (TIMES X (NEGATIVE-GUTS Z)))))).
This again simplifies, applying EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, and
COMMUTATIVITY2-OF-TIMES, and unfolding the functions FIX-INT, INTEGERP, and
ITIMES, to:
T.
Case 18.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Z)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP Y))
(EQUAL (ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))
(ITIMES Y
(MINUS (TIMES X (NEGATIVE-GUTS Z)))))).
But this again simplifies, rewriting with COMMUTATIVITY2-OF-TIMES and
NEGATIVE-GUTS-MINUS, and expanding the definition of ITIMES, to:
T.
Case 17.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NOT (NEGATIVEP Y)))
(EQUAL (ITIMES X (TIMES Y Z))
(ITIMES Y (TIMES X Z)))).
But this again simplifies, rewriting with COMMUTATIVITY2-OF-TIMES, and
expanding ITIMES, to:
T.
Case 16.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(EQUAL Z 0))
(EQUAL (ITIMES X 0)
(ITIMES Y (TIMES X Z)))).
This again simplifies, applying COMMUTATIVITY-OF-TIMES, and opening up the
definitions of NEGATIVEP, TIMES, EQUAL, ITIMES, FIX-INT, NEGATIVE-GUTS,
NUMBERP, INTEGERP, and MINUS, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (NUMBERP Z)))
(EQUAL (ITIMES X 0)
(ITIMES Y (TIMES X Z)))).
But this again simplifies, applying COMMUTATIVITY-OF-TIMES and TIMES-ZERO,
and unfolding TIMES, EQUAL, NEGATIVEP, ITIMES, ZEROP, FIX-INT, NEGATIVE-GUTS,
NUMBERP, INTEGERP, and MINUS, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (ITIMES X 0)
(ITIMES Y (TIMES X Z)))).
But this again simplifies, rewriting with the lemma COMMUTATIVITY-OF-TIMES,
and expanding TIMES, EQUAL, NEGATIVEP, ITIMES, FIX-INT, NEGATIVE-GUTS,
NUMBERP, INTEGERP, and MINUS, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Z))
(NEGATIVEP Y)
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES X
(MINUS (TIMES Z (NEGATIVE-GUTS Y))))
(ITIMES Y (TIMES X Z)))),
which again simplifies, rewriting with the lemmas EQUAL-TIMES-0,
NEGATIVE-GUTS-MINUS, COMMUTATIVITY2-OF-TIMES, and COMMUTATIVITY-OF-TIMES,
and unfolding the functions FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(EQUAL Y 0))
(EQUAL (ITIMES X 0)
(ITIMES Y
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))),
which again simplifies, applying COMMUTATIVITY-OF-TIMES, and opening up
NEGATIVEP, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL,
and ITIMES, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(NOT (NUMBERP Y)))
(EQUAL (ITIMES X 0)
(ITIMES Y
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
But this again simplifies, rewriting with COMMUTATIVITY-OF-TIMES, and
opening up the functions FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS,
TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(EQUAL (NEGATIVE-GUTS Z) 0))
(EQUAL (ITIMES X 0)
(ITIMES Y
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
However this again simplifies, rewriting with COMMUTATIVITY-OF-TIMES, and
expanding FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL,
NEGATIVEP, and ITIMES, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0)))
(EQUAL (ITIMES X
(MINUS (TIMES Y (NEGATIVE-GUTS Z))))
(ITIMES Y
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
This again simplifies, rewriting with COMMUTATIVITY2-OF-TIMES and
NEGATIVE-GUTS-MINUS, and unfolding the function ITIMES, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Z)
(NEGATIVEP Y))
(EQUAL (ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z)))
(ITIMES Y
(TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Z))))).
But this again simplifies, applying EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, and
COMMUTATIVITY2-OF-TIMES, and unfolding the functions FIX-INT, INTEGERP, and
ITIMES, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NOT (NEGATIVEP Y)))
(EQUAL (ITIMES X (TIMES Y Z))
(ITIMES Y 0))).
But this again simplifies, applying COMMUTATIVITY-OF-TIMES, and opening up
NEGATIVEP, EQUAL, TIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS,
and ITIMES, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NOT (NEGATIVEP Y)))
(EQUAL (ITIMES X (TIMES Y Z))
(ITIMES Y 0))).
But this again simplifies, applying TIMES-ZERO and COMMUTATIVITY-OF-TIMES,
and unfolding ZEROP, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES,
EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(EQUAL (NEGATIVE-GUTS X) 0)
(NOT (NEGATIVEP Y)))
(EQUAL (ITIMES X (TIMES Y Z))
(ITIMES Y 0))).
However this again simplifies, applying COMMUTATIVITY-OF-TIMES, and
unfolding FIX-INT, NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS, TIMES,
EQUAL, and ITIMES, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (NEGATIVEP Y)))
(EQUAL (ITIMES X (TIMES Y Z))
(ITIMES Y
(MINUS (TIMES Z (NEGATIVE-GUTS X)))))).
This again simplifies, applying EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS,
COMMUTATIVITY2-OF-TIMES, and COMMUTATIVITY-OF-TIMES, and opening up the
definitions of FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES X
(MINUS (TIMES Z (NEGATIVE-GUTS Y))))
(ITIMES Y
(MINUS (TIMES Z (NEGATIVE-GUTS X)))))).
But this again simplifies, rewriting with COMMUTATIVITY2-OF-TIMES,
NEGATIVE-GUTS-MINUS, and COMMUTATIVITY-OF-TIMES, and opening up the
definition of ITIMES, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NEGATIVEP Y)
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (ITIMES X 0)
(ITIMES Y
(MINUS (TIMES Z (NEGATIVE-GUTS X)))))).
However this again simplifies, applying COMMUTATIVITY-OF-TIMES and
NEGATIVE-GUTS-MINUS, and unfolding the definitions of FIX-INT, NEGATIVE-GUTS,
NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(EQUAL (NEGATIVE-GUTS X) 0)
(NEGATIVEP Y)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES X
(MINUS (TIMES Z (NEGATIVE-GUTS Y))))
(ITIMES Y 0))).
But this again simplifies, applying the lemmas NEGATIVE-GUTS-MINUS and
COMMUTATIVITY-OF-TIMES, and opening up TIMES, EQUAL, ITIMES, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, and NEGATIVEP, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
COMMUTATIVITY2-OF-ITIMES
(LEMMA ASSOCIATIVITY-OF-ITIMES
(REWRITE)
(EQUAL (ITIMES (ITIMES X Y) Z)
(ITIMES X (ITIMES Y Z)))
((ENABLE ITIMES INTEGERP FIX-INT)
(ENABLE-THEORY MULTIPLICATION)
(DO-NOT-INDUCT T)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-ITIMES, could be
applied whenever the newly proposed ASSOCIATIVITY-OF-ITIMES could!
This simplifies, rewriting with EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, and
COMMUTATIVITY-OF-TIMES, and expanding FIX-INT, INTEGERP, and ITIMES, to 34 new
formulas:
Case 34.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(EQUAL Y 0)
(NOT (NEGATIVEP X)))
(EQUAL (ITIMES (TIMES X Y) Z)
(ITIMES X 0))),
which again simplifies, applying the lemma COMMUTATIVITY-OF-TIMES, and
opening up the definitions of NEGATIVEP, EQUAL, TIMES, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, and ITIMES, to:
T.
Case 33.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (NUMBERP Y))
(NOT (NEGATIVEP X)))
(EQUAL (ITIMES (TIMES X Y) Z)
(ITIMES X 0))),
which again simplifies, applying TIMES-ZERO and COMMUTATIVITY-OF-TIMES, and
unfolding ZEROP, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES,
EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 32.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NOT (NEGATIVEP X)))
(EQUAL (ITIMES (TIMES X Y) Z)
(ITIMES X 0))).
But this again simplifies, appealing to the lemmas ASSOCIATIVITY-OF-TIMES
and COMMUTATIVITY-OF-TIMES, and unfolding the functions FIX-INT,
NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, and ITIMES,
to:
T.
Case 31.(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NOT (NEGATIVEP X)))
(EQUAL (ITIMES 0 Z) (ITIMES X 0))),
which again simplifies, rewriting with the lemma COMMUTATIVITY-OF-TIMES, and
expanding the functions TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 30.(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NOT (NEGATIVEP X))
(NOT (NUMBERP X)))
(EQUAL (ITIMES 0 Z) (ITIMES X 0))),
which again simplifies, rewriting with the lemmas TIMES-ZERO and
COMMUTATIVITY-OF-TIMES, and expanding the definitions of ZEROP, NEGATIVEP,
ITIMES, and EQUAL, to:
T.
Case 29.(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NOT (NEGATIVEP X))
(EQUAL X 0))
(EQUAL (ITIMES 0 Z) (ITIMES X 0))),
which again simplifies, applying TIMES-ZERO, and expanding the definitions
of NEGATIVEP, ZEROP, ITIMES, TIMES, and EQUAL, to:
T.
Case 28.(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NOT (NEGATIVEP X))
(NOT (NUMBERP X)))
(EQUAL (ITIMES 0 Z) (ITIMES X 0))).
This again simplifies, rewriting with COMMUTATIVITY-OF-TIMES and TIMES-ZERO,
and expanding NEGATIVEP, TIMES, ITIMES, ZEROP, and EQUAL, to:
T.
Case 27.(IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NOT (NEGATIVEP X))
(EQUAL X 0))
(EQUAL (ITIMES 0 Z) (ITIMES X 0))).
This again simplifies, obviously, to:
T.
Case 26.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (ITIMES 0 Z) (ITIMES X 0))).
However this again simplifies, opening up the functions FIX-INT, EQUAL,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, NEGATIVEP, and ITIMES, to:
T.
Case 25.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (NUMBERP Y))
(NEGATIVEP X))
(EQUAL (ITIMES 0 Z) (ITIMES X 0))),
which again simplifies, rewriting with COMMUTATIVITY-OF-TIMES, and opening
up the definitions of FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS,
TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 24.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(EQUAL Y 0)
(NEGATIVEP X))
(EQUAL (ITIMES 0 Z) (ITIMES X 0))).
However this again simplifies, appealing to the lemma COMMUTATIVITY-OF-TIMES,
and opening up the definitions of NEGATIVEP, FIX-INT, NEGATIVE-GUTS, NUMBERP,
INTEGERP, MINUS, TIMES, EQUAL, and ITIMES, to:
T.
Case 23.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NOT (NEGATIVEP X)))
(EQUAL (ITIMES (TIMES X Y) Z)
(ITIMES X
(MINUS (TIMES Y (NEGATIVE-GUTS Z)))))),
which again simplifies, applying EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, and
ASSOCIATIVITY-OF-TIMES, and unfolding FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 22.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ITIMES (MINUS (TIMES Y (NEGATIVE-GUTS X)))
Z)
(ITIMES X
(MINUS (TIMES Y (NEGATIVE-GUTS Z)))))).
This again simplifies, applying the lemmas ASSOCIATIVITY-OF-TIMES,
NEGATIVE-GUTS-MINUS, and COMMUTATIVITY2-OF-TIMES, and opening up the
function ITIMES, to:
T.
Case 21.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS Z) 0))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (ITIMES 0 Z)
(ITIMES X
(MINUS (TIMES Y (NEGATIVE-GUTS Z)))))),
which again simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
expanding FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL,
NEGATIVEP, and ITIMES, to:
T.
Case 20.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NEGATIVEP Z)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(EQUAL (NEGATIVE-GUTS Z) 0)
(NEGATIVEP X)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ITIMES (MINUS (TIMES Y (NEGATIVE-GUTS X)))
Z)
(ITIMES X 0))),
which again simplifies, rewriting with ASSOCIATIVITY-OF-TIMES,
COMMUTATIVITY-OF-TIMES, and NEGATIVE-GUTS-MINUS, and opening up the
definitions of TIMES, EQUAL, ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP,
INTEGERP, MINUS, and NEGATIVEP, to:
T.
Case 19.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NOT (NEGATIVEP X)))
(EQUAL (ITIMES (TIMES X Y) Z)
(ITIMES X (TIMES Y Z)))).
This again simplifies, applying ASSOCIATIVITY-OF-TIMES, and unfolding the
function ITIMES, to:
T.
Case 18.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(EQUAL Y 0))
(EQUAL (ITIMES 0 Z)
(ITIMES X (TIMES Y Z)))).
But this again simplifies, rewriting with COMMUTATIVITY-OF-TIMES, and
expanding the definitions of NEGATIVEP, TIMES, EQUAL, ITIMES, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, and MINUS, to:
T.
Case 17.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (NUMBERP Y)))
(EQUAL (ITIMES 0 Z)
(ITIMES X (TIMES Y Z)))).
But this again simplifies, rewriting with COMMUTATIVITY-OF-TIMES, and
expanding TIMES, EQUAL, NEGATIVEP, ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP,
INTEGERP, and MINUS, to:
T.
Case 16.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL (ITIMES 0 Z)
(ITIMES X (TIMES Y Z)))).
This again simplifies, expanding the functions TIMES, EQUAL, NEGATIVEP,
ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, and MINUS, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP Y))
(NOT (NEGATIVEP Z))
(NEGATIVEP X)
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(EQUAL (ITIMES (MINUS (TIMES Y (NEGATIVE-GUTS X)))
Z)
(ITIMES X (TIMES Y Z)))),
which again simplifies, appealing to the lemmas EQUAL-TIMES-0,
ASSOCIATIVITY-OF-TIMES, COMMUTATIVITY-OF-TIMES, NEGATIVE-GUTS-MINUS, and
COMMUTATIVITY2-OF-TIMES, and expanding FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 14.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (NEGATIVEP X))
(EQUAL X 0))
(EQUAL (ITIMES 0 Z)
(ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))),
which again simplifies, opening up the functions NEGATIVEP, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL, and ITIMES, to:
T.
Case 13.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (NEGATIVEP X))
(NOT (NUMBERP X)))
(EQUAL (ITIMES 0 Z)
(ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))),
which again simplifies, expanding FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP,
MINUS, TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (NEGATIVEP X))
(EQUAL (NEGATIVE-GUTS Y) 0))
(EQUAL (ITIMES 0 Z)
(ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))),
which again simplifies, rewriting with the lemma COMMUTATIVITY-OF-TIMES, and
unfolding the functions FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS,
TIMES, EQUAL, NEGATIVEP, and ITIMES, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NOT (NEGATIVEP X))
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES (MINUS (TIMES X (NEGATIVE-GUTS Y)))
Z)
(ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))),
which again simplifies, applying ASSOCIATIVITY-OF-TIMES and
NEGATIVE-GUTS-MINUS, and opening up ITIMES, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP Y)
(NEGATIVEP Z)
(NEGATIVEP X))
(EQUAL (ITIMES (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
Z)
(ITIMES X
(TIMES (NEGATIVE-GUTS Y)
(NEGATIVE-GUTS Z))))).
But this again simplifies, rewriting with EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS,
and ASSOCIATIVITY-OF-TIMES, and opening up the functions FIX-INT, INTEGERP,
and ITIMES, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NOT (NEGATIVEP X))
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES (MINUS (TIMES X (NEGATIVE-GUTS Y)))
Z)
(ITIMES X 0))).
However this again simplifies, rewriting with ASSOCIATIVITY-OF-TIMES,
COMMUTATIVITY-OF-TIMES, and NEGATIVE-GUTS-MINUS, and expanding FIX-INT,
NEGATIVE-GUTS, NEGATIVEP, NUMBERP, INTEGERP, MINUS, EQUAL, TIMES, and ITIMES,
to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NOT (NEGATIVEP X))
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (ITIMES (MINUS (TIMES X (NEGATIVE-GUTS Y)))
Z)
(ITIMES X 0))).
This again simplifies, rewriting with ASSOCIATIVITY-OF-TIMES,
COMMUTATIVITY-OF-TIMES, and NEGATIVE-GUTS-MINUS, and unfolding the functions
NEGATIVEP, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, TIMES, EQUAL,
and ITIMES, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(EQUAL Z 0)
(NEGATIVEP X))
(EQUAL (ITIMES (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
Z)
(ITIMES X 0))).
But this again simplifies, applying ASSOCIATIVITY-OF-TIMES and
COMMUTATIVITY-OF-TIMES, and unfolding the functions NEGATIVEP, TIMES, EQUAL,
ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP, and MINUS, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (NUMBERP Z))
(NEGATIVEP X))
(EQUAL (ITIMES (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
Z)
(ITIMES X 0))).
But this again simplifies, applying ASSOCIATIVITY-OF-TIMES and
COMMUTATIVITY-OF-TIMES, and opening up EQUAL, TIMES, ITIMES, FIX-INT,
NEGATIVE-GUTS, NUMBERP, INTEGERP, MINUS, and NEGATIVEP, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(EQUAL (NEGATIVE-GUTS Y) 0)
(NEGATIVEP X))
(EQUAL (ITIMES (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
Z)
(ITIMES X 0))).
But this again simplifies, applying COMMUTATIVITY-OF-TIMES, and unfolding
EQUAL, TIMES, NEGATIVEP, ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP,
and MINUS, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(NOT (NUMBERP X)))
(EQUAL (ITIMES 0 Z)
(ITIMES X
(MINUS (TIMES Z (NEGATIVE-GUTS Y)))))).
However this again simplifies, applying NEGATIVE-GUTS-MINUS, and unfolding
TIMES, EQUAL, NEGATIVEP, ITIMES, FIX-INT, NEGATIVE-GUTS, NUMBERP, INTEGERP,
and MINUS, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(EQUAL X 0))
(EQUAL (ITIMES 0 Z)
(ITIMES X
(MINUS (TIMES Z (NEGATIVE-GUTS Y)))))).
This again simplifies, applying NEGATIVE-GUTS-MINUS, and opening up the
definitions of NEGATIVEP, TIMES, EQUAL, ITIMES, FIX-INT, NEGATIVE-GUTS,
NUMBERP, INTEGERP, and MINUS, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NOT (NEGATIVEP X))
(NOT (EQUAL X 0))
(NUMBERP X))
(EQUAL (ITIMES (MINUS (TIMES X (NEGATIVE-GUTS Y)))
Z)
(ITIMES X
(MINUS (TIMES Z (NEGATIVE-GUTS Y)))))).
But this again simplifies, rewriting with EQUAL-TIMES-0,
ASSOCIATIVITY-OF-TIMES, COMMUTATIVITY-OF-TIMES, and NEGATIVE-GUTS-MINUS, and
opening up the definitions of FIX-INT, INTEGERP, and ITIMES, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP Y)
(NOT (NEGATIVEP Z))
(NOT (EQUAL Z 0))
(NUMBERP Z)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))
(NEGATIVEP X))
(EQUAL (ITIMES (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
Z)
(ITIMES X
(MINUS (TIMES Z (NEGATIVE-GUTS Y)))))).
However this again simplifies, applying ASSOCIATIVITY-OF-TIMES,
COMMUTATIVITY2-OF-TIMES, COMMUTATIVITY-OF-TIMES, and NEGATIVE-GUTS-MINUS,
and unfolding the definition of ITIMES, to:
T.
Q.E.D.
[ 0.0 0.1 0.1 ]
ASSOCIATIVITY-OF-ITIMES
(LEMMA EQUAL-ITIMES-0
(REWRITE)
(EQUAL (EQUAL (ITIMES X Y) 0)
(OR (EQUAL (FIX-INT X) 0)
(EQUAL (FIX-INT Y) 0)))
((ENABLE ITIMES INTEGERP FIX-INT)
(ENABLE-THEORY MULTIPLICATION)
(DO-NOT-INDUCT T)))
This formula simplifies, rewriting with EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS,
and COMMUTATIVITY-OF-TIMES, and opening up the definitions of FIX-INT,
INTEGERP, ITIMES, and OR, to the following 19 new formulas:
Case 19.(IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (EQUAL X 0))
(NUMBERP X)
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(NOT (EQUAL Y 0))).
This again simplifies, trivially, to:
T.
Case 18.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NOT (EQUAL (TIMES X Y) 0)))
(NOT (EQUAL X 0))).
However this again simplifies, using linear arithmetic, to:
T.
Case 17.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NOT (EQUAL (TIMES X Y) 0)))
(NUMBERP X)),
which again simplifies, opening up the functions TIMES and EQUAL, to:
T.
Case 16.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NOT (EQUAL (TIMES X Y) 0)))
(NOT (EQUAL Y 0))),
which again simplifies, applying the lemma COMMUTATIVITY-OF-TIMES, and
unfolding the functions NEGATIVEP, EQUAL, and TIMES, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(NOT (EQUAL (TIMES X Y) 0)))
(NUMBERP Y)),
which again simplifies, applying the lemma TIMES-ZERO, and unfolding the
functions ZEROP and EQUAL, to:
T.
Case 14.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)))
(NOT (EQUAL X 0))),
which again simplifies, obviously, to:
T.
Case 13.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))
(NOT (NUMBERP X)))
(NOT (EQUAL (NEGATIVE-GUTS X) 0))).
But this again simplifies, using linear arithmetic, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)))
(NOT (EQUAL Y 0))),
which again simplifies, trivially, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(NOT (EQUAL (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0))
(NOT (NUMBERP Y)))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0))).
This again simplifies, applying COMMUTATIVITY-OF-TIMES, and expanding the
functions EQUAL and TIMES, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NOT (EQUAL Y 0))
(NUMBERP Y)
(NOT (EQUAL (NEGATIVE-GUTS X) 0)))
(NOT (EQUAL X 0))).
This again simplifies, clearly, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(NUMBERP Y)
(EQUAL (NEGATIVE-GUTS X) 0)
(NUMBERP X)
(NOT (EQUAL X 0)))
(EQUAL (EQUAL Y 0) T)).
This again simplifies, obviously, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL Y 0)
(NUMBERP X)
(NOT (EQUAL X 0))
(NUMBERP Y))
(EQUAL (EQUAL Y 0) T)).
This again simplifies, clearly, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP X)
(NOT (NEGATIVEP Y))
(EQUAL Y 0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL X 0))
(NUMBERP Y))
(EQUAL (EQUAL Y 0) T)).
But this again simplifies, unfolding NEGATIVEP, NUMBERP, and EQUAL, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(EQUAL (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)
(NUMBERP X)
(NOT (EQUAL X 0))
(NUMBERP Y))
(EQUAL (EQUAL Y 0) T)),
which again simplifies, obviously, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(EQUAL (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)
(NUMBERP X)
(NOT (EQUAL X 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (EQUAL Y 0) T)).
This again simplifies, obviously, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(EQUAL (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL X 0))
(NUMBERP Y))
(EQUAL (EQUAL Y 0) T)).
This again simplifies, obviously, to:
T.
Case 3. (IMPLIES (AND (NEGATIVEP X)
(NEGATIVEP Y)
(EQUAL (TIMES (NEGATIVE-GUTS X)
(NEGATIVE-GUTS Y))
0)
(NOT (EQUAL (NEGATIVE-GUTS X) 0))
(NOT (EQUAL X 0))
(NOT (EQUAL (NEGATIVE-GUTS Y) 0)))
(EQUAL (EQUAL Y 0) T)).
But this again simplifies, applying EQUAL-TIMES-0, to:
T.
Case 2. (IMPLIES (AND (NOT (NEGATIVEP X))
(NOT (NEGATIVEP Y))
(EQUAL (TIMES X Y) 0)
(NUMBERP X)
(NOT (EQUAL X 0))
(NUMBERP Y))
(EQUAL (EQUAL Y 0) T)).
This again simplifies, appealing to the lemma EQUAL-TIMES-0, to:
T.
Case 1. (IMPLIES (AND (NOT (NEGATIVEP X))
(NEGATIVEP Y)
(NOT (EQUAL X 0))
(NUMBERP X)
(EQUAL (NEGATIVE-GUTS Y) 0)
(NUMBERP Y))
(EQUAL (EQUAL Y 0) T)),
which again simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EQUAL-ITIMES-0
(LEMMA EQUAL-ITIMES-1
(REWRITE)
(EQUAL (EQUAL (ITIMES A B) 1)
(OR (AND (EQUAL A 1) (EQUAL B 1))
(AND (EQUAL A -1) (EQUAL B -1))))
((ENABLE ITIMES INTEGERP FIX-INT)
(ENABLE-THEORY MULTIPLICATION)
(DO-NOT-INDUCT T)))
This simplifies, applying EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, and
COMMUTATIVITY-OF-TIMES, and unfolding the functions FIX-INT, INTEGERP, ITIMES,
AND, and OR, to the following 16 new conjectures:
Case 16.(IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
1)
(NOT (EQUAL A 1)))
(EQUAL (EQUAL B -1) T)).
This again simplifies, rewriting with EQUAL-TIMES-1, and unfolding the
functions NEGATIVE-GUTS and EQUAL, to:
T.
Case 15.(IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
1)
(NOT (EQUAL B 1)))
(EQUAL (EQUAL B -1) T)).
But this again simplifies, applying the lemma EQUAL-TIMES-1, and expanding
NEGATIVE-GUTS and EQUAL, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(EQUAL (TIMES A B) 1)
(NOT (EQUAL A 1)))
(EQUAL (EQUAL B -1) T)),
which again simplifies, applying EQUAL-TIMES-1, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(EQUAL (TIMES A B) 1)
(NOT (EQUAL B 1)))
(EQUAL (EQUAL B -1) T)).
But this again simplifies, applying EQUAL-TIMES-1, to:
T.
Case 12.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(EQUAL A -1))
(NOT (EQUAL B -1))).
This again simplifies, trivially, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL (TIMES A B) 1))
(EQUAL A -1))
(NOT (EQUAL B -1))).
This again simplifies, clearly, to:
T.
Case 10.(IMPLIES (AND (NEGATIVEP A)
(NOT (EQUAL (TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
1))
(EQUAL A -1))
(NOT (EQUAL B -1))).
This again simplifies, expanding the definitions of NEGATIVEP, NEGATIVE-GUTS,
TIMES, and EQUAL, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(EQUAL A -1))
(NOT (EQUAL B -1))),
which again simplifies, obviously, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(EQUAL A 1))
(NOT (EQUAL B 1))).
This again simplifies, clearly, to:
T.
Case 7. (IMPLIES (AND (NEGATIVEP B)
(NOT (EQUAL (TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
1))
(EQUAL A 1))
(NOT (EQUAL B 1))).
This again simplifies, clearly, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
1)
(NOT (EQUAL A 1)))
(EQUAL A -1)).
But this again simplifies, rewriting with EQUAL-TIMES-1, and unfolding the
functions NEGATIVE-GUTS and EQUAL, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL (TIMES (NEGATIVE-GUTS A)
(NEGATIVE-GUTS B))
1)
(NOT (EQUAL B 1)))
(EQUAL A -1)).
But this again simplifies, applying EQUAL-TIMES-1, and unfolding
NEGATIVE-GUTS and EQUAL, to:
T.
Case 4. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (EQUAL (TIMES A B) 1))
(EQUAL A 1))
(NOT (EQUAL B 1))).
This again simplifies, opening up the definitions of NEGATIVEP, TIMES, and
EQUAL, to:
T.
Case 3. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(EQUAL (TIMES A B) 1)
(NOT (EQUAL A 1)))
(EQUAL A -1)),
which again simplifies, applying the lemma EQUAL-TIMES-1, to:
T.
Case 2. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(EQUAL (TIMES A B) 1)
(NOT (EQUAL B 1)))
(EQUAL A -1)),
which again simplifies, rewriting with EQUAL-TIMES-1, to:
T.
Case 1. (IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(EQUAL A 1))
(NOT (EQUAL B 1))).
This again simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EQUAL-ITIMES-1
(LEMMA EQUAL-ITIMES-MINUS-1
(REWRITE)
(EQUAL (EQUAL (ITIMES A B) -1)
(OR (AND (EQUAL A -1) (EQUAL B 1))
(AND (EQUAL A 1) (EQUAL B -1))))
((ENABLE ITIMES INTEGERP FIX-INT)
(ENABLE-THEORY MULTIPLICATION)
(DO-NOT-INDUCT T)))
This simplifies, applying EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, and
COMMUTATIVITY-OF-TIMES, and unfolding the functions FIX-INT, INTEGERP, ITIMES,
AND, and OR, to the following 28 new conjectures:
Case 28.(IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (MINUS (TIMES B (NEGATIVE-GUTS A)))
-1)
(NOT (EQUAL A -1)))
(EQUAL (EQUAL B -1) T)).
This again simplifies, rewriting with NEGATIVE-GUTS-MINUS, EQUAL-TIMES-1,
and MINUS-EQUAL, and unfolding the functions NEGATIVE-GUTS, NUMBERP, and
EQUAL, to:
T.
Case 27.(IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (MINUS (TIMES B (NEGATIVE-GUTS A)))
-1)
(NOT (EQUAL B 1)))
(EQUAL (EQUAL B -1) T)).
But this again simplifies, applying the lemmas NEGATIVE-GUTS-MINUS and
EQUAL-TIMES-1, and expanding NEGATIVE-GUTS, to:
T.
Case 26.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (MINUS (TIMES A (NEGATIVE-GUTS B)))
-1)
(NOT (EQUAL A -1)))
(EQUAL (EQUAL B -1) T)),
which again simplifies, applying NEGATIVE-GUTS-MINUS, EQUAL-TIMES-1, and
MINUS-EQUAL, and expanding the functions NEGATIVE-GUTS, NUMBERP, and EQUAL,
to:
T.
Case 25.(IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (MINUS (TIMES A (NEGATIVE-GUTS B)))
-1)
(NOT (EQUAL B 1)))
(EQUAL (EQUAL B -1) T)).
This again simplifies, applying NEGATIVE-GUTS-MINUS, EQUAL-TIMES-1, and
MINUS-EQUAL, and expanding the functions NEGATIVE-GUTS, NUMBERP, and EQUAL,
to:
T.
Case 24.(IMPLIES (AND (NOT (NEGATIVEP A))
(EQUAL A 0)
(EQUAL A 1))
(NOT (EQUAL B -1))).
But this again simplifies, using linear arithmetic, to:
T.
Case 23.(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NUMBERP A))
(EQUAL A 1))
(NOT (EQUAL B -1))),
which again simplifies, clearly, to:
T.
Case 22.(IMPLIES (AND (NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (EQUAL (MINUS (TIMES A (NEGATIVE-GUTS B)))
-1))
(EQUAL A 1))
(NOT (EQUAL B -1))).
This again simplifies, opening up the functions NEGATIVEP, EQUAL, NUMBERP,
NEGATIVE-GUTS, TIMES, and MINUS, to:
T.
Case 21.(IMPLIES (AND (NOT (NEGATIVEP A))
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL A 1))
(NOT (EQUAL B -1))),
which again simplifies, unfolding the functions NEGATIVEP, NEGATIVE-GUTS,
and EQUAL, to:
T.
Case 20.(IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(EQUAL A 1))
(NOT (EQUAL B -1))),
which again simplifies, trivially, to:
T.
Case 19.(IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL A 1))
(NOT (EQUAL B -1))).
This again simplifies, trivially, to:
T.
Case 18.(IMPLIES (AND (NOT (NEGATIVEP B))
(EQUAL B 0)
(EQUAL A 1))
(NOT (EQUAL B -1))).
This again simplifies, trivially, to:
T.
Case 17.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NUMBERP B))
(EQUAL A 1))
(NOT (EQUAL B -1))).
This again simplifies, clearly, to:
T.
Case 16.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL (MINUS (TIMES B (NEGATIVE-GUTS A)))
-1))
(EQUAL A 1))
(NOT (EQUAL B -1))).
This again simplifies, clearly, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP B))
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL A 1))
(NOT (EQUAL B -1))).
This again simplifies, trivially, to:
T.
Case 14.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(EQUAL (NEGATIVE-GUTS A) 0)
(EQUAL A -1))
(NOT (EQUAL B 1))).
But this again simplifies, unfolding NEGATIVEP, EQUAL, and NEGATIVE-GUTS, to:
T.
Case 13.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NOT (EQUAL (MINUS (TIMES B (NEGATIVE-GUTS A)))
-1))
(EQUAL A -1))
(NOT (EQUAL B 1))),
which again simplifies, expanding the functions NEGATIVEP, EQUAL,
NEGATIVE-GUTS, TIMES, and MINUS, to:
T.
Case 12.(IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (MINUS (TIMES B (NEGATIVE-GUTS A)))
-1)
(NOT (EQUAL A -1)))
(EQUAL A 1)),
which again simplifies, rewriting with the lemmas NEGATIVE-GUTS-MINUS,
EQUAL-TIMES-1, and MINUS-EQUAL, and unfolding the definitions of
NEGATIVE-GUTS, NUMBERP, and EQUAL, to:
T.
Case 11.(IMPLIES (AND (NEGATIVEP A)
(NOT (NEGATIVEP B))
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (EQUAL (NEGATIVE-GUTS A) 0))
(EQUAL (MINUS (TIMES B (NEGATIVE-GUTS A)))
-1)
(NOT (EQUAL B 1)))
(EQUAL A 1)),
which again simplifies, appealing to the lemmas NEGATIVE-GUTS-MINUS and
EQUAL-TIMES-1, and expanding NEGATIVE-GUTS, to:
T.
Case 10.(IMPLIES (AND (NOT (NEGATIVEP B))
(NOT (NUMBERP B))
(EQUAL A -1))
(NOT (EQUAL B 1))),
which again simplifies, obviously, to:
T.
Case 9. (IMPLIES (AND (NEGATIVEP A)
(EQUAL B 0)
(EQUAL A -1))
(NOT (EQUAL B 1))).
This again simplifies, using linear arithmetic, to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP A)
(NEGATIVEP B)
(EQUAL A -1))
(NOT (EQUAL B 1))),
which again simplifies, obviously, to:
T.
Case 7. (IMPLIES (AND (NOT (NEGATIVEP A))
(NOT (NEGATIVEP B))
(EQUAL A -1))
(NOT (EQUAL B 1))).
This again simplifies, trivially, to:
T.
Case 6. (IMPLIES (AND (NEGATIVEP B)
(EQUAL (NEGATIVE-GUTS B) 0)
(EQUAL A -1))
(NOT (EQUAL B 1))).
This again simplifies, clearly, to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP B)
(NOT (EQUAL (MINUS (TIMES A (NEGATIVE-GUTS B)))
-1))
(EQUAL A -1))
(NOT (EQUAL B 1))).
This again simplifies, clearly, to:
T.
Case 4. (IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (MINUS (TIMES A (NEGATIVE-GUTS B)))
-1)
(NOT (EQUAL A -1)))
(EQUAL A 1)).
However this again simplifies, applying the lemmas NEGATIVE-GUTS-MINUS and
EQUAL-TIMES-1, and opening up NEGATIVE-GUTS, to:
T.
Case 3. (IMPLIES (AND (NOT (NEGATIVEP A))
(NEGATIVEP B)
(NOT (EQUAL A 0))
(NUMBERP A)
(NOT (EQUAL (NEGATIVE-GUTS B) 0))
(EQUAL (MINUS (TIMES A (NEGATIVE-GUTS B)))
-1)
(NOT (EQUAL B 1)))
(EQUAL A 1)),
which again simplifies, applying NEGATIVE-GUTS-MINUS and EQUAL-TIMES-1, and
unfolding the function NEGATIVE-GUTS, to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP B)
(NOT (NUMBERP A))
(EQUAL A -1))
(NOT (EQUAL B 1))).
This again simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP B)
(EQUAL A 0)
(EQUAL A -1))
(NOT (EQUAL B 1))).
This again simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
EQUAL-ITIMES-MINUS-1
(LEMMA ITIMES-1-ARG1
(REWRITE)
(EQUAL (ITIMES 1 X) (FIX-INT X))
((ENABLE INTEGERP FIX-INT ITIMES)
(ENABLE-THEORY MULTIPLICATION)
(DO-NOT-INDUCT T)))
WARNING: the previously added lemma, COMMUTATIVITY-OF-ITIMES, could be
applied whenever the newly proposed ITIMES-1-ARG1 could!
This simplifies, rewriting with MINUS-NEGATIVE-GUTS and TIMES-1-ARG1, and
unfolding FIX-INT, INTEGERP, NEGATIVEP, and ITIMES, to:
(IMPLIES (AND (NUMBERP X)
(NEGATIVEP X)
(EQUAL (NEGATIVE-GUTS X) 0))
(EQUAL 0 X)),
which again simplifies, obviously, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
ITIMES-1-ARG1
(LEMMA QUOTIENT-REMAINDER-UNIQUENESS NIL
(IMPLIES (AND (EQUAL A (PLUS R (TIMES B Q)))
(LESSP R B))
(AND (EQUAL (FIX R) (REMAINDER A B))
(EQUAL (FIX Q) (QUOTIENT A B))))
((ENABLE-THEORY NATURALS)
(ENABLE REMAINDER QUOTIENT)))
This formula simplifies, appealing to the lemmas REMAINDER-TIMES1-INSTANCE,
REMAINDER-NOOP, REMAINDER-PLUS, QUOTIENT-TIMES-INSTANCE, QUOTIENT-LESSP-ARG1,
PLUS-ZERO-ARG2, and QUOTIENT-PLUS, and expanding the definitions of FIX, EQUAL,
ZEROP, and AND, to the following two new formulas:
Case 2. (IMPLIES (AND (LESSP R B)
(NOT (NUMBERP B))
(NUMBERP Q))
(EQUAL Q 0)).
But this again simplifies, unfolding the definition of LESSP, to:
T.
Case 1. (IMPLIES (AND (LESSP R B)
(EQUAL B 0)
(NUMBERP Q))
(EQUAL Q 0)),
which again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
QUOTIENT-REMAINDER-UNIQUENESS
(PROVE-LEMMA DIVISION-THEOREM-PART1 NIL
(IMPLIES (INTEGERP I)
(EQUAL (IPLUS (IREMAINDER I J)
(ITIMES J (IQUOTIENT I J)))
I)))
This formula simplifies, applying CORRECTNESS-OF-CANCEL-INEG, FIX-INT-REMOVER,
IPLUS-0-LEFT, COMMUTATIVITY-OF-IPLUS, and ASSOCIATIVITY-OF-IPLUS, and
unfolding IDIFFERENCE, IQUOTIENT, and IREMAINDER, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
DIVISION-THEOREM-PART1
(PROVE-LEMMA DIVISION-THEOREM-PART2 NIL
(IMPLIES (AND (INTEGERP J) (NOT (EQUAL J 0)))
(NOT (ILESSP (IREMAINDER I J) 0)))
((ENABLE-THEORY INTEGER-DEFNS)))
This formula simplifies, applying the lemmas FIX-INT-REMOVER,
NEGATIVE-GUTS-MINUS, EQUAL-QUOTIENT-0, and
NOT-INTEGERP-IMPLIES-NOT-EQUAL-IPLUS, and unfolding INTEGERP, IDIFFERENCE,
IQUOTIENT, FIX-INT, IREMAINDER, LESSP, EQUAL, NEGATIVE-GUTS, NEGATIVEP, and
ILESSP, to the following eight new goals:
Case 8. (IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I)))
(NOT (NEGATIVEP (IPLUS I
(INEG (ITIMES J (QUOTIENT I J))))))).
However this again simplifies, rewriting with EQUAL-TIMES-0 and
EQUAL-QUOTIENT-0, and opening up the definitions of ITIMES and INEG, to the
following two new goals:
Case 8.2.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I J)))
(NOT (NEGATIVEP (IPLUS I
(MINUS (TIMES J (QUOTIENT I J))))))).
But this again simplifies, applying NEGATIVE-GUTS-MINUS, and unfolding the
function IPLUS, to:
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I J)))
(NOT (LESSP I (TIMES J (QUOTIENT I J))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace I by
(PLUS Z (TIMES J X)) to eliminate (QUOTIENT I J) and (REMAINDER I J). We
employ LESSP-REMAINDER, 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 two
new goals:
Case 8.2.2.
(IMPLIES (AND (NOT (NUMBERP I))
(NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I J)))
(NOT (LESSP I (TIMES J (QUOTIENT I J))))).
This further simplifies, expanding the function LESSP, to:
T.
Case 8.2.1.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z J) (NOT (ZEROP J)))
(NUMBERP J)
(NOT (EQUAL J 0))
(NOT (LESSP (PLUS Z (TIMES J X)) J)))
(NOT (LESSP (PLUS Z (TIMES J X))
(TIMES J X)))),
which further simplifies, using linear arithmetic, to:
T.
Case 8.1.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(LESSP I J))
(NOT (NEGATIVEP (IPLUS I 0)))),
which again simplifies, rewriting with IPLUS-0-LEFT and
COMMUTATIVITY-OF-IPLUS, and unfolding the functions INTEGERP and FIX-INT,
to:
T.
Case 7. (IMPLIES
(AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J)))
(NOT
(NEGATIVEP
(IPLUS I
(INEG (ITIMES J
(MINUS (QUOTIENT (NEGATIVE-GUTS I) J)))))))).
This again simplifies, rewriting with the lemmas MINUS-NEGATIVE-GUTS,
TIMES-QUOTIENT, and NEGATIVE-GUTS-MINUS, and unfolding FIX-INT, INTEGERP,
and ITIMES, to two new goals:
Case 7.2.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(NOT (NEGATIVEP (IPLUS I (INEG I))))),
which again simplifies, rewriting with the lemma DIFFERENCE-X-X, and
expanding INEG, MINUS, and IPLUS, to:
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(NOT (LESSP (NEGATIVE-GUTS I)
(NEGATIVE-GUTS I)))).
But this again simplifies, using linear arithmetic, to:
T.
Case 7.1.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(EQUAL (NEGATIVE-GUTS I) 0))
(NOT (NEGATIVEP (IPLUS I (INEG 0))))),
which again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(LESSP (NEGATIVE-GUTS I) J))
(NOT (NEGATIVEP (IPLUS I (INEG (ITIMES J 0)))))),
which again simplifies, applying REMAINDER-NOOP, ITIMES-0-LEFT,
COMMUTATIVITY-OF-ITIMES, IPLUS-0-LEFT, and COMMUTATIVITY-OF-IPLUS, and
opening up the definitions of EQUAL, LESSP, INEG, INTEGERP, FIX-INT, and
NEGATIVEP, to:
T.
Case 5. (IMPLIES
(AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)))
(NOT
(NEGATIVEP
(IPLUS I
(INEG (ITIMES J
(MINUS (ADD1 (QUOTIENT (NEGATIVE-GUTS I)
J))))))))).
This again simplifies, applying FIX-INT-REMOVER, EQUAL-PLUS-0, TIMES-ADD1,
and NEGATIVE-GUTS-MINUS, and expanding the definitions of INTEGERP, ITIMES,
INEG, and IPLUS, to:
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)))
(NOT (LESSP (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I)))).
Applying the lemmas NEGATIVE-GUTS-ELIM and REMAINDER-QUOTIENT-ELIM, replace
I by (MINUS X) to eliminate (NEGATIVE-GUTS I) and X by (PLUS Z (TIMES J V))
to eliminate (REMAINDER X J) and (QUOTIENT X J). We rely upon the type
restriction lemma noted when NEGATIVE-GUTS was introduced, LESSP-REMAINDER,
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:
(IMPLIES (AND (NUMBERP Z)
(EQUAL (LESSP Z J) (NOT (ZEROP J)))
(NUMBERP V)
(NUMBERP J)
(NOT (EQUAL J 0))
(NOT (EQUAL Z 0)))
(NOT (LESSP (PLUS J (TIMES J V))
(PLUS Z (TIMES J V))))),
which further simplifies, applying CORRECTNESS-OF-CANCEL-LESSP-PLUS, and
unfolding ZEROP, NOT, and FIX, to:
(IMPLIES (AND (NUMBERP Z)
(LESSP Z J)
(NUMBERP V)
(NUMBERP J)
(NOT (EQUAL J 0))
(NOT (EQUAL Z 0)))
(NOT (LESSP J Z))),
which again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(LESSP I (NEGATIVE-GUTS J)))
(NOT (NEGATIVEP (IPLUS I (INEG (ITIMES J 0)))))),
which again simplifies, applying ITIMES-0-LEFT, COMMUTATIVITY-OF-ITIMES,
IPLUS-0-LEFT, and COMMUTATIVITY-OF-IPLUS, and expanding the functions INEG,
INTEGERP, and FIX-INT, to:
T.
Case 3. (IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J))))
(NOT
(NEGATIVEP
(IPLUS I
(INEG (ITIMES J
(MINUS (QUOTIENT I (NEGATIVE-GUTS J))))))))).
But this again simplifies, rewriting with NEGATIVE-GUTS-MINUS, EQUAL-TIMES-0,
and EQUAL-QUOTIENT-0, and expanding ITIMES, INEG, and IPLUS, to the new
formula:
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J))))
(NOT (LESSP I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J)))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace I by:
(PLUS Z (TIMES (NEGATIVE-GUTS J) X))
to eliminate (QUOTIENT I (NEGATIVE-GUTS J)) and:
(REMAINDER I (NEGATIVE-GUTS J))
. We use LESSP-REMAINDER, 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 goals:
Case 3.3.
(IMPLIES (AND (NOT (NUMBERP I))
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J))))
(NOT (LESSP I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J)))))).
This further simplifies, opening up the function LESSP, to:
T.
Case 3.2.
(IMPLIES (AND (NOT (NUMBERP (NEGATIVE-GUTS J)))
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J))))
(NOT (LESSP I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J)))))),
which further simplifies, obviously, to:
T.
Case 3.1.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z (NEGATIVE-GUTS J))
(NOT (ZEROP (NEGATIVE-GUTS J))))
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (LESSP (PLUS Z (TIMES (NEGATIVE-GUTS J) X))
(NEGATIVE-GUTS J))))
(NOT (LESSP (PLUS Z (TIMES (NEGATIVE-GUTS J) X))
(TIMES (NEGATIVE-GUTS J) X)))).
However this further simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0))
(NOT
(NEGATIVEP (IPLUS I
(INEG (ITIMES J
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J)))))))),
which again simplifies, applying MINUS-NEGATIVE-GUTS and TIMES-QUOTIENT, and
opening up the functions FIX-INT, INTEGERP, and ITIMES, to the following two
new conjectures:
Case 2.2.
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(NOT (NEGATIVEP (IPLUS I (INEG I))))).
However this again simplifies, appealing to the lemma DIFFERENCE-X-X, and
unfolding the definitions of INEG, MINUS, and IPLUS, to:
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(NOT (LESSP (NEGATIVE-GUTS I)
(NEGATIVE-GUTS I)))).
This again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)
(EQUAL (NEGATIVE-GUTS I) 0))
(NOT (NEGATIVEP (IPLUS I (INEG 0))))),
which again simplifies, using linear arithmetic, rewriting with
REMAINDER-NOOP, IPLUS-0-LEFT, and COMMUTATIVITY-OF-IPLUS, and expanding
the definitions of NUMBERP, EQUAL, INEG, INTEGERP, FIX-INT, and NEGATIVEP,
to:
T.
Case 1. (IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)))
(NOT
(NEGATIVEP
(IPLUS I
(INEG (ITIMES J
(ADD1 (QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))))))).
However this again simplifies, applying FIX-INT-REMOVER, EQUAL-PLUS-0,
NEGATIVE-GUTS-MINUS, and TIMES-ADD1, and opening up the definitions of
INTEGERP, ITIMES, INEG, and IPLUS, to the new conjecture:
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)))
(NOT (LESSP (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))
(NEGATIVE-GUTS I)))).
Applying the lemmas NEGATIVE-GUTS-ELIM and REMAINDER-QUOTIENT-ELIM, replace
I by (MINUS X) to eliminate (NEGATIVE-GUTS I) and X by:
(PLUS Z (TIMES (NEGATIVE-GUTS J) V))
to eliminate (REMAINDER X (NEGATIVE-GUTS J)) and:
(QUOTIENT X (NEGATIVE-GUTS J))
. We employ the type restriction lemma noted when NEGATIVE-GUTS was
introduced, LESSP-REMAINDER, 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 two
new formulas:
Case 1.2.
(IMPLIES (AND (NOT (NUMBERP (NEGATIVE-GUTS J)))
(NUMBERP X)
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (EQUAL (REMAINDER X (NEGATIVE-GUTS J))
0)))
(NOT (LESSP (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT X (NEGATIVE-GUTS J))))
X))).
This further simplifies, obviously, to:
T.
Case 1.1.
(IMPLIES (AND (NUMBERP Z)
(EQUAL (LESSP Z (NEGATIVE-GUTS J))
(NOT (ZEROP (NEGATIVE-GUTS J))))
(NUMBERP V)
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (EQUAL Z 0)))
(NOT (LESSP (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J) V))
(PLUS Z
(TIMES (NEGATIVE-GUTS J) V))))).
But this further simplifies, applying the lemmas COMMUTATIVITY-OF-TIMES
and CORRECTNESS-OF-CANCEL-LESSP-PLUS, and unfolding the definitions of
ZEROP, NOT, and FIX, to the goal:
(IMPLIES (AND (NUMBERP Z)
(LESSP Z (NEGATIVE-GUTS J))
(NUMBERP V)
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (EQUAL Z 0)))
(NOT (LESSP (NEGATIVE-GUTS J) Z))).
But this again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.4 0.0 ]
DIVISION-THEOREM-PART2
(PROVE-LEMMA DIVISION-THEOREM-PART3 NIL
(IMPLIES (AND (INTEGERP J) (NOT (EQUAL J 0)))
(ILESSP (IREMAINDER I J) (IABS J)))
((ENABLE-THEORY INTEGER-DEFNS)))
This formula simplifies, rewriting with the lemmas FIX-INT-REMOVER,
NEGATIVE-GUTS-MINUS, and EQUAL-QUOTIENT-0, and expanding INTEGERP, IDIFFERENCE,
IQUOTIENT, FIX-INT, IREMAINDER, and IABS, to the following eight new
conjectures:
Case 8. (IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I)))
(ILESSP (IPLUS I
(INEG (ITIMES J (QUOTIENT I J))))
J)).
But this again simplifies, rewriting with the lemmas EQUAL-TIMES-0 and
EQUAL-QUOTIENT-0, and unfolding the functions ITIMES and INEG, to two new
conjectures:
Case 8.2.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I J)))
(ILESSP (IPLUS I
(MINUS (TIMES J (QUOTIENT I J))))
J)),
which again simplifies, appealing to the lemma NEGATIVE-GUTS-MINUS, and
expanding the definition of IPLUS, to two new goals:
Case 8.2.2.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I J))
(NOT (LESSP I (TIMES J (QUOTIENT I J)))))
(ILESSP (DIFFERENCE I
(TIMES J (QUOTIENT I J)))
J)),
which again simplifies, expanding the definition of ILESSP, to:
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I J))
(NOT (LESSP I (TIMES J (QUOTIENT I J)))))
(LESSP (DIFFERENCE I
(TIMES J (QUOTIENT I J)))
J)).
Appealing to the lemma REMAINDER-QUOTIENT-ELIM, we now replace I by
(PLUS Z (TIMES J X)) to eliminate (QUOTIENT I J) and (REMAINDER I J).
We rely upon LESSP-REMAINDER, the type restriction lemma noted when
QUOTIENT was introduced, and the type restriction lemma noted when
REMAINDER was introduced to constrain the new variables. The result is
two new conjectures:
Case 8.2.2.2.
(IMPLIES (AND (NOT (NUMBERP I))
(NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I J))
(NOT (LESSP I (TIMES J (QUOTIENT I J)))))
(LESSP (DIFFERENCE I
(TIMES J (QUOTIENT I J)))
J)),
which finally simplifies, unfolding the definition of LESSP, to:
T.
Case 8.2.2.1.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z J) (NOT (ZEROP J)))
(NUMBERP J)
(NOT (EQUAL J 0))
(NOT (LESSP (PLUS Z (TIMES J X)) J))
(NOT (LESSP (PLUS Z (TIMES J X))
(TIMES J X))))
(LESSP (DIFFERENCE (PLUS Z (TIMES J X))
(TIMES J X))
J)),
which finally simplifies, applying LESSP-PLUS-TIMES1,
LESSP-PLUS-TIMES2, and CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and
opening up the definitions of ZEROP, NOT, and FIX, to:
T.
Case 8.2.1.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I J))
(LESSP I (TIMES J (QUOTIENT I J))))
(ILESSP (MINUS (DIFFERENCE (TIMES J (QUOTIENT I J))
I))
J)).
However this again simplifies, applying EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and expanding NEGATIVE-GUTS and ILESSP, to:
T.
Case 8.1.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(LESSP I J))
(ILESSP (IPLUS I 0) J)).
This again simplifies, applying IPLUS-0-LEFT and COMMUTATIVITY-OF-IPLUS,
and opening up INTEGERP, FIX-INT, and ILESSP, to:
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NOT (NEGATIVEP I))
(LESSP I J)
(NOT (NUMBERP I)))
(LESSP 0 J)),
which again simplifies, using linear arithmetic, to:
T.
Case 7. (IMPLIES
(AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J)))
(ILESSP (IPLUS I
(INEG (ITIMES J
(MINUS (QUOTIENT (NEGATIVE-GUTS I) J)))))
J)),
which again simplifies, rewriting with the lemmas MINUS-NEGATIVE-GUTS,
TIMES-QUOTIENT, and NEGATIVE-GUTS-MINUS, and unfolding FIX-INT, INTEGERP,
and ITIMES, to two new conjectures:
Case 7.2.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(ILESSP (IPLUS I (INEG I)) J)),
which again simplifies, appealing to the lemma DIFFERENCE-X-X, and opening
up the definitions of INEG, MINUS, and IPLUS, to two new conjectures:
Case 7.2.2.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (EQUAL (NEGATIVE-GUTS I) 0))
(NOT (LESSP (NEGATIVE-GUTS I)
(NEGATIVE-GUTS I))))
(ILESSP 0 J)),
which again simplifies, opening up the functions LESSP, EQUAL, NEGATIVEP,
and ILESSP, to:
T.
Case 7.2.1.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (EQUAL (NEGATIVE-GUTS I) 0))
(LESSP (NEGATIVE-GUTS I)
(NEGATIVE-GUTS I)))
(ILESSP (MINUS 0) J)),
which again simplifies, using linear arithmetic, to:
T.
Case 7.1.
(IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(EQUAL (NEGATIVE-GUTS I) 0))
(ILESSP (IPLUS I (INEG 0)) J)),
which again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES (AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(LESSP (NEGATIVE-GUTS I) J))
(ILESSP (IPLUS I (INEG (ITIMES J 0)))
J)),
which again simplifies, appealing to the lemmas REMAINDER-NOOP,
ITIMES-0-LEFT, COMMUTATIVITY-OF-ITIMES, IPLUS-0-LEFT, and
COMMUTATIVITY-OF-IPLUS, and unfolding EQUAL, LESSP, INEG, INTEGERP, FIX-INT,
NEGATIVEP, and ILESSP, to:
T.
Case 5. (IMPLIES
(AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)))
(ILESSP
(IPLUS I
(INEG (ITIMES J
(MINUS (ADD1 (QUOTIENT (NEGATIVE-GUTS I) J))))))
J)),
which again simplifies, rewriting with the lemmas FIX-INT-REMOVER,
EQUAL-PLUS-0, TIMES-ADD1, and NEGATIVE-GUTS-MINUS, and expanding the
functions INTEGERP, ITIMES, INEG, and IPLUS, to two new conjectures:
Case 5.2.
(IMPLIES
(AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(NOT (LESSP (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I))))
(ILESSP (DIFFERENCE (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I))
J)),
which again simplifies, opening up the definition of ILESSP, to:
(IMPLIES
(AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(NOT (LESSP (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I))))
(LESSP (DIFFERENCE (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I))
J)).
Appealing to the lemmas NEGATIVE-GUTS-ELIM and REMAINDER-QUOTIENT-ELIM, we
now replace I by (MINUS X) to eliminate (NEGATIVE-GUTS I) and X by
(PLUS Z (TIMES J V)) to eliminate (REMAINDER X J) and (QUOTIENT X J). We
use the type restriction lemma noted when NEGATIVE-GUTS was introduced,
LESSP-REMAINDER, 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 the formula:
(IMPLIES (AND (NUMBERP Z)
(EQUAL (LESSP Z J) (NOT (ZEROP J)))
(NUMBERP V)
(NUMBERP J)
(NOT (EQUAL J 0))
(NOT (EQUAL Z 0))
(NOT (LESSP (PLUS J (TIMES J V))
(PLUS Z (TIMES J V)))))
(LESSP (DIFFERENCE (PLUS J (TIMES J V))
(PLUS Z (TIMES J V)))
J)).
But this further simplifies, using linear arithmetic, to:
T.
Case 5.1.
(IMPLIES
(AND (NUMBERP J)
(NOT (EQUAL J 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(LESSP (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I)))
(ILESSP
(MINUS (DIFFERENCE (NEGATIVE-GUTS I)
(PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))))
J)),
which again simplifies, applying EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and opening up the functions NEGATIVE-GUTS and ILESSP,
to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(LESSP I (NEGATIVE-GUTS J)))
(ILESSP (IPLUS I (INEG (ITIMES J 0)))
(NEGATIVE-GUTS J))).
But this again simplifies, applying ITIMES-0-LEFT, COMMUTATIVITY-OF-ITIMES,
IPLUS-0-LEFT, and COMMUTATIVITY-OF-IPLUS, and expanding the functions INEG,
INTEGERP, FIX-INT, and ILESSP, to:
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(LESSP I (NEGATIVE-GUTS J))
(NOT (NUMBERP I)))
(LESSP 0 (NEGATIVE-GUTS J))),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J))))
(ILESSP (IPLUS I
(INEG (ITIMES J
(MINUS (QUOTIENT I (NEGATIVE-GUTS J))))))
(NEGATIVE-GUTS J))),
which again simplifies, applying NEGATIVE-GUTS-MINUS, EQUAL-TIMES-0, and
EQUAL-QUOTIENT-0, and expanding ITIMES, INEG, and IPLUS, to the following
two new formulas:
Case 3.2.
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J)))
(NOT (LESSP I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J))))))
(ILESSP (DIFFERENCE I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J))))
(NEGATIVE-GUTS J))).
This again simplifies, unfolding ILESSP, to:
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J)))
(NOT (LESSP I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J))))))
(LESSP (DIFFERENCE I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J))))
(NEGATIVE-GUTS J))).
Appealing to the lemma REMAINDER-QUOTIENT-ELIM, we now replace I by:
(PLUS Z (TIMES (NEGATIVE-GUTS J) X))
to eliminate (QUOTIENT I (NEGATIVE-GUTS J)) and:
(REMAINDER I (NEGATIVE-GUTS J))
. We use LESSP-REMAINDER, the type restriction lemma noted when QUOTIENT
was introduced, and the type restriction lemma noted when REMAINDER was
introduced to constrain the new variables. The result is three new goals:
Case 3.2.3.
(IMPLIES (AND (NOT (NUMBERP I))
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J)))
(NOT (LESSP I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J))))))
(LESSP (DIFFERENCE I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J))))
(NEGATIVE-GUTS J))),
which further simplifies, unfolding the definition of LESSP, to:
T.
Case 3.2.2.
(IMPLIES (AND (NOT (NUMBERP (NEGATIVE-GUTS J)))
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J)))
(NOT (LESSP I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J))))))
(LESSP (DIFFERENCE I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J))))
(NEGATIVE-GUTS J))),
which further simplifies, trivially, to:
T.
Case 3.2.1.
(IMPLIES (AND (NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z (NEGATIVE-GUTS J))
(NOT (ZEROP (NEGATIVE-GUTS J))))
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (LESSP (PLUS Z (TIMES (NEGATIVE-GUTS J) X))
(NEGATIVE-GUTS J)))
(NOT (LESSP (PLUS Z (TIMES (NEGATIVE-GUTS J) X))
(TIMES (NEGATIVE-GUTS J) X))))
(LESSP (DIFFERENCE (PLUS Z (TIMES (NEGATIVE-GUTS J) X))
(TIMES (NEGATIVE-GUTS J) X))
(NEGATIVE-GUTS J))).
This further simplifies, applying COMMUTATIVITY-OF-TIMES,
LESSP-PLUS-TIMES1, LESSP-PLUS-TIMES2, and
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and unfolding ZEROP, NOT, and FIX,
to:
T.
Case 3.1.
(IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (NEGATIVEP I))
(NOT (LESSP I (NEGATIVE-GUTS J)))
(LESSP I
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J)))))
(ILESSP (MINUS (DIFFERENCE (TIMES (NEGATIVE-GUTS J)
(QUOTIENT I (NEGATIVE-GUTS J)))
I))
(NEGATIVE-GUTS J))).
This again simplifies, applying the lemmas EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and opening up the functions NEGATIVE-GUTS and ILESSP,
to:
T.
Case 2. (IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0))
(ILESSP (IPLUS I
(INEG (ITIMES J
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J)))))
(NEGATIVE-GUTS J))),
which again simplifies, appealing to the lemmas MINUS-NEGATIVE-GUTS and
TIMES-QUOTIENT, and expanding FIX-INT, INTEGERP, and ITIMES, to two new
formulas:
Case 2.2.
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(ILESSP (IPLUS I (INEG I))
(NEGATIVE-GUTS J))),
which again simplifies, applying DIFFERENCE-X-X, and unfolding the
definitions of INEG, MINUS, and IPLUS, to the following two new
conjectures:
Case 2.2.2.
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)
(NOT (EQUAL (NEGATIVE-GUTS I) 0))
(NOT (LESSP (NEGATIVE-GUTS I)
(NEGATIVE-GUTS I))))
(ILESSP 0 (NEGATIVE-GUTS J))).
But this again simplifies, opening up the functions LESSP, EQUAL,
NEGATIVEP, and ILESSP, to:
T.
Case 2.2.1.
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)
(NOT (EQUAL (NEGATIVE-GUTS I) 0))
(LESSP (NEGATIVE-GUTS I)
(NEGATIVE-GUTS I)))
(ILESSP (MINUS 0) (NEGATIVE-GUTS J))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)
(EQUAL (NEGATIVE-GUTS I) 0))
(ILESSP (IPLUS I (INEG 0))
(NEGATIVE-GUTS J))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
REMAINDER-NOOP, IPLUS-0-LEFT, and COMMUTATIVITY-OF-IPLUS, and unfolding
the definitions of NUMBERP, EQUAL, INEG, INTEGERP, FIX-INT, LESSP,
NEGATIVEP, and ILESSP, to:
T.
Case 1. (IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0)))
(ILESSP (IPLUS I
(INEG (ITIMES J
(ADD1 (QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))))
(NEGATIVE-GUTS J))),
which again simplifies, applying FIX-INT-REMOVER, EQUAL-PLUS-0,
NEGATIVE-GUTS-MINUS, and TIMES-ADD1, and unfolding the definitions of
INTEGERP, ITIMES, INEG, and IPLUS, to the following two new conjectures:
Case 1.2.
(IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0))
(NOT (LESSP (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))
(NEGATIVE-GUTS I))))
(ILESSP (DIFFERENCE (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))
(NEGATIVE-GUTS I))
(NEGATIVE-GUTS J))).
But this again simplifies, expanding ILESSP, to:
(IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0))
(NOT (LESSP (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))
(NEGATIVE-GUTS I))))
(LESSP (DIFFERENCE (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))
(NEGATIVE-GUTS I))
(NEGATIVE-GUTS J))).
Appealing to the lemmas NEGATIVE-GUTS-ELIM and REMAINDER-QUOTIENT-ELIM, we
now replace I by (MINUS X) to eliminate (NEGATIVE-GUTS I) and X by:
(PLUS Z (TIMES (NEGATIVE-GUTS J) V))
to eliminate (REMAINDER X (NEGATIVE-GUTS J)) and:
(QUOTIENT X (NEGATIVE-GUTS J))
. We use the type restriction lemma noted when NEGATIVE-GUTS was
introduced, LESSP-REMAINDER, 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 two new formulas:
Case 1.2.2.
(IMPLIES
(AND (NOT (NUMBERP (NEGATIVE-GUTS J)))
(NUMBERP X)
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (EQUAL (REMAINDER X (NEGATIVE-GUTS J))
0))
(NOT (LESSP (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT X (NEGATIVE-GUTS J))))
X)))
(LESSP (DIFFERENCE (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT X (NEGATIVE-GUTS J))))
X)
(NEGATIVE-GUTS J))),
which further simplifies, trivially, to:
T.
Case 1.2.1.
(IMPLIES (AND (NUMBERP Z)
(EQUAL (LESSP Z (NEGATIVE-GUTS J))
(NOT (ZEROP (NEGATIVE-GUTS J))))
(NUMBERP V)
(NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NOT (EQUAL Z 0))
(NOT (LESSP (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J) V))
(PLUS Z
(TIMES (NEGATIVE-GUTS J) V)))))
(LESSP (DIFFERENCE (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J) V))
(PLUS Z (TIMES (NEGATIVE-GUTS J) V)))
(NEGATIVE-GUTS J))).
However this further simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES
(AND (NEGATIVEP J)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))
0))
(LESSP (PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))
(NEGATIVE-GUTS I)))
(ILESSP
(MINUS (DIFFERENCE (NEGATIVE-GUTS I)
(PLUS (NEGATIVE-GUTS J)
(TIMES (NEGATIVE-GUTS J)
(QUOTIENT (NEGATIVE-GUTS I)
(NEGATIVE-GUTS J))))))
(NEGATIVE-GUTS J))),
which again simplifies, applying EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and opening up NEGATIVE-GUTS and ILESSP, to:
T.
Q.E.D.
[ 0.0 1.1 0.0 ]
DIVISION-THEOREM-PART3
(LEMMA DIVISION-THEOREM NIL
(IMPLIES (AND (INTEGERP I)
(INTEGERP J)
(NOT (EQUAL J 0)))
(AND (EQUAL (IPLUS (IREMAINDER I J)
(ITIMES J (IQUOTIENT I J)))
I)
(NOT (ILESSP (IREMAINDER I J) 0))
(ILESSP (IREMAINDER I J) (IABS J))))
((USE (DIVISION-THEOREM-PART1 (I I) (J J))
(DIVISION-THEOREM-PART2 (I I) (J J))
(DIVISION-THEOREM-PART3 (I I)
(J J)))))
This conjecture simplifies, opening up the definitions of IMPLIES, NOT, and
AND, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
DIVISION-THEOREM
(LEMMA QUOTIENT-DIFFERENCE-LESSP-ARG2
(REWRITE)
(IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C))
(EQUAL (QUOTIENT (DIFFERENCE A B) C)
(IF (ZEROP B)
(QUOTIENT A C)
(IF (LESSP B A)
(DIFFERENCE (QUOTIENT A C)
(ADD1 (QUOTIENT B C)))
0))))
((ENABLE-THEORY NATURALS)
(DO-NOT-INDUCT T)))
WARNING: the previously added lemma, QUOTIENT-DIFFERENCE, could be applied
whenever the newly proposed QUOTIENT-DIFFERENCE-LESSP-ARG2 could!
This conjecture simplifies, rewriting with REMAINDER-NOOP, QUOTIENT-LESSP-ARG1,
EQUAL-QUOTIENT-0, QUOTIENT-DIFFERENCE, and DIFFERENCE-ADD1-ARG2, and expanding
the functions EQUAL, LESSP, DIFFERENCE, ZEROP, and ADD1, to ten new goals:
Case 10.(IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(NOT (NUMBERP B))
(EQUAL C 0))
(EQUAL 0 (QUOTIENT A C))),
which again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(NOT (NUMBERP B))
(NOT (NUMBERP C)))
(EQUAL 0 (QUOTIENT A C))),
which again simplifies, rewriting with REMAINDER-ZERO, and unfolding the
functions ZEROP and LESSP, to:
T.
Case 8. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(NOT (NUMBERP B))
(LESSP A C))
(EQUAL 0 (QUOTIENT A C))).
This again simplifies, using linear arithmetic, applying REMAINDER-NOOP and
QUOTIENT-LESSP-ARG1, and opening up the definitions of LESSP and EQUAL, to:
T.
Case 7. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(EQUAL B 0)
(EQUAL C 0))
(EQUAL 0 (QUOTIENT A C))).
But this again simplifies, using linear arithmetic, to:
T.
Case 6. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(EQUAL B 0)
(NOT (NUMBERP C)))
(EQUAL 0 (QUOTIENT A C))),
which again simplifies, rewriting with REMAINDER-ZERO, and opening up ZEROP
and LESSP, to:
T.
Case 5. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(EQUAL B 0)
(LESSP A C))
(EQUAL 0 (QUOTIENT A C))).
This again simplifies, using linear arithmetic, appealing to the lemmas
REMAINDER-NOOP and QUOTIENT-LESSP-ARG1, and unfolding the definitions of
EQUAL and LESSP, to:
T.
Case 4. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(NOT (EQUAL B 0))
(NUMBERP B)
(EQUAL C 0))
(EQUAL (SUB1 0) 0)),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (NUMBERP C)))
(EQUAL (SUB1 0) 0)),
which again simplifies, applying the lemma REMAINDER-ZERO, and expanding the
functions ZEROP and LESSP, to:
T.
Case 2. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(NOT (EQUAL B 0))
(NUMBERP B)
(LESSP A C))
(EQUAL (SUB1 0) 0)),
which again simplifies, rewriting with REMAINDER-NOOP, and unfolding the
functions EQUAL, LESSP, and SUB1, to:
T.
Case 1. (IMPLIES (AND (EQUAL (REMAINDER A C) 0)
(LESSP B C)
(NOT (EQUAL B 0))
(NUMBERP B)
(NOT (LESSP B A))
(NOT (EQUAL C 0))
(NUMBERP C)
(NOT (LESSP A C)))
(EQUAL (SUB1 (QUOTIENT A C)) 0)).
This again simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
QUOTIENT-DIFFERENCE-LESSP-ARG2
(LEMMA IQUOTIENT-IREMAINDER-UNIQUENESS NIL
(IMPLIES (AND (INTEGERP I)
(INTEGERP J)
(INTEGERP R)
(INTEGERP Q)
(NOT (EQUAL J 0))
(EQUAL I (IPLUS R (ITIMES J Q)))
(NOT (ILESSP R 0))
(ILESSP R (IABS J)))
(AND (EQUAL R (IREMAINDER I J))
(EQUAL Q (IQUOTIENT I J))))
((ENABLE IREMAINDER IABS IDIFFERENCE IPLUS INEG FIX-INT ITIMES
IQUOTIENT ILESSP INTEGERP QUOTIENT-DIFFERENCE-LESSP-ARG2)
(ENABLE-THEORY NATURALS)
(DO-NOT-INDUCT T)))
This conjecture simplifies, using linear arithmetic, applying the lemmas
EQUAL-TIMES-0, NEGATIVE-GUTS-MINUS, COMMUTATIVITY-OF-TIMES, LESSP-TIMES1,
REMAINDER-TIMES1-INSTANCE, QUOTIENT-TIMES-INSTANCE, QUOTIENT-LESSP-ARG1,
DIFFERENCE-ADD1-ARG2, QUOTIENT-DIFFERENCE-LESSP-ARG2, PLUS-ZERO-ARG2,
QUOTIENT-PLUS, CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-LEQ-ARG1,
LESSP-PLUS-TIMES2, and MINUS-NEGATIVE-GUTS, and opening up the definitions of
FIX-INT, INTEGERP, ITIMES, LESSP, EQUAL, NEGATIVEP, ILESSP, IABS, IPLUS,
IDIFFERENCE, IQUOTIENT, ADD1, DIFFERENCE, IREMAINDER, AND, NEGATIVE-GUTS,
NUMBERP, MINUS, TIMES, ZEROP, INEG, and FIX, to the following 19 new
conjectures:
Case 19.(IMPLIES (AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0)
(EQUAL R 0))
(EQUAL Q (MINUS (NEGATIVE-GUTS Q)))).
But this again simplifies, using linear arithmetic, applying EQUAL-TIMES-0,
LESSP-TIMES1, NEGATIVE-GUTS-MINUS, REMAINDER-TIMES1-INSTANCE, and
MINUS-NEGATIVE-GUTS, and unfolding DIFFERENCE, EQUAL, NEGATIVEP, IPLUS,
INTEGERP, NUMBERP, and LESSP, to:
T.
Case 18.(IMPLIES (AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0)
(NOT (EQUAL R 0)))
(EQUAL Q
(MINUS (SUB1 (NEGATIVE-GUTS Q))))).
This again simplifies, using linear arithmetic, applying LESSP-TIMES1,
NEGATIVE-GUTS-MINUS, EQUAL-DIFFERENCE-0, REMAINDER-NOOP,
REMAINDER-TIMES1-INSTANCE, and REMAINDER-DIFFERENCE2, and unfolding IPLUS,
INTEGERP, and EQUAL, to:
T.
Case 17.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(NOT (EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0))
(NOT (EQUAL R 0)))
(EQUAL Q
(MINUS (ADD1 (SUB1 (NEGATIVE-GUTS Q)))))).
This again simplifies, using linear arithmetic, rewriting with LESSP-TIMES1,
NEGATIVE-GUTS-MINUS, EQUAL-DIFFERENCE-0, REMAINDER-NOOP,
REMAINDER-TIMES1-INSTANCE, REMAINDER-DIFFERENCE2, ADD1-SUB1, and
MINUS-NEGATIVE-GUTS, and expanding the definitions of IPLUS, INTEGERP, and
EQUAL, to:
T.
Case 16.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(NOT (EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0))
(EQUAL R 0))
(EQUAL Q
(MINUS (ADD1 (NEGATIVE-GUTS Q))))).
But this again simplifies, using linear arithmetic, appealing to the lemmas
EQUAL-TIMES-0, LESSP-TIMES1, NEGATIVE-GUTS-MINUS, and
REMAINDER-TIMES1-INSTANCE, and unfolding the definitions of DIFFERENCE,
EQUAL, NEGATIVEP, IPLUS, INTEGERP, NUMBERP, and LESSP, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0)
(EQUAL R 0))
(EQUAL R
(IPLUS (MINUS (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R))
(INEG (ITIMES J
(MINUS (NEGATIVE-GUTS Q))))))),
which again simplifies, using linear arithmetic, applying EQUAL-TIMES-0,
LESSP-TIMES1, NEGATIVE-GUTS-MINUS, REMAINDER-TIMES1-INSTANCE,
MINUS-NEGATIVE-GUTS, DIFFERENCE-X-X, and CORRECTNESS-OF-CANCEL-LESSP-TIMES,
and unfolding the functions DIFFERENCE, EQUAL, NEGATIVEP, IPLUS, INTEGERP,
NUMBERP, LESSP, FIX-INT, ITIMES, INEG, AND, NOT, and ZEROP, to:
T.
Case 14.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0)
(NOT (EQUAL R 0)))
(EQUAL R
(IPLUS (MINUS (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R))
(INEG (ITIMES J
(MINUS (SUB1 (NEGATIVE-GUTS Q)))))))).
But this again simplifies, using linear arithmetic, rewriting with
LESSP-TIMES1, NEGATIVE-GUTS-MINUS, EQUAL-DIFFERENCE-0, REMAINDER-NOOP,
REMAINDER-TIMES1-INSTANCE, and REMAINDER-DIFFERENCE2, and opening up the
functions IPLUS, INTEGERP, and EQUAL, to:
T.
Case 13.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(NOT (EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0))
(NOT (EQUAL R 0)))
(EQUAL R
(IPLUS (MINUS (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R))
(INEG (ITIMES J
(MINUS (ADD1 (SUB1 (NEGATIVE-GUTS Q))))))))).
This again simplifies, using linear arithmetic, appealing to the lemmas
LESSP-TIMES1, NEGATIVE-GUTS-MINUS, EQUAL-DIFFERENCE-0, REMAINDER-NOOP,
REMAINDER-TIMES1-INSTANCE, REMAINDER-DIFFERENCE2, ADD1-SUB1,
MINUS-NEGATIVE-GUTS, EQUAL-TIMES-0, DIFFERENCE-DIFFERENCE-ARG2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, COMMUTATIVITY-OF-PLUS, LESSP-TIMES2,
DIFFERENCE-DIFFERENCE-ARG1, and DIFFERENCE-LEQ-ARG1, and expanding the
definitions of IPLUS, INTEGERP, EQUAL, FIX-INT, ITIMES, INEG, FIX, and MINUS,
to:
(IMPLIES (AND (NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(NOT (EQUAL R 0)))
(NOT (LESSP (TIMES J (NEGATIVE-GUTS Q))
(DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)))).
However this again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP (TIMES J (NEGATIVE-GUTS Q)) R)
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(NOT (EQUAL R 0)))
(NOT (LESSP (TIMES J (NEGATIVE-GUTS Q))
(DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)))).
This again simplifies, using linear arithmetic and applying the lemma
LESSP-TIMES2, to:
T.
Case 12.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(NOT (EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0))
(EQUAL R 0))
(EQUAL R
(IPLUS (MINUS (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R))
(INEG (ITIMES J
(MINUS (ADD1 (NEGATIVE-GUTS Q)))))))),
which again simplifies, using linear arithmetic, rewriting with
EQUAL-TIMES-0, LESSP-TIMES1, NEGATIVE-GUTS-MINUS, and
REMAINDER-TIMES1-INSTANCE, and expanding the functions DIFFERENCE, EQUAL,
NEGATIVEP, IPLUS, INTEGERP, NUMBERP, and LESSP, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP J))
(NEGATIVEP Q)
(NUMBERP J)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES J (NEGATIVE-GUTS Q)))))
(NUMBERP R)
(NOT (EQUAL J 0))
(LESSP R J)
(EQUAL (REMAINDER (DIFFERENCE (TIMES J (NEGATIVE-GUTS Q))
R)
J)
0)
(NOT (EQUAL R 0)))
(NOT (EQUAL (SUB1 (NEGATIVE-GUTS Q)) 0))).
However this again simplifies, using linear arithmetic, applying
LESSP-TIMES1, NEGATIVE-GUTS-MINUS, EQUAL-DIFFERENCE-0, REMAINDER-NOOP,
REMAINDER-TIMES1-INSTANCE, and REMAINDER-DIFFERENCE2, and unfolding the
definitions of IPLUS, INTEGERP, and EQUAL, to:
T.
Case 10.(IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (NEGATIVEP Q))
(INTEGERP (IPLUS R (TIMES J Q)))
(NUMBERP J)
(NUMBERP R)
(NUMBERP Q)
(NOT (EQUAL J 0))
(LESSP R J)
(NOT (EQUAL Q 0)))
(EQUAL R
(IPLUS (PLUS R (TIMES J Q))
(MINUS (TIMES J Q))))).
This again simplifies, using linear arithmetic, rewriting with
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, DIFFERENCE-LEQ-ARG1,
LESSP-PLUS-TIMES2, and NEGATIVE-GUTS-MINUS, and expanding the definitions of
IPLUS, INTEGERP, FIX, and MINUS, to:
(IMPLIES (AND (NUMBERP J)
(NUMBERP R)
(NUMBERP Q)
(NOT (EQUAL J 0))
(LESSP R J)
(NOT (EQUAL Q 0)))
(NOT (LESSP Q Q))),
which again simplifies, using linear arithmetic, to:
T.
Case 9. (IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (NEGATIVEP Q))
(INTEGERP (IPLUS R (TIMES J Q)))
(NUMBERP J)
(NUMBERP R)
(NUMBERP Q)
(NOT (EQUAL J 0))
(LESSP R J)
(EQUAL Q 0))
(EQUAL R
(IPLUS (PLUS R (TIMES J Q)) 0))),
which again simplifies, applying COMMUTATIVITY-OF-TIMES and PLUS-ZERO-ARG2,
and opening up NEGATIVEP, EQUAL, TIMES, ZEROP, IPLUS, INTEGERP, and NUMBERP,
to:
T.
Case 8. (IMPLIES (AND (NEGATIVEP J)
(NEGATIVEP Q)
(INTEGERP (IPLUS R
(TIMES (NEGATIVE-GUTS J)
(NEGATIVE-GUTS Q))))
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NUMBERP R)
(NOT (EQUAL (NEGATIVE-GUTS Q) 0))
(LESSP R (NEGATIVE-GUTS J)))
(NOT (LESSP (NEGATIVE-GUTS Q)
(NEGATIVE-GUTS Q)))).
This again simplifies, using linear arithmetic, to:
T.
Case 7. (IMPLIES
(AND (NEGATIVEP J)
(NOT (NEGATIVEP Q))
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES Q (NEGATIVE-GUTS J)))))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(NOT (EQUAL (REMAINDER (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)
(NEGATIVE-GUTS J))
0))
(EQUAL R 0))
(EQUAL R
(IPLUS (MINUS (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R))
(INEG (ITIMES J (ADD1 Q)))))),
which again simplifies, rewriting with the lemmas EQUAL-TIMES-0,
LESSP-TIMES1, NEGATIVE-GUTS-MINUS, and REMAINDER-TIMES1-INSTANCE, and
unfolding DIFFERENCE, EQUAL, NEGATIVEP, IPLUS, INTEGERP, NUMBERP, and LESSP,
to:
T.
Case 6. (IMPLIES
(AND (NEGATIVEP J)
(NOT (NEGATIVEP Q))
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES Q (NEGATIVE-GUTS J)))))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(NOT (EQUAL (REMAINDER (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)
(NEGATIVE-GUTS J))
0))
(NOT (EQUAL R 0)))
(EQUAL R
(IPLUS (MINUS (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R))
(INEG (ITIMES J (ADD1 (SUB1 Q))))))),
which again simplifies, using linear arithmetic, rewriting with LESSP-TIMES1,
NEGATIVE-GUTS-MINUS, EQUAL-DIFFERENCE-0, REMAINDER-NOOP,
REMAINDER-TIMES1-INSTANCE, REMAINDER-DIFFERENCE2, ADD1-SUB1, EQUAL-TIMES-0,
COMMUTATIVITY-OF-TIMES, DIFFERENCE-DIFFERENCE-ARG2,
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, COMMUTATIVITY-OF-PLUS, LESSP-TIMES2,
DIFFERENCE-DIFFERENCE-ARG1, and DIFFERENCE-LEQ-ARG1, and opening up the
functions IPLUS, INTEGERP, EQUAL, FIX-INT, ITIMES, INEG, FIX, and MINUS, to
the new conjecture:
(IMPLIES (AND (NEGATIVEP J)
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(NOT (EQUAL R 0)))
(NOT (LESSP (TIMES Q (NEGATIVE-GUTS J))
(DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)))),
which again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (LESSP (TIMES Q (NEGATIVE-GUTS J)) R)
(NEGATIVEP J)
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(NOT (EQUAL R 0)))
(NOT (LESSP (TIMES Q (NEGATIVE-GUTS J))
(DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)))).
But this again simplifies, using linear arithmetic and applying LESSP-TIMES2,
to:
T.
Case 5. (IMPLIES (AND (NEGATIVEP J)
(NOT (NEGATIVEP Q))
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES Q (NEGATIVE-GUTS J)))))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(EQUAL (REMAINDER (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)
(NEGATIVE-GUTS J))
0)
(EQUAL R 0))
(EQUAL R
(IPLUS (MINUS (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R))
(INEG (ITIMES J Q))))).
This again simplifies, appealing to the lemmas EQUAL-TIMES-0, LESSP-TIMES1,
NEGATIVE-GUTS-MINUS, REMAINDER-TIMES1-INSTANCE, COMMUTATIVITY-OF-TIMES,
DIFFERENCE-X-X, and CORRECTNESS-OF-CANCEL-LESSP-TIMES, and unfolding
DIFFERENCE, EQUAL, NEGATIVEP, IPLUS, INTEGERP, NUMBERP, LESSP, FIX-INT,
ITIMES, INEG, AND, NOT, and ZEROP, to:
T.
Case 4. (IMPLIES (AND (NEGATIVEP J)
(NOT (NEGATIVEP Q))
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES Q (NEGATIVE-GUTS J)))))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(EQUAL (REMAINDER (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)
(NEGATIVE-GUTS J))
0)
(NOT (EQUAL R 0)))
(EQUAL R
(IPLUS (MINUS (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R))
(INEG (ITIMES J (SUB1 Q)))))),
which again simplifies, using linear arithmetic, rewriting with the lemmas
LESSP-TIMES1, NEGATIVE-GUTS-MINUS, EQUAL-DIFFERENCE-0, REMAINDER-NOOP,
REMAINDER-TIMES1-INSTANCE, and REMAINDER-DIFFERENCE2, and expanding the
functions IPLUS, INTEGERP, and EQUAL, to:
T.
Case 3. (IMPLIES
(AND (NEGATIVEP J)
(NOT (NEGATIVEP Q))
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES Q (NEGATIVE-GUTS J)))))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(NOT (EQUAL (REMAINDER (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)
(NEGATIVE-GUTS J))
0))
(EQUAL R 0))
(EQUAL Q (ADD1 Q))),
which again simplifies, applying the lemmas EQUAL-TIMES-0, LESSP-TIMES1,
NEGATIVE-GUTS-MINUS, and REMAINDER-TIMES1-INSTANCE, and opening up the
definitions of DIFFERENCE, EQUAL, NEGATIVEP, IPLUS, INTEGERP, NUMBERP, and
LESSP, to:
T.
Case 2. (IMPLIES
(AND (NEGATIVEP J)
(NOT (NEGATIVEP Q))
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES Q (NEGATIVE-GUTS J)))))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(NOT (EQUAL (REMAINDER (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)
(NEGATIVE-GUTS J))
0))
(NOT (EQUAL R 0)))
(EQUAL Q (ADD1 (SUB1 Q)))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NEGATIVEP J)
(NOT (NEGATIVEP Q))
(NOT (EQUAL Q 0))
(NUMBERP Q)
(NOT (EQUAL (NEGATIVE-GUTS J) 0))
(INTEGERP (IPLUS R
(MINUS (TIMES Q (NEGATIVE-GUTS J)))))
(NUMBERP R)
(LESSP R (NEGATIVE-GUTS J))
(EQUAL (REMAINDER (DIFFERENCE (TIMES Q (NEGATIVE-GUTS J))
R)
(NEGATIVE-GUTS J))
0)
(NOT (EQUAL R 0)))
(EQUAL Q (SUB1 Q))),
which again simplifies, using linear arithmetic, applying the lemmas
LESSP-TIMES1, NEGATIVE-GUTS-MINUS, EQUAL-DIFFERENCE-0, REMAINDER-NOOP,
REMAINDER-TIMES1-INSTANCE, and REMAINDER-DIFFERENCE2, and opening up the
functions IPLUS, INTEGERP, and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
IQUOTIENT-IREMAINDER-UNIQUENESS
(PROVE-LEMMA DIVISION-THEOREM-FOR-TRUNCATE-TO-NEGINF-PART1 NIL
(IMPLIES (INTEGERP I)
(EQUAL (IPLUS (IMOD I J)
(ITIMES J (IDIV I J)))
I))
((ENABLE-THEORY INTEGER-DEFNS)))
This formula simplifies, applying NEGATIVE-GUTS-MINUS, EQUAL-QUOTIENT-0,
FIX-INT-REMOVER, CORRECTNESS-OF-CANCEL-INEG, IPLUS-0-LEFT,
COMMUTATIVITY-OF-IPLUS, and ASSOCIATIVITY-OF-IPLUS, and unfolding INTEGERP,
IDIFFERENCE, IDIV, FIX-INT, and IMOD, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
DIVISION-THEOREM-FOR-TRUNCATE-TO-NEGINF-PART1
(LEMMA DIVISION-THEOREM-FOR-TRUNCATE-TO-NEGINF-PART2 NIL
(IMPLIES (ILESSP 0 J)
(AND (NOT (ILESSP (IMOD I J) 0))
(ILESSP (IMOD I J) J)))
((ENABLE IMOD ILESSP IDIFFERENCE IPLUS INEG ITIMES IDIV INTEGERP
FIX-INT)
(ENABLE-THEORY NATURALS)
(DO-NOT-INDUCT T)))
This conjecture simplifies, applying NEGATIVE-GUTS-MINUS and EQUAL-QUOTIENT-0,
and opening up the definitions of LESSP, EQUAL, NEGATIVEP, ILESSP, IDIFFERENCE,
IDIV, FIX-INT, INTEGERP, IMOD, NOT, and AND, to 22 new formulas:
Case 22.(IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NOT (NEGATIVEP I))
(NUMBERP I))
(NOT (ILESSP (IPLUS I
(INEG (ITIMES J (QUOTIENT I J))))
0))),
which again simplifies, applying EQUAL-TIMES-0 and EQUAL-QUOTIENT-0, and
opening up the definitions of ITIMES and INEG, to the following two new
goals:
Case 22.2.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(NOT (LESSP I J)))
(NOT (ILESSP (IPLUS I
(MINUS (TIMES J (QUOTIENT I J))))
0))).
However this again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and
unfolding IPLUS, to the following two new goals:
Case 22.2.2.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(NOT (LESSP I J))
(NOT (LESSP I (TIMES J (QUOTIENT I J)))))
(NOT (ILESSP (DIFFERENCE I
(TIMES J (QUOTIENT I J)))
0))).
But this again simplifies, opening up LESSP, EQUAL, NEGATIVEP, and
ILESSP, to:
T.
Case 22.2.1.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(NOT (LESSP I J))
(LESSP I (TIMES J (QUOTIENT I J))))
(NOT (ILESSP (MINUS (DIFFERENCE (TIMES J (QUOTIENT I J))
I))
0))),
which again simplifies, rewriting with EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and opening up the definitions of NEGATIVE-GUTS,
NEGATIVEP, and ILESSP, to:
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(NOT (LESSP I J)))
(NOT (LESSP I (TIMES J (QUOTIENT I J))))).
Applying the lemma REMAINDER-QUOTIENT-ELIM, replace I by
(PLUS Z (TIMES J X)) to eliminate (QUOTIENT I J) and (REMAINDER I J).
We employ LESSP-REMAINDER, 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:
(IMPLIES (AND (NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z J) (NOT (ZEROP J)))
(NOT (EQUAL J 0))
(NUMBERP J)
(NOT (LESSP (PLUS Z (TIMES J X)) J)))
(NOT (LESSP (PLUS Z (TIMES J X))
(TIMES J X)))),
which finally simplifies, using linear arithmetic, to:
T.
Case 22.1.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(LESSP I J))
(NOT (ILESSP (IPLUS I 0) 0))),
which again simplifies, applying PLUS-ZERO-ARG2, and opening up the
definitions of ZEROP, NEGATIVEP, IPLUS, LESSP, EQUAL, and ILESSP, to:
T.
Case 21.(IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NOT (NEGATIVEP I))
(NOT (NUMBERP I)))
(NOT (ILESSP (IPLUS 0
(INEG (ITIMES J (QUOTIENT I J))))
0))).
But this again simplifies, using linear arithmetic, applying
QUOTIENT-LESSP-ARG1 and COMMUTATIVITY-OF-TIMES, and unfolding the functions
TIMES, EQUAL, NEGATIVEP, ITIMES, INEG, PLUS, IPLUS, LESSP, and ILESSP, to:
T.
Case 20.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(NOT
(ILESSP
(IPLUS I
(INEG (ITIMES J
(MINUS (QUOTIENT (NEGATIVE-GUTS I) J)))))
0))).
However this again simplifies, applying MINUS-NEGATIVE-GUTS, TIMES-QUOTIENT,
NEGATIVE-GUTS-MINUS, and DIFFERENCE-X-X, and unfolding FIX-INT, INTEGERP,
ITIMES, INEG, MINUS, and IPLUS, to the following two new formulas:
Case 20.2.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (EQUAL (NEGATIVE-GUTS I) 0))
(NOT (LESSP (NEGATIVE-GUTS I)
(NEGATIVE-GUTS I))))
(NOT (ILESSP 0 0))).
This again simplifies, opening up the definitions of LESSP, NEGATIVEP, and
ILESSP, to:
T.
Case 20.1.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (EQUAL (NEGATIVE-GUTS I) 0))
(LESSP (NEGATIVE-GUTS I)
(NEGATIVE-GUTS I)))
(NOT (ILESSP (MINUS 0) 0))),
which again simplifies, using linear arithmetic, to:
T.
Case 19.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NUMBERP I))
(NOT
(ILESSP
(IPLUS I
(INEG (ITIMES J
(MINUS (QUOTIENT (NEGATIVE-GUTS I) J)))))
0))),
which again simplifies, obviously, to:
T.
Case 18.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(NOT (LESSP (NEGATIVE-GUTS I) J))
(NOT (NUMBERP I))
(EQUAL (NEGATIVE-GUTS I) 0))
(NOT
(ILESSP
(IPLUS 0
(INEG (ITIMES J
(MINUS (QUOTIENT (NEGATIVE-GUTS I) J)))))
0))).
This again simplifies, using linear arithmetic, to:
T.
Case 17.(IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(LESSP (NEGATIVE-GUTS I) J)
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(NOT (ILESSP (IPLUS I (INEG (ITIMES J 0)))
0))),
which again simplifies, applying REMAINDER-NOOP, to:
T.
Case 16.(IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(LESSP (NEGATIVE-GUTS I) J)
(NUMBERP I))
(NOT (ILESSP (IPLUS I (INEG (ITIMES J 0)))
0))).
This again simplifies, trivially, to:
T.
Case 15.(IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0)
(LESSP (NEGATIVE-GUTS I) J)
(NOT (NUMBERP I))
(EQUAL (NEGATIVE-GUTS I) 0))
(NOT (ILESSP (IPLUS 0 (INEG (ITIMES J 0)))
0))).
However this again simplifies, applying REMAINDER-NOOP and
COMMUTATIVITY-OF-TIMES, and unfolding the definitions of NUMBERP, EQUAL,
LESSP, TIMES, NEGATIVEP, ITIMES, INEG, PLUS, IPLUS, and ILESSP, to:
T.
Case 14.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(NOT
(ILESSP
(IPLUS I
(INEG (ITIMES J
(MINUS (ADD1 (QUOTIENT (NEGATIVE-GUTS I) J))))))
0))).
However this again simplifies, applying EQUAL-PLUS-0, TIMES-ADD1, and
NEGATIVE-GUTS-MINUS, and expanding the definitions of FIX-INT, INTEGERP,
ITIMES, INEG, and IPLUS, to the following two new conjectures:
Case 14.2.
(IMPLIES
(AND (NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(NOT (EQUAL (NEGATIVE-GUTS I) 0))
(NOT (LESSP (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I))))
(NOT
(ILESSP (DIFFERENCE (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I))
0))).
However this again simplifies, expanding the definitions of LESSP, EQUAL,
NEGATIVEP, and ILESSP, to:
T.
Case 14.1.
(IMPLIES
(AND (NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(NOT (EQUAL (NEGATIVE-GUTS I) 0))
(LESSP (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I)))
(NOT
(ILESSP
(MINUS (DIFFERENCE (NEGATIVE-GUTS I)
(PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))))
0))),
which again simplifies, applying the lemmas EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and expanding the definitions of NEGATIVE-GUTS,
NEGATIVEP, and ILESSP, to the conjecture:
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(NOT (EQUAL (NEGATIVE-GUTS I) 0)))
(NOT (LESSP (PLUS J
(TIMES J
(QUOTIENT (NEGATIVE-GUTS I) J)))
(NEGATIVE-GUTS I)))).
Appealing to the lemmas NEGATIVE-GUTS-ELIM and REMAINDER-QUOTIENT-ELIM, we
now replace I by (MINUS X) to eliminate (NEGATIVE-GUTS I) and X by
(PLUS Z (TIMES J V)) to eliminate (REMAINDER X J) and (QUOTIENT X J). We
employ the type restriction lemma noted when NEGATIVE-GUTS was introduced,
LESSP-REMAINDER, 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:
(IMPLIES (AND (NUMBERP Z)
(EQUAL (LESSP Z J) (NOT (ZEROP J)))
(NUMBERP V)
(NOT (EQUAL J 0))
(NUMBERP J)
(NOT (EQUAL Z 0))
(NOT (EQUAL (PLUS Z (TIMES J V)) 0)))
(NOT (LESSP (PLUS J (TIMES J V))
(PLUS Z (TIMES J V))))).
This further simplifies, rewriting with EQUAL-PLUS-0 and
CORRECTNESS-OF-CANCEL-LESSP-PLUS, and unfolding the definitions of ZEROP,
NOT, and FIX, to the new formula:
(IMPLIES (AND (NUMBERP Z)
(LESSP Z J)
(NUMBERP V)
(NOT (EQUAL J 0))
(NUMBERP J)
(NOT (EQUAL Z 0)))
(NOT (LESSP J Z))),
which finally simplifies, using linear arithmetic, to:
T.
Case 13.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(NUMBERP I))
(NOT
(ILESSP
(IPLUS I
(INEG (ITIMES J
(MINUS (ADD1 (QUOTIENT (NEGATIVE-GUTS I) J))))))
0))),
which again simplifies, clearly, to:
T.
Case 12.(IMPLIES
(AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NEGATIVEP I)
(NOT (EQUAL (REMAINDER (NEGATIVE-GUTS I) J)
0))
(NOT (NUMBERP I))
(EQUAL (NEGATIVE-GUTS I) 0))
(NOT
(ILESSP
(IPLUS 0
(INEG (ITIMES J
(MINUS (ADD1 (QUOTIENT (NEGATIVE-GUTS I) J))))))
0))).
This again simplifies, using linear arithmetic, appealing to the lemma
REMAINDER-NOOP, and opening up the definitions of NUMBERP and EQUAL, to:
T.
Case 11.(IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NOT (NEGATIVEP I))
(NUMBERP I))
(ILESSP (IPLUS I
(INEG (ITIMES J (QUOTIENT I J))))
J)),
which again simplifies, applying EQUAL-TIMES-0 and EQUAL-QUOTIENT-0, and
opening up the definitions of ITIMES and INEG, to the following two new
conjectures:
Case 11.2.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(NOT (LESSP I J)))
(ILESSP (IPLUS I
(MINUS (TIMES J (QUOTIENT I J))))
J)).
This again simplifies, rewriting with NEGATIVE-GUTS-MINUS, and opening up
IPLUS, to the following two new conjectures:
Case 11.2.2.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(NOT (LESSP I J))
(NOT (LESSP I (TIMES J (QUOTIENT I J)))))
(ILESSP (DIFFERENCE I
(TIMES J (QUOTIENT I J)))
J)).
However this again simplifies, unfolding the function ILESSP, to:
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(NOT (LESSP I J))
(NOT (LESSP I (TIMES J (QUOTIENT I J)))))
(LESSP (DIFFERENCE I
(TIMES J (QUOTIENT I J)))
J)).
Appealing to the lemma REMAINDER-QUOTIENT-ELIM, we now replace I by
(PLUS Z (TIMES J X)) to eliminate (QUOTIENT I J) and (REMAINDER I J).
We use LESSP-REMAINDER, the type restriction lemma noted when QUOTIENT
was introduced, and the type restriction lemma noted when REMAINDER was
introduced to constrain the new variables. We must thus prove:
(IMPLIES (AND (NUMBERP X)
(NUMBERP Z)
(EQUAL (LESSP Z J) (NOT (ZEROP J)))
(NOT (EQUAL J 0))
(NUMBERP J)
(NOT (LESSP (PLUS Z (TIMES J X)) J))
(NOT (LESSP (PLUS Z (TIMES J X))
(TIMES J X))))
(LESSP (DIFFERENCE (PLUS Z (TIMES J X))
(TIMES J X))
J)).
However this finally simplifies, rewriting with the lemmas
LESSP-PLUS-TIMES1, LESSP-PLUS-TIMES2, and
CORRECTNESS-OF-CANCEL-DIFFERENCE-PLUS, and expanding the functions ZEROP,
NOT, and FIX, to:
T.
Case 11.2.1.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(NOT (LESSP I J))
(LESSP I (TIMES J (QUOTIENT I J))))
(ILESSP (MINUS (DIFFERENCE (TIMES J (QUOTIENT I J))
I))
J)),
which again simplifies, applying EQUAL-DIFFERENCE-0 and
NEGATIVE-GUTS-MINUS, and expanding NEGATIVE-GUTS and ILESSP, to:
T.
Case 11.1.
(IMPLIES (AND (NOT (EQUAL J 0))
(NUMBERP J)
(NUMBERP I)
(LESSP I J))
(ILESSP (IPLUS I 0) J)).
However this again simplifies, applying PLUS-ZERO-ARG2, and opening up the
functions ZEROP, NEGATIVEP, IPLUS, and ILESSP, to:
T.
Case 10.(IMPLIES (AND (NOT (NEGATIVEP J))
(NOT (EQUAL J 0))
(NUMBERP J)
(NOT (NEGATIVEP I))
(NOT (NUMBERP I)))
(ILESSP (IPLUS 0
(INEG (ITIMES J (QUOTIENT I J))))
J)).
But this again simplifies, using linear arithmetic, rewriting with the
lemmas QUOTIENT-LESS