(BOOT-STRAP NQTHM) [ 0.1 0.3 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.0 ] 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.0 0.1 ] 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.0 ] 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.1 0.0 ] 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.1 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.1 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.5 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.0 ] 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 WS (N L G) (AND (NUMBERP N) (LISTP L) (LISTP G) (EQUAL (LENGTH L) N) (EQUAL (LENGTH G) 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)))) Observe that (OR (FALSEP (WS N L G)) (TRUEP (WS N L G))) is a theorem. [ 0.0 0.0 0.0 ] WS (DISABLE WS) [ 0.0 0.0 0.0 ] WS-OFF (DEFN RHOI0 (N I L G LP GP) (AND (AT L I 0) (EQUAL GP G) (EQUAL LP (MOVE L I 1)))) WARNING: N is in the arglist but not in the body of the definition of RHOI0. From the definition we can conclude that: (OR (FALSEP (RHOI0 N I L G LP GP)) (TRUEP (RHOI0 N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI0 (DEFN RHOI1A (N I L G LP GP) (AND (AT L I 1) (EQUAL GP G) (EQUAL LP (MOVE L I 2)))) WARNING: N is in the arglist but not in the body of the definition of RHOI1A. From the definition we can conclude that: (OR (FALSEP (RHOI1A N I L G LP GP)) (TRUEP (RHOI1A N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI1A (DEFN RHOI1B (N I L G LP GP) (AND (AT L I 1) (EQUAL G GP) (EQUAL LP L))) WARNING: N is in the arglist but not in the body of the definition of RHOI1B. From the definition we can conclude that: (OR (FALSEP (RHOI1B N I L G LP GP)) (TRUEP (RHOI1B N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI1B (DEFN RHOI2 (N I L G LP GP) (AND (AT L I 2) (EQUAL LP (MOVE L I 3)) (EQUAL GP (MOVE G I 1)))) WARNING: N is in the arglist but not in the body of the definition of RHOI2. Observe that: (OR (FALSEP (RHOI2 N I L G LP GP)) (TRUEP (RHOI2 N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI2 (DEFN RHOI3A (N I L G LP GP) (AND (AT L I 3) (EQUAL GP G) (EQUAL LP (MOVE L I 4)) (NOT (EXIST-UNION G N '(3 4))))) Note that: (OR (FALSEP (RHOI3A N I L G LP GP)) (TRUEP (RHOI3A N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI3A (DEFN RHOI3B (N I L G LP GP) (AND (AT L I 3) (EQUAL GP G) (EQUAL LP L) (EXIST-UNION G N '(3 4)))) From the definition we can conclude that: (OR (FALSEP (RHOI3B N I L G LP GP)) (TRUEP (RHOI3B N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI3B (DEFN RHOI4 (N I L G LP GP) (AND (AT L I 4) (EQUAL GP (MOVE G I 3)) (EQUAL LP (MOVE L I 5)))) WARNING: N is in the arglist but not in the body of the definition of RHOI4. Observe that: (OR (FALSEP (RHOI4 N I L G LP GP)) (TRUEP (RHOI4 N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI4 (DEFN RHOI5A (N I L G LP GP) (AND (AT L I 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L I 6)))) Note that: (OR (FALSEP (RHOI5A N I L G LP GP)) (TRUEP (RHOI5A N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI5A (DEFN RHOI5B (N I L G LP GP) (AND (AT L I 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L I 8)))) Observe that: (OR (FALSEP (RHOI5B N I L G LP GP)) (TRUEP (RHOI5B N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI5B (DEFN RHOI6 (N I L G LP GP) (AND (AT L I 6) (EQUAL GP (MOVE G I 2)) (EQUAL LP (MOVE L I 7)))) WARNING: N is in the arglist but not in the body of the definition of RHOI6. Observe that: (OR (FALSEP (RHOI6 N I L G LP GP)) (TRUEP (RHOI6 N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI6 (DEFN RHOI7A (N I L G LP GP) (AND (AT L I 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L I 8)) (EQUAL GP G))) Note that: (OR (FALSEP (RHOI7A N I L G LP GP)) (TRUEP (RHOI7A N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI7A (DEFN RHOI7B (N I L G LP GP) (AND (AT L I 7) (NOT (EXIST-UNION G N '(4))) (EQUAL LP L) (EQUAL GP G))) Observe that: (OR (FALSEP (RHOI7B N I L G LP GP)) (TRUEP (RHOI7B N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI7B (DEFN RHOI8 (N I L G LP GP) (AND (AT L I 8) (EQUAL GP (MOVE G I 4)) (EQUAL LP (MOVE L I 9)))) WARNING: N is in the arglist but not in the body of the definition of RHOI8. Observe that: (OR (FALSEP (RHOI8 N I L G LP GP)) (TRUEP (RHOI8 N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI8 (DEFN PHI9 (I N G) (IF (OR (NLISTP G) (NOT (NUMBERP I)) (NOT (NUMBERP N))) F (IF (EQUAL N 0) T (OR (AND (NOT (LESSP N I)) (PHI9 I (SUB1 N) G)) (AND (UNION-AT-N G N '(0 1)) (PHI9 I (SUB1 N) G)))))) Linear arithmetic, the lemma COUNT-NUMBERP, and the definitions of OR, NOT, and NLISTP establish that the measure (COUNT N) decreases according to the well-founded relation LESSP in each recursive call. Hence, PHI9 is accepted under the definitional principle. Observe that: (OR (FALSEP (PHI9 I N G)) (TRUEP (PHI9 I N G))) is a theorem. [ 0.0 0.0 0.0 ] PHI9 (DISABLE PHI9) [ 0.0 0.0 0.0 ] PHI9-OFF (DEFN RHOI9A (N I L G LP GP) (AND (AT L I 9) (EQUAL GP G) (PHI9 I N G) (EQUAL LP (MOVE L I 10)))) Note that: (OR (FALSEP (RHOI9A N I L G LP GP)) (TRUEP (RHOI9A N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI9A (DEFN RHOI9B (N I L G LP GP) (AND (AT L I 9) (EQUAL GP G) (NOT (PHI9 I N G)) (EQUAL LP L))) Observe that: (OR (FALSEP (RHOI9B N I L G LP GP)) (TRUEP (RHOI9B N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI9B (DEFN RHOI10 (N I L G LP GP) (AND (AT L I 10) (EQUAL LP (MOVE L I 11)) (EQUAL GP G))) WARNING: N is in the arglist but not in the body of the definition of RHOI10. From the definition we can conclude that: (OR (FALSEP (RHOI10 N I L G LP GP)) (TRUEP (RHOI10 N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI10 (DEFN PHI11 (I N G) (IF (OR (NLISTP G) (NOT (NUMBERP I)) (NOT (NUMBERP N))) F (IF (EQUAL N 0) T (OR (AND (NOT (LESSP I N)) (PHI11 I (SUB1 N) G)) (AND (NOT (UNION-AT-N G N '(2 3))) (PHI11 I (SUB1 N) G)))))) Linear arithmetic, the lemma COUNT-NUMBERP, and the definitions of OR, NOT, and NLISTP establish that the measure (COUNT N) decreases according to the well-founded relation LESSP in each recursive call. Hence, PHI11 is accepted under the definitional principle. From the definition we can conclude that (OR (FALSEP (PHI11 I N G)) (TRUEP (PHI11 I N G))) is a theorem. [ 0.0 0.0 0.0 ] PHI11 (DISABLE PHI11) [ 0.0 0.0 0.0 ] PHI11-OFF (DEFN RHOI11A (N I L G LP GP) (AND (AT L I 11) (EQUAL GP G) (PHI11 I N G) (EQUAL LP (MOVE L I 12)))) Note that: (OR (FALSEP (RHOI11A N I L G LP GP)) (TRUEP (RHOI11A N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI11A (DEFN RHOI11B (N I L G LP GP) (AND (AT L I 11) (EQUAL GP G) (NOT (PHI11 I N G)) (EQUAL LP L))) Observe that: (OR (FALSEP (RHOI11B N I L G LP GP)) (TRUEP (RHOI11B N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI11B (DEFN RHOI12 (N I L G LP GP) (AND (AT L I 12) (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 RHOI12. Observe that: (OR (FALSEP (RHOI12 N I L G LP GP)) (TRUEP (RHOI12 N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI12 (DEFN RHOI (N I L G LP GP) (OR (RHOI0 N I L G LP GP) (RHOI1A N I L G LP GP) (RHOI1B N I L G LP GP) (RHOI2 N I L G LP GP) (RHOI3A N I L G LP GP) (RHOI3B N I L G LP GP) (RHOI4 N I L G LP GP) (RHOI5A N I L G LP GP) (RHOI5B N I L G LP GP) (RHOI6 N I L G LP GP) (RHOI7A N I L G LP GP) (RHOI7B N I L G LP GP) (RHOI8 N I L G LP GP) (RHOI9A N I L G LP GP) (RHOI9B N I L G LP GP) (RHOI10 N I L G LP GP) (RHOI11A N I L G LP GP) (RHOI11B N I L G LP GP) (RHOI12 N I L G LP GP))) Note that (OR (FALSEP (RHOI N I L G LP GP)) (TRUEP (RHOI N I L G LP GP))) is a theorem. [ 0.0 0.0 0.0 ] RHOI (DISABLE RHOI) [ 0.0 0.0 0.0 ] RHOI-OFF (DEFN A0 (N L K) (IMPLIES (AND (MEMBER K (NSET N)) (EXIST-UNION L N '(8 9 10 11 12))) (NOT (AT L K 4)))) Observe that (OR (FALSEP (A0 N L K)) (TRUEP (A0 N L K))) is a theorem. [ 0.0 0.0 0.0 ] A0 (DISABLE A0) [ 0.0 0.0 0.0 ] A0-OFF (DEFN A1 (N L G) (IMPLIES (EXIST-UNION L N '(8 9 10 11 12)) (EXIST-INTERSECT-8-12-3-4 N L G))) From the definition we can conclude that: (OR (FALSEP (A1 N L G)) (TRUEP (A1 N L G))) is a theorem. [ 0.0 0.0 0.0 ] A1 (DISABLE A1) [ 0.0 0.0 0.0 ] A1-OFF (DEFN A2-AT-N1-N2 (N1 N2 L) (IF (UNION-AT-N L N1 '(10 11 12)) (NOT (UNION-AT-N L N2 '(5 6 7 8 9 10 11 12))) T)) Note that: (OR (FALSEP (A2-AT-N1-N2 N1 N2 L)) (TRUEP (A2-AT-N1-N2 N1 N2 L))) is a theorem. [ 0.0 0.0 0.0 ] A2-AT-N1-N2 (DISABLE A2-AT-N1-N2) [ 0.0 0.0 0.0 ] A2-AT-N1-N2-OFF (DEFN A2-AT-N2 (N1 N2 L) (IF (ZEROP N2) T (IF (NOT (LESSP N2 N1)) (A2-AT-N2 N1 (SUB1 N2) L) (AND (A2-AT-N1-N2 N1 N2 L) (A2-AT-N2 N1 (SUB1 N2) L))))) Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP establish that the measure (COUNT N2) decreases according to the well-founded relation LESSP in each recursive call. Hence, A2-AT-N2 is accepted under the principle of definition. Note that: (OR (FALSEP (A2-AT-N2 N1 N2 L)) (TRUEP (A2-AT-N2 N1 N2 L))) is a theorem. [ 0.0 0.0 0.0 ] A2-AT-N2 (DISABLE A2-AT-N2) [ 0.0 0.0 0.0 ] A2-AT-N2-OFF (DEFN A2 (N1 N2 L) (IF (ZEROP N1) T (AND (A2-AT-N2 N1 N2 L) (A2 (SUB1 N1) N2 L)))) Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be used to establish that the measure (COUNT N1) decreases according to the well-founded relation LESSP in each recursive call. Hence, A2 is accepted under the principle of definition. Note that: (OR (FALSEP (A2 N1 N2 L)) (TRUEP (A2 N1 N2 L))) is a theorem. [ 0.0 0.0 0.0 ] A2 (DISABLE A2) [ 0.0 0.0 0.0 ] A2-OFF (DEFN A3-AT-N1-N2 (N1 N2 L G) (IF (AND (AT L N1 12) (UNION-AT-N L N2 '(5 6 7 8 9 10 11 12))) (AT G N2 4) T)) Observe that: (OR (FALSEP (A3-AT-N1-N2 N1 N2 L G)) (TRUEP (A3-AT-N1-N2 N1 N2 L G))) is a theorem. [ 0.0 0.0 0.0 ] A3-AT-N1-N2 (DISABLE A3-AT-N1-N2) [ 0.0 0.0 0.0 ] A3-AT-N1-N2-OFF (DEFN A3-AT-N2 (N1 N2 L G) (IF (ZEROP N2) T (AND (A3-AT-N1-N2 N1 N2 L G) (A3-AT-N2 N1 (SUB1 N2) L G)))) Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be used to show that the measure (COUNT N2) decreases according to the well-founded relation LESSP in each recursive call. Hence, A3-AT-N2 is accepted under the definitional principle. Observe that: (OR (FALSEP (A3-AT-N2 N1 N2 L G)) (TRUEP (A3-AT-N2 N1 N2 L G))) is a theorem. [ 0.0 0.0 0.0 ] A3-AT-N2 (DISABLE A3-AT-N2) [ 0.0 0.0 0.0 ] A3-AT-N2-OFF (DEFN A3 (N1 N2 L G) (IF (ZEROP N1) T (AND (A3-AT-N2 N1 N2 L G) (A3 (SUB1 N1) N2 L G)))) Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP can be used to show that the measure (COUNT N1) decreases according to the well-founded relation LESSP in each recursive call. Hence, A3 is accepted under the definitional principle. Observe that: (OR (FALSEP (A3 N1 N2 L G)) (TRUEP (A3 N1 N2 L G))) is a theorem. [ 0.0 0.0 0.0 ] A3 (DISABLE A3) [ 0.0 0.0 0.0 ] A3-OFF (PROVE-LEMMA WS-NUM-N (REWRITE) (IMPLIES (WS N L G) (NUMBERP N)) ((ENABLE WS))) WARNING: Note that WS-NUM-N contains the free variables G and L which will be chosen by instantiating the hypothesis (WS N L G). This formula can be simplified, using the abbreviations WS and IMPLIES, to: T, which simplifies, trivially, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-NUM-N (PROVE-LEMMA WS-LIST-L (REWRITE) (IMPLIES (WS N L G) (LISTP L)) ((ENABLE WS))) WARNING: Note that WS-LIST-L contains the free variables G and N which will be chosen by instantiating the hypothesis (WS N L G). This formula can be simplified, using the abbreviations WS and IMPLIES, to: T, which simplifies, trivially, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-LIST-L (PROVE-LEMMA WS-LIST-G (REWRITE) (IMPLIES (WS N L G) (LISTP G)) ((ENABLE WS))) WARNING: Note that WS-LIST-G contains the free variables L and N which will be chosen by instantiating the hypothesis (WS N L G). This formula can be simplified, using the abbreviations WS and IMPLIES, to: T, which simplifies, trivially, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-LIST-G (PROVE-LEMMA WS-LN-L (REWRITE) (IMPLIES (WS N L G) (EQUAL (LENGTH L) N)) ((ENABLE WS))) WARNING: Note that WS-LN-L contains the free variables G and N which will be chosen by instantiating the hypothesis (WS N L G). This conjecture can be simplified, using the abbreviations WS and IMPLIES, to the conjecture: T. This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-LN-L (PROVE-LEMMA WS-LN-G (REWRITE) (IMPLIES (WS N L G) (EQUAL (LENGTH G) N)) ((ENABLE WS))) WARNING: Note that WS-LN-G contains the free variables L and N which will be chosen by instantiating the hypothesis (WS N L G). This conjecture can be simplified, using the abbreviations WS and IMPLIES, to the conjecture: T. This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-LN-G (PROVE-LEMMA WS-LN-LP (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (LISTP LP)) ((ENABLE WS RHOI))) WARNING: Note that WS-LN-LP contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations WS, AND, and IMPLIES, to: (IMPLIES (AND (NUMBERP N) (LISTP L) (LISTP G) (EQUAL (LENGTH L) N) (EQUAL (LENGTH G) 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)) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (LISTP LP)), which simplifies, unfolding RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, and RHOI, to 14 new goals: Case 14.(IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (LISTP LP)), which again simplifies, applying MOVE-IS-LIST, to: T. Case 13.(IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (LISTP LP)). But this again simplifies, rewriting with MOVE-IS-LIST, to: T. Case 12.(IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (LISTP LP)). However this again simplifies, rewriting with MOVE-IS-LIST, to: T. Case 11.(IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G (LENGTH G) '(3 4)))) (LISTP LP)). But this again simplifies, applying the lemma MOVE-IS-LIST, to: T. Case 10.(IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (LISTP LP)), which again simplifies, appealing to the lemma MOVE-IS-LIST, to: T. Case 9. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 5) (EQUAL GP G) (EXIST-UNION G (LENGTH G) '(1)) (EQUAL LP (MOVE L K 6))) (LISTP LP)), which again simplifies, applying MOVE-IS-LIST, to: T. Case 8. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 5) (EQUAL GP G) (NOT (EXIST-UNION G (LENGTH G) '(1))) (EQUAL LP (MOVE L K 8))) (LISTP LP)). This again simplifies, rewriting with MOVE-IS-LIST, to: T. Case 7. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (LISTP LP)). However this again simplifies, rewriting with MOVE-IS-LIST, to: T. Case 6. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 7) (EXIST-UNION G (LENGTH G) '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (LISTP LP)). However this again simplifies, applying MOVE-IS-LIST, to: T. Case 5. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (LISTP LP)). This again simplifies, rewriting with the lemma MOVE-IS-LIST, to: T. Case 4. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 9) (EQUAL GP G) (PHI9 K (LENGTH G) G) (EQUAL LP (MOVE L K 10))) (LISTP LP)), which again simplifies, appealing to the lemma MOVE-IS-LIST, to: T. Case 3. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (LISTP LP)), which again simplifies, applying MOVE-IS-LIST, to: T. Case 2. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 11) (EQUAL GP G) (PHI11 K (LENGTH G) G) (EQUAL LP (MOVE L K 12))) (LISTP LP)). However this again simplifies, rewriting with MOVE-IS-LIST, to: T. Case 1. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (LISTP LP)). This again simplifies, applying the lemma MOVE-IS-LIST, to: T. Q.E.D. [ 0.0 0.1 0.0 ] WS-LN-LP (PROVE-LEMMA WS-LN-GP (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (LISTP GP)) ((ENABLE WS RHOI))) WARNING: Note that WS-LN-GP contains the free variables LP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations WS, AND, and IMPLIES, to: (IMPLIES (AND (NUMBERP N) (LISTP L) (LISTP G) (EQUAL (LENGTH L) N) (EQUAL (LENGTH G) 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)) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (LISTP GP)), which simplifies, unfolding RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, and RHOI, to five new goals: Case 5. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (LISTP GP)), which again simplifies, applying MOVE-IS-LIST, to: T. Case 4. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (LISTP GP)). But this again simplifies, rewriting with MOVE-IS-LIST, to: T. Case 3. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (LISTP GP)). However this again simplifies, rewriting with MOVE-IS-LIST, to: T. Case 2. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (LISTP GP)). But this again simplifies, applying the lemma MOVE-IS-LIST, to: T. Case 1. (IMPLIES (AND (LISTP L) (LISTP G) (EQUAL (LENGTH G) (LENGTH L)) (ALL-UNION L (LENGTH G) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION G (LENGTH G) '(0 1 2 3 4)) (MEMBER K (NSET (LENGTH G))) (AT L K 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (LISTP GP)), which again simplifies, appealing to the lemma MOVE-IS-LIST, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-LN-GP (PROVE-LEMMA WS-N-NOT-0 (REWRITE) (IMPLIES (WS N L G) (NOT (ZEROP N))) ((ENABLE WS))) WARNING: Note that the rewrite rule WS-N-NOT-0 will be stored so as to apply only to terms with the nonrecursive function symbol ZEROP. WARNING: Note that WS-N-NOT-0 contains the free variables G and L which will be chosen by instantiating the hypothesis (WS N L G). This formula can be simplified, using the abbreviations NOT, WS, and IMPLIES, to the new conjecture: (IMPLIES (AND (NUMBERP N) (LISTP L) (LISTP G) (EQUAL (LENGTH L) N) (EQUAL (LENGTH G) 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))) (NOT (ZEROP N))), which simplifies, rewriting with the lemma LIST-LN, and expanding the definition of ZEROP, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-N-NOT-0 (PROVE-LEMMA N-NOT-0 (REWRITE) (IMPLIES (WS N L G) (MEMBER N (NSET N))) ((USE (N-IN-NSET)))) WARNING: Note that N-NOT-0 contains the free variables G and L which will be chosen by instantiating the hypothesis (WS N L G). This conjecture simplifies, rewriting with the lemma WS-N-NOT-0, and unfolding the functions NOT and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] N-NOT-0 (PROVE-LEMMA LM-L-RHOLEMMA (REWRITE) (IMPLIES (AND (LISTP L) (MEMBER J (NSET (LENGTH L))) (MEMBER K (NSET (LENGTH L))) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))) ((ENABLE RHOI))) WARNING: Note that LM-L-RHOLEMMA contains the free variables GP, LP, G, N, and K which will be chosen by instantiating the hypotheses: (MEMBER K (NSET (LENGTH L))) and (RHOI N K L G LP GP). This conjecture simplifies, expanding the definitions of RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, and RHOI, to 14 new conjectures: Case 14.(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)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))), which again simplifies, applying 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 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). This again simplifies, applying 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 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). This again simplifies, applying 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 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4))) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). However this again simplifies, rewriting with the lemma MOVE-UNCHANGE-OTHER-THAN-NTH, to: T. Case 10.(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)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))), which again simplifies, applying 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) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). However this again simplifies, rewriting with 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) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). But this again simplifies, applying 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)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). This again simplifies, applying 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) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). However this 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)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). However this again simplifies, applying 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) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). However this again simplifies, rewriting with 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) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). This again simplifies, applying 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) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12)) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))). However this 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 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, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LM-L-RHOLEMMA (DISABLE LM-L-RHOLEMMA) [ 0.0 0.0 0.0 ] LM-L-RHOLEMMA-OFF (PROVE-LEMMA L-RHOLEMMA (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))) ((ENABLE LM-L-RHOLEMMA) (USE (LM-L-RHOLEMMA)))) WARNING: Note that L-RHOLEMMA contains the free variables GP, LP, K, G, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, appealing to the lemmas WS-LIST-L and WS-LN-L, and unfolding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] L-RHOLEMMA (PROVE-LEMMA LM-G-RHOLEMMA (REWRITE) (IMPLIES (AND (LISTP G) (MEMBER J (NSET (LENGTH G))) (MEMBER K (NSET (LENGTH G))) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))) ((ENABLE RHOI))) WARNING: Note that LM-G-RHOLEMMA contains the free variables GP, LP, L, N, and K which will be chosen by instantiating the hypotheses: (MEMBER K (NSET (LENGTH G))) and (RHOI N K L G LP GP). This conjecture simplifies, expanding the definitions of RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, and RHOI, to 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)) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))), which 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)) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))). This again simplifies, applying 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)) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))). This again simplifies, applying 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)) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))). However this again simplifies, rewriting with 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 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, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LM-G-RHOLEMMA (DISABLE LM-G-RHOLEMMA) [ 0.0 0.0 0.0 ] LM-G-RHOLEMMA-OFF (PROVE-LEMMA G-RHOLEMMA (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))) ((ENABLE LM-G-RHOLEMMA) (USE (LM-G-RHOLEMMA)))) WARNING: Note that G-RHOLEMMA contains the free variables GP, LP, K, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, appealing to the lemmas WS-LIST-G and WS-LN-G, and unfolding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] G-RHOLEMMA (PROVE-LEMMA LP-SAME-L (REWRITE) (IMPLIES (AND (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (UNION-AT-N L J M)) (UNION-AT-N LP J M)) ((ENABLE UNION-AT-N AT) (USE (L-RHOLEMMA)))) WARNING: Note that LP-SAME-L contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and UNION-AT-N, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))) (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (MEMBER (NTH L J) M)) (MEMBER (NTH LP J) M)), which simplifies, applying L-RHOLEMMA, and opening up the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LP-SAME-L (PROVE-LEMMA L-SAME-LP (REWRITE) (IMPLIES (AND (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (UNION-AT-N LP J M)) (UNION-AT-N L J M)) ((ENABLE UNION-AT-N AT) (USE (L-RHOLEMMA)))) WARNING: Note that L-SAME-LP contains the free variables GP, LP, K, G, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and UNION-AT-N, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))) (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (MEMBER (NTH LP J) M)) (MEMBER (NTH L J) M)), which simplifies, applying L-RHOLEMMA, and opening up the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] L-SAME-LP (PROVE-LEMMA LP-SAME-L-NOT (REWRITE) (IMPLIES (AND (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (NOT (UNION-AT-N L J M))) (NOT (UNION-AT-N LP J M))) ((USE (L-SAME-LP)))) WARNING: Note that LP-SAME-L-NOT contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, rewriting with L-SAME-LP, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LP-SAME-L-NOT (PROVE-LEMMA GP-SAME-G (REWRITE) (IMPLIES (AND (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (UNION-AT-N G J M)) (UNION-AT-N GP J M)) ((ENABLE UNION-AT-N AT) (USE (G-RHOLEMMA)))) WARNING: Note that GP-SAME-G contains the free variables LP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and UNION-AT-N, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))) (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (MEMBER (NTH G J) M)) (MEMBER (NTH GP J) M)), which simplifies, applying G-RHOLEMMA, and opening up the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] GP-SAME-G (PROVE-LEMMA G-SAME-GP (REWRITE) (IMPLIES (AND (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (UNION-AT-N GP J M)) (UNION-AT-N G J M)) ((ENABLE UNION-AT-N AT) (USE (G-RHOLEMMA)))) WARNING: Note that G-SAME-GP contains the free variables GP, LP, K, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and UNION-AT-N, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))) (WS N L G) (LISTP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (MEMBER (NTH GP J) M)) (MEMBER (NTH G J) M)), which simplifies, applying G-RHOLEMMA, and opening up the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] G-SAME-GP (PROVE-LEMMA L-SAME-LP-AT (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (NUMBERP M) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (AT LP J M)) (AT L J M)) ((ENABLE AT) (USE (L-RHOLEMMA)))) WARNING: Note that L-SAME-LP-AT contains the free variables GP, LP, K, G, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and AT, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH L J) (NTH LP J))) (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (NUMBERP M) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (EQUAL (NTH LP J) M)) (EQUAL (NTH L J) M)), which simplifies, applying L-RHOLEMMA, and opening up the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.2 0.0 0.0 ] L-SAME-LP-AT (PROVE-LEMMA GP-SAME-G-AT (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (NUMBERP M) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (AT G J M)) (AT GP J M)) ((ENABLE AT) (USE (G-RHOLEMMA)))) WARNING: Note that GP-SAME-G-AT contains the free variables LP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and AT, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K J))) (EQUAL (NTH G J) (NTH GP J))) (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (NUMBERP M) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (EQUAL (NTH G J) M)) (EQUAL (NTH GP J) M)), which simplifies, applying G-RHOLEMMA, and opening up the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] GP-SAME-G-AT (PROVE-LEMMA L-SAME-LP-AT-NOT (REWRITE) (IMPLIES (AND (WS N L G) (NUMBERP M) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (NOT (AT L J M))) (NOT (AT LP J M))) ((USE (L-SAME-LP-AT)))) WARNING: Note that L-SAME-LP-AT-NOT contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, rewriting with L-SAME-LP-AT, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] L-SAME-LP-AT-NOT (PROVE-LEMMA LM-A2-AT-N2-A2-AT-N1-N2 (REWRITE) (IMPLIES (AND (NUMBERP N) (NUMBERP K) (MEMBER J (NSET N)) (LESSP J K) (A2-AT-N2 K N L)) (A2-AT-N1-N2 K J L)) ((ENABLE NSET A2-AT-N2 A2-AT-N1-N2))) WARNING: Note that LM-A2-AT-N2-A2-AT-N1-N2 contains the free variable N which will be chosen by instantiating the hypothesis (NUMBERP N). This formula can be simplified, using the abbreviations A2-AT-N1-N2, AND, and IMPLIES, to: (IMPLIES (AND (NUMBERP N) (NUMBERP K) (MEMBER J (NSET N)) (LESSP J K) (A2-AT-N2 K N L) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L J '(5 6 7 8 9 10 11 12)))), 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 L J K N)) (IMPLIES (AND (NOT (ZEROP N)) (NOT (LESSP N K)) (p L J K (SUB1 N))) (p L J K N)) (IMPLIES (AND (NOT (ZEROP N)) (LESSP N K) (p L J K (SUB1 N))) (p L J K 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 five new conjectures: Case 5. (IMPLIES (AND (ZEROP N) (NUMBERP N) (NUMBERP K) (MEMBER J (NSET N)) (LESSP J K) (A2-AT-N2 K N L) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L J '(5 6 7 8 9 10 11 12)))). This simplifies, opening up ZEROP, NUMBERP, NSET, LISTP, and MEMBER, to: T. Case 4. (IMPLIES (AND (NOT (ZEROP N)) (NOT (LESSP N K)) (NOT (MEMBER J (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP K) (MEMBER J (NSET N)) (LESSP J K) (A2-AT-N2 K N L) (UNION-AT-N L K '(10 11 12))) (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 the functions ZEROP, NSET, MEMBER, A2-AT-N1-N2, and A2-AT-N2, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NOT (LESSP N K)) (NOT (MEMBER J (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP K) (EQUAL J N) (LESSP J K) (EQUAL J 0) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L 0 '(5 6 7 8 9 10 11 12)))). This again simplifies, trivially, to: T. Case 3. (IMPLIES (AND (NOT (ZEROP N)) (NOT (LESSP N K)) (NOT (A2-AT-N2 K (SUB1 N) L)) (NUMBERP N) (NUMBERP K) (MEMBER J (NSET N)) (LESSP J K) (A2-AT-N2 K N L) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L J '(5 6 7 8 9 10 11 12)))). This simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding ZEROP, NSET, MEMBER, A2-AT-N1-N2, and A2-AT-N2, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NOT (LESSP N K)) (NOT (A2-AT-N2 K (SUB1 N) L)) (NUMBERP N) (NUMBERP K) (EQUAL J N) (LESSP J K) (EQUAL J 0) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L 0 '(5 6 7 8 9 10 11 12)))). This again simplifies, obviously, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP N)) (LESSP N K) (NOT (MEMBER J (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP K) (MEMBER J (NSET N)) (LESSP J K) (A2-AT-N2 K N L) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L J '(5 6 7 8 9 10 11 12)))). This simplifies, applying CDR-CONS and CAR-CONS, and unfolding the definitions of ZEROP, NSET, MEMBER, A2-AT-N1-N2, and A2-AT-N2, to the formula: (IMPLIES (AND (NOT (EQUAL N 0)) (LESSP N K) (NOT (MEMBER J (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP K) (EQUAL J N) (LESSP J K) (EQUAL J 0) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L 0 '(5 6 7 8 9 10 11 12)))). This again simplifies, clearly, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP N)) (LESSP N K) (NOT (A2-AT-N2 K (SUB1 N) L)) (NUMBERP N) (NUMBERP K) (MEMBER J (NSET N)) (LESSP J K) (A2-AT-N2 K N L) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L J '(5 6 7 8 9 10 11 12)))). This simplifies, applying the lemmas CDR-CONS and CAR-CONS, and expanding the definitions of ZEROP, NSET, MEMBER, A2-AT-N1-N2, and A2-AT-N2, to: (IMPLIES (AND (NOT (EQUAL N 0)) (LESSP N K) (NOT (A2-AT-N2 K (SUB1 N) L)) (NUMBERP N) (NUMBERP K) (EQUAL J N) (LESSP J K) (EQUAL J 0) (UNION-AT-N L K '(10 11 12))) (NOT (UNION-AT-N L 0 '(5 6 7 8 9 10 11 12)))), which again simplifies, obviously, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.1 0.0 ] LM-A2-AT-N2-A2-AT-N1-N2 (DISABLE LM-A2-AT-N2-A2-AT-N1-N2) [ 0.0 0.0 0.0 ] LM-A2-AT-N2-A2-AT-N1-N2-OFF (PROVE-LEMMA A2-AT-N2-A2-AT-N1-N2 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (MEMBER J (NSET N)) (LESSP J K) (A2-AT-N2 K N L)) (A2-AT-N1-N2 K J L)) ((ENABLE LM-A2-AT-N2-A2-AT-N1-N2) (USE (LM-A2-AT-N2-A2-AT-N1-N2)))) WARNING: Note that A2-AT-N2-A2-AT-N1-N2 contains the free variables G and N which will be chosen by instantiating the hypothesis (WS N L G). This formula simplifies, appealing to the lemmas WS-NUM-N and NSET-NUMBER, and opening up the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A2-AT-N2-A2-AT-N1-N2 (PROVE-LEMMA LM-A2-A2-AT-N2 (REWRITE) (IMPLIES (AND (NUMBERP N) (NUMBERP I) (MEMBER K (NSET N)) (A2 N I L)) (A2-AT-N2 K I L)) ((ENABLE NSET A2))) WARNING: Note that LM-A2-A2-AT-N2 contains the free variable N which will be chosen by instantiating the hypothesis (NUMBERP N). Call the conjecture *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 K I L N)) (IMPLIES (AND (NOT (ZEROP N)) (p K I L (SUB1 N))) (p K I 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 conjectures: Case 3. (IMPLIES (AND (ZEROP N) (NUMBERP N) (NUMBERP I) (MEMBER K (NSET N)) (A2 N I L)) (A2-AT-N2 K I L)). This simplifies, unfolding the functions ZEROP, NUMBERP, NSET, LISTP, and MEMBER, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP N)) (NOT (MEMBER K (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP I) (MEMBER K (NSET N)) (A2 N I L)) (A2-AT-N2 K I L)). This simplifies, applying CDR-CONS and CAR-CONS, and unfolding the functions ZEROP, NSET, MEMBER, and A2, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NOT (MEMBER K (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP I) (EQUAL K N) (EQUAL K 0)) (A2-AT-N2 0 I L)). This again simplifies, trivially, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP N)) (NOT (A2 (SUB1 N) I L)) (NUMBERP N) (NUMBERP I) (MEMBER K (NSET N)) (A2 N I L)) (A2-AT-N2 K I L)). This simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and expanding the definitions of ZEROP, NSET, MEMBER, and A2, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NOT (A2 (SUB1 N) I L)) (NUMBERP N) (NUMBERP I) (EQUAL K N) (EQUAL K 0)) (A2-AT-N2 0 I L)), which again simplifies, clearly, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.0 0.0 ] LM-A2-A2-AT-N2 (PROVE-LEMMA A2-A2-AT-N2 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (A2 N I L)) (A2-AT-N2 K I L)) ((USE (LM-A2-A2-AT-N2)))) WARNING: Note that A2-A2-AT-N2 contains the free variables G and N which will be chosen by instantiating the hypothesis (WS N L G). This conjecture simplifies, applying the lemmas WS-NUM-N and NSET-NUMBER, and expanding the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A2-A2-AT-N2 (PROVE-LEMMA LM-A3-AT-N2-A3-AT-N1-N2 (REWRITE) (IMPLIES (AND (NUMBERP N) (NUMBERP U) (MEMBER J (NSET N)) (A3-AT-N2 U N L G)) (A3-AT-N1-N2 U J L G)) ((ENABLE NSET A3-AT-N2 A3-AT-N1-N2))) WARNING: Note that LM-A3-AT-N2-A3-AT-N1-N2 contains the free variable N which will be chosen by instantiating the hypothesis (NUMBERP N). This formula can be simplified, using the abbreviations A3-AT-N1-N2, AND, and IMPLIES, to the new formula: (IMPLIES (AND (NUMBERP N) (NUMBERP U) (MEMBER J (NSET N)) (A3-AT-N2 U N L G) (AT L U 12) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (AT G J 4)), 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 G J L U N)) (IMPLIES (AND (NOT (ZEROP N)) (p G J L U (SUB1 N))) (p G J L U 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 formulas: Case 3. (IMPLIES (AND (ZEROP N) (NUMBERP N) (NUMBERP U) (MEMBER J (NSET N)) (A3-AT-N2 U N L G) (AT L U 12) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (AT G J 4)). This simplifies, opening up ZEROP, NUMBERP, NSET, LISTP, and MEMBER, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP N)) (NOT (MEMBER J (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP U) (MEMBER J (NSET N)) (A3-AT-N2 U N L G) (AT L U 12) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (AT G J 4)). This simplifies, rewriting with CDR-CONS and CAR-CONS, and opening up ZEROP, NSET, MEMBER, A3-AT-N1-N2, and A3-AT-N2, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NOT (MEMBER J (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP U) (EQUAL J N) (EQUAL J 0) (AT L U 12) (UNION-AT-N L 0 '(5 6 7 8 9 10 11 12))) (AT G 0 4)). This again simplifies, trivially, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP N)) (NOT (A3-AT-N2 U (SUB1 N) L G)) (NUMBERP N) (NUMBERP U) (MEMBER J (NSET N)) (A3-AT-N2 U N L G) (AT L U 12) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (AT G J 4)). This simplifies, rewriting with the lemmas CDR-CONS and CAR-CONS, and opening up the definitions of ZEROP, NSET, MEMBER, A3-AT-N1-N2, and A3-AT-N2, to the new formula: (IMPLIES (AND (NOT (EQUAL N 0)) (NOT (A3-AT-N2 U (SUB1 N) L G)) (NUMBERP N) (NUMBERP U) (EQUAL J N) (EQUAL J 0) (AT L U 12) (UNION-AT-N L 0 '(5 6 7 8 9 10 11 12))) (AT G 0 4)), which again simplifies, clearly, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.1 0.0 ] LM-A3-AT-N2-A3-AT-N1-N2 (DISABLE LM-A3-AT-N2-A3-AT-N1-N2) [ 0.0 0.0 0.0 ] LM-A3-AT-N2-A3-AT-N1-N2-OFF (PROVE-LEMMA A3-AT-N2-A3-AT-N1-N2 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER U (NSET N)) (MEMBER J (NSET N)) (A3-AT-N2 U N L G)) (A3-AT-N1-N2 U J L G)) ((ENABLE LM-A3-AT-N2-A3-AT-N1-N2) (USE (LM-A3-AT-N2-A3-AT-N1-N2)))) WARNING: Note that A3-AT-N2-A3-AT-N1-N2 contains the free variable N which will be chosen by instantiating the hypothesis (WS N L G). This formula simplifies, rewriting with WS-NUM-N and NSET-NUMBER, and unfolding the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-AT-N2-A3-AT-N1-N2 (PROVE-LEMMA LM-A3-A3-AT-N2 (REWRITE) (IMPLIES (AND (NUMBERP N) (NUMBERP I) (MEMBER U (NSET N)) (A3 N I L G)) (A3-AT-N2 U I L G)) ((ENABLE NSET A3))) WARNING: Note that LM-A3-A3-AT-N2 contains the free variable N which will be chosen by instantiating the hypothesis (NUMBERP N). Give the conjecture 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 U I L G N)) (IMPLIES (AND (NOT (ZEROP N)) (p U I L G (SUB1 N))) (p U I L G N))). 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 three new conjectures: Case 3. (IMPLIES (AND (ZEROP N) (NUMBERP N) (NUMBERP I) (MEMBER U (NSET N)) (A3 N I L G)) (A3-AT-N2 U I L G)), which simplifies, unfolding the definitions of ZEROP, NUMBERP, NSET, LISTP, and MEMBER, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP N)) (NOT (MEMBER U (NSET (SUB1 N)))) (NUMBERP N) (NUMBERP I) (MEMBER U (NSET N)) (A3 N I L G)) (A3-AT-N2 U I L G)), which simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the definitions of ZEROP, NSET, MEMBER, and A3, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP N)) (NOT (A3 (SUB1 N) I L G)) (NUMBERP N) (NUMBERP I) (MEMBER U (NSET N)) (A3 N I L G)) (A3-AT-N2 U I L G)). This simplifies, rewriting with CDR-CONS and CAR-CONS, and unfolding ZEROP, NSET, MEMBER, and A3, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.0 0.0 ] LM-A3-A3-AT-N2 (DISABLE LM-A3-A3-AT-N2) [ 0.0 0.0 0.0 ] LM-A3-A3-AT-N2-OFF (PROVE-LEMMA A3-A3-AT-N2 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER U (NSET N)) (A3 N I L G)) (A3-AT-N2 U I L G)) ((ENABLE LM-A3-A3-AT-N2) (USE (LM-A3-A3-AT-N2)))) WARNING: Note that A3-A3-AT-N2 contains the free variable N which will be chosen by instantiating the hypothesis (WS N L G). This formula simplifies, rewriting with WS-NUM-N and NSET-NUMBER, and unfolding the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-A3-AT-N2 (PROVE-LEMMA A3-I-J-A3-AT-N1-N2 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (A3 N N L G)) (A3-AT-N1-N2 I J L G)) ((USE (A3-A3-AT-N2 (U I) (I N))))) WARNING: Note that A3-I-J-A3-AT-N1-N2 contains the free variable N which will be chosen by instantiating the hypothesis (WS N L G). This formula simplifies, applying N-NOT-0, A3-A3-AT-N2, and A3-AT-N2-A3-AT-N1-N2, and opening up the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-I-J-A3-AT-N1-N2 (PROVE-LEMMA A3-EX-A3-AT-N1-N2 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (A3 N N L G) (EXIST-UNION LP N '(8 9 10 11 12))) (A3-AT-N1-N2 K (EXIST-UNION LP N '(8 9 10 11 12)) L G)) ((USE (A3-A3-AT-N2 (U K) (I N))))) This formula simplifies, applying the lemmas N-NOT-0, A3-A3-AT-N2, MEMBER-EX-UNION, and A3-I-J-A3-AT-N1-N2, and expanding AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-EX-A3-AT-N1-N2 (PROVE-LEMMA A2-N-A2-AT-N2 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (A2 N N L)) (A2-AT-N2 K N L)) ((USE (A2-A2-AT-N2 (I N))))) WARNING: Note that A2-N-A2-AT-N2 contains the free variable G which will be chosen by instantiating the hypothesis (WS N L G). This conjecture simplifies, rewriting with N-NOT-0 and A2-A2-AT-N2, and unfolding AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A2-N-A2-AT-N2 (PROVE-LEMMA A2-I-J-A2-AT-N1-N2 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (A2 N N L) (LESSP J I)) (A2-AT-N1-N2 I J L)) ((USE (A2-A2-AT-N2 (I N))))) WARNING: Note that A2-I-J-A2-AT-N1-N2 contains the free variables G and N which will be chosen by instantiating the hypothesis (WS N L G). This conjecture simplifies, rewriting with N-NOT-0, A2-N-A2-AT-N2, and A2-AT-N2-A2-AT-N1-N2, and unfolding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A2-I-J-A2-AT-N1-N2 (PROVE-LEMMA J-EQ-K-MOVE-MEMBER-G (REWRITE) (IMPLIES (AND (LISTP G) (LISTP M) (MEMBER I M) (MEMBER K (NSET (LENGTH G)))) (MEMBER (NTH (MOVE G K I) K) M))) This conjecture simplifies, rewriting with the lemma MOVE-NTH, to: T. Q.E.D. [ 0.0 0.0 0.0 ] J-EQ-K-MOVE-MEMBER-G (PROVE-LEMMA J-NEQ-K-MOVE-MEMBER-G (REWRITE) (IMPLIES (AND (LISTP G) (LISTP M) (MEMBER K (NSET (LENGTH G))) (NOT (EQUAL J K)) (MEMBER I M) (MEMBER (NTH G J) M)) (MEMBER (NTH (MOVE G K I) J) M))) This formula simplifies, applying MOVE-UNCHANGE-OTHER-THAN-NTH, to: T. Q.E.D. [ 0.0 0.0 0.0 ] J-NEQ-K-MOVE-MEMBER-G (PROVE-LEMMA MOVE-MEMBER-G (REWRITE) (IMPLIES (AND (LISTP G) (LISTP M) (MEMBER I M) (MEMBER K (NSET (LENGTH G))) (MEMBER (NTH G J) M)) (MEMBER (NTH (MOVE G K I) J) M)) ((USE (J-NEQ-K-MOVE-MEMBER-G) (J-EQ-K-MOVE-MEMBER-G)))) WARNING: the newly proposed lemma, MOVE-MEMBER-G, could be applied whenever the previously added lemma J-NEQ-K-MOVE-MEMBER-G could. This simplifies, applying MOVE-NTH, and unfolding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] MOVE-MEMBER-G (PROVE-LEMMA MOVE-MEMBER-L (REWRITE) (IMPLIES (AND (LISTP L) (LISTP M) (NUMBERP J) (MEMBER I M) (MEMBER K (NSET (LENGTH L))) (MEMBER (NTH L J) M)) (MEMBER (NTH (MOVE L K I) J) M))) WARNING: the previously added lemma, MOVE-MEMBER-G, could be applied whenever the newly proposed MOVE-MEMBER-L could! This conjecture simplifies, rewriting with the lemma MOVE-MEMBER-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] MOVE-MEMBER-L (PROVE-LEMMA WS-UNION-G (REWRITE) (IMPLIES (WS N L G) (ALL-UNION G N '(0 1 2 3 4))) ((ENABLE WS))) WARNING: Note that WS-UNION-G contains the free variable L which will be chosen by instantiating the hypothesis (WS N L G). This conjecture can be simplified, using the abbreviations WS and IMPLIES, to the goal: T. This simplifies, clearly, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-UNION-G (PROVE-LEMMA WS-UNION-L (REWRITE) (IMPLIES (WS N L G) (ALL-UNION L N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE WS))) WARNING: Note that WS-UNION-L contains the free variable G which will be chosen by instantiating the hypothesis (WS N L G). This conjecture can be simplified, using the abbreviations WS and IMPLIES, to: T. This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] WS-UNION-L (PROVE-LEMMA RHO0-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI0 N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO0-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI0 N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI0, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO0-PRESERVES-UNION-G (PROVE-LEMMA RHO1A-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI1A N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO1A-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI1A N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI1A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO1A-PRESERVES-UNION-G (PROVE-LEMMA RHO1B-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI1B N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO1B-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI1B N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI1B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 1) (EQUAL G GP) (EQUAL LP L)) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO1B-PRESERVES-UNION-G (PROVE-LEMMA LM-RHO2-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (RHOI2 N K L G LP GP)) (ALL-UNION GP J '(0 1 2 3 4))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO2-PRESERVES-UNION-G contains the free variables LP, L, K, N, and G which will be chosen by instantiating the hypotheses (LISTP G), (EQUAL (LENGTH G) N), (MEMBER K (NSET N)), and (RHOI2 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI2, AND, and IMPLIES, to the formula: (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (ALL-UNION GP J '(0 1 2 3 4))). This simplifies, obviously, to: (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 2)) (ALL-UNION (MOVE G K 1) J '(0 1 2 3 4))), which we will 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 J) (p G K J L)) (IMPLIES (AND (NOT (ZEROP J)) (p G K (SUB1 J) L)) (p G K J L))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform us that the measure (COUNT J) 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 J) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 2)) (ALL-UNION (MOVE G K 1) J '(0 1 2 3 4))). This simplifies, unfolding the functions ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION G (SUB1 J) '(0 1 2 3 4))) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 2)) (ALL-UNION (MOVE G K 1) J '(0 1 2 3 4))). This simplifies, opening up ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE G K 1) (SUB1 J) '(0 1 2 3 4)) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 2)) (ALL-UNION (MOVE G K 1) J '(0 1 2 3 4))). This simplifies, applying the lemma MOVE-MEMBER-L, and unfolding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO2-PRESERVES-UNION-G (PROVE-LEMMA RHO2-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI2 N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4))) ((DISABLE RHOI2) (USE (LM-RHO2-PRESERVES-UNION-G (J N))))) WARNING: Note that RHO2-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI2 N K L G LP GP). This formula simplifies, applying WS-LIST-G, WS-LN-G, and WS-UNION-G, and opening up AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO2-PRESERVES-UNION-G (PROVE-LEMMA RHO3A-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI3A N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO3A-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI3A N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI3A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO3A-PRESERVES-UNION-G (PROVE-LEMMA RHO3B-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI3B N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO3B-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI3B N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI3B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 3) (EQUAL GP G) (EQUAL LP L) (EXIST-UNION G N '(3 4))) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO3B-PRESERVES-UNION-G (PROVE-LEMMA LM-RHO4-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (RHOI4 N K L G LP GP)) (ALL-UNION GP J '(0 1 2 3 4))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO4-PRESERVES-UNION-G contains the free variables LP, L, K, N, and G which will be chosen by instantiating the hypotheses (LISTP G), (EQUAL (LENGTH G) N), (MEMBER K (NSET N)), and (RHOI4 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI4, AND, and IMPLIES, to the formula: (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (ALL-UNION GP J '(0 1 2 3 4))). This simplifies, obviously, to: (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 4)) (ALL-UNION (MOVE G K 3) J '(0 1 2 3 4))), which we will 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 J) (p G K J L)) (IMPLIES (AND (NOT (ZEROP J)) (p G K (SUB1 J) L)) (p G K J L))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform us that the measure (COUNT J) 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 J) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 4)) (ALL-UNION (MOVE G K 3) J '(0 1 2 3 4))). This simplifies, unfolding the functions ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION G (SUB1 J) '(0 1 2 3 4))) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 4)) (ALL-UNION (MOVE G K 3) J '(0 1 2 3 4))). This simplifies, opening up ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE G K 3) (SUB1 J) '(0 1 2 3 4)) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 4)) (ALL-UNION (MOVE G K 3) J '(0 1 2 3 4))). This simplifies, applying the lemma MOVE-MEMBER-L, and unfolding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.1 0.0 ] LM-RHO4-PRESERVES-UNION-G (PROVE-LEMMA RHO4-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI4 N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4))) ((DISABLE RHOI4) (USE (LM-RHO4-PRESERVES-UNION-G (J N))))) WARNING: Note that RHO4-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI4 N K L G LP GP). This formula simplifies, applying WS-LIST-G, WS-LN-G, and WS-UNION-G, and opening up AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO4-PRESERVES-UNION-G (PROVE-LEMMA RHO5A-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI5A N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO5A-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI5A N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI5A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6))) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO5A-PRESERVES-UNION-G (PROVE-LEMMA RHO5B-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI5B N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO5B-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI5B N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI5B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8))) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO5B-PRESERVES-UNION-G (PROVE-LEMMA LM-RHO6-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (RHOI6 N K L G LP GP)) (ALL-UNION GP J '(0 1 2 3 4))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO6-PRESERVES-UNION-G contains the free variables LP, L, K, N, and G which will be chosen by instantiating the hypotheses (LISTP G), (EQUAL (LENGTH G) N), (MEMBER K (NSET N)), and (RHOI6 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI6, AND, and IMPLIES, to the formula: (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (ALL-UNION GP J '(0 1 2 3 4))). This simplifies, obviously, to: (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 6)) (ALL-UNION (MOVE G K 2) J '(0 1 2 3 4))), which we will 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 J) (p G K J L)) (IMPLIES (AND (NOT (ZEROP J)) (p G K (SUB1 J) L)) (p G K J L))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform us that the measure (COUNT J) 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 J) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 6)) (ALL-UNION (MOVE G K 2) J '(0 1 2 3 4))). This simplifies, unfolding the functions ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION G (SUB1 J) '(0 1 2 3 4))) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 6)) (ALL-UNION (MOVE G K 2) J '(0 1 2 3 4))). This simplifies, opening up ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE G K 2) (SUB1 J) '(0 1 2 3 4)) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 6)) (ALL-UNION (MOVE G K 2) J '(0 1 2 3 4))). This simplifies, applying the lemma MOVE-MEMBER-L, and unfolding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO6-PRESERVES-UNION-G (PROVE-LEMMA RHO6-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI6 N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4))) ((DISABLE RHOI6) (USE (LM-RHO6-PRESERVES-UNION-G (J N))))) WARNING: Note that RHO6-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI6 N K L G LP GP). This formula simplifies, applying WS-LIST-G, WS-LN-G, and WS-UNION-G, and opening up AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO6-PRESERVES-UNION-G (PROVE-LEMMA RHO7A-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI7A N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO7A-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI7A N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI7A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO7A-PRESERVES-UNION-G (PROVE-LEMMA RHO7B-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI7B N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO7B-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI7B N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI7B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 7) (NOT (EXIST-UNION G N '(4))) (EQUAL LP L) (EQUAL GP G)) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO7B-PRESERVES-UNION-G (PROVE-LEMMA LM-RHO8-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (RHOI8 N K L G LP GP)) (ALL-UNION GP J '(0 1 2 3 4))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO8-PRESERVES-UNION-G contains the free variables LP, L, K, N, and G which will be chosen by instantiating the hypotheses (LISTP G), (EQUAL (LENGTH G) N), (MEMBER K (NSET N)), and (RHOI8 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI8, AND, and IMPLIES, to the formula: (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (ALL-UNION GP J '(0 1 2 3 4))). This simplifies, obviously, to: (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 8)) (ALL-UNION (MOVE G K 4) J '(0 1 2 3 4))), which we will 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 J) (p G K J L)) (IMPLIES (AND (NOT (ZEROP J)) (p G K (SUB1 J) L)) (p G K J L))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform us that the measure (COUNT J) 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 J) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 8)) (ALL-UNION (MOVE G K 4) J '(0 1 2 3 4))). This simplifies, unfolding the functions ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION G (SUB1 J) '(0 1 2 3 4))) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 8)) (ALL-UNION (MOVE G K 4) J '(0 1 2 3 4))). This simplifies, opening up ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE G K 4) (SUB1 J) '(0 1 2 3 4)) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 8)) (ALL-UNION (MOVE G K 4) J '(0 1 2 3 4))). This simplifies, applying the lemma MOVE-MEMBER-L, and unfolding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.1 0.0 ] LM-RHO8-PRESERVES-UNION-G (PROVE-LEMMA RHO8-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI8 N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4))) ((DISABLE RHOI8) (USE (LM-RHO8-PRESERVES-UNION-G (J N))))) WARNING: Note that RHO8-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI8 N K L G LP GP). This formula simplifies, applying WS-LIST-G, WS-LN-G, and WS-UNION-G, and opening up AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO8-PRESERVES-UNION-G (PROVE-LEMMA RHO9A-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI9A N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO9A-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI9A N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI9A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10))) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO9A-PRESERVES-UNION-G (PROVE-LEMMA RHO9B-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI9B N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO9B-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI9B N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI9B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 9) (EQUAL GP G) (NOT (PHI9 K N G)) (EQUAL LP L)) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO9B-PRESERVES-UNION-G (PROVE-LEMMA LM-RHO10-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (RHOI10 N K L G LP GP)) (ALL-UNION GP J '(0 1 2 3 4))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO10-PRESERVES-UNION-G contains the free variables LP, L, K, N, and G which will be chosen by instantiating the hypotheses (LISTP G), (EQUAL (LENGTH G) N), (MEMBER K (NSET N)), and (RHOI10 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI10, AND, and IMPLIES, to the formula: (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (ALL-UNION GP J '(0 1 2 3 4))). This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO10-PRESERVES-UNION-G (PROVE-LEMMA RHO10-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI10 N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that RHO10-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI10 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI10, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO10-PRESERVES-UNION-G (PROVE-LEMMA RHO11A-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI11A N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO11A-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI11A N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI11A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12))) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO11A-PRESERVES-UNION-G (PROVE-LEMMA RHO11B-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI11B N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4)))) WARNING: Note that RHO11B-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI11B N K L G LP GP). This conjecture can be simplified, using the abbreviations RHOI11B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 11) (EQUAL GP G) (NOT (PHI11 K N G)) (EQUAL LP L)) (ALL-UNION GP N '(0 1 2 3 4))). This simplifies, applying WS-UNION-G, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO11B-PRESERVES-UNION-G (PROVE-LEMMA LM-RHO12-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (RHOI12 N K L G LP GP)) (ALL-UNION GP J '(0 1 2 3 4))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO12-PRESERVES-UNION-G contains the free variables LP, L, K, N, and G which will be chosen by instantiating the hypotheses (LISTP G), (EQUAL (LENGTH G) N), (MEMBER K (NSET N)), and (RHOI12 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI12, AND, and IMPLIES, to the formula: (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (ALL-UNION GP J '(0 1 2 3 4))). This simplifies, obviously, to: (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 12)) (ALL-UNION (MOVE G K 0) J '(0 1 2 3 4))), which we will 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 J) (p G K J L)) (IMPLIES (AND (NOT (ZEROP J)) (p G K (SUB1 J) L)) (p G K J L))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform us that the measure (COUNT J) 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 J) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 12)) (ALL-UNION (MOVE G K 0) J '(0 1 2 3 4))). This simplifies, unfolding the functions ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION G (SUB1 J) '(0 1 2 3 4))) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 12)) (ALL-UNION (MOVE G K 0) J '(0 1 2 3 4))). This simplifies, opening up ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE G K 0) (SUB1 J) '(0 1 2 3 4)) (LISTP G) (MEMBER K (NSET (LENGTH G))) (ALL-UNION G J '(0 1 2 3 4)) (EQUAL (NTH L K) 12)) (ALL-UNION (MOVE G K 0) J '(0 1 2 3 4))). This simplifies, applying the lemma MOVE-MEMBER-L, and unfolding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO12-PRESERVES-UNION-G (PROVE-LEMMA RHO12-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI12 N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4))) ((DISABLE RHOI12) (USE (LM-RHO12-PRESERVES-UNION-G (J N))))) WARNING: Note that RHO12-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI12 N K L G LP GP). This formula simplifies, applying WS-LIST-G, WS-LN-G, and WS-UNION-G, and opening up AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO12-PRESERVES-UNION-G (PROVE-LEMMA RHO-PRESERVES-UNION-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (ALL-UNION GP N '(0 1 2 3 4))) ((DISABLE RHOI0 RHOI1A RHOI1B RHOI2 RHOI3A RHOI3B RHOI4 RHOI5A RHOI5B RHOI6 RHOI7A RHOI7B RHOI8 RHOI9A RHOI9B RHOI10 RHOI11A RHOI11B RHOI12) (ENABLE RHOI))) WARNING: Note that RHO-PRESERVES-UNION-G contains the free variables LP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, rewriting with the lemmas RHO0-PRESERVES-UNION-G, RHO1A-PRESERVES-UNION-G, RHO1B-PRESERVES-UNION-G, RHO2-PRESERVES-UNION-G, RHO3A-PRESERVES-UNION-G, RHO3B-PRESERVES-UNION-G, RHO4-PRESERVES-UNION-G, RHO5A-PRESERVES-UNION-G, RHO5B-PRESERVES-UNION-G, RHO6-PRESERVES-UNION-G, RHO7A-PRESERVES-UNION-G, RHO7B-PRESERVES-UNION-G, RHO8-PRESERVES-UNION-G, RHO9A-PRESERVES-UNION-G, RHO9B-PRESERVES-UNION-G, RHO10-PRESERVES-UNION-G, RHO11A-PRESERVES-UNION-G, RHO11B-PRESERVES-UNION-G, and RHO12-PRESERVES-UNION-G, and unfolding the function RHOI, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO-PRESERVES-UNION-G (PROVE-LEMMA LM-RHO0-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI0 N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO0-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI0 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI0, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 0)) (ALL-UNION (MOVE L K 1) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J))) (p L K J))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 0)) (ALL-UNION (MOVE L K 1) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 0)) (ALL-UNION (MOVE L K 1) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 1) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 0)) (ALL-UNION (MOVE L K 1) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.2 0.0 ] LM-RHO0-PRESERVES-UNION-L (PROVE-LEMMA RHO0-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI0 N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI0) (USE (LM-RHO0-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO0-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI0 N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO0-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO1A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI1A N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO1A-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI1A N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI1A, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 1)) (ALL-UNION (MOVE L K 2) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J))) (p L K J))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 1)) (ALL-UNION (MOVE L K 2) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 1)) (ALL-UNION (MOVE L K 2) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 2) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 1)) (ALL-UNION (MOVE L K 2) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.2 0.0 ] LM-RHO1A-PRESERVES-UNION-L (PROVE-LEMMA RHO1A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI1A N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI1A) (USE (LM-RHO1A-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO1A-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI1A N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO1A-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO1B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI1B N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO1B-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI1B N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI1B, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 1) (EQUAL G GP) (EQUAL LP L)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO1B-PRESERVES-UNION-L (PROVE-LEMMA RHO1B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI1B N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI1B) (USE (LM-RHO1B-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO1B-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI1B N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO1B-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO2-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI2 N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO2-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI2 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI2, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 2)) (ALL-UNION (MOVE L K 3) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J))) (p L K J))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 2)) (ALL-UNION (MOVE L K 3) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 2)) (ALL-UNION (MOVE L K 3) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 3) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 2)) (ALL-UNION (MOVE L K 3) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.2 0.0 ] LM-RHO2-PRESERVES-UNION-L (PROVE-LEMMA RHO2-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI2 N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI2) (USE (LM-RHO2-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO2-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI2 N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO2-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO3A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI3A N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO3A-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI3A N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI3A, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 3) (NOT (EXIST-UNION G (LENGTH L) '(3 4)))) (ALL-UNION (MOVE L K 4) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J G)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J) G)) (p L K J G))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 3) (NOT (EXIST-UNION G (LENGTH L) '(3 4)))) (ALL-UNION (MOVE L K 4) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 3) (NOT (EXIST-UNION G (LENGTH L) '(3 4)))) (ALL-UNION (MOVE L K 4) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 4) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 3) (NOT (EXIST-UNION G (LENGTH L) '(3 4)))) (ALL-UNION (MOVE L K 4) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.2 0.0 ] LM-RHO3A-PRESERVES-UNION-L (PROVE-LEMMA RHO3A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI3A N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI3A) (USE (LM-RHO3A-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO3A-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI3A N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO3A-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO3B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI3B N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO3B-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI3B N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI3B, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP L) (EXIST-UNION G N '(3 4))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO3B-PRESERVES-UNION-L (PROVE-LEMMA RHO3B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI3B N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI3B) (USE (LM-RHO3B-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO3B-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI3B N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO3B-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO4-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI4 N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO4-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI4 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI4, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 4)) (ALL-UNION (MOVE L K 5) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J))) (p L K J))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 4)) (ALL-UNION (MOVE L K 5) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 4)) (ALL-UNION (MOVE L K 5) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 5) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 4)) (ALL-UNION (MOVE L K 5) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.3 0.0 ] LM-RHO4-PRESERVES-UNION-L (PROVE-LEMMA RHO4-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI4 N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI4) (USE (LM-RHO4-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO4-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI4 N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO4-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO5A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI5A N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO5A-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI5A N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI5A, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (EXIST-UNION G (LENGTH L) '(1))) (ALL-UNION (MOVE L K 6) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J G)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J) G)) (p L K J G))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (EXIST-UNION G (LENGTH L) '(1))) (ALL-UNION (MOVE L K 6) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (EXIST-UNION G (LENGTH L) '(1))) (ALL-UNION (MOVE L K 6) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 6) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (EXIST-UNION G (LENGTH L) '(1))) (ALL-UNION (MOVE L K 6) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.5 0.0 ] LM-RHO5A-PRESERVES-UNION-L (PROVE-LEMMA RHO5A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI5A N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI5A) (USE (LM-RHO5A-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO5A-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI5A N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO5A-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO5B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI5B N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO5B-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI5B N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI5B, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (NOT (EXIST-UNION G (LENGTH L) '(1)))) (ALL-UNION (MOVE L K 8) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J G)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J) G)) (p L K J G))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (NOT (EXIST-UNION G (LENGTH L) '(1)))) (ALL-UNION (MOVE L K 8) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (NOT (EXIST-UNION G (LENGTH L) '(1)))) (ALL-UNION (MOVE L K 8) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 8) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 5) (NOT (EXIST-UNION G (LENGTH L) '(1)))) (ALL-UNION (MOVE L K 8) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.3 0.0 ] LM-RHO5B-PRESERVES-UNION-L (PROVE-LEMMA RHO5B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI5B N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI5B) (USE (LM-RHO5B-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO5B-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI5B N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO5B-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO6-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI6 N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO6-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI6 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI6, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 6)) (ALL-UNION (MOVE L K 7) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J))) (p L K J))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 6)) (ALL-UNION (MOVE L K 7) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 6)) (ALL-UNION (MOVE L K 7) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 7) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 6)) (ALL-UNION (MOVE L K 7) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.3 0.0 ] LM-RHO6-PRESERVES-UNION-L (PROVE-LEMMA RHO6-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI6 N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI6) (USE (LM-RHO6-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO6-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI6 N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO6-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO7A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI7A N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO7A-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI7A N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI7A, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 7) (EXIST-UNION G (LENGTH L) '(4))) (ALL-UNION (MOVE L K 8) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J G)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J) G)) (p L K J G))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 7) (EXIST-UNION G (LENGTH L) '(4))) (ALL-UNION (MOVE L K 8) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 7) (EXIST-UNION G (LENGTH L) '(4))) (ALL-UNION (MOVE L K 8) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 8) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 7) (EXIST-UNION G (LENGTH L) '(4))) (ALL-UNION (MOVE L K 8) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.3 0.0 ] LM-RHO7A-PRESERVES-UNION-L (PROVE-LEMMA RHO7A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI7A N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI7A) (USE (LM-RHO7A-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO7A-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI7A N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO7A-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO7B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI7B N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO7B-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI7B N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI7B, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 7) (NOT (EXIST-UNION G N '(4))) (EQUAL LP L) (EQUAL GP G)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO7B-PRESERVES-UNION-L (PROVE-LEMMA RHO7B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI7B N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI7B) (USE (LM-RHO7B-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO7B-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI7B N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO7B-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO8-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI8 N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO8-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI8 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI8, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 8)) (ALL-UNION (MOVE L K 9) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J))) (p L K J))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 8)) (ALL-UNION (MOVE L K 9) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 8)) (ALL-UNION (MOVE L K 9) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 9) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 8)) (ALL-UNION (MOVE L K 9) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.3 0.0 ] LM-RHO8-PRESERVES-UNION-L (PROVE-LEMMA RHO8-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI8 N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI8) (USE (LM-RHO8-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO8-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI8 N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO8-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO9A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI9A N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO9A-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI9A N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI9A, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 9) (PHI9 K (LENGTH L) G)) (ALL-UNION (MOVE L K 10) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J G)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J) G)) (p L K J G))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 9) (PHI9 K (LENGTH L) G)) (ALL-UNION (MOVE L K 10) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 9) (PHI9 K (LENGTH L) G)) (ALL-UNION (MOVE L K 10) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 10) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 9) (PHI9 K (LENGTH L) G)) (ALL-UNION (MOVE L K 10) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.3 0.0 ] LM-RHO9A-PRESERVES-UNION-L (PROVE-LEMMA RHO9A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI9A N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI9A) (USE (LM-RHO9A-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO9A-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI9A N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO9A-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO9B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI9B N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO9B-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI9B N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI9B, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 9) (EQUAL GP G) (NOT (PHI9 K N G)) (EQUAL LP L)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO9B-PRESERVES-UNION-L (PROVE-LEMMA RHO9B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI9B N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI9B) (USE (LM-RHO9B-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO9B-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI9B N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO9B-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO10-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI10 N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO10-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI10 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI10, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 10)) (ALL-UNION (MOVE L K 11) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J))) (p L K J))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 10)) (ALL-UNION (MOVE L K 11) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 10)) (ALL-UNION (MOVE L K 11) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 11) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 10)) (ALL-UNION (MOVE L K 11) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.3 0.0 ] LM-RHO10-PRESERVES-UNION-L (PROVE-LEMMA RHO10-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI10 N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI10) (USE (LM-RHO10-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO10-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI10 N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO10-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO11A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI11A N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO11A-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI11A N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI11A, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 11) (PHI11 K (LENGTH L) G)) (ALL-UNION (MOVE L K 12) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J G)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J) G)) (p L K J G))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 11) (PHI11 K (LENGTH L) G)) (ALL-UNION (MOVE L K 12) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 11) (PHI11 K (LENGTH L) G)) (ALL-UNION (MOVE L K 12) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 12) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 11) (PHI11 K (LENGTH L) G)) (ALL-UNION (MOVE L K 12) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.5 0.1 ] LM-RHO11A-PRESERVES-UNION-L (PROVE-LEMMA RHO11A-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI11A N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI11A) (USE (LM-RHO11A-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO11A-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI11A N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO11A-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO11B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI11B N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO11B-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI11B N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI11B, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 11) (EQUAL GP G) (NOT (PHI11 K N G)) (EQUAL LP L)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO11B-PRESERVES-UNION-L (PROVE-LEMMA RHO11B-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI11B N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI11B) (USE (LM-RHO11B-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO11B-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI11B N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO11B-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO12-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (RHOI12 N K L G LP GP)) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((ENABLE NSET ALL-UNION UNION-AT-N AT))) WARNING: Note that LM-RHO12-PRESERVES-UNION-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI12 N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, RHOI12, AND, and IMPLIES, to: (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (ALL-UNION LP J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, obviously, to: (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 12)) (ALL-UNION (MOVE L K 0) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))), which we will 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 J) (p L K J)) (IMPLIES (AND (NOT (ZEROP J)) (p L K (SUB1 J))) (p L K J))). Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP 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 produces the following three new conjectures: Case 3. (IMPLIES (AND (ZEROP J) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 12)) (ALL-UNION (MOVE L K 0) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding ZEROP, EQUAL, and ALL-UNION, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP J)) (NOT (ALL-UNION L (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12))) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 12)) (ALL-UNION (MOVE L K 0) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, expanding the functions ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP J)) (ALL-UNION (MOVE L K 0) (SUB1 J) '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (LISTP L) (MEMBER K (NSET (LENGTH L))) (ALL-UNION L J '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (EQUAL (NTH L K) 12)) (ALL-UNION (MOVE L K 0) J '(0 1 2 3 4 5 6 7 8 9 10 11 12))). This simplifies, appealing to the lemma MOVE-MEMBER-L, and unfolding ZEROP, ALL-UNION, MEMBER, LISTP, CAR, CDR, and UNION-AT-N, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.2 0.0 ] LM-RHO12-PRESERVES-UNION-L (PROVE-LEMMA RHO12-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI12 N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI12) (USE (LM-RHO12-PRESERVES-UNION-L (J N))))) WARNING: Note that RHO12-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI12 N K L G LP GP). This conjecture simplifies, applying WS-LIST-L, WS-LN-L, and WS-UNION-L, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO12-PRESERVES-UNION-L (PROVE-LEMMA RHO-PRESERVES-UNION-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12))) ((DISABLE RHOI0 RHOI1A RHOI1B RHOI2 RHOI3A RHOI3B RHOI4 RHOI5A RHOI5B RHOI6 RHOI7A RHOI7B RHOI8 RHOI9A RHOI9B RHOI10 RHOI11A RHOI11B RHOI12) (ENABLE RHOI))) WARNING: Note that RHO-PRESERVES-UNION-L contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, appealing to the lemmas RHO0-PRESERVES-UNION-L, RHO1A-PRESERVES-UNION-L, RHO1B-PRESERVES-UNION-L, RHO2-PRESERVES-UNION-L, RHO3A-PRESERVES-UNION-L, RHO3B-PRESERVES-UNION-L, RHO4-PRESERVES-UNION-L, RHO5A-PRESERVES-UNION-L, RHO5B-PRESERVES-UNION-L, RHO6-PRESERVES-UNION-L, RHO7A-PRESERVES-UNION-L, RHO7B-PRESERVES-UNION-L, RHO8-PRESERVES-UNION-L, RHO9A-PRESERVES-UNION-L, RHO9B-PRESERVES-UNION-L, RHO10-PRESERVES-UNION-L, RHO11A-PRESERVES-UNION-L, RHO11B-PRESERVES-UNION-L, and RHO12-PRESERVES-UNION-L, and opening up RHOI, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO-PRESERVES-UNION-L (PROVE-LEMMA LM-RHO-PRESERVES-LN-L (REWRITE) (IMPLIES (AND (LISTP L) (EQUAL (LENGTH L) N) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (EQUAL (LENGTH LP) N)) ((ENABLE RHOI))) WARNING: Note that LM-RHO-PRESERVES-LN-L contains the free variables GP, G, K, N, and L which will be chosen by instantiating the hypotheses (LISTP L), (EQUAL (LENGTH L) N), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, opening up RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, and RHOI, to 14 new goals: Case 14.(IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (EQUAL (LENGTH LP) (LENGTH L))), which again simplifies, appealing to the lemma MOVE-UNCHANGE-LENGTH, to: T. Case 13.(IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (EQUAL (LENGTH LP) (LENGTH L))), which again simplifies, applying the lemma MOVE-UNCHANGE-LENGTH, to: T. Case 12.(IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (EQUAL (LENGTH LP) (LENGTH L))), which again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Case 11.(IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G (LENGTH L) '(3 4)))) (EQUAL (LENGTH LP) (LENGTH L))). But this again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Case 10.(IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (EQUAL (LENGTH LP) (LENGTH L))). But this again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Case 9. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 5) (EQUAL GP G) (EXIST-UNION G (LENGTH L) '(1)) (EQUAL LP (MOVE L K 6))) (EQUAL (LENGTH LP) (LENGTH L))). But this again simplifies, applying MOVE-UNCHANGE-LENGTH, to: T. Case 8. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 5) (EQUAL GP G) (NOT (EXIST-UNION G (LENGTH L) '(1))) (EQUAL LP (MOVE L K 8))) (EQUAL (LENGTH LP) (LENGTH L))). But this again simplifies, applying MOVE-UNCHANGE-LENGTH, to: T. Case 7. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (EQUAL (LENGTH LP) (LENGTH L))). This again simplifies, appealing to the lemma MOVE-UNCHANGE-LENGTH, to: T. Case 6. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 7) (EXIST-UNION G (LENGTH L) '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (EQUAL (LENGTH LP) (LENGTH L))), which again simplifies, applying MOVE-UNCHANGE-LENGTH, to: T. Case 5. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (EQUAL (LENGTH LP) (LENGTH L))). However this again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Case 4. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 9) (EQUAL GP G) (PHI9 K (LENGTH L) G) (EQUAL LP (MOVE L K 10))) (EQUAL (LENGTH LP) (LENGTH L))). However this again simplifies, applying MOVE-UNCHANGE-LENGTH, to: T. Case 3. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (EQUAL (LENGTH LP) (LENGTH L))). But this again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Case 2. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 11) (EQUAL GP G) (PHI11 K (LENGTH L) G) (EQUAL LP (MOVE L K 12))) (EQUAL (LENGTH LP) (LENGTH L))). This again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Case 1. (IMPLIES (AND (LISTP L) (MEMBER K (NSET (LENGTH L))) (AT L K 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (EQUAL (LENGTH LP) (LENGTH L))). This again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LM-RHO-PRESERVES-LN-L (PROVE-LEMMA RHO-PRESERVES-LN-L (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (EQUAL (LENGTH LP) N)) ((USE (LM-RHO-PRESERVES-LN-L)))) WARNING: Note that RHO-PRESERVES-LN-L contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, applying WS-LIST-L and WS-LN-L, and expanding AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO-PRESERVES-LN-L (PROVE-LEMMA LM-RHO-PRESERVES-LN-G (REWRITE) (IMPLIES (AND (LISTP G) (EQUAL (LENGTH G) N) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (EQUAL (LENGTH GP) N)) ((ENABLE RHOI))) WARNING: Note that LM-RHO-PRESERVES-LN-G contains the free variables LP, L, K, N, and G which will be chosen by instantiating the hypotheses (LISTP G), (EQUAL (LENGTH G) N), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, opening up RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, and RHOI, to five new goals: Case 5. (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (AT L K 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (EQUAL (LENGTH GP) (LENGTH G))), which again simplifies, appealing to the lemma MOVE-UNCHANGE-LENGTH, to: T. Case 4. (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (AT L K 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (EQUAL (LENGTH GP) (LENGTH G))), which again simplifies, applying the lemma MOVE-UNCHANGE-LENGTH, to: T. Case 3. (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (AT L K 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (EQUAL (LENGTH GP) (LENGTH G))), which again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Case 2. (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (AT L K 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (EQUAL (LENGTH GP) (LENGTH G))). But this again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Case 1. (IMPLIES (AND (LISTP G) (MEMBER K (NSET (LENGTH G))) (AT L K 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (EQUAL (LENGTH GP) (LENGTH G))). But this again simplifies, rewriting with MOVE-UNCHANGE-LENGTH, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LM-RHO-PRESERVES-LN-G (PROVE-LEMMA RHO-PRESERVES-LN-G (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (EQUAL (LENGTH GP) N)) ((USE (LM-RHO-PRESERVES-LN-G)))) WARNING: Note that RHO-PRESERVES-LN-G contains the free variables LP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, applying WS-LIST-G and WS-LN-G, and expanding AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO-PRESERVES-LN-G (PROVE-LEMMA LM-RHO-PRESERVES-WS (REWRITE) (IMPLIES (AND (NUMBERP N) (LISTP LP) (LISTP GP) (EQUAL (LENGTH LP) N) (EQUAL (LENGTH GP) N) (ALL-UNION LP N '(0 1 2 3 4 5 6 7 8 9 10 11 12)) (ALL-UNION GP N '(0 1 2 3 4))) (WS N LP GP)) ((ENABLE WS))) This simplifies, expanding the function WS, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-RHO-PRESERVES-WS (PROVE-LEMMA RHO-PRESERVES-WS (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP)) (WS N LP GP)) ((USE (LM-RHO-PRESERVES-WS)))) WARNING: Note that RHO-PRESERVES-WS contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This formula simplifies, rewriting with WS-NUM-N, WS-LN-LP, WS-LN-GP, RHO-PRESERVES-LN-L, RHO-PRESERVES-LN-G, RHO-PRESERVES-UNION-L, RHO-PRESERVES-UNION-G, and LM-RHO-PRESERVES-WS, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO-PRESERVES-WS (PROVE-LEMMA N-NEQ-K-RHOI0 (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-RHOI0 (DISABLE N-NEQ-K-RHOI0) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI0-OFF (PROVE-LEMMA N-EQ-K-RHOI0 (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-RHOI0 (DISABLE N-EQ-K-RHOI0) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI0-OFF (PROVE-LEMMA LG-AT-RHOI0 (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-RHOI0 N-EQ-K-RHOI0) (USE (N-NEQ-K-RHOI0)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI0, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI0 (DISABLE LG-AT-RHOI0) [ 0.0 0.0 0.0 ] LG-AT-RHOI0-OFF (PROVE-LEMMA LG-RHOI0 (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-RHOI0 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-RHOI0, 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-RHOI0 (DISABLE LG-RHOI0) [ 0.0 0.0 0.0 ] LG-RHOI0-OFF (PROVE-LEMMA RHOI0-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI0 N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI0))) WARNING: Note that RHOI0-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI0, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI0, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI0-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI1A (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-RHOI1A (DISABLE N-NEQ-K-RHOI1A) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI1A-OFF (PROVE-LEMMA N-EQ-K-RHOI1A (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-RHOI1A (DISABLE N-EQ-K-RHOI1A) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI1A-OFF (PROVE-LEMMA LG-AT-RHOI1A (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-RHOI1A N-EQ-K-RHOI1A) (USE (N-NEQ-K-RHOI1A)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI1A, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI1A (DISABLE LG-AT-RHOI1A) [ 0.0 0.0 0.0 ] LG-AT-RHOI1A-OFF (PROVE-LEMMA LG-RHOI1A (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-RHOI1A 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-RHOI1A, 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-RHOI1A (DISABLE LG-RHOI1A) [ 0.0 0.0 0.0 ] LG-RHOI1A-OFF (PROVE-LEMMA RHOI1A-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI1A N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI1A))) WARNING: Note that RHOI1A-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI1A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI1A, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI1A-PRESERVES-LG (PROVE-LEMMA RHOI1B-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI1B N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE RHOI1B))) WARNING: Note that RHOI1B-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI1B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 1) (EQUAL G GP) (EQUAL LP L) (LG N L G)) (LG N LP GP)). This simplifies, trivially, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI1B-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI2 (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-RHOI2 (DISABLE N-NEQ-K-RHOI2) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI2-OFF (PROVE-LEMMA N-EQ-K-RHOI2 (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-RHOI2 (DISABLE N-EQ-K-RHOI2) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI2-OFF (PROVE-LEMMA LG-AT-RHOI2 (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-RHOI2 N-EQ-K-RHOI2) (USE (N-NEQ-K-RHOI2)))) This conjecture simplifies, appealing to the lemmas NSET-NUMBER and N-EQ-K-RHOI2, and unfolding the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI2 (DISABLE LG-AT-RHOI2) [ 0.0 0.0 0.0 ] LG-AT-RHOI2-OFF (PROVE-LEMMA LG-RHOI2 (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-RHOI2 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-RHOI2, 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-RHOI2 (DISABLE LG-RHOI2) [ 0.0 0.0 0.0 ] LG-RHOI2-OFF (PROVE-LEMMA RHOI2-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI2 N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI2))) WARNING: Note that RHOI2-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI2, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI2, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI2-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI3A (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.1 0.0 ] N-NEQ-K-RHOI3A (DISABLE N-NEQ-K-RHOI3A) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI3A-OFF (PROVE-LEMMA N-EQ-K-RHOI3A (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-RHOI3A (DISABLE N-EQ-K-RHOI3A) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI3A-OFF (PROVE-LEMMA LG-AT-RHOI3A (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-RHOI3A N-EQ-K-RHOI3A) (USE (N-NEQ-K-RHOI3A)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI3A, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI3A (DISABLE LG-AT-RHOI3A) [ 0.0 0.0 0.0 ] LG-AT-RHOI3A-OFF (PROVE-LEMMA LG-RHOI3A (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-RHOI3A 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-RHOI3A, 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-RHOI3A (DISABLE LG-RHOI3A) [ 0.0 0.0 0.0 ] LG-RHOI3A-OFF (PROVE-LEMMA RHOI3A-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI3A N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI3A))) WARNING: Note that RHOI3A-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI3A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4))) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI3A, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI3A-PRESERVES-LG (PROVE-LEMMA RHOI3B-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI3B N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE RHOI3B))) WARNING: Note that RHOI3B-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI3B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 3) (EQUAL GP G) (EQUAL LP L) (EXIST-UNION G N '(3 4)) (LG N L G)) (LG N LP GP)). This simplifies, trivially, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI3B-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI4 (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-RHOI4 (DISABLE N-NEQ-K-RHOI4) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI4-OFF (PROVE-LEMMA N-EQ-K-RHOI4 (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-RHOI4 (DISABLE N-EQ-K-RHOI4) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI4-OFF (PROVE-LEMMA LG-AT-RHOI4 (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-RHOI4 N-EQ-K-RHOI4) (USE (N-NEQ-K-RHOI4)))) This conjecture simplifies, appealing to the lemmas NSET-NUMBER and N-EQ-K-RHOI4, and unfolding the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI4 (DISABLE LG-AT-RHOI4) [ 0.0 0.0 0.0 ] LG-AT-RHOI4-OFF (PROVE-LEMMA LG-RHOI4 (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-RHOI4 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-RHOI4, 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-RHOI4 (DISABLE LG-RHOI4) [ 0.0 0.0 0.0 ] LG-RHOI4-OFF (PROVE-LEMMA RHOI4-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI4 N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI4))) WARNING: Note that RHOI4-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI4, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI4, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI4-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI5A (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-RHOI5A (DISABLE N-NEQ-K-RHOI5A) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI5A-OFF (PROVE-LEMMA N-EQ-K-RHOI5A (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-RHOI5A (DISABLE N-EQ-K-RHOI5A) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI5A-OFF (PROVE-LEMMA LG-AT-RHOI5A (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-RHOI5A N-EQ-K-RHOI5A) (USE (N-NEQ-K-RHOI5A)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI5A, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI5A (DISABLE LG-AT-RHOI5A) [ 0.0 0.0 0.0 ] LG-AT-RHOI5A-OFF (PROVE-LEMMA LG-RHOI5A (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-RHOI5A 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-RHOI5A, 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-RHOI5A (DISABLE LG-RHOI5A) [ 0.0 0.0 0.0 ] LG-RHOI5A-OFF (PROVE-LEMMA RHOI5A-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI5A N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI5A))) WARNING: Note that RHOI5A-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI5A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI5A, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI5A-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI5B (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-RHOI5B (DISABLE N-NEQ-K-RHOI5B) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI5B-OFF (PROVE-LEMMA N-EQ-K-RHOI5B (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-RHOI5B (DISABLE N-EQ-K-RHOI5B) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI5B-OFF (PROVE-LEMMA LG-AT-RHOI5B (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-RHOI5B N-EQ-K-RHOI5B) (USE (N-NEQ-K-RHOI5B)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI5B, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI5B (DISABLE LG-AT-RHOI5B) [ 0.0 0.0 0.0 ] LG-AT-RHOI5B-OFF (PROVE-LEMMA LG-RHOI5B (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-RHOI5B 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-RHOI5B, 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-RHOI5B (DISABLE LG-RHOI5B) [ 0.0 0.0 0.0 ] LG-RHOI5B-OFF (PROVE-LEMMA RHOI5B-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI5B N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI5B))) WARNING: Note that RHOI5B-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI5B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI5B, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI5B-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI6 (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-RHOI6 (DISABLE N-NEQ-K-RHOI6) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI6-OFF (PROVE-LEMMA N-EQ-K-RHOI6 (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-RHOI6 (DISABLE N-EQ-K-RHOI6) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI6-OFF (PROVE-LEMMA LG-AT-RHOI6 (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-RHOI6 N-EQ-K-RHOI6) (USE (N-NEQ-K-RHOI6)))) This conjecture simplifies, appealing to the lemmas NSET-NUMBER and N-EQ-K-RHOI6, and unfolding the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI6 (DISABLE LG-AT-RHOI6) [ 0.0 0.0 0.0 ] LG-AT-RHOI6-OFF (PROVE-LEMMA LG-RHOI6 (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-RHOI6 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-RHOI6, 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-RHOI6 (DISABLE LG-RHOI6) [ 0.0 0.0 0.0 ] LG-RHOI6-OFF (PROVE-LEMMA RHOI6-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI6 N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI6))) WARNING: Note that RHOI6-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI6, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI6, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI6-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI7A (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-RHOI7A (DISABLE N-NEQ-K-RHOI7A) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI7A-OFF (PROVE-LEMMA N-EQ-K-RHOI7A (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-RHOI7A (DISABLE N-EQ-K-RHOI7A) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI7A-OFF (PROVE-LEMMA LG-AT-RHOI7A (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-RHOI7A N-EQ-K-RHOI7A) (USE (N-NEQ-K-RHOI7A)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI7A, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI7A (DISABLE LG-AT-RHOI7A) [ 0.0 0.0 0.0 ] LG-AT-RHOI7A-OFF (PROVE-LEMMA LG-RHOI7A (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-RHOI7A 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-RHOI7A, 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-RHOI7A (DISABLE LG-RHOI7A) [ 0.0 0.0 0.0 ] LG-RHOI7A-OFF (PROVE-LEMMA RHOI7A-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI7A N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI7A))) WARNING: Note that RHOI7A-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI7A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI7A, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI7A-PRESERVES-LG (PROVE-LEMMA RHOI7B-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI7B N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE RHOI7B))) WARNING: Note that RHOI7B-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI7B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 7) (NOT (EXIST-UNION G N '(4))) (EQUAL LP L) (EQUAL GP G) (LG N L G)) (LG N LP GP)). This simplifies, trivially, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI7B-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI8 (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-RHOI8 (DISABLE N-NEQ-K-RHOI8) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI8-OFF (PROVE-LEMMA N-EQ-K-RHOI8 (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-RHOI8 (DISABLE N-EQ-K-RHOI8) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI8-OFF (PROVE-LEMMA LG-AT-RHOI8 (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-RHOI8 N-EQ-K-RHOI8) (USE (N-NEQ-K-RHOI8)))) This conjecture simplifies, appealing to the lemmas NSET-NUMBER and N-EQ-K-RHOI8, and unfolding the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI8 (DISABLE LG-AT-RHOI8) [ 0.0 0.0 0.0 ] LG-AT-RHOI8-OFF (PROVE-LEMMA LG-RHOI8 (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-RHOI8 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-RHOI8, 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-RHOI8 (DISABLE LG-RHOI8) [ 0.0 0.0 0.0 ] LG-RHOI8-OFF (PROVE-LEMMA RHOI8-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI8 N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI8))) WARNING: Note that RHOI8-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI8, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI8, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI8-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI9A (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-RHOI9A (DISABLE N-NEQ-K-RHOI9A) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI9A-OFF (PROVE-LEMMA N-EQ-K-RHOI9A (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-RHOI9A (DISABLE N-EQ-K-RHOI9A) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI9A-OFF (PROVE-LEMMA LG-AT-RHOI9A (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-RHOI9A N-EQ-K-RHOI9A) (USE (N-NEQ-K-RHOI9A)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI9A, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI9A (DISABLE LG-AT-RHOI9A) [ 0.0 0.0 0.0 ] LG-AT-RHOI9A-OFF (PROVE-LEMMA LG-RHOI9A (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-RHOI9A 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-RHOI9A, 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-RHOI9A (DISABLE LG-RHOI9A) [ 0.0 0.0 0.0 ] LG-RHOI9A-OFF (PROVE-LEMMA RHOI9A-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI9A N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI9A))) WARNING: Note that RHOI9A-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI9A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI9A, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI9A-PRESERVES-LG (PROVE-LEMMA RHOI9B-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI9B N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE RHOI9B))) WARNING: Note that RHOI9B-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI9B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 9) (EQUAL GP G) (NOT (PHI9 K N G)) (EQUAL LP L) (LG N L G)) (LG N LP GP)). This simplifies, trivially, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI9B-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI10 (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-RHOI10 (DISABLE N-NEQ-K-RHOI10) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI10-OFF (PROVE-LEMMA N-EQ-K-RHOI10 (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-RHOI10 (DISABLE N-EQ-K-RHOI10) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI10-OFF (PROVE-LEMMA LG-AT-RHOI10 (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-RHOI10 N-EQ-K-RHOI10) (USE (N-NEQ-K-RHOI10)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI10, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI10 (DISABLE LG-AT-RHOI10) [ 0.0 0.0 0.0 ] LG-AT-RHOI10-OFF (PROVE-LEMMA LG-RHOI10 (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-RHOI10 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-RHOI10, 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-RHOI10 (DISABLE LG-RHOI10) [ 0.0 0.0 0.0 ] LG-RHOI10-OFF (PROVE-LEMMA RHOI10-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI10 N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI10))) WARNING: Note that RHOI10-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI10, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI10, to: T. Q.E.D. [ 0.0 0.2 0.0 ] RHOI10-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI11A (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-RHOI11A (DISABLE N-NEQ-K-RHOI11A) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI11A-OFF (PROVE-LEMMA N-EQ-K-RHOI11A (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-RHOI11A (DISABLE N-EQ-K-RHOI11A) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI11A-OFF (PROVE-LEMMA LG-AT-RHOI11A (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-RHOI11A N-EQ-K-RHOI11A) (USE (N-NEQ-K-RHOI11A)))) This conjecture simplifies, applying NSET-NUMBER and N-EQ-K-RHOI11A, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI11A (DISABLE LG-AT-RHOI11A) [ 0.0 0.0 0.0 ] LG-AT-RHOI11A-OFF (PROVE-LEMMA LG-RHOI11A (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-RHOI11A 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-RHOI11A, 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-RHOI11A (DISABLE LG-RHOI11A) [ 0.0 0.0 0.0 ] LG-RHOI11A-OFF (PROVE-LEMMA RHOI11A-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI11A N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI11A))) WARNING: Note that RHOI11A-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI11A, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI11A, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI11A-PRESERVES-LG (PROVE-LEMMA RHOI11B-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI11B N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE RHOI11B))) WARNING: Note that RHOI11B-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI11B, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 11) (EQUAL GP G) (NOT (PHI11 K N G)) (EQUAL LP L) (LG N L G)) (LG N LP GP)). This simplifies, trivially, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI11B-PRESERVES-LG (PROVE-LEMMA N-NEQ-K-RHOI12 (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-RHOI12 (DISABLE N-NEQ-K-RHOI12) [ 0.0 0.0 0.0 ] N-NEQ-K-RHOI12-OFF (PROVE-LEMMA N-EQ-K-RHOI12 (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-RHOI12 (DISABLE N-EQ-K-RHOI12) [ 0.0 0.0 0.0 ] N-EQ-K-RHOI12-OFF (PROVE-LEMMA LG-AT-RHOI12 (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-RHOI12 N-EQ-K-RHOI12) (USE (N-NEQ-K-RHOI12)))) This conjecture simplifies, appealing to the lemmas NSET-NUMBER and N-EQ-K-RHOI12, and unfolding the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LG-AT-RHOI12 (DISABLE LG-AT-RHOI12) [ 0.0 0.0 0.0 ] LG-AT-RHOI12-OFF (PROVE-LEMMA LG-RHOI12 (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-RHOI12 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-RHOI12, 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-RHOI12 (DISABLE LG-RHOI12) [ 0.0 0.0 0.0 ] LG-RHOI12-OFF (PROVE-LEMMA RHOI12-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI12 N K L G LP GP) (LG N L G)) (LG N LP GP)) ((ENABLE LG-RHOI12))) WARNING: Note that RHOI12-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations RHOI12, AND, and IMPLIES, to the formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (AT L K 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0)) (LG N L G)) (LG N LP GP)). This simplifies, applying WS-NUM-N, WS-LN-L, WS-LIST-G, WS-LIST-L, and LG-RHOI12, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHOI12-PRESERVES-LG (PROVE-LEMMA RHO-PRESERVES-LG (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G)) (LG N LP GP)) ((DISABLE RHOI0 RHOI1A RHOI1B RHOI2 RHOI3A RHOI3B RHOI4 RHOI5A RHOI5B RHOI6 RHOI7A RHOI7B RHOI8 RHOI9A RHOI9B RHOI10 RHOI11A RHOI11B RHOI12) (ENABLE RHOI))) WARNING: Note that RHO-PRESERVES-LG contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture simplifies, rewriting with the lemmas RHOI0-PRESERVES-LG, RHOI1A-PRESERVES-LG, RHOI1B-PRESERVES-LG, RHOI2-PRESERVES-LG, RHOI3A-PRESERVES-LG, RHOI3B-PRESERVES-LG, RHOI4-PRESERVES-LG, RHOI5A-PRESERVES-LG, RHOI5B-PRESERVES-LG, RHOI6-PRESERVES-LG, RHOI7A-PRESERVES-LG, RHOI7B-PRESERVES-LG, RHOI8-PRESERVES-LG, RHOI9A-PRESERVES-LG, RHOI9B-PRESERVES-LG, RHOI10-PRESERVES-LG, RHOI11A-PRESERVES-LG, RHOI11B-PRESERVES-LG, and RHOI12-PRESERVES-LG, and unfolding the function RHOI, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO-PRESERVES-LG (DISABLE RHOI0-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI0-PRESERVES-LG-OFF (DISABLE RHOI1A-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI1A-PRESERVES-LG-OFF (DISABLE RHOI1B-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI1B-PRESERVES-LG-OFF (DISABLE RHOI2-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI2-PRESERVES-LG-OFF (DISABLE RHOI3A-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI3A-PRESERVES-LG-OFF (DISABLE RHOI3B-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI3B-PRESERVES-LG-OFF (DISABLE RHOI4-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI4-PRESERVES-LG-OFF (DISABLE RHOI5A-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI5A-PRESERVES-LG-OFF (DISABLE RHOI5B-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI5B-PRESERVES-LG-OFF (DISABLE RHOI6-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI6-PRESERVES-LG-OFF (DISABLE RHOI7A-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI7A-PRESERVES-LG-OFF (DISABLE RHOI7B-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI7B-PRESERVES-LG-OFF (DISABLE RHOI8-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI8-PRESERVES-LG-OFF (DISABLE RHOI9A-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI9A-PRESERVES-LG-OFF (DISABLE RHOI9B-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI9B-PRESERVES-LG-OFF (DISABLE RHOI10-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI10-PRESERVES-LG-OFF (DISABLE RHOI11A-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI11A-PRESERVES-LG-OFF (DISABLE RHOI11B-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI11B-PRESERVES-LG-OFF (DISABLE RHOI12-PRESERVES-LG) [ 0.0 0.0 0.0 ] RHOI12-PRESERVES-LG-OFF (PROVE-LEMMA EXIST-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (NOT (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12))))) (EXIST-UNION L N '(8 9 10 11 12))) ((USE (J-EX-L8-12 (J (EXIST-UNION LP N '(8 9 10 11 12))))))) WARNING: Note that EXIST-L8-12 contains the free variables GP, LP, K, and G which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, applying MEMBER-EX-UNION, EX-LP8-12-IN-LP8-12, and L-SAME-LP, and unfolding the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.2 0.0 ] EXIST-L8-12 (PROVE-LEMMA K-IN-LP8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (NOT (EXIST-UNION L N '(8 9 10 11 12)))) (UNION-AT-N LP K '(8 9 10 11 12))) ((DISABLE MEMBER-EX-UNION) (USE (EXIST-L8-12) (EX-LP8-12-IN-LP8-12)))) WARNING: Note that K-IN-LP8-12 contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and unfolding NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] K-IN-LP8-12 (PROVE-LEMMA K-NOT-IN-L8-12-THEN-L57 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N LP K '(8 9 10 11 12)) (NOT (UNION-AT-N L K '(8 9 10 11 12))) (NOT (AT L K 7))) (AT L K 5)) ((ENABLE RHOI UNION-AT-N AT))) WARNING: Note that K-NOT-IN-L8-12-THEN-L57 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES, AT, and UNION-AT-N, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (MEMBER (NTH LP K) '(8 9 10 11 12)) (NOT (MEMBER (NTH L K) '(8 9 10 11 12))) (NOT (EQUAL (NTH L K) 7))) (EQUAL (NTH L K) 5)). This simplifies, opening up RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, CDR, CAR, LISTP, MEMBER, and EQUAL, to the following 30 new conjectures: Case 30.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 8))). However this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 29.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 9))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 28.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 10))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 27.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 11))). However this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 26.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 25.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 8))). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 24.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 9))). However this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 23.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 10))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 22.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 11))). However this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 21.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 20.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 8))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 19.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 9))). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 18.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 10))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 17.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 11))). However this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 16.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 15.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 8))). This again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 14.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 9))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 13.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 10))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 12.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 11))). But this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 8))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 9))). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 10))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 11))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 12))). But this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 8))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 9))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 10))). But this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 11))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 12))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Q.E.D. [ 0.0 0.2 0.0 ] K-NOT-IN-L8-12-THEN-L57 (PROVE-LEMMA K-IN-L57 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N LP K '(8 9 10 11 12)) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (NOT (AT L K 7))) (AT L K 5)) ((USE (K-NOT-IN-L8-12-THEN-L57)))) WARNING: Note that K-IN-L57 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, J-EX-L8-12, and K-IN-LP8-12, and unfolding NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] K-IN-L57 (PROVE-LEMMA EX-K-IN-L57 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (NOT (AT L K 7))) (AT L K 5)) ((USE (K-IN-L57) (K-IN-LP8-12)))) WARNING: Note that EX-K-IN-L57 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-IN-LP8-12, and K-IN-L57, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] EX-K-IN-L57 (PROVE-LEMMA COND-RHOI5 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N LP K '(8 9 10 11 12)) (AT L K 5)) (NOT (EXIST-UNION G N '(1)))) ((ENABLE RHOI UNION-AT-N AT))) WARNING: Note that COND-RHOI5 contains the free variables GP, LP, K, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, AT, and UNION-AT-N, to the new formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (MEMBER (NTH LP K) '(8 9 10 11 12)) (EQUAL (NTH L K) 5)) (NOT (EXIST-UNION G N '(1)))), which simplifies, expanding RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, EQUAL, AT, RHOI, CDR, CAR, LISTP, and MEMBER, to five new goals: Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL GP G) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 8) (EQUAL (NTH L K) 5)) (NOT (EXIST-UNION G N '(1)))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL GP G) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 9) (EQUAL (NTH L K) 5)) (NOT (EXIST-UNION G N '(1)))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL GP G) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 10) (EQUAL (NTH L K) 5)) (NOT (EXIST-UNION G N '(1)))). But this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL GP G) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 11) (EQUAL (NTH L K) 5)) (NOT (EXIST-UNION G N '(1)))), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL GP G) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 12) (EQUAL (NTH L K) 5)) (NOT (EXIST-UNION G N '(1)))), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Q.E.D. [ 0.0 0.0 0.0 ] COND-RHOI5 (PROVE-LEMMA EX-COND-RHOI5 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (AT L K 5)) (NOT (EXIST-UNION G N '(1)))) ((USE (COND-RHOI5) (K-IN-LP8-12)))) WARNING: Note that EX-COND-RHOI5 contains the free variables GP, LP, K, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, appealing to the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-IN-LP8-12, and COND-RHOI5, and opening up AND, NOT, and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] EX-COND-RHOI5 (PROVE-LEMMA COND-RHOI7 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N LP K '(8 9 10 11 12)) (AT L K 7)) (EXIST-UNION G N '(4))) ((ENABLE RHOI UNION-AT-N AT))) WARNING: Note that COND-RHOI7 contains the free variables GP, LP, K, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations AND, IMPLIES, AT, and UNION-AT-N, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (MEMBER (NTH LP K) '(8 9 10 11 12)) (EQUAL (NTH L K) 7)) (EXIST-UNION G N '(4))), which simplifies, unfolding the functions RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, EQUAL, AT, RHOI, and MEMBER, to: T. Q.E.D. [ 0.0 0.0 0.0 ] COND-RHOI7 (PROVE-LEMMA EX-COND-RHOI7 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (AT L K 7)) (EXIST-UNION G N '(4))) ((USE (COND-RHOI7) (K-IN-LP8-12)))) WARNING: Note that EX-COND-RHOI7 contains the free variables GP, LP, K, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-IN-LP8-12, and COND-RHOI7, and opening up AND, IMPLIES, and NOT, to: T. Q.E.D. [ 0.0 0.1 0.0 ] EX-COND-RHOI7 (PROVE-LEMMA L5-ONLY-LP8 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (LG N L G) (EXIST-UNION LP N '(8 9 10 11 12))) (NOT (EXIST-UNION G N '(1)))) ((DISABLE MEMBER-EX-UNION) (USE (EXIST-L8-12) (EX-K-IN-L57) (EX-COND-RHOI5) (EX-COND-RHOI7) (EX-IF4)))) WARNING: Note that L5-ONLY-LP8 contains the free variables GP, LP, K, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, EXIST-L8-12, EX-IF4, and EX-COND-RHOI5, and expanding NOT, AND, and IMPLIES, to: (IMPLIES (AND (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12))) (AT L K 5) (NOT (AT L K 7)) (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (LG N L G) K) (NOT (EXIST-UNION G N '(1)))), which again simplifies, rewriting with EX-K-IN-L57 and EX-COND-RHOI5, to: T. Q.E.D. [ 0.0 0.3 0.0 ] L5-ONLY-LP8 (PROVE-LEMMA J-NEQ-K-J-NOT-IN-LP4 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (NOT (UNION-AT-N L J '(3 4)))) (NOT (AT LP J 4))) ((USE (LP4-THEN-UN34)))) WARNING: Note that J-NEQ-K-J-NOT-IN-LP4 contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, applying LP-SAME-L-NOT, and expanding the function IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] J-NEQ-K-J-NOT-IN-LP4 (PROVE-LEMMA J-EQ-K-J-NOT-IN-LP4 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (UNION-AT-N L K '(3 4)))) (NOT (AT LP K 4))) ((ENABLE UNION-AT-N RHOI AT))) WARNING: Note that J-EQ-K-J-NOT-IN-LP4 contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES, AT, and UNION-AT-N, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (MEMBER (NTH L K) '(3 4)))) (NOT (EQUAL (NTH LP K) 4))). This simplifies, unfolding the functions RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, MEMBER, and EQUAL, to the following 12 new formulas: Case 12.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 4))). This again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 4))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6))) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8))) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 4))). However this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (NOT (EQUAL (NTH LP K) 4))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10))) (NOT (EQUAL (NTH LP K) 4))). However this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12))) (NOT (EQUAL (NTH LP K) 4))). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 4))). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.0 ] J-EQ-K-J-NOT-IN-LP4 (PROVE-LEMMA LP4-EMPTY (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (UNION-AT-N L J '(3 4)))) (NOT (AT LP J 4))) ((USE (J-NEQ-K-J-NOT-IN-LP4)))) WARNING: Note that LP4-EMPTY contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). WARNING: the newly proposed lemma, LP4-EMPTY, could be applied whenever the previously added lemma J-EQ-K-J-NOT-IN-LP4 could. WARNING: the newly proposed lemma, LP4-EMPTY, could be applied whenever the previously added lemma J-NEQ-K-J-NOT-IN-LP4 could. This conjecture simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, and J-EQ-K-J-NOT-IN-LP4, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LP4-EMPTY (PROVE-LEMMA L8-L12-EMPTY (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (LG N L G)) (A0 N LP J)) ((ENABLE A0) (USE (LP4-EMPTY) (L34-EMPTY) (L5-ONLY-LP8)))) WARNING: Note that L8-L12-EMPTY contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations A0, NOT, IMPLIES, and AND, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (UNION-AT-N L J '(3 4)))) (NOT (AT LP J 4))) (IMPLIES (AND (MEMBER J (NSET N)) (LG N L G) (NOT (EXIST-UNION G N '(1)))) (NOT (UNION-AT-N L J '(3 4)))) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (LG N L G) (EXIST-UNION LP N '(8 9 10 11 12))) (NOT (EXIST-UNION G N '(1)))) (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (LG N L G) (EXIST-UNION LP N '(8 9 10 11 12))) (NOT (AT LP J 4))). This simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, L5-ONLY-LP8, L34-EMPTY, and LP4-EMPTY, and opening up the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] L8-L12-EMPTY (PROVE-LEMMA DWY-LCKD (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION G N '(3 4)) (NOT (AT L K 4))) (NOT (AT LP K 4))) ((ENABLE RHOI AT))) WARNING: Note that DWY-LCKD contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and AT, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION G N '(3 4)) (NOT (EQUAL (NTH L K) 4))) (NOT (EQUAL (NTH LP K) 4))), which simplifies, unfolding the functions RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, and EQUAL, to 12 new formulas: Case 12.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))). This again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))). But this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0)) (EXIST-UNION G N '(3 4))) (NOT (EQUAL (NTH LP K) 4))). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.0 ] DWY-LCKD (PROVE-LEMMA J-EQ-K-L8-L12-NONEMP (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION L N '(8 9 10 11 12)) (A0 N L K) (A1 N L G)) (A0 N LP K)) ((ENABLE A0 A1) (USE (DWY-LCKD) (INT-8-12-3-4-THEN-UN34)))) WARNING: Note that J-EQ-K-L8-L12-NONEMP contains the free variables GP, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations A0, IMPLIES, and AND, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION G N '(3 4)) (NOT (AT L K 4))) (NOT (AT LP K 4))) (IMPLIES (EXIST-INTERSECT-8-12-3-4 N L G) (EXIST-UNION G N '(3 4))) (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION L N '(8 9 10 11 12)) (A0 N L K) (A1 N L G) (EXIST-UNION LP N '(8 9 10 11 12))) (NOT (AT LP K 4))). This simplifies, rewriting with the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and opening up the functions NOT, AND, IMPLIES, A0, and A1, to: T. Q.E.D. [ 0.0 0.1 0.0 ] J-EQ-K-L8-L12-NONEMP (PROVE-LEMMA J-NEQ-K-L8-L12-NONEMP (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (A0 N L J) (EXIST-UNION L N '(8 9 10 11 12))) (A0 N LP J)) ((ENABLE A0 AT))) WARNING: Note that J-NEQ-K-L8-L12-NONEMP contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations AT, A0, NOT, AND, and IMPLIES, to: (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (A0 N L J) (EXIST-UNION L N '(8 9 10 11 12)) (EXIST-UNION LP N '(8 9 10 11 12))) (NOT (EQUAL (NTH LP J) 4))). This simplifies, appealing to the lemma L-SAME-LP-AT, and opening up EQUAL, AT, and A0, to: T. Q.E.D. [ 0.0 0.0 0.0 ] J-NEQ-K-L8-L12-NONEMP (PROVE-LEMMA L8-L12-NONEMP (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION L N '(8 9 10 11 12)) (A0 N L J) (A1 N L G)) (A0 N LP J)) ((USE (J-NEQ-K-L8-L12-NONEMP)))) WARNING: Note that L8-L12-NONEMP contains the free variables GP, K, G, and L which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). WARNING: the newly proposed lemma, L8-L12-NONEMP, could be applied whenever the previously added lemma J-EQ-K-L8-L12-NONEMP could. This formula simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, and J-EQ-K-L8-L12-NONEMP, and unfolding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] L8-L12-NONEMP (PROVE-LEMMA RHO-PRESERVES-A0 NIL (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A0 N L J) (A1 N L G)) (A0 N LP J)) ((USE (L8-L12-NONEMP) (L8-L12-EMPTY)))) This conjecture simplifies, applying the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, and L8-L12-EMPTY, and expanding AND, IMPLIES, and NOT, to: T. Q.E.D. [ 0.0 0.1 0.0 ] RHO-PRESERVES-A0 (PROVE-LEMMA GP-RHOI5 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N LP K '(8 9 10 11 12)) (AT L K 5) (AT G K 3)) (AT GP K 3)) ((ENABLE RHOI UNION-AT-N AT))) WARNING: Note that GP-RHOI5 contains the free variables LP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations AND, IMPLIES, AT, and UNION-AT-N, to the new conjecture: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (MEMBER (NTH LP K) '(8 9 10 11 12)) (EQUAL (NTH L K) 5) (EQUAL (NTH G K) 3)) (EQUAL (NTH GP K) 3)), which simplifies, opening up the definitions of RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, EQUAL, AT, RHOI, CDR, CAR, LISTP, and MEMBER, to: T. Q.E.D. [ 0.0 0.1 0.0 ] GP-RHOI5 (PROVE-LEMMA EX-GP-RHOI5 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (EXIST-UNION LP N '(8 9 10 11 12)) (AT L K 5)) (AT GP K 3)) ((USE (GP-RHOI5) (K-IN-LP8-12) (LG-L5-G3)))) WARNING: Note that EX-GP-RHOI5 contains the free variables LP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-IN-LP8-12, LG-L5-G3, and GP-RHOI5, and opening up the definitions of AND, IMPLIES, and NOT, to: T. Q.E.D. [ 0.0 0.1 0.0 ] EX-GP-RHOI5 (PROVE-LEMMA K-IN-GP34 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (EXIST-UNION LP N '(8 9 10 11 12))) (UNION-AT-N GP K '(3 4))) ((DISABLE MEMBER-EX-UNION) (USE (GP3-THEN-UN34) (EXIST-L8-12) (K-IN-L57) (EX-GP-RHOI5) (EX-COND-RHOI7) (EX-IF4)))) WARNING: Note that K-IN-GP34 contains the free variables LP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula simplifies, appealing to the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-IN-LP8-12, EXIST-L8-12, EX-IF4, and EX-GP-RHOI5, and expanding IMPLIES, NOT, and AND, to: (IMPLIES (AND (NOT (AT GP K 3)) (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12))) (AT L K 5) (NOT (AT L K 7)) (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (NOT (EXIST-UNION L N '(8 9 10 11 12))) K) (UNION-AT-N GP K '(3 4))), which again simplifies, appealing to the lemma EX-GP-RHOI5, to: T. Q.E.D. [ 0.0 0.2 0.0 ] K-IN-GP34 (PROVE-LEMMA LM-A1-EP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (LG N L G)) (EXIST-INTERSECT-8-12-3-4 N LP GP)) ((DISABLE MEMBER-EX-UNION) (USE (EXIST-L8-12)))) WARNING: Note that LM-A1-EP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and opening up the definitions of NOT, AND, and IMPLIES, to: (IMPLIES (AND (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12))) (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) K (NOT (EXIST-UNION L N '(8 9 10 11 12))) (LG N L G)) (EXIST-INTERSECT-8-12-3-4 N LP GP)). This again simplifies, applying UN8-12-AND-UN34-THEN-INT, K-IN-LP8-12, K-IN-GP34, and INT-WTN, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LM-A1-EP-L8-12 (PROVE-LEMMA A1-EP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (NOT (EXIST-UNION L N '(8 9 10 11 12)))) (A1 N LP GP)) ((ENABLE A1))) WARNING: Note that A1-EP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations A1, NOT, AND, and IMPLIES, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (NOT (EXIST-UNION L N '(8 9 10 11 12))) (EXIST-UNION LP N '(8 9 10 11 12))) (EXIST-INTERSECT-8-12-3-4 N LP GP)). This simplifies, applying LM-A1-EP-L8-12, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A1-EP-L8-12 (PROVE-LEMMA INT-K-NOT-EX-INT (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL K (EXIST-INTERSECT-8-12-3-4 N L G))) (EXIST-INTERSECT-8-12-3-4 N L G)) (EXIST-INTERSECT-8-12-3-4 N LP GP)) ((USE (INT-WTN (J (EXIST-INTERSECT-8-12-3-4 N L G)))))) WARNING: Note that INT-K-NOT-EX-INT contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This formula simplifies, appealing to the lemmas MEMBER-INTERSECT, GP-SAME-G, INTERSECT-8-12-3-4-THEN-3-4, LP-SAME-L, INTERSECT-8-12-3-4-THEN-8-12, and UN8-12-AND-UN34-THEN-INT, and opening up the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] INT-K-NOT-EX-INT (PROVE-LEMMA A1-K-NOT-IN-L8-12-NEP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION L N '(8 9 10 11 12)) (NOT (UNION-AT-N L K '(8 9 10 11 12))) (A1 N L G)) (EXIST-INTERSECT-8-12-3-4 N LP GP)) ((ENABLE A1) (USE (INT-K-NOT-EX-INT)))) WARNING: Note that A1-K-NOT-IN-L8-12-NEP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This formula simplifies, rewriting with the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and expanding NOT, AND, IMPLIES, and A1, to: (IMPLIES (AND (EQUAL K (EXIST-INTERSECT-8-12-3-4 N L G)) (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION L N '(8 9 10 11 12)) (NOT (UNION-AT-N L K '(8 9 10 11 12))) K) (EXIST-INTERSECT-8-12-3-4 N LP GP)). However this again simplifies, rewriting with MEMBER-INTERSECT and INTERSECT-8-12-3-4-THEN-8-12, to: T. Q.E.D. [ 0.0 0.2 0.0 ] A1-K-NOT-IN-L8-12-NEP-L8-12 (PROVE-LEMMA L8-11-K-IN-LP9-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N L K '(8 9 10 11))) (UNION-AT-N LP K '(9 10 11 12))) ((ENABLE RHOI UNION-AT-N AT))) WARNING: Note that L8-11-K-IN-LP9-12 contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations AND, IMPLIES, and UNION-AT-N, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (MEMBER (NTH L K) '(8 9 10 11))) (MEMBER (NTH LP K) '(9 10 11 12))). This simplifies, unfolding RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, MEMBER, CDR, CAR, and LISTP, to the following four new goals: Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9)) (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, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10)) (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, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G) (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, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12)) (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 WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.0 ] L8-11-K-IN-LP9-12 (PROVE-LEMMA LM-A1-K-IN-L8-11-NEP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N L K '(8 9 10 11)) (LG N L G)) (AND (UNION-AT-N LP K '(8 9 10 11 12)) (UNION-AT-N GP K '(3 4)))) ((USE (IF4 (J K) (L LP) (G GP))))) WARNING: Note that LM-A1-K-IN-L8-11-NEP-L8-12 contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). WARNING: Note that LM-A1-K-IN-L8-11-NEP-L8-12 contains the free variables LP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). WARNING: Note that the proposed lemma LM-A1-K-IN-L8-11-NEP-L8-12 is to be stored as zero type prescription rules, zero compound recognizer rules, zero linear rules, and two replacement rules. This simplifies, rewriting with the lemmas RHO-PRESERVES-LG, L8-11-K-IN-LP9-12, UN9-12-THEN-UN8-12, and LP4-THEN-UN34, and opening up the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-A1-K-IN-L8-11-NEP-L8-12 (PROVE-LEMMA A1-K-IN-L8-11-NEP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (EXIST-UNION LP N '(8 9 10 11 12)) (UNION-AT-N L K '(8 9 10 11))) (EXIST-INTERSECT-8-12-3-4 N LP GP)) ((USE (UN8-12-AND-UN34-THEN-INT (J K))))) WARNING: Note that A1-K-IN-L8-11-NEP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This formula simplifies, applying LM-A1-K-IN-L8-11-NEP-L8-12, UN8-12-AND-UN34-THEN-INT, J-EX-L8-12, and INT-WTN, and opening up AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A1-K-IN-L8-11-NEP-L8-12 (PROVE-LEMMA K-IN-LP0 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (AT L K 12)) (AT LP K 0)) ((ENABLE RHOI AT))) WARNING: Note that K-IN-LP0 contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations AND, IMPLIES, and AT, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EQUAL (NTH L K) 12)) (EQUAL (NTH LP K) 0)). This simplifies, unfolding the definitions of RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, EQUAL, AT, and RHOI, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0)) (EQUAL (NTH L K) 12)) (EQUAL (NTH LP K) 0)), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Q.E.D. [ 0.0 0.0 0.0 ] K-IN-LP0 (PROVE-LEMMA K-NOT-EX-LP8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (AT L K 12)) (NOT (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12))))) ((USE (EX-LP8-12-NOT-IN-LP0) (K-IN-LP0)))) WARNING: Note that K-NOT-EX-LP8-12 contains the free variables GP, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This simplifies, applying the lemma K-IN-LP0, and expanding the functions NOT and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] K-NOT-EX-LP8-12 (PROVE-LEMMA LP8-K-IN-L57 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (AT LP K 8)) (UNION-AT-N L K '(5 7))) ((ENABLE RHOI UNION-AT-N AT))) WARNING: Note that LP8-K-IN-L57 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations AND, IMPLIES, UNION-AT-N, and AT, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EQUAL (NTH LP K) 8)) (MEMBER (NTH L K) '(5 7))). This simplifies, unfolding the definitions of RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, MEMBER, and EQUAL, to the following 11 new conjectures: Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 8))). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 8))). This again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 8))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 8))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 8))), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 8))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (NOT (EQUAL (NTH LP K) 8))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10))) (NOT (EQUAL (NTH LP K) 8))). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 8))). This again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12))) (NOT (EQUAL (NTH LP K) 8))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 8))). But this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LP8-K-IN-L57 (PROVE-LEMMA K-IN-LP8-THEN-L5-12 (REWRITE) (IMPLIES (AND (WS N L G) (RHOI N K L G LP GP) (MEMBER K (NSET N)) (AT LP K 8)) (UNION-AT-N L K '(5 6 7 8 9 10 11 12))) ((USE (UN57-THEN-UN5-12) (LP8-K-IN-L57)))) WARNING: Note that K-IN-LP8-THEN-L5-12 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This simplifies, rewriting with LP8-K-IN-L57, UN57-THEN-UN5-11, UN5-11-THEN-UN5-12, WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and opening up IMPLIES and AND, to: T. Q.E.D. [ 0.0 0.0 0.0 ] K-IN-LP8-THEN-L5-12 (PROVE-LEMMA LP9-12-K-IN-L8-11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N LP K '(9 10 11 12))) (UNION-AT-N L K '(8 9 10 11))) ((ENABLE RHOI UNION-AT-N AT))) WARNING: Note that LP9-12-K-IN-L8-11 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations AND, IMPLIES, and UNION-AT-N, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (MEMBER (NTH LP K) '(9 10 11 12))) (MEMBER (NTH L K) '(8 9 10 11))). This simplifies, unfolding RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, CDR, CAR, LISTP, and MEMBER, to the following 40 new goals: Case 40.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 9))). This again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 39.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 10))). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 38.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 11))). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 37.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 12))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 36.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 9))), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 35.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 10))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 34.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 11))). This again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 33.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 32.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 9))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 31.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 10))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 30.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 11))). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 29.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 12))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 28.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 9))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 27.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 10))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 26.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 11))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 25.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 24.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 9))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 23.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 10))). This again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 22.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 11))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 21.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 20.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6))) (NOT (EQUAL (NTH LP K) 9))). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 19.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6))) (NOT (EQUAL (NTH LP K) 10))). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 18.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6))) (NOT (EQUAL (NTH LP K) 11))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 17.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6))) (NOT (EQUAL (NTH LP K) 12))). However this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 16.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8))) (NOT (EQUAL (NTH LP K) 9))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 15.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8))) (NOT (EQUAL (NTH LP K) 10))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 14.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8))) (NOT (EQUAL (NTH LP K) 11))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 13.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8))) (NOT (EQUAL (NTH LP K) 12))). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 12.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 9))). But this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 10))), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 11))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 9))). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 10))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 11))). This again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 12))). But this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 9))), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 10))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 11))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.1 ] LP9-12-K-IN-L8-11 (PROVE-LEMMA K-IN-LP9-12-THEN-L5-12 (REWRITE) (IMPLIES (AND (WS N L G) (RHOI N K L G LP GP) (MEMBER K (NSET N)) (UNION-AT-N LP K '(9 10 11 12))) (UNION-AT-N L K '(5 6 7 8 9 10 11 12))) ((USE (UN8-11-THEN-UN5-12)))) WARNING: Note that K-IN-LP9-12-THEN-L5-12 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This simplifies, applying LP9-12-K-IN-L8-11, UN8-11-THEN-UN5-11, and UN5-11-THEN-UN5-12, and expanding the function IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] K-IN-LP9-12-THEN-L5-12 (PROVE-LEMMA K-IN-L5-12 (REWRITE) (IMPLIES (AND (WS N L G) (RHOI N K L G LP GP) (MEMBER K (NSET N)) (UNION-AT-N LP K '(8 9 10 11 12))) (UNION-AT-N L K '(5 6 7 8 9 10 11 12))) ((USE (K-IN-LP9-12-OR-LP8)))) WARNING: Note that K-IN-L5-12 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture simplifies, appealing to the lemmas UN9-12-THEN-UN8-12, K-IN-LP9-12-THEN-L5-12, and K-IN-LP8-THEN-L5-12, and expanding the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] K-IN-L5-12 (PROVE-LEMMA K-NEQ-EX-LP8-12-IN-L5-12 (REWRITE) (IMPLIES (AND (WS N L G) (RHOI N K L G LP GP) (MEMBER K (NSET N)) (EXIST-UNION LP N '(8 9 10 11 12)) (NOT (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12))))) (UNION-AT-N L (EXIST-UNION LP N '(8 9 10 11 12)) '(5 6 7 8 9 10 11 12))) ((USE (UN8-12-THEN-UN5-12 (J (EXIST-UNION LP N '(8 9 10 11 12))))))) WARNING: Note that K-NEQ-EX-LP8-12-IN-L5-12 contains the free variables GP, K, and G which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula simplifies, applying LP-SAME-L, L-SAME-LP, EX-LP8-12-IN-LP8-12, UN8-12-THEN-UN5-12, and MEMBER-EX-UNION, and unfolding the function IMPLIES, to: T. Q.E.D. [ 0.0 0.8 0.0 ] K-NEQ-EX-LP8-12-IN-L5-12 (PROVE-LEMMA EX-LP8-12-THEN-L5-12 (REWRITE) (IMPLIES (AND (WS N L G) (RHOI N K L G LP GP) (MEMBER K (NSET N)) (EXIST-UNION LP N '(8 9 10 11 12))) (UNION-AT-N L (EXIST-UNION LP N '(8 9 10 11 12)) '(5 6 7 8 9 10 11 12))) ((USE (K-NEQ-EX-LP8-12-IN-L5-12)))) WARNING: Note that EX-LP8-12-THEN-L5-12 contains the free variables GP, K, and G which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). WARNING: the newly proposed lemma, EX-LP8-12-THEN-L5-12, could be applied whenever the previously added lemma K-NEQ-EX-LP8-12-IN-L5-12 could. This conjecture simplifies, rewriting with the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and opening up the functions NOT, AND, and IMPLIES, to: (IMPLIES (AND (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12))) (WS N L G) (RHOI N K L G LP GP) (MEMBER K (NSET N)) K) (UNION-AT-N L K '(5 6 7 8 9 10 11 12))), which again simplifies, rewriting with MEMBER-EX-UNION, EX-LP8-12-IN-LP8-12, and K-IN-L5-12, to: T. Q.E.D. [ 0.0 0.8 0.0 ] EX-LP8-12-THEN-L5-12 (PROVE-LEMMA EX-LP8-12-IN-GP4 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (AT L K 12) (A3-AT-N1-N2 K (EXIST-UNION LP N '(8 9 10 11 12)) L G) (NOT (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12)))) (EXIST-UNION LP N '(8 9 10 11 12))) (AT GP (EXIST-UNION LP N '(8 9 10 11 12)) 4)) ((ENABLE A3-AT-N1-N2 AT))) WARNING: Note that EX-LP8-12-IN-GP4 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, and AT, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EQUAL (NTH L K) 12) (A3-AT-N1-N2 K (EXIST-UNION LP N '(8 9 10 11 12)) L G) (NOT (EQUAL K (EXIST-UNION LP N '(8 9 10 11 12)))) (EXIST-UNION LP N '(8 9 10 11 12))) (EQUAL (NTH GP (EXIST-UNION LP N '(8 9 10 11 12))) 4)), which simplifies, rewriting with MEMBER-EX-UNION, G-RHOLEMMA, and EX-LP8-12-THEN-L5-12, and unfolding the definitions of AT, EQUAL, and A3-AT-N1-N2, to: T. Q.E.D. [ 0.0 0.0 0.0 ] EX-LP8-12-IN-GP4 (PROVE-LEMMA LM-A1-K-IN-L12-NEP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (AT L K 12) (A3-AT-N1-N2 K (EXIST-UNION LP N '(8 9 10 11 12)) L G)) (UNION-AT-N GP (EXIST-UNION LP N '(8 9 10 11 12)) '(3 4))) ((USE (K-NOT-EX-LP8-12) (EX-LP8-12-IN-GP4)))) WARNING: Note that LM-A1-K-IN-L12-NEP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This formula simplifies, appealing to the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-NOT-EX-LP8-12, EX-LP8-12-IN-GP4, G-SAME-GP, LP4-THEN-UN34, MEMBER-EX-UNION, and GP-SAME-G, and unfolding AND, NOT, and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LM-A1-K-IN-L12-NEP-L8-12 (PROVE-LEMMA A1-K-IN-L12-NEP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EXIST-UNION LP N '(8 9 10 11 12)) (AT L K 12) (A3-AT-N1-N2 K (EXIST-UNION LP N '(8 9 10 11 12)) L G)) (EXIST-INTERSECT-8-12-3-4 N LP GP)) ((USE (INT-WTN (J (EXIST-UNION LP N '(8 9 10 11 12))))))) WARNING: Note that A1-K-IN-L12-NEP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This simplifies, rewriting with MEMBER-EX-UNION, LM-A1-K-IN-L12-NEP-L8-12, EX-LP8-12-IN-LP8-12, and UN8-12-AND-UN34-THEN-INT, and opening up AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.3 0.0 ] A1-K-IN-L12-NEP-L8-12 (PROVE-LEMMA LM1-A1-NEP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A1 N L G) (A3-AT-N1-N2 K (EXIST-UNION LP N '(8 9 10 11 12)) L G) (EXIST-UNION LP N '(8 9 10 11 12)) (EXIST-UNION L N '(8 9 10 11 12))) (EXIST-INTERSECT-8-12-3-4 N LP GP)) ((USE (CASE-K)))) WARNING: Note that LM1-A1-NEP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This formula simplifies, rewriting with A1-K-NOT-IN-L8-12-NEP-L8-12, LM-A1-K-IN-L8-11-NEP-L8-12, J-EX-L8-12, A1-K-IN-L8-11-NEP-L8-12, K-NOT-EX-LP8-12, EXIST-L8-12, and A1-K-IN-L12-NEP-L8-12, and opening up the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LM1-A1-NEP-L8-12 (PROVE-LEMMA LM-A1-NEP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A1 N L G) (A3 N N L G) (EXIST-UNION L N '(8 9 10 11 12)) (EXIST-UNION LP N '(8 9 10 11 12))) (EXIST-INTERSECT-8-12-3-4 N LP GP)) ((USE (LM1-A1-NEP-L8-12) (A3-EX-A3-AT-N1-N2)))) WARNING: Note that LM-A1-NEP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A3-EX-A3-AT-N1-N2, and LM1-A1-NEP-L8-12, and opening up AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] LM-A1-NEP-L8-12 (PROVE-LEMMA A1-NEP-L8-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A1 N L G) (A3 N N L G) (EXIST-UNION L N '(8 9 10 11 12))) (A1 N LP GP)) ((ENABLE A1))) WARNING: Note that A1-NEP-L8-12 contains the free variables K, G, and L which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This formula can be simplified, using the abbreviations A1, AND, and IMPLIES, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A1 N L G) (A3 N N L G) (EXIST-UNION L N '(8 9 10 11 12)) (EXIST-UNION LP N '(8 9 10 11 12))) (EXIST-INTERSECT-8-12-3-4 N LP GP)), which simplifies, rewriting with LM-A1-NEP-L8-12, and expanding A1, to: T. Q.E.D. [ 0.0 0.2 0.0 ] A1-NEP-L8-12 (PROVE-LEMMA RHO-PRESERVES-A1 NIL (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A1 N L G) (A3 N N L G)) (A1 N LP GP)) ((USE (A1-NEP-L8-12)))) This conjecture simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, and A1-EP-L8-12, and expanding the functions AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] RHO-PRESERVES-A1 (PROVE-LEMMA K-IN-L10-11-OR-PHI9 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N LP K '(10 11 12)) (NOT (UNION-AT-N L K '(10 11)))) (PHI9 K N G)) ((ENABLE RHOI UNION-AT-N AT))) WARNING: Note that K-IN-L10-11-OR-PHI9 contains the free variables GP, LP, and L which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations NOT, AND, IMPLIES, and UNION-AT-N, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (MEMBER (NTH LP K) '(10 11 12)) (NOT (MEMBER (NTH L K) '(10 11)))) (PHI9 K N G)). This simplifies, expanding the definitions of RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, CDR, CAR, LISTP, and MEMBER, to the following 33 new formulas: Case 33.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 32.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)). This again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 31.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 30.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 29.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 28.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 27.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 26.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 25.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 24.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4))) (EQUAL (NTH LP K) 10)) (PHI9 K N G)). But this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 23.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4))) (EQUAL (NTH LP K) 11)) (PHI9 K N G)), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 22.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4))) (EQUAL (NTH LP K) 12)) (PHI9 K N G)). But this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 21.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 20.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 19.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 18.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 17.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 16.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 15.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 14.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 13.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)). This again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 12.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G) (EQUAL (NTH LP K) 10)) (PHI9 K N G)), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G) (EQUAL (NTH LP K) 11)) (PHI9 K N G)), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G) (EQUAL (NTH LP K) 12)) (PHI9 K N G)), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)). However this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0)) (EQUAL (NTH LP K) 10)) (PHI9 K N G)). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0)) (EQUAL (NTH LP K) 11)) (PHI9 K N G)). But this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0)) (EQUAL (NTH LP K) 12)) (PHI9 K N G)), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.1 ] K-IN-L10-11-OR-PHI9 (PROVE-LEMMA PHI9-J-IN-G01 (REWRITE) (IMPLIES (AND (MEMBER J (NSET N)) (LESSP J K) (PHI9 K N G)) (UNION-AT-N G J '(0 1))) ((ENABLE NSET PHI9))) WARNING: Note that PHI9-J-IN-G01 contains the free variables K and N which will be chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LESSP J K). Call the conjecture *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 K N)) (IMPLIES (AND (NOT (ZEROP N)) (p G J K (SUB1 N))) (p G J K 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 conjectures: Case 3. (IMPLIES (AND (ZEROP N) (MEMBER J (NSET N)) (LESSP J K) (PHI9 K N G)) (UNION-AT-N G J '(0 1))). This 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)) (LESSP J K) (PHI9 K N G)) (UNION-AT-N G J '(0 1))). This simplifies, applying CDR-CONS and CAR-CONS, and unfolding the functions ZEROP, NSET, MEMBER, and PHI9, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N) (NOT (MEMBER J (NSET (SUB1 N)))) (EQUAL J N) (LESSP J K) (LISTP G) (NUMBERP K) (EQUAL J 0)) (UNION-AT-N G 0 '(0 1))). This again simplifies, trivially, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP N)) (NOT (PHI9 K (SUB1 N) G)) (MEMBER J (NSET N)) (LESSP J K) (PHI9 K N G)) (UNION-AT-N G J '(0 1))). This simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and expanding the definitions of ZEROP, NSET, MEMBER, and PHI9, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N) (NOT (PHI9 K (SUB1 N) G)) (EQUAL J N) (LESSP J K) (LISTP G) (NUMBERP K) (EQUAL J 0)) (UNION-AT-N G 0 '(0 1))), which again simplifies, clearly, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.0 0.0 ] PHI9-J-IN-G01 (PROVE-LEMMA CASE-K-IN-PHI9 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LESSP J K) (LG N L G) (PHI9 K N G)) (NOT (UNION-AT-N LP J '(5 6 7 8 9 10 11 12)))) ((USE (PHI9-J-IN-G01) (IF1)))) WARNING: Note that CASE-K-IN-PHI9 contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, rewriting with PHI9-J-IN-G01 and L-SAME-LP, and unfolding the functions AND, IMPLIES, and NOT, to: T. Q.E.D. [ 0.0 0.0 0.0 ] CASE-K-IN-PHI9 (PROVE-LEMMA CASE-K-IN-L10-11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (A2-AT-N1-N2 K J L) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11))) (NOT (UNION-AT-N LP J '(5 6 7 8 9 10 11 12)))) ((ENABLE A2-AT-N1-N2) (USE (UN10-11-THEN-UN10-12)))) WARNING: Note that CASE-K-IN-L10-11 contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula simplifies, appealing to the lemmas UN10-11-THEN-UN10-12 and L-SAME-LP, and opening up IMPLIES and A2-AT-N1-N2, to: T. Q.E.D. [ 0.0 0.0 0.0 ] CASE-K-IN-L10-11 (PROVE-LEMMA LM1-I-EQ-K-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LESSP J K) (LG N L G) (A2-AT-N1-N2 K J L) (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-PHI9)))) WARNING: Note that LM1-I-EQ-K-J-NEQ-K contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, CASE-K-IN-L10-11, and CASE-K-IN-PHI9, and expanding NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM1-I-EQ-K-J-NEQ-K (PROVE-LEMMA LM-I-EQ-K-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LESSP J K) (LG N L G) (A2-AT-N1-N2 K J L)) (A2-AT-N1-N2 K J LP)) ((ENABLE A2-AT-N1-N2))) WARNING: Note that LM-I-EQ-K-J-NEQ-K contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations A2-AT-N1-N2, NOT, AND, and IMPLIES, to: (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LESSP J K) (LG N L G) (A2-AT-N1-N2 K J L) (UNION-AT-N LP K '(10 11 12))) (NOT (UNION-AT-N LP J '(5 6 7 8 9 10 11 12)))), which simplifies, rewriting with L-SAME-LP and LM1-I-EQ-K-J-NEQ-K, and expanding A2-AT-N1-N2, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-I-EQ-K-J-NEQ-K (PROVE-LEMMA I-EQ-K-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LESSP J K) (LG N L G) (A2 N N L)) (A2-AT-N1-N2 K J LP)) ((USE (LM-I-EQ-K-J-NEQ-K)))) WARNING: Note that I-EQ-K-J-NEQ-K contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A2-I-J-A2-AT-N1-N2, and LM-I-EQ-K-J-NEQ-K, and expanding the definitions of NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] I-EQ-K-J-NEQ-K (PROVE-LEMMA K-IN-LP5-7-NOT-L4-THEN-L5-7 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (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 RHOI))) WARNING: Note that K-IN-LP5-7-NOT-L4-THEN-L5-7 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations NOT, AND, IMPLIES, UNION-AT-N, and AT, to the new formula: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL (NTH L K) 4)) (MEMBER (NTH LP K) '(5 6 7))) (MEMBER (NTH L K) '(5 6 7))), which simplifies, expanding RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, EQUAL, CDR, CAR, LISTP, and MEMBER, to 27 new goals: Case 27.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 5))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 26.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 6))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 25.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 7))). But this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 24.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 5))), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 23.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 6))), which again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 22.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 7))), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 21.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 5))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 20.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 6))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 19.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 7))), which again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 18.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 5))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 17.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 6))). This again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 16.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 7))). However this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 15.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (NOT (EQUAL (NTH LP K) 5))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 14.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (NOT (EQUAL (NTH LP K) 6))). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 13.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (NOT (EQUAL (NTH LP K) 7))). However this again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 12.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10))) (NOT (EQUAL (NTH LP K) 5))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10))) (NOT (EQUAL (NTH LP K) 6))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10))) (NOT (EQUAL (NTH LP K) 7))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 5))). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 6))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 7))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12))) (NOT (EQUAL (NTH LP K) 5))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12))) (NOT (EQUAL (NTH LP K) 6))). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12))) (NOT (EQUAL (NTH LP K) 7))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 5))). But this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 6))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 7))). This again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Q.E.D. [ 0.0 0.2 0.0 ] K-IN-LP5-7-NOT-L4-THEN-L5-7 (PROVE-LEMMA K-IN-LP5-7-THEN-L5-11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (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 (K-IN-LP5-7-NOT-L4-THEN-L5-7)))) WARNING: Note that K-IN-LP5-7-THEN-L5-11 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-IN-LP5-7-NOT-L4-THEN-L5-7, and UN5-7-THEN-UN5-11, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] K-IN-LP5-7-THEN-L5-11 (PROVE-LEMMA K-IN-LP8-THEN-L5-11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (AT LP K 8)) (UNION-AT-N L K '(5 6 7 8 9 10 11))) ((USE (UN57-THEN-UN5-11) (LP8-K-IN-L57)))) WARNING: Note that K-IN-LP8-THEN-L5-11 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture simplifies, applying LP8-K-IN-L57, UN57-THEN-UN5-11, WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and expanding the functions IMPLIES and AND, to: T. Q.E.D. [ 0.0 0.0 0.0 ] K-IN-LP8-THEN-L5-11 (PROVE-LEMMA K-IN-LP9-12-THEN-L5-11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N LP K '(9 10 11 12))) (UNION-AT-N L K '(5 6 7 8 9 10 11))) ((USE (LP9-12-K-IN-L8-11) (UN8-11-THEN-UN5-11)))) WARNING: Note that K-IN-LP9-12-THEN-L5-11 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula simplifies, appealing to the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, LP9-12-K-IN-L8-11, L8-11-K-IN-LP9-12, and UN8-11-THEN-UN5-11, and unfolding the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.1 0.0 ] K-IN-LP9-12-THEN-L5-11 (PROVE-LEMMA K-IN-L5-11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (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 K-IN-L5-11 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This simplifies, rewriting with UN5-7-THEN-UN5-11, UN5-11-THEN-UN5-12, K-IN-LP5-7-THEN-L5-11, K-IN-LP8-THEN-L5-11, UN9-12-THEN-UN8-12, UN8-12-THEN-UN5-12, and K-IN-LP9-12-THEN-L5-11, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.2 0.0 ] K-IN-L5-11 (PROVE-LEMMA K-NOT-IN-L4 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (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) (K-IN-L5-11)))) WARNING: Note that K-NOT-IN-L4 contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula simplifies, rewriting with K-IN-L5-11, UN5-11-THEN-UN5-12, WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and expanding the definitions of IMPLIES, NOT, and AND, to: T. Q.E.D. [ 0.0 0.1 0.0 ] K-NOT-IN-L4 (PROVE-LEMMA K-NOT-IN-LP5-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (A0 N L K) (UNION-AT-N L I '(10 11 12)) (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)))) ((ENABLE A0) (USE (UN10-12-THEN-UN8-12) (K-NOT-IN-L4)))) WARNING: Note that K-NOT-IN-LP5-12 contains the free variables GP, I, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER I (NSET N)), and (RHOI N K L G LP GP). This formula simplifies, rewriting with UN10-12-THEN-UN8-12, WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, and I-NOT-L10-12, and unfolding IMPLIES, NOT, AND, and A0, to: T. Q.E.D. [ 0.0 0.2 0.0 ] K-NOT-IN-LP5-12 (PROVE-LEMMA LM1-I-NEQ-K-J-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LESSP K I) (A0 N L K) (A2-AT-N1-N2 I K L) (UNION-AT-N LP I '(10 11 12))) (NOT (UNION-AT-N LP K '(5 6 7 8 9 10 11 12)))) ((ENABLE A2-AT-N1-N2) (USE (K-NOT-IN-LP5-12)))) WARNING: Note that LM1-I-NEQ-K-J-EQ-K contains the free variables GP, I, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER I (NSET N)), and (RHOI N K L G LP GP). This simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, and L-SAME-LP, and expanding the definitions of NOT, AND, IMPLIES, and A2-AT-N1-N2, to: T. Q.E.D. [ 0.0 0.4 0.0 ] LM1-I-NEQ-K-J-EQ-K (PROVE-LEMMA LM-I-NEQ-K-J-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LESSP K I) (A0 N L K) (A2-AT-N1-N2 I K L)) (A2-AT-N1-N2 I K LP)) ((ENABLE A2-AT-N1-N2) (USE (LM1-I-NEQ-K-J-EQ-K)))) WARNING: Note that LM-I-NEQ-K-J-EQ-K contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations A2-AT-N1-N2, NOT, AND, and IMPLIES, to the formula: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LESSP K I) (A0 N L K) (A2-AT-N1-N2 I K L) (UNION-AT-N LP I '(10 11 12))) (NOT (UNION-AT-N LP K '(5 6 7 8 9 10 11 12)))) (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LESSP K I) (A0 N L K) (A2-AT-N1-N2 I K L) (UNION-AT-N LP I '(10 11 12))) (NOT (UNION-AT-N LP K '(5 6 7 8 9 10 11 12)))). This simplifies, applying the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, L-SAME-LP, and LP-SAME-L, and unfolding NOT, A2-AT-N1-N2, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.4 0.0 ] LM-I-NEQ-K-J-EQ-K (PROVE-LEMMA I-NEQ-K-J-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (MEMBER I (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LESSP K I) (A0 N L K) (A2 N N L)) (A2-AT-N1-N2 I K LP)) ((USE (LM-I-NEQ-K-J-EQ-K)))) WARNING: Note that I-NEQ-K-J-EQ-K contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A2-I-J-A2-AT-N1-N2, and LM-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 ] I-NEQ-K-J-EQ-K (PROVE-LEMMA LM-I-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (NOT (EQUAL J K)) (LESSP J I) (A2-AT-N1-N2 I J L)) (A2-AT-N1-N2 I J LP)) ((ENABLE A2-AT-N1-N2))) WARNING: Note that LM-I-J-NEQ-K contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations A2-AT-N1-N2, NOT, AND, and IMPLIES, to: (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (NOT (EQUAL J K)) (LESSP J I) (A2-AT-N1-N2 I J L) (UNION-AT-N LP I '(10 11 12))) (NOT (UNION-AT-N LP J '(5 6 7 8 9 10 11 12)))). This simplifies, rewriting with L-SAME-LP, and expanding the function A2-AT-N1-N2, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-I-J-NEQ-K (PROVE-LEMMA I-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (NOT (EQUAL J K)) (LESSP J I) (A2 N N L)) (A2-AT-N1-N2 I J LP)) ((USE (LM-I-J-NEQ-K)))) WARNING: Note that I-J-NEQ-K contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This formula simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A2-I-J-A2-AT-N1-N2, and LM-I-J-NEQ-K, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] I-J-NEQ-K (PROVE-LEMMA I-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LESSP J I) (A0 N L K) (A2 N N L)) (A2-AT-N1-N2 I J LP)) ((USE (I-J-NEQ-K) (I-NEQ-K-J-EQ-K)))) WARNING: Note that I-NEQ-K contains the free variables GP, K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). WARNING: the newly proposed lemma, I-NEQ-K, could be applied whenever the previously added lemma I-NEQ-K-J-EQ-K could. This simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] I-NEQ-K (PROVE-LEMMA I-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LESSP J K) (LG N L G) (A2 N N L)) (A2-AT-N1-N2 K J LP)) ((USE (I-EQ-K-J-NEQ-K)))) WARNING: Note that I-EQ-K contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). WARNING: the newly proposed lemma, I-EQ-K, could be applied whenever the previously added lemma I-EQ-K-J-NEQ-K could. This conjecture simplifies, appealing to the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and unfolding the definitions of NOT, AND, and IMPLIES, to: (IMPLIES (AND (EQUAL J K) (WS N L G) (MEMBER J (NSET N)) (RHOI N J L G LP GP) (LESSP J J) (LG N L G) (A2 N N L)) (A2-AT-N1-N2 J J LP)). This again simplifies, using linear arithmetic, to: T. Q.E.D. [ 0.0 0.0 0.0 ] I-EQ-K (PROVE-LEMMA RHO-PRESERVES-A2 NIL (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (RHOI N K L G LP GP) (LESSP J I) (LG N L G) (A0 N L K) (A2 N N L)) (A2-AT-N1-N2 I J LP)) ((USE (I-NEQ-K) (I-EQ-K)))) This conjecture simplifies, appealing to the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and unfolding NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO-PRESERVES-A2 (PROVE-LEMMA LM-K-IN-L9-11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A0 N L K) (A3-AT-N1-N2 I K L G) (AT L I 12) (UNION-AT-N L K '(5 6 7 8 9 10 11))) (UNION-AT-N L K '(9 10 11))) ((ENABLE A3-AT-N1-N2) (USE (UN5-11-THEN-UN5-12)))) WARNING: Note that LM-K-IN-L9-11 contains the free variables GP, LP, I, G, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER I (NSET N)), and (RHOI N K L G LP GP). This conjecture simplifies, rewriting with UN5-11-THEN-UN5-12 and K-IN-L5-11-G4-THEN-L9-11, and opening up the definitions of IMPLIES and A3-AT-N1-N2, to: T. Q.E.D. [ 0.0 0.2 0.0 ] LM-K-IN-L9-11 (PROVE-LEMMA K-IN-L9-11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A0 N L K) (A3-AT-N1-N2 I K L G) (AT L I 12) (UNION-AT-N LP K '(5 6 7 8 9 10 11 12))) (UNION-AT-N L K '(9 10 11))) ((ENABLE A0) (USE (LM-K-IN-L9-11) (L12-THEN-UN8-12) (K-IN-L5-11)))) WARNING: Note that K-IN-L9-11 contains the free variables GP, LP, I, G, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER I (NSET N)), and (RHOI N K L G LP GP). This simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, IF4, L12-THEN-UN9-12, B1A-IF4, and I-NOT-IN-L12, and unfolding the functions A0, AND, IMPLIES, and NOT, to: T. Q.E.D. [ 0.0 0.4 0.0 ] K-IN-L9-11 (PROVE-LEMMA K-IN-LP9-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (UNION-AT-N L K '(9 10 11))) (UNION-AT-N LP K '(9 10 11 12))) ((ENABLE UNION-AT-N AT RHOI))) WARNING: Note that K-IN-LP9-12 contains the free variables GP, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This formula can be simplified, using the abbreviations AND, IMPLIES, and UNION-AT-N, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (MEMBER (NTH L K) '(9 10 11))) (MEMBER (NTH LP K) '(9 10 11 12))), which simplifies, opening up RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, MEMBER, CDR, CAR, and LISTP, to three new goals: Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10)) (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 the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G) (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 WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 11) (EQUAL GP G) (PHI11 K N G) (EQUAL LP (MOVE L K 12)) (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 WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.0 ] K-IN-LP9-12 (PROVE-LEMMA LM1-A3-I-NEQ-K-J-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LG N L G) (LG N LP GP) (A0 N L K) (A3-AT-N1-N2 I K L G) (AT L I 12) (UNION-AT-N LP K '(5 6 7 8 9 10 11 12))) (AT GP K 4)) ((DISABLE RHO-PRESERVES-LG) (USE (K-IN-L9-11) (K-IN-LP9-12)))) WARNING: Note that LM1-A3-I-NEQ-K-J-EQ-K contains the free variables LP, I, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER I (NSET N)), and (RHOI N K L G LP GP). This formula simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-IN-LP9-12, UN9-12-THEN-UN8-12, UN8-12-THEN-UN5-12, and IF4, and opening up the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.6 0.0 ] LM1-A3-I-NEQ-K-J-EQ-K (PROVE-LEMMA LM-A3-I-NEQ-K-J-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LG N L G) (A0 N L K) (A3-AT-N1-N2 I K L G)) (A3-AT-N1-N2 I K LP GP)) ((ENABLE A3-AT-N1-N2) (USE (LM1-A3-I-NEQ-K-J-EQ-K)))) WARNING: Note that LM-A3-I-NEQ-K-J-EQ-K contains the free variables G, L, and N which will be chosen by instantiating the hypothesis (WS N L G). This conjecture can be simplified, using the abbreviations A3-AT-N1-N2, NOT, AND, and IMPLIES, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LG N L G) (LG N LP GP) (A0 N L K) (A3-AT-N1-N2 I K L G) (AT L I 12) (UNION-AT-N LP K '(5 6 7 8 9 10 11 12))) (AT GP K 4)) (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (LG N L G) (A0 N L K) (A3-AT-N1-N2 I K L G) (AT LP I 12) (UNION-AT-N LP K '(5 6 7 8 9 10 11 12))) (AT GP K 4)). This simplifies, appealing to the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, RHO-PRESERVES-LG, and L-SAME-LP-AT, and expanding NOT, A3-AT-N1-N2, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.4 0.0 ] LM-A3-I-NEQ-K-J-EQ-K (PROVE-LEMMA A3-I-NEQ-K-J-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A0 N L K) (A3 N N L G) (NOT (EQUAL I K))) (A3-AT-N1-N2 I K LP GP)) ((USE (LM-A3-I-NEQ-K-J-EQ-K)))) WARNING: Note that A3-I-NEQ-K-J-EQ-K contains the free variables G, L, and N which will be chosen by instantiating the hypothesis (WS N L G). This formula simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A3-I-J-A3-AT-N1-N2, and LM-A3-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 ] A3-I-NEQ-K-J-EQ-K (PROVE-LEMMA COND-RHOI11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (AT LP K 12)) (PHI11 K N G)) ((ENABLE RHOI AT))) WARNING: Note that COND-RHOI11 contains the free variables GP, LP, and L which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations AND, IMPLIES, and AT, to the conjecture: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). This simplifies, unfolding the functions RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, and EQUAL, to the following 13 new formulas: Case 13.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). However this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 12.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4))) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). However this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). But this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). This again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the function EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0)) (EQUAL (NTH LP K) 12)) (PHI11 K N G)). This again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.0 ] COND-RHOI11 (PROVE-LEMMA K-LT-J (REWRITE) (IMPLIES (AND (MEMBER J (NSET N)) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K N L))) ((ENABLE NSET A2-AT-N2 A2-AT-N1-N2))) WARNING: Note that K-LT-J contains the free variable J which will be chosen by instantiating the hypothesis (MEMBER J (NSET N)). Give the conjecture the 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 K N L J)) (IMPLIES (AND (NOT (ZEROP N)) (NOT (LESSP N K)) (p K (SUB1 N) L J)) (p K N L J)) (IMPLIES (AND (NOT (ZEROP N)) (LESSP N K) (p K (SUB1 N) L J)) (p K N L 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 five new goals: Case 5. (IMPLIES (AND (ZEROP N) (MEMBER J (NSET N)) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K N L))). This simplifies, opening up the functions ZEROP, NSET, LISTP, and MEMBER, to: T. Case 4. (IMPLIES (AND (NOT (ZEROP N)) (NOT (LESSP N K)) (NOT (MEMBER J (NSET (SUB1 N)))) (MEMBER J (NSET N)) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K N L))). This simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the functions ZEROP, NSET, and MEMBER, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N) (NOT (LESSP N K)) (NOT (MEMBER J (NSET (SUB1 N)))) (EQUAL J N) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K J L))). However this again simplifies, using linear arithmetic, to: (IMPLIES (AND (NOT (NUMBERP K)) (NOT (EQUAL N 0)) (NUMBERP N) (NOT (LESSP N K)) (NOT (MEMBER N (NSET (SUB1 N)))) (NOT (EQUAL N K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L N '(5 6 7 8 9 10 11 12)) (NOT (LESSP K N))) (NOT (A2-AT-N2 K N L))). However this again simplifies, opening up the definition of LESSP, to: T. Case 3. (IMPLIES (AND (NOT (ZEROP N)) (NOT (LESSP N K)) (NOT (A2-AT-N2 K (SUB1 N) L)) (MEMBER J (NSET N)) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K N L))), which simplifies, applying CDR-CONS and CAR-CONS, and opening up the definitions of ZEROP, NSET, MEMBER, and A2-AT-N2, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N) (NOT (LESSP N K)) (NOT (A2-AT-N2 K (SUB1 N) L)) (EQUAL J N) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K J L))), which again simplifies, using linear arithmetic, to: (IMPLIES (AND (NOT (NUMBERP K)) (NOT (EQUAL N 0)) (NUMBERP N) (NOT (LESSP N K)) (NOT (A2-AT-N2 K (SUB1 N) L)) (NOT (EQUAL N K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L N '(5 6 7 8 9 10 11 12)) (NOT (LESSP K N))) (NOT (A2-AT-N2 K N L))). However this again simplifies, unfolding LESSP, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP N)) (LESSP N K) (NOT (MEMBER J (NSET (SUB1 N)))) (MEMBER J (NSET N)) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K N L))), which simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and unfolding the definitions of ZEROP, NSET, and MEMBER, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N) (LESSP N K) (NOT (MEMBER J (NSET (SUB1 N)))) (EQUAL J N) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K J L))). This again simplifies, opening up the definitions of A2-AT-N2 and A2-AT-N1-N2, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP N)) (LESSP N K) (NOT (A2-AT-N2 K (SUB1 N) L)) (MEMBER J (NSET N)) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K N L))), which simplifies, appealing to the lemmas CDR-CONS and CAR-CONS, and unfolding ZEROP, NSET, MEMBER, A2-AT-N2, and A2-AT-N1-N2, to the conjecture: (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N) (LESSP N K) (NOT (A2-AT-N2 K (SUB1 N) L)) (EQUAL J N) (NOT (EQUAL J K)) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12)) (NOT (LESSP K J))) (NOT (A2-AT-N2 K J L))). But this again simplifies, opening up A2-AT-N2 and A2-AT-N1-N2, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.4 0.0 ] K-LT-J (PROVE-LEMMA PHI11-J-NOT-IN-G23 (REWRITE) (IMPLIES (AND (MEMBER J (NSET N)) (LESSP K J) (PHI11 K N G)) (NOT (UNION-AT-N G J '(2 3)))) ((ENABLE NSET PHI11))) WARNING: Note that PHI11-J-NOT-IN-G23 contains the free variables K and N which will be chosen by instantiating the hypotheses (MEMBER J (NSET N)) and (LESSP K J). Give the conjecture 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 G J K N)) (IMPLIES (AND (NOT (ZEROP N)) (p G J K (SUB1 N))) (p G J K N))). 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 three new conjectures: Case 3. (IMPLIES (AND (ZEROP N) (MEMBER J (NSET N)) (LESSP K J) (PHI11 K N G)) (NOT (UNION-AT-N G J '(2 3)))), which simplifies, unfolding the definitions of ZEROP, NSET, LISTP, and MEMBER, to: T. Case 2. (IMPLIES (AND (NOT (ZEROP N)) (NOT (MEMBER J (NSET (SUB1 N)))) (MEMBER J (NSET N)) (LESSP K J) (PHI11 K N G)) (NOT (UNION-AT-N G J '(2 3)))), which simplifies, rewriting with CDR-CONS and CAR-CONS, and expanding the definitions of ZEROP, NSET, MEMBER, and PHI11, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N) (NOT (MEMBER J (NSET (SUB1 N)))) (EQUAL J N) (LESSP K J) (LISTP G) (NUMBERP K) (EQUAL J 0)) (NOT (UNION-AT-N G 0 '(2 3)))), which again simplifies, obviously, to: T. Case 1. (IMPLIES (AND (NOT (ZEROP N)) (NOT (PHI11 K (SUB1 N) G)) (MEMBER J (NSET N)) (LESSP K J) (PHI11 K N G)) (NOT (UNION-AT-N G J '(2 3)))). This simplifies, rewriting with CDR-CONS and CAR-CONS, and opening up the functions ZEROP, NSET, MEMBER, and PHI11, to: (IMPLIES (AND (NOT (EQUAL N 0)) (NUMBERP N) (NOT (PHI11 K (SUB1 N) G)) (EQUAL J N) (LESSP K J) (LISTP G) (NUMBERP K) (EQUAL J 0)) (NOT (UNION-AT-N G 0 '(2 3)))). This again simplifies, clearly, to: T. That finishes the proof of *1. Q.E.D. [ 0.0 0.0 0.0 ] PHI11-J-NOT-IN-G23 (PROVE-LEMMA LM1-J-NOT-IN-G23 (REWRITE) (IMPLIES (AND (MEMBER J (NSET N)) (NOT (EQUAL J K)) (A2-AT-N2 K N L) (PHI11 K N G) (UNION-AT-N L K '(10 11 12)) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (NOT (UNION-AT-N G J '(2 3)))) ((USE (K-LT-J) (PHI11-J-NOT-IN-G23)))) WARNING: Note that LM1-J-NOT-IN-G23 contains the free variables L, K, and N which will be chosen by instantiating the hypotheses (MEMBER J (NSET N)), (NOT (EQUAL J K)), and (A2-AT-N2 K N L). This simplifies, applying PHI11-J-NOT-IN-G23, and opening up the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM1-J-NOT-IN-G23 (PROVE-LEMMA LM2-J-NOT-IN-G23 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (A2-AT-N2 K N L) (AT LP K 12) (AT L K 11) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (NOT (UNION-AT-N G J '(2 3)))) ((USE (COND-RHOI11) (LM1-J-NOT-IN-G23) (L11-THEN-UN10-12)))) WARNING: Note that LM2-J-NOT-IN-G23 contains the free variables GP, LP, K, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, rewriting with the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, COND-RHOI11, L11-THEN-UN10-12, LP-SAME-L, L-SAME-LP, and LM1-J-NOT-IN-G23, and opening up AND, IMPLIES, and NOT, to: T. Q.E.D. [ 0.0 0.6 0.0 ] LM2-J-NOT-IN-G23 (PROVE-LEMMA J-NOT-IN-G23 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (A2 N N L) (AT L K 11) (AT LP K 12) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (NOT (UNION-AT-N G J '(2 3)))) ((USE (LM2-J-NOT-IN-G23) (A2-N-A2-AT-N2)))) WARNING: Note that J-NOT-IN-G23 contains the free variables GP, LP, K, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A2-N-A2-AT-N2, LP-SAME-L, L-SAME-LP, and LM2-J-NOT-IN-G23, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.6 0.0 ] J-NOT-IN-G23 (PROVE-LEMMA J-IN-G4 (REWRITE) (IMPLIES (AND (MEMBER J (NSET N)) (LG N L G) (NOT (UNION-AT-N G J '(2 3))) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (AT G J 4)) ((ENABLE AT) (USE (IF4) (L5-12-EQ-L5-8-OR-L9-12) (IF3)))) WARNING: Note that J-IN-G4 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 formula can be simplified, using the abbreviations NOT, IMPLIES, AND, and AT, to the new goal: (IMPLIES (AND (IMPLIES (AND (MEMBER J (NSET N)) (LG N L G) (UNION-AT-N L J '(9 10 11 12))) (EQUAL (NTH G J) 4)) (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))) (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)))) (MEMBER J (NSET N)) (LG N L G) (NOT (UNION-AT-N G J '(2 3))) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (EQUAL (NTH G J) 4)), which simplifies, applying IF3 and L5-12-EQ-L5-8-OR-L9-12, and opening up the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] J-IN-G4 (PROVE-LEMMA A3-J-IN-L5-12 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LG N L G) (A2 N N L) (AT L K 11) (AT LP K 12) (UNION-AT-N L J '(5 6 7 8 9 10 11 12))) (AT G J 4)) ((USE (J-NOT-IN-G23) (J-IN-G4)))) WARNING: Note that A3-J-IN-L5-12 contains the free variables GP, LP, K, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, applying the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, LP-SAME-L, L-SAME-LP, J-NOT-IN-G23, and J-IN-G4, and expanding NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.6 0.0 ] A3-J-IN-L5-12 (PROVE-LEMMA K-IN-L11 (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (AT LP K 12)) (AT L K 11)) ((ENABLE RHOI AT))) WARNING: Note that K-IN-L11 contains the free variables GP, LP, G, and N which will be chosen by instantiating the hypotheses (WS N L G) and (RHOI N K L G LP GP). This conjecture can be simplified, using the abbreviations AND, IMPLIES, and AT, to: (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (EQUAL (NTH LP K) 12)) (EQUAL (NTH L K) 11)). This simplifies, unfolding the definitions of RHOI12, RHOI11B, RHOI11A, RHOI10, RHOI9B, RHOI9A, RHOI8, RHOI7B, RHOI7A, RHOI6, RHOI5B, RHOI5A, RHOI4, RHOI3B, RHOI3A, RHOI2, RHOI1B, RHOI1A, RHOI0, AT, RHOI, and EQUAL, to the following 13 new conjectures: Case 13.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 0) (EQUAL GP G) (EQUAL LP (MOVE L K 1))) (NOT (EQUAL (NTH LP K) 12))). However this again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up EQUAL, to: T. Case 12.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 1) (EQUAL GP G) (EQUAL LP (MOVE L K 2))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 11.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 2) (EQUAL LP (MOVE L K 3)) (EQUAL GP (MOVE G K 1))) (NOT (EQUAL (NTH LP K) 12))). This again simplifies, rewriting with the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding the definition of EQUAL, to: T. Case 10.(IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 3) (EQUAL GP G) (EQUAL LP (MOVE L K 4)) (NOT (EXIST-UNION G N '(3 4)))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 9. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 4) (EQUAL GP (MOVE G K 3)) (EQUAL LP (MOVE L K 5))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the definition of EQUAL, to: T. Case 8. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (EXIST-UNION G N '(1)) (EQUAL LP (MOVE L K 6))) (NOT (EQUAL (NTH LP K) 12))). But this again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 7. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 5) (EQUAL GP G) (NOT (EXIST-UNION G N '(1))) (EQUAL LP (MOVE L K 8))) (NOT (EQUAL (NTH LP K) 12))). This again simplifies, appealing to the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and expanding EQUAL, to: T. Case 6. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 6) (EQUAL GP (MOVE G K 2)) (EQUAL LP (MOVE L K 7))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding the function EQUAL, to: T. Case 5. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 7) (EXIST-UNION G N '(4)) (EQUAL LP (MOVE L K 8)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 12))). But this again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 4. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 8) (EQUAL GP (MOVE G K 4)) (EQUAL LP (MOVE L K 9))) (NOT (EQUAL (NTH LP K) 12))). This again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the definition of EQUAL, to: T. Case 3. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 9) (EQUAL GP G) (PHI9 K N G) (EQUAL LP (MOVE L K 10))) (NOT (EQUAL (NTH LP K) 12))), which again simplifies, rewriting with WS-LN-L, WS-LIST-L, and MOVE-NTH, and unfolding EQUAL, to: T. Case 2. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 10) (EQUAL LP (MOVE L K 11)) (EQUAL GP G)) (NOT (EQUAL (NTH LP K) 12))). This again simplifies, applying WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Case 1. (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (EQUAL (NTH L K) 12) (EQUAL GP (MOVE G K 0)) (EQUAL LP (MOVE L K 0))) (NOT (EQUAL (NTH LP K) 12))). However this again simplifies, applying the lemmas WS-LN-L, WS-LIST-L, and MOVE-NTH, and opening up the function EQUAL, to: T. Q.E.D. [ 0.0 0.1 0.0 ] K-IN-L11 (PROVE-LEMMA LM1-A3-I-EQ-K-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LG N L G) (A2 N N L) (AT LP K 12) (UNION-AT-N LP J '(5 6 7 8 9 10 11 12))) (AT G J 4)) ((USE (A3-J-IN-L5-12) (K-IN-L11)))) WARNING: Note that LM1-A3-I-EQ-K-J-NEQ-K contains the free variables GP, LP, K, L, and N which will be chosen by instantiating the hypotheses (WS N L G), (MEMBER K (NSET N)), and (RHOI N K L G LP GP). This simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, K-IN-L11, L-SAME-LP, and A3-J-IN-L5-12, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.6 0.0 ] LM1-A3-I-EQ-K-J-NEQ-K (PROVE-LEMMA LM-A3-I-EQ-K-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LG N L G) (A2 N N L) (A3-AT-N1-N2 K J L G)) (A3-AT-N1-N2 K J LP GP)) ((ENABLE A3-AT-N1-N2) (USE (LM1-A3-I-EQ-K-J-NEQ-K)))) WARNING: Note that LM-A3-I-EQ-K-J-NEQ-K contains the free variables G, L, and N which will be chosen by instantiating the hypothesis (WS N L G). This formula can be simplified, using the abbreviations A3-AT-N1-N2, NOT, AND, and IMPLIES, to: (IMPLIES (AND (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LG N L G) (A2 N N L) (AT LP K 12) (UNION-AT-N LP J '(5 6 7 8 9 10 11 12))) (AT G J 4)) (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LG N L G) (A2 N N L) (A3-AT-N1-N2 K J L G) (AT LP K 12) (UNION-AT-N LP J '(5 6 7 8 9 10 11 12))) (AT GP J 4)), which simplifies, applying the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, L-SAME-LP, LP-SAME-L, LM1-A3-I-EQ-K-J-NEQ-K, and GP-SAME-G-AT, and opening up the definitions of NOT, AND, IMPLIES, and A3-AT-N1-N2, to: T. Q.E.D. [ 0.0 0.6 0.0 ] LM-A3-I-EQ-K-J-NEQ-K (PROVE-LEMMA A3-I-EQ-K-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL J K)) (LG N L G) (A2 N N L) (A3 N N L G)) (A3-AT-N1-N2 K J LP GP)) ((USE (A3-I-J-A3-AT-N1-N2 (I K))))) WARNING: Note that A3-I-EQ-K-J-NEQ-K contains the free variables G, L, and N which will be chosen by instantiating the hypothesis (WS N L G). This simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A3-I-J-A3-AT-N1-N2, and LM-A3-I-EQ-K-J-NEQ-K, and unfolding the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-I-EQ-K-J-NEQ-K (PROVE-LEMMA LM-A3-I-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (NOT (EQUAL J K)) (A3-AT-N1-N2 I J L G)) (A3-AT-N1-N2 I J LP GP)) ((ENABLE A3-AT-N1-N2))) WARNING: Note that LM-A3-I-J-NEQ-K contains the free variables K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This conjecture can be simplified, using the abbreviations A3-AT-N1-N2, NOT, AND, and IMPLIES, to the goal: (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (NOT (EQUAL I K)) (NOT (EQUAL J K)) (A3-AT-N1-N2 I J L G) (AT LP I 12) (UNION-AT-N LP J '(5 6 7 8 9 10 11 12))) (AT GP J 4)). This simplifies, appealing to the lemmas L-SAME-LP, L-SAME-LP-AT, and GP-SAME-G-AT, and unfolding the function A3-AT-N1-N2, to: T. Q.E.D. [ 0.0 0.6 0.0 ] LM-A3-I-J-NEQ-K (PROVE-LEMMA A3-I-J-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (A3 N N L G) (NOT (EQUAL I K)) (NOT (EQUAL J K))) (A3-AT-N1-N2 I J LP GP)) ((USE (LM-A3-I-J-NEQ-K)))) WARNING: Note that A3-I-J-NEQ-K contains the free variables K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This simplifies, applying the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A3-I-J-A3-AT-N1-N2, and LM-A3-I-J-NEQ-K, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-I-J-NEQ-K (PROVE-LEMMA LM-A3-I-J-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A2 N N L) (A3-AT-N1-N2 K K L G)) (A3-AT-N1-N2 K K LP GP)) ((ENABLE A3-AT-N1-N2) (USE (IF4 (J K) (L LP) (G GP))))) WARNING: Note that LM-A3-I-J-EQ-K contains the free variables G, L, and N which will be chosen by instantiating the hypothesis (WS N L G). This conjecture can be simplified, using the abbreviations A3-AT-N1-N2, AND, and IMPLIES, to: (IMPLIES (AND (IMPLIES (AND (MEMBER K (NSET N)) (LG N LP GP) (UNION-AT-N LP K '(9 10 11 12))) (AT GP K 4)) (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A2 N N L) (A3-AT-N1-N2 K K L G) (AT LP K 12) (UNION-AT-N LP K '(5 6 7 8 9 10 11 12))) (AT GP K 4)). This simplifies, applying RHO-PRESERVES-LG and L12-THEN-UN9-12, and unfolding the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] LM-A3-I-J-EQ-K (PROVE-LEMMA A3-I-J-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A2 N N L) (A3 N N L G)) (A3-AT-N1-N2 K K LP GP)) ((USE (LM-A3-I-J-EQ-K)))) WARNING: Note that A3-I-J-EQ-K contains the free variables G, L, and N which will be chosen by instantiating the hypothesis (WS N L G). This simplifies, applying WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, A3-I-J-A3-AT-N1-N2, and LM-A3-I-J-EQ-K, and unfolding the definitions of AND and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-I-J-EQ-K (PROVE-LEMMA A3-I-EQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER J (NSET N)) (MEMBER K (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A2 N N L) (A3 N N L G)) (A3-AT-N1-N2 K J LP GP)) ((USE (A3-I-EQ-K-J-NEQ-K) (A3-I-J-EQ-K)))) WARNING: Note that A3-I-EQ-K contains the free variables G, L, and N which will be chosen by instantiating the hypothesis (WS N L G). WARNING: the newly proposed lemma, A3-I-EQ-K, could be applied whenever the previously added lemma A3-I-J-EQ-K could. WARNING: the newly proposed lemma, A3-I-EQ-K, could be applied whenever the previously added lemma A3-I-EQ-K-J-NEQ-K could. This conjecture simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, LM-RHO-PRESERVES-WS, and A3-I-J-EQ-K, and expanding the functions NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-I-EQ-K (PROVE-LEMMA A3-I-NEQ-K (REWRITE) (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A0 N L K) (A2 N N L) (A3 N N L G) (NOT (EQUAL I K))) (A3-AT-N1-N2 I J LP GP)) ((USE (A3-I-J-NEQ-K) (A3-I-NEQ-K-J-EQ-K)))) WARNING: Note that A3-I-NEQ-K contains the free variables K, G, L, and N which will be chosen by instantiating the hypotheses (WS N L G) and (MEMBER K (NSET N)). This simplifies, rewriting with the lemmas WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and opening up NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] A3-I-NEQ-K (PROVE-LEMMA RHO-PRESERVES-A3 NIL (IMPLIES (AND (WS N L G) (MEMBER K (NSET N)) (MEMBER I (NSET N)) (MEMBER J (NSET N)) (RHOI N K L G LP GP) (LG N L G) (A0 N L K) (A2 N N L) (A3 N N L G)) (A3-AT-N1-N2 I J LP GP)) ((USE (A3-I-NEQ-K) (A3-I-EQ-K)))) This simplifies, rewriting with WS-UNION-G, WS-UNION-L, WS-LN-G, WS-LN-L, WS-LIST-G, WS-LIST-L, WS-NUM-N, and LM-RHO-PRESERVES-WS, and unfolding NOT, AND, and IMPLIES, to: T. Q.E.D. [ 0.0 0.0 0.0 ] RHO-PRESERVES-A3