(BOOT-STRAP NQTHM)
[ 0.0 0.1 0.0 ]
GROUND-ZERO
(DEFN NTH
(L I)
(IF (LISTP L)
(IF (EQUAL I 1)
(CAR L)
(NTH (CDR L) (SUB1 I)))
(IF (NUMBERP L)
(IF (EQUAL I 1) L F)
F)))
Linear arithmetic and the lemma CDR-LESSP establish that the measure
(COUNT L) decreases according to the well-founded relation LESSP in each
recursive call. Hence, NTH is accepted under the principle of definition.
[ 0.0 0.0 0.0 ]
NTH
(DISABLE NTH)
[ 0.0 0.0 0.0 ]
NTH-OFF
(DEFN MOVE
(L I K)
(IF (EQUAL I 0)
L
(IF (NLISTP L)
(IF (EQUAL I 1) K L)
(IF (EQUAL I 1)
(CONS K (CDR L))
(CONS (CAR L)
(MOVE (CDR L) (SUB1 I) K))))))
Linear arithmetic, the lemmas CDR-LESSEQP and CDR-LESSP, and the
definition of NLISTP inform us that the measure (COUNT L) decreases according
to the well-founded relation LESSP in each recursive call. Hence, MOVE is
accepted under the definitional principle. Observe that:
(OR (LISTP (MOVE L I K))
(EQUAL (MOVE L I K) L)
(EQUAL (MOVE L I K) K))
is a theorem.
[ 0.0 0.0 0.0 ]
MOVE
(DISABLE MOVE)
[ 0.0 0.0 0.0 ]
MOVE-OFF
(DEFN AT (L I K) (EQUAL (NTH L I) K))
Note that (OR (FALSEP (AT L I K)) (TRUEP (AT L I K))) is a theorem.
[ 0.0 0.0 0.0 ]
AT
(DISABLE AT)
[ 0.0 0.0 0.0 ]
AT-OFF
(DEFN LENGTH
(L)
(IF (LISTP L)
(ADD1 (LENGTH (CDR L)))
(ZERO)))
Linear arithmetic and the lemma CDR-LESSP inform us that the measure
(COUNT L) decreases according to the well-founded relation LESSP in each
recursive call. Hence, LENGTH is accepted under the principle of definition.
From the definition we can conclude that (NUMBERP (LENGTH L)) is a theorem.
[ 0.0 0.0 0.0 ]
LENGTH
(DISABLE LENGTH)
[ 0.0 0.0 0.0 ]
LENGTH-OFF
(DEFN UNION-AT-N
(L N I)
(MEMBER (NTH L N) I))
Note that (OR (FALSEP (UNION-AT-N L N I)) (TRUEP (UNION-AT-N L N I))) is
a theorem.
[ 0.0 0.0 0.0 ]
UNION-AT-N
(DISABLE UNION-AT-N)
[ 0.0 0.0 0.0 ]
UNION-AT-N-OFF
(DEFN ALL-UNION
(L N I)
(IF (ZEROP N)
T
(AND (UNION-AT-N L N I)
(ALL-UNION L (SUB1 N) I))))
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
can be used to establish that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each recursive call. Hence, ALL-UNION is
accepted under the principle of definition. Note that:
(OR (FALSEP (ALL-UNION L N I))
(TRUEP (ALL-UNION L N I)))
is a theorem.
[ 0.0 0.0 0.0 ]
ALL-UNION
(DISABLE ALL-UNION)
[ 0.0 0.0 0.0 ]
ALL-UNION-OFF
(DEFN EXIST-UNION
(L N I)
(IF (ZEROP N)
F
(IF (UNION-AT-N L N I)
N
(EXIST-UNION L (SUB1 N) I))))
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, EXIST-UNION is accepted under
the principle of definition. From the definition we can conclude that:
(OR (FALSEP (EXIST-UNION L N I))
(NUMBERP (EXIST-UNION L N I)))
is a theorem.
[ 0.0 0.0 0.0 ]
EXIST-UNION
(DISABLE EXIST-UNION)
[ 0.0 0.0 0.0 ]
EXIST-UNION-OFF
(DEFN INTERSECT-8-12-3-4-AT-N
(N L G)
(AND (UNION-AT-N L N '(8 9 10 11 12))
(UNION-AT-N G N '(3 4))))
Observe that:
(OR (FALSEP (INTERSECT-8-12-3-4-AT-N N L G))
(TRUEP (INTERSECT-8-12-3-4-AT-N N L G)))
is a theorem.
[ 0.0 0.0 0.0 ]
INTERSECT-8-12-3-4-AT-N
(DISABLE INTERSECT-8-12-3-4-AT-N)
[ 0.0 0.0 0.0 ]
INTERSECT-8-12-3-4-AT-N-OFF
(DEFN EXIST-INTERSECT-8-12-3-4
(N L G)
(IF (ZEROP N)
F
(IF (INTERSECT-8-12-3-4-AT-N N L G)
N
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))))
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, EXIST-INTERSECT-8-12-3-4 is
accepted under the principle of definition. From the definition we can
conclude that:
(OR (FALSEP (EXIST-INTERSECT-8-12-3-4 N L G))
(NUMBERP (EXIST-INTERSECT-8-12-3-4 N L G)))
is a theorem.
[ 0.0 0.0 0.0 ]
EXIST-INTERSECT-8-12-3-4
(DISABLE EXIST-INTERSECT-8-12-3-4)
[ 0.0 0.0 0.0 ]
EXIST-INTERSECT-8-12-3-4-OFF
(DEFN LG-1-AT-N
(N L G)
(OR (AND (AT L N 0) (AT G N 0))
(AND (AT L N 1) (AT G N 0))
(AND (AT L N 2) (AT G N 0))
(AND (AT L N 3) (AT G N 1))
(AND (AT L N 4) (AT G N 1))))
Note that (OR (FALSEP (LG-1-AT-N N L G)) (TRUEP (LG-1-AT-N N L G))) is a
theorem.
[ 0.0 0.0 0.0 ]
LG-1-AT-N
(DISABLE LG-1-AT-N)
[ 0.0 0.0 0.0 ]
LG-1-AT-N-OFF
(DEFN LG-2-AT-N
(N L G)
(OR (AND (AT L N 5) (AT G N 3))
(AND (AT L N 6) (AT G N 3))
(AND (AT L N 7) (AT G N 2))
(AND (AT L N 8) (AT G N 3))
(AND (AT L N 8) (AT G N 2))))
Note that (OR (FALSEP (LG-2-AT-N N L G)) (TRUEP (LG-2-AT-N N L G))) is a
theorem.
[ 0.0 0.0 0.0 ]
LG-2-AT-N
(DISABLE LG-2-AT-N)
[ 0.0 0.0 0.0 ]
LG-2-AT-N-OFF
(DEFN LG-3-AT-N
(N L G)
(OR (AND (AT L N 9) (AT G N 4))
(AND (AT L N 10) (AT G N 4))
(AND (AT L N 11) (AT G N 4))
(AND (AT L N 12) (AT G N 4))))
Observe that (OR (FALSEP (LG-3-AT-N N L G)) (TRUEP (LG-3-AT-N N L G))) is
a theorem.
[ 0.0 0.0 0.0 ]
LG-3-AT-N
(DISABLE LG-3-AT-N)
[ 0.0 0.0 0.0 ]
LG-3-AT-N-OFF
(DEFN LG-AT-N
(N L G)
(AND (LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G)))
From the definition we can conclude that:
(OR (FALSEP (LG-AT-N N L G))
(TRUEP (LG-AT-N N L G)))
is a theorem.
[ 0.0 0.0 0.0 ]
LG-AT-N
(DISABLE LG-AT-N)
[ 0.0 0.0 0.0 ]
LG-AT-N-OFF
(DEFN LG
(N L G)
(IF (ZEROP N)
T
(AND (LG-AT-N N L G)
(LG (SUB1 N) L G))))
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
can be used to establish that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each recursive call. Hence, LG is accepted
under the principle of definition. Note that:
(OR (FALSEP (LG N L G))
(TRUEP (LG N L G)))
is a theorem.
[ 0.0 0.0 0.0 ]
LG
(DISABLE LG)
[ 0.0 0.0 0.0 ]
LG-OFF
(DEFN NSET
(N)
(IF (ZEROP N)
NIL
(CONS N (NSET (SUB1 N)))))
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
can be used to establish that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each recursive call. Hence, NSET is accepted
under the principle of definition. From the definition we can conclude that:
(OR (LITATOM (NSET N))
(LISTP (NSET N)))
is a theorem.
[ 0.0 0.0 0.0 ]
NSET
(DISABLE NSET)
[ 0.0 0.0 0.0 ]
NSET-OFF
(PROVE-LEMMA N-IN-NSET
(REWRITE)
(IMPLIES (NOT (ZEROP N))
(MEMBER N (NSET N)))
((ENABLE NSET)))
This conjecture can be simplified, using the abbreviations ZEROP, NOT, and
IMPLIES, to the conjecture:
(IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N))
(MEMBER N (NSET N))).
Give the above formula the name *1.
Perhaps we can prove it by induction. There is only one plausible
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N))
(IMPLIES (AND (NOT (ZEROP N)) (p (SUB1 N)))
(p N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme generates the following three new formulas:
Case 3. (IMPLIES (AND (ZEROP N)
(NOT (EQUAL N 0))
(NUMBERP N))
(MEMBER N (NSET N))).
This simplifies, opening up the definition of ZEROP, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (SUB1 N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(MEMBER N (NSET N))).
This simplifies, applying CAR-CONS, and opening up ZEROP, NSET, and MEMBER,
to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(MEMBER (SUB1 N) (NSET (SUB1 N)))
(NOT (EQUAL N 0))
(NUMBERP N))
(MEMBER N (NSET N))),
which simplifies, rewriting with the lemma CAR-CONS, and expanding ZEROP,
NSET, and MEMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
N-IN-NSET
(PROVE-LEMMA NSET-NUMBER
(REWRITE)
(IMPLIES (MEMBER K (NSET N))
(NUMBERP K))
((ENABLE NSET)))
WARNING: Note that NSET-NUMBER contains the free variable N which will be
chosen by instantiating the hypothesis (MEMBER K (NSET N)).
Call the conjecture *1.
We will try to prove it by induction. There is only one suggested
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p K N))
(IMPLIES (AND (NOT (ZEROP N)) (p K (SUB1 N)))
(p K N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to establish that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme generates the following two new formulas:
Case 2. (IMPLIES (AND (ZEROP N) (MEMBER K (NSET N)))
(NUMBERP K)).
This simplifies, expanding the definitions of ZEROP, NSET, LISTP, and MEMBER,
to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER K (NSET (SUB1 N))))
(MEMBER K (NSET N)))
(NUMBERP K)).
This simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and opening
up ZEROP, NSET, and MEMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
NSET-NUMBER
(PROVE-LEMMA ADD1-NSET
(REWRITE)
(IMPLIES (AND (NOT (ZEROP K))
(MEMBER (ADD1 K) (NSET N)))
(MEMBER K (NSET N)))
((ENABLE NSET)))
This conjecture can be simplified, using the abbreviations ZEROP, NOT, AND,
and IMPLIES, to:
(IMPLIES (AND (NOT (EQUAL K 0))
(NUMBERP K)
(MEMBER (ADD1 K) (NSET N)))
(MEMBER K (NSET N))).
Name the above subgoal *1.
Perhaps we can prove it by induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p K N))
(IMPLIES (AND (NOT (ZEROP N)) (p K (SUB1 N)))
(p K N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(NOT (EQUAL K 0))
(NUMBERP K)
(MEMBER (ADD1 K) (NSET N)))
(MEMBER K (NSET N))).
This simplifies, opening up ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER (ADD1 K) (NSET (SUB1 N))))
(NOT (EQUAL K 0))
(NUMBERP K)
(MEMBER (ADD1 K) (NSET N)))
(MEMBER K (NSET N))).
This simplifies, applying the lemmas CDR-CONS and CAR-CONS, and expanding
the definitions of ZEROP, NSET, and MEMBER, to the new formula:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER (ADD1 K) (NSET (SUB1 N))))
(NOT (EQUAL K 0))
(NUMBERP K)
(EQUAL (ADD1 K) N)
(NOT (EQUAL K N)))
(MEMBER K (NSET (SUB1 N)))),
which again simplifies, rewriting with SUB1-ADD1 and N-IN-NSET, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(MEMBER K (NSET (SUB1 N)))
(NOT (EQUAL K 0))
(NUMBERP K)
(MEMBER (ADD1 K) (NSET N)))
(MEMBER K (NSET N))).
This simplifies, applying NSET-NUMBER, CDR-CONS, and CAR-CONS, and opening
up ZEROP, NSET, and MEMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
ADD1-NSET
(PROVE-LEMMA LIST-LN
(REWRITE)
(IMPLIES (LISTP L)
(NOT (EQUAL (LENGTH L) 0)))
((ENABLE LENGTH)))
Give the conjecture the name *1.
We will try to prove it by induction. There is only one suggested
induction. We will induct according to the following scheme:
(AND (IMPLIES (AND (LISTP L) (p (CDR L)))
(p L))
(IMPLIES (NOT (LISTP L)) (p L))).
Linear arithmetic and the lemma CDR-LESSP inform us that the measure (COUNT L)
decreases according to the well-founded relation LESSP in each induction step
of the scheme. The above induction scheme generates two new goals:
Case 2. (IMPLIES (AND (NOT (LISTP (CDR L))) (LISTP L))
(NOT (EQUAL (LENGTH L) 0))),
which simplifies, expanding LENGTH, to:
T.
Case 1. (IMPLIES (AND (NOT (EQUAL (LENGTH (CDR L)) 0))
(LISTP L))
(NOT (EQUAL (LENGTH L) 0))),
which simplifies, opening up the function LENGTH, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LIST-LN
(PROVE-LEMMA MOVE-IS-LIST
(REWRITE)
(IMPLIES (LISTP L)
(LISTP (MOVE L K I)))
((ENABLE MOVE)))
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 (EQUAL K 0) (p L K I))
(IMPLIES (AND (NOT (EQUAL K 0))
(NLISTP L)
(EQUAL K 1))
(p L K I))
(IMPLIES (AND (NOT (EQUAL K 0))
(NLISTP L)
(NOT (EQUAL K 1)))
(p L K I))
(IMPLIES (AND (NOT (EQUAL K 0))
(NOT (NLISTP L))
(EQUAL K 1))
(p L K I))
(IMPLIES (AND (NOT (EQUAL K 0))
(NOT (NLISTP L))
(NOT (EQUAL K 1))
(p (CDR L) (SUB1 K) I))
(p L K I))).
Linear arithmetic, the lemmas CDR-LESSEQP and CDR-LESSP, and the definition of
NLISTP establish that the measure (COUNT L) decreases according to the
well-founded relation LESSP in each induction step of the scheme. Note,
however, the inductive instance chosen for K. The above induction scheme
produces the following six new goals:
Case 6. (IMPLIES (AND (EQUAL K 0) (LISTP L))
(LISTP (MOVE L K I))).
This simplifies, expanding EQUAL and MOVE, to:
T.
Case 5. (IMPLIES (AND (NOT (EQUAL K 0))
(NLISTP L)
(EQUAL K 1)
(LISTP L))
(LISTP (MOVE L K I))).
This simplifies, unfolding EQUAL and NLISTP, to:
T.
Case 4. (IMPLIES (AND (NOT (EQUAL K 0))
(NLISTP L)
(NOT (EQUAL K 1))
(LISTP L))
(LISTP (MOVE L K I))).
This simplifies, opening up NLISTP, to:
T.
Case 3. (IMPLIES (AND (NOT (EQUAL K 0))
(NOT (NLISTP L))
(EQUAL K 1)
(LISTP L))
(LISTP (MOVE L K I))).
This simplifies, unfolding the functions EQUAL, NLISTP, and MOVE, to:
T.
Case 2. (IMPLIES (AND (NOT (EQUAL K 0))
(NOT (NLISTP L))
(NOT (EQUAL K 1))
(NOT (LISTP (CDR L)))
(LISTP L))
(LISTP (MOVE L K I))).
This simplifies, unfolding the definitions of NLISTP and MOVE, to:
T.
Case 1. (IMPLIES (AND (NOT (EQUAL K 0))
(NOT (NLISTP L))
(NOT (EQUAL K 1))
(LISTP (MOVE (CDR L) (SUB1 K) I))
(LISTP L))
(LISTP (MOVE L K I))).
This simplifies, opening up NLISTP and MOVE, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
MOVE-IS-LIST
(ENABLE LENGTH)
[ 0.0 0.0 0.0 ]
LENGTH-ON
(PROVE-LEMMA MOVE-NTH
(REWRITE)
(IMPLIES (AND (LISTP L)
(MEMBER K (NSET (LENGTH L))))
(EQUAL (NTH (MOVE L K I) K) I))
((ENABLE NTH MOVE NSET)))
Give the conjecture the 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 L) (p (CDR L) (SUB1 K) I))
(p L K I))
(IMPLIES (NOT (LISTP L)) (p L K I))).
Linear arithmetic and the lemma CDR-LESSP can be used to establish that the
measure (COUNT L) decreases according to the well-founded relation LESSP in
each induction step of the scheme. Note, however, the inductive instance
chosen for K. The above induction scheme leads to three new goals:
Case 3. (IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH L))))
(EQUAL (NTH (MOVE L K I) K) I)),
which simplifies, rewriting with SUB1-ADD1, CDR-CONS, and CAR-CONS, and
opening up the definitions of LENGTH, NSET, MEMBER, and MOVE, to the
following six new goals:
Case 3.6.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) K) I)).
But this again simplifies, applying ADD1-EQUAL and CAR-CONS, and unfolding
the functions EQUAL, NUMBERP, and NTH, to:
T.
Case 3.5.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
K)
I)).
This again simplifies, rewriting with ADD1-EQUAL, SUB1-ADD1, and CDR-CONS,
and opening up NUMBERP, MOVE, and NTH, to the following two new goals:
Case 3.5.2.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(NOT (EQUAL (LENGTH (CDR L)) 0))
(NOT (EQUAL (LENGTH (CDR L)) 1)))
(EQUAL (NTH (CDR L) (LENGTH (CDR L)))
I)).
This again simplifies, expanding the function NTH, to:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(NOT (EQUAL (LENGTH (CDR L)) 0))
(NOT (EQUAL (LENGTH (CDR L)) 1)))
(NOT I)).
But this further simplifies, unfolding LENGTH and EQUAL, to:
T.
Case 3.5.1.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(NOT (EQUAL (LENGTH (CDR L)) 0))
(EQUAL (LENGTH (CDR L)) 1))
(EQUAL (NTH I (LENGTH (CDR L))) I)),
which again simplifies, expanding the definitions of EQUAL and NTH, to
two new formulas:
Case 3.5.1.2.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (LENGTH (CDR L)) 1)
(NOT (LISTP I))
(NOT (NUMBERP I)))
(EQUAL F I)),
which again simplifies, obviously, to the new conjecture:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (LENGTH (CDR L)) 1)
(NOT (LISTP I))
(NOT (NUMBERP I)))
(NOT I)),
which further simplifies, expanding LENGTH and EQUAL, to:
T.
Case 3.5.1.1.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (LENGTH (CDR L)) 1)
(LISTP I))
(EQUAL (CAR I) I)),
which further simplifies, opening up the definitions of LENGTH and
EQUAL, to:
T.
Case 3.4.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (NTH L K) I)),
which again simplifies, using linear arithmetic, to:
T.
Case 3.3.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) K) I)),
which again simplifies, applying CAR-CONS, and opening up the definitions
of EQUAL and NTH, to:
T.
Case 3.2.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
K)
I)).
This again simplifies, applying CDR-CONS, and expanding the definition of
NTH, to:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
I)),
which further simplifies, expanding LENGTH, NSET, LISTP, and MEMBER, to:
T.
Case 3.1.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (NTH L K) I)),
which again simplifies, clearly, to:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER 0 (NSET (LENGTH (CDR L)))))
(EQUAL (NTH L 0) I)),
which further simplifies, unfolding LENGTH, NSET, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH L))))
(EQUAL (NTH (MOVE L K I) K) I)),
which simplifies, rewriting with SUB1-ADD1, CDR-CONS, and CAR-CONS, and
expanding the definitions of LENGTH, NSET, MEMBER, and MOVE, to the
following six new goals:
Case 2.6.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) K) I)).
But this again simplifies, rewriting with ADD1-EQUAL and CAR-CONS, and
expanding SUB1, EQUAL, NUMBERP, and NTH, to:
T.
Case 2.5.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
K)
I)).
This again simplifies, using linear arithmetic and appealing to the lemmas
SUB1-ADD1 and N-IN-NSET, to:
T.
Case 2.4.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (NTH L K) I)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) K) I)),
which again simplifies, applying the lemma CAR-CONS, and expanding the
definitions of SUB1, EQUAL, and NTH, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
K)
I)),
which again simplifies, using linear arithmetic, applying ADD1-SUB1,
NSET-NUMBER, ADD1-NSET, SUB1-NNUMBERP, and CDR-CONS, and expanding NTH, to
the new conjecture:
(IMPLIES (AND (NOT (NUMBERP K))
(NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L)))))
(EQUAL (NTH (MOVE (CDR L) (SUB1 K) I) 0)
I)),
which again simplifies, applying NSET-NUMBER, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (NTH L K) I)).
But this again simplifies, expanding the definition of SUB1, to:
T.
Case 1. (IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
I)
(LISTP L)
(MEMBER K (NSET (LENGTH L))))
(EQUAL (NTH (MOVE L K I) K) I)),
which simplifies, appealing to the lemmas SUB1-ADD1, CDR-CONS, and CAR-CONS,
and unfolding the definitions of LENGTH, NSET, MEMBER, and MOVE, to six new
formulas:
Case 1.6.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
I)
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) K) I)),
which again simplifies, applying ADD1-EQUAL and CAR-CONS, and expanding
SUB1, EQUAL, MOVE, NUMBERP, and NTH, to:
T.
Case 1.5.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
I)
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
K)
I)).
This again simplifies, rewriting with SUB1-ADD1, ADD1-EQUAL, and CDR-CONS,
and unfolding the definitions of NUMBERP and NTH, to:
T.
Case 1.4.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
I)
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (NTH L K) I)).
This again simplifies, using linear arithmetic, to:
T.
Case 1.3.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
I)
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) K) I)),
which again simplifies, applying CAR-CONS, and opening up SUB1, EQUAL,
MOVE, and NTH, to:
T.
Case 1.2.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
I)
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
K)
I)).
But this again simplifies, rewriting with CDR-CONS, and unfolding the
function NTH, to:
T.
Case 1.1.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
I)
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (NTH L K) I)).
However this again simplifies, opening up the functions SUB1, EQUAL, MOVE,
and NTH, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.1 ]
MOVE-NTH
(PROVE-LEMMA ZERO-NOT-MEMBER-NSET
(REWRITE)
(NOT (MEMBER 0 (NSET N)))
((ENABLE NSET)))
Give the conjecture the name *1.
We will appeal to induction. There is only one plausible induction. We
will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N))
(IMPLIES (AND (NOT (ZEROP N)) (p (SUB1 N)))
(p N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
produces the following two new conjectures:
Case 2. (IMPLIES (ZEROP N)
(NOT (MEMBER 0 (NSET N)))).
This simplifies, expanding the functions ZEROP, NSET, and MEMBER, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER 0 (NSET (SUB1 N)))))
(NOT (MEMBER 0 (NSET N)))).
This simplifies, rewriting with the lemmas CDR-CONS and CAR-CONS, and
opening up ZEROP, NSET, and MEMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
ZERO-NOT-MEMBER-NSET
(PROVE-LEMMA MOVE-UNCHANGE-LENGTH
(REWRITE)
(IMPLIES (AND (LISTP L)
(MEMBER K (NSET (LENGTH L))))
(EQUAL (LENGTH (MOVE L K I))
(LENGTH L)))
((ENABLE MOVE NSET)))
Call the conjecture *1.
We will try to prove it by induction. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (AND (LISTP L) (p (CDR L) (SUB1 K) I))
(p L K I))
(IMPLIES (NOT (LISTP L)) (p L K I))).
Linear arithmetic and the lemma CDR-LESSP can be used to prove that the
measure (COUNT L) decreases according to the well-founded relation LESSP in
each induction step of the scheme. Note, however, the inductive instance
chosen for K. The above induction scheme leads to the following three new
goals:
Case 3. (IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH L))))
(EQUAL (LENGTH (MOVE L K I))
(LENGTH L))).
This simplifies, applying the lemmas SUB1-ADD1, CDR-CONS, and CAR-CONS, and
expanding the functions LENGTH, NSET, MEMBER, and MOVE, to the following six
new formulas:
Case 3.6.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (LENGTH (CONS I (CDR L))) K)).
However this again simplifies, rewriting with ADD1-EQUAL and CDR-CONS, and
unfolding EQUAL, NUMBERP, ADD1, and LENGTH, to:
T.
Case 3.5.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (LENGTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I)))
K)).
But this again simplifies, applying ADD1-EQUAL, SUB1-ADD1, and CDR-CONS,
and opening up the definitions of NUMBERP, MOVE, and LENGTH, to:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(NOT (EQUAL (LENGTH (CDR L)) 0))
(EQUAL (LENGTH (CDR L)) 1))
(EQUAL (LENGTH I) (LENGTH (CDR L)))),
which again simplifies, unfolding the definition of EQUAL, to the formula:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (LENGTH (CDR L)) 1))
(EQUAL (LENGTH I) 1)).
However this further simplifies, expanding the definitions of LENGTH and
EQUAL, to:
T.
Case 3.4.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (LENGTH L) K)),
which again simplifies, using linear arithmetic, to:
T.
Case 3.3.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (LENGTH (CONS I (CDR L)))
(ADD1 (LENGTH (CDR L))))),
which again simplifies, applying CDR-CONS, and expanding the definitions
of EQUAL and LENGTH, to:
T.
Case 3.2.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (LENGTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I)))
(ADD1 (LENGTH (CDR L))))).
But this again simplifies, applying the lemmas CDR-CONS and ADD1-EQUAL,
and opening up the definition of LENGTH, to:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))).
But this further simplifies, expanding the definitions of LENGTH, NSET,
LISTP, and MEMBER, to:
T.
Case 3.1.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (LENGTH L)
(ADD1 (LENGTH (CDR L))))),
which again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, to:
T.
Case 2. (IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH L))))
(EQUAL (LENGTH (MOVE L K I))
(LENGTH L))).
This simplifies, rewriting with SUB1-ADD1, CDR-CONS, and CAR-CONS, and
unfolding the definitions of LENGTH, NSET, MEMBER, and MOVE, to six new
goals:
Case 2.6.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (LENGTH (CONS I (CDR L))) K)),
which again simplifies, rewriting with the lemmas ZERO-NOT-MEMBER-NSET,
ADD1-EQUAL, and CDR-CONS, and opening up the functions SUB1, EQUAL,
NUMBERP, ADD1, and LENGTH, to:
T.
Case 2.5.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (LENGTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I)))
K)),
which again simplifies, using linear arithmetic and rewriting with
SUB1-ADD1 and N-IN-NSET, to:
T.
Case 2.4.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (LENGTH L) K)).
But this again simplifies, using linear arithmetic, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (LENGTH (CONS I (CDR L)))
(ADD1 (LENGTH (CDR L))))),
which again simplifies, applying ZERO-NOT-MEMBER-NSET and CDR-CONS, and
unfolding the definitions of SUB1, EQUAL, and LENGTH, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (LENGTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I)))
(ADD1 (LENGTH (CDR L))))).
This again simplifies, using linear arithmetic, applying the lemmas
ADD1-SUB1, NSET-NUMBER, ADD1-NSET, CDR-CONS, and ADD1-EQUAL, and expanding
LENGTH, to:
(IMPLIES (AND (NOT (NUMBERP K))
(NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L)))))
(EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))).
However this again simplifies, rewriting with the lemma NSET-NUMBER, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (LENGTH L)
(ADD1 (LENGTH (CDR L))))),
which again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and opening
up the function SUB1, to:
T.
Case 1. (IMPLIES (AND (EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH L))))
(EQUAL (LENGTH (MOVE L K I))
(LENGTH L))).
This simplifies, rewriting with SUB1-ADD1, CDR-CONS, and CAR-CONS, and
unfolding the definitions of LENGTH, NSET, MEMBER, and MOVE, to six new
formulas:
Case 1.6.
(IMPLIES (AND (EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (LENGTH (CONS I (CDR L))) K)),
which again simplifies, applying ADD1-EQUAL and CDR-CONS, and unfolding
SUB1, EQUAL, MOVE, NUMBERP, ADD1, and LENGTH, to:
T.
Case 1.5.
(IMPLIES (AND (EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (LENGTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I)))
K)).
But this again simplifies, rewriting with the lemmas SUB1-ADD1, ADD1-EQUAL,
and CDR-CONS, and opening up the functions NUMBERP and LENGTH, to:
T.
Case 1.4.
(IMPLIES (AND (EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (LENGTH L) K)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.3.
(IMPLIES (AND (EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (LENGTH (CONS I (CDR L)))
(ADD1 (LENGTH (CDR L))))),
which again simplifies, applying CDR-CONS, and opening up the functions
SUB1, EQUAL, MOVE, and LENGTH, to:
T.
Case 1.2.
(IMPLIES (AND (EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (LENGTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I)))
(ADD1 (LENGTH (CDR L))))).
This again simplifies, rewriting with the lemma CDR-CONS, and opening up
the definition of LENGTH, to:
T.
Case 1.1.
(IMPLIES (AND (EQUAL (LENGTH (MOVE (CDR L) (SUB1 K) I))
(LENGTH (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(EQUAL K 0))
(EQUAL (LENGTH L)
(ADD1 (LENGTH (CDR L))))),
which again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and expanding
SUB1, EQUAL, and MOVE, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
MOVE-UNCHANGE-LENGTH
(PROVE-LEMMA MOVE-UNCHANGE-OTHER-THAN-NTH
(REWRITE)
(IMPLIES (AND (LISTP L)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL J K)))
(EQUAL (NTH (MOVE L K I) J)
(NTH L J)))
((ENABLE MOVE NTH NSET)))
Name the conjecture *1.
Let us appeal to the induction principle. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (AND (LISTP L)
(p (CDR L) (SUB1 K) I (SUB1 J)))
(p L K I J))
(IMPLIES (NOT (LISTP L))
(p L K I J))).
Linear arithmetic and the lemma CDR-LESSP can be used to prove that the
measure (COUNT L) decreases according to the well-founded relation LESSP in
each induction step of the scheme. Note, however, the inductive instances
chosen for J and K. The above induction scheme leads to the following four
new goals:
Case 4. (IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL J K)))
(EQUAL (NTH (MOVE L K I) J)
(NTH L J))).
This simplifies, applying SUB1-ADD1, CDR-CONS, and CAR-CONS, and opening up
the definitions of LENGTH, NSET, MEMBER, MOVE, and NTH, to 12 new goals:
Case 4.12.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, applying the lemmas ADD1-EQUAL and CDR-CONS, and
unfolding the functions EQUAL, NUMBERP, and NTH, to:
T.
Case 4.11.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, rewriting with ADD1-EQUAL, SUB1-ADD1, and CDR-CONS,
and expanding the functions NUMBERP, MOVE, and NTH, to:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(NOT (EQUAL J (ADD1 (LENGTH (CDR L)))))
(NOT (EQUAL J 1))
(NOT (EQUAL (LENGTH (CDR L)) 0))
(EQUAL (LENGTH (CDR L)) 1))
(EQUAL (NTH I (SUB1 J))
(NTH (CDR L) (SUB1 J)))),
which again simplifies, opening up the function EQUAL, to:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(NOT (EQUAL J 2))
(NOT (EQUAL J 1))
(EQUAL (LENGTH (CDR L)) 1))
(EQUAL (NTH I (SUB1 J))
(NTH (CDR L) (SUB1 J)))).
This further simplifies, opening up the functions LENGTH and EQUAL, to:
T.
Case 4.10.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(EQUAL K 0))
(EQUAL (NTH L J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, using linear arithmetic, to:
T.
Case 4.9.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(CAR L))),
which again simplifies, obviously, to:
T.
Case 4.8.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(CAR L))).
However this again simplifies, rewriting with ADD1-EQUAL, SUB1-ADD1, and
CAR-CONS, and expanding the definitions of NUMBERP, MOVE, EQUAL, and NTH,
to:
T.
Case 4.7.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(EQUAL K 0))
(EQUAL (NTH L J) (CAR L))).
But this again simplifies, using linear arithmetic, to:
T.
Case 4.6.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, applying CDR-CONS, and unfolding EQUAL and NTH, to:
T.
Case 4.5.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(NTH (CDR L) (SUB1 J)))).
This again simplifies, rewriting with CDR-CONS, and opening up the
definition of NTH, to the new conjecture:
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))),
which further simplifies, expanding the definitions of LENGTH, NSET, LISTP,
and MEMBER, to:
T.
Case 4.4.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(EQUAL K 0))
(EQUAL (NTH L J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, appealing to the lemma ZERO-NOT-MEMBER-NSET, to:
T.
Case 4.3.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(CAR L))),
which again simplifies, clearly, to:
T.
Case 4.2.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(CAR L))).
However this again simplifies, applying CAR-CONS, and expanding the
definitions of EQUAL and NTH, to:
T.
Case 4.1.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(EQUAL K 0))
(EQUAL (NTH L J) (CAR L))).
However this again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, to:
T.
Case 3. (IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL J K)))
(EQUAL (NTH (MOVE L K I) J)
(NTH L J))).
This simplifies, applying SUB1-ADD1, CDR-CONS, and CAR-CONS, and unfolding
the definitions of LENGTH, NSET, MEMBER, MOVE, and NTH, to 12 new goals:
Case 3.12.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, appealing to the lemmas ZERO-NOT-MEMBER-NSET,
ADD1-EQUAL, and CDR-CONS, and unfolding SUB1, EQUAL, NUMBERP, and NTH, to:
T.
Case 3.11.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, using linear arithmetic and applying the lemmas
SUB1-ADD1 and N-IN-NSET, to:
T.
Case 3.10.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(EQUAL K 0))
(EQUAL (NTH L J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.9.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(CAR L))),
which again simplifies, trivially, to:
T.
Case 3.8.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(CAR L))).
However this again simplifies, using linear arithmetic and applying the
lemmas SUB1-ADD1 and N-IN-NSET, to:
T.
Case 3.7.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(EQUAL K 0))
(EQUAL (NTH L J) (CAR L))),
which again simplifies, using linear arithmetic, to:
T.
Case 3.6.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, rewriting with ZERO-NOT-MEMBER-NSET and CDR-CONS,
and expanding SUB1, EQUAL, and NTH, to:
T.
Case 3.5.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(NTH (CDR L) (SUB1 J)))).
But this again simplifies, using linear arithmetic, appealing to the
lemmas ADD1-SUB1, NSET-NUMBER, ADD1-NSET, and CDR-CONS, and expanding the
definition of NTH, to:
(IMPLIES (AND (NOT (NUMBERP K))
(NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))).
This again simplifies, applying NSET-NUMBER, to:
T.
Case 3.4.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(EQUAL K 0))
(EQUAL (NTH L J)
(NTH (CDR L) (SUB1 J)))).
However this again simplifies, rewriting with the lemma
ZERO-NOT-MEMBER-NSET, and opening up the function SUB1, to:
T.
Case 3.3.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(CAR L))),
which again simplifies, obviously, to:
T.
Case 3.2.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(CAR L))).
But this again simplifies, using linear arithmetic, applying ADD1-SUB1,
NSET-NUMBER, ADD1-NSET, and CAR-CONS, and opening up the definitions of
EQUAL and NTH, to:
T.
Case 3.1.
(IMPLIES (AND (NOT (MEMBER (SUB1 K)
(NSET (LENGTH (CDR L)))))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(EQUAL K 0))
(EQUAL (NTH L J) (CAR L))).
But this again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and
opening up the definition of SUB1, to:
T.
Case 2. (IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL J K)))
(EQUAL (NTH (MOVE L K I) J)
(NTH L J))).
This simplifies, appealing to the lemmas SUB1-ADD1, CDR-CONS, and CAR-CONS,
and expanding LENGTH, NSET, MEMBER, MOVE, and NTH, to the following 12 new
goals:
Case 2.12.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))).
However this again simplifies, using linear arithmetic, to two new goals:
Case 2.12.2.
(IMPLIES (AND (NOT (NUMBERP J))
(EQUAL (SUB1 J) (SUB1 1))
(LISTP L)
(NOT (EQUAL J 1))
(NOT (EQUAL J 1))
(NOT (EQUAL 1 0))
(EQUAL (ADD1 (LENGTH (CDR L))) 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, appealing to the lemmas SUB1-NNUMBERP,
ADD1-EQUAL, and CDR-CONS, and expanding the functions SUB1, EQUAL,
NUMBERP, and NTH, to:
(IMPLIES (AND (NOT (NUMBERP J))
(LISTP L)
(EQUAL (LENGTH (CDR L)) 0))
(EQUAL (NTH (CDR L) 0)
(NTH (CDR L) (SUB1 J)))).
However this further simplifies, rewriting with SUB1-NNUMBERP, to:
T.
Case 2.12.1.
(IMPLIES (AND (LESSP J 1)
(EQUAL (SUB1 J) (SUB1 1))
(LISTP L)
(NOT (EQUAL J 1))
(NOT (EQUAL J 1))
(NOT (EQUAL 1 0))
(EQUAL (ADD1 (LENGTH (CDR L))) 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))).
This again simplifies, applying ADD1-EQUAL, CDR-CONS, and SUB1-NNUMBERP,
and opening up LESSP, SUB1, NUMBERP, EQUAL, and NTH, to the following
two new formulas:
Case 2.12.1.2.
(IMPLIES (AND (EQUAL J 0)
(LISTP L)
(EQUAL (LENGTH (CDR L)) 0))
(EQUAL (NTH (CDR L) 0)
(NTH (CDR L) (SUB1 J)))).
This again simplifies, expanding the definition of SUB1, to:
T.
Case 2.12.1.1.
(IMPLIES (AND (NOT (NUMBERP J))
(LISTP L)
(EQUAL (LENGTH (CDR L)) 0))
(EQUAL (NTH (CDR L) 0)
(NTH (CDR L) (SUB1 J)))),
which further simplifies, applying SUB1-NNUMBERP, to:
T.
Case 2.11.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(NTH (CDR L) (SUB1 J)))).
But this again simplifies, using linear arithmetic, to two new goals:
Case 2.11.2.
(IMPLIES (AND (NOT (NUMBERP J))
(EQUAL (SUB1 J)
(SUB1 (ADD1 (LENGTH (CDR L)))))
(LISTP L)
(NOT (EQUAL J (ADD1 (LENGTH (CDR L)))))
(NOT (EQUAL J 1))
(NOT (EQUAL (ADD1 (LENGTH (CDR L))) 0))
(NOT (EQUAL (ADD1 (LENGTH (CDR L))) 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L)
(SUB1 (ADD1 (LENGTH (CDR L))))
I))
J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, rewriting with SUB1-NNUMBERP and SUB1-ADD1, and
opening up the functions ADD1 and EQUAL, to:
T.
Case 2.11.1.
(IMPLIES (AND (LESSP J 1)
(EQUAL (SUB1 J)
(SUB1 (ADD1 (LENGTH (CDR L)))))
(LISTP L)
(NOT (EQUAL J (ADD1 (LENGTH (CDR L)))))
(NOT (EQUAL J 1))
(NOT (EQUAL (ADD1 (LENGTH (CDR L))) 0))
(NOT (EQUAL (ADD1 (LENGTH (CDR L))) 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L)
(SUB1 (ADD1 (LENGTH (CDR L))))
I))
J)
(NTH (CDR L) (SUB1 J)))).
However this again simplifies, applying SUB1-ADD1 and ADD1-SUB1, and
unfolding EQUAL and NUMBERP, to:
T.
Case 2.10.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(EQUAL K 0))
(EQUAL (NTH L J)
(NTH (CDR L) (SUB1 J)))).
This again simplifies, using linear arithmetic, to:
T.
Case 2.9.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(CAR L))),
which again simplifies, obviously, to:
T.
Case 2.8.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(CAR L))).
But this again simplifies, using linear arithmetic, to:
T.
Case 2.7.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(EQUAL K 0))
(EQUAL (NTH L J) (CAR L))),
which again simplifies, using linear arithmetic, to:
T.
Case 2.6.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, using linear arithmetic, to two new formulas:
Case 2.6.2.
(IMPLIES (AND (NOT (NUMBERP J))
(EQUAL (SUB1 J) (SUB1 1))
(LISTP L)
(MEMBER 1 (NSET (LENGTH (CDR L))))
(NOT (EQUAL J 1))
(NOT (EQUAL J 1))
(NOT (EQUAL 1 0)))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, rewriting with SUB1-NNUMBERP and CDR-CONS, and
unfolding the functions SUB1, EQUAL, and NTH, to:
(IMPLIES (AND (NOT (NUMBERP J))
(LISTP L)
(MEMBER 1 (NSET (LENGTH (CDR L)))))
(EQUAL (NTH (CDR L) 0)
(NTH (CDR L) (SUB1 J)))),
which further simplifies, rewriting with SUB1-NNUMBERP, to:
T.
Case 2.6.1.
(IMPLIES (AND (LESSP J 1)
(EQUAL (SUB1 J) (SUB1 1))
(LISTP L)
(MEMBER 1 (NSET (LENGTH (CDR L))))
(NOT (EQUAL J 1))
(NOT (EQUAL J 1))
(NOT (EQUAL 1 0)))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))).
However this again simplifies, applying CDR-CONS and SUB1-NNUMBERP, and
opening up the definitions of LESSP, SUB1, NUMBERP, EQUAL, and NTH, to
the following two new formulas:
Case 2.6.1.2.
(IMPLIES (AND (EQUAL J 0)
(LISTP L)
(MEMBER 1 (NSET (LENGTH (CDR L)))))
(EQUAL (NTH (CDR L) 0)
(NTH (CDR L) (SUB1 J)))).
But this again simplifies, unfolding SUB1, to:
T.
Case 2.6.1.1.
(IMPLIES (AND (NOT (NUMBERP J))
(LISTP L)
(MEMBER 1 (NSET (LENGTH (CDR L)))))
(EQUAL (NTH (CDR L) 0)
(NTH (CDR L) (SUB1 J)))),
which further simplifies, applying SUB1-NNUMBERP, to:
T.
Case 2.5.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(NTH (CDR L) (SUB1 J)))).
However this again simplifies, applying CDR-CONS, and expanding the
definition of NTH, to:
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))),
which further simplifies, trivially, to the new formula:
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 J) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))).
Applying the lemma SUB1-ELIM, replace J by (ADD1 X) to eliminate (SUB1 J).
We rely upon the type restriction lemma noted when SUB1 was introduced to
restrict the new variable. We would thus like to prove the following
three new conjectures:
Case 2.5.3.
(IMPLIES (AND (EQUAL J 0)
(EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 J) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))).
But this further simplifies, opening up SUB1, EQUAL, and MOVE, to:
T.
Case 2.5.2.
(IMPLIES (AND (NOT (NUMBERP J))
(EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 J) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))),
which further simplifies, applying the lemma SUB1-NNUMBERP, and opening
up EQUAL and MOVE, to:
T.
Case 2.5.1.
(IMPLIES (AND (NUMBERP X)
(NOT (EQUAL (ADD1 X) 0))
(EQUAL X (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL (ADD1 X) K))
(NOT (EQUAL (ADD1 X) 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) X I) X)
(NTH (CDR L) X))),
which further simplifies, using linear arithmetic, to two new goals:
Case 2.5.1.2.
(IMPLIES (AND (LESSP K 1)
(NUMBERP (SUB1 K))
(NOT (EQUAL (ADD1 (SUB1 K)) 0))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL (ADD1 (SUB1 K)) K))
(NOT (EQUAL (ADD1 (SUB1 K)) 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
(NTH (CDR L) (SUB1 K)))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (NOT (NUMBERP K))
(LESSP K 1)
(NUMBERP (SUB1 K))
(NOT (EQUAL (ADD1 (SUB1 K)) 0))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL (ADD1 (SUB1 K)) K))
(NOT (EQUAL (ADD1 (SUB1 K)) 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
(NTH (CDR L) (SUB1 K)))).
This finally simplifies, applying NSET-NUMBER, to:
T.
Case 2.5.1.1.
(IMPLIES (AND (NOT (NUMBERP K))
(NUMBERP (SUB1 K))
(NOT (EQUAL (ADD1 (SUB1 K)) 0))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL (ADD1 (SUB1 K)) K))
(NOT (EQUAL (ADD1 (SUB1 K)) 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 K))
(NTH (CDR L) (SUB1 K)))).
This finally simplifies, rewriting with NSET-NUMBER, to:
T.
Case 2.4.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(EQUAL K 0))
(EQUAL (NTH L J)
(NTH (CDR L) (SUB1 J)))).
This again simplifies, appealing to the lemma ZERO-NOT-MEMBER-NSET, and
expanding the function SUB1, to:
T.
Case 2.3.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(CAR L))),
which again simplifies, trivially, to:
T.
Case 2.2.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(CAR L))).
But this again simplifies, using linear arithmetic, to the goal:
(IMPLIES (AND (NOT (NUMBERP K))
(EQUAL (SUB1 1) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL 1 K))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
1)
(CAR L))).
But this again simplifies, appealing to the lemma NSET-NUMBER, to:
T.
Case 2.1.
(IMPLIES (AND (EQUAL (SUB1 J) (SUB1 K))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(EQUAL K 0))
(EQUAL (NTH L J) (CAR L))),
which again simplifies, rewriting with the lemma ZERO-NOT-MEMBER-NSET, and
opening up the definitions of SUB1 and EQUAL, to:
T.
Case 1. (IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL J K)))
(EQUAL (NTH (MOVE L K I) J)
(NTH L J))),
which simplifies, applying the lemmas SUB1-ADD1, CDR-CONS, and CAR-CONS, and
expanding the functions LENGTH, NSET, MEMBER, MOVE, and NTH, to 12 new
formulas:
Case 1.12.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, applying ADD1-EQUAL and CDR-CONS, and unfolding
SUB1, EQUAL, MOVE, NUMBERP, and NTH, to:
T.
Case 1.11.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(NTH (CDR L) (SUB1 J)))).
But this again simplifies, applying the lemmas SUB1-ADD1, ADD1-EQUAL, and
CDR-CONS, and expanding the functions NUMBERP and NTH, to:
T.
Case 1.10.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(EQUAL K 0))
(EQUAL (NTH L J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, using linear arithmetic, to:
T.
Case 1.9.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(CAR L))),
which again simplifies, trivially, to:
T.
Case 1.8.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(CAR L))).
However this again simplifies, applying SUB1-ADD1, ADD1-EQUAL, and
CAR-CONS, and expanding the definitions of SUB1, NUMBERP, EQUAL, and NTH,
to:
T.
Case 1.7.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(EQUAL K (ADD1 (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(EQUAL K 0))
(EQUAL (NTH L J) (CAR L))).
This again simplifies, using linear arithmetic, to:
T.
Case 1.6.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(NTH (CDR L) (SUB1 J)))),
which again simplifies, rewriting with CDR-CONS, and opening up the
functions SUB1, EQUAL, MOVE, and NTH, to:
T.
Case 1.5.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(NTH (CDR L) (SUB1 J)))).
This again simplifies, applying CDR-CONS, and opening up the definition of
NTH, to:
T.
Case 1.4.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(NOT (EQUAL J 1))
(EQUAL K 0))
(EQUAL (NTH L J)
(NTH (CDR L) (SUB1 J)))).
But this again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and
expanding SUB1, EQUAL, and MOVE, to:
T.
Case 1.3.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(EQUAL K 1))
(EQUAL (NTH (CONS I (CDR L)) J)
(CAR L))).
This again simplifies, obviously, to:
T.
Case 1.2.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(NOT (EQUAL K 0))
(NOT (EQUAL K 1)))
(EQUAL (NTH (CONS (CAR L)
(MOVE (CDR L) (SUB1 K) I))
J)
(CAR L))).
But this again simplifies, applying CAR-CONS, and unfolding SUB1, EQUAL,
and NTH, to:
T.
Case 1.1.
(IMPLIES (AND (EQUAL (NTH (MOVE (CDR L) (SUB1 K) I)
(SUB1 J))
(NTH (CDR L) (SUB1 J)))
(LISTP L)
(MEMBER K (NSET (LENGTH (CDR L))))
(NOT (EQUAL J K))
(EQUAL J 1)
(EQUAL K 0))
(EQUAL (NTH L J) (CAR L))).
But this again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and
opening up SUB1, EQUAL, and MOVE, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.1 ]
MOVE-UNCHANGE-OTHER-THAN-NTH
(PROVE-LEMMA MEMBER-EX-UNION
(REWRITE)
(IMPLIES (EXIST-UNION L N I)
(MEMBER (EXIST-UNION L N I) (NSET N)))
((ENABLE NSET EXIST-UNION)))
Name the conjecture *1.
Let us appeal to the induction principle. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p L N I))
(IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N L N I))
(p L N I))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N I))
(p L (SUB1 N) I))
(p L N I))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme leads to the following four new goals:
Case 4. (IMPLIES (AND (ZEROP N) (EXIST-UNION L N I))
(MEMBER (EXIST-UNION L N I)
(NSET N))).
This simplifies, expanding the definitions of ZEROP, EQUAL, and EXIST-UNION,
to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N L N I)
(EXIST-UNION L N I))
(MEMBER (EXIST-UNION L N I)
(NSET N))).
This simplifies, rewriting with CAR-CONS, and unfolding the functions ZEROP,
EXIST-UNION, NSET, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N I))
(NOT (EXIST-UNION L (SUB1 N) I))
(EXIST-UNION L N I))
(MEMBER (EXIST-UNION L N I)
(NSET N))),
which simplifies, expanding the definitions of ZEROP and EXIST-UNION, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N I))
(MEMBER (EXIST-UNION L (SUB1 N) I)
(NSET (SUB1 N)))
(EXIST-UNION L N I))
(MEMBER (EXIST-UNION L N I)
(NSET N))),
which simplifies, applying CDR-CONS and CAR-CONS, and opening up ZEROP,
EXIST-UNION, NSET, and MEMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
MEMBER-EX-UNION
(PROVE-LEMMA NUMBER-EX-UNION
(REWRITE)
(IMPLIES (EXIST-UNION L N I)
(NUMBERP (EXIST-UNION L N I)))
((ENABLE EXIST-UNION)))
This conjecture simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
NUMBER-EX-UNION
(PROVE-LEMMA MEMBER-INTERSECT
(REWRITE)
(IMPLIES (EXIST-INTERSECT-8-12-3-4 N L G)
(MEMBER (EXIST-INTERSECT-8-12-3-4 N L G)
(NSET N)))
((ENABLE NSET EXIST-INTERSECT-8-12-3-4 INTERSECT-8-12-3-4-AT-N)))
Name the conjecture *1.
Let us appeal to the induction principle. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L G))
(IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N L G))
(p N L G))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(p (SUB1 N) L G))
(p N L G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme leads to the following four new goals:
Case 4. (IMPLIES (AND (ZEROP N)
(EXIST-INTERSECT-8-12-3-4 N L G))
(MEMBER (EXIST-INTERSECT-8-12-3-4 N L G)
(NSET N))).
This simplifies, expanding the definitions of ZEROP, EQUAL, and
EXIST-INTERSECT-8-12-3-4, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N L G)
(EXIST-INTERSECT-8-12-3-4 N L G))
(MEMBER (EXIST-INTERSECT-8-12-3-4 N L G)
(NSET N))).
This simplifies, rewriting with CAR-CONS, and unfolding the functions ZEROP,
INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, NSET, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(NOT (EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
(EXIST-INTERSECT-8-12-3-4 N L G))
(MEMBER (EXIST-INTERSECT-8-12-3-4 N L G)
(NSET N))),
which simplifies, expanding the definitions of ZEROP,
INTERSECT-8-12-3-4-AT-N, and EXIST-INTERSECT-8-12-3-4, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(MEMBER (EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G)
(NSET (SUB1 N)))
(EXIST-INTERSECT-8-12-3-4 N L G))
(MEMBER (EXIST-INTERSECT-8-12-3-4 N L G)
(NSET N))),
which simplifies, applying CDR-CONS and CAR-CONS, and opening up ZEROP,
INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, NSET, and MEMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
MEMBER-INTERSECT
(PROVE-LEMMA NUMBER-INTERSECT
(REWRITE)
(IMPLIES (EXIST-INTERSECT-8-12-3-4 N L G)
(NUMBERP (EXIST-INTERSECT-8-12-3-4 N L G)))
((ENABLE EXIST-INTERSECT-8-12-3-4)))
This conjecture simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
NUMBER-INTERSECT
(PROVE-LEMMA K-NOT-0
(REWRITE)
(IMPLIES (MEMBER K (NSET N))
(NOT (ZEROP K)))
((ENABLE NSET)))
WARNING: Note that the rewrite rule K-NOT-0 will be stored so as to apply
only to terms with the nonrecursive function symbol ZEROP.
WARNING: Note that K-NOT-0 contains the free variable N which will be chosen
by instantiating the hypothesis (MEMBER K (NSET N)).
This formula simplifies, applying the lemma NSET-NUMBER, and expanding the
definition of ZEROP, to the formula:
(IMPLIES (MEMBER K (NSET N))
(NOT (EQUAL K 0))).
This again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-NOT-0
(PROVE-LEMMA J-EX-L8-12
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(UNION-AT-N L J '(8 9 10 11 12)))
(EXIST-UNION L N '(8 9 10 11 12)))
((ENABLE NSET EXIST-UNION UNION-AT-N AT)))
WARNING: Note that J-EX-L8-12 contains the free variable J which will be
chosen by instantiating the hypothesis (MEMBER J (NSET N)).
This formula can be simplified, using the abbreviations AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (MEMBER J (NSET N))
(MEMBER (NTH L J) '(8 9 10 11 12)))
(EXIST-UNION L N '(8 9 10 11 12))),
which simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to five
new formulas:
Case 5. (IMPLIES (AND (MEMBER J (NSET N))
(EQUAL (NTH L J) 8))
(EXIST-UNION L N '(8 9 10 11 12))),
which we will name *1.
Case 4. (IMPLIES (AND (MEMBER J (NSET N))
(EQUAL (NTH L J) 9))
(EXIST-UNION L N '(8 9 10 11 12))),
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:
(IMPLIES (AND (MEMBER J (NSET N))
(UNION-AT-N L J '(8 9 10 11 12)))
(EXIST-UNION L N '(8 9 10 11 12))),
which we named *1 above. 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 (ZEROP N) (p L N J))
(IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N L N '(8 9 10 11 12)))
(p L N J))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N '(8 9 10 11 12)))
(p L (SUB1 N) J))
(p L N J))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme produces the following four new conjectures:
Case 4. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(UNION-AT-N L J '(8 9 10 11 12)))
(EXIST-UNION L N '(8 9 10 11 12))).
This simplifies, opening up the definitions of ZEROP, NSET, LISTP, and
MEMBER, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N L N '(8 9 10 11 12))
(MEMBER J (NSET N))
(UNION-AT-N L J '(8 9 10 11 12)))
(EXIST-UNION L N '(8 9 10 11 12))).
This simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and
expanding the definitions of ZEROP, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
NSET, and EXIST-UNION, to the following 25 new conjectures:
Case 3.25.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 8)
(EQUAL J N)
(EQUAL (NTH L J) 8))
(NOT (EQUAL J 0))).
This again simplifies, clearly, to:
T.
Case 3.24.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 8)
(EQUAL J N)
(EQUAL (NTH L J) 9))
(NOT (EQUAL J 0))).
This again simplifies, clearly, to:
T.
Case 3.23.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 8)
(EQUAL J N)
(EQUAL (NTH L J) 10))
(NOT (EQUAL J 0))).
This again simplifies, clearly, to:
T.
Case 3.22.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 8)
(EQUAL J N)
(EQUAL (NTH L J) 11))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.21.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 8)
(EQUAL J N)
(EQUAL (NTH L J) 12))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.20.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 9)
(EQUAL J N)
(EQUAL (NTH L J) 8))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.19.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 9)
(EQUAL J N)
(EQUAL (NTH L J) 9))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.18.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 9)
(EQUAL J N)
(EQUAL (NTH L J) 10))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 3.17.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 9)
(EQUAL J N)
(EQUAL (NTH L J) 11))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 3.16.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 9)
(EQUAL J N)
(EQUAL (NTH L J) 12))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 3.15.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 10)
(EQUAL J N)
(EQUAL (NTH L J) 8))
(NOT (EQUAL J 0))).
This again simplifies, clearly, to:
T.
Case 3.14.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 10)
(EQUAL J N)
(EQUAL (NTH L J) 9))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.13.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 10)
(EQUAL J N)
(EQUAL (NTH L J) 10))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 3.12.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 10)
(EQUAL J N)
(EQUAL (NTH L J) 11))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 3.11.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 10)
(EQUAL J N)
(EQUAL (NTH L J) 12))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 3.10.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 11)
(EQUAL J N)
(EQUAL (NTH L J) 8))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.9.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 11)
(EQUAL J N)
(EQUAL (NTH L J) 9))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.8.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 11)
(EQUAL J N)
(EQUAL (NTH L J) 10))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 3.7.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 11)
(EQUAL J N)
(EQUAL (NTH L J) 11))
(NOT (EQUAL J 0))).
This again simplifies, clearly, to:
T.
Case 3.6.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 11)
(EQUAL J N)
(EQUAL (NTH L J) 12))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.5.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 12)
(EQUAL J N)
(EQUAL (NTH L J) 8))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 3.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 12)
(EQUAL J N)
(EQUAL (NTH L J) 9))
(NOT (EQUAL J 0))).
This again simplifies, clearly, to:
T.
Case 3.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 12)
(EQUAL J N)
(EQUAL (NTH L J) 10))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 3.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 12)
(EQUAL J N)
(EQUAL (NTH L J) 11))
(NOT (EQUAL J 0))).
This again simplifies, clearly, to:
T.
Case 3.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EQUAL (NTH L N) 12)
(EQUAL J N)
(EQUAL (NTH L J) 12))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N '(8 9 10 11 12)))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(UNION-AT-N L J '(8 9 10 11 12)))
(EXIST-UNION L N '(8 9 10 11 12))).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding the
definitions of ZEROP, MEMBER, LISTP, CAR, CDR, UNION-AT-N, NSET, and
EXIST-UNION, to five new formulas:
Case 2.5.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL (NTH L J) 8))
(NOT (EQUAL J 0))),
which again simplifies, trivially, to:
T.
Case 2.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL (NTH L J) 9))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL (NTH L J) 10))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL (NTH L J) 11))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL (NTH L J) 12))
(NOT (EQUAL J 0))).
This again simplifies, clearly, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N '(8 9 10 11 12)))
(EXIST-UNION L
(SUB1 N)
'(8 9 10 11 12))
(MEMBER J (NSET N))
(UNION-AT-N L J '(8 9 10 11 12)))
(EXIST-UNION L N '(8 9 10 11 12))).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding ZEROP,
MEMBER, LISTP, CAR, CDR, UNION-AT-N, NSET, and EXIST-UNION, to five new
formulas:
Case 1.5.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(EXIST-UNION L
(SUB1 N)
'(8 9 10 11 12))
(EQUAL J N)
(EQUAL (NTH L J) 8))
(NOT (EQUAL J 0))),
which again simplifies, obviously, to:
T.
Case 1.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(EXIST-UNION L
(SUB1 N)
'(8 9 10 11 12))
(EQUAL J N)
(EQUAL (NTH L J) 9))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(EXIST-UNION L
(SUB1 N)
'(8 9 10 11 12))
(EQUAL J N)
(EQUAL (NTH L J) 10))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(EXIST-UNION L
(SUB1 N)
'(8 9 10 11 12))
(EQUAL J N)
(EQUAL (NTH L J) 11))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (EQUAL (NTH L N) 8))
(NOT (EQUAL (NTH L N) 9))
(NOT (EQUAL (NTH L N) 10))
(NOT (EQUAL (NTH L N) 11))
(NOT (EQUAL (NTH L N) 12))
(EXIST-UNION L
(SUB1 N)
'(8 9 10 11 12))
(EQUAL J N)
(EQUAL (NTH L J) 12))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.1 ]
J-EX-L8-12
(PROVE-LEMMA EX-LP8-12-IN-LP8-12
(REWRITE)
(IMPLIES (EXIST-UNION LP N '(8 9 10 11 12))
(UNION-AT-N LP
(EXIST-UNION LP N '(8 9 10 11 12))
'(8 9 10 11 12)))
((ENABLE EXIST-UNION UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to the formula:
(IMPLIES (EXIST-UNION LP N '(8 9 10 11 12))
(MEMBER (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
'(8 9 10 11 12))).
This simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to the
new conjecture:
(IMPLIES (AND (EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)),
which we will name *1.
We will appeal to induction. The recursive terms in the conjecture
suggest six inductions. However, they merge into one likely candidate
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p LP N))
(IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N LP N '(8 9 10 11 12)))
(p LP N))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(p LP (SUB1 N)))
(p LP N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme leads
to the following eight new goals:
Case 8. (IMPLIES (AND (ZEROP N)
(EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)).
This simplifies, opening up the functions ZEROP, EQUAL, and EXIST-UNION, to:
T.
Case 7. (IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N LP N '(8 9 10 11 12))
(EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)).
This simplifies, expanding the functions ZEROP, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, EXIST-UNION, and EQUAL, to:
T.
Case 6. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(NOT (EXIST-UNION LP
(SUB1 N)
'(8 9 10 11 12)))
(EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)).
This simplifies, opening up the functions ZEROP, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, and EXIST-UNION, to:
T.
Case 5. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(EQUAL (NTH LP
(EXIST-UNION LP
(SUB1 N)
'(8 9 10 11 12)))
8)
(EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)).
This simplifies, opening up the definitions of ZEROP, MEMBER, LISTP, CAR,
CDR, UNION-AT-N, EXIST-UNION, and EQUAL, to:
T.
Case 4. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(EQUAL (NTH LP
(EXIST-UNION LP
(SUB1 N)
'(8 9 10 11 12)))
9)
(EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)).
This simplifies, opening up ZEROP, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
EXIST-UNION, and EQUAL, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(EQUAL (NTH LP
(EXIST-UNION LP
(SUB1 N)
'(8 9 10 11 12)))
10)
(EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)).
This simplifies, opening up ZEROP, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
EXIST-UNION, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(EQUAL (NTH LP
(EXIST-UNION LP
(SUB1 N)
'(8 9 10 11 12)))
11)
(EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)).
This simplifies, opening up ZEROP, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
EXIST-UNION, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(EQUAL (NTH LP
(EXIST-UNION LP
(SUB1 N)
'(8 9 10 11 12)))
12)
(EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
8))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
9))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
10))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
11)))
(EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
12)).
This simplifies, opening up the functions ZEROP, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, EXIST-UNION, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.2 ]
EX-LP8-12-IN-LP8-12
(PROVE-LEMMA EX-IF4
(REWRITE)
(IMPLIES (AND (NOT (EXIST-UNION L N '(8 9 10 11 12)))
(LG N L G))
(NOT (EXIST-UNION G N '(4))))
((ENABLE EXIST-UNION UNION-AT-N LG LG-AT-N LG-2-AT-N AT)))
WARNING: Note that EX-IF4 contains the free variable L which will be chosen
by instantiating the hypothesis (NOT (EXIST-UNION L N (QUOTE (8 9 10 11 12)))).
Call the conjecture *1.
Let us appeal to the induction principle. 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 (ZEROP N) (p G N L))
(IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N L N '(8 9 10 11 12)))
(p G N L))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N '(8 9 10 11 12)))
(p G (SUB1 N) L))
(p G N L))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme produces five new goals:
Case 5. (IMPLIES (AND (ZEROP N)
(NOT (EXIST-UNION L N '(8 9 10 11 12)))
(LG N L G))
(NOT (EXIST-UNION G N '(4)))),
which simplifies, unfolding the functions ZEROP, EQUAL, EXIST-UNION, and LG,
to:
T.
Case 4. (IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N L N '(8 9 10 11 12))
(NOT (EXIST-UNION L N '(8 9 10 11 12)))
(LG N L G))
(NOT (EXIST-UNION G N '(4)))),
which simplifies, expanding the functions ZEROP, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, and EXIST-UNION, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N '(8 9 10 11 12)))
(EXIST-UNION L
(SUB1 N)
'(8 9 10 11 12))
(NOT (EXIST-UNION L N '(8 9 10 11 12)))
(LG N L G))
(NOT (EXIST-UNION G N '(4)))),
which simplifies, opening up ZEROP, MEMBER, LISTP, CAR, CDR, UNION-AT-N, and
EXIST-UNION, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N '(8 9 10 11 12)))
(NOT (LG (SUB1 N) L G))
(NOT (EXIST-UNION L N '(8 9 10 11 12)))
(LG N L G))
(NOT (EXIST-UNION G N '(4)))),
which simplifies, opening up the definitions of ZEROP, MEMBER, LISTP, CAR,
CDR, UNION-AT-N, EXIST-UNION, LG, LG-2-AT-N, AT, EQUAL, and LG-AT-N, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N L N '(8 9 10 11 12)))
(NOT (EXIST-UNION G (SUB1 N) '(4)))
(NOT (EXIST-UNION L N '(8 9 10 11 12)))
(LG N L G))
(NOT (EXIST-UNION G N '(4)))),
which simplifies, expanding the functions ZEROP, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, EXIST-UNION, LG, LG-2-AT-N, AT, EQUAL, and LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
EX-IF4
(PROVE-LEMMA L34-EMPTY
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (UNION-AT-N L J '(3 4))))
((ENABLE AT NSET EXIST-UNION UNION-AT-N LG LG-AT-N LG-1-AT-N)))
WARNING: Note that L34-EMPTY contains the free variables G and N which will
be chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LG N L G).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
UNION-AT-N, to the new conjecture:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (MEMBER (NTH L J) '(3 4)))),
which simplifies, unfolding the functions CDR, CAR, LISTP, and MEMBER, to two
new formulas:
Case 2. (IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (EQUAL (NTH L J) 3))),
which we will name *1.
Case 1. (IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (EQUAL (NTH L J) 4))),
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:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (UNION-AT-N L J '(3 4)))).
We gave this the name *1 above. Perhaps we can prove it by 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 (ZEROP N) (p L J G N))
(IMPLIES (AND (NOT (ZEROP N))
(p L J G (SUB1 N)))
(p L J G N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
produces the following four new conjectures:
Case 4. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (UNION-AT-N L J '(3 4)))).
This simplifies, opening up ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (UNION-AT-N L J '(3 4)))).
This simplifies, applying the lemmas CDR-CONS and CAR-CONS, and opening up
ZEROP, NSET, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to the following two
new goals:
Case 3.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(NOT (EXIST-UNION G J '(1))))
(NOT (EQUAL (NTH L J) 3))).
This again simplifies, expanding LG, LG-1-AT-N, EQUAL, AT, LG-AT-N,
EXIST-UNION, MEMBER, and UNION-AT-N, to:
T.
Case 3.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(NOT (EXIST-UNION G J '(1))))
(NOT (EQUAL (NTH L J) 4))),
which again simplifies, expanding the definitions of LG, LG-1-AT-N, EQUAL,
AT, LG-AT-N, EXIST-UNION, MEMBER, and UNION-AT-N, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (UNION-AT-N L J '(3 4)))),
which simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the
functions ZEROP, NSET, MEMBER, LISTP, CAR, CDR, UNION-AT-N, LG, LG-1-AT-N,
AT, EQUAL, and LG-AT-N, to the following two new formulas:
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(NOT (EXIST-UNION G J '(1))))
(NOT (EQUAL (NTH L J) 3))).
However this again simplifies, opening up LG, LG-1-AT-N, EQUAL, AT, and
LG-AT-N, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(NOT (EXIST-UNION G J '(1))))
(NOT (EQUAL (NTH L J) 4))),
which again simplifies, expanding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(EXIST-UNION G (SUB1 N) '(1))
(MEMBER J (NSET N))
(LG N L G)
(NOT (EXIST-UNION G N '(1))))
(NOT (UNION-AT-N L J '(3 4)))),
which simplifies, applying CDR-CONS and CAR-CONS, and unfolding ZEROP, NSET,
MEMBER, LISTP, CAR, CDR, UNION-AT-N, LG, LG-1-AT-N, AT, EQUAL, LG-AT-N, and
EXIST-UNION, to the following two new goals:
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EXIST-UNION G (SUB1 N) '(1))
(EQUAL J N)
(LG J L G)
(NOT (EXIST-UNION G J '(1))))
(NOT (EQUAL (NTH L J) 3))).
However this again simplifies, unfolding LG, LG-1-AT-N, EQUAL, AT, LG-AT-N,
EXIST-UNION, MEMBER, and UNION-AT-N, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(EXIST-UNION G (SUB1 N) '(1))
(EQUAL J N)
(LG J L G)
(NOT (EXIST-UNION G J '(1))))
(NOT (EQUAL (NTH L J) 4))),
which again simplifies, unfolding the functions LG, LG-1-AT-N, EQUAL, AT,
LG-AT-N, EXIST-UNION, MEMBER, and UNION-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
L34-EMPTY
(PROVE-LEMMA LP4-THEN-UN34
(REWRITE)
(IMPLIES (AT LP J 4)
(UNION-AT-N LP J '(3 4)))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations IMPLIES, UNION-AT-N,
and AT, to the new conjecture:
(IMPLIES (EQUAL (NTH LP J) 4)
(MEMBER (NTH LP J) '(3 4))),
which simplifies, unfolding the function MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LP4-THEN-UN34
(PROVE-LEMMA INT-8-12-3-4-THEN-UN34
(REWRITE)
(IMPLIES (EXIST-INTERSECT-8-12-3-4 N L G)
(EXIST-UNION G N '(3 4)))
((ENABLE EXIST-INTERSECT-8-12-3-4 INTERSECT-8-12-3-4-AT-N
UNION-AT-N EXIST-UNION AT)))
WARNING: Note that INT-8-12-3-4-THEN-UN34 contains the free variable L which
will be chosen by instantiating the hypothesis:
(EXIST-INTERSECT-8-12-3-4 N L G).
Call the conjecture *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 (ZEROP N) (p G N L))
(IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N L G))
(p G N L))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(p G (SUB1 N) L))
(p G N L))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to prove that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme leads to four new goals:
Case 4. (IMPLIES (AND (ZEROP N)
(EXIST-INTERSECT-8-12-3-4 N L G))
(EXIST-UNION G N '(3 4))),
which simplifies, opening up the definitions of ZEROP, EQUAL, and
EXIST-INTERSECT-8-12-3-4, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N L G)
(EXIST-INTERSECT-8-12-3-4 N L G))
(EXIST-UNION G N '(3 4))),
which simplifies, applying LP4-THEN-UN34, and unfolding ZEROP, UNION-AT-N,
CDR, CAR, LISTP, MEMBER, INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4,
EQUAL, AT, and EXIST-UNION, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(NOT (EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
(EXIST-INTERSECT-8-12-3-4 N L G))
(EXIST-UNION G N '(3 4))).
This simplifies, expanding the functions ZEROP, UNION-AT-N, CDR, CAR, LISTP,
MEMBER, INTERSECT-8-12-3-4-AT-N, and EXIST-INTERSECT-8-12-3-4, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(EXIST-UNION G (SUB1 N) '(3 4))
(EXIST-INTERSECT-8-12-3-4 N L G))
(EXIST-UNION G N '(3 4))).
This simplifies, opening up the functions ZEROP, UNION-AT-N, CDR, CAR, LISTP,
MEMBER, INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, and EXIST-UNION,
to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
INT-8-12-3-4-THEN-UN34
(PROVE-LEMMA INT-WTN
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(INTERSECT-8-12-3-4-AT-N J LP GP))
(EXIST-INTERSECT-8-12-3-4 N LP GP))
((ENABLE NSET EXIST-INTERSECT-8-12-3-4)))
WARNING: Note that INT-WTN contains the free variable J which will be chosen
by instantiating the hypothesis (MEMBER J (NSET N)).
Name the conjecture *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 (ZEROP N) (p N LP GP J))
(IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N LP GP))
(p N LP GP J))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N LP GP))
(p (SUB1 N) LP GP J))
(p N LP GP J))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme leads
to the following four new conjectures:
Case 4. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(INTERSECT-8-12-3-4-AT-N J LP GP))
(EXIST-INTERSECT-8-12-3-4 N LP GP)).
This simplifies, opening up ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N LP GP)
(MEMBER J (NSET N))
(INTERSECT-8-12-3-4-AT-N J LP GP))
(EXIST-INTERSECT-8-12-3-4 N LP GP)).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the
functions ZEROP, NSET, MEMBER, and EXIST-INTERSECT-8-12-3-4, to the formula:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(INTERSECT-8-12-3-4-AT-N N LP GP)
(EQUAL J N)
(INTERSECT-8-12-3-4-AT-N J LP GP))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N LP GP))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(INTERSECT-8-12-3-4-AT-N J LP GP))
(EXIST-INTERSECT-8-12-3-4 N LP GP)).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding the
definitions of ZEROP, NSET, MEMBER, and EXIST-INTERSECT-8-12-3-4, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (INTERSECT-8-12-3-4-AT-N N LP GP))
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(INTERSECT-8-12-3-4-AT-N J LP GP))
(NOT (EQUAL J 0))).
This again simplifies, trivially, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N LP GP))
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
LP GP)
(MEMBER J (NSET N))
(INTERSECT-8-12-3-4-AT-N J LP GP))
(EXIST-INTERSECT-8-12-3-4 N LP GP)).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding the
definitions of ZEROP, NSET, MEMBER, and EXIST-INTERSECT-8-12-3-4, to the
conjecture:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (INTERSECT-8-12-3-4-AT-N N LP GP))
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
LP GP)
(EQUAL J N)
(INTERSECT-8-12-3-4-AT-N J LP GP))
(NOT (EQUAL J 0))).
This again simplifies, obviously, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
INT-WTN
(PROVE-LEMMA UN8-12-AND-UN34-THEN-INT
(REWRITE)
(IMPLIES (AND (UNION-AT-N LP J '(8 9 10 11 12))
(UNION-AT-N GP J '(3 4)))
(INTERSECT-8-12-3-4-AT-N J LP GP))
((ENABLE INTERSECT-8-12-3-4-AT-N)))
This simplifies, unfolding the definition of INTERSECT-8-12-3-4-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN8-12-AND-UN34-THEN-INT
(PROVE-LEMMA LG-L5-G3
(REWRITE)
(IMPLIES (AND (MEMBER K (NSET N))
(LG N L G)
(AT L K 5))
(AT G K 3))
((ENABLE LG LG-AT-N LG-2-AT-N NSET AT)))
WARNING: Note that LG-L5-G3 contains the free variables L and N which will be
chosen by instantiating the hypotheses (MEMBER K (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
AT, to the formula:
(IMPLIES (AND (MEMBER K (NSET N))
(LG N L G)
(EQUAL (NTH L K) 5))
(EQUAL (NTH G K) 3)).
Name the above subgoal *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 (ZEROP N) (p G K L N))
(IMPLIES (AND (NOT (ZEROP N))
(p G K L (SUB1 N)))
(p G K L N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme leads
to the following three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER K (NSET N))
(LG N L G)
(EQUAL (NTH L K) 5))
(EQUAL (NTH G K) 3)).
This simplifies, opening up the functions ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER K (NSET (SUB1 N))))
(MEMBER K (NSET N))
(LG N L G)
(EQUAL (NTH L K) 5))
(EQUAL (NTH G K) 3)).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding the
definitions of ZEROP, NSET, MEMBER, LG-AT-N, AT, EQUAL, LG-2-AT-N, and LG,
to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(EQUAL K 0)
(EQUAL (NTH L 0) 5))
(EQUAL (NTH G 0) 3)).
This again simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER K (NSET N))
(LG N L G)
(EQUAL (NTH L K) 5))
(EQUAL (NTH G K) 3)).
This simplifies, applying CDR-CONS and CAR-CONS, and opening up ZEROP, NSET,
MEMBER, LG-AT-N, AT, EQUAL, LG-2-AT-N, and LG, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL K N)
(EQUAL K 0)
(EQUAL (NTH L 0) 5))
(EQUAL (NTH G 0) 3)).
This again simplifies, trivially, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-L5-G3
(PROVE-LEMMA GP3-THEN-UN34
(REWRITE)
(IMPLIES (AT GP K 3)
(UNION-AT-N GP K '(3 4)))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations IMPLIES, UNION-AT-N,
and AT, to the new conjecture:
(IMPLIES (EQUAL (NTH GP K) 3)
(MEMBER (NTH GP K) '(3 4))),
which simplifies, unfolding the function MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
GP3-THEN-UN34
(PROVE-LEMMA CASE-K
(REWRITE)
(IMPLIES (AND (UNION-AT-N L K '(8 9 10 11 12))
(NOT (UNION-AT-N L K '(8 9 10 11))))
(AT L K 12))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, AT,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER (NTH L K) '(8 9 10 11 12))
(NOT (MEMBER (NTH L K) '(8 9 10 11))))
(EQUAL (NTH L K) 12)),
which simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
CASE-K
(PROVE-LEMMA INTERSECT-8-12-3-4-THEN-3-4
(REWRITE)
(IMPLIES (EXIST-INTERSECT-8-12-3-4 N L G)
(UNION-AT-N G
(EXIST-INTERSECT-8-12-3-4 N L G)
'(3 4)))
((ENABLE EXIST-INTERSECT-8-12-3-4 INTERSECT-8-12-3-4-AT-N
UNION-AT-N AT)))
This formula can be simplified, using the abbreviations IMPLIES and UNION-AT-N,
to:
(IMPLIES (EXIST-INTERSECT-8-12-3-4 N L G)
(MEMBER (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
'(3 4))),
which simplifies, unfolding the definitions of CDR, CAR, LISTP, and MEMBER, to:
(IMPLIES (AND (EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
3)))
(EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
4)).
Name the above subgoal *1.
Perhaps we can prove it by induction. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p G N L))
(IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N L G))
(p G N L))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(p G (SUB1 N) L))
(p G N L))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
generates the following five new conjectures:
Case 5. (IMPLIES (AND (ZEROP N)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
3)))
(EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
4)).
This simplifies, expanding ZEROP, EQUAL, and EXIST-INTERSECT-8-12-3-4, to:
T.
Case 4. (IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N L G)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
3)))
(EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
4)).
This simplifies, applying LP4-THEN-UN34, UN8-12-AND-UN34-THEN-INT, and
GP3-THEN-UN34, and opening up the definitions of ZEROP, UNION-AT-N, CDR, CAR,
LISTP, MEMBER, INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, EQUAL, and
AT, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(NOT (EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
3)))
(EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
4)),
which simplifies, unfolding the definitions of ZEROP, UNION-AT-N, CDR, CAR,
LISTP, MEMBER, INTERSECT-8-12-3-4-AT-N, and EXIST-INTERSECT-8-12-3-4, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
3)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
3)))
(EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
4)),
which simplifies, opening up ZEROP, UNION-AT-N, CDR, CAR, LISTP, MEMBER,
INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
4)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
3)))
(EQUAL (NTH G
(EXIST-INTERSECT-8-12-3-4 N L G))
4)),
which simplifies, opening up ZEROP, UNION-AT-N, CDR, CAR, LISTP, MEMBER,
INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
INTERSECT-8-12-3-4-THEN-3-4
(PROVE-LEMMA INTERSECT-8-12-3-4-THEN-8-12
(REWRITE)
(IMPLIES (EXIST-INTERSECT-8-12-3-4 N L G)
(UNION-AT-N L
(EXIST-INTERSECT-8-12-3-4 N L G)
'(8 9 10 11 12)))
((ENABLE EXIST-INTERSECT-8-12-3-4 INTERSECT-8-12-3-4-AT-N
UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to:
(IMPLIES (EXIST-INTERSECT-8-12-3-4 N L G)
(MEMBER (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
'(8 9 10 11 12))).
This simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to:
(IMPLIES (AND (EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)),
which we will name *1.
Perhaps we can prove it by induction. There are six plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p L N G))
(IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N L G))
(p L N G))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(p L (SUB1 N) G))
(p L N G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to establish that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme produces eight new formulas:
Case 8. (IMPLIES (AND (ZEROP N)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)),
which simplifies, expanding the definitions of ZEROP, EQUAL, and
EXIST-INTERSECT-8-12-3-4, to:
T.
Case 7. (IMPLIES (AND (NOT (ZEROP N))
(INTERSECT-8-12-3-4-AT-N N L G)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)),
which simplifies, applying LP4-THEN-UN34, UN8-12-AND-UN34-THEN-INT, and
GP3-THEN-UN34, and unfolding ZEROP, UNION-AT-N, CDR, CAR, LISTP, MEMBER,
INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, EQUAL, and AT, to:
T.
Case 6. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(NOT (EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)).
This simplifies, expanding ZEROP, UNION-AT-N, CDR, CAR, LISTP, MEMBER,
INTERSECT-8-12-3-4-AT-N, and EXIST-INTERSECT-8-12-3-4, to:
T.
Case 5. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
8)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)).
This simplifies, unfolding the definitions of ZEROP, UNION-AT-N, CDR, CAR,
LISTP, MEMBER, INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, and EQUAL,
to:
T.
Case 4. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
9)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)).
This simplifies, opening up the definitions of ZEROP, UNION-AT-N, CDR, CAR,
LISTP, MEMBER, INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, and EQUAL,
to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
10)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)).
This simplifies, expanding ZEROP, UNION-AT-N, CDR, CAR, LISTP, MEMBER,
INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
11)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)).
This simplifies, expanding ZEROP, UNION-AT-N, CDR, CAR, LISTP, MEMBER,
INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (INTERSECT-8-12-3-4-AT-N N L G))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 (SUB1 N)
L G))
12)
(EXIST-INTERSECT-8-12-3-4 N L G)
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
8))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
9))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
10))
(NOT (EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
11)))
(EQUAL (NTH L
(EXIST-INTERSECT-8-12-3-4 N L G))
12)).
This simplifies, opening up ZEROP, UNION-AT-N, CDR, CAR, LISTP, MEMBER,
INTERSECT-8-12-3-4-AT-N, EXIST-INTERSECT-8-12-3-4, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.3 0.0 ]
INTERSECT-8-12-3-4-THEN-8-12
(PROVE-LEMMA UN9-12-THEN-UN8-12
(REWRITE)
(IMPLIES (UNION-AT-N LP K '(9 10 11 12))
(UNION-AT-N LP K '(8 9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to the goal:
(IMPLIES (MEMBER (NTH LP K) '(9 10 11 12))
(MEMBER (NTH LP K) '(8 9 10 11 12))).
This simplifies, unfolding CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN9-12-THEN-UN8-12
(PROVE-LEMMA IF4
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N L J '(9 10 11 12)))
(AT G J 4))
((ENABLE NSET UNION-AT-N AT LG LG-AT-N LG-3-AT-N)))
WARNING: Note that IF4 contains the free variables L and N which will be
chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, AT,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(MEMBER (NTH L J) '(9 10 11 12)))
(EQUAL (NTH G J) 4)).
This simplifies, opening up the functions CDR, CAR, LISTP, and MEMBER, to the
following four new formulas:
Case 4. (IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH L J) 9))
(EQUAL (NTH G J) 4)).
Call the above conjecture *1.
Case 3. (IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH L J) 10))
(EQUAL (NTH G J) 4)),
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:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N L J '(9 10 11 12)))
(AT G J 4)),
which we named *1 above. 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 (ZEROP N) (p G J L N))
(IMPLIES (AND (NOT (ZEROP N))
(p G J L (SUB1 N)))
(p G J L N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme produces the following three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N L J '(9 10 11 12)))
(AT G J 4)).
This simplifies, opening up ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N L J '(9 10 11 12)))
(AT G J 4)).
This simplifies, applying CDR-CONS and CAR-CONS, and opening up ZEROP, NSET,
MEMBER, LISTP, CAR, CDR, UNION-AT-N, and AT, to four new goals:
Case 2.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH L J) 9))
(EQUAL (NTH G J) 4)),
which again simplifies, unfolding the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH L J) 10))
(EQUAL (NTH G J) 4)),
which again simplifies, opening up LG, LG-3-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH L J) 11))
(EQUAL (NTH G J) 4)),
which again simplifies, opening up the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH L J) 12))
(EQUAL (NTH G J) 4)),
which again simplifies, applying UN9-12-THEN-UN8-12 and CASE-K, and
expanding the definitions of LG, LG-3-AT-N, EQUAL, AT, MEMBER, UNION-AT-N,
and LG-AT-N, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N L J '(9 10 11 12)))
(AT G J 4)).
This simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and opening
up ZEROP, NSET, MEMBER, LISTP, CAR, CDR, UNION-AT-N, AT, LG, LG-3-AT-N, and
LG-AT-N, to the following four new formulas:
Case 1.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH L J) 9))
(EQUAL (NTH G J) 4)).
But this again simplifies, opening up LG, LG-3-AT-N, EQUAL, AT, and
LG-AT-N, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH L J) 10))
(EQUAL (NTH G J) 4)),
which again simplifies, opening up LG, LG-3-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH L J) 11))
(EQUAL (NTH G J) 4)),
which again simplifies, unfolding LG, LG-3-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH L J) 12))
(EQUAL (NTH G J) 4)),
which again simplifies, rewriting with UN9-12-THEN-UN8-12 and CASE-K, and
unfolding the definitions of LG, LG-3-AT-N, EQUAL, AT, MEMBER, UNION-AT-N,
and LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
IF4
(PROVE-LEMMA EX-LP8-12-NOT-IN-LP0
(REWRITE)
(IMPLIES (EXIST-UNION LP N '(8 9 10 11 12))
(NOT (AT LP
(EXIST-UNION LP N '(8 9 10 11 12))
0)))
((ENABLE EXIST-UNION UNION-AT-N AT)))
This formula can be simplified, using the abbreviations NOT, IMPLIES, and AT,
to:
(IMPLIES (EXIST-UNION LP N '(8 9 10 11 12))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
0))),
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 (ZEROP N) (p LP N))
(IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N LP N '(8 9 10 11 12)))
(p LP N))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(p LP (SUB1 N)))
(p LP N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
generates the following four new formulas:
Case 4. (IMPLIES (AND (ZEROP N)
(EXIST-UNION LP N '(8 9 10 11 12)))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
0))).
This simplifies, unfolding the functions ZEROP, EQUAL, and EXIST-UNION, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(UNION-AT-N LP N '(8 9 10 11 12))
(EXIST-UNION LP N '(8 9 10 11 12)))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
0))).
This simplifies, applying UN9-12-THEN-UN8-12, and opening up the functions
ZEROP, MEMBER, LISTP, CAR, CDR, UNION-AT-N, EXIST-UNION, and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(NOT (EXIST-UNION LP
(SUB1 N)
'(8 9 10 11 12)))
(EXIST-UNION LP N '(8 9 10 11 12)))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
0))),
which simplifies, unfolding the functions ZEROP, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, and EXIST-UNION, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (UNION-AT-N LP N '(8 9 10 11 12)))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP
(SUB1 N)
'(8 9 10 11 12)))
0))
(EXIST-UNION LP N '(8 9 10 11 12)))
(NOT (EQUAL (NTH LP
(EXIST-UNION LP N '(8 9 10 11 12)))
0))),
which simplifies, expanding the functions ZEROP, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, and EXIST-UNION, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
EX-LP8-12-NOT-IN-LP0
(PROVE-LEMMA K-IN-LP9-12-OR-LP8
(REWRITE)
(IMPLIES (AND (UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N LP K '(9 10 11 12))))
(AT LP K 8))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, AT,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER (NTH LP K) '(8 9 10 11 12))
(NOT (MEMBER (NTH LP K) '(9 10 11 12))))
(EQUAL (NTH LP K) 8)),
which simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-IN-LP9-12-OR-LP8
(PROVE-LEMMA UN57-THEN-UN5-12
(REWRITE)
(IMPLIES (UNION-AT-N L K '(5 7))
(UNION-AT-N L K
'(5 6 7 8 9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations IMPLIES and UNION-AT-N,
to the new formula:
(IMPLIES (MEMBER (NTH L K) '(5 7))
(MEMBER (NTH L K)
'(5 6 7 8 9 10 11 12))),
which simplifies, opening up the functions CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN57-THEN-UN5-12
(PROVE-LEMMA UN8-11-THEN-UN5-12
(REWRITE)
(IMPLIES (UNION-AT-N L K '(8 9 10 11))
(UNION-AT-N L K
'(5 6 7 8 9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations IMPLIES and UNION-AT-N,
to:
(IMPLIES (MEMBER (NTH L K) '(8 9 10 11))
(MEMBER (NTH L K)
'(5 6 7 8 9 10 11 12))),
which simplifies, unfolding CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN8-11-THEN-UN5-12
(PROVE-LEMMA UN8-12-THEN-UN5-12
(REWRITE)
(IMPLIES (UNION-AT-N L K '(8 9 10 11 12))
(UNION-AT-N L K
'(5 6 7 8 9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to:
(IMPLIES (MEMBER (NTH L K) '(8 9 10 11 12))
(MEMBER (NTH L K)
'(5 6 7 8 9 10 11 12))).
This simplifies, opening up CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN8-12-THEN-UN5-12
(PROVE-LEMMA UN10-11-THEN-UN10-12
(REWRITE)
(IMPLIES (UNION-AT-N L K '(10 11))
(UNION-AT-N L K '(10 11 12)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to:
(IMPLIES (MEMBER (NTH L K) '(10 11))
(MEMBER (NTH L K) '(10 11 12))).
This simplifies, expanding the definitions of CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN10-11-THEN-UN10-12
(PROVE-LEMMA IF1
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N G J '(0 1)))
(NOT (UNION-AT-N L J
'(5 6 7 8 9 10 11 12))))
((ENABLE NSET UNION-AT-N AT LG LG-AT-N LG-1-AT-N)))
WARNING: Note that IF1 contains the free variables G and N which will be
chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(MEMBER (NTH G J) '(0 1)))
(NOT (MEMBER (NTH L J)
'(5 6 7 8 9 10 11 12)))).
This simplifies, unfolding the definitions of CDR, CAR, LISTP, and MEMBER, to
the following 16 new conjectures:
Case 16.(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 5))).
Call the above conjecture *1.
Case 15.(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 6))),
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:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N G J '(0 1)))
(NOT (UNION-AT-N L J
'(5 6 7 8 9 10 11 12)))),
which we named *1 above. 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 (ZEROP N) (p L J G N))
(IMPLIES (AND (NOT (ZEROP N))
(p L J G (SUB1 N)))
(p L J G N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
generates the following three new formulas:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N G J '(0 1)))
(NOT (UNION-AT-N L J
'(5 6 7 8 9 10 11 12)))).
This simplifies, opening up ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N G J '(0 1)))
(NOT (UNION-AT-N L J
'(5 6 7 8 9 10 11 12)))).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding ZEROP,
NSET, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to 16 new conjectures:
Case 2.16.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 5))),
which again simplifies, opening up the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 2.15.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 6))),
which again simplifies, unfolding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.14.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 7))),
which again simplifies, opening up the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 2.13.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 8))),
which again simplifies, expanding the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 2.12.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 9))),
which again simplifies, opening up the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 2.11.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 10))),
which again simplifies, expanding LG, LG-1-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 2.10.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 11))),
which again simplifies, expanding the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 2.9.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 12))),
which again simplifies, opening up the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.8.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 5))),
which again simplifies, expanding LG, LG-1-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 2.7.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 6))),
which again simplifies, opening up the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.6.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 7))),
which again simplifies, unfolding the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 2.5.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 8))),
which again simplifies, opening up LG, LG-1-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 2.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 9))),
which again simplifies, opening up the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 10))),
which again simplifies, expanding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 11))),
which again simplifies, expanding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 12))),
which again simplifies, expanding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER J (NSET N))
(LG N L G)
(UNION-AT-N G J '(0 1)))
(NOT (UNION-AT-N L J
'(5 6 7 8 9 10 11 12)))),
which simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the
definitions of ZEROP, NSET, MEMBER, LISTP, CAR, CDR, UNION-AT-N, LG,
LG-1-AT-N, AT, EQUAL, and LG-AT-N, to the following 16 new formulas:
Case 1.16.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 5))).
However this again simplifies, opening up the functions LG, LG-1-AT-N,
EQUAL, AT, and LG-AT-N, to:
T.
Case 1.15.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 6))),
which again simplifies, unfolding the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1.14.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 7))),
which again simplifies, unfolding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.13.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 8))),
which again simplifies, opening up the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.12.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 9))),
which again simplifies, expanding LG, LG-1-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.11.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 10))),
which again simplifies, expanding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.10.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 11))),
which again simplifies, opening up the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1.9.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 0))
(NOT (EQUAL (NTH L J) 12))),
which again simplifies, opening up the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1.8.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 5))),
which again simplifies, unfolding LG, LG-1-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.7.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 6))),
which again simplifies, expanding LG, LG-1-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.6.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 7))),
which again simplifies, expanding LG, LG-1-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.5.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 8))),
which again simplifies, opening up the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 9))),
which again simplifies, expanding the functions LG, LG-1-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 10))),
which again simplifies, unfolding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 11))),
which again simplifies, expanding LG, LG-1-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(EQUAL (NTH G J) 1))
(NOT (EQUAL (NTH L J) 12))),
which again simplifies, expanding the definitions of LG, LG-1-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.1 ]
IF1
(PROVE-LEMMA UN5-7-THEN-UN5-11
(REWRITE)
(IMPLIES (UNION-AT-N L K '(5 6 7))
(UNION-AT-N L K '(5 6 7 8 9 10 11)))
((ENABLE UNION-AT-N AT NSET)))
This formula can be simplified, using the abbreviations IMPLIES and UNION-AT-N,
to the new formula:
(IMPLIES (MEMBER (NTH L K) '(5 6 7))
(MEMBER (NTH L K)
'(5 6 7 8 9 10 11))),
which simplifies, opening up the functions CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN5-7-THEN-UN5-11
(PROVE-LEMMA UN57-THEN-UN5-11
(REWRITE)
(IMPLIES (UNION-AT-N L K '(5 7))
(UNION-AT-N L K '(5 6 7 8 9 10 11)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to the goal:
(IMPLIES (MEMBER (NTH L K) '(5 7))
(MEMBER (NTH L K)
'(5 6 7 8 9 10 11))).
This simplifies, unfolding CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN57-THEN-UN5-11
(PROVE-LEMMA UN8-11-THEN-UN5-11
(REWRITE)
(IMPLIES (UNION-AT-N L K '(8 9 10 11))
(UNION-AT-N L K '(5 6 7 8 9 10 11)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to:
(IMPLIES (MEMBER (NTH L K) '(8 9 10 11))
(MEMBER (NTH L K)
'(5 6 7 8 9 10 11))).
This simplifies, opening up CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN8-11-THEN-UN5-11
(PROVE-LEMMA K-IN-LP5-7-OR-LP8-OR-LP9-12
(REWRITE)
(IMPLIES (AND (UNION-AT-N LP K
'(5 6 7 8 9 10 11 12))
(NOT (UNION-AT-N LP K '(5 6 7)))
(NOT (AT LP K 8)))
(UNION-AT-N LP K '(9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
AT, and UNION-AT-N, to:
(IMPLIES (AND (MEMBER (NTH LP K)
'(5 6 7 8 9 10 11 12))
(NOT (MEMBER (NTH LP K) '(5 6 7)))
(NOT (EQUAL (NTH LP K) 8)))
(MEMBER (NTH LP K) '(9 10 11 12))).
This simplifies, expanding the definitions of CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-IN-LP5-7-OR-LP8-OR-LP9-12
(PROVE-LEMMA UN5-11-THEN-UN5-12
(REWRITE)
(IMPLIES (UNION-AT-N L K '(5 6 7 8 9 10 11))
(UNION-AT-N L K
'(5 6 7 8 9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to the formula:
(IMPLIES (MEMBER (NTH L K) '(5 6 7 8 9 10 11))
(MEMBER (NTH L K)
'(5 6 7 8 9 10 11 12))).
This simplifies, unfolding the definitions of CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN5-11-THEN-UN5-12
(PROVE-LEMMA UN10-12-THEN-UN8-12
(REWRITE)
(IMPLIES (UNION-AT-N L I '(10 11 12))
(UNION-AT-N L I '(8 9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations IMPLIES and UNION-AT-N,
to the new conjecture:
(IMPLIES (MEMBER (NTH L I) '(10 11 12))
(MEMBER (NTH L I) '(8 9 10 11 12))),
which simplifies, expanding CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN10-12-THEN-UN8-12
(PROVE-LEMMA I-NOT-L10-12
(REWRITE)
(IMPLIES (AND (MEMBER I (NSET N))
(NOT (EXIST-UNION L N '(8 9 10 11 12))))
(NOT (UNION-AT-N L I '(10 11 12))))
((ENABLE EXIST-UNION UNION-AT-N AT NSET)))
WARNING: Note that I-NOT-L10-12 contains the free variable N which will be
chosen by instantiating the hypothesis (MEMBER I (NSET N)).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (MEMBER I (NSET N))
(NOT (EXIST-UNION L N '(8 9 10 11 12))))
(NOT (MEMBER (NTH L I) '(10 11 12)))),
which simplifies, applying UN9-12-THEN-UN8-12 and J-EX-L8-12, and opening up
the functions MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
I-NOT-L10-12
(PROVE-LEMMA UN5-11-EQ-UN58-OR-UN8-11
(REWRITE)
(IMPLIES (AND (UNION-AT-N L K '(5 6 7 8 9 10 11))
(NOT (UNION-AT-N L K '(5 6 7 8))))
(UNION-AT-N L K '(9 10 11)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER (NTH L K) '(5 6 7 8 9 10 11))
(NOT (MEMBER (NTH L K) '(5 6 7 8))))
(MEMBER (NTH L K) '(9 10 11))).
This simplifies, unfolding the definitions of CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN5-11-EQ-UN58-OR-UN8-11
(PROVE-LEMMA A3-IF4
(REWRITE)
(IMPLIES (AND (MEMBER K (NSET N))
(LG N L G)
(AT G K 4))
(NOT (UNION-AT-N L K '(5 6 7 8))))
((ENABLE NSET UNION-AT-N AT LG LG-AT-N LG-3-AT-N)))
WARNING: Note that A3-IF4 contains the free variables G and N which will be
chosen by instantiating the hypotheses (MEMBER K (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
UNION-AT-N, and AT, to the formula:
(IMPLIES (AND (MEMBER K (NSET N))
(LG N L G)
(EQUAL (NTH G K) 4))
(NOT (MEMBER (NTH L K) '(5 6 7 8)))).
This simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to the
following four new formulas:
Case 4. (IMPLIES (AND (MEMBER K (NSET N))
(LG N L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 5))).
Give the above formula the name *1.
Case 3. (IMPLIES (AND (MEMBER K (NSET N))
(LG N L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 6))),
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:
(IMPLIES (AND (MEMBER K (NSET N))
(LG N L G)
(AT G K 4))
(NOT (UNION-AT-N L K '(5 6 7 8)))),
which we named *1 above. We will appeal to induction. There are two
plausible inductions. However, they merge into one likely candidate induction.
We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p L K G N))
(IMPLIES (AND (NOT (ZEROP N))
(p L K G (SUB1 N)))
(p L K G N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER K (NSET N))
(LG N L G)
(AT G K 4))
(NOT (UNION-AT-N L K '(5 6 7 8)))).
This simplifies, expanding the functions ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER K (NSET (SUB1 N))))
(MEMBER K (NSET N))
(LG N L G)
(AT G K 4))
(NOT (UNION-AT-N L K '(5 6 7 8)))).
This simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and opening
up the definitions of ZEROP, NSET, MEMBER, AT, LISTP, CAR, CDR, and
UNION-AT-N, to the following four new conjectures:
Case 2.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(LG K L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 5))).
But this again simplifies, unfolding LG, LG-3-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 2.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(LG K L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 6))),
which again simplifies, unfolding the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(LG K L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 7))),
which again simplifies, unfolding the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(LG K L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 8))),
which again simplifies, opening up the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER K (NSET N))
(LG N L G)
(AT G K 4))
(NOT (UNION-AT-N L K '(5 6 7 8)))),
which simplifies, applying CDR-CONS and CAR-CONS, and unfolding ZEROP, NSET,
MEMBER, AT, LISTP, CAR, CDR, UNION-AT-N, LG, LG-3-AT-N, and LG-AT-N, to the
following four new conjectures:
Case 1.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL K N)
(LG K L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 5))).
However this again simplifies, expanding the functions LG, LG-3-AT-N,
EQUAL, AT, and LG-AT-N, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL K N)
(LG K L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 6))),
which again simplifies, opening up the functions LG, LG-3-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL K N)
(LG K L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 7))),
which again simplifies, expanding the functions LG, LG-3-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL K N)
(LG K L G)
(EQUAL (NTH G K) 4))
(NOT (EQUAL (NTH L K) 8))),
which again simplifies, expanding the functions LG, LG-3-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
A3-IF4
(PROVE-LEMMA K-IN-L5-11-G4-THEN-L9-11
(REWRITE)
(IMPLIES (AND (MEMBER K (NSET N))
(LG N L G)
(UNION-AT-N L K '(5 6 7 8 9 10 11))
(AT G K 4))
(UNION-AT-N L K '(9 10 11)))
((USE (A3-IF4))))
WARNING: Note that K-IN-L5-11-G4-THEN-L9-11 contains the free variables G and
N which will be chosen by instantiating the hypotheses (MEMBER K (NSET N)) and
(LG N L G).
This conjecture simplifies, applying A3-IF4 and UN5-11-EQ-UN58-OR-UN8-11, and
opening up the functions AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-IN-L5-11-G4-THEN-L9-11
(PROVE-LEMMA L12-THEN-UN8-12
(REWRITE)
(IMPLIES (AT L I 12)
(UNION-AT-N L I '(8 9 10 11 12)))
((ENABLE AT UNION-AT-N)))
This conjecture can be simplified, using the abbreviations IMPLIES, UNION-AT-N,
and AT, to:
(IMPLIES (EQUAL (NTH L I) 12)
(MEMBER (NTH L I) '(8 9 10 11 12))).
This simplifies, expanding the definition of MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
L12-THEN-UN8-12
(PROVE-LEMMA I-NOT-IN-L12
(REWRITE)
(IMPLIES (AND (MEMBER I (NSET N))
(NOT (EXIST-UNION L N '(8 9 10 11 12))))
(NOT (AT L I 12)))
((ENABLE EXIST-UNION NSET AT UNION-AT-N)))
WARNING: Note that I-NOT-IN-L12 contains the free variable N which will be
chosen by instantiating the hypothesis (MEMBER I (NSET N)).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (MEMBER I (NSET N))
(NOT (EXIST-UNION L N '(8 9 10 11 12))))
(NOT (EQUAL (NTH L I) 12))).
This simplifies, applying the lemmas L12-THEN-UN8-12 and J-EX-L8-12, and
opening up EQUAL and AT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
I-NOT-IN-L12
(PROVE-LEMMA L11-THEN-UN10-12
(REWRITE)
(IMPLIES (AT L K 11)
(UNION-AT-N L K '(10 11 12)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations IMPLIES, UNION-AT-N,
and AT, to the goal:
(IMPLIES (EQUAL (NTH L K) 11)
(MEMBER (NTH L K) '(10 11 12))).
This simplifies, opening up the definition of MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
L11-THEN-UN10-12
(PROVE-LEMMA IF3
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (UNION-AT-N G J '(2 3))))
(NOT (UNION-AT-N L J '(5 6 7 8))))
((ENABLE UNION-AT-N AT NSET LG LG-AT-N LG-2-AT-N)))
WARNING: Note that IF3 contains the free variables G and N which will be
chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (MEMBER (NTH G J) '(2 3))))
(NOT (MEMBER (NTH L J) '(5 6 7 8)))).
This simplifies, unfolding the definitions of CDR, CAR, LISTP, and MEMBER, to
the following four new conjectures:
Case 4. (IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 5))).
Call the above conjecture *1.
Case 3. (IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 6))),
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:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (UNION-AT-N G J '(2 3))))
(NOT (UNION-AT-N L J '(5 6 7 8)))).
We gave this the name *1 above. Perhaps we can prove it by induction. There
are two plausible inductions. However, they merge into one likely candidate
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p L J G N))
(IMPLIES (AND (NOT (ZEROP N))
(p L J G (SUB1 N)))
(p L J G N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme generates the following three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(LG N L G)
(NOT (UNION-AT-N G J '(2 3))))
(NOT (UNION-AT-N L J '(5 6 7 8)))).
This simplifies, expanding the functions ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(LG N L G)
(NOT (UNION-AT-N G J '(2 3))))
(NOT (UNION-AT-N L J '(5 6 7 8)))).
This simplifies, applying CDR-CONS and CAR-CONS, and expanding the
definitions of ZEROP, NSET, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to four
new goals:
Case 2.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 5))),
which again simplifies, expanding the functions LG, LG-2-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 6))),
which again simplifies, expanding the definitions of LG, LG-2-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 7))),
which again simplifies, unfolding the definitions of LG, LG-2-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(LG J L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 8))),
which again simplifies, applying K-IN-LP9-12-OR-LP8, and opening up the
functions LG, LG-2-AT-N, EQUAL, AT, UNION-AT-N, MEMBER, and LG-AT-N, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER J (NSET N))
(LG N L G)
(NOT (UNION-AT-N G J '(2 3))))
(NOT (UNION-AT-N L J '(5 6 7 8)))).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and opening up the
functions ZEROP, NSET, MEMBER, LISTP, CAR, CDR, UNION-AT-N, LG, LG-2-AT-N,
AT, EQUAL, and LG-AT-N, to four new formulas:
Case 1.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 5))),
which again simplifies, opening up the definitions of LG, LG-2-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 6))),
which again simplifies, unfolding LG, LG-2-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 7))),
which again simplifies, opening up the definitions of LG, LG-2-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(LG J L G)
(NOT (EQUAL (NTH G J) 2))
(NOT (EQUAL (NTH G J) 3)))
(NOT (EQUAL (NTH L J) 8))),
which again simplifies, applying the lemma K-IN-LP9-12-OR-LP8, and
unfolding LG, LG-2-AT-N, EQUAL, AT, UNION-AT-N, MEMBER, and LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.1 ]
IF3
(PROVE-LEMMA L5-12-EQ-L5-8-OR-L9-12
(REWRITE)
(IMPLIES (AND (UNION-AT-N L J '(5 6 7 8 9 10 11 12))
(NOT (UNION-AT-N L J '(5 6 7 8))))
(UNION-AT-N L J '(9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER (NTH L J)
'(5 6 7 8 9 10 11 12))
(NOT (MEMBER (NTH L J) '(5 6 7 8))))
(MEMBER (NTH L J) '(9 10 11 12))).
This simplifies, unfolding the definitions of CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
L5-12-EQ-L5-8-OR-L9-12
(PROVE-LEMMA L12-THEN-UN9-12
(REWRITE)
(IMPLIES (AT LP K 12)
(UNION-AT-N LP K '(9 10 11 12)))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations IMPLIES, UNION-AT-N,
and AT, to:
(IMPLIES (EQUAL (NTH LP K) 12)
(MEMBER (NTH LP K) '(9 10 11 12))),
which simplifies, unfolding the definition of MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
L12-THEN-UN9-12
(PROVE-LEMMA B1A-IF4
(REWRITE)
(IMPLIES (AND (MEMBER U (NSET N))
(LG N L G)
(AT G U 4))
(UNION-AT-N L U '(8 9 10 11 12)))
((ENABLE NSET UNION-AT-N AT LG LG-AT-N LG-3-AT-N)))
WARNING: Note that B1A-IF4 contains the free variables G and N which will be
chosen by instantiating the hypotheses (MEMBER U (NSET N)) and (LG N L G).
This formula can be simplified, using the abbreviations AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4))
(MEMBER (NTH L U) '(8 9 10 11 12))),
which simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to the
conjecture:
(IMPLIES (AND (MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4)
(NOT (EQUAL (NTH L U) 8))
(NOT (EQUAL (NTH L U) 9))
(NOT (EQUAL (NTH L U) 10))
(NOT (EQUAL (NTH L U) 11)))
(EQUAL (NTH L U) 12)).
Give the above formula the name *1.
We will appeal to induction. The recursive terms in the conjecture
suggest two inductions. However, they merge into one likely candidate
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p L U G N))
(IMPLIES (AND (NOT (ZEROP N))
(p L U G (SUB1 N)))
(p L U G N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme generates the following three new formulas:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4)
(NOT (EQUAL (NTH L U) 8))
(NOT (EQUAL (NTH L U) 9))
(NOT (EQUAL (NTH L U) 10))
(NOT (EQUAL (NTH L U) 11)))
(EQUAL (NTH L U) 12)).
This simplifies, opening up the definitions of ZEROP, NSET, LISTP, and
MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER U (NSET (SUB1 N))))
(MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4)
(NOT (EQUAL (NTH L U) 8))
(NOT (EQUAL (NTH L U) 9))
(NOT (EQUAL (NTH L U) 10))
(NOT (EQUAL (NTH L U) 11)))
(EQUAL (NTH L U) 12)).
This simplifies, applying CDR-CONS and CAR-CONS, and expanding ZEROP, NSET,
MEMBER, LG, LG-3-AT-N, AT, LG-AT-N, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4)
(NOT (EQUAL (NTH L U) 8))
(NOT (EQUAL (NTH L U) 9))
(NOT (EQUAL (NTH L U) 10))
(NOT (EQUAL (NTH L U) 11)))
(EQUAL (NTH L U) 12)),
which simplifies, rewriting with CDR-CONS and CAR-CONS, and opening up the
definitions of ZEROP, NSET, MEMBER, LG, LG-3-AT-N, AT, and LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
B1A-IF4
(PROVE-LEMMA LP9-12-THEN-K-IN-G34
(REWRITE)
(IMPLIES (AND (MEMBER K (NSET N))
(UNION-AT-N LP K '(9 10 11 12))
(LG N LP GP))
(UNION-AT-N GP K '(3 4)))
((ENABLE NSET AT UNION-AT-N LG LG-AT-N LG-3-AT-N)))
WARNING: Note that LP9-12-THEN-K-IN-G34 contains the free variables LP and N
which will be chosen by instantiating the hypotheses (MEMBER K (NSET N)) and:
(UNION-AT-N LP K '(9 10 11 12)).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
UNION-AT-N, to the formula:
(IMPLIES (AND (MEMBER K (NSET N))
(MEMBER (NTH LP K) '(9 10 11 12))
(LG N LP GP))
(MEMBER (NTH GP K) '(3 4))).
This simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to the
following four new formulas:
Case 4. (IMPLIES (AND (MEMBER K (NSET N))
(EQUAL (NTH LP K) 9)
(LG N LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)).
Give the above formula the name *1.
Case 3. (IMPLIES (AND (MEMBER K (NSET N))
(EQUAL (NTH LP K) 10)
(LG N LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)),
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:
(IMPLIES (AND (MEMBER K (NSET N))
(UNION-AT-N LP K '(9 10 11 12))
(LG N LP GP))
(UNION-AT-N GP K '(3 4))),
which we named *1 above. We will appeal to induction. There are two
plausible inductions. However, they merge into one likely candidate induction.
We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p GP K N LP))
(IMPLIES (AND (NOT (ZEROP N))
(p GP K (SUB1 N) LP))
(p GP K N LP))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER K (NSET N))
(UNION-AT-N LP K '(9 10 11 12))
(LG N LP GP))
(UNION-AT-N GP K '(3 4))).
This simplifies, expanding the functions ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER K (NSET (SUB1 N))))
(MEMBER K (NSET N))
(UNION-AT-N LP K '(9 10 11 12))
(LG N LP GP))
(UNION-AT-N GP K '(3 4))).
This simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and opening
up the definitions of ZEROP, NSET, MEMBER, LISTP, CAR, CDR, and UNION-AT-N,
to the following four new conjectures:
Case 2.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(EQUAL (NTH LP K) 9)
(LG K LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)).
But this again simplifies, unfolding LG, LG-3-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 2.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(EQUAL (NTH LP K) 10)
(LG K LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)),
which again simplifies, unfolding the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(EQUAL (NTH LP K) 11)
(LG K LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)),
which again simplifies, unfolding the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(EQUAL K N)
(EQUAL (NTH LP K) 12)
(LG K LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)),
which again simplifies, applying the lemmas L12-THEN-UN8-12 and CASE-K,
and unfolding LG, LG-3-AT-N, EQUAL, AT, UNION-AT-N, MEMBER, and LG-AT-N,
to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) LP GP))
(MEMBER K (NSET N))
(UNION-AT-N LP K '(9 10 11 12))
(LG N LP GP))
(UNION-AT-N GP K '(3 4))),
which simplifies, rewriting with CDR-CONS and CAR-CONS, and opening up the
definitions of ZEROP, NSET, MEMBER, LISTP, CAR, CDR, UNION-AT-N, LG,
LG-3-AT-N, AT, and LG-AT-N, to the following four new formulas:
Case 1.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) LP GP))
(EQUAL K N)
(EQUAL (NTH LP K) 9)
(LG K LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)).
This again simplifies, unfolding the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) LP GP))
(EQUAL K N)
(EQUAL (NTH LP K) 10)
(LG K LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)),
which again simplifies, expanding the definitions of LG, LG-3-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) LP GP))
(EQUAL K N)
(EQUAL (NTH LP K) 11)
(LG K LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)),
which again simplifies, opening up the functions LG, LG-3-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) LP GP))
(EQUAL K N)
(EQUAL (NTH LP K) 12)
(LG K LP GP)
(NOT (EQUAL (NTH GP K) 3)))
(EQUAL (NTH GP K) 4)),
which again simplifies, applying L12-THEN-UN8-12 and CASE-K, and expanding
LG, LG-3-AT-N, EQUAL, AT, UNION-AT-N, MEMBER, and LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.3 0.0 ]
LP9-12-THEN-K-IN-G34
(PROVE-LEMMA UN8-12-THEN-L8-OR-L9-12
(REWRITE)
(IMPLIES (AND (UNION-AT-N LP K '(8 9 10 11 12))
(NOT (AT LP K 8)))
(UNION-AT-N LP K '(9 10 11 12)))
((ENABLE AT UNION-AT-N)))
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, AT,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER (NTH LP K) '(8 9 10 11 12))
(NOT (EQUAL (NTH LP K) 8)))
(MEMBER (NTH LP K) '(9 10 11 12))),
which simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN8-12-THEN-L8-OR-L9-12
(DEFN MOLWS
(N L G H)
(AND (NUMBERP N)
(LISTP L)
(LISTP G)
(LISTP H)
(EQUAL (LENGTH L) N)
(EQUAL (LENGTH G) N)
(EQUAL (LENGTH H) N)
(ALL-UNION L N
'(0 1 2 3 4 5 6 7 8 9 10 11 12))
(ALL-UNION G N '(0 1 2 3 4))
(ALL-UNION H N (NSET (ADD1 N)))))
Observe that (OR (FALSEP (MOLWS N L G H)) (TRUEP (MOLWS N L G H))) is a
theorem.
[ 0.0 0.0 0.0 ]
MOLWS
(DISABLE MOLWS)
[ 0.0 0.0 0.0 ]
MOLWS-OFF
(DEFN MRHOI0
(N I L G H LP GP HP)
(AND (AT L I 0)
(EQUAL GP G)
(EQUAL LP (MOVE L I 1))
(EQUAL HP H)))
WARNING: N is in the arglist but not in the body of the definition of MRHOI0.
From the definition we can conclude that:
(OR (FALSEP (MRHOI0 N I L G H LP GP HP))
(TRUEP (MRHOI0 N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI0
(DEFN MRHOI1A
(N I L G H LP GP HP)
(AND (AT L I 1)
(EQUAL GP G)
(EQUAL LP (MOVE L I 2))
(EQUAL HP H)))
WARNING: N is in the arglist but not in the body of the definition of MRHOI1A.
From the definition we can conclude that:
(OR (FALSEP (MRHOI1A N I L G H LP GP HP))
(TRUEP (MRHOI1A N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI1A
(DEFN MRHOI1B
(N I L G H LP GP HP)
(AND (AT L I 1)
(EQUAL GP G)
(EQUAL LP L)
(EQUAL HP H)))
WARNING: N is in the arglist but not in the body of the definition of MRHOI1B.
Note that:
(OR (FALSEP (MRHOI1B N I L G H LP GP HP))
(TRUEP (MRHOI1B N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI1B
(DEFN MRHOI2
(N I L G H LP GP HP)
(AND (AT L I 2)
(EQUAL LP (MOVE L I 3))
(EQUAL GP (MOVE G I 1))
(EQUAL HP (MOVE H I 1))))
WARNING: N is in the arglist but not in the body of the definition of MRHOI2.
Observe that:
(OR (FALSEP (MRHOI2 N I L G H LP GP HP))
(TRUEP (MRHOI2 N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI2
(DEFN MRHOI3A
(N I L G H LP GP HP)
(AND (AT L I 3)
(EQUAL GP G)
(EQUAL HP H)
(AT H I (ADD1 N))
(EQUAL LP (MOVE L I 4))))
Observe that:
(OR (FALSEP (MRHOI3A N I L G H LP GP HP))
(TRUEP (MRHOI3A N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI3A
(DEFN MRHOI3B
(N I L G H LP GP HP)
(AND (AT L I 3)
(EQUAL GP G)
(EQUAL LP L)
(LESSP (NTH H I) (ADD1 N))
(EQUAL HP (MOVE H I (ADD1 (NTH H I))))
(UNION-AT-N G (NTH H I) '(0 1 2))))
Observe that:
(OR (FALSEP (MRHOI3B N I L G H LP GP HP))
(TRUEP (MRHOI3B N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI3B
(DEFN MRHOI4
(N I L G H LP GP HP)
(AND (AT L I 4)
(EQUAL GP (MOVE G I 3))
(EQUAL LP (MOVE L I 5))
(EQUAL HP (MOVE H I 1))))
WARNING: N is in the arglist but not in the body of the definition of MRHOI4.
Observe that:
(OR (FALSEP (MRHOI4 N I L G H LP GP HP))
(TRUEP (MRHOI4 N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI4
(DEFN MRHOI5A
(N I L G H LP GP HP)
(AND (AT L I 5)
(EQUAL GP G)
(EQUAL HP H)
(AT H I (ADD1 N))
(EQUAL LP (MOVE L I 8))))
Observe that:
(OR (FALSEP (MRHOI5A N I L G H LP GP HP))
(TRUEP (MRHOI5A N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI5A
(DEFN MRHOI5B
(N I L G H LP GP HP)
(AND (AT L I 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (NTH H I) (ADD1 N))
(AT G (NTH H I) 1)
(EQUAL LP (MOVE L I 6))))
Observe that:
(OR (FALSEP (MRHOI5B N I L G H LP GP HP))
(TRUEP (MRHOI5B N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI5B
(DEFN MRHOI5C
(N I L G H LP GP HP)
(AND (AT L I 5)
(EQUAL GP G)
(EQUAL LP L)
(LESSP (NTH H I) (ADD1 N))
(NOT (AT G (NTH H I) 1))
(EQUAL HP
(MOVE H I (ADD1 (NTH H I))))))
From the definition we can conclude that:
(OR (FALSEP (MRHOI5C N I L G H LP GP HP))
(TRUEP (MRHOI5C N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI5C
(DEFN MRHOI6
(N I L G H LP GP HP)
(AND (AT L I 6)
(EQUAL GP (MOVE G I 2))
(EQUAL LP (MOVE L I 7))
(EQUAL HP (MOVE H I 1))))
WARNING: N is in the arglist but not in the body of the definition of MRHOI6.
Observe that:
(OR (FALSEP (MRHOI6 N I L G H LP GP HP))
(TRUEP (MRHOI6 N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI6
(DEFN MRHOI7A
(N I L G H LP GP HP)
(AND (AT L I 7)
(EQUAL LP (MOVE L I 8))
(AT G (NTH H I) 4)
(EQUAL GP G)
(EQUAL HP H)))
WARNING: N is in the arglist but not in the body of the definition of MRHOI7A.
Observe that:
(OR (FALSEP (MRHOI7A N I L G H LP GP HP))
(TRUEP (MRHOI7A N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI7A
(DEFN MRHOI7B
(N I L G H LP GP HP)
(AND (AT L I 7)
(NOT (AT G (NTH H I) 4))
(EQUAL LP L)
(EQUAL GP G)
(EQUAL HP
(MOVE H I
(ADD1 (REMAINDER (SUB1 (NTH H I)) N))))))
From the definition we can conclude that:
(OR (FALSEP (MRHOI7B N I L G H LP GP HP))
(TRUEP (MRHOI7B N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI7B
(DEFN MRHOI8
(N I L G H LP GP HP)
(AND (AT L I 8)
(EQUAL GP (MOVE G I 4))
(EQUAL LP (MOVE L I 9))
(EQUAL HP (MOVE H I 1))))
WARNING: N is in the arglist but not in the body of the definition of MRHOI8.
Observe that:
(OR (FALSEP (MRHOI8 N I L G H LP GP HP))
(TRUEP (MRHOI8 N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI8
(DEFN MRHOI9A
(N I L G H LP GP HP)
(AND (AT L I 9)
(AT H I I)
(EQUAL LP (MOVE L I 10))
(EQUAL GP G)
(EQUAL HP H)))
WARNING: N is in the arglist but not in the body of the definition of MRHOI9A.
Observe that:
(OR (FALSEP (MRHOI9A N I L G H LP GP HP))
(TRUEP (MRHOI9A N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI9A
(DEFN MRHOI9B
(N I L G H LP GP HP)
(AND (AT L I 9)
(LESSP (NTH H I) I)
(UNION-AT-N G (NTH H I) '(0 1))
(EQUAL HP (MOVE H I (ADD1 (NTH H I))))
(EQUAL GP G)
(EQUAL LP L)))
WARNING: N is in the arglist but not in the body of the definition of MRHOI9B.
Observe that:
(OR (FALSEP (MRHOI9B N I L G H LP GP HP))
(TRUEP (MRHOI9B N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI9B
(DEFN MRHOI10
(N I L G H LP GP HP)
(AND (AT L I 10)
(EQUAL LP (MOVE L I 11))
(EQUAL GP G)
(EQUAL HP (MOVE H I (ADD1 I)))))
WARNING: N is in the arglist but not in the body of the definition of MRHOI10.
From the definition we can conclude that:
(OR (FALSEP (MRHOI10 N I L G H LP GP HP))
(TRUEP (MRHOI10 N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI10
(DEFN MRHOI11A
(N I L G H LP GP HP)
(AND (AT L I 11)
(AT H I (ADD1 N))
(EQUAL LP (MOVE L I 12))
(EQUAL GP G)
(EQUAL HP H)))
Observe that:
(OR (FALSEP (MRHOI11A N I L G H LP GP HP))
(TRUEP (MRHOI11A N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI11A
(DEFN MRHOI11B
(N I L G H LP GP HP)
(AND (AT L I 11)
(LESSP (NTH H I) (ADD1 N))
(NOT (UNION-AT-N G (NTH H I) '(2 3)))
(EQUAL HP (MOVE H I (ADD1 (NTH H I))))
(EQUAL GP G)
(EQUAL LP L)))
Note that:
(OR (FALSEP (MRHOI11B N I L G H LP GP HP))
(TRUEP (MRHOI11B N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI11B
(DEFN MRHOI12
(N I L G H LP GP HP)
(AND (AT L I 12)
(EQUAL HP H)
(EQUAL GP (MOVE G I 0))
(EQUAL LP (MOVE L I 0))))
WARNING: N is in the arglist but not in the body of the definition of MRHOI12.
From the definition we can conclude that:
(OR (FALSEP (MRHOI12 N I L G H LP GP HP))
(TRUEP (MRHOI12 N I L G H LP GP HP)))
is a theorem.
[ 0.0 0.0 0.0 ]
MRHOI12
(DEFN MRHOI
(N I L G H LP GP HP)
(OR (MRHOI0 N I L G H LP GP HP)
(MRHOI1A N I L G H LP GP HP)
(MRHOI1B N I L G H LP GP HP)
(MRHOI2 N I L G H LP GP HP)
(MRHOI3A N I L G H LP GP HP)
(MRHOI3B N I L G H LP GP HP)
(MRHOI4 N I L G H LP GP HP)
(MRHOI5A N I L G H LP GP HP)
(MRHOI5B N I L G H LP GP HP)
(MRHOI5C N I L G H LP GP HP)
(MRHOI6 N I L G H LP GP HP)
(MRHOI7A N I L G H LP GP HP)
(MRHOI7B N I L G H LP GP HP)
(MRHOI8 N I L G H LP GP HP)
(MRHOI9A N I L G H LP GP HP)
(MRHOI9B N I L G H LP GP HP)
(MRHOI10 N I L G H LP GP HP)
(MRHOI11A N I L G H LP GP HP)
(MRHOI11B N I L G H LP GP HP)
(MRHOI12 N I L G H LP GP HP)))
Observe that:
(OR (FALSEP (MRHOI N I L G H LP GP HP))
(TRUEP (MRHOI N I L G H LP GP HP)))
is a theorem.
[ 0.1 0.0 0.0 ]
MRHOI
(DISABLE MRHOI)
[ 0.0 0.0 0.0 ]
MRHOI-OFF
(DEFN B0A
(N L H I J)
(IMPLIES (AND (AT L I 5) (LESSP J (NTH H I)))
(NOT (AT L J 4))))
WARNING: N is in the arglist but not in the body of the definition of B0A.
Observe that (OR (FALSEP (B0A N L H I J)) (TRUEP (B0A N L H I J))) is a
theorem.
[ 0.0 0.0 0.0 ]
B0A
(DISABLE B0A)
[ 0.0 0.0 0.0 ]
B0A-OFF
(DEFN B0B
(N L H I J)
(IMPLIES (AND (AT L I 5)
(LESSP J (NTH H I))
(AT L J 3))
(NOT (LESSP I (NTH H J)))))
WARNING: N is in the arglist but not in the body of the definition of B0B.
Note that (OR (FALSEP (B0B N L H I J)) (TRUEP (B0B N L H I J))) is a
theorem.
[ 0.0 0.0 0.0 ]
B0B
(DISABLE B0B)
[ 0.0 0.0 0.0 ]
B0B-OFF
(DEFN B1A
(L I J)
(IMPLIES (UNION-AT-N L I '(8 9 10 11 12))
(NOT (AT L J 4))))
Observe that (OR (FALSEP (B1A L I J)) (TRUEP (B1A L I J))) is a theorem.
[ 0.0 0.0 0.0 ]
B1A
(DISABLE B1A)
[ 0.0 0.0 0.0 ]
B1A-OFF
(DEFN HINT-8-12-3-4-AT-N
(N L G H J)
(AND (INTERSECT-8-12-3-4-AT-N N L G)
(NOT (LESSP N (NTH H J)))))
Note that:
(OR (FALSEP (HINT-8-12-3-4-AT-N N L G H J))
(TRUEP (HINT-8-12-3-4-AT-N N L G H J)))
is a theorem.
[ 0.0 0.0 0.0 ]
HINT-8-12-3-4-AT-N
(DISABLE HINT-8-12-3-4-AT-N)
[ 0.0 0.0 0.0 ]
HINT-8-12-3-4-AT-N-OFF
(DEFN EXIST-HINT-8-12-3-4
(N L G H J)
(IF (ZEROP N)
F
(IF (HINT-8-12-3-4-AT-N N L G H J)
N
(EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))))
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each recursive call. Hence, EXIST-HINT-8-12-3-4 is accepted
under the principle of definition. From the definition we can conclude that:
(OR (FALSEP (EXIST-HINT-8-12-3-4 N L G H J))
(NUMBERP (EXIST-HINT-8-12-3-4 N L G H J)))
is a theorem.
[ 0.0 0.0 0.0 ]
EXIST-HINT-8-12-3-4
(DISABLE EXIST-HINT-8-12-3-4)
[ 0.0 0.0 0.0 ]
EXIST-HINT-8-12-3-4-OFF
(DEFN B1B
(N L G H I J)
(IMPLIES (AND (UNION-AT-N L I '(8 9 10 11 12))
(AT L J 3))
(EXIST-HINT-8-12-3-4 N L G H J)))
From the definition we can conclude that:
(OR (FALSEP (B1B N L G H I J))
(TRUEP (B1B N L G H I J)))
is a theorem.
[ 0.0 0.0 0.0 ]
B1B
(DISABLE B1B)
[ 0.0 0.0 0.0 ]
B1B-OFF
(DEFN B1C
(N L G H I)
(IMPLIES (AND (UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(AND (MEMBER (NTH H I) (NSET N))
(AT G (NTH H I) 4))))
From the definition we can conclude that:
(OR (FALSEP (B1C N L G H I))
(TRUEP (B1C N L G H I)))
is a theorem.
[ 0.0 0.0 0.0 ]
B1C
(DISABLE B1C)
[ 0.0 0.0 0.0 ]
B1C-OFF
(DEFN B1D
(N L H I)
(IMPLIES (AT L I 7)
(MEMBER (NTH H I) (NSET N))))
From the definition we can conclude that:
(OR (FALSEP (B1D N L H I))
(TRUEP (B1D N L H I)))
is a theorem.
[ 0.0 0.0 0.0 ]
B1D
(DISABLE B1D)
[ 0.0 0.0 0.0 ]
B1D-OFF
(DEFN B2A
(L I J)
(IMPLIES (AND (LESSP J I)
(UNION-AT-N L I '(10 11 12)))
(NOT (UNION-AT-N L J
'(5 6 7 8 9 10 11 12)))))
Note that (OR (FALSEP (B2A L I J)) (TRUEP (B2A L I J))) is a theorem.
[ 0.0 0.0 0.0 ]
B2A
(DISABLE B2A)
[ 0.0 0.0 0.0 ]
B2A-OFF
(DEFN B2B
(L H I J)
(IMPLIES (AND (LESSP J I)
(AT L I 9)
(LESSP J (NTH H I)))
(NOT (UNION-AT-N L J
'(5 6 7 8 9 10 11 12)))))
From the definition we can conclude that:
(OR (FALSEP (B2B L H I J))
(TRUEP (B2B L H I J)))
is a theorem.
[ 0.0 0.0 0.0 ]
B2B
(DISABLE B2B)
[ 0.0 0.0 0.0 ]
B2B-OFF
(DEFN B3A
(L G I J)
(IMPLIES (AND (AT L I 12)
(UNION-AT-N L J
'(5 6 7 8 9 10 11 12)))
(AT G J 4)))
Observe that (OR (FALSEP (B3A L G I J)) (TRUEP (B3A L G I J))) is a
theorem.
[ 0.0 0.0 0.0 ]
B3A
(DISABLE B3A)
[ 0.0 0.0 0.0 ]
B3A-OFF
(DEFN B3B
(L G H I J)
(IMPLIES (AND (AT L I 11)
(LESSP J (NTH H I))
(UNION-AT-N L J
'(5 6 7 8 9 10 11 12)))
(AT G J 4)))
From the definition we can conclude that:
(OR (FALSEP (B3B L G H I J))
(TRUEP (B3B L G H I J)))
is a theorem.
[ 0.0 0.0 0.0 ]
B3B
(DISABLE B3B)
[ 0.0 0.0 0.0 ]
B3B-OFF
(PROVE-LEMMA HINT-MEMBER
(REWRITE)
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H J)
(MEMBER (EXIST-HINT-8-12-3-4 N L G H J)
(NSET N)))
((ENABLE NSET EXIST-HINT-8-12-3-4 HINT-8-12-3-4-AT-N)))
Give the conjecture the name *1.
Let us appeal to the induction principle. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L G H J))
(IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N L G H J))
(p N L G H J))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(p (SUB1 N) L G H J))
(p N L G H J))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme generates the following four new conjectures:
Case 4. (IMPLIES (AND (ZEROP N)
(EXIST-HINT-8-12-3-4 N L G H J))
(MEMBER (EXIST-HINT-8-12-3-4 N L G H J)
(NSET N))).
This simplifies, opening up the functions ZEROP, EQUAL, and
EXIST-HINT-8-12-3-4, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N L G H J)
(EXIST-HINT-8-12-3-4 N L G H J))
(MEMBER (EXIST-HINT-8-12-3-4 N L G H J)
(NSET N))).
This simplifies, rewriting with CAR-CONS, and opening up the definitions of
ZEROP, HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, NSET, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(NOT (EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))
(EXIST-HINT-8-12-3-4 N L G H J))
(MEMBER (EXIST-HINT-8-12-3-4 N L G H J)
(NSET N))),
which simplifies, unfolding the functions ZEROP, HINT-8-12-3-4-AT-N, and
EXIST-HINT-8-12-3-4, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(MEMBER (EXIST-HINT-8-12-3-4 (SUB1 N) L G H J)
(NSET (SUB1 N)))
(EXIST-HINT-8-12-3-4 N L G H J))
(MEMBER (EXIST-HINT-8-12-3-4 N L G H J)
(NSET N))),
which simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the
functions ZEROP, HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, NSET, and MEMBER,
to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.3 0.0 ]
HINT-MEMBER
(PROVE-LEMMA N-NOT-LESS-J
(REWRITE)
(IMPLIES (LESSP N J)
(NOT (MEMBER J (NSET N))))
((ENABLE NSET)))
Name the conjecture *1.
We will appeal to induction. The recursive terms in the conjecture
suggest three inductions. However, they merge into one likely candidate
induction. We will induct according to the following scheme:
(AND (IMPLIES (OR (EQUAL J 0) (NOT (NUMBERP J)))
(p J N))
(IMPLIES (AND (NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(OR (EQUAL N 0) (NOT (NUMBERP N))))
(p J N))
(IMPLIES (AND (NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(NOT (OR (EQUAL N 0) (NOT (NUMBERP N))))
(p (SUB1 J) (SUB1 N)))
(p J N))).
Linear arithmetic, the lemmas SUB1-LESSEQP and SUB1-LESSP, and the definitions
of OR and NOT inform us that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. Note,
however, the inductive instance chosen for J. The above induction scheme
produces the following four new formulas:
Case 4. (IMPLIES (AND (OR (EQUAL J 0) (NOT (NUMBERP J)))
(LESSP N J))
(NOT (MEMBER J (NSET N)))).
This simplifies, applying NSET-NUMBER, and expanding NOT, OR, EQUAL, and
LESSP, to:
T.
Case 3. (IMPLIES (AND (NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(OR (EQUAL N 0) (NOT (NUMBERP N)))
(LESSP N J))
(NOT (MEMBER J (NSET N)))),
which simplifies, applying NSET-NUMBER, and expanding the functions NOT, OR,
EQUAL, LESSP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(NOT (OR (EQUAL N 0) (NOT (NUMBERP N))))
(NOT (LESSP (SUB1 N) (SUB1 J)))
(LESSP N J))
(NOT (MEMBER J (NSET N)))).
This simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP N 1)
(NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(NOT (OR (EQUAL N 0) (NOT (NUMBERP N))))
(NOT (LESSP (SUB1 N) (SUB1 J)))
(LESSP N J))
(NOT (MEMBER J (NSET N)))),
which again simplifies, applying the lemma NSET-NUMBER, and opening up SUB1,
NUMBERP, EQUAL, LESSP, NOT, and OR, to:
T.
Case 1. (IMPLIES (AND (NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(NOT (OR (EQUAL N 0) (NOT (NUMBERP N))))
(NOT (MEMBER (SUB1 J) (NSET (SUB1 N))))
(LESSP N J))
(NOT (MEMBER J (NSET N)))),
which simplifies, rewriting with NSET-NUMBER, CDR-CONS, and CAR-CONS, and
opening up NOT, OR, LESSP, NSET, and MEMBER, to the following two new
formulas:
Case 1.2.
(IMPLIES (AND (NOT (EQUAL J 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER (SUB1 J) (NSET (SUB1 N))))
(LESSP (SUB1 N) (SUB1 J)))
(NOT (EQUAL J N))).
This again simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL J 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER (SUB1 J) (NSET (SUB1 N))))
(LESSP (SUB1 N) (SUB1 J)))
(NOT (MEMBER J (NSET (SUB1 N))))),
which again simplifies, using linear arithmetic and applying ADD1-SUB1,
NSET-NUMBER, and ADD1-NSET, to the new goal:
(IMPLIES (AND (NOT (EQUAL J 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP J 1)
(NOT (MEMBER (SUB1 J) (NSET (SUB1 N))))
(LESSP (SUB1 N) (SUB1 J)))
(NOT (MEMBER J (NSET (SUB1 N))))),
which again simplifies, using linear arithmetic, to the conjecture:
(IMPLIES (AND (NOT (NUMBERP J))
(NOT (EQUAL J 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(LESSP J 1)
(NOT (MEMBER (SUB1 J) (NSET (SUB1 N))))
(LESSP (SUB1 N) (SUB1 J)))
(NOT (MEMBER J (NSET (SUB1 N))))).
However this again simplifies, appealing to the lemma NSET-NUMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
N-NOT-LESS-J
(PROVE-LEMMA MOLWS-NUM-N
(REWRITE)
(IMPLIES (MOLWS N L G H) (NUMBERP N))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-NUM-N contains the free variables H, G, and L which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations MOLWS and IMPLIES,
to:
T.
This simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-NUM-N
(PROVE-LEMMA MOLWS-LIST-L
(REWRITE)
(IMPLIES (MOLWS N L G H) (LISTP L))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-LIST-L contains the free variables H, G, and N which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations MOLWS and IMPLIES,
to:
T.
This simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-LIST-L
(PROVE-LEMMA MOLWS-LIST-G
(REWRITE)
(IMPLIES (MOLWS N L G H) (LISTP G))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-LIST-G contains the free variables H, L, and N which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations MOLWS and IMPLIES,
to:
T.
This simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-LIST-G
(PROVE-LEMMA MOLWS-LIST-H
(REWRITE)
(IMPLIES (MOLWS N L G H) (LISTP H))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-LIST-H contains the free variables G, L, and N which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations MOLWS and IMPLIES,
to:
T.
This simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-LIST-H
(PROVE-LEMMA MOLWS-LN-L
(REWRITE)
(IMPLIES (MOLWS N L G H)
(EQUAL (LENGTH L) N))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-LN-L contains the free variables H, G, and N which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This formula can be simplified, using the abbreviations MOLWS and IMPLIES, to:
T,
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-LN-L
(PROVE-LEMMA MOLWS-LN-G
(REWRITE)
(IMPLIES (MOLWS N L G H)
(EQUAL (LENGTH G) N))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-LN-G contains the free variables H, L, and N which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This formula can be simplified, using the abbreviations MOLWS and IMPLIES, to:
T,
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-LN-G
(PROVE-LEMMA MOLWS-LN-H
(REWRITE)
(IMPLIES (MOLWS N L G H)
(EQUAL (LENGTH H) N))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-LN-H contains the free variables G, L, and N which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This formula can be simplified, using the abbreviations MOLWS and IMPLIES, to:
T,
which simplifies, trivially, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-LN-H
(PROVE-LEMMA MOLWS-LN-LP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP))
(LISTP LP))
((ENABLE MRHOI)))
WARNING: Note that MOLWS-LN-LP contains the free variables HP, GP, K, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with the lemmas SUB1-ADD1, MOLWS-NUM-N,
and MOLWS-LIST-L, and unfolding the functions MRHOI12, MRHOI11B, MRHOI11A,
MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B,
MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0,
and MRHOI, to 16 new formulas:
Case 16.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(LISTP LP)),
which again simplifies, rewriting with MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 15.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(LISTP LP)).
But this again simplifies, rewriting with MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(LISTP LP)).
But this again simplifies, rewriting with MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 3)
(EQUAL GP G)
(EQUAL HP H)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(LISTP LP)).
However this again simplifies, rewriting with MOLWS-LIST-L and MOVE-IS-LIST,
to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(LISTP LP)).
This again simplifies, rewriting with MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(LISTP LP)).
But this again simplifies, rewriting with the lemmas MOLWS-LIST-L and
MOVE-IS-LIST, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(AT G (NTH H K) 1)
(EQUAL LP (MOVE L K 6)))
(LISTP LP)),
which again simplifies, rewriting with the lemmas MOLWS-LIST-L and
MOVE-IS-LIST, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(NOT (NUMBERP (NTH H K)))
(AT G (NTH H K) 1)
(EQUAL LP (MOVE L K 6)))
(LISTP LP)),
which again simplifies, applying MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(AT G (NTH H K) 1)
(EQUAL LP (MOVE L K 6)))
(LISTP LP)).
However this again simplifies, applying the lemmas MOLWS-LIST-L and
MOVE-IS-LIST, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(LISTP LP)),
which again simplifies, rewriting with MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 7)
(EQUAL LP (MOVE L K 8))
(AT G (NTH H K) 4)
(EQUAL GP G)
(EQUAL HP H))
(LISTP LP)).
However this again simplifies, applying MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(LISTP LP)).
However this again simplifies, applying MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 9)
(AT H K K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(LISTP LP)).
This again simplifies, applying MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(LISTP LP)).
But this again simplifies, rewriting with MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 11)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(LISTP LP)).
This again simplifies, rewriting with MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(LISTP LP)).
This again simplifies, applying MOLWS-LIST-L and MOVE-IS-LIST, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
MOLWS-LN-LP
(PROVE-LEMMA MOLWS-LN-GP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP))
(LISTP GP))
((ENABLE MRHOI)))
WARNING: Note that MOLWS-LN-GP contains the free variables HP, LP, K, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with the lemmas SUB1-ADD1, MOLWS-NUM-N,
and MOLWS-LIST-G, and unfolding the functions MRHOI12, MRHOI11B, MRHOI11A,
MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B,
MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0,
and MRHOI, to five new formulas:
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(LISTP GP)),
which again simplifies, rewriting with MOLWS-LIST-G and MOVE-IS-LIST, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(LISTP GP)).
But this again simplifies, rewriting with MOLWS-LIST-G and MOVE-IS-LIST, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(LISTP GP)).
But this again simplifies, rewriting with MOLWS-LIST-G and MOVE-IS-LIST, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(LISTP GP)).
However this again simplifies, rewriting with MOLWS-LIST-G and MOVE-IS-LIST,
to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(LISTP GP)).
This again simplifies, rewriting with MOLWS-LIST-G and MOVE-IS-LIST, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
MOLWS-LN-GP
(PROVE-LEMMA MOLWS-LN-HP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP))
(LISTP HP))
((ENABLE MRHOI)))
WARNING: Note that MOLWS-LN-HP contains the free variables GP, LP, K, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with the lemmas SUB1-ADD1, MOLWS-NUM-N,
and MOLWS-LIST-H, and unfolding the functions MRHOI12, MRHOI11B, MRHOI11A,
MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B,
MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0,
and MRHOI, to 16 new formulas:
Case 16.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(LISTP HP)),
which again simplifies, rewriting with MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 15.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 3)
(EQUAL GP G)
(EQUAL LP L)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2)))
(LISTP HP)).
But this again simplifies, rewriting with MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 3)
(EQUAL GP G)
(EQUAL LP L)
(NOT (NUMBERP (NTH H K)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2)))
(LISTP HP)).
But this again simplifies, rewriting with SUB1-TYPE-RESTRICTION,
MOLWS-LIST-H, and MOVE-IS-LIST, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 3)
(EQUAL GP G)
(EQUAL LP L)
(EQUAL (NTH H K) 0)
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2)))
(LISTP HP)).
However this again simplifies, rewriting with MOLWS-LIST-H and MOVE-IS-LIST,
to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(LISTP HP)).
This again simplifies, rewriting with MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL LP L)
(LESSP (SUB1 (NTH H K)) N)
(NOT (AT G (NTH H K) 1))
(EQUAL HP
(MOVE H K (ADD1 (NTH H K)))))
(LISTP HP)).
But this again simplifies, rewriting with the lemmas MOLWS-LIST-H and
MOVE-IS-LIST, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL LP L)
(NOT (NUMBERP (NTH H K)))
(NOT (AT G (NTH H K) 1))
(EQUAL HP
(MOVE H K (ADD1 (NTH H K)))))
(LISTP HP)),
which again simplifies, rewriting with the lemmas SUB1-TYPE-RESTRICTION,
MOLWS-LIST-H, and MOVE-IS-LIST, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL LP L)
(EQUAL (NTH H K) 0)
(NOT (AT G (NTH H K) 1))
(EQUAL HP
(MOVE H K (ADD1 (NTH H K)))))
(LISTP HP)),
which again simplifies, applying MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(LISTP HP)).
However this again simplifies, applying the lemmas MOLWS-LIST-H and
MOVE-IS-LIST, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 7)
(NOT (AT G (NTH H K) 4))
(EQUAL LP L)
(EQUAL GP G)
(EQUAL HP
(MOVE H K
(ADD1 (REMAINDER (SUB1 (NTH H K)) N)))))
(LISTP HP)),
which again simplifies, rewriting with MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(LISTP HP)).
However this again simplifies, applying MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 9)
(LESSP (NTH H K) K)
(UNION-AT-N G (NTH H K) '(0 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L))
(LISTP HP)).
However this again simplifies, applying MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(LISTP HP)).
This again simplifies, applying MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 11)
(LESSP (SUB1 (NTH H K)) N)
(NOT (UNION-AT-N G (NTH H K) '(2 3)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L))
(LISTP HP)).
But this again simplifies, rewriting with MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 11)
(NOT (NUMBERP (NTH H K)))
(NOT (UNION-AT-N G (NTH H K) '(2 3)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L))
(LISTP HP)).
This again simplifies, rewriting with SUB1-TYPE-RESTRICTION, MOLWS-LIST-H,
and MOVE-IS-LIST, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 11)
(EQUAL (NTH H K) 0)
(NOT (UNION-AT-N G (NTH H K) '(2 3)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L))
(LISTP HP)).
This again simplifies, applying MOLWS-LIST-H and MOVE-IS-LIST, to:
T.
Q.E.D.
[ 0.0 0.1 0.1 ]
MOLWS-LN-HP
(PROVE-LEMMA MOLWS-NUM-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N)))
(NUMBERP K))
((ENABLE NSET)))
WARNING: Note that MOLWS-NUM-K contains the free variables H, G, L, and N
which will be chosen by instantiating the hypothesis (MOLWS N L G H).
WARNING: the previously added lemma, NSET-NUMBER, could be applied whenever
the newly proposed MOLWS-NUM-K could!
This simplifies, appealing to the lemma NSET-NUMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-NUM-K
(PROVE-LEMMA MOLWS-UNION-H
(REWRITE)
(IMPLIES (MOLWS N L G H)
(ALL-UNION H N (NSET (ADD1 N))))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-UNION-H contains the free variables G and L which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations MOLWS and IMPLIES,
to:
T.
This simplifies, obviously, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-UNION-H
(PROVE-LEMMA LM-NTH-NUMBERP
(REWRITE)
(IMPLIES (AND (NUMBERP I)
(ALL-UNION H N (NSET I))
(MEMBER K (NSET N)))
(NUMBERP (NTH H K)))
((ENABLE NSET ALL-UNION UNION-AT-N AT)))
WARNING: Note that LM-NTH-NUMBERP contains the free variables N and I which
will be chosen by instantiating the hypotheses (NUMBERP I) and
(ALL-UNION H N (NSET I)).
Name the conjecture *1.
Perhaps we can prove it by induction. There are three plausible
inductions. They merge into two likely candidate inductions, both of which
are unflawed. However, one of these is more likely than the other. We will
induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p H K N I))
(IMPLIES (AND (NOT (ZEROP N))
(p H K (SUB1 N) I))
(p H K N I))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new formulas:
Case 3. (IMPLIES (AND (ZEROP N)
(NUMBERP I)
(ALL-UNION H N (NSET I))
(MEMBER K (NSET N)))
(NUMBERP (NTH H K))).
This simplifies, opening up the definitions of ZEROP, EQUAL, ALL-UNION, NSET,
LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (ALL-UNION H (SUB1 N) (NSET I)))
(NUMBERP I)
(ALL-UNION H N (NSET I))
(MEMBER K (NSET N)))
(NUMBERP (NTH H K))).
This simplifies, expanding ZEROP, ALL-UNION, and UNION-AT-N, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER K (NSET (SUB1 N))))
(NUMBERP I)
(ALL-UNION H N (NSET I))
(MEMBER K (NSET N)))
(NUMBERP (NTH H K))).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding the
definitions of ZEROP, ALL-UNION, UNION-AT-N, NSET, and MEMBER, to the goal:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER K (NSET (SUB1 N))))
(NUMBERP I)
(MEMBER (NTH H N) (NSET I))
(ALL-UNION H (SUB1 N) (NSET I))
(EQUAL K N))
(NUMBERP (NTH H K))).
But this again simplifies, using linear arithmetic and appealing to the
lemmas N-NOT-LESS-J and NSET-NUMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LM-NTH-NUMBERP
(PROVE-LEMMA NTH-NUMBERP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N)))
(NUMBERP (NTH H K)))
((USE (LM-NTH-NUMBERP (I (ADD1 N))))))
WARNING: Note that NTH-NUMBERP contains the free variables G, L, and N which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture simplifies, applying MOLWS-UNION-H, and opening up the
definitions of AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
NTH-NUMBERP
(PROVE-LEMMA MOLWS-N-NOT-0
(REWRITE)
(IMPLIES (MOLWS N L G H)
(NOT (EQUAL N 0)))
((ENABLE MOLWS)))
WARNING: Note that MOLWS-N-NOT-0 contains the free variables H, G, and L
which will be chosen by instantiating the hypothesis (MOLWS N L G H).
This formula can be simplified, using the abbreviations NOT, MOLWS, and
IMPLIES, to:
(IMPLIES (AND (NUMBERP N)
(LISTP L)
(LISTP G)
(LISTP H)
(EQUAL (LENGTH L) N)
(EQUAL (LENGTH G) N)
(EQUAL (LENGTH H) N)
(ALL-UNION L N
'(0 1 2 3 4 5 6 7 8 9 10 11 12))
(ALL-UNION G N '(0 1 2 3 4))
(ALL-UNION H N (NSET (ADD1 N))))
(NOT (EQUAL N 0))),
which simplifies, rewriting with the lemma LIST-LN, and expanding the function
NUMBERP, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MOLWS-N-NOT-0
(PROVE-LEMMA LM-L-MRHOLEMMA
(REWRITE)
(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J)))
((ENABLE MRHOI)))
WARNING: Note that LM-L-MRHOLEMMA contains the free variables HP, GP, LP, H,
G, N, and K which will be chosen by instantiating the hypotheses:
(MEMBER K (NSET (LENGTH L)))
and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with SUB1-ADD1, and opening up the functions
MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B,
MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A,
MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, and MRHOI, to the following 17 new
conjectures:
Case 17.(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))).
However this again simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 16.(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))).
However this again simplifies, appealing to the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 15.(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, rewriting with the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 14.(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 3)
(EQUAL GP G)
(EQUAL HP H)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 4))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, applying the lemma MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 13.(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, rewriting with MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 12.(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 8))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))).
But this again simplifies, rewriting with the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 11.(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(NOT (NUMBERP N))
(LESSP (SUB1 (NTH H K)) 0)
(AT G (NTH H K) 1)
(EQUAL LP (MOVE L K 6))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, expanding the definitions of EQUAL and LESSP, to:
T.
Case 10.(IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(NUMBERP N)
(LESSP (SUB1 (NTH H K)) N)
(AT G (NTH H K) 1)
(EQUAL LP (MOVE L K 6))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, rewriting with the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 9. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(NOT (NUMBERP (NTH H K)))
(AT G (NTH H K) 1)
(EQUAL LP (MOVE L K 6))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, appealing to the lemma MOVE-UNCHANGE-OTHER-THAN-NTH,
to:
T.
Case 8. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(AT G (NTH H K) 1)
(EQUAL LP (MOVE L K 6))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, applying the lemma MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 7. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, rewriting with the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 6. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 7)
(EQUAL LP (MOVE L K 8))
(AT G (NTH H K) 4)
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 5. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))).
However this again simplifies, appealing to the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 4. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 9)
(AT H K K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 3. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))).
But this again simplifies, appealing to the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 2. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 11)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))),
which again simplifies, rewriting with MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 1. (IMPLIES (AND (LISTP L)
(MEMBER J (NSET (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(AT L K 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0))
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J))).
However this again simplifies, appealing to the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-L-MRHOLEMMA
(DISABLE LM-L-MRHOLEMMA)
[ 0.0 0.0 0.0 ]
LM-L-MRHOLEMMA-OFF
(PROVE-LEMMA L-MRHOLEMMA
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J)))
((ENABLE LM-L-MRHOLEMMA)
(USE (LM-L-MRHOLEMMA))))
WARNING: Note that L-MRHOLEMMA contains the free variables HP, GP, LP, K, H,
G, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with MOLWS-LIST-L and MOLWS-LN-L, and unfolding NOT,
AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
L-MRHOLEMMA
(PROVE-LEMMA LM-G-MRHOLEMMA
(REWRITE)
(IMPLIES (AND (LISTP G)
(MEMBER J (NSET (LENGTH G)))
(MEMBER K (NSET (LENGTH G)))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J)))
((ENABLE MRHOI)))
WARNING: Note that LM-G-MRHOLEMMA contains the free variables HP, GP, LP, H,
L, N, and K which will be chosen by instantiating the hypotheses:
(MEMBER K (NSET (LENGTH G)))
and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with SUB1-ADD1, and opening up the functions
MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B,
MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A,
MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, and MRHOI, to the following five new
conjectures:
Case 5. (IMPLIES (AND (LISTP G)
(MEMBER J (NSET (LENGTH G)))
(MEMBER K (NSET (LENGTH G)))
(AT L K 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J))).
However this again simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 4. (IMPLIES (AND (LISTP G)
(MEMBER J (NSET (LENGTH G)))
(MEMBER K (NSET (LENGTH G)))
(AT L K 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J))).
However this again simplifies, appealing to the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 3. (IMPLIES (AND (LISTP G)
(MEMBER J (NSET (LENGTH G)))
(MEMBER K (NSET (LENGTH G)))
(AT L K 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J))),
which again simplifies, rewriting with the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 2. (IMPLIES (AND (LISTP G)
(MEMBER J (NSET (LENGTH G)))
(MEMBER K (NSET (LENGTH G)))
(AT L K 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J))),
which again simplifies, applying the lemma MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 1. (IMPLIES (AND (LISTP G)
(MEMBER J (NSET (LENGTH G)))
(MEMBER K (NSET (LENGTH G)))
(AT L K 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0))
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J))),
which again simplifies, rewriting with MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-G-MRHOLEMMA
(DISABLE LM-G-MRHOLEMMA)
[ 0.0 0.0 0.0 ]
LM-G-MRHOLEMMA-OFF
(PROVE-LEMMA G-MRHOLEMMA
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J)))
((ENABLE LM-G-MRHOLEMMA)
(USE (LM-G-MRHOLEMMA))))
WARNING: Note that G-MRHOLEMMA contains the free variables HP, GP, LP, K, H,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with MOLWS-LIST-G and MOLWS-LN-G, and unfolding NOT,
AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
G-MRHOLEMMA
(PROVE-LEMMA LM-H-MRHOLEMMA
(REWRITE)
(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J)))
((ENABLE MRHOI)))
WARNING: Note that LM-H-MRHOLEMMA contains the free variables HP, GP, LP, G,
L, N, and K which will be chosen by instantiating the hypotheses:
(MEMBER K (NSET (LENGTH H)))
and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with SUB1-ADD1, and opening up the functions
MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B,
MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A,
MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, and MRHOI, to the following 19 new
conjectures:
Case 19.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))).
However this again simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 18.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 3)
(EQUAL GP G)
(EQUAL LP L)
(NOT (NUMBERP N))
(LESSP (SUB1 (NTH H K)) 0)
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))).
However this again simplifies, opening up the functions EQUAL and LESSP, to:
T.
Case 17.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 3)
(EQUAL GP G)
(EQUAL LP L)
(NOT (NUMBERP (NTH H K)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, rewriting with the lemmas SUB1-TYPE-RESTRICTION and
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 16.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 3)
(EQUAL GP G)
(EQUAL LP L)
(EQUAL (NTH H K) 0)
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, applying the lemma MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 15.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 3)
(EQUAL GP G)
(EQUAL LP L)
(NUMBERP N)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, rewriting with MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 14.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))).
But this again simplifies, rewriting with the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 13.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 5)
(EQUAL GP G)
(EQUAL LP L)
(NOT (NUMBERP N))
(LESSP (SUB1 (NTH H K)) 0)
(NOT (AT G (NTH H K) 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, expanding the definitions of EQUAL and LESSP, to:
T.
Case 12.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 5)
(EQUAL GP G)
(EQUAL LP L)
(NUMBERP N)
(LESSP (SUB1 (NTH H K)) N)
(NOT (AT G (NTH H K) 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, rewriting with the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 11.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 5)
(EQUAL GP G)
(EQUAL LP L)
(NOT (NUMBERP (NTH H K)))
(NOT (AT G (NTH H K) 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, appealing to the lemmas SUB1-TYPE-RESTRICTION and
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 10.(IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 5)
(EQUAL GP G)
(EQUAL LP L)
(EQUAL (NTH H K) 0)
(NOT (AT G (NTH H K) 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, applying the lemma MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 9. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, rewriting with the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 8. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 7)
(NOT (AT G (NTH H K) 4))
(EQUAL LP L)
(EQUAL GP G)
(EQUAL HP
(MOVE H K
(ADD1 (REMAINDER (SUB1 (NTH H K)) N))))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 7. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))).
However this again simplifies, appealing to the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 6. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 9)
(LESSP (NTH H K) K)
(UNION-AT-N G (NTH H K) '(0 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 5. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))).
But this again simplifies, appealing to the lemma
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 4. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 11)
(NOT (NUMBERP N))
(LESSP (SUB1 (NTH H K)) 0)
(NOT (UNION-AT-N G (NTH H K) '(2 3)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, unfolding EQUAL and LESSP, to:
T.
Case 3. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 11)
(NUMBERP N)
(LESSP (SUB1 (NTH H K)) N)
(NOT (UNION-AT-N G (NTH H K) '(2 3)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, appealing to the lemma MOVE-UNCHANGE-OTHER-THAN-NTH,
to:
T.
Case 2. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 11)
(NOT (NUMBERP (NTH H K)))
(NOT (UNION-AT-N G (NTH H K) '(2 3)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, rewriting with the lemmas SUB1-TYPE-RESTRICTION and
MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Case 1. (IMPLIES (AND (LISTP H)
(MEMBER J (NSET (LENGTH H)))
(MEMBER K (NSET (LENGTH H)))
(AT L K 11)
(EQUAL (NTH H K) 0)
(NOT (UNION-AT-N G (NTH H K) '(2 3)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J))),
which again simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-H-MRHOLEMMA
(DISABLE LM-H-MRHOLEMMA)
[ 0.0 0.0 0.0 ]
LM-H-MRHOLEMMA-OFF
(PROVE-LEMMA H-MRHOLEMMA
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J)))
((ENABLE LM-H-MRHOLEMMA)
(USE (LM-H-MRHOLEMMA))))
WARNING: Note that H-MRHOLEMMA contains the free variables HP, GP, LP, K, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with MOLWS-LIST-H and MOLWS-LN-H, and unfolding NOT,
AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
H-MRHOLEMMA
(PROVE-LEMMA M-LP-SAME-L
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(UNION-AT-N L J M))
(UNION-AT-N LP J M))
((ENABLE UNION-AT-N AT)
(USE (L-MRHOLEMMA))))
WARNING: Note that M-LP-SAME-L contains the free variables HP, GP, K, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J)))
(MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(MEMBER (NTH L J) M))
(MEMBER (NTH LP J) M)),
which simplifies, applying the lemma L-MRHOLEMMA, and opening up the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-LP-SAME-L
(PROVE-LEMMA M-L-SAME-LP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(UNION-AT-N LP J M))
(UNION-AT-N L J M))
((ENABLE UNION-AT-N AT)
(USE (L-MRHOLEMMA))))
WARNING: Note that M-L-SAME-LP contains the free variables HP, GP, LP, K, H,
G, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J)))
(MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(MEMBER (NTH LP J) M))
(MEMBER (NTH L J) M)),
which simplifies, applying the lemma L-MRHOLEMMA, and opening up the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-L-SAME-LP
(PROVE-LEMMA M-LP-SAME-L-NOT
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(NOT (UNION-AT-N LP J M)))
(NOT (UNION-AT-N L J M)))
((USE (M-LP-SAME-L))))
WARNING: Note that M-LP-SAME-L-NOT contains the free variables HP, GP, LP, K,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying M-LP-SAME-L, and unfolding the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-LP-SAME-L-NOT
(PROVE-LEMMA M-GP-SAME-G
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(UNION-AT-N G J M))
(UNION-AT-N GP J M))
((ENABLE UNION-AT-N AT)
(USE (G-MRHOLEMMA))))
WARNING: Note that M-GP-SAME-G contains the free variables HP, LP, K, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J)))
(MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(MEMBER (NTH G J) M))
(MEMBER (NTH GP J) M)),
which simplifies, applying the lemma G-MRHOLEMMA, and opening up the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-GP-SAME-G
(PROVE-LEMMA M-G-SAME-GP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(UNION-AT-N GP J M))
(UNION-AT-N G J M))
((ENABLE UNION-AT-N AT)
(USE (G-MRHOLEMMA))))
WARNING: Note that M-G-SAME-GP contains the free variables HP, GP, LP, K, H,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J)))
(MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(MEMBER (NTH GP J) M))
(MEMBER (NTH G J) M)),
which simplifies, applying the lemma G-MRHOLEMMA, and opening up the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-G-SAME-GP
(PROVE-LEMMA M-GP-SAME-G-NOT
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(NOT (UNION-AT-N GP J M)))
(NOT (UNION-AT-N G J M)))
((USE (M-GP-SAME-G))))
WARNING: Note that M-GP-SAME-G-NOT contains the free variables HP, GP, LP, K,
H, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying M-GP-SAME-G, and unfolding the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-GP-SAME-G-NOT
(PROVE-LEMMA M-HP-SAME-H
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(UNION-AT-N H J M))
(UNION-AT-N HP J M))
((ENABLE UNION-AT-N AT)
(USE (H-MRHOLEMMA))))
WARNING: Note that M-HP-SAME-H contains the free variables GP, LP, K, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J)))
(MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(MEMBER (NTH H J) M))
(MEMBER (NTH HP J) M)),
which simplifies, applying the lemma H-MRHOLEMMA, and opening up the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-HP-SAME-H
(PROVE-LEMMA M-H-SAME-HP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(UNION-AT-N HP J M))
(UNION-AT-N H J M))
((ENABLE UNION-AT-N AT)
(USE (H-MRHOLEMMA))))
WARNING: Note that M-H-SAME-HP contains the free variables HP, GP, LP, K, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH H J) (NTH HP J)))
(MOLWS N L G H)
(LISTP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(MEMBER (NTH HP J) M))
(MEMBER (NTH H J) M)),
which simplifies, applying the lemma H-MRHOLEMMA, and opening up the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-H-SAME-HP
(PROVE-LEMMA M-L-SAME-LP-AT
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(NUMBERP M)
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J))
(AT LP J M))
(AT L J M))
((ENABLE AT) (USE (L-MRHOLEMMA))))
WARNING: Note that M-L-SAME-LP-AT contains the free variables HP, GP, LP, K,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
AT, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH L J) (NTH LP J)))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(NUMBERP M)
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J))
(EQUAL (NTH LP J) M))
(EQUAL (NTH L J) M)),
which simplifies, applying the lemma L-MRHOLEMMA, and opening up the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-L-SAME-LP-AT
(PROVE-LEMMA M-GP-SAME-G-AT
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(NUMBERP M)
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J))
(AT G J M))
(AT GP J M))
((ENABLE AT) (USE (G-MRHOLEMMA))))
WARNING: Note that M-GP-SAME-G-AT contains the free variables HP, LP, K, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
AT, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J)))
(EQUAL (NTH G J) (NTH GP J)))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(NUMBERP M)
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K J))
(EQUAL (NTH G J) M))
(EQUAL (NTH GP J) M)),
which simplifies, applying the lemma G-MRHOLEMMA, and opening up the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-GP-SAME-G-AT
(PROVE-LEMMA M-L-SAME-LP-AT-NOT
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(NUMBERP M)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(NOT (AT L J M)))
(NOT (AT LP J M)))
((USE (M-L-SAME-LP-AT))))
WARNING: Note that M-L-SAME-LP-AT-NOT contains the free variables HP, GP, K,
H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying M-L-SAME-LP-AT, and unfolding the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
M-L-SAME-LP-AT-NOT
(PROVE-LEMMA N-NEQ-K-MRHOI0
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 0)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 1) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 0)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 1) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI0
(DISABLE N-NEQ-K-MRHOI0)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI0-OFF
(PROVE-LEMMA N-EQ-K-MRHOI0
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 0)
(LG-AT-N K L G))
(LG-AT-N K (MOVE L K 1) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 0)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N K (MOVE L K 1) G)).
This simplifies, unfolding the functions AT, EQUAL, LG-1-AT-N, and LG-2-AT-N,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI0
(DISABLE N-EQ-K-MRHOI0)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI0-OFF
(PROVE-LEMMA LG-AT-MRHOI0
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 0)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 1) G))
((ENABLE N-NEQ-K-MRHOI0 N-EQ-K-MRHOI0)
(USE (N-NEQ-K-MRHOI0))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI0, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI0
(DISABLE LG-AT-MRHOI0)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI0-OFF
(PROVE-LEMMA LG-MRHOI0
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 0)
(LG N L G))
(LG N (MOVE L K 1) G))
((ENABLE LG-AT-MRHOI0 LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 0)
(LG N L G))
(LG N (MOVE L K 1) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 0)
(LG N L G))
(LG N (MOVE L K 1) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 0)
(LG N L G))
(LG N (MOVE L K 1) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 1) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 0)
(LG N L G))
(LG N (MOVE L K 1) G)).
This simplifies, applying the lemma LG-AT-MRHOI0, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI0
(DISABLE LG-MRHOI0)
[ 0.0 0.0 0.0 ]
LG-MRHOI0-OFF
(PROVE-LEMMA MRHOI0-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI0 N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI0)))
WARNING: Note that MRHOI0-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI0 N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI0, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H)
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI0, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI0-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI1A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 1)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 2) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 1)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 2) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI1A
(DISABLE N-NEQ-K-MRHOI1A)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI1A-OFF
(PROVE-LEMMA N-EQ-K-MRHOI1A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 1)
(LG-AT-N K L G))
(LG-AT-N N (MOVE L K 2) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 1)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N N (MOVE L K 2) G)).
This simplifies, unfolding the functions AT, EQUAL, LG-1-AT-N, and LG-2-AT-N,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI1A
(DISABLE N-EQ-K-MRHOI1A)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI1A-OFF
(PROVE-LEMMA LG-AT-MRHOI1A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 1)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 2) G))
((ENABLE N-NEQ-K-MRHOI1A N-EQ-K-MRHOI1A)
(USE (N-NEQ-K-MRHOI1A))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI1A, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI1A
(DISABLE LG-AT-MRHOI1A)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI1A-OFF
(PROVE-LEMMA LG-MRHOI1A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 1)
(LG N L G))
(LG N (MOVE L K 2) G))
((ENABLE LG-AT-MRHOI1A LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 1)
(LG N L G))
(LG N (MOVE L K 2) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 1)
(LG N L G))
(LG N (MOVE L K 2) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 1)
(LG N L G))
(LG N (MOVE L K 2) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 2) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 1)
(LG N L G))
(LG N (MOVE L K 2) G)).
This simplifies, applying the lemma LG-AT-MRHOI1A, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI1A
(DISABLE LG-MRHOI1A)
[ 0.0 0.0 0.0 ]
LG-MRHOI1A-OFF
(PROVE-LEMMA MRHOI1A-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI1A N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI1A)))
WARNING: Note that MRHOI1A-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI1A N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI1A, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H)
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI1A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI1A-PRESERVES-LG
(PROVE-LEMMA MRHOI1B-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI1B N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE MRHOI1B)))
WARNING: Note that MRHOI1B-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI1B N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI1B, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 1)
(EQUAL GP G)
(EQUAL LP L)
(EQUAL HP H)
(LG N L G))
(LG N LP GP)),
which simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI1B-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI2
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 2)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 3) (MOVE G K 1)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 2)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N
(MOVE L K 3)
(MOVE G K 1))),
which simplifies, unfolding the definitions of EQUAL, AT, LG-1-AT-N, and
LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI2
(DISABLE N-NEQ-K-MRHOI2)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI2-OFF
(PROVE-LEMMA N-EQ-K-MRHOI2
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 2)
(LG-AT-N K L G))
(LG-AT-N N (MOVE L K 3) (MOVE G K 1)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 2)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N N
(MOVE L K 3)
(MOVE G K 1))).
This simplifies, expanding the definitions of AT, EQUAL, LG-1-AT-N, and
LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI2
(DISABLE N-EQ-K-MRHOI2)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI2-OFF
(PROVE-LEMMA LG-AT-MRHOI2
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 2)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 3) (MOVE G K 1)))
((ENABLE N-NEQ-K-MRHOI2 N-EQ-K-MRHOI2)
(USE (N-NEQ-K-MRHOI2))))
This conjecture simplifies, appealing to the lemmas NSET-NUMBER and
N-EQ-K-MRHOI2, and unfolding the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI2
(DISABLE LG-AT-MRHOI2)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI2-OFF
(PROVE-LEMMA LG-MRHOI2
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 2)
(LG N L G))
(LG N (MOVE L K 3) (MOVE G K 1)))
((ENABLE LG-AT-MRHOI2 LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to the new formula:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 2)
(LG N L G))
(LG N (MOVE L K 3) (MOVE G K 1))),
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 (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme produces three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 2)
(LG N L G))
(LG N (MOVE L K 3) (MOVE G K 1))),
which simplifies, expanding ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 2)
(LG N L G))
(LG N (MOVE L K 3) (MOVE G K 1))),
which simplifies, expanding the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N)
(MOVE L K 3)
(MOVE G K 1))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 2)
(LG N L G))
(LG N (MOVE L K 3) (MOVE G K 1))),
which simplifies, appealing to the lemma LG-AT-MRHOI2, and opening up ZEROP,
LG, AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI2
(DISABLE LG-MRHOI2)
[ 0.0 0.0 0.0 ]
LG-MRHOI2-OFF
(PROVE-LEMMA MRHOI2-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI2 N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI2)))
WARNING: Note that MRHOI2-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI2 N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI2, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI2, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI2-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI3A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 3)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 4) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 3)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 4) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI3A
(DISABLE N-NEQ-K-MRHOI3A)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI3A-OFF
(PROVE-LEMMA N-EQ-K-MRHOI3A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 3)
(LG-AT-N K L G))
(LG-AT-N K (MOVE L K 4) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 3)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N K (MOVE L K 4) G)).
This simplifies, unfolding the functions AT, EQUAL, LG-1-AT-N, and LG-2-AT-N,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI3A
(DISABLE N-EQ-K-MRHOI3A)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI3A-OFF
(PROVE-LEMMA LG-AT-MRHOI3A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 3)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 4) G))
((ENABLE N-NEQ-K-MRHOI3A N-EQ-K-MRHOI3A)
(USE (N-NEQ-K-MRHOI3A))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI3A, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI3A
(DISABLE LG-AT-MRHOI3A)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI3A-OFF
(PROVE-LEMMA LG-MRHOI3A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 3)
(LG N L G))
(LG N (MOVE L K 4) G))
((ENABLE LG-AT-MRHOI3A LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 3)
(LG N L G))
(LG N (MOVE L K 4) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 3)
(LG N L G))
(LG N (MOVE L K 4) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 3)
(LG N L G))
(LG N (MOVE L K 4) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 4) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 3)
(LG N L G))
(LG N (MOVE L K 4) G)).
This simplifies, applying the lemma LG-AT-MRHOI3A, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI3A
(DISABLE LG-MRHOI3A)
[ 0.0 0.0 0.0 ]
LG-MRHOI3A-OFF
(PROVE-LEMMA MRHOI3A-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI3A N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI3A)))
WARNING: Note that MRHOI3A-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI3A N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI3A, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 3)
(EQUAL GP G)
(EQUAL HP H)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 4))
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI3A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI3A-PRESERVES-LG
(PROVE-LEMMA MRHOI3B-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI3B N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE MRHOI3B)))
WARNING: Note that MRHOI3B-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI3B N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI3B, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 3)
(EQUAL GP G)
(EQUAL LP L)
(LESSP (NTH H K) (ADD1 N))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2))
(LG N L G))
(LG N LP GP)),
which simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI3B-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI4
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 4)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 5) (MOVE G K 3)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 4)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N
(MOVE L K 5)
(MOVE G K 3))),
which simplifies, unfolding the definitions of EQUAL, AT, LG-1-AT-N, and
LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI4
(DISABLE N-NEQ-K-MRHOI4)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI4-OFF
(PROVE-LEMMA N-EQ-K-MRHOI4
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 4)
(LG-AT-N K L G))
(LG-AT-N N (MOVE L K 5) (MOVE G K 3)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 4)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N N
(MOVE L K 5)
(MOVE G K 3))).
This simplifies, expanding the definitions of AT, EQUAL, LG-1-AT-N, and
LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI4
(DISABLE N-EQ-K-MRHOI4)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI4-OFF
(PROVE-LEMMA LG-AT-MRHOI4
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 4)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 5) (MOVE G K 3)))
((ENABLE N-NEQ-K-MRHOI4 N-EQ-K-MRHOI4)
(USE (N-NEQ-K-MRHOI4))))
This conjecture simplifies, appealing to the lemmas NSET-NUMBER and
N-EQ-K-MRHOI4, and unfolding the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI4
(DISABLE LG-AT-MRHOI4)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI4-OFF
(PROVE-LEMMA LG-MRHOI4
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 4)
(LG N L G))
(LG N (MOVE L K 5) (MOVE G K 3)))
((ENABLE LG-AT-MRHOI4 LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to the new formula:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 4)
(LG N L G))
(LG N (MOVE L K 5) (MOVE G K 3))),
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 (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme produces three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 4)
(LG N L G))
(LG N (MOVE L K 5) (MOVE G K 3))),
which simplifies, expanding ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 4)
(LG N L G))
(LG N (MOVE L K 5) (MOVE G K 3))),
which simplifies, expanding the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N)
(MOVE L K 5)
(MOVE G K 3))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 4)
(LG N L G))
(LG N (MOVE L K 5) (MOVE G K 3))),
which simplifies, appealing to the lemma LG-AT-MRHOI4, and opening up ZEROP,
LG, AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI4
(DISABLE LG-MRHOI4)
[ 0.0 0.0 0.0 ]
LG-MRHOI4-OFF
(PROVE-LEMMA MRHOI4-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI4 N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI4)))
WARNING: Note that MRHOI4-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI4 N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI4, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1))
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI4, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI4-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI5A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 5)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 8) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 5)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 8) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI5A
(DISABLE N-NEQ-K-MRHOI5A)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI5A-OFF
(PROVE-LEMMA N-EQ-K-MRHOI5A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(LG-AT-N K L G))
(LG-AT-N K (MOVE L K 8) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 5)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N K (MOVE L K 8) G)).
This simplifies, unfolding the functions AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI5A
(DISABLE N-EQ-K-MRHOI5A)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI5A-OFF
(PROVE-LEMMA LG-AT-MRHOI5A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 8) G))
((ENABLE N-NEQ-K-MRHOI5A N-EQ-K-MRHOI5A)
(USE (N-NEQ-K-MRHOI5A))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI5A, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI5A
(DISABLE LG-AT-MRHOI5A)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI5A-OFF
(PROVE-LEMMA LG-MRHOI5A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 5)
(LG N L G))
(LG N (MOVE L K 8) G))
((ENABLE LG-AT-MRHOI5A LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 5)
(LG N L G))
(LG N (MOVE L K 8) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 5)
(LG N L G))
(LG N (MOVE L K 8) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 5)
(LG N L G))
(LG N (MOVE L K 8) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 8) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 5)
(LG N L G))
(LG N (MOVE L K 8) G)).
This simplifies, applying the lemma LG-AT-MRHOI5A, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI5A
(DISABLE LG-MRHOI5A)
[ 0.0 0.0 0.0 ]
LG-MRHOI5A-OFF
(PROVE-LEMMA MRHOI5A-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI5A N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI5A)))
WARNING: Note that MRHOI5A-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI5A N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI5A, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 8))
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI5A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI5A-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI5B
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 5)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 6) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 5)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 6) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI5B
(DISABLE N-NEQ-K-MRHOI5B)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI5B-OFF
(PROVE-LEMMA N-EQ-K-MRHOI5B
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(LG-AT-N K L G))
(LG-AT-N K (MOVE L K 6) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 5)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N K (MOVE L K 6) G)).
This simplifies, unfolding the functions AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI5B
(DISABLE N-EQ-K-MRHOI5B)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI5B-OFF
(PROVE-LEMMA LG-AT-MRHOI5B
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 5)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 6) G))
((ENABLE N-NEQ-K-MRHOI5B N-EQ-K-MRHOI5B)
(USE (N-NEQ-K-MRHOI5B))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI5B, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI5B
(DISABLE LG-AT-MRHOI5B)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI5B-OFF
(PROVE-LEMMA LG-MRHOI5B
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 5)
(LG N L G))
(LG N (MOVE L K 6) G))
((ENABLE LG-AT-MRHOI5B LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 5)
(LG N L G))
(LG N (MOVE L K 6) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 5)
(LG N L G))
(LG N (MOVE L K 6) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 5)
(LG N L G))
(LG N (MOVE L K 6) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 6) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 5)
(LG N L G))
(LG N (MOVE L K 6) G)).
This simplifies, applying the lemma LG-AT-MRHOI5B, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI5B
(DISABLE LG-MRHOI5B)
[ 0.0 0.0 0.0 ]
LG-MRHOI5B-OFF
(PROVE-LEMMA MRHOI5B-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI5B N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI5B)))
WARNING: Note that MRHOI5B-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI5B N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI5B, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (NTH H K) (ADD1 N))
(AT G (NTH H K) 1)
(EQUAL LP (MOVE L K 6))
(LG N L G))
(LG N LP GP)),
which simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, NTH-NUMBERP, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L, and LG-MRHOI5B,
and unfolding the function LESSP, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI5B-PRESERVES-LG
(PROVE-LEMMA MRHOI5C-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI5C N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE MRHOI5C)))
WARNING: Note that MRHOI5C-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI5C N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI5C, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 5)
(EQUAL GP G)
(EQUAL LP L)
(LESSP (NTH H K) (ADD1 N))
(NOT (AT G (NTH H K) 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(LG N L G))
(LG N LP GP)),
which simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI5C-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI6
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 6)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 7) (MOVE G K 2)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 6)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N
(MOVE L K 7)
(MOVE G K 2))),
which simplifies, unfolding the definitions of EQUAL, AT, LG-1-AT-N, and
LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI6
(DISABLE N-NEQ-K-MRHOI6)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI6-OFF
(PROVE-LEMMA N-EQ-K-MRHOI6
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 6)
(LG-AT-N K L G))
(LG-AT-N N (MOVE L K 7) (MOVE G K 2)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 6)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N N
(MOVE L K 7)
(MOVE G K 2))).
This simplifies, expanding the definitions of AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI6
(DISABLE N-EQ-K-MRHOI6)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI6-OFF
(PROVE-LEMMA LG-AT-MRHOI6
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 6)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 7) (MOVE G K 2)))
((ENABLE N-NEQ-K-MRHOI6 N-EQ-K-MRHOI6)
(USE (N-NEQ-K-MRHOI6))))
This conjecture simplifies, appealing to the lemmas NSET-NUMBER and
N-EQ-K-MRHOI6, and unfolding the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI6
(DISABLE LG-AT-MRHOI6)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI6-OFF
(PROVE-LEMMA LG-MRHOI6
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 6)
(LG N L G))
(LG N (MOVE L K 7) (MOVE G K 2)))
((ENABLE LG-AT-MRHOI6 LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to the new formula:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 6)
(LG N L G))
(LG N (MOVE L K 7) (MOVE G K 2))),
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 (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme produces three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 6)
(LG N L G))
(LG N (MOVE L K 7) (MOVE G K 2))),
which simplifies, expanding ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 6)
(LG N L G))
(LG N (MOVE L K 7) (MOVE G K 2))),
which simplifies, expanding the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N)
(MOVE L K 7)
(MOVE G K 2))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 6)
(LG N L G))
(LG N (MOVE L K 7) (MOVE G K 2))),
which simplifies, appealing to the lemma LG-AT-MRHOI6, and opening up ZEROP,
LG, AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI6
(DISABLE LG-MRHOI6)
[ 0.0 0.0 0.0 ]
LG-MRHOI6-OFF
(PROVE-LEMMA MRHOI6-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI6 N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI6)))
WARNING: Note that MRHOI6-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI6 N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI6, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1))
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI6, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI6-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI7A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 7)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 8) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 7)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 8) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI7A
(DISABLE N-NEQ-K-MRHOI7A)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI7A-OFF
(PROVE-LEMMA N-EQ-K-MRHOI7A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 7)
(LG-AT-N K L G))
(LG-AT-N K (MOVE L K 8) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 7)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N K (MOVE L K 8) G)).
This simplifies, unfolding the functions AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI7A
(DISABLE N-EQ-K-MRHOI7A)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI7A-OFF
(PROVE-LEMMA LG-AT-MRHOI7A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 7)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 8) G))
((ENABLE N-NEQ-K-MRHOI7A N-EQ-K-MRHOI7A)
(USE (N-NEQ-K-MRHOI7A))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI7A, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI7A
(DISABLE LG-AT-MRHOI7A)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI7A-OFF
(PROVE-LEMMA LG-MRHOI7A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 7)
(LG N L G))
(LG N (MOVE L K 8) G))
((ENABLE LG-AT-MRHOI7A LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 7)
(LG N L G))
(LG N (MOVE L K 8) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 7)
(LG N L G))
(LG N (MOVE L K 8) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 7)
(LG N L G))
(LG N (MOVE L K 8) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 8) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 7)
(LG N L G))
(LG N (MOVE L K 8) G)).
This simplifies, applying the lemma LG-AT-MRHOI7A, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI7A
(DISABLE LG-MRHOI7A)
[ 0.0 0.0 0.0 ]
LG-MRHOI7A-OFF
(PROVE-LEMMA MRHOI7A-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI7A N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI7A)))
WARNING: Note that MRHOI7A-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI7A N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI7A, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 7)
(EQUAL LP (MOVE L K 8))
(AT G (NTH H K) 4)
(EQUAL GP G)
(EQUAL HP H)
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI7A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI7A-PRESERVES-LG
(PROVE-LEMMA MRHOI7B-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI7B N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE MRHOI7B)))
WARNING: Note that MRHOI7B-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI7B N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI7B, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 7)
(NOT (AT G (NTH H K) 4))
(EQUAL LP L)
(EQUAL GP G)
(EQUAL HP
(MOVE H K
(ADD1 (REMAINDER (SUB1 (NTH H K)) N))))
(LG N L G))
(LG N LP GP)),
which simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI7B-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI8
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 8)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 9) (MOVE G K 4)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 8)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N
(MOVE L K 9)
(MOVE G K 4))),
which simplifies, unfolding the definitions of EQUAL, AT, LG-1-AT-N, and
LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI8
(DISABLE N-NEQ-K-MRHOI8)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI8-OFF
(PROVE-LEMMA N-EQ-K-MRHOI8
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 8)
(LG-AT-N K L G))
(LG-AT-N N (MOVE L K 9) (MOVE G K 4)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 8)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N N
(MOVE L K 9)
(MOVE G K 4))).
This simplifies, expanding the definitions of AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI8
(DISABLE N-EQ-K-MRHOI8)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI8-OFF
(PROVE-LEMMA LG-AT-MRHOI8
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 8)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 9) (MOVE G K 4)))
((ENABLE N-NEQ-K-MRHOI8 N-EQ-K-MRHOI8)
(USE (N-NEQ-K-MRHOI8))))
This conjecture simplifies, appealing to the lemmas NSET-NUMBER and
N-EQ-K-MRHOI8, and unfolding the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI8
(DISABLE LG-AT-MRHOI8)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI8-OFF
(PROVE-LEMMA LG-MRHOI8
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 8)
(LG N L G))
(LG N (MOVE L K 9) (MOVE G K 4)))
((ENABLE LG-AT-MRHOI8 LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to the new formula:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 8)
(LG N L G))
(LG N (MOVE L K 9) (MOVE G K 4))),
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 (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme produces three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 8)
(LG N L G))
(LG N (MOVE L K 9) (MOVE G K 4))),
which simplifies, expanding ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 8)
(LG N L G))
(LG N (MOVE L K 9) (MOVE G K 4))),
which simplifies, expanding the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N)
(MOVE L K 9)
(MOVE G K 4))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 8)
(LG N L G))
(LG N (MOVE L K 9) (MOVE G K 4))),
which simplifies, appealing to the lemma LG-AT-MRHOI8, and opening up ZEROP,
LG, AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI8
(DISABLE LG-MRHOI8)
[ 0.0 0.0 0.0 ]
LG-MRHOI8-OFF
(PROVE-LEMMA MRHOI8-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI8 N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI8)))
WARNING: Note that MRHOI8-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI8 N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI8, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI8, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI8-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI9A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 9)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 10) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 9)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 10) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI9A
(DISABLE N-NEQ-K-MRHOI9A)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI9A-OFF
(PROVE-LEMMA N-EQ-K-MRHOI9A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 9)
(LG-AT-N K L G))
(LG-AT-N K (MOVE L K 10) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 9)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N K (MOVE L K 10) G)).
This simplifies, unfolding the functions AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI9A
(DISABLE N-EQ-K-MRHOI9A)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI9A-OFF
(PROVE-LEMMA LG-AT-MRHOI9A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 9)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 10) G))
((ENABLE N-NEQ-K-MRHOI9A N-EQ-K-MRHOI9A)
(USE (N-NEQ-K-MRHOI9A))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI9A, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI9A
(DISABLE LG-AT-MRHOI9A)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI9A-OFF
(PROVE-LEMMA LG-MRHOI9A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 9)
(LG N L G))
(LG N (MOVE L K 10) G))
((ENABLE LG-AT-MRHOI9A LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 9)
(LG N L G))
(LG N (MOVE L K 10) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 9)
(LG N L G))
(LG N (MOVE L K 10) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 9)
(LG N L G))
(LG N (MOVE L K 10) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 10) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 9)
(LG N L G))
(LG N (MOVE L K 10) G)).
This simplifies, applying the lemma LG-AT-MRHOI9A, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI9A
(DISABLE LG-MRHOI9A)
[ 0.0 0.0 0.0 ]
LG-MRHOI9A-OFF
(PROVE-LEMMA MRHOI9A-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI9A N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI9A)))
WARNING: Note that MRHOI9A-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI9A N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI9A, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 9)
(AT H K K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H)
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI9A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI9A-PRESERVES-LG
(PROVE-LEMMA MRHOI9B-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI9B N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE MRHOI9B)))
WARNING: Note that MRHOI9B-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI9B N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI9B, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 9)
(LESSP (NTH H K) K)
(UNION-AT-N G (NTH H K) '(0 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L)
(LG N L G))
(LG N LP GP)),
which simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI9B-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI10
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 10)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 11) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 10)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 11) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI10
(DISABLE N-NEQ-K-MRHOI10)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI10-OFF
(PROVE-LEMMA N-EQ-K-MRHOI10
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 10)
(LG-AT-N K L G))
(LG-AT-N K (MOVE L K 11) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 10)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N K (MOVE L K 11) G)).
This simplifies, unfolding the functions AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI10
(DISABLE N-EQ-K-MRHOI10)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI10-OFF
(PROVE-LEMMA LG-AT-MRHOI10
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 10)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 11) G))
((ENABLE N-NEQ-K-MRHOI10 N-EQ-K-MRHOI10)
(USE (N-NEQ-K-MRHOI10))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI10, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI10
(DISABLE LG-AT-MRHOI10)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI10-OFF
(PROVE-LEMMA LG-MRHOI10
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 10)
(LG N L G))
(LG N (MOVE L K 11) G))
((ENABLE LG-AT-MRHOI10 LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 10)
(LG N L G))
(LG N (MOVE L K 11) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 10)
(LG N L G))
(LG N (MOVE L K 11) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 10)
(LG N L G))
(LG N (MOVE L K 11) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 11) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 10)
(LG N L G))
(LG N (MOVE L K 11) G)).
This simplifies, applying the lemma LG-AT-MRHOI10, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI10
(DISABLE LG-MRHOI10)
[ 0.0 0.0 0.0 ]
LG-MRHOI10-OFF
(PROVE-LEMMA MRHOI10-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI10 N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI10)))
WARNING: Note that MRHOI10-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI10 N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI10, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI10, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI10-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI11A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 11)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 12) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 11)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N (MOVE L K 12) G)),
which simplifies, unfolding EQUAL, AT, LG-1-AT-N, and LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI11A
(DISABLE N-NEQ-K-MRHOI11A)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI11A-OFF
(PROVE-LEMMA N-EQ-K-MRHOI11A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 11)
(LG-AT-N K L G))
(LG-AT-N K (MOVE L K 12) G))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 11)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N K (MOVE L K 12) G)).
This simplifies, unfolding the functions AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI11A
(DISABLE N-EQ-K-MRHOI11A)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI11A-OFF
(PROVE-LEMMA LG-AT-MRHOI11A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 11)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 12) G))
((ENABLE N-NEQ-K-MRHOI11A N-EQ-K-MRHOI11A)
(USE (N-NEQ-K-MRHOI11A))))
This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-MRHOI11A, and
expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI11A
(DISABLE LG-AT-MRHOI11A)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI11A-OFF
(PROVE-LEMMA LG-MRHOI11A
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 11)
(LG N L G))
(LG N (MOVE L K 12) G))
((ENABLE LG-AT-MRHOI11A LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 11)
(LG N L G))
(LG N (MOVE L K 12) G)),
which we will name *1.
We will appeal to induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 11)
(LG N L G))
(LG N (MOVE L K 12) G)).
This simplifies, opening up ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 11)
(LG N L G))
(LG N (MOVE L K 12) G)).
This simplifies, opening up the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N) (MOVE L K 12) G)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 11)
(LG N L G))
(LG N (MOVE L K 12) G)).
This simplifies, applying the lemma LG-AT-MRHOI11A, and unfolding ZEROP, LG,
AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI11A
(DISABLE LG-MRHOI11A)
[ 0.0 0.0 0.0 ]
LG-MRHOI11A-OFF
(PROVE-LEMMA MRHOI11A-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI11A N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI11A)))
WARNING: Note that MRHOI11A-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI11A N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI11A, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 11)
(AT H K (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H)
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI11A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI11A-PRESERVES-LG
(PROVE-LEMMA MRHOI11B-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI11B N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE MRHOI11B)))
WARNING: Note that MRHOI11B-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI11B N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI11B, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 11)
(LESSP (NTH H K) (ADD1 N))
(NOT (UNION-AT-N G (NTH H K) '(2 3)))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL GP G)
(EQUAL LP L)
(LG N L G))
(LG N LP GP)),
which simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI11B-PRESERVES-LG
(PROVE-LEMMA N-NEQ-K-MRHOI12
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(AT L K 12)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 0) (MOVE G K 0)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This formula can be simplified, using the abbreviations LG-AT-N, NOT, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(NOT (EQUAL K N))
(EQUAL (NTH L K) 12)
(LG-1-AT-N N L G)
(LG-2-AT-N N L G)
(LG-3-AT-N N L G))
(LG-AT-N N
(MOVE L K 0)
(MOVE G K 0))),
which simplifies, unfolding the definitions of EQUAL, AT, LG-1-AT-N, and
LG-2-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI12
(DISABLE N-NEQ-K-MRHOI12)
[ 0.0 0.0 0.0 ]
N-NEQ-K-MRHOI12-OFF
(PROVE-LEMMA N-EQ-K-MRHOI12
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(AT L K 12)
(LG-AT-N K L G))
(LG-AT-N N (MOVE L K 0) (MOVE G K 0)))
((ENABLE AT LG-AT-N LG-1-AT-N LG-2-AT-N LG-3-AT-N)))
This conjecture can be simplified, using the abbreviations LG-AT-N, AND,
IMPLIES, and AT, to:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(EQUAL (NTH L K) 12)
(LG-1-AT-N K L G)
(LG-2-AT-N K L G)
(LG-3-AT-N K L G))
(LG-AT-N N
(MOVE L K 0)
(MOVE G K 0))).
This simplifies, expanding the definitions of AT, EQUAL, and LG-1-AT-N, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI12
(DISABLE N-EQ-K-MRHOI12)
[ 0.0 0.0 0.0 ]
N-EQ-K-MRHOI12-OFF
(PROVE-LEMMA LG-AT-MRHOI12
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(NUMBERP N)
(MEMBER K (NSET (LENGTH L)))
(AT L K 12)
(LG-AT-N N L G))
(LG-AT-N N (MOVE L K 0) (MOVE G K 0)))
((ENABLE N-NEQ-K-MRHOI12 N-EQ-K-MRHOI12)
(USE (N-NEQ-K-MRHOI12))))
This conjecture simplifies, appealing to the lemmas NSET-NUMBER and
N-EQ-K-MRHOI12, and unfolding the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI12
(DISABLE LG-AT-MRHOI12)
[ 0.0 0.0 0.0 ]
LG-AT-MRHOI12-OFF
(PROVE-LEMMA LG-MRHOI12
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(AT L K 12)
(LG N L G))
(LG N (MOVE L K 0) (MOVE G K 0)))
((ENABLE LG-AT-MRHOI12 LG AT)))
This formula can be simplified, using the abbreviations AND, IMPLIES, and AT,
to the new formula:
(IMPLIES (AND (LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 12)
(LG N L G))
(LG N (MOVE L K 0) (MOVE G K 0))),
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 (ZEROP N) (p N L K G))
(IMPLIES (AND (NOT (ZEROP N))
(p (SUB1 N) L K G))
(p N L K G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to show that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme produces three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 12)
(LG N L G))
(LG N (MOVE L K 0) (MOVE G K 0))),
which simplifies, expanding ZEROP, NUMBERP, EQUAL, and LG, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 12)
(LG N L G))
(LG N (MOVE L K 0) (MOVE G K 0))),
which simplifies, expanding the functions ZEROP and LG, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(LG (SUB1 N)
(MOVE L K 0)
(MOVE G K 0))
(LISTP L)
(LISTP G)
(MEMBER K (NSET (LENGTH L)))
(NUMBERP N)
(EQUAL (NTH L K) 12)
(LG N L G))
(LG N (MOVE L K 0) (MOVE G K 0))),
which simplifies, appealing to the lemma LG-AT-MRHOI12, and opening up ZEROP,
LG, AT, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LG-MRHOI12
(DISABLE LG-MRHOI12)
[ 0.0 0.0 0.0 ]
LG-MRHOI12-OFF
(PROVE-LEMMA MRHOI12-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI12 N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((ENABLE LG-MRHOI12)))
WARNING: Note that MRHOI12-PRESERVES-LG contains the free variables HP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI12 N K L G H LP GP HP).
This formula can be simplified, using the abbreviations MRHOI12, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT L K 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0))
(LG N L G))
(LG N LP GP)),
which simplifies, applying MOLWS-NUM-N, MOLWS-LN-L, MOLWS-LIST-G, MOLWS-LIST-L,
and LG-MRHOI12, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI12-PRESERVES-LG
(PROVE-LEMMA MRHO-PRESERVES-LG
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G))
(LG N LP GP))
((DISABLE MRHOI0 MRHOI1A MRHOI1B MRHOI2 MRHOI3A MRHOI3B MRHOI4
MRHOI5A MRHOI5B MRHOI5C MRHOI6 MRHOI7A MRHOI7B MRHOI8
MRHOI9A MRHOI9B MRHOI10 MRHOI11A MRHOI11B MRHOI12)
(ENABLE MRHOI)))
WARNING: Note that MRHO-PRESERVES-LG contains the free variables HP, K, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, applying MRHOI0-PRESERVES-LG, MRHOI1A-PRESERVES-LG,
MRHOI1B-PRESERVES-LG, MRHOI2-PRESERVES-LG, MRHOI3A-PRESERVES-LG,
MRHOI3B-PRESERVES-LG, MRHOI4-PRESERVES-LG, MRHOI5A-PRESERVES-LG,
MRHOI5B-PRESERVES-LG, MRHOI5C-PRESERVES-LG, MRHOI6-PRESERVES-LG,
MRHOI7A-PRESERVES-LG, MRHOI7B-PRESERVES-LG, MRHOI8-PRESERVES-LG,
MRHOI9A-PRESERVES-LG, MRHOI9B-PRESERVES-LG, MRHOI10-PRESERVES-LG,
MRHOI11A-PRESERVES-LG, MRHOI11B-PRESERVES-LG, and MRHOI12-PRESERVES-LG, and
expanding the function MRHOI, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHO-PRESERVES-LG
(DISABLE MRHOI0-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI0-PRESERVES-LG-OFF
(DISABLE MRHOI1A-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI1A-PRESERVES-LG-OFF
(DISABLE MRHOI1B-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI1B-PRESERVES-LG-OFF
(DISABLE MRHOI2-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI2-PRESERVES-LG-OFF
(DISABLE MRHOI3A-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI3A-PRESERVES-LG-OFF
(DISABLE MRHOI3B-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI3B-PRESERVES-LG-OFF
(DISABLE MRHOI4-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI4-PRESERVES-LG-OFF
(DISABLE MRHOI5A-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI5A-PRESERVES-LG-OFF
(DISABLE MRHOI5B-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI5B-PRESERVES-LG-OFF
(DISABLE MRHOI5C-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI5C-PRESERVES-LG-OFF
(DISABLE MRHOI6-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI6-PRESERVES-LG-OFF
(DISABLE MRHOI7A-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI7A-PRESERVES-LG-OFF
(DISABLE MRHOI7B-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI7B-PRESERVES-LG-OFF
(DISABLE MRHOI8-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI8-PRESERVES-LG-OFF
(DISABLE MRHOI9A-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI9A-PRESERVES-LG-OFF
(DISABLE MRHOI9B-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI9B-PRESERVES-LG-OFF
(DISABLE MRHOI10-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI10-PRESERVES-LG-OFF
(DISABLE MRHOI11A-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI11A-PRESERVES-LG-OFF
(DISABLE MRHOI11B-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI11B-PRESERVES-LG-OFF
(DISABLE MRHOI12-PRESERVES-LG)
[ 0.0 0.0 0.0 ]
MRHOI12-PRESERVES-LG-OFF
(PROVE-LEMMA B0A-IF1
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (AT G J 1)))
(NOT (AT L J 4)))
((ENABLE LG LG-AT-N LG-1-AT-N NSET AT)))
WARNING: Note that B0A-IF1 contains the free variables G and N which will be
chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EQUAL (NTH G J) 1)))
(NOT (EQUAL (NTH L J) 4))).
Give the above formula the name *1.
Perhaps we can prove it by induction. There are two plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p L J G N))
(IMPLIES (AND (NOT (ZEROP N))
(p L J G (SUB1 N)))
(p L J G N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to establish that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme generates three new formulas:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(LG N L G)
(NOT (EQUAL (NTH G J) 1)))
(NOT (EQUAL (NTH L J) 4))),
which simplifies, opening up the functions ZEROP, NSET, LISTP, and MEMBER,
to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(LG N L G)
(NOT (EQUAL (NTH G J) 1)))
(NOT (EQUAL (NTH L J) 4))),
which simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and opening
up the functions ZEROP, NSET, MEMBER, LG-AT-N, AT, EQUAL, LG-1-AT-N, and LG,
to the formula:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL J 0)
(NOT (EQUAL (NTH G 0) 1)))
(NOT (EQUAL (NTH L 0) 4))).
This again simplifies, trivially, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER J (NSET N))
(LG N L G)
(NOT (EQUAL (NTH G J) 1)))
(NOT (EQUAL (NTH L J) 4))).
This simplifies, rewriting with the lemmas CDR-CONS and CAR-CONS, and
unfolding ZEROP, NSET, MEMBER, LG-AT-N, AT, EQUAL, LG-1-AT-N, and LG, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(EQUAL J 0)
(NOT (EQUAL (NTH G 0) 1)))
(NOT (EQUAL (NTH L 0) 4))),
which again simplifies, trivially, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
B0A-IF1
(PROVE-LEMMA IF1-NTH-H-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT H K J)
(NOT (AT G (NTH H K) 1)))
(NOT (AT L J 4)))
((ENABLE AT) (USE (B0A-IF1))))
WARNING: Note that IF1-NTH-H-K contains the free variables HP, GP, LP, K, H,
G, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(NOT (EQUAL (NTH G J) 1)))
(NOT (EQUAL (NTH L J) 4)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EQUAL (NTH H K) J)
(NOT (EQUAL (NTH G (NTH H K)) 1)))
(NOT (EQUAL (NTH L J) 4))).
This simplifies, unfolding the functions NOT, AND, EQUAL, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
IF1-NTH-H-K
(PROVE-LEMMA L5-NOT-G1
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(AT H K J)
(AT L K 5)
(AT LP K 5))
(NOT (AT G (NTH H K) 1)))
((ENABLE MRHOI AT)))
WARNING: Note that L5-NOT-G1 contains the free variables HP, GP, LP, J, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER J (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH H K) J)
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL (NTH G (NTH H K)) 1))).
This simplifies, rewriting with the lemmas SUB1-ADD1, MOLWS-NUM-K,
MOLWS-N-NOT-0, MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and unfolding the
definitions of MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8,
MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B,
MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, EQUAL, AT, and MRHOI, to the
following three new formulas:
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL (NTH G (NTH H K)) 1))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the definition of EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL (NTH G 0) 1))).
However this again simplifies, applying ZERO-NOT-MEMBER-NSET, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL (NTH G (ADD1 N)) 1))).
But this again simplifies, using linear arithmetic and applying N-NOT-LESS-J,
to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
L5-NOT-G1
(PROVE-LEMMA L5-NTH-H-K-EQ-J
(REWRITE)
(IMPLIES (AND (AT H K J)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 5)
(AT LP K 5))
(NOT (AT L J 4)))
((USE (IF1-NTH-H-K) (L5-NOT-G1))))
WARNING: Note that L5-NTH-H-K-EQ-J contains the free variables HP, GP, LP, G,
N, K, and H which will be chosen by instantiating the hypotheses (AT H K J),
(MOLWS N L G H), and (MRHOI N K L G H LP GP HP).
This formula simplifies, applying the lemma L5-NOT-G1, and expanding the
functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
L5-NTH-H-K-EQ-J
(PROVE-LEMMA L5-J-LT-NTH-K
(REWRITE)
(IMPLIES (AND (LESSP J (NTH H K))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(B0A N L H K J)
(AT L K 5))
(NOT (AT L J 4)))
((ENABLE B0A)))
WARNING: Note that L5-J-LT-NTH-K contains the free variables HP, GP, LP, G, N,
K, and H which will be chosen by instantiating the hypotheses
(LESSP J (NTH H K)), (MOLWS N L G H), and (MRHOI N K L G H LP GP HP).
This simplifies, expanding the function B0A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
L5-J-LT-NTH-K
(PROVE-LEMMA NTH-K-LT-J-OR-EQ-J
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(LESSP (SUB1 J) (NTH H K))
(NOT (LESSP J (NTH H K))))
(AT H K J))
((ENABLE AT)))
WARNING: Note that NTH-K-LT-J-OR-EQ-J contains the free variables G, L, and N
which will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to the goal:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(LESSP (SUB1 J) (NTH H K))
(NOT (LESSP J (NTH H K))))
(EQUAL (NTH H K) J)).
This simplifies, using linear arithmetic, to the following three new
conjectures:
Case 3. (IMPLIES (AND (NOT (NUMBERP (NTH H K)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(LESSP (SUB1 J) (NTH H K))
(NOT (LESSP J (NTH H K))))
(EQUAL (NTH H K) J)).
This again simplifies, rewriting with NTH-NUMBERP, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP J))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(LESSP (SUB1 J) (NTH H K))
(NOT (LESSP J (NTH H K))))
(EQUAL (NTH H K) J)).
However this again simplifies, rewriting with the lemma MOLWS-NUM-K, to:
T.
Case 1. (IMPLIES (AND (NUMBERP J)
(NUMBERP (NTH H K))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(LESSP (SUB1 (NTH H K)) (NTH H K))
(NOT (LESSP (NTH H K) (NTH H K))))
(EQUAL (NTH H K) (NTH H K))),
which again simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
NTH-K-LT-J-OR-EQ-J
(PROVE-LEMMA LM-J-NOT-IN-L4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0A N L H K J)
(AT L K 5)
(AT LP K 5)
(LESSP (SUB1 J) (NTH H K)))
(NOT (AT L J 4)))
((USE (NTH-K-LT-J-OR-EQ-J))))
WARNING: Note that LM-J-NOT-IN-L4 contains the free variables HP, GP, LP, K,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with L5-J-LT-NTH-K and L5-NTH-H-K-EQ-J, and
opening up the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-J-NOT-IN-L4
(PROVE-LEMMA COND-L5
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 5)
(LESSP J (NTH HP K)))
(LESSP (SUB1 J) (NTH H K)))
((ENABLE MRHOI AT)))
WARNING: When the linear lemma COND-L5 is stored under (NTH H K) it contains
the free variables HP, GP, LP, J, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER J (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma COND-L5 is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
AT, to the formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 5)
(LESSP J (NTH HP K)))
(LESSP (SUB1 J) (NTH H K))).
This simplifies, rewriting with SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A,
MRHOI0, EQUAL, AT, MRHOI, and SUB1, to four new goals:
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL GP G)
(EQUAL LP L)
(EQUAL (NTH H K) 0)
(NOT (EQUAL (NTH G (NTH H K)) 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL (NTH L K) 5))
(NOT (LESSP J (NTH HP K)))),
which again simplifies, rewriting with the lemmas MOLWS-LN-H, MOLWS-LIST-H,
and MOVE-NTH, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) 0)
(NOT (EQUAL (NTH G 0) 1))
(EQUAL (NTH L K) 5))
(NOT (LESSP J 1))).
Name the above subgoal *1.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL GP G)
(EQUAL LP L)
(LESSP (SUB1 (NTH H K)) N)
(NOT (EQUAL (NTH G (NTH H K)) 1))
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(EQUAL (NTH L K) 5)
(LESSP J (NTH HP K)))
(LESSP (SUB1 J) (NTH H K))).
But this again simplifies, applying MOLWS-LN-H, MOLWS-LIST-H, MOVE-NTH,
SUB1-ADD1, NTH-NUMBERP, and MOLWS-NUM-K, and expanding LESSP, SUB1, and
EQUAL, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(LESSP (SUB1 (NTH H K)) N)
(NOT (EQUAL (NTH G (NTH H K)) 1))
(EQUAL (NTH L K) 5)
(EQUAL J 0))
(NOT (EQUAL (NTH H K) 0))),
which again simplifies, rewriting with ZERO-NOT-MEMBER-NSET, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(LESSP J (NTH H K)))
(LESSP (SUB1 J) (NTH H K))).
But this again simplifies, using linear arithmetic, to the formula:
(IMPLIES (AND (LESSP J 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL (NTH L K) 5)
(LESSP J (NTH H K)))
(LESSP (SUB1 J) (NTH H K))).
Appealing to the lemma SUB1-ELIM, we now replace J by (ADD1 X) to eliminate
(SUB1 J). We use the type restriction lemma noted when SUB1 was introduced
to constrain the new variable. This generates three new goals:
Case 2.3.
(IMPLIES (AND (EQUAL J 0)
(LESSP J 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL (NTH L K) 5)
(LESSP J (NTH H K)))
(LESSP (SUB1 J) (NTH H K))),
which further simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and opening
up the function LESSP, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (NUMBERP J))
(LESSP J 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL (NTH L K) 5)
(LESSP J (NTH H K)))
(LESSP (SUB1 J) (NTH H K))).
But this further simplifies, rewriting with MOLWS-NUM-K, to:
T.
Case 2.1.
(IMPLIES (AND (NUMBERP X)
(NOT (EQUAL (ADD1 X) 0))
(LESSP (ADD1 X) 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (ADD1 X) (NSET N))
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL (NTH L K) 5)
(LESSP (ADD1 X) (NTH H K)))
(LESSP X (NTH H K))).
However this further simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH L K) 5)
(LESSP (SUB1 J) N)
(NOT (EQUAL (SUB1 J) 0)))
(LESSP (SUB1 (SUB1 J)) N)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP J 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 5)
(LESSP (SUB1 J) N)
(NOT (EQUAL (SUB1 J) 0)))
(LESSP (SUB1 (SUB1 J)) N)).
Appealing to the lemma SUB1-ELIM, we now replace J by (ADD1 X) to eliminate
(SUB1 J) and X by (ADD1 Z) to eliminate (SUB1 X). We rely upon the type
restriction lemma noted when SUB1 was introduced to constrain the new
variable. This generates three new goals:
Case 1.3.
(IMPLIES (AND (EQUAL J 0)
(LESSP J 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 5)
(LESSP (SUB1 J) N)
(NOT (EQUAL (SUB1 J) 0)))
(LESSP (SUB1 (SUB1 J)) N)),
which further simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and opening
up the function LESSP, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (NUMBERP J))
(LESSP J 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 5)
(LESSP (SUB1 J) N)
(NOT (EQUAL (SUB1 J) 0)))
(LESSP (SUB1 (SUB1 J)) N)).
However this further simplifies, rewriting with the lemma MOLWS-NUM-K, to:
T.
Case 1.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 (ADD1 Z)) 0))
(LESSP (ADD1 (ADD1 Z)) 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (ADD1 (ADD1 Z)) (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 5)
(LESSP (ADD1 Z) N)
(NOT (EQUAL (ADD1 Z) 0)))
(LESSP Z N)),
which further simplifies, using linear arithmetic, to:
T.
So next consider:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) 0)
(NOT (EQUAL (NTH G 0) 1))
(EQUAL (NTH L K) 5))
(NOT (LESSP J 1))),
named *1 above. We will try to prove it by induction. There is only one
suggested induction. We will induct according to the following scheme:
(AND (IMPLIES (OR (EQUAL 1 0) (NOT (NUMBERP 1)))
(p J L K G H N))
(IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(OR (EQUAL J 0) (NOT (NUMBERP J))))
(p J L K G H N))
(IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(p (SUB1 J) L K G H N))
(p J L K G H N))).
Linear arithmetic, the lemmas SUB1-LESSEQP and SUB1-LESSP, and the definitions
of OR and NOT establish that the measure (COUNT J) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme generates four new goals:
Case 4. (IMPLIES (AND (OR (EQUAL 1 0) (NOT (NUMBERP 1)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) 0)
(NOT (EQUAL (NTH G 0) 1))
(EQUAL (NTH L K) 5))
(NOT (LESSP J 1))),
which simplifies, expanding the functions EQUAL, NUMBERP, NOT, and OR, to:
T.
Case 3. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(OR (EQUAL J 0) (NOT (NUMBERP J)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) 0)
(NOT (EQUAL (NTH G 0) 1))
(EQUAL (NTH L K) 5))
(NOT (LESSP J 1))),
which simplifies, rewriting with MOLWS-NUM-K and ZERO-NOT-MEMBER-NSET, and
opening up EQUAL, NUMBERP, NOT, and OR, to:
T.
Case 2. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(NOT (MEMBER (SUB1 J) (NSET N)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) 0)
(NOT (EQUAL (NTH G 0) 1))
(EQUAL (NTH L K) 5))
(NOT (LESSP J 1))).
This simplifies, appealing to the lemma MOLWS-NUM-K, and expanding EQUAL,
NUMBERP, NOT, OR, LESSP, and SUB1, to:
T.
Case 1. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(NOT (LESSP (SUB1 J) 1))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(EQUAL (NTH H K) 0)
(NOT (EQUAL (NTH G 0) 1))
(EQUAL (NTH L K) 5))
(NOT (LESSP J 1))).
This simplifies, rewriting with MOLWS-NUM-K, and unfolding the functions
EQUAL, NUMBERP, NOT, OR, LESSP, and SUB1, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
COND-L5
(PROVE-LEMMA J-NOT-IN-L4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0A N L H K J)
(AT L K 5)
(AT LP K 5)
(LESSP J (NTH HP K)))
(NOT (AT L J 4)))
((USE (LM-J-NOT-IN-L4) (COND-L5))))
WARNING: Note that J-NOT-IN-L4 contains the free variables HP, GP, LP, K, H,
G, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, unfolding AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
J-NOT-IN-L4
(PROVE-LEMMA K-IN-L5
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT LP K 5)
(LESSP J (NTH HP K)))
(AT L K 5))
((ENABLE MRHOI AT)))
WARNING: Note that K-IN-L5 contains the free variables HP, GP, LP, J, H, G,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER J (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH LP K) 5)
(LESSP J (NTH HP K)))
(EQUAL (NTH L K) 5)).
This simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, and NTH-NUMBERP, and unfolding the functions MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A,
MRHOI0, AT, MRHOI, and EQUAL, to 14 new goals:
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H)
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH H K)))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H)
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH H K)))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH HP K)))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4))
(EQUAL (NTH LP K) 5))
(NOT (EQUAL J 0))),
which again simplifies, rewriting with the lemma ZERO-NOT-MEMBER-NSET, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4))
(EQUAL (NTH LP K) 5))
(NOT (LESSP (SUB1 J) N))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH HP K)))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, MOVE-NTH,
MOLWS-LN-H, and MOLWS-LIST-H, and unfolding EQUAL, to the new conjecture:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4))
(NOT (LESSP J 1))),
which we will name *1.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH HP K)))).
However this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH H K)))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH HP K)))),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH LP K) 5))
(NOT (LESSP J K))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH HP K)))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL J 0))).
However this again simplifies, appealing to the lemma ZERO-NOT-MEMBER-NSET,
to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH LP K) 5))
(NOT (LESSP (SUB1 J) N))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0))
(EQUAL (NTH LP K) 5))
(NOT (LESSP J (NTH H K)))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to:
T.
So let us turn our attention to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4))
(NOT (LESSP J 1))),
which we named *1 above. We will try to prove it by induction. There is only
one suggested induction. We will induct according to the following scheme:
(AND (IMPLIES (OR (EQUAL 1 0) (NOT (NUMBERP 1)))
(p J L K N G H))
(IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(OR (EQUAL J 0) (NOT (NUMBERP J))))
(p J L K N G H))
(IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(p (SUB1 J) L K N G H))
(p J L K N G H))).
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 J) decreases
according to the well-founded relation LESSP in each induction step of the
scheme. The above induction scheme generates the following four new goals:
Case 4. (IMPLIES (AND (OR (EQUAL 1 0) (NOT (NUMBERP 1)))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4))
(NOT (LESSP J 1))).
This simplifies, opening up the functions EQUAL, NUMBERP, NOT, and OR, to:
T.
Case 3. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(OR (EQUAL J 0) (NOT (NUMBERP J)))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4))
(NOT (LESSP J 1))).
This simplifies, applying the lemmas MOLWS-NUM-K and ZERO-NOT-MEMBER-NSET,
and unfolding EQUAL, NUMBERP, NOT, and OR, to:
T.
Case 2. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(NOT (MEMBER (SUB1 J) (NSET N)))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4))
(NOT (LESSP J 1))).
This simplifies, applying the lemma MOLWS-NUM-K, and unfolding the
definitions of EQUAL, NUMBERP, NOT, OR, LESSP, and SUB1, to:
T.
Case 1. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL J 0) (NOT (NUMBERP J))))
(NOT (LESSP (SUB1 J) 1))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4))
(NOT (LESSP J 1))).
This simplifies, rewriting with MOLWS-NUM-K, and opening up the definitions
of EQUAL, NUMBERP, NOT, OR, LESSP, and SUB1, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.0 ]
K-IN-L5
(PROVE-LEMMA LM-B0A-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0A N L H K J)
(AT LP K 5)
(LESSP J (NTH HP K)))
(NOT (AT L J 4)))
((USE (K-IN-L5) (J-NOT-IN-L4))))
WARNING: Note that LM-B0A-I-EQ-K-J-NEQ-K contains the free variables HP, GP,
LP, K, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, LM-B0A-I-EQ-K-J-NEQ-K, could be applied
whenever the previously added lemma J-NOT-IN-L4 could.
This formula simplifies, rewriting with J-NOT-IN-L4, and unfolding the
definitions of AND, IMPLIES, and NOT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-B0A-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B0A-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LG N L G)
(B0A N L H K J))
(B0A N LP HP K J))
((ENABLE B0A)
(USE (LM-B0A-I-EQ-K-J-NEQ-K))))
WARNING: Note that B0A-I-EQ-K-J-NEQ-K contains the free variables GP, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations B0A, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0A N L H K J)
(AT LP K 5)
(LESSP J (NTH HP K)))
(NOT (AT L J 4)))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LG N L G)
(B0A N L H K J)
(AT LP K 5)
(LESSP J (NTH HP K)))
(NOT (AT LP J 4))).
This simplifies, rewriting with LM-B0A-I-EQ-K-J-NEQ-K, M-L-SAME-LP-AT, and
M-L-SAME-LP-AT-NOT, and expanding the functions B0A, AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0A-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B0A-I-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B0A N L H K K))
(B0A N LP HP K K))
((ENABLE AT B0A)))
WARNING: Note that B0A-I-J-EQ-K contains the free variables GP, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations AT, B0A, AND, and
IMPLIES, to the new conjecture:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B0A N L H K K)
(EQUAL (NTH LP K) 5)
(LESSP K (NTH HP K)))
(NOT (EQUAL (NTH LP K) 4))),
which simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0A-I-J-EQ-K
(PROVE-LEMMA B0A-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0A N L H K J))
(B0A N LP HP K J))
((USE (B0A-I-EQ-K-J-NEQ-K))))
WARNING: Note that B0A-I-EQ-K contains the free variables GP, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, B0A-I-EQ-K, could be applied whenever the
previously added lemma B0A-I-EQ-K-J-NEQ-K could.
This conjecture simplifies, applying B0A-I-J-EQ-K, and unfolding the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0A-I-EQ-K
(PROVE-LEMMA COND-LP4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(NOT (LESSP I (NTH H K))))
(NOT (AT LP K 4)))
((ENABLE MRHOI AT)))
WARNING: Note that COND-LP4 contains the free variables HP, GP, I, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 3)
(NOT (LESSP I (NTH H K))))
(NOT (EQUAL (NTH LP K) 4))).
This simplifies, applying the lemmas SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding the definitions of
MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B,
MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A,
MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, EQUAL, AT, and MRHOI, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4))
(EQUAL (NTH L K) 3)
(NOT (EQUAL I 0))
(NOT (LESSP (SUB1 I) N)))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, using linear arithmetic, applying N-NOT-LESS-J,
MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to:
(IMPLIES (AND (MOLWS N L G H)
(LESSP I 1)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 3)
(NOT (EQUAL I 0)))
(LESSP (SUB1 I) N)),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (NOT (NUMBERP I))
(MOLWS N L G H)
(LESSP I 1)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 3)
(NOT (EQUAL I 0)))
(LESSP (SUB1 I) N)).
However this again simplifies, applying MOLWS-NUM-K, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
COND-LP4
(PROVE-LEMMA NOT-L3-THEN-LP4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 3)))
(NOT (AT LP K 4)))
((ENABLE MRHOI AT)))
WARNING: Note that NOT-L3-THEN-LP4 contains the free variables HP, GP, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H)
and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH L K) 3)))
(NOT (EQUAL (NTH LP K) 4))),
which simplifies, rewriting with the lemmas SUB1-ADD1, MOLWS-NUM-K,
MOLWS-N-NOT-0, MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding the
functions MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8,
MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B,
MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, and EQUAL, to 14 new
conjectures:
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding EQUAL, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 4))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding the function EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the definition of EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
NOT-L3-THEN-LP4
(PROVE-LEMMA I-IN-L5
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B0B N L H I K)
(AT L I 5)
(LESSP K (NTH H I)))
(NOT (AT LP K 4)))
((ENABLE B0B)
(USE (COND-LP4) (NOT-L3-THEN-LP4))))
WARNING: Note that I-IN-L5 contains the free variables HP, GP, I, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, appealing to the lemma NOT-L3-THEN-LP4, and unfolding the
functions NOT, AND, IMPLIES, and B0B, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
I-IN-L5
(PROVE-LEMMA LM-B0A-I-NEQ-K-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0B N L H I K)
(AT LP I 5)
(LESSP K (NTH H I)))
(NOT (AT LP K 4)))
((USE (I-IN-L5))))
WARNING: Note that LM-B0A-I-NEQ-K-J-EQ-K contains the free variables HP, GP,
I, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with M-L-SAME-LP-AT and H-MRHOLEMMA, and
expanding the definitions of AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-B0A-I-NEQ-K-J-EQ-K
(PROVE-LEMMA B0A-I-NEQ-K-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0A N L H I K)
(B0B N L H I K))
(B0A N LP HP I K))
((ENABLE B0A)
(USE (LM-B0A-I-NEQ-K-J-EQ-K))))
WARNING: Note that B0A-I-NEQ-K-J-EQ-K contains the free variables GP, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations B0A, NOT, AND, and
IMPLIES, to the new goal:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0B N L H I K)
(AT LP I 5)
(LESSP K (NTH H I)))
(NOT (AT LP K 4)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0A N L H I K)
(B0B N L H I K)
(AT LP I 5)
(LESSP K (NTH HP I)))
(NOT (AT LP K 4))),
which simplifies, rewriting with the lemma H-MRHOLEMMA, and unfolding the
functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0A-I-NEQ-K-J-EQ-K
(PROVE-LEMMA B0A-I-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(B0A N L H I J)
(B0B N L H I J))
(B0A N LP HP I J))
((ENABLE B0A)))
WARNING: Note that B0A-I-J-NEQ-K contains the free variables GP, K, H, G, and
L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations B0A, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(B0A N L H I J)
(B0B N L H I J)
(AT LP I 5)
(LESSP J (NTH HP I)))
(NOT (AT LP J 4))).
This simplifies, rewriting with H-MRHOLEMMA and M-L-SAME-LP-AT, and expanding
the function B0A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0A-I-J-NEQ-K
(PROVE-LEMMA B0A-I-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0A N L H I J)
(B0B N L H I J))
(B0A N LP HP I J))
((USE (B0A-I-J-NEQ-K))))
WARNING: Note that B0A-I-NEQ-K contains the free variables GP, K, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, B0A-I-NEQ-K, could be applied whenever the
previously added lemma B0A-I-J-NEQ-K could.
WARNING: the newly proposed lemma, B0A-I-NEQ-K, could be applied whenever the
previously added lemma B0A-I-NEQ-K-J-EQ-K could.
This simplifies, applying the lemma B0A-I-NEQ-K-J-EQ-K, and expanding the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0A-I-NEQ-K
(PROVE-LEMMA RHO-PRESERVES-B0A NIL
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0A N L H I J)
(B0B N L H I J))
(B0A N LP HP I J))
((USE (B0A-I-NEQ-K) (B0A-I-EQ-K))))
This formula simplifies, opening up the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
RHO-PRESERVES-B0A
(PROVE-LEMMA B0B-IF1
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(AT L J 3))
(AT G J 1))
((ENABLE NSET AT LG LG-AT-N LG-1-AT-N)))
WARNING: Note that B0B-IF1 contains the free variables L and N which will be
chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
AT, to the formula:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH L J) 3))
(EQUAL (NTH G J) 1)).
Name the above subgoal *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 (ZEROP N) (p G J L N))
(IMPLIES (AND (NOT (ZEROP N))
(p G J L (SUB1 N)))
(p G J L N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme leads
to the following three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH L J) 3))
(EQUAL (NTH G J) 1)).
This simplifies, opening up the functions ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH L J) 3))
(EQUAL (NTH G J) 1)).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding the
definitions of ZEROP, NSET, MEMBER, LG-AT-N, AT, EQUAL, LG-1-AT-N, and LG,
to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL J 0)
(EQUAL (NTH L 0) 3))
(EQUAL (NTH G 0) 1)).
This again simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH L J) 3))
(EQUAL (NTH G J) 1)).
This simplifies, applying CDR-CONS and CAR-CONS, and opening up ZEROP, NSET,
MEMBER, LG-AT-N, AT, EQUAL, LG-1-AT-N, and LG, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(EQUAL J 0)
(EQUAL (NTH L 0) 3))
(EQUAL (NTH G 0) 1)).
This again simplifies, trivially, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
B0B-IF1
(PROVE-LEMMA B0B-IF3
(REWRITE)
(IMPLIES (AND (MEMBER I (NSET N))
(LG N L G)
(AT L I 5))
(NOT (UNION-AT-N G I '(0 1 2))))
((ENABLE LG LG-AT-N LG-2-AT-N UNION-AT-N AT NSET)))
WARNING: Note that B0B-IF3 contains the free variables L and N which will be
chosen by instantiating the hypotheses (MEMBER I (NSET N)) and (LG N L G).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (MEMBER I (NSET N))
(LG N L G)
(EQUAL (NTH L I) 5))
(NOT (MEMBER (NTH G I) '(0 1 2)))),
which simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to
three new formulas:
Case 3. (IMPLIES (AND (MEMBER I (NSET N))
(LG N L G)
(EQUAL (NTH L I) 5))
(NOT (EQUAL (NTH G I) 0))),
which we will name *1.
Case 2. (IMPLIES (AND (MEMBER I (NSET N))
(LG N L G)
(EQUAL (NTH L I) 5))
(NOT (EQUAL (NTH G I) 1))),
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:
(IMPLIES (AND (MEMBER I (NSET N))
(LG N L G)
(AT L I 5))
(NOT (UNION-AT-N G I '(0 1 2)))).
We gave this the name *1 above. 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 (ZEROP N) (p G I L N))
(IMPLIES (AND (NOT (ZEROP N))
(p G I L (SUB1 N)))
(p G I L N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to establish that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme produces three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER I (NSET N))
(LG N L G)
(AT L I 5))
(NOT (UNION-AT-N G I '(0 1 2)))),
which simplifies, opening up the definitions of ZEROP, NSET, LISTP, and
MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER I (NSET (SUB1 N))))
(MEMBER I (NSET N))
(LG N L G)
(AT L I 5))
(NOT (UNION-AT-N G I '(0 1 2)))),
which simplifies, applying CDR-CONS and CAR-CONS, and unfolding ZEROP, NSET,
MEMBER, AT, LISTP, CAR, CDR, and UNION-AT-N, to the following three new
conjectures:
Case 2.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER I (NSET (SUB1 N))))
(EQUAL I N)
(LG I L G)
(EQUAL (NTH L I) 5))
(NOT (EQUAL (NTH G I) 0))).
However this again simplifies, using linear arithmetic, applying
N-NOT-LESS-J, and expanding LG, LG-2-AT-N, EQUAL, AT, and LG-AT-N, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER I (NSET (SUB1 N))))
(EQUAL I N)
(LG I L G)
(EQUAL (NTH L I) 5))
(NOT (EQUAL (NTH G I) 1))).
But this again simplifies, using linear arithmetic, rewriting with
N-NOT-LESS-J, and unfolding the definitions of LG, LG-2-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER I (NSET (SUB1 N))))
(EQUAL I N)
(LG I L G)
(EQUAL (NTH L I) 5))
(NOT (EQUAL (NTH G I) 2))).
This again simplifies, using linear arithmetic, rewriting with
N-NOT-LESS-J, and opening up the definitions of LG, LG-2-AT-N, EQUAL, AT,
and LG-AT-N, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER I (NSET N))
(LG N L G)
(AT L I 5))
(NOT (UNION-AT-N G I '(0 1 2)))).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the
functions ZEROP, NSET, MEMBER, AT, LISTP, CAR, CDR, UNION-AT-N, LG,
LG-2-AT-N, EQUAL, and LG-AT-N, to three new formulas:
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL I N)
(LG I L G)
(EQUAL (NTH L I) 5))
(NOT (EQUAL (NTH G I) 0))),
which again simplifies, expanding LG, LG-2-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL I N)
(LG I L G)
(EQUAL (NTH L I) 5))
(NOT (EQUAL (NTH G I) 1))),
which again simplifies, expanding the definitions of LG, LG-2-AT-N, EQUAL,
AT, and LG-AT-N, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL I N)
(LG I L G)
(EQUAL (NTH L I) 5))
(NOT (EQUAL (NTH G I) 2))),
which again simplifies, expanding LG, LG-2-AT-N, EQUAL, AT, and LG-AT-N,
to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.2 0.1 ]
B0B-IF3
(PROVE-LEMMA LM-J-NEQ-H-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L J 3)
(NOT (AT G (NTH H K) 1)))
(NOT (AT H K J)))
((ENABLE AT) (USE (B0B-IF1))))
WARNING: Note that LM-J-NEQ-H-K contains the free variables HP, GP, LP, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to the formula:
(IMPLIES (AND (IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH L J) 3))
(EQUAL (NTH G J) 1))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER J (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EQUAL (NTH L J) 3)
(NOT (EQUAL (NTH G (NTH H K)) 1)))
(NOT (EQUAL (NTH H K) J))).
This simplifies, opening up the definitions of EQUAL, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-J-NEQ-H-K
(PROVE-LEMMA H-K-NOT-G1
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 5)
(AT LP K 5))
(NOT (AT G (NTH H K) 1)))
((ENABLE MRHOI AT)))
WARNING: Note that H-K-NOT-G1 contains the free variables HP, GP, LP, L, and
N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, H-K-NOT-G1, could be applied whenever the
previously added lemma L5-NOT-G1 could.
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
AT, to the new formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL (NTH G (NTH H K)) 1))),
which simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, and NTH-NUMBERP, and unfolding the definitions of MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A,
MRHOI0, EQUAL, AT, and MRHOI, to the following three new conjectures:
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL (NTH G (NTH H K)) 1))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL (NTH G 0) 1))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the function EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 5))
(NOT (EQUAL (NTH G (ADD1 N)) 1))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up the function EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
H-K-NOT-G1
(PROVE-LEMMA J-NEQ-H-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT LP K 5)
(AT L K 5)
(AT L J 3))
(NOT (AT H K J)))
((USE (H-K-NOT-G1) (LM-J-NEQ-H-K))))
WARNING: Note that J-NEQ-H-K contains the free variables HP, GP, LP, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with H-K-NOT-G1 and LM-J-NEQ-H-K, and
unfolding the functions AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
J-NEQ-H-K
(PROVE-LEMMA N-K-LEQ-SUB1-I
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H K I))
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K))))
((ENABLE AT)))
WARNING: When the linear lemma N-K-LEQ-SUB1-I is stored under (NTH H K) it
contains the free variables HP, GP, LP, I, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma N-K-LEQ-SUB1-I is to be stored as zero
type prescription rules, zero compound recognizer rules, one linear rule, and
zero replacement rules.
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH H K) I))
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K)))).
This simplifies, using linear arithmetic, to the following three new goals:
Case 3. (IMPLIES (AND (NOT (NUMBERP (NTH H K)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH H K) I))
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K)))).
However this again simplifies, applying the lemma NTH-NUMBERP, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP I))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH H K) I))
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K)))),
which again simplifies, applying MOLWS-NUM-K, to:
T.
Case 1. (IMPLIES (AND (NUMBERP I)
(NUMBERP (NTH H K))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH H K) (NTH H K)))
(NOT (LESSP (NTH H K) (NTH H K))))
(NOT (LESSP (SUB1 (NTH H K)) (NTH H K)))).
This again simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
N-K-LEQ-SUB1-I
(PROVE-LEMMA LM1-J-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0B N L H K J)
(AT L K 5)
(AT LP K 5)
(AT L J 3)
(LESSP (SUB1 J) (NTH H K)))
(NOT (LESSP K (NTH H J))))
((ENABLE B0B) (USE (J-NEQ-H-K))))
WARNING: When the linear lemma LM1-J-IN-L3 is stored under (NTH H J) it
contains the free variables HP, GP, LP, K, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER K (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM1-J-IN-L3 is to be stored as zero
type prescription rules, zero compound recognizer rules, one linear rule, and
zero replacement rules.
This simplifies, applying J-NEQ-H-K, and unfolding AND, NOT, IMPLIES, and B0B,
to the new formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(NOT (LESSP J (NTH H K)))
(AT L K 5)
(AT LP K 5)
(AT L J 3)
(LESSP (SUB1 J) (NTH H K)))
(NOT (LESSP K (NTH H J)))),
which again simplifies, using linear arithmetic and applying N-K-LEQ-SUB1-I
and J-NEQ-H-K, to the new goal:
(IMPLIES (AND (LESSP J 1)
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(NOT (LESSP J (NTH H K)))
(AT L K 5)
(AT LP K 5)
(AT L J 3)
(LESSP (SUB1 J) (NTH H K)))
(NOT (LESSP K (NTH H J)))),
which again simplifies, using linear arithmetic, to three new conjectures:
Case 3. (IMPLIES (AND (NOT (NUMBERP (NTH H K)))
(LESSP J 1)
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(NOT (LESSP J (NTH H K)))
(AT L K 5)
(AT LP K 5)
(AT L J 3)
(LESSP (SUB1 J) (NTH H K)))
(NOT (LESSP K (NTH H J)))),
which again simplifies, applying the lemma NTH-NUMBERP, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP J))
(LESSP J 1)
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(NOT (LESSP J (NTH H K)))
(AT L K 5)
(AT LP K 5)
(AT L J 3)
(LESSP (SUB1 J) (NTH H K)))
(NOT (LESSP K (NTH H J)))),
which again simplifies, rewriting with the lemma MOLWS-NUM-K, to:
T.
Case 1. (IMPLIES (AND (NUMBERP J)
(NUMBERP (NTH H K))
(LESSP (NTH H K) 1)
(MOLWS N L G H)
(MEMBER (NTH H K) (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(NOT (LESSP (NTH H K) (NTH H K)))
(AT L K 5)
(AT LP K 5)
(AT L (NTH H K) 3)
(LESSP (SUB1 (NTH H K)) (NTH H K)))
(NOT (LESSP K (NTH H (NTH H K))))),
which again simplifies, using linear arithmetic and rewriting with
N-K-LEQ-SUB1-I and J-NEQ-H-K, to the new conjecture:
(IMPLIES (AND (EQUAL (NTH H K) 0)
(NUMBERP J)
(NUMBERP (NTH H K))
(LESSP (NTH H K) 1)
(MOLWS N L G H)
(MEMBER (NTH H K) (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(NOT (LESSP (NTH H K) (NTH H K)))
(AT L K 5)
(AT LP K 5)
(AT L (NTH H K) 3)
(LESSP (SUB1 (NTH H K)) (NTH H K)))
(NOT (LESSP K (NTH H (NTH H K))))),
which again simplifies, applying ZERO-NOT-MEMBER-NSET, and unfolding NUMBERP
and LESSP, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM1-J-IN-L3
(PROVE-LEMMA LM-J-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0B N L H K J)
(AT L K 5)
(AT LP K 5)
(AT L J 3)
(LESSP J (NTH HP K)))
(NOT (LESSP K (NTH H J))))
((USE (LM1-J-IN-L3) (COND-L5))))
WARNING: When the linear lemma LM-J-IN-L3 is stored under (NTH H J) it
contains the free variables HP, GP, LP, K, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER K (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM-J-IN-L3 is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This formula simplifies, expanding the functions AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-J-IN-L3
(PROVE-LEMMA J-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0B N L H K J)
(AT LP K 5)
(AT L J 3)
(LESSP J (NTH HP K)))
(NOT (LESSP K (NTH H J))))
((USE (K-IN-L5) (LM-J-IN-L3))))
WARNING: When the linear lemma J-IN-L3 is stored under (NTH H J) it contains
the free variables HP, GP, LP, K, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER K (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma J-IN-L3 is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This simplifies, expanding the functions AND, IMPLIES, and NOT, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
J-IN-L3
(PROVE-LEMMA LM-B0B-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LG N L G)
(B0B N L H K J)
(AT LP K 5)
(AT LP J 3)
(LESSP J (NTH HP K)))
(NOT (LESSP K (NTH H J))))
((USE (J-IN-L3))))
WARNING: When the linear lemma LM-B0B-I-EQ-K-J-NEQ-K is stored under
(NTH H J) it contains the free variables HP, GP, LP, K, G, L, and N which will
be chosen by instantiating the hypotheses (MOLWS N L G H), (MEMBER K (NSET N)),
and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM-B0B-I-EQ-K-J-NEQ-K is to be stored
as zero type prescription rules, zero compound recognizer rules, one linear
rule, and zero replacement rules.
This simplifies, applying M-L-SAME-LP-AT and H-MRHOLEMMA, and opening up the
functions AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-B0B-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B0B-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LG N L G)
(B0B N L H K J))
(B0B N LP HP K J))
((ENABLE B0B)
(USE (LM-B0B-I-EQ-K-J-NEQ-K))))
WARNING: Note that B0B-I-EQ-K-J-NEQ-K contains the free variables GP, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations B0B, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LG N L G)
(B0B N L H K J)
(AT LP K 5)
(AT LP J 3)
(LESSP J (NTH HP K)))
(NOT (LESSP K (NTH H J))))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LG N L G)
(B0B N L H K J)
(AT LP K 5)
(LESSP J (NTH HP K))
(AT LP J 3))
(NOT (LESSP K (NTH HP J)))),
which simplifies, rewriting with H-MRHOLEMMA and M-L-SAME-LP-AT, and opening
up the functions NOT, B0B, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0B-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B0B-I-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G))
(B0B N LP HP K K))
((ENABLE B0B AT)))
WARNING: Note that B0B-I-J-EQ-K contains the free variables GP, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations AT, B0B, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EQUAL (NTH LP K) 5)
(LESSP K (NTH HP K)))
(NOT (EQUAL (NTH LP K) 3))),
which simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0B-I-J-EQ-K
(PROVE-LEMMA B0B-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0B N L H K J))
(B0B N LP HP K J))
((USE (B0B-I-EQ-K-J-NEQ-K)
(B0B-I-J-EQ-K))))
WARNING: Note that B0B-I-EQ-K contains the free variables GP, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, B0B-I-EQ-K, could be applied whenever the
previously added lemma B0B-I-EQ-K-J-NEQ-K could.
This simplifies, applying B0B-I-J-EQ-K, and unfolding the functions NOT, AND,
and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0B-I-EQ-K
(PROVE-LEMMA LM-I-NEQ-H-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(UNION-AT-N G (NTH H K) '(0 1 2)))
(NOT (AT H K I)))
((ENABLE AT) (USE (B0B-IF3))))
WARNING: Note that LM-I-NEQ-H-K contains the free variables HP, GP, LP, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to the formula:
(IMPLIES (AND (IMPLIES (AND (MEMBER I (NSET N))
(LG N L G)
(EQUAL (NTH L I) 5))
(NOT (UNION-AT-N G I '(0 1 2))))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EQUAL (NTH L I) 5)
(UNION-AT-N G (NTH H K) '(0 1 2)))
(NOT (EQUAL (NTH H K) I))).
This simplifies, rewriting with B0B-IF3, and opening up EQUAL, AND, AT, NOT,
and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-I-NEQ-H-K
(PROVE-LEMMA H-K-G02
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3))
(UNION-AT-N G (NTH H K) '(0 1 2)))
((ENABLE AT MRHOI)))
WARNING: Note that H-K-G02 contains the free variables HP, GP, LP, L, and N
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 3)
(EQUAL (NTH LP K) 3))
(UNION-AT-N G (NTH H K) '(0 1 2))).
This simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, and NTH-NUMBERP, and unfolding MRHOI12, MRHOI11B, MRHOI11A, MRHOI10,
MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A,
MRHOI4, MRHOI3B, LESSP, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, EQUAL, AT,
and MRHOI, to the goal:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4))
(EQUAL (NTH L K) 3)
(EQUAL (NTH LP K) 3))
(UNION-AT-N G (ADD1 N) '(0 1 2))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the function EQUAL, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
H-K-G02
(PROVE-LEMMA I-NEQ-H-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(AT L K 3)
(AT LP K 3))
(NOT (AT H K I)))
((USE (H-K-G02) (LM-I-NEQ-H-K))))
WARNING: Note that I-NEQ-H-K contains the free variables HP, GP, LP, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This simplifies, applying the lemmas H-K-G02 and LM-I-NEQ-H-K, and unfolding
the functions AND, IMPLIES, and NOT, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
I-NEQ-H-K
(PROVE-LEMMA LM1-K-IN-L3-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(AT L K 3)
(AT LP K 3)
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K))))
((USE (I-NEQ-H-K) (N-K-LEQ-SUB1-I))))
WARNING: When the linear lemma LM1-K-IN-L3-IMP is stored under (NTH H K) it
contains the free variables HP, GP, LP, I, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM1-K-IN-L3-IMP 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 appealing to the
lemmas N-K-LEQ-SUB1-I and I-NEQ-H-K, to:
(IMPLIES (AND (LESSP I 1)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(AT L K 3)
(AT LP K 3))
(NOT (AT H K I)))
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H K I))
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K))))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(AT L K 3)
(AT LP K 3)
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K)))).
But this again simplifies, using linear arithmetic, to three new goals:
Case 3. (IMPLIES (AND (NOT (NUMBERP (NTH H K)))
(LESSP I 1)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(AT L K 3)
(AT LP K 3))
(NOT (AT H K I)))
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H K I))
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K))))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(AT L K 3)
(AT LP K 3)
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K)))),
which again simplifies, applying the lemma NTH-NUMBERP, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP I))
(LESSP I 1)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(AT L K 3)
(AT LP K 3))
(NOT (AT H K I)))
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H K I))
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K))))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L I 5)
(AT L K 3)
(AT LP K 3)
(NOT (LESSP I (NTH H K))))
(NOT (LESSP (SUB1 I) (NTH H K)))),
which again simplifies, rewriting with the lemma MOLWS-NUM-K, to:
T.
Case 1. (IMPLIES (AND (NUMBERP I)
(NUMBERP (NTH H K))
(LESSP (NTH H K) 1)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L (NTH H K) 5)
(AT L K 3)
(AT LP K 3))
(NOT (AT H K (NTH H K))))
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H K (NTH H K)))
(NOT (LESSP (NTH H K) (NTH H K))))
(NOT (LESSP (SUB1 (NTH H K)) (NTH H K))))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L (NTH H K) 5)
(AT L K 3)
(AT LP K 3)
(NOT (LESSP (NTH H K) (NTH H K))))
(NOT (LESSP (SUB1 (NTH H K)) (NTH H K)))),
which again simplifies, using linear arithmetic and rewriting with the
lemmas N-K-LEQ-SUB1-I and I-NEQ-H-K, to:
(IMPLIES (AND (EQUAL (NTH H K) 0)
(NUMBERP I)
(NUMBERP (NTH H K))
(LESSP (NTH H K) 1)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L (NTH H K) 5)
(AT L K 3)
(AT LP K 3))
(NOT (AT H K (NTH H K))))
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H K (NTH H K)))
(NOT (LESSP (NTH H K) (NTH H K))))
(NOT (LESSP (SUB1 (NTH H K)) (NTH H K))))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (NTH H K) (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L (NTH H K) 5)
(AT L K 3)
(AT LP K 3)
(NOT (LESSP (NTH H K) (NTH H K))))
(NOT (LESSP (SUB1 (NTH H K)) (NTH H K)))).
But this again simplifies, applying ZERO-NOT-MEMBER-NSET and I-NEQ-H-K, and
opening up the definitions of NUMBERP, LESSP, AND, NOT, IMPLIES, and SUB1,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM1-K-IN-L3-IMP
(PROVE-LEMMA LM-K-IN-L3-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0B N L H I K)
(AT L I 5)
(AT L K 3)
(AT LP K 3)
(LESSP K (NTH H I)))
(NOT (LESSP (SUB1 I) (NTH H K))))
((ENABLE B0B)
(USE (LM1-K-IN-L3-IMP))))
WARNING: When the linear lemma LM-K-IN-L3-IMP is stored under (NTH H K) it
contains the free variables HP, GP, LP, I, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM-K-IN-L3-IMP is to be stored as zero
type prescription rules, zero compound recognizer rules, one linear rule, and
zero replacement rules.
This formula simplifies, unfolding the functions NOT, AND, IMPLIES, and B0B,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-K-IN-L3-IMP
(PROVE-LEMMA COND-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(LESSP I (NTH HP K)))
(LESSP (SUB1 I) (NTH H K)))
((ENABLE MRHOI AT)))
WARNING: When the linear lemma COND-L3 is stored under (NTH H K) it contains
the free variables HP, GP, LP, I, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma COND-L3 is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
AT, to the formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 3)
(LESSP I (NTH HP K)))
(LESSP (SUB1 I) (NTH H K))).
This simplifies, rewriting with SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A,
MRHOI0, EQUAL, AT, MRHOI, and SUB1, to three new goals:
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL GP G)
(EQUAL LP L)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2))
(EQUAL (NTH L K) 3)
(LESSP I (NTH HP K)))
(LESSP (SUB1 I) (NTH H K))),
which again simplifies, rewriting with the lemmas MOLWS-LN-H, MOLWS-LIST-H,
MOVE-NTH, SUB1-ADD1, NTH-NUMBERP, and MOLWS-NUM-K, and expanding the
functions LESSP, SUB1, and EQUAL, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(LESSP (SUB1 (NTH H K)) N)
(UNION-AT-N G (NTH H K) '(0 1 2))
(EQUAL (NTH L K) 3)
(EQUAL I 0))
(NOT (EQUAL (NTH H K) 0))).
But this again simplifies, applying ZERO-NOT-MEMBER-NSET, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL GP G)
(EQUAL LP L)
(EQUAL (NTH H K) 0)
(EQUAL HP (MOVE H K (ADD1 (NTH H K))))
(UNION-AT-N G (NTH H K) '(0 1 2))
(EQUAL (NTH L K) 3))
(NOT (LESSP I (NTH HP K)))).
However this again simplifies, applying MOLWS-LN-H, MOLWS-LIST-H, and
MOVE-NTH, to the new conjecture:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) 0)
(UNION-AT-N G 0 '(0 1 2))
(EQUAL (NTH L K) 3))
(NOT (LESSP I 1))),
which we will name *1.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4))
(EQUAL (NTH L K) 3)
(LESSP (SUB1 I) N)
(NOT (EQUAL (SUB1 I) 0)))
(LESSP (SUB1 (SUB1 I)) N)).
But this again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP I 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 3)
(LESSP (SUB1 I) N)
(NOT (EQUAL (SUB1 I) 0)))
(LESSP (SUB1 (SUB1 I)) N)).
Appealing to the lemma SUB1-ELIM, we now replace I by (ADD1 X) to eliminate
(SUB1 I) and X by (ADD1 Z) to eliminate (SUB1 X). We use the type
restriction lemma noted when SUB1 was introduced to constrain the new
variable. This generates three new goals:
Case 1.3.
(IMPLIES (AND (EQUAL I 0)
(LESSP I 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 3)
(LESSP (SUB1 I) N)
(NOT (EQUAL (SUB1 I) 0)))
(LESSP (SUB1 (SUB1 I)) N)),
which further simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and opening
up the function LESSP, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (NUMBERP I))
(LESSP I 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 3)
(LESSP (SUB1 I) N)
(NOT (EQUAL (SUB1 I) 0)))
(LESSP (SUB1 (SUB1 I)) N)).
But this further simplifies, rewriting with MOLWS-NUM-K, to:
T.
Case 1.1.
(IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 (ADD1 Z)) 0))
(LESSP (ADD1 (ADD1 Z)) 1)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER (ADD1 (ADD1 Z)) (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 3)
(LESSP (ADD1 Z) N)
(NOT (EQUAL (ADD1 Z) 0)))
(LESSP Z N)).
However this further simplifies, using linear arithmetic, to:
T.
So next consider:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) 0)
(UNION-AT-N G 0 '(0 1 2))
(EQUAL (NTH L K) 3))
(NOT (LESSP I 1))),
named *1 above. Let us appeal to the induction principle. There is only one
suggested induction. We will induct according to the following scheme:
(AND (IMPLIES (OR (EQUAL 1 0) (NOT (NUMBERP 1)))
(p I L K G H N))
(IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(OR (EQUAL I 0) (NOT (NUMBERP I))))
(p I L K G H N))
(IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL I 0) (NOT (NUMBERP I))))
(p (SUB1 I) L K G H N))
(p I L K G H N))).
Linear arithmetic, the lemmas SUB1-LESSEQP and SUB1-LESSP, and the definitions
of OR and NOT inform us that the measure (COUNT I) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme generates four new goals:
Case 4. (IMPLIES (AND (OR (EQUAL 1 0) (NOT (NUMBERP 1)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) 0)
(UNION-AT-N G 0 '(0 1 2))
(EQUAL (NTH L K) 3))
(NOT (LESSP I 1))),
which simplifies, opening up the definitions of EQUAL, NUMBERP, NOT, and OR,
to:
T.
Case 3. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(OR (EQUAL I 0) (NOT (NUMBERP I)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) 0)
(UNION-AT-N G 0 '(0 1 2))
(EQUAL (NTH L K) 3))
(NOT (LESSP I 1))),
which simplifies, rewriting with the lemmas MOLWS-NUM-K and
ZERO-NOT-MEMBER-NSET, and unfolding the definitions of EQUAL, NUMBERP, NOT,
and OR, to:
T.
Case 2. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL I 0) (NOT (NUMBERP I))))
(NOT (MEMBER (SUB1 I) (NSET N)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) 0)
(UNION-AT-N G 0 '(0 1 2))
(EQUAL (NTH L K) 3))
(NOT (LESSP I 1))),
which simplifies, applying MOLWS-NUM-K, and opening up the functions EQUAL,
NUMBERP, NOT, OR, LESSP, and SUB1, to:
T.
Case 1. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL I 0) (NOT (NUMBERP I))))
(NOT (LESSP (SUB1 I) 1))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MEMBER I (NSET N))
(EQUAL (NTH H K) 0)
(UNION-AT-N G 0 '(0 1 2))
(EQUAL (NTH L K) 3))
(NOT (LESSP I 1))).
This simplifies, applying the lemma MOLWS-NUM-K, and expanding the functions
EQUAL, NUMBERP, NOT, OR, LESSP, and SUB1, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.1 ]
COND-L3
(PROVE-LEMMA K-IN-L3-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0B N L H I K)
(AT L I 5)
(AT L K 3)
(AT LP K 3)
(LESSP K (NTH H I)))
(NOT (LESSP I (NTH HP K))))
((USE (LM-K-IN-L3-IMP) (COND-L3))))
WARNING: When the linear lemma K-IN-L3-IMP is stored under (NTH HP K) it
contains the free variables GP, LP, I, H, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma K-IN-L3-IMP is to be stored as zero
type prescription rules, zero compound recognizer rules, one linear rule, and
zero replacement rules.
This formula simplifies, expanding the functions AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-IN-L3-IMP
(PROVE-LEMMA K-IN-L2-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT LP K 3)
(AT L K 2))
(NOT (LESSP I (NTH HP K))))
((ENABLE MRHOI AT)))
WARNING: When the linear lemma K-IN-L2-IMP is stored under (NTH HP K) it
contains the free variables GP, LP, I, H, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma K-IN-L2-IMP is to be stored as zero
type prescription rules, zero compound recognizer rules, one linear rule, and
zero replacement rules.
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to the formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH LP K) 3)
(EQUAL (NTH L K) 2))
(NOT (LESSP I (NTH HP K)))).
This simplifies, unfolding the definitions of MRHOI12, MRHOI11B, MRHOI11A,
MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B,
MRHOI5A, MRHOI4, MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, EQUAL, AT,
and MRHOI, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 3)
(EQUAL (NTH L K) 2))
(NOT (LESSP I (NTH HP K)))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
MOVE-NTH, MOLWS-LN-H, and MOLWS-LIST-H, and opening up EQUAL, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2))
(NOT (LESSP I 1))).
Name the above subgoal *1.
We will appeal to induction. There is only one plausible induction. We
will induct according to the following scheme:
(AND (IMPLIES (OR (EQUAL 1 0) (NOT (NUMBERP 1)))
(p I L K N G H))
(IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(OR (EQUAL I 0) (NOT (NUMBERP I))))
(p I L K N G H))
(IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL I 0) (NOT (NUMBERP I))))
(p (SUB1 I) L K N G H))
(p I L K N G H))).
Linear arithmetic, the lemmas SUB1-LESSEQP and SUB1-LESSP, and the definitions
of OR and NOT inform us that the measure (COUNT I) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme generates the following four new formulas:
Case 4. (IMPLIES (AND (OR (EQUAL 1 0) (NOT (NUMBERP 1)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2))
(NOT (LESSP I 1))).
This simplifies, opening up EQUAL, NUMBERP, NOT, and OR, to:
T.
Case 3. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(OR (EQUAL I 0) (NOT (NUMBERP I)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2))
(NOT (LESSP I 1))).
This simplifies, rewriting with MOLWS-NUM-K and ZERO-NOT-MEMBER-NSET, and
opening up the functions EQUAL, NUMBERP, NOT, and OR, to:
T.
Case 2. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL I 0) (NOT (NUMBERP I))))
(NOT (MEMBER (SUB1 I) (NSET N)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2))
(NOT (LESSP I 1))),
which simplifies, rewriting with MOLWS-NUM-K, and opening up the definitions
of EQUAL, NUMBERP, NOT, OR, LESSP, and SUB1, to:
T.
Case 1. (IMPLIES (AND (NOT (OR (EQUAL 1 0) (NOT (NUMBERP 1))))
(NOT (OR (EQUAL I 0) (NOT (NUMBERP I))))
(NOT (LESSP (SUB1 I) 1))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2))
(NOT (LESSP I 1))).
This simplifies, applying the lemma MOLWS-NUM-K, and opening up EQUAL,
NUMBERP, NOT, OR, LESSP, and SUB1, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
K-IN-L2-IMP
(PROVE-LEMMA LP3-THEN-L2-OR-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT LP K 3)
(NOT (AT L K 2)))
(AT L K 3))
((ENABLE MRHOI AT)))
WARNING: Note that LP3-THEN-L2-OR-L3 contains the free variables HP, GP, LP,
I, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to the formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH LP K) 3)
(NOT (EQUAL (NTH L K) 2)))
(EQUAL (NTH L K) 3)).
This simplifies, rewriting with SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A,
MRHOI0, AT, MRHOI, and EQUAL, to 13 new goals:
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 3))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 3))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the function EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 3))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 3))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))).
However this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the function EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 3))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Q.E.D.
[ 0.0 0.2 0.1 ]
LP3-THEN-L2-OR-L3
(PROVE-LEMMA B0B-I-IN-L5
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0B N L H I K)
(AT L I 5)
(AT LP K 3)
(LESSP K (NTH H I)))
(NOT (LESSP I (NTH HP K))))
((USE (LP3-THEN-L2-OR-L3)
(K-IN-L3-IMP)
(K-IN-L2-IMP))))
WARNING: When the linear lemma B0B-I-IN-L5 is stored under (NTH HP K) it
contains the free variables GP, LP, I, H, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma B0B-I-IN-L5 is to be stored as zero
type prescription rules, zero compound recognizer rules, one linear rule, and
zero replacement rules.
This simplifies, opening up the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0B-I-IN-L5
(PROVE-LEMMA LM-B0B-I-NEQ-K-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0B N L H I K)
(LG N L G)
(AT LP I 5)
(AT LP K 3)
(LESSP K (NTH H I)))
(NOT (LESSP I (NTH HP K))))
((USE (B0B-I-IN-L5)
(M-L-SAME-LP-AT (J I) (M 5)))))
WARNING: When the linear lemma LM-B0B-I-NEQ-K-J-EQ-K is stored under
(NTH HP K) it contains the free variables GP, LP, I, H, G, L, and N which will
be chosen by instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)),
and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM-B0B-I-NEQ-K-J-EQ-K is to be stored
as zero type prescription rules, zero compound recognizer rules, one linear
rule, and zero replacement rules.
This formula simplifies, applying M-L-SAME-LP-AT and H-MRHOLEMMA, and
unfolding AND, NOT, IMPLIES, and NUMBERP, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-B0B-I-NEQ-K-J-EQ-K
(PROVE-LEMMA B0B-I-NEQ-K-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0B N L H I K)
(LG N L G))
(B0B N LP HP I K))
((ENABLE B0B)
(USE (LM-B0B-I-NEQ-K-J-EQ-K))))
WARNING: Note that B0B-I-NEQ-K-J-EQ-K contains the free variables GP, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations B0B, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0B N L H I K)
(LG N L G)
(AT LP I 5)
(AT LP K 3)
(LESSP K (NTH H I)))
(NOT (LESSP I (NTH HP K))))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B0B N L H I K)
(LG N L G)
(AT LP I 5)
(LESSP K (NTH HP I))
(AT LP K 3))
(NOT (LESSP I (NTH HP K)))),
which simplifies, rewriting with H-MRHOLEMMA and M-L-SAME-LP-AT, and opening
up the functions NOT, B0B, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0B-I-NEQ-K-J-EQ-K
(PROVE-LEMMA B0B-I-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(B0B N L H I J))
(B0B N LP HP I J))
((ENABLE B0B)))
WARNING: Note that B0B-I-J-NEQ-K contains the free variables GP, K, H, G, and
L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations B0B, NOT, AND, and
IMPLIES, to the new goal:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(B0B N L H I J)
(AT LP I 5)
(LESSP J (NTH HP I))
(AT LP J 3))
(NOT (LESSP I (NTH HP J)))),
which simplifies, applying H-MRHOLEMMA and M-L-SAME-LP-AT, and expanding the
function B0B, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0B-I-J-NEQ-K
(PROVE-LEMMA B0B-I-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(LG N L G)
(B0B N L H I J))
(B0B N LP HP I J))
((USE (B0B-I-J-NEQ-K)
(B0B-I-NEQ-K-J-EQ-K))))
WARNING: Note that B0B-I-NEQ-K contains the free variables GP, K, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, B0B-I-NEQ-K, could be applied whenever the
previously added lemma B0B-I-NEQ-K-J-EQ-K could.
This simplifies, opening up NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B0B-I-NEQ-K
(PROVE-LEMMA RHO-PRESERVES-B0B NIL
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(B0B N L H I J))
(B0B N LP HP I J))
((USE (B0B-I-NEQ-K) (B0B-I-EQ-K))))
This simplifies, expanding NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
RHO-PRESERVES-B0B
(PROVE-LEMMA LM-H-K-EQ-ADD1-N-NEX-HINT
(REWRITE)
(IMPLIES (AND (NOT (ZEROP N))
(LISTP H)
(NOT (LESSP N I))
(MEMBER K (NSET N))
(LESSP N (NTH H K)))
(NOT (EXIST-HINT-8-12-3-4 I L G H K)))
((ENABLE EXIST-HINT-8-12-3-4 HINT-8-12-3-4-AT-N AT)))
WARNING: Note that LM-H-K-EQ-ADD1-N-NEX-HINT contains the free variable N
which will be chosen by instantiating the hypothesis (NOT (ZEROP N)).
This formula can be simplified, using the abbreviations ZEROP, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LISTP H)
(NOT (LESSP N I))
(MEMBER K (NSET N))
(LESSP N (NTH H K)))
(NOT (EXIST-HINT-8-12-3-4 I L G H K))),
which we will name *1.
Perhaps we can prove it by induction. There is only one plausible
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP I) (p I L G H K N))
(IMPLIES (AND (NOT (ZEROP I))
(HINT-8-12-3-4-AT-N I L G H K))
(p I L G H K N))
(IMPLIES (AND (NOT (ZEROP I))
(NOT (HINT-8-12-3-4-AT-N I L G H K))
(p (SUB1 I) L G H K N))
(p I L G H K N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT I) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme leads
to the following four new goals:
Case 4. (IMPLIES (AND (ZEROP I)
(NOT (EQUAL N 0))
(NUMBERP N)
(LISTP H)
(NOT (LESSP N I))
(MEMBER K (NSET N))
(LESSP N (NTH H K)))
(NOT (EXIST-HINT-8-12-3-4 I L G H K))).
This simplifies, opening up the functions ZEROP, EQUAL, LESSP, and
EXIST-HINT-8-12-3-4, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP I))
(HINT-8-12-3-4-AT-N I L G H K)
(NOT (EQUAL N 0))
(NUMBERP N)
(LISTP H)
(NOT (LESSP N I))
(MEMBER K (NSET N))
(LESSP N (NTH H K)))
(NOT (EXIST-HINT-8-12-3-4 I L G H K))).
This simplifies, unfolding the functions ZEROP, HINT-8-12-3-4-AT-N, and
EXIST-HINT-8-12-3-4, to:
(IMPLIES (AND (NOT (EQUAL I 0))
(NUMBERP I)
(INTERSECT-8-12-3-4-AT-N I L G)
(NOT (LESSP I (NTH H K)))
(NOT (EQUAL N 0))
(NUMBERP N)
(LISTP H)
(NOT (LESSP N I))
(MEMBER K (NSET N)))
(NOT (LESSP N (NTH H K)))),
which again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP I))
(NOT (HINT-8-12-3-4-AT-N I L G H K))
(LESSP N (SUB1 I))
(NOT (EQUAL N 0))
(NUMBERP N)
(LISTP H)
(NOT (LESSP N I))
(MEMBER K (NSET N))
(LESSP N (NTH H K)))
(NOT (EXIST-HINT-8-12-3-4 I L G H K))),
which simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP I 1)
(NOT (ZEROP I))
(NOT (HINT-8-12-3-4-AT-N I L G H K))
(LESSP N (SUB1 I))
(NOT (EQUAL N 0))
(NUMBERP N)
(LISTP H)
(NOT (LESSP N I))
(MEMBER K (NSET N))
(LESSP N (NTH H K)))
(NOT (EXIST-HINT-8-12-3-4 I L G H K))).
But this again simplifies, opening up SUB1, NUMBERP, EQUAL, LESSP, and ZEROP,
to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP I))
(NOT (HINT-8-12-3-4-AT-N I L G H K))
(NOT (EXIST-HINT-8-12-3-4 (SUB1 I)
L G H K))
(NOT (EQUAL N 0))
(NUMBERP N)
(LISTP H)
(NOT (LESSP N I))
(MEMBER K (NSET N))
(LESSP N (NTH H K)))
(NOT (EXIST-HINT-8-12-3-4 I L G H K))),
which simplifies, unfolding the definitions of ZEROP, HINT-8-12-3-4-AT-N,
and EXIST-HINT-8-12-3-4, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
LM-H-K-EQ-ADD1-N-NEX-HINT
(PROVE-LEMMA H-K-EQ-ADD1-N-NEX-HINT
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(AT H K (ADD1 N)))
(NOT (EXIST-HINT-8-12-3-4 N L G H K)))
((ENABLE AT)
(USE (LM-H-K-EQ-ADD1-N-NEX-HINT (I N)))))
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (IMPLIES (AND (NOT (ZEROP N))
(LISTP H)
(NOT (LESSP N N))
(MEMBER K (NSET N))
(LESSP N (NTH H K)))
(NOT (EXIST-HINT-8-12-3-4 N L G H K)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N)))
(NOT (EXIST-HINT-8-12-3-4 N L G H K))).
This simplifies, rewriting with MOLWS-NUM-K, MOLWS-NUM-N, N-IN-NSET,
MOLWS-N-NOT-0, MOLWS-LIST-H, and SUB1-ADD1, and expanding the functions ZEROP,
NOT, LESSP, AND, and IMPLIES, to two new formulas:
Case 2. (IMPLIES (AND (LESSP N N)
(MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N)))
(NOT (EXIST-HINT-8-12-3-4 N L G H K))),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NOT (LESSP (SUB1 N) N))
(MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N)))
(NOT (EXIST-HINT-8-12-3-4 N L G H K))),
which again simplifies, using linear arithmetic, to:
(IMPLIES (AND (LESSP N 1)
(NOT (LESSP (SUB1 N) N))
(MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N)))
(NOT (EXIST-HINT-8-12-3-4 N L G H K))).
Appealing to the lemma SUB1-ELIM, we now replace N by (ADD1 X) to eliminate
(SUB1 N). We rely upon the type restriction lemma noted when SUB1 was
introduced to constrain the new variable. The result is three new
conjectures:
Case 1.3.
(IMPLIES (AND (EQUAL N 0)
(LESSP N 1)
(NOT (LESSP (SUB1 N) N))
(MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N)))
(NOT (EXIST-HINT-8-12-3-4 N L G H K))),
which further simplifies, unfolding the functions LESSP, SUB1, NSET, LISTP,
and MEMBER, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (NUMBERP N))
(LESSP N 1)
(NOT (LESSP (SUB1 N) N))
(MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N)))
(NOT (EXIST-HINT-8-12-3-4 N L G H K))),
which further simplifies, applying N-IN-NSET, MOLWS-NUM-N, MOLWS-N-NOT-0,
and MOLWS-NUM-K, to:
T.
Case 1.1.
(IMPLIES (AND (NUMBERP X)
(NOT (EQUAL (ADD1 X) 0))
(LESSP (ADD1 X) 1)
(NOT (LESSP X (ADD1 X)))
(MOLWS (ADD1 X) L G H)
(MEMBER K (NSET (ADD1 X)))
(EQUAL (NTH H K) (ADD1 (ADD1 X))))
(NOT (EXIST-HINT-8-12-3-4 (ADD1 X)
L G H K))).
However this further simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
H-K-EQ-ADD1-N-NEX-HINT
(PROVE-LEMMA H-K-EQ-ADD1-N-K-NOT-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1B N L G H I K)
(AT H K (ADD1 N))
(UNION-AT-N L I '(8 9 10 11 12)))
(NOT (AT L K 3)))
((ENABLE B1B)
(USE (H-K-EQ-ADD1-N-NEX-HINT))))
WARNING: Note that H-K-EQ-ADD1-N-K-NOT-IN-L3 contains the free variables HP,
GP, LP, I, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying H-K-EQ-ADD1-N-NEX-HINT, and expanding the
functions AND, NOT, IMPLIES, and B1B, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
H-K-EQ-ADD1-N-K-NOT-IN-L3
(PROVE-LEMMA NOT-L3-THEN-NOT-LP4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 3)))
(NOT (AT LP K 4)))
((ENABLE AT MRHOI)))
WARNING: Note that NOT-L3-THEN-NOT-LP4 contains the free variables HP, GP, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
WARNING: the previously added lemma, NOT-L3-THEN-LP4, could be applied
whenever the newly proposed NOT-L3-THEN-NOT-LP4 could!
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH L K) 3)))
(NOT (EQUAL (NTH LP K) 4))),
which simplifies, rewriting with the lemmas SUB1-ADD1, MOLWS-NUM-K,
MOLWS-N-NOT-0, MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding the
functions MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8,
MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B,
MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, and EQUAL, to 14 new
conjectures:
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding EQUAL, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 4))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding the function EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the definition of EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
NOT-L3-THEN-NOT-LP4
(PROVE-LEMMA H-K-EQ-ADD1-N
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1B N L G H I K)
(AT H K (ADD1 N))
(UNION-AT-N L I '(8 9 10 11 12)))
(NOT (AT LP K 4)))
((USE (H-K-EQ-ADD1-N-K-NOT-IN-L3))))
WARNING: Note that H-K-EQ-ADD1-N contains the free variables HP, GP, I, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with the lemma NOT-L3-THEN-NOT-LP4, and unfolding
the definitions of AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
H-K-EQ-ADD1-N
(PROVE-LEMMA H-K-NEQ-ADD1-N
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H K (ADD1 N))))
(NOT (AT LP K 4)))
((ENABLE AT MRHOI)))
WARNING: Note that H-K-NEQ-ADD1-N contains the free variables HP, GP, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))),
which simplifies, rewriting with the lemmas SUB1-ADD1, MOLWS-NUM-K,
MOLWS-N-NOT-0, MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding the
functions MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8,
MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP,
MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, and EQUAL, to 12 new
conjectures:
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H)
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H)
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 4))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding the function EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))).
But this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL K (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0))
(NOT (EQUAL (NTH H K) (ADD1 N))))
(NOT (EQUAL (NTH LP K) 4))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the function EQUAL, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
H-K-NEQ-ADD1-N
(PROVE-LEMMA LM-B1A-I-NEQ-K-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1B N L G H I K)
(UNION-AT-N L I '(8 9 10 11 12)))
(NOT (AT LP K 4)))
((USE (H-K-EQ-ADD1-N)
(H-K-NEQ-ADD1-N))))
WARNING: Note that LM-B1A-I-NEQ-K-J-EQ-K contains the free variables HP, GP,
I, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, LM-B1A-I-NEQ-K-J-EQ-K, could be applied
whenever the previously added lemma H-K-EQ-ADD1-N could.
This formula simplifies, rewriting with H-K-NEQ-ADD1-N, and opening up AND,
NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-B1A-I-NEQ-K-J-EQ-K
(PROVE-LEMMA B1A-I-NEQ-K-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B1B N L G H I K))
(B1A LP I K))
((ENABLE B1A)
(USE (LM-B1A-I-NEQ-K-J-EQ-K))))
WARNING: Note that B1A-I-NEQ-K-J-EQ-K contains the free variables HP, GP, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations B1A, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1B N L G H I K)
(UNION-AT-N L I '(8 9 10 11 12)))
(NOT (AT LP K 4)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B1B N L G H I K)
(UNION-AT-N LP I '(8 9 10 11 12)))
(NOT (AT LP K 4))).
This simplifies, applying M-L-SAME-LP, and opening up AND, NOT, and IMPLIES,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B1A-I-NEQ-K-J-EQ-K
(PROVE-LEMMA B1A-I-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(B1A L I J))
(B1A LP I J))
((ENABLE B1A)))
WARNING: Note that B1A-I-J-NEQ-K contains the free variables HP, GP, K, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations B1A, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(B1A L I J)
(UNION-AT-N LP I '(8 9 10 11 12)))
(NOT (AT LP J 4))),
which simplifies, applying M-L-SAME-LP-AT and M-L-SAME-LP, and unfolding the
definition of B1A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B1A-I-J-NEQ-K
(PROVE-LEMMA B1A-I-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B1A L I J)
(B1B N L G H I J))
(B1A LP I J))
((USE (B1A-I-J-NEQ-K))))
WARNING: Note that B1A-I-NEQ-K contains the free variables HP, GP, K, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with B1A-I-NEQ-K-J-EQ-K, and unfolding
NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B1A-I-NEQ-K
(PROVE-LEMMA COND-L7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 7)
(UNION-AT-N LP K '(8 9 10 11 12)))
(AT G (NTH H K) 4))
((ENABLE MRHOI UNION-AT-N AT)))
WARNING: Note that COND-L7 contains the free variables HP, GP, LP, L, and N
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 7)
(MEMBER (NTH LP K) '(8 9 10 11 12)))
(EQUAL (NTH G (NTH H K)) 4)).
This simplifies, expanding MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B,
MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4,
MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, EQUAL, AT, MRHOI, and
MEMBER, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
COND-L7
(PROVE-LEMMA K-IN-L7-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(AT L K 7)
(B1A L (NTH H K) J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(NOT (AT L J 4)))
((ENABLE B1A B1D)
(USE (COND-L7)
(B1A-IF4 (U (NTH H K))))))
WARNING: Note that K-IN-L7-IMP contains the free variables HP, GP, LP, K, H,
G, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, appealing to the lemmas COND-L7 and B1A-IF4, and opening up
AND, IMPLIES, B1D, and B1A, to:
T.
Q.E.D.
[ 0.0 0.6 0.0 ]
K-IN-L7-IMP
(PROVE-LEMMA L5-J-LT-H-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 5)
(UNION-AT-N LP K '(8 9 10 11 12)))
(LESSP J (NTH H K)))
((ENABLE UNION-AT-N AT MRHOI)))
WARNING: When the linear lemma L5-J-LT-H-K is stored under (NTH H K) it
contains the free variables HP, GP, LP, J, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER J (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma L5-J-LT-H-K is to be stored as zero
type prescription rules, zero compound recognizer rules, one linear rule, and
zero replacement rules.
This formula can be simplified, using the abbreviations AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 5)
(MEMBER (NTH LP K) '(8 9 10 11 12)))
(LESSP J (NTH H K))),
which simplifies, rewriting with SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A,
MRHOI0, EQUAL, AT, MRHOI, MEMBER, CDR, CAR, and LISTP, to the following 15 new
conjectures:
Case 15.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 8))
(LESSP J (NTH H K))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the function EQUAL, to:
T.
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 9))
(LESSP J (NTH H K))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding the definition of EQUAL, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 10))
(LESSP J (NTH H K))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 11))
(LESSP J (NTH H K))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding the definition of EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 12))
(LESSP J (NTH H K))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding the function EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH L K) 5))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 8)
(NOT (EQUAL J 0)))
(LESSP (SUB1 J) N)).
This again simplifies, using linear arithmetic, rewriting with N-NOT-LESS-J,
MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and opening up the function EQUAL,
to:
(IMPLIES (AND (MOLWS N L G H)
(LESSP J 1)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 5)
(NOT (EQUAL J 0)))
(LESSP (SUB1 J) N)),
which again simplifies, using linear arithmetic, to the formula:
(IMPLIES (AND (NOT (NUMBERP J))
(MOLWS N L G H)
(LESSP J 1)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL (NTH H K) (ADD1 N))
(EQUAL (NTH L K) 5)
(NOT (EQUAL J 0)))
(LESSP (SUB1 J) N)).
But this again simplifies, applying MOLWS-NUM-K, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 9)
(NOT (EQUAL J 0)))
(LESSP (SUB1 J) N)).
However this again simplifies, using linear arithmetic, rewriting with the
lemmas N-NOT-LESS-J, MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and expanding
the function EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 10)
(NOT (EQUAL J 0)))
(LESSP (SUB1 J) N)),
which again simplifies, using linear arithmetic, rewriting with N-NOT-LESS-J,
MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and opening up the function EQUAL,
to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 11)
(NOT (EQUAL J 0)))
(LESSP (SUB1 J) N)).
This again simplifies, using linear arithmetic, appealing to the lemmas
N-NOT-LESS-J, MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and opening up the
definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 12)
(NOT (EQUAL J 0)))
(LESSP (SUB1 J) N)),
which again simplifies, using linear arithmetic, applying the lemmas
N-NOT-LESS-J, MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and unfolding the
definition of EQUAL, to:
T.
Q.E.D.
[ 0.0 0.4 0.0 ]
L5-J-LT-H-K
(PROVE-LEMMA K-IN-L5-THEN-J-NOT-L4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 5)
(UNION-AT-N LP K '(8 9 10 11 12))
(B0A N L H K J))
(NOT (AT L J 4)))
((ENABLE B0A) (USE (L5-J-LT-H-K))))
WARNING: Note that K-IN-L5-THEN-J-NOT-L4 contains the free variables HP, GP,
LP, K, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, opening up AND, IMPLIES, and B0A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-IN-L5-THEN-J-NOT-L4
(PROVE-LEMMA LP9-12-K-IN-L8-12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(UNION-AT-N LP K '(9 10 11 12)))
(UNION-AT-N L K '(8 9 10 11 12)))
((ENABLE AT UNION-AT-N MRHOI)))
WARNING: Note that LP9-12-K-IN-L8-12 contains the free variables HP, GP, LP,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(MEMBER (NTH LP K) '(9 10 11 12)))
(MEMBER (NTH L K) '(8 9 10 11 12))).
This simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, and NTH-NUMBERP, and expanding MRHOI12, MRHOI11B, MRHOI11A, MRHOI10,
MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A,
MRHOI4, MRHOI3B, LESSP, MEMBER, LISTP, CAR, CDR, UNION-AT-N, MRHOI3A, MRHOI2,
MRHOI1B, MRHOI1A, MRHOI0, AT, and MRHOI, to 40 new goals:
Case 40.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the definition of EQUAL, to:
T.
Case 39.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding the function EQUAL, to:
T.
Case 38.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding EQUAL, to:
T.
Case 37.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding EQUAL, to:
T.
Case 36.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up EQUAL, to:
T.
Case 35.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the definition of EQUAL, to:
T.
Case 34.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 33.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up EQUAL, to:
T.
Case 32.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 9))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 31.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 30.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 29.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 28.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 9))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 27.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the function EQUAL, to:
T.
Case 26.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 25.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 24.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 23.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 22.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 21.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 20.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the definition of EQUAL, to:
T.
Case 19.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 10))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding EQUAL, to:
T.
Case 18.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 11))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 17.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 16.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 9))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the function EQUAL, to:
T.
Case 15.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 12))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 9))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the function EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 12))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 9))).
This again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the definition of EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the function EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 9))).
But this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up EQUAL, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
LP9-12-K-IN-L8-12
(PROVE-LEMMA K-IN-LP9-12-THEN-J-NOT-L4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1A L K J)
(UNION-AT-N LP K '(9 10 11 12)))
(NOT (AT L J 4)))
((ENABLE B1A)
(USE (LP9-12-K-IN-L8-12))))
WARNING: Note that K-IN-LP9-12-THEN-J-NOT-L4 contains the free variables HP,
GP, LP, K, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying LP9-12-K-IN-L8-12, and expanding the
functions AND, IMPLIES, and B1A, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
K-IN-LP9-12-THEN-J-NOT-L4
(PROVE-LEMMA K-NOT-IN-L7-THEN-LP9-12-OR-L5
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (AT L K 7))
(NOT (UNION-AT-N LP K '(9 10 11 12))))
(AT L K 5))
((ENABLE AT UNION-AT-N MRHOI)))
WARNING: Note that K-NOT-IN-L7-THEN-LP9-12-OR-L5 contains the free variables
HP, GP, LP, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
AT, and UNION-AT-N, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(MEMBER (NTH LP K) '(8 9 10 11 12))
(NOT (EQUAL (NTH L K) 7))
(NOT (MEMBER (NTH LP K) '(9 10 11 12))))
(EQUAL (NTH L K) 5)).
This simplifies, rewriting with SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding the functions MRHOI12,
MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A,
MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MEMBER, LISTP, CAR,
CDR, UNION-AT-N, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, and
EQUAL, to 11 new goals:
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the function EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the function EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 8))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding EQUAL, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
K-NOT-IN-L7-THEN-LP9-12-OR-L5
(PROVE-LEMMA K-IN-NOT-L7-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 7))
(B0A N L H K J)
(B1A L K J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(NOT (AT L J 4)))
((USE (K-NOT-IN-L7-THEN-LP9-12-OR-L5))))
WARNING: Note that K-IN-NOT-L7-IMP contains the free variables HP, GP, LP, K,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, appealing to the lemmas UN9-12-THEN-UN8-12,
K-IN-LP9-12-THEN-J-NOT-L4, and K-IN-L5-THEN-J-NOT-L4, and unfolding the
functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
K-IN-NOT-L7-IMP
(PROVE-LEMMA LM-B1A-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(B0A N L H K J)
(B1A L K J)
(B1A L (NTH H K) J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(NOT (AT L J 4)))
((USE (K-IN-L7-IMP))))
WARNING: Note that LM-B1A-I-EQ-K-J-NEQ-K contains the free variables HP, GP,
LP, K, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with the lemma K-IN-NOT-L7-IMP, and
expanding the functions AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-B1A-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B1A-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(B1D N L H K)
(LG N L G)
(B0A N L H K J)
(B1A L K J)
(B1A L (NTH H K) J))
(B1A LP K J))
((ENABLE B1A)
(USE (LM-B1A-I-EQ-K-J-NEQ-K))))
WARNING: Note that B1A-I-EQ-K-J-NEQ-K contains the free variables HP, GP, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations B1A, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(B0A N L H K J)
(B1A L K J)
(B1A L (NTH H K) J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(NOT (AT L J 4)))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(B1D N L H K)
(LG N L G)
(B0A N L H K J)
(B1A L K J)
(B1A L (NTH H K) J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(NOT (AT LP J 4))).
This simplifies, rewriting with LM-B1A-I-EQ-K-J-NEQ-K, M-L-SAME-LP-AT, and
M-L-SAME-LP-AT-NOT, and unfolding B1A, AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 1.7 0.0 ]
B1A-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B1A-I-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1A L K K))
(B1A LP K K))
((ENABLE B1A AT UNION-AT-N)))
WARNING: Note that B1A-I-J-EQ-K contains the free variables HP, GP, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations AT, UNION-AT-N, B1A,
AND, and IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1A L K K)
(MEMBER (NTH LP K) '(8 9 10 11 12)))
(NOT (EQUAL (NTH LP K) 4))),
which simplifies, expanding AT, UNION-AT-N, CDR, CAR, LISTP, MEMBER, and B1A,
to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
B1A-I-J-EQ-K
(PROVE-LEMMA B1A-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(B0A N L H K J)
(B1A L K J)
(B1A L (NTH H K) J))
(B1A LP K J))
((USE (B1A-I-EQ-K-J-NEQ-K))))
WARNING: Note that B1A-I-EQ-K contains the free variables HP, GP, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, B1A-I-EQ-K, could be applied whenever the
previously added lemma B1A-I-EQ-K-J-NEQ-K could.
This formula simplifies, rewriting with B1A-I-J-EQ-K, and expanding the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.7 0.0 ]
B1A-I-EQ-K
(PROVE-LEMMA MRHO-PRESERVES-B1A NIL
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H I)
(LG N L G)
(B0A N L H I J)
(B1A L I J)
(B1A L (NTH H I) J)
(B1B N L G H I J))
(B1A LP I J))
((USE (B1A-I-NEQ-K) (B1A-I-EQ-K))))
This formula simplifies, opening up the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHO-PRESERVES-B1A
(PROVE-LEMMA UN8-11-THEN-UN8-12
(REWRITE)
(IMPLIES (UNION-AT-N LP R '(8 9 10 11))
(UNION-AT-N LP R '(8 9 10 11 12)))
((ENABLE UNION-AT-N)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to the goal:
(IMPLIES (MEMBER (NTH LP R) '(8 9 10 11))
(MEMBER (NTH LP R) '(8 9 10 11 12))).
This simplifies, unfolding CDR, CAR, LISTP, and MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
UN8-11-THEN-UN8-12
(PROVE-LEMMA L8-11-K-IN-GP34
(REWRITE)
(IMPLIES (AND (MEMBER R (NSET N))
(LG N L G)
(UNION-AT-N L R '(8 9 10 11)))
(UNION-AT-N GP R '(3 4)))
((ENABLE LG LG-AT-N LG-2-AT-N LG-3-AT-N UNION-AT-N AT NSET)))
WARNING: Note that L8-11-K-IN-GP34 contains the free variables G, L, and N
which will be chosen by instantiating the hypotheses (MEMBER R (NSET N)) and
(LG N L G).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
UNION-AT-N, to the formula:
(IMPLIES (AND (MEMBER R (NSET N))
(LG N L G)
(MEMBER (NTH L R) '(8 9 10 11)))
(MEMBER (NTH GP R) '(3 4))).
This simplifies, expanding the functions CDR, CAR, LISTP, and MEMBER, to the
following four new formulas:
Case 4. (IMPLIES (AND (MEMBER R (NSET N))
(LG N L G)
(EQUAL (NTH L R) 8)
(NOT (EQUAL (NTH GP R) 3)))
(EQUAL (NTH GP R) 4)).
Give the above formula the name *1.
Case 3. (IMPLIES (AND (MEMBER R (NSET N))
(LG N L G)
(EQUAL (NTH L R) 9)
(NOT (EQUAL (NTH GP R) 3)))
(EQUAL (NTH GP R) 4)),
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:
(IMPLIES (AND (MEMBER R (NSET N))
(LG N L G)
(UNION-AT-N L R '(8 9 10 11)))
(UNION-AT-N GP R '(3 4))),
which we named *1 above. We will appeal to induction. There are two
plausible inductions. However, they merge into one likely candidate induction.
We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p GP R L N G))
(IMPLIES (AND (NOT (ZEROP N))
(p GP R L (SUB1 N) G))
(p GP R L N G))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER R (NSET N))
(LG N L G)
(UNION-AT-N L R '(8 9 10 11)))
(UNION-AT-N GP R '(3 4))).
This simplifies, expanding the functions ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER R (NSET (SUB1 N))))
(MEMBER R (NSET N))
(LG N L G)
(UNION-AT-N L R '(8 9 10 11)))
(UNION-AT-N GP R '(3 4))).
This simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and opening
up the definitions of ZEROP, NSET, MEMBER, LG, LG-3-AT-N, LG-2-AT-N, AT,
EQUAL, LG-AT-N, UNION-AT-N, LISTP, CAR, and CDR, to the following 15 new
conjectures:
Case 2.15.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 5))
(NOT (EQUAL (NTH L N) 6))
(EQUAL (NTH L N) 8)
(EQUAL (NTH G N) 2)
(EQUAL (NTH L N) 10)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)).
But this again simplifies, using linear arithmetic, to:
T.
Case 2.14.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 5))
(NOT (EQUAL (NTH L N) 6))
(EQUAL (NTH L N) 8)
(EQUAL (NTH G N) 2)
(EQUAL (NTH L N) 11)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.13.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 5))
(NOT (EQUAL (NTH L N) 6))
(EQUAL (NTH L N) 8)
(EQUAL (NTH G N) 2)
(EQUAL (NTH L N) 9)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.12.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 7))
(EQUAL (NTH L N) 8)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 10)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.11.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 7))
(EQUAL (NTH L N) 8)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 11)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.10.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 7))
(EQUAL (NTH L N) 8)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 9)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.9.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 5))
(NOT (EQUAL (NTH L N) 6))
(EQUAL (NTH L N) 7)
(EQUAL (NTH G N) 2)
(EQUAL (NTH L N) 9)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.8.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 5))
(NOT (EQUAL (NTH L N) 6))
(EQUAL (NTH L N) 7)
(EQUAL (NTH G N) 2)
(EQUAL (NTH L N) 11)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.7.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(NOT (EQUAL (NTH L N) 5))
(NOT (EQUAL (NTH L N) 6))
(EQUAL (NTH L N) 7)
(EQUAL (NTH G N) 2)
(EQUAL (NTH L N) 10)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.6.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(EQUAL (NTH L N) 6)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 10)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.5.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(EQUAL (NTH L N) 6)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 11)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.4.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(EQUAL (NTH L N) 6)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 9)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(EQUAL (NTH L N) 5)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 10)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(EQUAL (NTH L N) 5)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 11)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER R (NSET (SUB1 N))))
(EQUAL R N)
(LG-1-AT-N N L G)
(EQUAL (NTH L N) 5)
(EQUAL (NTH G N) 3)
(EQUAL (NTH L N) 9)
(EQUAL (NTH G N) 4)
(LG (SUB1 N) L G)
(NOT (EQUAL (NTH GP N) 3)))
(EQUAL (NTH GP N) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER R (NSET N))
(LG N L G)
(UNION-AT-N L R '(8 9 10 11)))
(UNION-AT-N GP R '(3 4))),
which simplifies, applying CDR-CONS and CAR-CONS, and expanding the
definitions of ZEROP, NSET, MEMBER, LG, LG-3-AT-N, LG-2-AT-N, AT, EQUAL, and
LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.4 0.1 ]
L8-11-K-IN-GP34
(PROVE-LEMMA U-IF4
(REWRITE)
(IMPLIES (AND (MEMBER U (NSET N))
(LG N L G)
(AT G U 4))
(NOT (AT L U 2)))
((ENABLE LG LG-AT-N LG-3-AT-N AT NSET)))
WARNING: Note that U-IF4 contains the free variables G and N which will be
chosen by instantiating the hypotheses (MEMBER U (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4))
(NOT (EQUAL (NTH L U) 2))).
Name the above subgoal *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 (ZEROP N) (p L U G N))
(IMPLIES (AND (NOT (ZEROP N))
(p L U G (SUB1 N)))
(p L U G N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme leads
to the following three new formulas:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4))
(NOT (EQUAL (NTH L U) 2))).
This simplifies, opening up the definitions of ZEROP, NSET, LISTP, and
MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER U (NSET (SUB1 N))))
(MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4))
(NOT (EQUAL (NTH L U) 2))).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and opening up ZEROP,
NSET, MEMBER, LG, LG-3-AT-N, AT, LG-AT-N, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER U (NSET N))
(LG N L G)
(EQUAL (NTH G U) 4))
(NOT (EQUAL (NTH L U) 2))),
which simplifies, applying the lemmas CDR-CONS and CAR-CONS, and opening up
the definitions of ZEROP, NSET, MEMBER, LG, LG-3-AT-N, AT, and LG-AT-N, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
U-IF4
(PROVE-LEMMA L12-THEN-UN10-12
(REWRITE)
(IMPLIES (AT L U 12)
(UNION-AT-N L U '(10 11 12)))
((ENABLE AT UNION-AT-N)))
This conjecture can be simplified, using the abbreviations IMPLIES, UNION-AT-N,
and AT, to the goal:
(IMPLIES (EQUAL (NTH L U) 12)
(MEMBER (NTH L U) '(10 11 12))).
This simplifies, opening up the definition of MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
L12-THEN-UN10-12
(PROVE-LEMMA R-NEQ-K
(REWRITE)
(IMPLIES (AND (UNION-AT-N L K '(8 9 10 11))
(AT L R 12))
(NOT (EQUAL K R)))
((ENABLE UNION-AT-N AT)))
WARNING: Note that R-NEQ-K contains the free variable L which will be chosen
by instantiating the hypothesis (UNION-AT-N L K (QUOTE (8 9 10 11))).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, AT,
and UNION-AT-N, to:
(IMPLIES (AND (MEMBER (NTH L K) '(8 9 10 11))
(EQUAL (NTH L R) 12))
(NOT (EQUAL K R))),
which simplifies, unfolding MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
R-NEQ-K
(PROVE-LEMMA EX-HINT-IN-L8-12
(REWRITE)
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H J)
(UNION-AT-N L
(EXIST-HINT-8-12-3-4 N L G H J)
'(8 9 10 11 12)))
((ENABLE EXIST-HINT-8-12-3-4 UNION-AT-N AT HINT-8-12-3-4-AT-N
INTERSECT-8-12-3-4-AT-N)))
This conjecture can be simplified, using the abbreviations IMPLIES and
UNION-AT-N, to:
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H J)
(MEMBER (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
'(8 9 10 11 12))).
This simplifies, opening up CDR, CAR, LISTP, and MEMBER, to:
(IMPLIES (AND (EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)),
which we will name *1.
Perhaps we can prove it by induction. There are six plausible inductions.
However, they merge into one likely candidate induction. We will induct
according to the following scheme:
(AND (IMPLIES (ZEROP N) (p L N G H J))
(IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N L G H J))
(p L N G H J))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(p L (SUB1 N) G H J))
(p L N G H J))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
generates the following eight new goals:
Case 8. (IMPLIES (AND (ZEROP N)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)).
This simplifies, expanding ZEROP, EQUAL, and EXIST-HINT-8-12-3-4, to:
T.
Case 7. (IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N L G H J)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)).
This simplifies, rewriting with UN8-12-AND-UN34-THEN-INT, L12-THEN-UN8-12,
LP4-THEN-UN34, GP3-THEN-UN34, and UN8-11-THEN-UN8-12, and unfolding the
functions ZEROP, INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, AT, and EQUAL, to:
T.
Case 6. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(NOT (EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)),
which simplifies, expanding the functions ZEROP, INTERSECT-8-12-3-4-AT-N,
MEMBER, LISTP, CAR, CDR, UNION-AT-N, HINT-8-12-3-4-AT-N, and
EXIST-HINT-8-12-3-4, to:
T.
Case 5. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))
8)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)),
which simplifies, opening up ZEROP, INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP,
CAR, CDR, UNION-AT-N, HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, and EQUAL, to:
T.
Case 4. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))
9)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)),
which simplifies, opening up ZEROP, INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP,
CAR, CDR, UNION-AT-N, HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, and EQUAL, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))
10)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)),
which simplifies, unfolding the functions ZEROP, INTERSECT-8-12-3-4-AT-N,
MEMBER, LISTP, CAR, CDR, UNION-AT-N, HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4,
and EQUAL, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))
11)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)),
which simplifies, opening up the definitions of ZEROP,
INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))
12)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
8))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
9))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
10))
(NOT (EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
11)))
(EQUAL (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
12)),
which simplifies, expanding the definitions of ZEROP,
INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 4.5 0.0 ]
EX-HINT-IN-L8-12
(PROVE-LEMMA EX-HINT-IN-G34
(REWRITE)
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(UNION-AT-N G
(EXIST-HINT-8-12-3-4 N L G H K)
'(3 4)))
((ENABLE EXIST-HINT-8-12-3-4 UNION-AT-N AT HINT-8-12-3-4-AT-N
INTERSECT-8-12-3-4-AT-N)))
This formula can be simplified, using the abbreviations IMPLIES and UNION-AT-N,
to the new conjecture:
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(MEMBER (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
'(3 4))),
which simplifies, expanding CDR, CAR, LISTP, and MEMBER, to the goal:
(IMPLIES (AND (EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
3)))
(EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
4)).
Call the above conjecture *1.
Perhaps we can prove it by induction. There are three plausible
inductions. However, they merge into one likely candidate induction. We will
induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p G N L H K))
(IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N L G H K))
(p G N L H K))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H K))
(p G (SUB1 N) L H K))
(p G N L H K))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme generates the following five new goals:
Case 5. (IMPLIES (AND (ZEROP N)
(EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
3)))
(EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
4)).
This simplifies, expanding ZEROP, EQUAL, and EXIST-HINT-8-12-3-4, to:
T.
Case 4. (IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N L G H K)
(EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
3)))
(EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
4)).
This simplifies, applying UN8-12-AND-UN34-THEN-INT, L12-THEN-UN8-12,
LP4-THEN-UN34, GP3-THEN-UN34, and UN8-11-THEN-UN8-12, and expanding the
definitions of ZEROP, INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP, CAR, CDR,
UNION-AT-N, HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, AT, and EQUAL, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H K))
(NOT (EXIST-HINT-8-12-3-4 (SUB1 N)
L G H K))
(EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
3)))
(EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
4)),
which simplifies, opening up the definitions of ZEROP,
INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
HINT-8-12-3-4-AT-N, and EXIST-HINT-8-12-3-4, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H K))
(EQUAL (NTH G
(EXIST-HINT-8-12-3-4 (SUB1 N)
L G H K))
3)
(EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
3)))
(EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
4)),
which simplifies, unfolding the definitions of ZEROP,
INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H K))
(EQUAL (NTH G
(EXIST-HINT-8-12-3-4 (SUB1 N)
L G H K))
4)
(EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
3)))
(EQUAL (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
4)),
which simplifies, unfolding the definitions of ZEROP,
INTERSECT-8-12-3-4-AT-N, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
HINT-8-12-3-4-AT-N, EXIST-HINT-8-12-3-4, and EQUAL, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 1.7 0.0 ]
EX-HINT-IN-G34
(PROVE-LEMMA EX-HINT-L-G-H
(REWRITE)
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H J)
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J))))
((ENABLE EXIST-HINT-8-12-3-4 HINT-8-12-3-4-AT-N)))
WARNING: When the linear lemma EX-HINT-L-G-H is stored under (NTH H J) it
contains the free variables G, L, and N which will be chosen by instantiating
the hypothesis (EXIST-HINT-8-12-3-4 N L G H J).
WARNING: Note that the proposed lemma EX-HINT-L-G-H is to be stored as zero
type prescription rules, zero compound recognizer rules, two linear rules, and
zero replacement rules.
Give the conjecture the name *1.
Perhaps we can prove it by induction. The recursive terms in the
conjecture suggest two inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N L G H J))
(IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N L G H J))
(p N L G H J))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(p (SUB1 N) L G H J))
(p N L G H J))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme leads to the following four new conjectures:
Case 4. (IMPLIES (AND (ZEROP N)
(EXIST-HINT-8-12-3-4 N L G H J))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J)))).
This simplifies, opening up the functions ZEROP, EQUAL, and
EXIST-HINT-8-12-3-4, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N L G H J)
(EXIST-HINT-8-12-3-4 N L G H J))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J)))).
This simplifies, opening up the functions ZEROP, HINT-8-12-3-4-AT-N, and
EXIST-HINT-8-12-3-4, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(NOT (EXIST-HINT-8-12-3-4 (SUB1 N)
L G H J))
(EXIST-HINT-8-12-3-4 N L G H J))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J)))).
This simplifies, expanding the functions ZEROP, HINT-8-12-3-4-AT-N, and
EXIST-HINT-8-12-3-4, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N L G H J))
(NOT (LESSP (EXIST-HINT-8-12-3-4 (SUB1 N) L G H J)
(NTH H J)))
(EXIST-HINT-8-12-3-4 N L G H J))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J)))).
This simplifies, expanding ZEROP, HINT-8-12-3-4-AT-N, and
EXIST-HINT-8-12-3-4, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
EX-HINT-L-G-H
(PROVE-LEMMA EX-HINT-LP-GP-H-IN-INT-8-12-3-4
(REWRITE)
(IMPLIES (EXIST-HINT-8-12-3-4 N LP GP H J)
(INTERSECT-8-12-3-4-AT-N (EXIST-HINT-8-12-3-4 N LP GP H J)
LP GP))
((ENABLE HINT-8-12-3-4-AT-N EXIST-HINT-8-12-3-4)))
This conjecture simplifies, applying EX-HINT-IN-G34, EX-HINT-IN-L8-12, and
UN8-12-AND-UN34-THEN-INT, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
EX-HINT-LP-GP-H-IN-INT-8-12-3-4
(PROVE-LEMMA EX-HINT-LP-GP-H-LEQ-H-J
(REWRITE)
(IMPLIES (EXIST-HINT-8-12-3-4 N LP GP H J)
(NOT (LESSP (EXIST-HINT-8-12-3-4 N LP GP H J)
(NTH H J))))
((ENABLE HINT-8-12-3-4-AT-N EXIST-HINT-8-12-3-4)))
WARNING: When the linear lemma EX-HINT-LP-GP-H-LEQ-H-J is stored under
(NTH H J) it contains the free variables GP, LP, and N which will be chosen by
instantiating the hypothesis (EXIST-HINT-8-12-3-4 N LP GP H J).
WARNING: Note that the proposed lemma EX-HINT-LP-GP-H-LEQ-H-J is to be stored
as zero type prescription rules, zero compound recognizer rules, two linear
rules, and zero replacement rules.
This formula simplifies, using linear arithmetic and rewriting with the lemma
EX-HINT-L-G-H, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EX-HINT-LP-GP-H-LEQ-H-J
(PROVE-LEMMA EX-HINT-NOT-IN-G02
(REWRITE)
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(NOT (UNION-AT-N G
(EXIST-HINT-8-12-3-4 N L G H K)
'(0 1 2))))
((ENABLE UNION-AT-N)
(USE (EX-HINT-IN-G34))))
This formula can be simplified, using the abbreviations NOT, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(MEMBER (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
'(3 4)))
(EXIST-HINT-8-12-3-4 N L G H K))
(NOT (MEMBER (NTH G
(EXIST-HINT-8-12-3-4 N L G H K))
'(0 1 2)))),
which simplifies, unfolding the functions CDR, CAR, LISTP, MEMBER, and IMPLIES,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EX-HINT-NOT-IN-G02
(PROVE-LEMMA HINT-WTN
(REWRITE)
(IMPLIES (AND (MEMBER R (NSET N))
(INTERSECT-8-12-3-4-AT-N R LP GP)
(NOT (LESSP R (NTH H J))))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((ENABLE NSET EXIST-HINT-8-12-3-4 HINT-8-12-3-4-AT-N)))
WARNING: Note that HINT-WTN contains the free variable R which will be chosen
by instantiating the hypothesis (MEMBER R (NSET N)).
Call the conjecture *1.
Let us appeal to the induction principle. 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 (ZEROP N) (p N LP GP H J R))
(IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N LP GP H J))
(p N LP GP H J R))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N LP GP H J))
(p (SUB1 N) LP GP H J R))
(p N LP GP H J R))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP
establish that the measure (COUNT N) decreases according to the well-founded
relation LESSP in each induction step of the scheme. The above induction
scheme produces four new goals:
Case 4. (IMPLIES (AND (ZEROP N)
(MEMBER R (NSET N))
(INTERSECT-8-12-3-4-AT-N R LP GP)
(NOT (LESSP R (NTH H J))))
(EXIST-HINT-8-12-3-4 N LP GP H J)),
which simplifies, unfolding the functions ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(HINT-8-12-3-4-AT-N N LP GP H J)
(MEMBER R (NSET N))
(INTERSECT-8-12-3-4-AT-N R LP GP)
(NOT (LESSP R (NTH H J))))
(EXIST-HINT-8-12-3-4 N LP GP H J)),
which simplifies, applying CDR-CONS and CAR-CONS, and opening up the
definitions of ZEROP, HINT-8-12-3-4-AT-N, NSET, MEMBER, and
EXIST-HINT-8-12-3-4, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N LP GP H J))
(NOT (MEMBER R (NSET (SUB1 N))))
(MEMBER R (NSET N))
(INTERSECT-8-12-3-4-AT-N R LP GP)
(NOT (LESSP R (NTH H J))))
(EXIST-HINT-8-12-3-4 N LP GP H J)).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the
functions ZEROP, HINT-8-12-3-4-AT-N, NSET, and MEMBER, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (HINT-8-12-3-4-AT-N N LP GP H J))
(EXIST-HINT-8-12-3-4 (SUB1 N)
LP GP H J)
(MEMBER R (NSET N))
(INTERSECT-8-12-3-4-AT-N R LP GP)
(NOT (LESSP R (NTH H J))))
(EXIST-HINT-8-12-3-4 N LP GP H J)),
which simplifies, applying the lemmas CDR-CONS and CAR-CONS, and expanding
the functions ZEROP, HINT-8-12-3-4-AT-N, NSET, MEMBER, and
EXIST-HINT-8-12-3-4, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
HINT-WTN
(PROVE-LEMMA LM-K-IN-L7-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(AT L K 7)
(B1B N L G H (NTH H K) J)
(AT L J 3)
(UNION-AT-N LP K '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N L G H J))
((ENABLE B1B B1D)
(USE (COND-L7)
(B1A-IF4 (U (NTH H K))))))
WARNING: Note that LM-K-IN-L7-IMP contains the free variables HP, GP, LP, and
K which will be chosen by instantiating the hypotheses (MEMBER K (NSET N)) and:
(MRHOI N K L G H LP GP HP).
This simplifies, applying COND-L7 and B1A-IF4, and unfolding the definitions
of AND, IMPLIES, B1D, and B1B, to:
T.
Q.E.D.
[ 0.0 0.8 0.0 ]
LM-K-IN-L7-IMP
(PROVE-LEMMA EX-HINT-NEQ-K-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (EQUAL K
(EXIST-HINT-8-12-3-4 N L G H J))))
(INTERSECT-8-12-3-4-AT-N (EXIST-HINT-8-12-3-4 N L G H J)
LP GP))
((ENABLE INTERSECT-8-12-3-4-AT-N)
(USE (EX-HINT-IN-G34))))
WARNING: Note that EX-HINT-NEQ-K-IMP contains the free variables HP and K
which will be chosen by instantiating the hypotheses (MEMBER K (NSET N)) and:
(MRHOI N K L G H LP GP HP).
This simplifies, applying M-GP-SAME-G, EX-HINT-IN-G34, M-LP-SAME-L,
HINT-MEMBER, EX-HINT-IN-L8-12, and UN8-12-AND-UN34-THEN-INT, and unfolding the
function IMPLIES, to:
T.
Q.E.D.
[ 0.0 1.0 0.0 ]
EX-HINT-NEQ-K-IMP
(PROVE-LEMMA EX-HINT-NEQ-K-IN-L7
(REWRITE)
(IMPLIES (AND (AT L K 7)
(EXIST-HINT-8-12-3-4 N L G H J))
(NOT (EQUAL K
(EXIST-HINT-8-12-3-4 N L G H J))))
((ENABLE AT UNION-AT-N)
(USE (EX-HINT-IN-L8-12))))
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, AT,
and UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (EXIST-HINT-8-12-3-4 N L G H J)
(MEMBER (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
'(8 9 10 11 12)))
(EQUAL (NTH L K) 7)
(EXIST-HINT-8-12-3-4 N L G H J))
(NOT (EQUAL K
(EXIST-HINT-8-12-3-4 N L G H J)))),
which simplifies, unfolding MEMBER and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EX-HINT-NEQ-K-IN-L7
(PROVE-LEMMA EX-HINT-IN-INT-8-12-3-4-L7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 7)
(EXIST-HINT-8-12-3-4 N L G H J))
(INTERSECT-8-12-3-4-AT-N (EXIST-HINT-8-12-3-4 N L G H J)
LP GP))
((USE (EX-HINT-NEQ-K-IMP))))
WARNING: Note that EX-HINT-IN-INT-8-12-3-4-L7 contains the free variables HP
and K which will be chosen by instantiating the hypotheses (MEMBER K (NSET N))
and (MRHOI N K L G H LP GP HP).
This formula simplifies, applying EX-HINT-NEQ-K-IN-L7 and EX-HINT-NEQ-K-IMP,
and unfolding NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
EX-HINT-IN-INT-8-12-3-4-L7
(PROVE-LEMMA EX-HINT-WTN-L7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 7)
(EXIST-HINT-8-12-3-4 N L G H J))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (HINT-WTN (R (EXIST-HINT-8-12-3-4 N L G H J))))))
WARNING: Note that EX-HINT-WTN-L7 contains the free variables HP, K, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, appealing to the lemmas HINT-MEMBER and
EX-HINT-IN-INT-8-12-3-4-L7, and unfolding the functions NOT, AND, and IMPLIES,
to:
(IMPLIES (AND (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 7)
(EXIST-HINT-8-12-3-4 N L G H J))
(EXIST-HINT-8-12-3-4 N LP GP H J)).
This again simplifies, using linear arithmetic and rewriting with the lemma
EX-HINT-LP-GP-H-LEQ-H-J, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
EX-HINT-WTN-L7
(PROVE-LEMMA B1B-K-IN-L7-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(AT L K 7)
(B1B N L G H (NTH H K) J)
(AT L J 3)
(UNION-AT-N LP K '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (LM-K-IN-L7-IMP))))
WARNING: Note that B1B-K-IN-L7-IMP contains the free variables HP, K, G, and
L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying EX-HINT-WTN-L7, and unfolding the
functions AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
B1B-K-IN-L7-IMP
(PROVE-LEMMA H-J-LEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L J 3)
(AT L K 5)
(B0B N L H K J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(NOT (LESSP K (NTH H J))))
((ENABLE B0B) (USE (L5-J-LT-H-K))))
WARNING: When the linear lemma H-J-LEQ-K is stored under (NTH H J) it
contains the free variables HP, GP, LP, K, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER K (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma H-J-LEQ-K is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This formula simplifies, unfolding the definitions of AND, IMPLIES, and B0B,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
H-J-LEQ-K
(PROVE-LEMMA LM-LP8-THEN-K-IN-G34
(REWRITE)
(IMPLIES (AND (LISTP L)
(NUMBERP N)
(EQUAL (LENGTH L) N)
(MRHOI N K L G H LP GP HP)
(MEMBER K (NSET N))
(LG N L G)
(AT L K 5)
(AT LP K 8))
(UNION-AT-N GP K '(3 4)))
((ENABLE MRHOI AT UNION-AT-N LG LG-AT-N LG-2-AT-N LG-3-AT-N NSET)))
WARNING: Note that LM-LP8-THEN-K-IN-G34 contains the free variables HP, LP, H,
G, N, and L which will be chosen by instantiating the hypotheses (LISTP L),
(NUMBERP N), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (LISTP L)
(NUMBERP N)
(EQUAL (LENGTH L) N)
(MRHOI N K L G H LP GP HP)
(MEMBER K (NSET N))
(LG N L G)
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 8))
(MEMBER (NTH GP K) '(3 4))),
which simplifies, applying SUB1-ADD1, and unfolding the definitions of MRHOI12,
MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A,
MRHOI6, MRHOI5C, MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B, MRHOI3A, MRHOI2,
MRHOI1B, MRHOI1A, MRHOI0, EQUAL, AT, MRHOI, CDR, CAR, LISTP, and MEMBER, to
the following four new formulas:
Case 4. (IMPLIES (AND (LISTP L)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 (LENGTH L)))
(EQUAL LP (MOVE L K 8))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 8)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)).
But this again simplifies, applying MOVE-NTH, and opening up EQUAL, to the
new formula:
(IMPLIES (AND (LISTP L)
(EQUAL (NTH H K) (ADD1 (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which we will name *1.
Case 3. (IMPLIES (AND (LISTP L)
(EQUAL GP G)
(EQUAL HP H)
(NOT (NUMBERP (NTH H K)))
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 8)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)).
However this again simplifies, appealing to the lemma MOVE-NTH, and opening
up EQUAL, to:
T.
Case 2. (IMPLIES (AND (LISTP L)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 8)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, rewriting with MOVE-NTH, and opening up EQUAL, to:
T.
Case 1. (IMPLIES (AND (LISTP L)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) (LENGTH L))
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(EQUAL (NTH LP K) 8)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)).
This again simplifies, rewriting with MOVE-NTH, and expanding the definition
of EQUAL, to:
T.
So let us turn our attention to:
(IMPLIES (AND (LISTP L)
(EQUAL (NTH H K) (ADD1 (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
named *1 above. We will appeal to induction. The recursive terms in the
conjecture suggest three inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (AND (LISTP L) (p G K (CDR L) H))
(p G K L H))
(IMPLIES (NOT (LISTP L))
(p G K L H))).
Linear arithmetic and the lemma CDR-LESSP inform us that the measure (COUNT L)
decreases according to the well-founded relation LESSP in each induction step
of the scheme. The above induction scheme produces the following five new
formulas:
Case 5. (IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K) (ADD1 (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)).
This simplifies, rewriting with SUB1-ADD1, CDR-CONS, and CAR-CONS, and
expanding the functions LENGTH, NSET, MEMBER, LG-AT-N, AT, EQUAL, LG-2-AT-N,
LG, and LG-3-AT-N, to 21 new conjectures:
Case 5.21.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0)
(EQUAL (NTH L 0) 5)
(NOT (EQUAL (NTH G 0) 3)))
(EQUAL (NTH G 0) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.20.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.19.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.18.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.17.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.16.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.15.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.14.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.13.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.12.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.11.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.10.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.9.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.8.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.7.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.6.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.5.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.4.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.3.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.2.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 5.1.
(IMPLIES (AND (NOT (LISTP (CDR L)))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4. (IMPLIES (AND (NOT (EQUAL (NTH H K)
(ADD1 (LENGTH (CDR L)))))
(LISTP L)
(EQUAL (NTH H K) (ADD1 (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which simplifies, applying ADD1-EQUAL, SUB1-ADD1, CDR-CONS, and CAR-CONS,
and opening up the functions LENGTH, NSET, MEMBER, LG-AT-N, AT, EQUAL,
LG-2-AT-N, LG, and LG-3-AT-N, to the following 21 new conjectures:
Case 4.21.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0)
(EQUAL (NTH L 0) 5)
(NOT (EQUAL (NTH G 0) 3)))
(EQUAL (NTH G 0) 4)).
However this again simplifies, using linear arithmetic, to:
T.
Case 4.20.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.19.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.18.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.17.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.16.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.15.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.14.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.13.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.12.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.11.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.10.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.9.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.8.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.7.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.6.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.5.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.4.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.3.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.2.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 4.1.
(IMPLIES (AND (NOT (EQUAL (LENGTH L) (LENGTH (CDR L))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 3. (IMPLIES (AND (NOT (MEMBER K (NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL (NTH H K) (ADD1 (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which simplifies, rewriting with the lemmas SUB1-ADD1, CDR-CONS, and
CAR-CONS, and unfolding the functions LENGTH, NSET, MEMBER, LG-AT-N, AT,
EQUAL, LG-2-AT-N, and LG, to:
(IMPLIES (AND (NOT (MEMBER K (NSET (LENGTH (CDR L)))))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0)
(EQUAL (NTH L 0) 5)
(NOT (EQUAL (NTH G 0) 3)))
(EQUAL (NTH G 0) 4)).
This again simplifies, using linear arithmetic, to:
T.
Case 2. (IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K) (ADD1 (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which simplifies, rewriting with SUB1-ADD1, CDR-CONS, and CAR-CONS, and
opening up LENGTH, NSET, MEMBER, LG-AT-N, AT, EQUAL, LG-2-AT-N, LG, and
LG-3-AT-N, to the following 21 new goals:
Case 2.21.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0)
(EQUAL (NTH L 0) 5)
(NOT (EQUAL (NTH G 0) 3)))
(EQUAL (NTH G 0) 4)).
This again simplifies, using linear arithmetic, to:
T.
Case 2.20.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.19.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.18.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.17.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.16.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.15.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.14.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.13.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.12.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.11.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.10.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.9.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.8.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.7.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.6.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.5.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.4.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.3.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.2.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (LG (LENGTH (CDR L)) (CDR L) G))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K) (ADD1 (LENGTH L)))
(MEMBER K (NSET (LENGTH L)))
(LG (LENGTH L) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which simplifies, applying the lemmas SUB1-ADD1, CDR-CONS, and CAR-CONS, and
opening up the definitions of LENGTH, NSET, MEMBER, LG-AT-N, AT, EQUAL,
LG-2-AT-N, LG, and LG-3-AT-N, to 21 new formulas:
Case 1.21.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(EQUAL K (ADD1 (LENGTH (CDR L))))
(EQUAL K 0)
(EQUAL (NTH L 0) 5)
(NOT (EQUAL (NTH G 0) 3)))
(EQUAL (NTH G 0) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.20.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.19.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.18.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.17.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.16.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.15.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.14.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.13.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
8)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.12.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.11.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.10.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.9.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5))
(NOT (EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6))
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
7)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
2)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.8.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.7.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
12)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.6.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.5.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.4.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
6)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.3.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
10)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
11)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL (NTH (CDR L) K) 5))
(LISTP L)
(EQUAL (NTH H K)
(ADD1 (ADD1 (LENGTH (CDR L)))))
(MEMBER K (NSET (LENGTH (CDR L))))
(LG-1-AT-N (ADD1 (LENGTH (CDR L)))
L G)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
5)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
3)
(EQUAL (NTH L (ADD1 (LENGTH (CDR L))))
9)
(EQUAL (NTH G (ADD1 (LENGTH (CDR L))))
4)
(LG (LENGTH (CDR L)) L G)
(EQUAL (NTH L K) 5)
(NOT (EQUAL (NTH G K) 3)))
(EQUAL (NTH G K) 4)),
which again simplifies, using linear arithmetic, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 2.3 0.1 ]
LM-LP8-THEN-K-IN-G34
(DISABLE LM-LP8-THEN-K-IN-G34)
[ 0.0 0.0 0.0 ]
LM-LP8-THEN-K-IN-G34-OFF
(PROVE-LEMMA LP8-THEN-K-IN-G34
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 5)
(AT LP K 8))
(UNION-AT-N GP K '(3 4)))
((ENABLE LM-LP8-THEN-K-IN-G34)
(USE (LM-LP8-THEN-K-IN-G34))))
WARNING: Note that LP8-THEN-K-IN-G34 contains the free variables HP, LP, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H)
and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with MOLWS-LIST-L, N-IN-NSET, MOLWS-NUM-N,
MOLWS-N-NOT-0, MOLWS-NUM-K, and MOLWS-LN-L, and opening up the functions AND
and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LP8-THEN-K-IN-G34
(PROVE-LEMMA LM-K-IN-G34
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(LG N LP GP)
(AT L K 5)
(UNION-AT-N LP K '(8 9 10 11 12)))
(UNION-AT-N GP K '(3 4)))
((USE (UN8-12-THEN-L8-OR-L9-12))))
WARNING: Note that LM-K-IN-G34 contains the free variables HP, LP, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture simplifies, appealing to the lemmas MRHO-PRESERVES-LG,
LP8-THEN-K-IN-G34, UN9-12-THEN-UN8-12, and LP9-12-THEN-K-IN-G34, and unfolding
NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-K-IN-G34
(PROVE-LEMMA K-IN-G34
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 5)
(UNION-AT-N LP K '(8 9 10 11 12)))
(UNION-AT-N GP K '(3 4)))
((USE (LM-K-IN-G34))))
WARNING: Note that K-IN-G34 contains the free variables HP, LP, H, G, L, and
N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, K-IN-G34, could be applied whenever the
previously added lemma LM-K-IN-G34 could.
This formula simplifies, rewriting with MRHO-PRESERVES-LG and LM-K-IN-G34, and
opening up the definitions of AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-IN-G34
(PROVE-LEMMA K-IN-INT
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 5)
(UNION-AT-N LP K '(8 9 10 11 12)))
(INTERSECT-8-12-3-4-AT-N K LP GP))
((ENABLE INTERSECT-8-12-3-4-AT-N)
(USE (K-IN-G34))))
WARNING: Note that K-IN-INT contains the free variables HP, H, G, L, and N
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This formula simplifies, appealing to the lemmas K-IN-G34 and
UN8-12-AND-UN34-THEN-INT, and unfolding the definitions of AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-IN-INT
(PROVE-LEMMA K-IN-L5-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L J 3)
(AT L K 5)
(B0B N L H K J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (K-IN-INT))))
WARNING: Note that K-IN-L5-IMP contains the free variables HP, K, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, using linear arithmetic, rewriting with K-IN-INT,
H-J-LEQ-K, and HINT-WTN, and opening up the functions AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
K-IN-L5-IMP
(PROVE-LEMMA EX-HINT-IN-L12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(UNION-AT-N L K '(8 9 10 11))
(EXIST-HINT-8-12-3-4 N L G H J)
(AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12))
(INTERSECT-8-12-3-4-AT-N (EXIST-HINT-8-12-3-4 N L G H J)
LP GP))
((USE (R-NEQ-K (R (EXIST-HINT-8-12-3-4 N L G H J))))))
WARNING: Note that EX-HINT-IN-L12 contains the free variables HP and K which
will be chosen by instantiating the hypotheses (MEMBER K (NSET N)) and:
(MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with the lemmas R-NEQ-K and
EX-HINT-NEQ-K-IMP, and expanding AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
EX-HINT-IN-L12
(PROVE-LEMMA R-NEQ-K-L8-11-K-IN-LP8-12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER R (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL R K))
(UNION-AT-N L R '(8 9 10 11)))
(UNION-AT-N LP R '(8 9 10 11)))
((USE (M-LP-SAME-L (J R)
(M '(8 9 10 11))))))
WARNING: Note that R-NEQ-K-L8-11-K-IN-LP8-12 contains the free variables HP,
GP, K, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with M-LP-SAME-L-NOT and M-LP-SAME-L, and
opening up the definitions of LISTP, NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
R-NEQ-K-L8-11-K-IN-LP8-12
(PROVE-LEMMA R-EQ-K-L8-11-K-IN-LP8-12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(UNION-AT-N L K '(8 9 10 11)))
(UNION-AT-N LP K '(8 9 10 11 12)))
((ENABLE UNION-AT-N AT MRHOI)))
WARNING: Note that R-EQ-K-L8-11-K-IN-LP8-12 contains the free variables HP,
GP, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(MEMBER (NTH L K) '(8 9 10 11)))
(MEMBER (NTH LP K) '(8 9 10 11 12))).
This simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, and NTH-NUMBERP, and expanding MRHOI12, MRHOI11B, MRHOI11A, MRHOI10,
MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A,
MRHOI4, MRHOI3B, LESSP, MEMBER, LISTP, CAR, CDR, UNION-AT-N, MRHOI3A, MRHOI2,
MRHOI1B, MRHOI1A, MRHOI0, AT, and MRHOI, to four new goals:
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(NOT (EQUAL (NTH LP K) 8))
(NOT (EQUAL (NTH LP K) 9))
(NOT (EQUAL (NTH LP K) 10))
(NOT (EQUAL (NTH LP K) 11)))
(EQUAL (NTH LP K) 12)),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the definition of EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL (NTH LP K) 8))
(NOT (EQUAL (NTH LP K) 9))
(NOT (EQUAL (NTH LP K) 10))
(NOT (EQUAL (NTH LP K) 11)))
(EQUAL (NTH LP K) 12)).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(NOT (EQUAL (NTH LP K) 8))
(NOT (EQUAL (NTH LP K) 9))
(NOT (EQUAL (NTH LP K) 10))
(NOT (EQUAL (NTH LP K) 11)))
(EQUAL (NTH LP K) 12)).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL (NTH LP K) 8))
(NOT (EQUAL (NTH LP K) 9))
(NOT (EQUAL (NTH LP K) 10))
(NOT (EQUAL (NTH LP K) 11)))
(EQUAL (NTH LP K) 12)).
However this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding EQUAL, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
R-EQ-K-L8-11-K-IN-LP8-12
(PROVE-LEMMA L8-11-K-IN-LP8-12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER R (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(UNION-AT-N L R '(8 9 10 11)))
(UNION-AT-N LP R '(8 9 10 11 12)))
((USE (R-NEQ-K-L8-11-K-IN-LP8-12))))
WARNING: Note that L8-11-K-IN-LP8-12 contains the free variables HP, GP, K, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, L8-11-K-IN-LP8-12, could be applied
whenever the previously added lemma R-EQ-K-L8-11-K-IN-LP8-12 could.
This conjecture simplifies, rewriting with the lemmas R-EQ-K-L8-11-K-IN-LP8-12
and UN8-11-THEN-UN8-12, and unfolding NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.4 0.0 ]
L8-11-K-IN-LP8-12
(PROVE-LEMMA HINT-IN-L8-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EXIST-HINT-8-12-3-4 N L G H J)
(UNION-AT-N L
(EXIST-HINT-8-12-3-4 N L G H J)
'(8 9 10 11)))
(INTERSECT-8-12-3-4-AT-N (EXIST-HINT-8-12-3-4 N L G H J)
LP GP))
((ENABLE INTERSECT-8-12-3-4-AT-N)
(USE (L8-11-K-IN-GP34 (R (EXIST-HINT-8-12-3-4 N L G H J))))))
WARNING: Note that HINT-IN-L8-11 contains the free variables HP and K which
will be chosen by instantiating the hypotheses (MEMBER K (NSET N)) and:
(MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with the lemmas HINT-MEMBER,
L8-11-K-IN-LP8-12, and UN8-12-AND-UN34-THEN-INT, and unfolding AND and IMPLIES,
to:
T.
Q.E.D.
[ 0.0 1.4 0.0 ]
HINT-IN-L8-11
(PROVE-LEMMA EX-HINT-NOT-IN-L12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)))
(INTERSECT-8-12-3-4-AT-N (EXIST-HINT-8-12-3-4 N L G H J)
LP GP))
((USE (HINT-IN-L8-11))))
WARNING: Note that EX-HINT-NOT-IN-L12 contains the free variables HP and K
which will be chosen by instantiating the hypotheses (MEMBER K (NSET N)) and:
(MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with EX-HINT-IN-L8-12 and CASE-K, and
unfolding AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
EX-HINT-NOT-IN-L12
(PROVE-LEMMA EX-HINT-IN-INT-8-12-3-4-L8-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(UNION-AT-N L K '(8 9 10 11))
(EXIST-HINT-8-12-3-4 N L G H J))
(INTERSECT-8-12-3-4-AT-N (EXIST-HINT-8-12-3-4 N L G H J)
LP GP))
((USE (EX-HINT-NOT-IN-L12))))
WARNING: Note that EX-HINT-IN-INT-8-12-3-4-L8-11 contains the free variables
HP and K which will be chosen by instantiating the hypotheses
(MEMBER K (NSET N)) and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with EX-HINT-IN-L12, and opening up NOT,
AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.9 0.0 ]
EX-HINT-IN-INT-8-12-3-4-L8-11
(PROVE-LEMMA EX-HINT-WTN-L8-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(UNION-AT-N L K '(8 9 10 11))
(EXIST-HINT-8-12-3-4 N L G H J))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (HINT-WTN (R (EXIST-HINT-8-12-3-4 N L G H J))))))
WARNING: Note that EX-HINT-WTN-L8-11 contains the free variables HP, K, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with HINT-MEMBER and
EX-HINT-IN-INT-8-12-3-4-L8-11, and expanding NOT, AND, and IMPLIES, to the
goal:
(IMPLIES (AND (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(UNION-AT-N L K '(8 9 10 11))
(EXIST-HINT-8-12-3-4 N L G H J))
(EXIST-HINT-8-12-3-4 N LP GP H J)).
But this again simplifies, using linear arithmetic and applying
EX-HINT-LP-GP-H-LEQ-H-J, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
EX-HINT-WTN-L8-11
(PROVE-LEMMA K-IN-L8-11-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L J 3)
(B1B N L G H K J)
(UNION-AT-N L K '(8 9 10 11)))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((ENABLE B1B)
(USE (UN8-11-THEN-UN8-12))))
WARNING: Note that K-IN-L8-11-IMP contains the free variables HP, K, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, applying UN8-11-THEN-UN8-12 and EX-HINT-WTN-L8-11,
and unfolding IMPLIES and B1B, to:
T.
Q.E.D.
[ 0.0 0.4 0.0 ]
K-IN-L8-11-IMP
(PROVE-LEMMA M-LP9-12-K-IN-L8-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(UNION-AT-N LP K '(9 10 11 12)))
(UNION-AT-N L K '(8 9 10 11)))
((ENABLE MRHOI UNION-AT-N AT)))
WARNING: Note that M-LP9-12-K-IN-L8-11 contains the free variables HP, GP, LP,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations AND, IMPLIES, and
UNION-AT-N, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(MEMBER (NTH LP K) '(9 10 11 12)))
(MEMBER (NTH L K) '(8 9 10 11))),
which simplifies, applying the lemmas SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and unfolding the definitions of
MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B,
MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MEMBER,
LISTP, CAR, CDR, UNION-AT-N, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT,
and MRHOI, to 44 new conjectures:
Case 44.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 43.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 42.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 41.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
This again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 40.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 39.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 38.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding EQUAL, to:
T.
Case 37.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up EQUAL, to:
T.
Case 36.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 35.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 34.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 33.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding EQUAL, to:
T.
Case 32.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 9))).
However this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 31.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 30.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 11))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 29.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 28.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 9))).
However this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 27.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 26.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))).
This again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up EQUAL, to:
T.
Case 25.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding EQUAL, to:
T.
Case 24.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 9))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the definition of EQUAL, to:
T.
Case 23.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding the definition of EQUAL, to:
T.
Case 22.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 11))).
This again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 21.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 20.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 9))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding EQUAL, to:
T.
Case 19.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the definition of EQUAL, to:
T.
Case 18.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding EQUAL, to:
T.
Case 17.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 16.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 9))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 15.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the definition of EQUAL, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 12))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 9))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the function EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 9))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and expanding EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 9))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the function EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 10))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Q.E.D.
[ 0.0 0.7 0.1 ]
M-LP9-12-K-IN-L8-11
(PROVE-LEMMA K-IN-LP9-12-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L J 3)
(B1B N L G H K J)
(UNION-AT-N LP K '(9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (K-IN-L8-11-IMP))))
WARNING: Note that K-IN-LP9-12-IMP contains the free variables HP, K, G, and
L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, applying the lemmas M-LP9-12-K-IN-L8-11 and K-IN-L8-11-IMP,
and opening up AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
K-IN-LP9-12-IMP
(PROVE-LEMMA K-NOT-IN-L7-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L J 3)
(NOT (AT L K 7))
(B0B N L H K J)
(B1B N L G H K J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (K-NOT-IN-L7-THEN-LP9-12-OR-L5))))
WARNING: Note that K-NOT-IN-L7-IMP contains the free variables HP, K, G, and
L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with M-LP9-12-K-IN-L8-11, L8-11-K-IN-LP8-12,
K-IN-LP9-12-IMP, and K-IN-L5-IMP, and expanding the definitions of NOT, AND,
and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
K-NOT-IN-L7-IMP
(PROVE-LEMMA LM1-B1B-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(AT L J 3)
(B0B N L H K J)
(B1B N L G H K J)
(B1B N L G H (NTH H K) J)
(UNION-AT-N LP K '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (B1B-K-IN-L7-IMP))))
WARNING: Note that LM1-B1B-I-EQ-K-J-NEQ-K contains the free variables HP, K,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, applying K-NOT-IN-L7-IMP, and expanding the
definitions of AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM1-B1B-I-EQ-K-J-NEQ-K
(PROVE-LEMMA EX-HINT-LP-GP-H-LEQ-HP-J
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(EXIST-HINT-8-12-3-4 N LP GP H J))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N LP GP H J)
(NTH HP J))))
((USE (EX-HINT-LP-GP-H-LEQ-H-J))))
WARNING: When the linear lemma EX-HINT-LP-GP-H-LEQ-HP-J is stored under:
(EXIST-HINT-8-12-3-4 N LP GP H J)
it contains the free variables HP, K, G, and L which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER K (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: When the linear lemma EX-HINT-LP-GP-H-LEQ-HP-J is stored under
(NTH HP J) it contains the free variables GP, LP, K, H, G, L, and N which will
be chosen by instantiating the hypotheses (MOLWS N L G H), (MEMBER K (NSET N)),
and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma EX-HINT-LP-GP-H-LEQ-HP-J is to be
stored as zero type prescription rules, zero compound recognizer rules, two
linear rules, and zero replacement rules.
This simplifies, using linear arithmetic and applying EX-HINT-LP-GP-H-LEQ-H-J
and H-MRHOLEMMA, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EX-HINT-LP-GP-H-LEQ-HP-J
(PROVE-LEMMA J-NEQ-K-THEN-HP-EQ-H
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(EXIST-HINT-8-12-3-4 N LP GP H J))
(EXIST-HINT-8-12-3-4 N LP GP HP J))
((USE (HINT-WTN (H HP)
(R (EXIST-HINT-8-12-3-4 N LP GP H J))))))
WARNING: Note that J-NEQ-K-THEN-HP-EQ-H contains the free variables K, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER K (NSET N)).
This formula simplifies, applying the lemmas HINT-MEMBER and
EX-HINT-LP-GP-H-IN-INT-8-12-3-4, and expanding the definitions of NOT, AND,
and IMPLIES, to:
(IMPLIES (AND (LESSP (EXIST-HINT-8-12-3-4 N LP GP H J)
(NTH HP J))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(EXIST-HINT-8-12-3-4 N LP GP H J))
(EXIST-HINT-8-12-3-4 N LP GP HP J)),
which again simplifies, using linear arithmetic and rewriting with
EX-HINT-LP-GP-H-LEQ-HP-J, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
J-NEQ-K-THEN-HP-EQ-H
(PROVE-LEMMA LM-B1B-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL J K))
(LG N L G)
(B0B N L H K J)
(B1B N L G H K J)
(B1B N L G H (NTH H K) J)
(AT L J 3)
(UNION-AT-N LP K '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP HP J))
((USE (LM1-B1B-I-EQ-K-J-NEQ-K))))
WARNING: Note that LM-B1B-I-EQ-K-J-NEQ-K contains the free variables K, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER K (NSET N)).
This simplifies, applying J-NEQ-K-THEN-HP-EQ-H, and opening up the definitions
of AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-B1B-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B1B-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL J K))
(LG N L G)
(B0B N L H K J)
(B1B N L G H K J)
(B1B N L G H (NTH H K) J))
(B1B N LP GP HP K J))
((ENABLE B1B)
(USE (LM-B1B-I-EQ-K-J-NEQ-K))))
WARNING: Note that B1B-I-EQ-K-J-NEQ-K contains the free variables H, G, and L
which will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations B1B, NOT, AND, and
IMPLIES, to the goal:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL J K))
(LG N L G)
(B0B N L H K J)
(B1B N L G H K J)
(B1B N L G H (NTH H K) J)
(AT L J 3)
(UNION-AT-N LP K '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP HP J))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL J K))
(LG N L G)
(B0B N L H K J)
(B1B N L G H K J)
(B1B N L G H (NTH H K) J)
(UNION-AT-N LP K '(8 9 10 11 12))
(AT LP J 3))
(EXIST-HINT-8-12-3-4 N LP GP HP J)).
This simplifies, applying M-L-SAME-LP-AT and LM-B1B-I-EQ-K-J-NEQ-K, and
opening up the definitions of NOT, B1B, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 5.9 0.0 ]
B1B-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B1B-I-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1B N L G H K K))
(B1B N LP GP HP K K))
((ENABLE B1B UNION-AT-N AT)))
WARNING: Note that B1B-I-J-EQ-K contains the free variables H, G, and L which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This formula can be simplified, using the abbreviations AT, UNION-AT-N, B1B,
AND, and IMPLIES, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1B N L G H K K)
(MEMBER (NTH LP K) '(8 9 10 11 12))
(EQUAL (NTH LP K) 3))
(EXIST-HINT-8-12-3-4 N LP GP HP K)),
which simplifies, opening up the functions AT, UNION-AT-N, CDR, CAR, LISTP,
MEMBER, and B1B, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
B1B-I-J-EQ-K
(PROVE-LEMMA B1B-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(B0B N L H K J)
(B1B N L G H K J)
(B1B N L G H (NTH H K) J))
(B1B N LP GP HP K J))
((USE (B1B-I-EQ-K-J-NEQ-K))))
WARNING: Note that B1B-I-EQ-K contains the free variables H, G, and L which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
WARNING: the newly proposed lemma, B1B-I-EQ-K, could be applied whenever the
previously added lemma B1B-I-EQ-K-J-NEQ-K could.
This conjecture simplifies, applying B1B-I-J-EQ-K, and unfolding the functions
NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.6 0.0 ]
B1B-I-EQ-K
(PROVE-LEMMA EX-HINT-LEQ-H-K
(REWRITE)
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
(NTH H K)))))
WARNING: When the linear lemma EX-HINT-LEQ-H-K is stored under (NTH H K) it
contains the free variables G, L, and N which will be chosen by instantiating
the hypothesis (EXIST-HINT-8-12-3-4 N L G H K).
WARNING: Note that the proposed lemma EX-HINT-LEQ-H-K is to be stored as zero
type prescription rules, zero compound recognizer rules, two linear rules, and
zero replacement rules.
This formula simplifies, using linear arithmetic and rewriting with the lemma
EX-HINT-LP-GP-H-LEQ-H-J, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EX-HINT-LEQ-H-K
(PROVE-LEMMA H-K-LEQ-SUB1-EX-HINT
(REWRITE)
(IMPLIES (AND (EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH H K)
(EXIST-HINT-8-12-3-4 N L G H K))))
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K))))
((ENABLE AT) (USE (EX-HINT-LEQ-H-K))))
WARNING: When the linear lemma H-K-LEQ-SUB1-EX-HINT is stored under (NTH H K)
it contains the free variables G, L, and N which will be chosen by
instantiating the hypothesis (EXIST-HINT-8-12-3-4 N L G H K).
WARNING: Note that the proposed lemma H-K-LEQ-SUB1-EX-HINT is to be stored as
zero type prescription rules, zero compound recognizer rules, two linear rules,
and zero replacement rules.
This simplifies, using linear arithmetic and applying EX-HINT-LEQ-H-K, to two
new goals:
Case 2. (IMPLIES (AND (NOT (NUMBERP (EXIST-HINT-8-12-3-4 N L G H K)))
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
(NTH H K))))
(EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH H K)
(EXIST-HINT-8-12-3-4 N L G H K))))
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K)))),
which again simplifies, clearly, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP (NTH H K)))
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
(NTH H K))))
(EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH H K)
(EXIST-HINT-8-12-3-4 N L G H K))))
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K)))).
However this again simplifies, opening up LESSP, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
H-K-LEQ-SUB1-EX-HINT
(PROVE-LEMMA EX-HINT-NEQ-H-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EXIST-HINT-8-12-3-4 N L G H K)
(AT L K 3)
(AT LP K 3))
(NOT (EQUAL (NTH H K)
(EXIST-HINT-8-12-3-4 N L G H K))))
((USE (EX-HINT-NOT-IN-G02))))
WARNING: Note that EX-HINT-NEQ-H-K contains the free variables HP, GP, and LP
which will be chosen by instantiating the hypothesis:
(MRHOI N K L G H LP GP HP).
This formula simplifies, appealing to the lemma H-K-G02, and opening up NOT
and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.4 0.0 ]
EX-HINT-NEQ-H-K
(PROVE-LEMMA LM-HP-K-LEQ-EX-L-G-H
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K))))
((USE (H-K-LEQ-SUB1-EX-HINT))))
WARNING: When the linear lemma LM-HP-K-LEQ-EX-L-G-H is stored under:
(EXIST-HINT-8-12-3-4 N L G H K)
it contains the free variables HP, GP, and LP which will be chosen by
instantiating the hypothesis (MRHOI N K L G H LP GP HP).
WARNING: When the linear lemma LM-HP-K-LEQ-EX-L-G-H is stored under (NTH H K)
it contains the free variables HP, GP, LP, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM-HP-K-LEQ-EX-L-G-H is to be stored as
zero type prescription rules, zero compound recognizer rules, two linear rules,
and zero replacement rules.
This conjecture simplifies, using linear arithmetic and rewriting with
H-K-LEQ-SUB1-EX-HINT and EX-HINT-NEQ-H-K, to:
(IMPLIES
(AND (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
1)
(IMPLIES (AND (EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH H K)
(EXIST-HINT-8-12-3-4 N L G H K))))
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K))))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K)))).
But this again simplifies, using linear arithmetic and applying the lemmas
H-K-LEQ-SUB1-EX-HINT and EX-HINT-NEQ-H-K, to the conjecture:
(IMPLIES
(AND (EQUAL (EXIST-HINT-8-12-3-4 N L G H K)
0)
(LESSP (EXIST-HINT-8-12-3-4 N L G H K)
1)
(IMPLIES (AND (EXIST-HINT-8-12-3-4 N L G H K)
(NOT (EQUAL (NTH H K)
(EXIST-HINT-8-12-3-4 N L G H K))))
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K))))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K)))).
But this again simplifies, applying NTH-NUMBERP, and opening up the
definitions of LESSP, NOT, AND, SUB1, EQUAL, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.6 0.0 ]
LM-HP-K-LEQ-EX-L-G-H
(PROVE-LEMMA EX-COND-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(EXIST-HINT-8-12-3-4 N L G H K)
(NOT (LESSP (SUB1 (EXIST-HINT-8-12-3-4 N L G H K))
(NTH H K))))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
(NTH HP K))))
((USE (COND-L3 (I (EXIST-HINT-8-12-3-4 N L G H K))))))
WARNING: When the linear lemma EX-COND-L3 is stored under:
(EXIST-HINT-8-12-3-4 N L G H K)
it contains the free variables HP, GP, and LP which will be chosen by
instantiating the hypothesis (MRHOI N K L G H LP GP HP).
WARNING: When the linear lemma EX-COND-L3 is stored under (NTH HP K) it
contains the free variables GP, LP, H, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma EX-COND-L3 is to be stored as zero type
prescription rules, zero compound recognizer rules, two linear rules, and zero
replacement rules.
This formula simplifies, appealing to the lemma HINT-MEMBER, and unfolding the
functions AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.8 0.0 ]
EX-COND-L3
(PROVE-LEMMA HP-K-LEQ-EX-L-G-H
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
(NTH HP K))))
((USE (HINT-MEMBER (J K)))))
WARNING: When the linear lemma HP-K-LEQ-EX-L-G-H is stored under:
(EXIST-HINT-8-12-3-4 N L G H K)
it contains the free variables HP, GP, and LP which will be chosen by
instantiating the hypothesis (MRHOI N K L G H LP GP HP).
WARNING: When the linear lemma HP-K-LEQ-EX-L-G-H is stored under (NTH HP K)
it contains the free variables GP, LP, H, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma HP-K-LEQ-EX-L-G-H is to be stored as
zero type prescription rules, zero compound recognizer rules, two linear rules,
and zero replacement rules.
This formula simplifies, using linear arithmetic and applying the lemmas
EX-COND-L3 and LM-HP-K-LEQ-EX-L-G-H, to:
(IMPLIES (AND (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
1)
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(MEMBER (EXIST-HINT-8-12-3-4 N L G H K)
(NSET N)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
(NTH HP K)))),
which again simplifies, using linear arithmetic and applying
LM-HP-K-LEQ-EX-L-G-H, to:
(IMPLIES (AND (EQUAL (EXIST-HINT-8-12-3-4 N L G H K)
0)
(LESSP (EXIST-HINT-8-12-3-4 N L G H K)
1)
(IMPLIES (EXIST-HINT-8-12-3-4 N L G H K)
(MEMBER (EXIST-HINT-8-12-3-4 N L G H K)
(NSET N)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(NOT (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
(NTH HP K)))),
which again simplifies, using linear arithmetic, applying EX-COND-L3 and
LM-HP-K-LEQ-EX-L-G-H, and expanding the function SUB1, to:
T.
Q.E.D.
[ 0.0 0.7 0.0 ]
HP-K-LEQ-EX-L-G-H
(PROVE-LEMMA EX-HINT-NEQ-K-IN-L3
(REWRITE)
(IMPLIES (AND (AT L K 3)
(UNION-AT-N L
(EXIST-HINT-8-12-3-4 N L G H K)
'(8 9 10 11 12)))
(NOT (EQUAL K
(EXIST-HINT-8-12-3-4 N L G H K))))
((ENABLE AT UNION-AT-N)
(USE (EX-HINT-IN-L8-12))))
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
AT, and UNION-AT-N, to:
(IMPLIES (AND (IMPLIES (EXIST-HINT-8-12-3-4 N L G H J)
(MEMBER (NTH L
(EXIST-HINT-8-12-3-4 N L G H J))
'(8 9 10 11 12)))
(EQUAL (NTH L K) 3)
(MEMBER (NTH L
(EXIST-HINT-8-12-3-4 N L G H K))
'(8 9 10 11 12)))
(NOT (EQUAL K
(EXIST-HINT-8-12-3-4 N L G H K)))).
This simplifies, opening up CDR, CAR, LISTP, MEMBER, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
EX-HINT-NEQ-K-IN-L3
(PROVE-LEMMA EX-HINT-L-G-H-IN-INT-8-12-3-4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(INTERSECT-8-12-3-4-AT-N (EXIST-HINT-8-12-3-4 N L G H K)
LP GP))
((USE (EX-HINT-NEQ-K-IMP))))
WARNING: Note that EX-HINT-L-G-H-IN-INT-8-12-3-4 contains the free variable
HP which will be chosen by instantiating the hypothesis:
(MRHOI N K L G H LP GP HP).
This formula simplifies, applying EX-HINT-NEQ-K-IN-L3, EX-HINT-IN-L8-12, and
EX-HINT-NEQ-K-IMP, and unfolding NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 3.4 0.0 ]
EX-HINT-L-G-H-IN-INT-8-12-3-4
(PROVE-LEMMA EX-L-G-H-K-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
((USE (HINT-WTN (H HP)
(J K)
(R (EXIST-HINT-8-12-3-4 N L G H K))))))
WARNING: Note that EX-L-G-H-K-IN-L3 contains the free variables H, G, and L
which will be chosen by instantiating the hypothesis (MOLWS N L G H).
This formula simplifies, applying HINT-MEMBER and
EX-HINT-L-G-H-IN-INT-8-12-3-4, and unfolding the functions NOT, AND, and
IMPLIES, to the formula:
(IMPLIES (AND (LESSP (EXIST-HINT-8-12-3-4 N L G H K)
(NTH HP K))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(EXIST-HINT-8-12-3-4 N L G H K))
(EXIST-HINT-8-12-3-4 N LP GP HP K)).
This again simplifies, using linear arithmetic and rewriting with
HP-K-LEQ-EX-L-G-H, to:
T.
Q.E.D.
[ 0.0 0.9 0.0 ]
EX-L-G-H-K-IN-L3
(PROVE-LEMMA LM-K-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(UNION-AT-N L I '(8 9 10 11 12))
(B1B N L G H I K))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
((ENABLE B1B)
(USE (EX-L-G-H-K-IN-L3))))
WARNING: Note that LM-K-IN-L3 contains the free variables I, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER I (NSET N)).
This formula simplifies, unfolding the functions AND, IMPLIES, and B1B, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
LM-K-IN-L3
(PROVE-LEMMA K-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(AT L K 3)
(B1B N L G H I K))
(B1B N LP GP HP I K))
((ENABLE B1B) (USE (LM-K-IN-L3))))
WARNING: Note that K-IN-L3 contains the free variables H, G, and L which will
be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations B1B, NOT, AND, and
IMPLIES, to the formula:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 3)
(AT LP K 3)
(UNION-AT-N L I '(8 9 10 11 12))
(B1B N L G H I K))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(AT L K 3)
(B1B N L G H I K)
(UNION-AT-N LP I '(8 9 10 11 12))
(AT LP K 3))
(EXIST-HINT-8-12-3-4 N LP GP HP K)).
This simplifies, applying the lemma M-L-SAME-LP, and unfolding B1B, AND, and
IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
K-IN-L3
(PROVE-LEMMA HP-K-LEQ-I
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 2)
(AT LP K 3))
(NOT (LESSP I (NTH HP K))))
((ENABLE MRHOI AT)))
WARNING: When the linear lemma HP-K-LEQ-I is stored under (NTH HP K) it
contains the free variables GP, LP, I, H, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER I (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma HP-K-LEQ-I is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to the formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 2)
(EQUAL (NTH LP K) 3))
(NOT (LESSP I (NTH HP K)))).
This simplifies, using linear arithmetic, rewriting with K-IN-L2-IMP, and
expanding AT, to two new goals:
Case 2. (IMPLIES (AND (NOT (NUMBERP (NTH L K)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 2)
(EQUAL (NTH LP K) 3))
(NOT (LESSP I (NTH HP K)))),
which again simplifies, trivially, to:
T.
Case 1. (IMPLIES (AND (NOT (NUMBERP (NTH LP K)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 2)
(EQUAL (NTH LP K) 3))
(NOT (LESSP I (NTH HP K)))).
This again simplifies, clearly, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
HP-K-LEQ-I
(PROVE-LEMMA B1B-U-NEQ-K
(REWRITE)
(IMPLIES (AND (MEMBER U (NSET N))
(MEMBER K (NSET N))
(LG N L G)
(AT G U 4)
(AT L K 2))
(NOT (EQUAL K U)))
((USE (U-IF4))))
WARNING: Note that B1B-U-NEQ-K contains the free variables G, L, and N which
will be chosen by instantiating the hypotheses (MEMBER U (NSET N)) and
(LG N L G).
This formula simplifies, applying U-IF4, and opening up the definitions of AND,
NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B1B-U-NEQ-K
(PROVE-LEMMA LM-U-IN-INT-8-12-3-4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER U (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 2)
(AT G U 4)
(UNION-AT-N LP U '(8 9 10 11 12)))
(INTERSECT-8-12-3-4-AT-N U LP GP))
((ENABLE INTERSECT-8-12-3-4-AT-N)
(USE (B1B-U-NEQ-K))))
WARNING: Note that LM-U-IN-INT-8-12-3-4 contains the free variables HP, K, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with B1B-U-NEQ-K, LP4-THEN-UN34,
M-GP-SAME-G-AT, and UN8-12-AND-UN34-THEN-INT, and opening up the definitions
of AND, NOT, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-U-IN-INT-8-12-3-4
(PROVE-LEMMA K-NEQ-U-IN-LP8-12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER U (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL U K))
(LG N L G)
(AT G U 4))
(UNION-AT-N LP U '(8 9 10 11 12)))
((USE (B1A-IF4))))
WARNING: Note that K-NEQ-U-IN-LP8-12 contains the free variables HP, GP, K, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with M-LP-SAME-L-NOT, and expanding the
functions AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-NEQ-U-IN-LP8-12
(PROVE-LEMMA LM1-U-IN-INT-8-12-3-4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER U (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 2)
(AT G U 4))
(UNION-AT-N LP U '(8 9 10 11 12)))
((USE (K-NEQ-U-IN-LP8-12))))
WARNING: Note that LM1-U-IN-INT-8-12-3-4 contains the free variables HP, GP,
K, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, applying U-IF4, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM1-U-IN-INT-8-12-3-4
(PROVE-LEMMA U-IN-INT-8-12-3-4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER U (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 2)
(AT G U 4))
(INTERSECT-8-12-3-4-AT-N U LP GP))
((USE (LM-U-IN-INT-8-12-3-4))))
WARNING: Note that U-IN-INT-8-12-3-4 contains the free variables HP, K, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, U-IN-INT-8-12-3-4, could be applied
whenever the previously added lemma LM-U-IN-INT-8-12-3-4 could.
This conjecture simplifies, rewriting with LM1-U-IN-INT-8-12-3-4 and
LM-U-IN-INT-8-12-3-4, and unfolding AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
U-IN-INT-8-12-3-4
(PROVE-LEMMA H-I-IN-G34-IMP
(REWRITE)
(IMPLIES (AND (MEMBER (NTH H I) (NSET N))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 2)
(AT LP K 3)
(AT G (NTH H I) 4))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
((USE (HINT-WTN (H HP)
(J K)
(R (NTH H I))))))
WARNING: Note that H-I-IN-G34-IMP contains the free variables G, L, I, and H
which will be chosen by instantiating the hypotheses:
(MEMBER (NTH H I) (NSET N))
and (MOLWS N L G H).
This simplifies, applying U-IN-INT-8-12-3-4, and expanding NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (LESSP (NTH H I) (NTH HP K))
(MEMBER (NTH H I) (NSET N))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 2)
(AT LP K 3)
(AT G (NTH H I) 4))
(EXIST-HINT-8-12-3-4 N LP GP HP K)).
But this again simplifies, using linear arithmetic and rewriting with
HP-K-LEQ-I, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
H-I-IN-G34-IMP
(PROVE-LEMMA I-NOT-IN-G34
(REWRITE)
(IMPLIES (AND (NOT (UNION-AT-N G I '(3 4)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT L K 2)
(AT LP K 3)
(B1C N L G H I)
(UNION-AT-N L I '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
((ENABLE B1C) (USE (H-I-IN-G34-IMP))))
WARNING: Note that I-NOT-IN-G34 contains the free variables H, L, I, and G
which will be chosen by instantiating the hypotheses:
(NOT (UNION-AT-N G I '(3 4)))
and (MOLWS N L G H).
This simplifies, opening up the functions AND, IMPLIES, and B1C, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
I-NOT-IN-G34
(PROVE-LEMMA I-IN-INT-8-12-3-4
(REWRITE)
(IMPLIES (AND (UNION-AT-N G I '(3 4))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(UNION-AT-N L I '(8 9 10 11 12)))
(INTERSECT-8-12-3-4-AT-N I LP GP))
((ENABLE INTERSECT-8-12-3-4-AT-N)))
WARNING: Note that I-IN-INT-8-12-3-4 contains the free variables HP, K, H, L,
N, and G which will be chosen by instantiating the hypotheses:
(UNION-AT-N G I '(3 4))
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with M-GP-SAME-G, M-LP-SAME-L, and
UN8-12-AND-UN34-THEN-INT, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
I-IN-INT-8-12-3-4
(PROVE-LEMMA I-IN-G34
(REWRITE)
(IMPLIES (AND (UNION-AT-N G I '(3 4))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(AT L K 2)
(AT LP K 3)
(UNION-AT-N L I '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
((USE (HINT-WTN (H HP) (J K) (R I)))))
WARNING: Note that I-IN-G34 contains the free variables H, L, I, and G which
will be chosen by instantiating the hypotheses (UNION-AT-N G I (QUOTE (3 4)))
and (MOLWS N L G H).
This formula simplifies, rewriting with I-IN-INT-8-12-3-4, and opening up the
definitions of NOT, AND, and IMPLIES, to:
(IMPLIES (AND (LESSP I (NTH HP K))
(UNION-AT-N G I '(3 4))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(AT L K 2)
(AT LP K 3)
(UNION-AT-N L I '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP HP K)).
However this again simplifies, using linear arithmetic and rewriting with
HP-K-LEQ-I, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
I-IN-G34
(PROVE-LEMMA K-IN-L2
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL I K))
(LG N L G)
(AT L K 2)
(AT LP K 3)
(B1C N L G H I)
(UNION-AT-N L I '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
((USE (I-NOT-IN-G34))))
WARNING: Note that K-IN-L2 contains the free variables I, H, G, and L which
will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER I (NSET N)).
This formula simplifies, rewriting with M-LP-SAME-L, M-L-SAME-LP, and I-IN-G34,
and opening up the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.8 0.0 ]
K-IN-L2
(PROVE-LEMMA LP3-THEN-L3-OR-L2
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 3))
(AT LP K 3))
(AT L K 2))
((ENABLE MRHOI AT)))
WARNING: Note that LP3-THEN-L3-OR-L2 contains the free variables HP, GP, LP,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH L K) 3))
(EQUAL (NTH LP K) 3))
(EQUAL (NTH L K) 2)).
This simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, and NTH-NUMBERP, and expanding the definitions of MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, LESSP, MRHOI5A, MRHOI4, MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A,
MRHOI0, AT, MRHOI, and EQUAL, to 13 new formulas:
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))).
This again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 3))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 3))).
But this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 3))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding EQUAL, to:
T.
Q.E.D.
[ 0.0 0.2 0.1 ]
LP3-THEN-L3-OR-L2
(PROVE-LEMMA LM-K-NOT-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL I K))
(LG N L G)
(NOT (AT L K 3))
(AT LP K 3)
(B1C N L G H I)
(UNION-AT-N L I '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
((USE (K-IN-L2))))
WARNING: Note that LM-K-NOT-IN-L3 contains the free variables I, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER I (NSET N)).
This formula simplifies, applying LP3-THEN-L3-OR-L2, M-LP-SAME-L, and
M-L-SAME-LP, and unfolding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-K-NOT-IN-L3
(PROVE-LEMMA K-NOT-IN-L3
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL I K))
(LG N L G)
(NOT (AT L K 3))
(B1B N L G H I K)
(B1C N L G H I))
(B1B N LP GP HP I K))
((ENABLE B1B) (USE (LM-K-NOT-IN-L3))))
WARNING: Note that K-NOT-IN-L3 contains the free variables H, G, and L which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations B1B, NOT, AND, and
IMPLIES, to the goal:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL I K))
(LG N L G)
(NOT (AT L K 3))
(AT LP K 3)
(B1C N L G H I)
(UNION-AT-N L I '(8 9 10 11 12)))
(EXIST-HINT-8-12-3-4 N LP GP HP K))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL I K))
(LG N L G)
(NOT (AT L K 3))
(B1B N L G H I K)
(B1C N L G H I)
(UNION-AT-N LP I '(8 9 10 11 12))
(AT LP K 3))
(EXIST-HINT-8-12-3-4 N LP GP HP K)).
This simplifies, applying M-L-SAME-LP, and unfolding the functions NOT, AND,
and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
K-NOT-IN-L3
(PROVE-LEMMA B1B-I-NEQ-K-J-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL I K))
(LG N L G)
(B1B N L G H I K)
(B1C N L G H I))
(B1B N LP GP HP I K))
((USE (K-NOT-IN-L3))))
WARNING: Note that B1B-I-NEQ-K-J-EQ-K contains the free variables H, G, and L
which will be chosen by instantiating the hypothesis (MOLWS N L G H).
WARNING: the newly proposed lemma, B1B-I-NEQ-K-J-EQ-K, could be applied
whenever the previously added lemma K-NOT-IN-L3 could.
This formula simplifies, applying K-IN-L3, and unfolding the definitions of
NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B1B-I-NEQ-K-J-EQ-K
(PROVE-LEMMA LM-I-NEQ-K-IN-INT-8-12-3-4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(LG N L G)
(AT G I 4))
(INTERSECT-8-12-3-4-AT-N I LP GP))
((ENABLE INTERSECT-8-12-3-4-AT-N)
(USE (K-NEQ-U-IN-LP8-12 (U I)))))
WARNING: Note that LM-I-NEQ-K-IN-INT-8-12-3-4 contains the free variables HP,
K, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, applying K-NEQ-U-IN-LP8-12, M-GP-SAME-G, LP4-THEN-UN34, and
UN8-12-AND-UN34-THEN-INT, and opening up the definitions of NOT, AND, and
IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-I-NEQ-K-IN-INT-8-12-3-4
(PROVE-LEMMA I-NEQ-K-IN-INT-8-12-3-4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(UNION-AT-N L I '(8 9 10 11 12))
(LG N L G)
(AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I))
(INTERSECT-8-12-3-4-AT-N I LP GP))
((ENABLE B3A)
(USE (LM-I-NEQ-K-IN-INT-8-12-3-4))))
WARNING: Note that I-NEQ-K-IN-INT-8-12-3-4 contains the free variables J, HP,
K, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), (MRHOI N K L G H LP GP HP), and:
(AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12).
This simplifies, applying M-L-SAME-LP, UN8-12-THEN-UN5-12, and M-LP-SAME-L,
and opening up the functions NOT, AND, IMPLIES, and B3A, to:
T.
Q.E.D.
[ 0.0 5.1 0.0 ]
I-NEQ-K-IN-INT-8-12-3-4
(PROVE-LEMMA H-J-LEQ-I
(REWRITE)
(IMPLIES (AND (UNION-AT-N L I '(8 9 10 11 12))
(EXIST-HINT-8-12-3-4 N L G H J)
(AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I))
(NOT (LESSP I (NTH H J))))
((ENABLE B2A)
(USE (L12-THEN-UN10-12 (U (EXIST-HINT-8-12-3-4 N L G H J))))))
WARNING: When the linear lemma H-J-LEQ-I is stored under (NTH H J) it
contains the free variables G, N, I, and L which will be chosen by
instantiating the hypotheses (UNION-AT-N L I (QUOTE (8 9 10 11 12))) and:
(EXIST-HINT-8-12-3-4 N L G H J).
WARNING: Note that the proposed lemma H-J-LEQ-I is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This formula simplifies, applying the lemmas L12-THEN-UN10-12 and
UN8-12-THEN-UN5-12, and expanding IMPLIES and B2A, to:
(IMPLIES (AND (UNION-AT-N L I '(8 9 10 11 12))
(EXIST-HINT-8-12-3-4 N L G H J)
(AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)
(NOT (LESSP I
(EXIST-HINT-8-12-3-4 N L G H J))))
(NOT (LESSP I (NTH H J)))),
which again simplifies, using linear arithmetic and applying
H-K-LEQ-SUB1-EX-HINT, to:
(IMPLIES (AND (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
1)
(UNION-AT-N L I '(8 9 10 11 12))
(EXIST-HINT-8-12-3-4 N L G H J)
(AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)
(NOT (LESSP I
(EXIST-HINT-8-12-3-4 N L G H J))))
(NOT (LESSP I (NTH H J)))),
which again simplifies, using linear arithmetic and rewriting with the lemma
EX-HINT-LEQ-H-K, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
H-J-LEQ-I
(PROVE-LEMMA I-NEQ-K-EX-HINT-IN-L12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(LG N L G)
(UNION-AT-N L I '(8 9 10 11 12))
(EXIST-HINT-8-12-3-4 N L G H J)
(AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (HINT-WTN (R I)))))
WARNING: Note that I-NEQ-K-EX-HINT-IN-L12 contains the free variables HP, K,
I, G, and L which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER I (NSET N)), (MEMBER K (NSET N)), and:
(MRHOI N K L G H LP GP HP).
This simplifies, rewriting with the lemma I-NEQ-K-IN-INT-8-12-3-4, and
unfolding the definitions of NOT, AND, and IMPLIES, to:
(IMPLIES (AND (LESSP I (NTH H J))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(LG N L G)
(UNION-AT-N L I '(8 9 10 11 12))
(EXIST-HINT-8-12-3-4 N L G H J)
(AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I))
(EXIST-HINT-8-12-3-4 N LP GP H J)).
This again simplifies, using linear arithmetic and rewriting with H-J-LEQ-I,
to:
T.
Q.E.D.
[ 0.0 1.0 0.0 ]
I-NEQ-K-EX-HINT-IN-L12
(PROVE-LEMMA I-NEQ-K-EX-HINT-NOT-IN-L12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (HINT-WTN (R (EXIST-HINT-8-12-3-4 N L G H J))))))
WARNING: Note that I-NEQ-K-EX-HINT-NOT-IN-L12 contains the free variables HP,
K, G, and L which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, applying HINT-MEMBER and EX-HINT-NOT-IN-L12, and
unfolding NOT, AND, and IMPLIES, to the conjecture:
(IMPLIES (AND (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)))
(EXIST-HINT-8-12-3-4 N LP GP H J)).
However this again simplifies, using linear arithmetic and rewriting with
H-K-LEQ-SUB1-EX-HINT, to:
(IMPLIES (AND (LESSP (EXIST-HINT-8-12-3-4 N L G H J)
1)
(LESSP (EXIST-HINT-8-12-3-4 N L G H J)
(NTH H J))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(EXIST-HINT-8-12-3-4 N L G H J)
(NOT (AT L
(EXIST-HINT-8-12-3-4 N L G H J)
12)))
(EXIST-HINT-8-12-3-4 N LP GP H J)),
which again simplifies, using linear arithmetic and applying the lemma
EX-HINT-LEQ-H-K, to:
T.
Q.E.D.
[ 0.0 0.6 0.0 ]
I-NEQ-K-EX-HINT-NOT-IN-L12
(PROVE-LEMMA LM1-B1B-I-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(LG N L G)
(UNION-AT-N L I '(8 9 10 11 12))
(EXIST-HINT-8-12-3-4 N L G H J)
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I))
(EXIST-HINT-8-12-3-4 N LP GP H J))
((USE (I-NEQ-K-EX-HINT-IN-L12))))
WARNING: Note that LM1-B1B-I-J-NEQ-K contains the free variables HP, K, I, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER I (NSET N)), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, applying the lemmas M-LP-SAME-L, M-L-SAME-LP, and
I-NEQ-K-EX-HINT-NOT-IN-L12, and expanding NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 2.3 0.0 ]
LM1-B1B-I-J-NEQ-K
(PROVE-LEMMA LM-B1B-I-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(LG N L G)
(UNION-AT-N L I '(8 9 10 11 12))
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(EXIST-HINT-8-12-3-4 N L G H J))
(EXIST-HINT-8-12-3-4 N LP GP HP J))
((USE (LM1-B1B-I-J-NEQ-K))))
WARNING: Note that LM-B1B-I-J-NEQ-K contains the free variables K, I, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER I (NSET N)), and (MEMBER K (NSET N)).
This simplifies, applying M-LP-SAME-L, M-L-SAME-LP, and J-NEQ-K-THEN-HP-EQ-H,
and unfolding the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 1.2 0.0 ]
LM-B1B-I-J-NEQ-K
(PROVE-LEMMA B1B-I-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(LG N L G)
(B1B N L G H I J)
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I))
(B1B N LP GP HP I J))
((ENABLE B1B)
(USE (LM-B1B-I-J-NEQ-K))))
WARNING: Note that B1B-I-J-NEQ-K contains the free variables K, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER K (NSET N)).
This conjecture can be simplified, using the abbreviations B1B, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(LG N L G)
(UNION-AT-N L I '(8 9 10 11 12))
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(EXIST-HINT-8-12-3-4 N L G H J))
(EXIST-HINT-8-12-3-4 N LP GP HP J))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (EQUAL J K))
(LG N L G)
(B1B N L G H I J)
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(UNION-AT-N LP I '(8 9 10 11 12))
(AT LP J 3))
(EXIST-HINT-8-12-3-4 N LP GP HP J)).
This simplifies, applying M-L-SAME-LP and M-L-SAME-LP-AT, and expanding the
functions NOT, AND, IMPLIES, and B1B, to:
T.
Q.E.D.
[ 0.0 0.4 0.0 ]
B1B-I-J-NEQ-K
(PROVE-LEMMA B1B-I-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL I K))
(LG N L G)
(B0B N L H I J)
(B1B N L G H I J)
(B1C N L G H I)
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I))
(B1B N LP GP HP I J))
((USE (B1B-I-J-NEQ-K))))
WARNING: Note that B1B-I-NEQ-K contains the free variables K, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER K (NSET N)).
This simplifies, rewriting with B1B-I-NEQ-K-J-EQ-K, and expanding the
functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B1B-I-NEQ-K
(PROVE-LEMMA MRHO-PRESERVES-B1B NIL
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(B0B N L H I J)
(B1B N L G H (NTH H K) J)
(B1B N L G H I J)
(B1C N L G H I)
(B2A L
(EXIST-HINT-8-12-3-4 N L G H J)
I)
(B3A L G
(EXIST-HINT-8-12-3-4 N L G H J)
I))
(B1B N LP GP HP I J))
((USE (B1B-I-NEQ-K) (B1B-I-EQ-K))))
This formula simplifies, unfolding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.4 0.0 ]
MRHO-PRESERVES-B1B
(PROVE-LEMMA NOT-G34-THEN-NOT-G4
(REWRITE)
(IMPLIES (NOT (UNION-AT-N G I '(3 4)))
(NOT (AT G I 4)))
((ENABLE UNION-AT-N AT)))
This formula can be simplified, using the abbreviations NOT, IMPLIES, AT, and
UNION-AT-N, to:
(IMPLIES (NOT (MEMBER (NTH G I) '(3 4)))
(NOT (EQUAL (NTH G I) 4))),
which simplifies, unfolding the definition of MEMBER, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
NOT-G34-THEN-NOT-G4
(PROVE-LEMMA CONTRA-IF4
(REWRITE)
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(AT G J 4))
(UNION-AT-N L J '(9 10 11 12)))
((ENABLE LG LG-AT-N LG-3-AT-N UNION-AT-N AT NSET)))
WARNING: Note that CONTRA-IF4 contains the free variables G and N which will
be chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LG N L G).
This conjecture can be simplified, using the abbreviations AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH G J) 4))
(MEMBER (NTH L J) '(9 10 11 12))).
This simplifies, opening up the functions CDR, CAR, LISTP, and MEMBER, to:
(IMPLIES (AND (MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH G J) 4)
(NOT (EQUAL (NTH L J) 9))
(NOT (EQUAL (NTH L J) 10))
(NOT (EQUAL (NTH L J) 11)))
(EQUAL (NTH L J) 12)),
which we will name *1.
Perhaps we can prove it by induction. The recursive terms in the
conjecture suggest two inductions. However, they merge into one likely
candidate induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p L J G N))
(IMPLIES (AND (NOT (ZEROP N))
(p L J G (SUB1 N)))
(p L J G N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be
used to establish that the measure (COUNT N) decreases according to the
well-founded relation LESSP in each induction step of the scheme. The above
induction scheme leads to three new goals:
Case 3. (IMPLIES (AND (ZEROP N)
(MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH G J) 4)
(NOT (EQUAL (NTH L J) 9))
(NOT (EQUAL (NTH L J) 10))
(NOT (EQUAL (NTH L J) 11)))
(EQUAL (NTH L J) 12)),
which simplifies, opening up the functions ZEROP, NSET, LISTP, and MEMBER,
to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH G J) 4)
(NOT (EQUAL (NTH L J) 9))
(NOT (EQUAL (NTH L J) 10))
(NOT (EQUAL (NTH L J) 11)))
(EQUAL (NTH L J) 12)),
which simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and
unfolding the definitions of ZEROP, NSET, MEMBER, LG-AT-N, AT, LG-3-AT-N,
and LG, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL J 0)
(EQUAL (NTH G 0) 4)
(NOT (EQUAL (NTH L 0) 9))
(NOT (EQUAL (NTH L 0) 10))
(NOT (EQUAL (NTH L 0) 11)))
(EQUAL (NTH L 0) 12)).
This again simplifies, trivially, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LG (SUB1 N) L G))
(MEMBER J (NSET N))
(LG N L G)
(EQUAL (NTH G J) 4)
(NOT (EQUAL (NTH L J) 9))
(NOT (EQUAL (NTH L J) 10))
(NOT (EQUAL (NTH L J) 11)))
(EQUAL (NTH L J) 12)).
This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding the
definitions of ZEROP, NSET, MEMBER, LG-AT-N, AT, LG-3-AT-N, and LG, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (LG (SUB1 N) L G))
(EQUAL J N)
(EQUAL J 0)
(EQUAL (NTH G 0) 4)
(NOT (EQUAL (NTH L 0) 9))
(NOT (EQUAL (NTH L 0) 10))
(NOT (EQUAL (NTH L 0) 11)))
(EQUAL (NTH L 0) 12)).
This again simplifies, clearly, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.0 ]
CONTRA-IF4
(PROVE-LEMMA LP8-NOT-L5-THEN-L7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 5))
(AT LP K 8))
(AT L K 7))
((ENABLE AT MRHOI)))
WARNING: Note that LP8-NOT-L5-THEN-L7 contains the free variables HP, GP, LP,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH L K) 5))
(EQUAL (NTH LP K) 8))
(EQUAL (NTH L K) 7)).
This simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, and NTH-NUMBERP, and expanding the definitions of MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A,
MRHOI0, AT, MRHOI, and EQUAL, to 11 new formulas:
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))).
This again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 8))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.1 ]
LP8-NOT-L5-THEN-L7
(PROVE-LEMMA LP8-NOT-G34-THEN-K-IN-L7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT LP K 8)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(AT L K 7))
((USE (LP8-NOT-L5-THEN-L7))))
WARNING: Note that LP8-NOT-G34-THEN-K-IN-L7 contains the free variables HP,
GP, LP, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with K-IN-G34, and unfolding the functions
NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LP8-NOT-G34-THEN-K-IN-L7
(PROVE-LEMMA LM-K-IN-L7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(LG N LP GP)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(AT L K 7))
((USE (UN8-12-THEN-L8-OR-L9-12))))
WARNING: Note that LM-K-IN-L7 contains the free variables HP, GP, LP, H, G,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying MRHO-PRESERVES-LG,
LP8-NOT-G34-THEN-K-IN-L7, M-LP9-12-K-IN-L8-11, L8-11-K-IN-LP8-12, and
L8-11-K-IN-GP34, and expanding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-K-IN-L7
(PROVE-LEMMA K-IN-L7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(AT L K 7))
((USE (LM-K-IN-L7))))
WARNING: Note that K-IN-L7 contains the free variables HP, GP, LP, H, G, and
N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, K-IN-L7, could be applied whenever the
previously added lemma LM-K-IN-L7 could.
WARNING: the newly proposed lemma, K-IN-L7, could be applied whenever the
previously added lemma LP8-NOT-G34-THEN-K-IN-L7 could.
This simplifies, applying MRHO-PRESERVES-LG and LM-K-IN-L7, and expanding NOT,
AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
K-IN-L7
(PROVE-LEMMA H-K-COND-L7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT L K 7)
(UNION-AT-N LP K '(8 9 10 11 12)))
(EQUAL (NTH HP K) (NTH H K)))
((ENABLE AT UNION-AT-N MRHOI)))
WARNING: Note that H-K-COND-L7 contains the free variables GP, LP, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH L K) 7)
(MEMBER (NTH LP K) '(8 9 10 11 12)))
(EQUAL (NTH HP K) (NTH H K))).
This simplifies, applying NOT-G34-THEN-NOT-G4, and unfolding the functions
MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B,
MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, UNION-AT-N, MEMBER,
MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, EQUAL, AT, MRHOI, CDR, CAR,
and LISTP, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
H-K-COND-L7
(PROVE-LEMMA LM-H-K-G4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(AT L K 7)
(UNION-AT-N LP K '(8 9 10 11 12)))
(AND (MEMBER (NTH HP K) (NSET N))
(AT G (NTH HP K) 4)))
((ENABLE B1D) (USE (H-K-COND-L7))))
WARNING: Note that LM-H-K-G4 contains the free variables GP, LP, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that LM-H-K-G4 contains the free variables GP, LP, H, L, and N
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM-H-K-G4 is to be stored as zero type
prescription rules, zero compound recognizer rules, zero linear rules, and two
replacement rules.
This simplifies, applying the lemmas H-K-COND-L7 and COND-L7, and opening up
AND, IMPLIES, and B1D, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-H-K-G4
(PROVE-LEMMA H-K-G4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(AND (MEMBER (NTH HP K) (NSET N))
(AT G (NTH HP K) 4)))
((USE (LM-H-K-G4))))
WARNING: Note that H-K-G4 contains the free variables GP, LP, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that H-K-G4 contains the free variables GP, LP, H, L, and N
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma H-K-G4 is to be stored as zero type
prescription rules, zero compound recognizer rules, zero linear rules, and two
replacement rules.
This simplifies, rewriting with K-IN-L7, H-K-COND-L7, and COND-L7, and
expanding the definitions of AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
H-K-G4
(PROVE-LEMMA LM1-I-EQ-K-THEN-H-K-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(AT L K 7)
(AT G (NTH HP K) 4))
(NOT (AT HP K K)))
((ENABLE AT B1D UNION-AT-N)
(USE (CONTRA-IF4 (J (NTH HP K))))))
WARNING: Note that LM1-I-EQ-K-THEN-H-K-NEQ-K contains the free variables GP,
LP, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (IMPLIES (AND (MEMBER (NTH HP K) (NSET N))
(LG N L G)
(EQUAL (NTH G (NTH HP K)) 4))
(MEMBER (NTH L (NTH HP K))
'(9 10 11 12)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(EQUAL (NTH L K) 7)
(EQUAL (NTH G (NTH HP K)) 4))
(NOT (EQUAL (NTH HP K) K))),
which simplifies, opening up the definitions of EQUAL, AND, MEMBER, and
IMPLIES, to:
T.
Q.E.D.
[ 0.0 2.0 0.0 ]
LM1-I-EQ-K-THEN-H-K-NEQ-K
(PROVE-LEMMA LM-I-EQ-K-THEN-H-K-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(AT L K 7)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(NOT (AT HP K K)))
((USE (LM1-I-EQ-K-THEN-H-K-NEQ-K))))
WARNING: Note that LM-I-EQ-K-THEN-H-K-NEQ-K contains the free variables GP,
LP, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying K-IN-L7, H-K-COND-L7, COND-L7, and
LM1-I-EQ-K-THEN-H-K-NEQ-K, and opening up the definitions of AND, NOT, and
IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-I-EQ-K-THEN-H-K-NEQ-K
(PROVE-LEMMA I-EQ-K-THEN-H-K-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(NOT (AT HP K K)))
((USE (H-K-G4))))
WARNING: Note that I-EQ-K-THEN-H-K-NEQ-K contains the free variables GP, LP,
H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, I-EQ-K-THEN-H-K-NEQ-K, could be applied
whenever the previously added lemma LM-I-EQ-K-THEN-H-K-NEQ-K could.
This conjecture simplifies, applying the lemmas K-IN-L7, H-K-COND-L7, COND-L7,
and LM-I-EQ-K-THEN-H-K-NEQ-K, and expanding the functions NOT, AND, and
IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
I-EQ-K-THEN-H-K-NEQ-K
(PROVE-LEMMA B1C-I-EQ-K-HP-K-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (AT HP K K))
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(AND (MEMBER (NTH HP K) (NSET N))
(AT GP (NTH HP K) 4)))
((ENABLE AT) (USE (H-K-G4))))
WARNING: Note that B1C-I-EQ-K-HP-K-NEQ-K contains the free variables GP, LP,
H, G, and L which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
WARNING: the previously added lemma, H-K-G4, could be applied whenever the
newly proposed B1C-I-EQ-K-HP-K-NEQ-K could!
WARNING: Note that B1C-I-EQ-K-HP-K-NEQ-K contains the free variables LP, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H)
and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma B1C-I-EQ-K-HP-K-NEQ-K is to be stored
as zero type prescription rules, zero compound recognizer rules, zero linear
rules, and two replacement rules.
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and
AT, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(AND (MEMBER (NTH HP K) (NSET N))
(EQUAL (NTH G (NTH HP K)) 4)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL (NTH HP K) K))
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(AND (MEMBER (NTH HP K) (NSET N))
(EQUAL (NTH GP (NTH HP K)) 4))),
which simplifies, applying the lemmas K-IN-L7 and H-K-COND-L7, and opening up
the definitions of NOT, AND, and IMPLIES, to the goal:
(IMPLIES (AND (MEMBER (NTH H K) (NSET N))
(EQUAL (NTH G (NTH H K)) 4)
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (EQUAL (NTH H K) K))
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(EQUAL (NTH GP (NTH H K)) 4)).
However this again simplifies, rewriting with G-MRHOLEMMA, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
B1C-I-EQ-K-HP-K-NEQ-K
(PROVE-LEMMA B1C-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G))
(B1C N LP GP HP K))
((ENABLE B1C)
(USE (B1C-I-EQ-K-HP-K-NEQ-K))))
WARNING: Note that B1C-I-EQ-K contains the free variables H, G, and L which
will be chosen by instantiating the hypothesis (MOLWS N L G H).
This conjecture can be simplified, using the abbreviations B1C, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(NOT (AT HP K K))
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(AND (MEMBER (NTH HP K) (NSET N))
(AT GP (NTH HP K) 4)))
(MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(UNION-AT-N LP K '(8 9 10 11 12))
(NOT (UNION-AT-N GP K '(3 4))))
(IF (MEMBER (NTH HP K) (NSET N))
(AT GP (NTH HP K) 4)
F)).
This simplifies, rewriting with I-EQ-K-THEN-H-K-NEQ-K, K-IN-L7, and
H-K-COND-L7, and opening up the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
B1C-I-EQ-K
(PROVE-LEMMA L9-11-THEN-IN-LP9-12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 12))
(UNION-AT-N L K '(9 10 11 12)))
(UNION-AT-N LP K '(9 10 11 12)))
((ENABLE UNION-AT-N AT MRHOI)))
WARNING: Note that L9-11-THEN-IN-LP9-12 contains the free variables HP, GP, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
UNION-AT-N, and AT, to the formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH L K) 12))
(MEMBER (NTH L K) '(9 10 11 12)))
(MEMBER (NTH LP K) '(9 10 11 12))).
This simplifies, rewriting with SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and expanding MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, and EQUAL, to three new
goals:
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL (NTH LP K) 9))
(NOT (EQUAL (NTH LP K) 10))
(NOT (EQUAL (NTH LP K) 11)))
(EQUAL (NTH LP K) 12)),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(NOT (EQUAL (NTH LP K) 9))
(NOT (EQUAL (NTH LP K) 10))
(NOT (EQUAL (NTH LP K) 11)))
(EQUAL (NTH LP K) 12)),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H)
(NOT (EQUAL (NTH LP K) 9))
(NOT (EQUAL (NTH LP K) 10))
(NOT (EQUAL (NTH LP K) 11)))
(EQUAL (NTH LP K) 12)),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up EQUAL, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
L9-11-THEN-IN-LP9-12
(PROVE-LEMMA K-IN-LP9-12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT G K 4)
(NOT (AT L K 12)))
(UNION-AT-N LP K '(9 10 11 12)))
((USE (CONTRA-IF4 (J K)))))
WARNING: Note that K-IN-LP9-12 contains the free variables HP, GP, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with CONTRA-IF4, IF4, and
L9-11-THEN-IN-LP9-12, and expanding the definitions of AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-IN-LP9-12
(PROVE-LEMMA LM-K-NOT-IN-L12-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(LG N LP GP)
(AT G K 4)
(NOT (AT L K 12)))
(AT GP K 4))
((DISABLE MRHO-PRESERVES-LG)
(USE (K-IN-LP9-12))))
WARNING: Note that LM-K-NOT-IN-L12-IMP contains the free variables HP, LP, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying the lemmas CONTRA-IF4, IF4, and
K-IN-LP9-12, and unfolding NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM-K-NOT-IN-L12-IMP
(PROVE-LEMMA K-NOT-IN-L12-IMP
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LG N L G)
(AT G K 4)
(NOT (AT L K 12)))
(AT GP K 4))
((USE (LM-K-NOT-IN-L12-IMP))))
WARNING: Note that K-NOT-IN-L12-IMP contains the free variables HP, LP, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H)
and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, K-NOT-IN-L12-IMP, could be applied
whenever the previously added lemma LM-K-NOT-IN-L12-IMP could.
This simplifies, applying MRHO-PRESERVES-LG, CONTRA-IF4, IF4, and
LM-K-NOT-IN-L12-IMP, and opening up the definitions of NOT, AND, and IMPLIES,
to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
K-NOT-IN-L12-IMP
(PROVE-LEMMA K-NOT-IN-L12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B3A L G K I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(NOT (AT L K 12)))
((ENABLE B3A)
(USE (UN8-12-THEN-UN5-12))))
WARNING: Note that K-NOT-IN-L12 contains the free variables HP, GP, LP, I, H,
G, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with L12-THEN-UN8-12, UN8-12-THEN-UN5-12, and
NOT-G34-THEN-NOT-G4, and unfolding IMPLIES and B3A, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
K-NOT-IN-L12
(PROVE-LEMMA LM1-B1C-I-NEQ-K-H-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH H I) K)
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(AT GP K 4))
((ENABLE B1C) (USE (K-NOT-IN-L12))))
WARNING: Note that LM1-B1C-I-NEQ-K-H-I-EQ-K contains the free variables HP,
LP, I, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER I (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with K-NOT-IN-L12-IMP, and unfolding NOT,
AND, IMPLIES, and B1C, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
LM1-B1C-I-NEQ-K-H-I-EQ-K
(PROVE-LEMMA LM-B1C-I-NEQ-K-H-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT H I K)
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(AND (MEMBER (NTH H I) (NSET N))
(AT GP (NTH H I) 4)))
((ENABLE AT)
(USE (LM1-B1C-I-NEQ-K-H-I-EQ-K))))
WARNING: Note that LM-B1C-I-NEQ-K-H-I-EQ-K contains the free variables HP, GP,
LP, K, G, and L which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: Note that LM-B1C-I-NEQ-K-H-I-EQ-K contains the free variables HP, LP,
K, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM-B1C-I-NEQ-K-H-I-EQ-K is to be stored
as zero type prescription rules, zero compound recognizer rules, zero linear
rules, and two replacement rules.
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH H I) K)
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(EQUAL (NTH GP K) 4))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH H I) K)
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(AND (MEMBER (NTH H I) (NSET N))
(EQUAL (NTH GP (NTH H I)) 4))).
This simplifies, unfolding the definitions of NOT, AND, IMPLIES, and EQUAL, to:
T.
Q.E.D.
[ 0.0 0.6 0.0 ]
LM-B1C-I-NEQ-K-H-I-EQ-K
(PROVE-LEMMA B3A-H-RHOLEMMA
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B3A L G (NTH H I) I))
(B3A L G (NTH HP I) I)))
WARNING: Note that B3A-H-RHOLEMMA contains the free variables GP, LP, K, H,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, rewriting with the lemma H-MRHOLEMMA, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B3A-H-RHOLEMMA
(PROVE-LEMMA B1C-I-NEQ-K-H-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(AT H I K)
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I))
(B1C N LP GP HP I))
((ENABLE B1C)
(USE (LM-B1C-I-NEQ-K-H-I-EQ-K))))
WARNING: Note that B1C-I-NEQ-K-H-I-EQ-K contains the free variables K, H, G,
and L which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER K (NSET N)).
This formula can be simplified, using the abbreviations B1C, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT H I K)
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(AND (MEMBER (NTH H I) (NSET N))
(AT GP (NTH H I) 4)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(AT H I K)
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I)
(UNION-AT-N LP I '(8 9 10 11 12))
(NOT (UNION-AT-N GP I '(3 4))))
(IF (MEMBER (NTH HP I) (NSET N))
(AT GP (NTH HP I) 4)
F)),
which simplifies, rewriting with H-MRHOLEMMA, M-GP-SAME-G-NOT, M-L-SAME-LP,
and B3A-H-RHOLEMMA, and expanding the definitions of B1C, NOT, AND, and
IMPLIES, to:
T.
Q.E.D.
[ 0.0 1.8 0.0 ]
B1C-I-NEQ-K-H-I-EQ-K
(PROVE-LEMMA LM-B1C-I-H-I-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H I K))
(B1C N L G H I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(AND (MEMBER (NTH H I) (NSET N))
(AT GP (NTH H I) 4)))
((ENABLE B1C AT)
(USE (G-MRHOLEMMA (J (NTH H I))))))
WARNING: Note that LM-B1C-I-H-I-NEQ-K contains the free variables HP, GP, LP,
K, G, and L which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: Note that LM-B1C-I-H-I-NEQ-K contains the free variables HP, LP, K,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma LM-B1C-I-H-I-NEQ-K is to be stored as
zero type prescription rules, zero compound recognizer rules, zero linear
rules, and two replacement rules.
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
and AT, to the conjecture:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER (NTH H I) (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL K (NTH H I))))
(EQUAL (NTH G (NTH H I))
(NTH GP (NTH H I))))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH H I) K))
(B1C N L G H I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(AND (MEMBER (NTH H I) (NSET N))
(EQUAL (NTH GP (NTH H I)) 4))).
This simplifies, expanding the definitions of NOT, AND, IMPLIES, B1C, AT, and
EQUAL, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-B1C-I-H-I-NEQ-K
(PROVE-LEMMA B1C-I-H-I-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (AT H I K))
(B1C N L G H I))
(B1C N LP GP HP I))
((ENABLE B1C)
(USE (LM-B1C-I-H-I-NEQ-K))))
WARNING: Note that B1C-I-H-I-NEQ-K contains the free variables K, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER K (NSET N)).
This formula can be simplified, using the abbreviations B1C, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT H I K))
(B1C N L G H I)
(UNION-AT-N L I '(8 9 10 11 12))
(NOT (UNION-AT-N G I '(3 4))))
(AND (MEMBER (NTH H I) (NSET N))
(AT GP (NTH H I) 4)))
(MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(NOT (AT H I K))
(B1C N L G H I)
(UNION-AT-N LP I '(8 9 10 11 12))
(NOT (UNION-AT-N GP I '(3 4))))
(IF (MEMBER (NTH HP I) (NSET N))
(AT GP (NTH HP I) 4)
F)),
which simplifies, rewriting with H-MRHOLEMMA, M-GP-SAME-G-NOT, and M-L-SAME-LP,
and expanding the definitions of NOT, B1C, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
B1C-I-H-I-NEQ-K
(PROVE-LEMMA B1C-I-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I))
(B1C N LP GP HP I))
((USE (B1C-I-H-I-NEQ-K))))
WARNING: Note that B1C-I-NEQ-K contains the free variables K, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and
(MEMBER K (NSET N)).
WARNING: the newly proposed lemma, B1C-I-NEQ-K, could be applied whenever the
previously added lemma B1C-I-NEQ-K-H-I-EQ-K could.
This formula simplifies, rewriting with H-MRHOLEMMA and B1C-I-NEQ-K-H-I-EQ-K,
and opening up the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.5 0.0 ]
B1C-I-NEQ-K
(PROVE-LEMMA MRHO-PRESERVES-B1C NIL
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(LG N L G)
(B1C N L G H I)
(B3A L G (NTH H I) I))
(B1C N LP GP HP I))
((USE (B1C-I-NEQ-K))))
This simplifies, rewriting with the lemma B1C-I-EQ-K, and unfolding the
definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHO-PRESERVES-B1C
(PROVE-LEMMA REMAINDER-QUOTIENT
(REWRITE)
(EQUAL (REMAINDER X (ADD1 X))
(FIX X)))
This simplifies, unfolding FIX, to two new formulas:
Case 2. (IMPLIES (NOT (NUMBERP X))
(EQUAL (REMAINDER X (ADD1 X)) 0)),
which again simplifies, rewriting with SUB1-TYPE-RESTRICTION, and unfolding
the definitions of LESSP, NUMBERP, EQUAL, and REMAINDER, to:
T.
Case 1. (IMPLIES (NUMBERP X)
(EQUAL (REMAINDER X (ADD1 X)) X)).
Name the above subgoal *1.
Perhaps we can prove it by induction. There is only one plausible
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP (ADD1 X)) (p X))
(IMPLIES (AND (NOT (ZEROP (ADD1 X)))
(LESSP X (ADD1 X)))
(p X))
(IMPLIES (AND (NOT (ZEROP (ADD1 X)))
(NOT (LESSP X (ADD1 X)))
(p (DIFFERENCE X (ADD1 X))))
(p X))).
Linear arithmetic, the lemmas COUNT-NUMBERP and COUNT-NOT-LESSP, and the
definition of ZEROP 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 produces the following three new formulas:
Case 3. (IMPLIES (AND (ZEROP (ADD1 X)) (NUMBERP X))
(EQUAL (REMAINDER X (ADD1 X)) X)).
This simplifies, unfolding ZEROP, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP (ADD1 X)))
(LESSP X (ADD1 X))
(NUMBERP X))
(EQUAL (REMAINDER X (ADD1 X)) X)).
This simplifies, rewriting with SUB1-ADD1, and expanding the definitions of
ZEROP, LESSP, NUMBERP, ADD1, REMAINDER, and EQUAL, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP (ADD1 X)))
(NOT (LESSP X (ADD1 X)))
(EQUAL (REMAINDER (DIFFERENCE X (ADD1 X))
(ADD1 (DIFFERENCE X (ADD1 X))))
(DIFFERENCE X (ADD1 X)))
(NUMBERP X))
(EQUAL (REMAINDER X (ADD1 X)) X)),
which simplifies, using linear arithmetic, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
REMAINDER-QUOTIENT
(PROVE-LEMMA LM1-MEMBER-REMAINDER
(REWRITE)
(IMPLIES (NOT (LESSP X N))
(NOT (MEMBER (ADD1 X) (NSET (SUB1 N)))))
((ENABLE NSET)))
This conjecture simplifies, using linear arithmetic and applying N-NOT-LESS-J,
to:
(IMPLIES (AND (NOT (LESSP X N)) (LESSP N 1))
(NOT (MEMBER (ADD1 X) (NSET (SUB1 N))))).
Appealing to the lemma SUB1-ELIM, we now replace N by (ADD1 Z) to eliminate
(SUB1 N). We rely upon the type restriction lemma noted when SUB1 was
introduced to constrain the new variable. The result is three new goals:
Case 3. (IMPLIES (AND (EQUAL N 0)
(NOT (LESSP X N))
(LESSP N 1))
(NOT (MEMBER (ADD1 X) (NSET (SUB1 N))))),
which further simplifies, expanding EQUAL, LESSP, SUB1, NSET, LISTP, and
MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP N))
(NOT (LESSP X N))
(LESSP N 1))
(NOT (MEMBER (ADD1 X) (NSET (SUB1 N))))),
which further simplifies, applying the lemma SUB1-NNUMBERP, and unfolding
LESSP, NUMBERP, EQUAL, NSET, LISTP, and MEMBER, to:
T.
Case 1. (IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 Z) 0))
(NOT (LESSP X (ADD1 Z)))
(LESSP (ADD1 Z) 1))
(NOT (MEMBER (ADD1 X) (NSET Z)))),
which further simplifies, using linear arithmetic, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
LM1-MEMBER-REMAINDER
(PROVE-LEMMA LM-MEMBER-REMAINDER
(REWRITE)
(IMPLIES (MEMBER (ADD1 X) (NSET (SUB1 N)))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N))))
((ENABLE NSET)))
.
Appealing to the lemma SUB1-ELIM, we now replace N by (ADD1 Z) to eliminate
(SUB1 N). We use the type restriction lemma noted when SUB1 was introduced to
constrain the new variable. This generates three new formulas:
Case 3. (IMPLIES (AND (EQUAL N 0)
(MEMBER (ADD1 X) (NSET (SUB1 N))))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N)))),
which simplifies, opening up the definitions of SUB1, NSET, LISTP, and
MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP N))
(MEMBER (ADD1 X) (NSET (SUB1 N))))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N)))),
which simplifies, applying SUB1-NNUMBERP, and expanding the definitions of
NSET, LISTP, and MEMBER, to:
T.
Case 1. (IMPLIES (AND (NUMBERP Z)
(NOT (EQUAL (ADD1 Z) 0))
(MEMBER (ADD1 X) (NSET Z)))
(MEMBER (ADD1 (REMAINDER X (ADD1 Z)))
(NSET Z))).
This simplifies, trivially, to:
(IMPLIES (AND (NUMBERP Z)
(MEMBER (ADD1 X) (NSET Z)))
(MEMBER (ADD1 (REMAINDER X (ADD1 Z)))
(NSET Z))),
which we would normally push and work on later by induction. But if we must
use induction to prove the input conjecture, we prefer to induct on the
original formulation of the problem. Thus we will disregard all that we
have previously done, give the name *1 to the original input, and work on it.
So now let us return to:
(IMPLIES (MEMBER (ADD1 X) (NSET (SUB1 N)))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N)))),
named *1. Let us appeal to the induction principle. There is only one
suggested induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p X N))
(IMPLIES (AND (NOT (ZEROP N)) (LESSP X N))
(p X N))
(IMPLIES (AND (NOT (ZEROP N))
(NOT (LESSP X N))
(p (DIFFERENCE X N) N))
(p X N))).
Linear arithmetic, the lemmas COUNT-NUMBERP and COUNT-NOT-LESSP, and the
definition of ZEROP 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 four new formulas:
Case 4. (IMPLIES (AND (ZEROP N)
(MEMBER (ADD1 X) (NSET (SUB1 N))))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N)))),
which simplifies, applying SUB1-NNUMBERP, and unfolding the functions ZEROP,
SUB1, NSET, LISTP, and MEMBER, to:
T.
Case 3. (IMPLIES (AND (NOT (ZEROP N))
(LESSP X N)
(MEMBER (ADD1 X) (NSET (SUB1 N))))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N)))).
This simplifies, expanding the functions ZEROP and REMAINDER, to:
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(LESSP X N)
(MEMBER (ADD1 X) (NSET (SUB1 N)))
(NOT (NUMBERP X)))
(MEMBER 1 (NSET (SUB1 N)))),
which again simplifies, applying SUB1-TYPE-RESTRICTION, and expanding the
function LESSP, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LESSP X N))
(NOT (MEMBER (ADD1 (DIFFERENCE X N))
(NSET (SUB1 N))))
(MEMBER (ADD1 X) (NSET (SUB1 N))))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N)))).
This simplifies, applying the lemma LM1-MEMBER-REMAINDER, and opening up the
definition of ZEROP, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(NOT (LESSP X N))
(MEMBER (ADD1 (REMAINDER (DIFFERENCE X N) N))
(NSET (SUB1 N)))
(MEMBER (ADD1 X) (NSET (SUB1 N))))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N)))).
This simplifies, applying LM1-MEMBER-REMAINDER, and opening up the function
ZEROP, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
LM-MEMBER-REMAINDER
(PROVE-LEMMA MEMBER-REMAINDER
(REWRITE)
(IMPLIES (MEMBER J (NSET N))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET N)))
((ENABLE NSET)))
.
Appealing to the lemma SUB1-ELIM, we now replace J by (ADD1 X) to eliminate
(SUB1 J). We employ the type restriction lemma noted when SUB1 was introduced
to constrain the new variable. The result is three new formulas:
Case 3. (IMPLIES (AND (EQUAL J 0) (MEMBER J (NSET N)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET N))),
which simplifies, appealing to the lemma ZERO-NOT-MEMBER-NSET, to:
T.
Case 2. (IMPLIES (AND (NOT (NUMBERP J))
(MEMBER J (NSET N)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET N))),
which simplifies, rewriting with the lemma NSET-NUMBER, to:
T.
Case 1. (IMPLIES (AND (NUMBERP X)
(NOT (EQUAL (ADD1 X) 0))
(MEMBER (ADD1 X) (NSET N)))
(MEMBER (ADD1 (REMAINDER X N))
(NSET N))),
which simplifies, clearly, to:
(IMPLIES (AND (NUMBERP X)
(MEMBER (ADD1 X) (NSET N)))
(MEMBER (ADD1 (REMAINDER X N))
(NSET N))),
which we would normally push and work on later by induction. But if we must
use induction to prove the input conjecture, we prefer to induct on the
original formulation of the problem. Thus we will disregard all that we
have previously done, give the name *1 to the original input, and work on it.
So now let us return to:
(IMPLIES (MEMBER J (NSET N))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET N))).
We named this *1. We will try to 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 (ZEROP N) (p J N))
(IMPLIES (AND (NOT (ZEROP N)) (p J (SUB1 N)))
(p J N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
produces three new formulas:
Case 3. (IMPLIES (AND (ZEROP N) (MEMBER J (NSET N)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET N))),
which simplifies, unfolding the functions ZEROP, NSET, LISTP, and MEMBER, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(NOT (MEMBER J (NSET (SUB1 N))))
(MEMBER J (NSET N)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET N))),
which simplifies, rewriting with CDR-CONS and CAR-CONS, and opening up the
definitions of ZEROP, NSET, and MEMBER, to the following two new conjectures:
Case 2.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(NOT (EQUAL J 0)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) J))
(CONS J (NSET (SUB1 J))))).
This again simplifies, using linear arithmetic, applying N-NOT-LESS-J,
CDR-CONS, and CAR-CONS, and expanding the definition of MEMBER, to:
(IMPLIES (AND (NUMBERP N)
(NOT (EQUAL N 0))
(NOT (EQUAL (ADD1 (REMAINDER (SUB1 N) N))
N)))
(MEMBER (ADD1 (REMAINDER (SUB1 N) N))
(NSET (SUB1 N)))).
Applying the lemma SUB1-ELIM, replace N by (ADD1 X) to eliminate (SUB1 N).
We use the type restriction lemma noted when SUB1 was introduced to
restrict the new variable. We thus obtain:
(IMPLIES (AND (NUMBERP X)
(NOT (EQUAL (ADD1 X) 0))
(NOT (EQUAL (ADD1 (REMAINDER X (ADD1 X)))
(ADD1 X))))
(MEMBER (ADD1 (REMAINDER X (ADD1 X)))
(NSET X))),
which further simplifies, applying REMAINDER-QUOTIENT, to:
T.
Case 2.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(NOT (MEMBER J (NSET (SUB1 N))))
(EQUAL J N)
(EQUAL J 0))
(MEMBER (ADD1 (REMAINDER (SUB1 J) J))
NIL)).
This again simplifies, obviously, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(MEMBER (ADD1 (REMAINDER (SUB1 J) (SUB1 N)))
(NSET (SUB1 N)))
(MEMBER J (NSET N)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET N))).
This simplifies, applying the lemmas CDR-CONS and CAR-CONS, and expanding
ZEROP, NSET, and MEMBER, to the following three new formulas:
Case 1.3.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(MEMBER (ADD1 (REMAINDER (SUB1 J) (SUB1 N)))
(NSET (SUB1 N)))
(EQUAL J N)
(NOT (EQUAL J 0)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) J))
(CONS J (NSET (SUB1 J))))).
However this again simplifies, rewriting with CDR-CONS and CAR-CONS, and
opening up MEMBER, to:
(IMPLIES (AND (NUMBERP N)
(MEMBER (ADD1 (REMAINDER (SUB1 N) (SUB1 N)))
(NSET (SUB1 N)))
(NOT (EQUAL N 0))
(NOT (EQUAL (ADD1 (REMAINDER (SUB1 N) N))
N)))
(MEMBER (ADD1 (REMAINDER (SUB1 N) N))
(NSET (SUB1 N)))).
Applying the lemma SUB1-ELIM, replace N by (ADD1 X) to eliminate (SUB1 N).
We use the type restriction lemma noted when SUB1 was introduced to
restrict the new variable. This produces:
(IMPLIES (AND (NUMBERP X)
(MEMBER (ADD1 (REMAINDER X X))
(NSET X))
(NOT (EQUAL (ADD1 X) 0))
(NOT (EQUAL (ADD1 (REMAINDER X (ADD1 X)))
(ADD1 X))))
(MEMBER (ADD1 (REMAINDER X (ADD1 X)))
(NSET X))),
which further simplifies, applying REMAINDER-QUOTIENT, to:
T.
Case 1.2.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(MEMBER (ADD1 (REMAINDER (SUB1 J) (SUB1 N)))
(NSET (SUB1 N)))
(EQUAL J N)
(EQUAL J 0))
(MEMBER (ADD1 (REMAINDER (SUB1 J) J))
NIL)).
This again simplifies, trivially, to:
T.
Case 1.1.
(IMPLIES (AND (NOT (EQUAL N 0))
(NUMBERP N)
(MEMBER (ADD1 (REMAINDER (SUB1 J) (SUB1 N)))
(NSET (SUB1 N)))
(MEMBER J (NSET (SUB1 N)))
(NOT (EQUAL (ADD1 (REMAINDER (SUB1 J) N))
N)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET (SUB1 N)))).
Appealing to the lemma SUB1-ELIM, we now replace J by (ADD1 X) to
eliminate (SUB1 J). We employ the type restriction lemma noted when SUB1
was introduced to constrain the new variable. We must thus prove three
new formulas:
Case 1.1.3.
(IMPLIES (AND (EQUAL J 0)
(NOT (EQUAL N 0))
(NUMBERP N)
(MEMBER (ADD1 (REMAINDER (SUB1 J) (SUB1 N)))
(NSET (SUB1 N)))
(MEMBER J (NSET (SUB1 N)))
(NOT (EQUAL (ADD1 (REMAINDER (SUB1 J) N))
N)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET (SUB1 N)))),
which further simplifies, rewriting with ZERO-NOT-MEMBER-NSET, and
expanding the definitions of SUB1, LESSP, EQUAL, NUMBERP, REMAINDER, and
ADD1, to:
T.
Case 1.1.2.
(IMPLIES (AND (NOT (NUMBERP J))
(NOT (EQUAL N 0))
(NUMBERP N)
(MEMBER (ADD1 (REMAINDER (SUB1 J) (SUB1 N)))
(NSET (SUB1 N)))
(MEMBER J (NSET (SUB1 N)))
(NOT (EQUAL (ADD1 (REMAINDER (SUB1 J) N))
N)))
(MEMBER (ADD1 (REMAINDER (SUB1 J) N))
(NSET (SUB1 N)))).
But this further simplifies, rewriting with NSET-NUMBER, to:
T.
Case 1.1.1.
(IMPLIES (AND (NUMBERP X)
(NOT (EQUAL (ADD1 X) 0))
(NOT (EQUAL N 0))
(NUMBERP N)
(MEMBER (ADD1 (REMAINDER X (SUB1 N)))
(NSET (SUB1 N)))
(MEMBER (ADD1 X) (NSET (SUB1 N)))
(NOT (EQUAL (ADD1 (REMAINDER X N)) N)))
(MEMBER (ADD1 (REMAINDER X N))
(NSET (SUB1 N)))).
But this further simplifies, rewriting with LM-MEMBER-REMAINDER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.1 0.1 ]
MEMBER-REMAINDER
(PROVE-LEMMA ONE-NSET
(REWRITE)
(IMPLIES (NOT (ZEROP N))
(MEMBER 1 (NSET N)))
((ENABLE NSET)))
This conjecture can be simplified, using the abbreviations ZEROP, NOT, and
IMPLIES, to:
(IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N))
(MEMBER 1 (NSET N))).
Give the above formula the name *1.
Perhaps we can prove it by induction. There is only one plausible
induction. We will induct according to the following scheme:
(AND (IMPLIES (ZEROP N) (p N))
(IMPLIES (AND (NOT (ZEROP N)) (p (SUB1 N)))
(p N))).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure (COUNT N) decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
produces the following three new conjectures:
Case 3. (IMPLIES (AND (ZEROP N)
(NOT (EQUAL N 0))
(NUMBERP N))
(MEMBER 1 (NSET N))).
This simplifies, expanding the function ZEROP, to:
T.
Case 2. (IMPLIES (AND (NOT (ZEROP N))
(EQUAL (SUB1 N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(MEMBER 1 (NSET N))).
This simplifies, applying N-NOT-LESS-J, CDR-CONS, and CAR-CONS, and opening
up the definitions of ZEROP, NSET, LESSP, and MEMBER, to:
(IMPLIES (AND (EQUAL (SUB1 N) 0)
(NOT (EQUAL N 0))
(NUMBERP N))
(EQUAL 1 N)).
But this again simplifies, using linear arithmetic, to:
T.
Case 1. (IMPLIES (AND (NOT (ZEROP N))
(MEMBER 1 (NSET (SUB1 N)))
(NOT (EQUAL N 0))
(NUMBERP N))
(MEMBER 1 (NSET N))),
which simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and opening
up the functions ZEROP, NSET, and MEMBER, to:
T.
That finishes the proof of *1. Q.E.D.
[ 0.0 0.0 0.0 ]
ONE-NSET
(PROVE-LEMMA LM-B1D-I-EQ-K
(REWRITE)
(IMPLIES (AND (LISTP L)
(LISTP H)
(NUMBERP N)
(NUMBERP (NTH H K))
(EQUAL (LENGTH L) N)
(EQUAL (LENGTH H) N)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K))
(B1D N LP HP K))
((ENABLE MRHOI B1D AT)
(USE (MEMBER-REMAINDER (J (NTH H K))))))
WARNING: Note that LM-B1D-I-EQ-K contains the free variables GP, G, H, and L
which will be chosen by instantiating the hypotheses (LISTP L), (LISTP H), and:
(MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations AT, B1D, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (MEMBER (NTH H K) (NSET N))
(MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K)) N))
(NSET N)))
(LISTP L)
(LISTP H)
(NUMBERP N)
(NUMBERP (NTH H K))
(EQUAL (LENGTH L) N)
(EQUAL (LENGTH H) N)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K)
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K) (NSET N))).
This simplifies, using linear arithmetic, rewriting with the lemmas SUB1-ADD1,
N-NOT-LESS-J, and ZERO-NOT-MEMBER-NSET, and unfolding the functions IMPLIES,
MRHOI12, MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B,
MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MRHOI3A,
MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, EQUAL, and B1D, to the following
27 new goals:
Case 27.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 7))).
But this again simplifies, rewriting with MOVE-NTH, and unfolding the
definition of EQUAL, to:
T.
Case 26.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 7))).
This again simplifies, rewriting with MOVE-NTH, and unfolding the definition
of EQUAL, to:
T.
Case 25.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))).
However this again simplifies, appealing to the lemma MOVE-NTH, and
expanding the function EQUAL, to:
T.
Case 24.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 (LENGTH H)))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 7))),
which again simplifies, using linear arithmetic, applying N-NOT-LESS-J and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 23.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))).
But this again simplifies, rewriting with MOVE-NTH, and unfolding EQUAL, to:
T.
Case 22.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 (LENGTH H)))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 7))).
But this again simplifies, using linear arithmetic, rewriting with
N-NOT-LESS-J and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 21.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 7))).
This again simplifies, applying ZERO-NOT-MEMBER-NSET and MOVE-NTH, and
unfolding NUMBERP and EQUAL, to:
T.
Case 20.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) (LENGTH H))
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 7))).
However this again simplifies, applying the lemma MOVE-NTH, and expanding
the function EQUAL, to:
T.
Case 19.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))),
which again simplifies, applying MOVE-NTH, LIST-LN, and ONE-NSET, and
unfolding EQUAL, to:
T.
Case 18.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))).
But this again simplifies, rewriting with MOVE-NTH, and unfolding the
definition of EQUAL, to:
T.
Case 17.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))).
This again simplifies, applying the lemma MOVE-NTH, and unfolding EQUAL, to:
T.
Case 16.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 (LENGTH H)))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 7))),
which again simplifies, using linear arithmetic, applying N-NOT-LESS-J and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 15.(IMPLIES (AND (NOT (MEMBER (NTH H K) (NSET (LENGTH H))))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 7))).
However this again simplifies, rewriting with the lemma MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 14.(IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H)
(EQUAL (NTH LP K) 7))
(MEMBER (NTH H K) (NSET (LENGTH H)))),
which again simplifies, applying the lemma MOVE-NTH, and opening up the
definition of EQUAL, to:
T.
Case 13.(IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H)
(EQUAL (NTH LP K) 7))
(MEMBER (NTH H K) (NSET (LENGTH H)))),
which again simplifies, rewriting with MOVE-NTH, and opening up the function
EQUAL, to:
T.
Case 12.(IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))).
This again simplifies, rewriting with the lemma MOVE-NTH, and opening up the
function EQUAL, to:
T.
Case 11.(IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 (LENGTH H)))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 7))),
which again simplifies, appealing to the lemmas SUB1-ADD1 and MOVE-NTH, and
opening up EQUAL, to:
T.
Case 10.(IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))),
which again simplifies, rewriting with MOVE-NTH, and opening up EQUAL, to:
T.
Case 9. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 (LENGTH H)))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 7))).
This again simplifies, applying SUB1-ADD1 and MOVE-NTH, and opening up the
function EQUAL, to:
T.
Case 8. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 7))).
However this again simplifies, applying LIST-LN, ONE-NSET, and MOVE-NTH, and
unfolding the definitions of SUB1, NUMBERP, LESSP, EQUAL, REMAINDER, and
ADD1, to:
T.
Case 7. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) (LENGTH H))
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH H K) (NSET (LENGTH H)))).
However this again simplifies, rewriting with the lemmas LIST-LN, ADD1-SUB1,
and MOVE-NTH, and unfolding the definitions of REMAINDER, NUMBERP, SUB1,
EQUAL, and LESSP, to:
T.
Case 6. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))),
which again simplifies, appealing to the lemmas MOVE-NTH, LIST-LN, and
ONE-NSET, and expanding the definition of EQUAL, to:
T.
Case 5. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 7)
(NOT (EQUAL (NTH G (NTH H K)) 4))
(EQUAL LP L)
(EQUAL GP G)
(EQUAL HP
(MOVE H K
(ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))))
(MEMBER (NTH H K) (NSET (LENGTH H))))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))),
which again simplifies, applying the lemmas MEMBER-REMAINDER, NSET-NUMBER,
and MOVE-NTH, to:
T.
Case 4. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))),
which again simplifies, applying the lemma MOVE-NTH, and expanding the
definition of EQUAL, to:
T.
Case 3. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K)))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH HP K)
(NSET (LENGTH H)))),
which again simplifies, applying MOVE-NTH, and expanding the function EQUAL,
to:
T.
Case 2. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 (LENGTH H)))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 7))).
But this again simplifies, applying the lemmas SUB1-ADD1 and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 1. (IMPLIES (AND (MEMBER (ADD1 (REMAINDER (SUB1 (NTH H K))
(LENGTH H)))
(NSET (LENGTH H)))
(LISTP L)
(LISTP H)
(NUMBERP (NTH H K))
(EQUAL (LENGTH H) (LENGTH L))
(MEMBER K (NSET (LENGTH H)))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0))
(EQUAL (NTH LP K) 7))
(MEMBER (NTH H K) (NSET (LENGTH H)))),
which again simplifies, applying MOVE-NTH, and unfolding the function EQUAL,
to:
T.
Q.E.D.
[ 0.0 0.5 0.1 ]
LM-B1D-I-EQ-K
(PROVE-LEMMA B1D-I-EQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H K))
(B1D N LP HP K))
((DISABLE B1D)
(ENABLE LM-B1D-I-EQ-K)
(USE (LM-B1D-I-EQ-K))))
WARNING: Note that B1D-I-EQ-K contains the free variables GP, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This conjecture simplifies, rewriting with MOLWS-LIST-L, MOLWS-LIST-H,
N-IN-NSET, MOLWS-NUM-N, MOLWS-N-NOT-0, MOLWS-NUM-K, NTH-NUMBERP, MOLWS-LN-L,
and MOLWS-LN-H, and expanding AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
B1D-I-EQ-K
(PROVE-LEMMA B1D-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B1D N L H I))
(B1D N LP HP I))
((ENABLE B1D)))
WARNING: Note that B1D-NEQ-K contains the free variables GP, K, H, G, and L
which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations B1D, NOT, AND, and
IMPLIES, to the new formula:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL I K))
(B1D N L H I)
(AT LP I 7))
(MEMBER (NTH HP I) (NSET N))),
which simplifies, applying H-MRHOLEMMA and M-L-SAME-LP-AT, and unfolding the
definition of B1D, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
B1D-NEQ-K
(PROVE-LEMMA MRHOI-PRESERVES-B1D
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER I (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(B1D N L H I))
(B1D N LP HP I))
((DISABLE B1D) (USE (B1D-NEQ-K))))
WARNING: Note that MRHOI-PRESERVES-B1D contains the free variables GP, K, H,
G, and L which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
WARNING: the newly proposed lemma, MRHOI-PRESERVES-B1D, could be applied
whenever the previously added lemma B1D-NEQ-K could.
WARNING: the newly proposed lemma, MRHOI-PRESERVES-B1D, could be applied
whenever the previously added lemma B1D-I-EQ-K could.
This formula simplifies, rewriting with B1D-I-EQ-K, and expanding the
functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
MRHOI-PRESERVES-B1D
(PROVE-LEMMA J-LT-H-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LESSP J K)
(AT L K 9)
(UNION-AT-N LP K '(10 11 12)))
(LESSP J (NTH H K)))
((ENABLE MRHOI UNION-AT-N AT)))
WARNING: When the linear lemma J-LT-H-K is stored under (NTH H K) it contains
the free variables HP, GP, LP, J, G, L, and N which will be chosen by
instantiating the hypotheses (MOLWS N L G H), (MEMBER J (NSET N)), and:
(MRHOI N K L G H LP GP HP).
WARNING: Note that the proposed lemma J-LT-H-K is to be stored as zero type
prescription rules, zero compound recognizer rules, one linear rule, and zero
replacement rules.
This formula can be simplified, using the abbreviations AND, IMPLIES,
UNION-AT-N, and AT, to the new conjecture:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(LESSP J K)
(EQUAL (NTH L K) 9)
(MEMBER (NTH LP K) '(10 11 12)))
(LESSP J (NTH H K))),
which simplifies, rewriting with NOT-G34-THEN-NOT-G4, and opening up MRHOI12,
MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, LISTP, CAR, CDR, MRHOI9A, MRHOI8,
MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, UNION-AT-N,
MEMBER, MRHOI3B, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, EQUAL, AT, and
MRHOI, to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
J-LT-H-K
(PROVE-LEMMA LM-CASE-K-IN-L9
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LESSP J K)
(B2B L H K J)
(AT L K 9)
(LESSP J (NTH H K))
(UNION-AT-N LP K '(10 11 12)))
(NOT (UNION-AT-N L J
'(5 6 7 8 9 10 11 12))))
((ENABLE B2B)))
WARNING: Note that LM-CASE-K-IN-L9 contains the free variables HP, GP, LP, K,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, applying M-L-SAME-LP and M-LP-SAME-L, and opening up the
definition of B2B, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-CASE-K-IN-L9
(PROVE-LEMMA CASE-K-IN-L9
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LESSP J K)
(B2B L H K J)
(AT L K 9)
(UNION-AT-N LP K '(10 11 12)))
(NOT (UNION-AT-N LP J
'(5 6 7 8 9 10 11 12))))
((USE (LM-CASE-K-IN-L9) (J-LT-H-K))))
WARNING: Note that CASE-K-IN-L9 contains the free variables HP, GP, K, H, G,
L, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H),
(MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This simplifies, applying M-L-SAME-LP, and unfolding the functions NOT, AND,
and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
CASE-K-IN-L9
(PROVE-LEMMA CASE-K-IN-L10-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LESSP J K)
(B2A L K J)
(UNION-AT-N L K '(10 11)))
(NOT (UNION-AT-N LP J
'(5 6 7 8 9 10 11 12))))
((ENABLE B2A)))
WARNING: Note that CASE-K-IN-L10-11 contains the free variables HP, GP, K, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, applying M-L-SAME-LP and UN10-11-THEN-UN10-12, and
opening up the definition of B2A, to:
T.
Q.E.D.
[ 0.0 0.0 0.0 ]
CASE-K-IN-L10-11
(PROVE-LEMMA K-IN-L10-11-OR-L9
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(UNION-AT-N LP K '(10 11 12))
(NOT (UNION-AT-N L K '(10 11))))
(AT L K 9))
((ENABLE MRHOI UNION-AT-N AT)))
WARNING: Note that K-IN-L10-11-OR-L9 contains the free variables HP, GP, LP,
H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, AT,
and UNION-AT-N, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(MEMBER (NTH LP K) '(10 11 12))
(NOT (MEMBER (NTH L K) '(10 11))))
(EQUAL (NTH L K) 9)),
which simplifies, rewriting with SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0,
MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and unfolding the functions MRHOI12,
MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A,
MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MEMBER, LISTP, CAR,
CDR, UNION-AT-N, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, and
EQUAL, to the following 36 new goals:
Case 36.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding the definition of EQUAL, to:
T.
Case 35.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 34.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding EQUAL, to:
T.
Case 33.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the function EQUAL, to:
T.
Case 32.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up EQUAL, to:
T.
Case 31.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
This again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 30.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the function EQUAL, to:
T.
Case 29.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))).
This again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 28.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the function EQUAL, to:
T.
Case 27.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 26.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 25.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 12))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 24.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))).
This again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 23.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 22.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 21.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding EQUAL, to:
T.
Case 20.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up EQUAL, to:
T.
Case 19.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 8)))
(NOT (EQUAL (NTH LP K) 12))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding the definition of EQUAL, to:
T.
Case 18.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding the function EQUAL, to:
T.
Case 17.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the function EQUAL, to:
T.
Case 16.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) 0)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 15.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up EQUAL, to:
T.
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 5)
(EQUAL GP G)
(EQUAL HP H)
(LESSP (SUB1 (NTH H K)) N)
(EQUAL (NTH G (NTH H K)) 1)
(EQUAL LP (MOVE L K 6)))
(NOT (EQUAL (NTH LP K) 12))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding the function EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))).
However this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
expanding the definition of EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 10))).
But this again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 11))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 7)
(EQUAL LP (MOVE L K 8))
(EQUAL (NTH G (NTH H K)) 4)
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 10))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 11))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the definition of EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 12))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding the definition of EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 10))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 11))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 12))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding EQUAL, to:
T.
Q.E.D.
[ 0.0 0.6 0.1 ]
K-IN-L10-11-OR-L9
(PROVE-LEMMA LM-B2A-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LESSP J K)
(LG N L G)
(B2A L K J)
(B2B L H K J)
(UNION-AT-N LP K '(10 11 12)))
(NOT (UNION-AT-N LP J
'(5 6 7 8 9 10 11 12))))
((USE (K-IN-L10-11-OR-L9))))
WARNING: Note that LM-B2A-I-EQ-K-J-NEQ-K contains the free variables HP, GP,
K, H, G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H), (MEMBER K (NSET N)), and (MRHOI N K L G H LP GP HP).
This formula simplifies, appealing to the lemmas CASE-K-IN-L10-11 and
CASE-K-IN-L9, and unfolding the functions NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
LM-B2A-I-EQ-K-J-NEQ-K
(PROVE-LEMMA B2A-I-EQ-K-J-NEQ-K
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LESSP J K)
(LG N L G)
(B2B L H K J)
(B2A L K J))
(B2A LP K J))
((ENABLE B2A)
(USE (LM-B2A-I-EQ-K-J-NEQ-K))))
WARNING: Note that B2A-I-EQ-K-J-NEQ-K contains the free variables HP, GP, H,
G, L, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations B2A, NOT, AND, and
IMPLIES, to:
(IMPLIES (AND (IMPLIES (AND (MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LESSP J K)
(LG N L G)
(B2A L K J)
(B2B L H K J)
(UNION-AT-N LP K '(10 11 12)))
(NOT (UNION-AT-N LP J
'(5 6 7 8 9 10 11 12))))
(MOLWS N L G H)
(MEMBER J (NSET N))
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL J K))
(LESSP J K)
(LG N L G)
(B2B L H K J)
(B2A L K J)
(UNION-AT-N LP K '(10 11 12)))
(NOT (UNION-AT-N LP J
'(5 6 7 8 9 10 11 12)))).
This simplifies, rewriting with the lemmas M-L-SAME-LP and
LM-B2A-I-EQ-K-J-NEQ-K, and expanding the definitions of NOT, B2A, AND, and
IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
B2A-I-EQ-K-J-NEQ-K
(PROVE-LEMMA M-K-IN-LP5-7-NOT-L4-THEN-L5-7
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 4))
(UNION-AT-N LP K '(5 6 7)))
(UNION-AT-N L K '(5 6 7)))
((ENABLE UNION-AT-N AT MRHOI)))
WARNING: Note that M-K-IN-LP5-7-NOT-L4-THEN-L5-7 contains the free variables
HP, GP, LP, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (EQUAL (NTH L K) 4))
(MEMBER (NTH LP K) '(5 6 7)))
(MEMBER (NTH L K) '(5 6 7))).
This simplifies, applying SUB1-ADD1, MOLWS-NUM-K, MOLWS-N-NOT-0, MOLWS-NUM-N,
N-IN-NSET, and NTH-NUMBERP, and unfolding the functions MRHOI12, MRHOI11B,
MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A, MRHOI6, MRHOI5C,
MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MEMBER, LISTP, CAR, CDR, UNION-AT-N,
MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, and EQUAL, to 27 new
goals:
Case 27.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 5))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 26.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 6))).
But this again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 25.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 7))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 24.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 5))),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 23.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 6))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 22.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 7))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 21.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 5))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 20.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 6))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the function EQUAL, to:
T.
Case 19.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 7))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and expanding the function EQUAL, to:
T.
Case 18.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 5))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the definition of EQUAL, to:
T.
Case 17.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 6))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 16.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 7))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 15.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 5))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 14.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 6))).
However this again simplifies, appealing to the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 13.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 7))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding EQUAL, to:
T.
Case 12.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 5))).
This again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 6))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and expanding EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 7))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the definition of EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 5))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
unfolding the function EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 6))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 7))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 5))).
This again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up the definition of EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 6))).
But this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and unfolding EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 7))).
But this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and expanding EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 5))),
which again simplifies, rewriting with the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 6))),
which again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH, and
opening up EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 7))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up the function EQUAL, to:
T.
Q.E.D.
[ 0.0 0.5 0.1 ]
M-K-IN-LP5-7-NOT-L4-THEN-L5-7
(PROVE-LEMMA M-K-IN-LP5-7-THEN-L5-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 4))
(UNION-AT-N LP K '(5 6 7)))
(UNION-AT-N L K '(5 6 7 8 9 10 11)))
((USE (M-K-IN-LP5-7-NOT-L4-THEN-L5-7))))
WARNING: Note that M-K-IN-LP5-7-THEN-L5-11 contains the free variables HP, GP,
LP, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, applying M-K-IN-LP5-7-NOT-L4-THEN-L5-7 and
UN5-7-THEN-UN5-11, and unfolding the definitions of NOT, AND, and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
M-K-IN-LP5-7-THEN-L5-11
(PROVE-LEMMA M-LP8-K-IN-L57
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT LP K 8))
(UNION-AT-N L K '(5 7)))
((ENABLE MRHOI UNION-AT-N AT)))
WARNING: Note that M-LP8-K-IN-L57 contains the free variables HP, GP, LP, H,
G, and N which will be chosen by instantiating the hypotheses (MOLWS N L G H)
and (MRHOI N K L G H LP GP HP).
This formula can be simplified, using the abbreviations AND, IMPLIES,
UNION-AT-N, and AT, to:
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(EQUAL (NTH LP K) 8))
(MEMBER (NTH L K) '(5 7))),
which simplifies, appealing to the lemmas SUB1-ADD1, MOLWS-NUM-K,
MOLWS-N-NOT-0, MOLWS-NUM-N, N-IN-NSET, and NTH-NUMBERP, and unfolding MRHOI12,
MRHOI11B, MRHOI11A, MRHOI10, MRHOI9B, MRHOI9A, MRHOI8, MRHOI7B, MRHOI7A,
MRHOI6, MRHOI5C, MRHOI5B, MRHOI5A, MRHOI4, MRHOI3B, LESSP, MEMBER, LISTP, CAR,
CDR, UNION-AT-N, MRHOI3A, MRHOI2, MRHOI1B, MRHOI1A, MRHOI0, AT, MRHOI, and
EQUAL, to 11 new conjectures:
Case 11.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 0)
(EQUAL GP G)
(EQUAL LP (MOVE L K 1))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and opening up EQUAL, to:
T.
Case 10.(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 1)
(EQUAL GP G)
(EQUAL LP (MOVE L K 2))
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, appealing to the lemmas MOLWS-LN-L, MOLWS-LIST-L,
and MOVE-NTH, and unfolding EQUAL, to:
T.
Case 9. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 2)
(EQUAL LP (MOVE L K 3))
(EQUAL GP (MOVE G K 1))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Case 8. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 3)
(EQUAL GP G)
(EQUAL HP H)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 4)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the definition of EQUAL, to:
T.
Case 7. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 4)
(EQUAL GP (MOVE G K 3))
(EQUAL LP (MOVE L K 5))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))).
But this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding EQUAL, to:
T.
Case 6. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 6)
(EQUAL GP (MOVE G K 2))
(EQUAL LP (MOVE L K 7))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))).
However this again simplifies, rewriting with the lemmas MOLWS-LN-L,
MOLWS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to:
T.
Case 5. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 8)
(EQUAL GP (MOVE G K 4))
(EQUAL LP (MOVE L K 9))
(EQUAL HP (MOVE H K 1)))
(NOT (EQUAL (NTH LP K) 8))),
which again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 4. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 9)
(EQUAL (NTH H K) K)
(EQUAL LP (MOVE L K 10))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))).
However this again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and unfolding the function EQUAL, to:
T.
Case 3. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 10)
(EQUAL LP (MOVE L K 11))
(EQUAL GP G)
(EQUAL HP (MOVE H K (ADD1 K))))
(NOT (EQUAL (NTH LP K) 8))).
This again simplifies, rewriting with MOLWS-LN-L, MOLWS-LIST-L, and MOVE-NTH,
and opening up the definition of EQUAL, to:
T.
Case 2. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 11)
(EQUAL (NTH H K) (ADD1 N))
(EQUAL LP (MOVE L K 12))
(EQUAL GP G)
(EQUAL HP H))
(NOT (EQUAL (NTH LP K) 8))).
However this again simplifies, applying MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and expanding the function EQUAL, to:
T.
Case 1. (IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(EQUAL (NTH L K) 12)
(EQUAL HP H)
(EQUAL GP (MOVE G K 0))
(EQUAL LP (MOVE L K 0)))
(NOT (EQUAL (NTH LP K) 8))).
This again simplifies, applying the lemmas MOLWS-LN-L, MOLWS-LIST-L, and
MOVE-NTH, and opening up EQUAL, to:
T.
Q.E.D.
[ 0.0 0.6 0.0 ]
M-LP8-K-IN-L57
(PROVE-LEMMA M-K-IN-LP8-THEN-L5-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(AT LP K 8))
(UNION-AT-N L K '(5 6 7 8 9 10 11)))
((USE (UN57-THEN-UN5-11)
(M-LP8-K-IN-L57))))
WARNING: Note that M-K-IN-LP8-THEN-L5-11 contains the free variables HP, GP,
LP, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This conjecture simplifies, appealing to the lemmas M-LP8-K-IN-L57 and
UN57-THEN-UN5-11, and unfolding the definitions of IMPLIES and AND, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
M-K-IN-LP8-THEN-L5-11
(PROVE-LEMMA M-K-IN-LP9-12-THEN-L5-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(UNION-AT-N LP K '(9 10 11 12)))
(UNION-AT-N L K '(5 6 7 8 9 10 11)))
((USE (M-LP9-12-K-IN-L8-11)
(UN8-11-THEN-UN5-11))))
WARNING: Note that M-K-IN-LP9-12-THEN-L5-11 contains the free variables HP,
GP, LP, H, G, and N which will be chosen by instantiating the hypotheses
(MOLWS N L G H) and (MRHOI N K L G H LP GP HP).
This formula simplifies, rewriting with the lemmas M-LP9-12-K-IN-L8-11 and
UN8-11-THEN-UN5-11, and expanding the functions AND and IMPLIES, to:
T.
Q.E.D.
[ 0.0 0.2 0.0 ]
M-K-IN-LP9-12-THEN-L5-11
(PROVE-LEMMA M-K-IN-L5-11
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 4))
(UNION-AT-N LP K
'(5 6 7 8 9 10 11 12)))
(UNION-AT-N L K '(5 6 7 8 9 10 11)))
((USE (K-IN-LP5-7-OR-LP8-OR-LP9-12))))
WARNING: Note that M-K-IN-L5-11 contains the free variables HP, GP, LP, H, G,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This simplifies, rewriting with the lemmas UN5-7-THEN-UN5-11,
UN5-11-THEN-UN5-12, M-K-IN-LP5-7-THEN-L5-11, M-K-IN-LP8-THEN-L5-11,
L8-11-K-IN-LP8-12, M-LP9-12-K-IN-L8-11, UN8-12-THEN-UN5-12, and
M-K-IN-LP9-12-THEN-L5-11, and opening up the functions NOT, AND, and IMPLIES,
to:
T.
Q.E.D.
[ 0.0 0.3 0.0 ]
M-K-IN-L5-11
(PROVE-LEMMA M-K-NOT-IN-L4
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)
(MEMBER K (NSET N))
(MRHOI N K L G H LP GP HP)
(NOT (AT L K 4))
(NOT (UNION-AT-N L K
'(5 6 7 8 9 10 11 12))))
(NOT (UNION-AT-N LP K
'(5 6 7 8 9 10 11 12))))
((USE (UN5-11-THEN-UN5-12)
(M-K-IN-L5-11))))
WARNING: Note that M-K-NOT-IN-L4 contains the free variables HP, GP, H, G, L,
and N which will be chosen by instantiating the hypotheses (MOLWS N L G H) and:
(MRHOI N K L G H LP GP HP).
This simplifies, rewriting with M-K-IN-L5-11 and UN5-11-THEN-UN5-12, and
expanding the definitions of IMPLIES, NOT, and AND, to:
T.
Q.E.D.
[ 0.0 0.1 0.0 ]
M-K-NOT-IN-L4
(PROVE-LEMMA M-K-NOT-IN-LP5-12
(REWRITE)
(IMPLIES (AND (MOLWS N L G H)