Next: , Previous: , Up: CS389r Homework   [Contents][Index]


4.8 Homework 7

                        Homework Assignment 7
                               CS 389r
                         Unique Number: 53119
                             Fall, 2021

                       Given:  October 26, 2021
                        Due:  November 4, 2021

Your homework assignment is to provide solutions for problems 76-78 and 82-84. You may use proof builder and/or the full ACL2 system in developing your solutions.

The following definitions should help.

(defun power (x y)
  (if (consp y)
      (times x (power x (cdr y)))
    '(nil)))

(defun lesseqp (x y)
  (if (consp x)
      (if (consp y)
          (lesseqp (cdr x) (cdr y))
        nil)
    t))

The solutions produced using the ACL2 system and proof-builder must be submitted electronically as an ACL2 DEFTHM event that can be processed by the ACL2 system. We will show how to use the ACL2 proof builder in class to produce such a log.

Submit your proof script to Canvas by the beginning of class on the due date. The solutions should contained in a file named “hw7-firstname-lastname.lisp” where firstname and lastname are your first and last name.

The file should execute from start to finish in ACL2. You can test this by starting ACL2 and executing the command (ld “hw7-firstname-lastname.lisp”). In other words, all definitions related to the problems should be included in the file. We will inspect your definitions and your theorems in addition to executing the file.