\documentstyle[makeidx]{article}
\makeindex
%\setlength{\oddsidemargin}{.5in}
%\setlength{\evensidemargin}{.5in}
%\setlength{\textwidth}{5.8in}
\begin{document}
%\setlength{\parindent}{0pt}
%\newcounter{bean}
%\begin{list}{\arabic{bean}.}{\usecounter{bean}\setlength{\leftmargin}{0pt}\setlength{\rightmargin}{0pt}\setlength{\listparindent}{20pt}\setlength{\parsep}{5pt}}
%\item[]

\begin{verbatim}#|
 Copyright (C) 1995 by Matthew Wilding and Computational Logic, Inc.  
 All Rights Reserved.

 This script is hereby placed in the public domain, and therefore unlimited
 editing and redistribution is permitted.

 NO WARRANTY

 Matthew Wilding and Computational Logic, Inc. PROVIDES ABSOLUTELY NO
 WARRANTY.  THE EVENT SCRIPT IS PROVIDED "AS IS" WITHOUT WARRANTY OF
 ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
 ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
 PERFORMANCE OF THE SCRIPT IS WITH YOU.  SHOULD THE SCRIPT PROVE
 DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
 CORRECTION.

 IN NO EVENT WILL Matthew Wilding and Computational Logic, Inc. BE
 LIABLE TO YOU FOR ANY DAMAGES, ANY LOST PROFITS, LOST MONIES, OR
 OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
 USE OR INABILITY TO USE THIS SCRIPT (INCLUDING BUT NOT LIMITED TO
 LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
 THIRD PARTIES), EVEN IF YOU HAVE ADVISED US OF THE POSSIBILITY OF
 SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.  
|#

;; This file contains the events that lead to the proof of the
;; optimality of an earliest-deadline-first scheduler on any set of
;; periodic tasks.  It is documented in CLI Technical Report #110.
;;
;; Report #110 will not be available for public dissemination until
;; December 1995 at the earliest, but the portion about this proof is
;; available as ftp://ftp.cli.com/home/wilding/scheduler-proof.ps
;;
;; Matt Wilding
;; September, 1995

\end{verbatim}
\noindent{\sc Event}:   Start with the library {\tt{"naturals"}} using the compiled version.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{tk-name}$\;\;$
{\rm{tk-name}}\,({\it{pt\/}})\index{tk-name} $=$ {\rm{car}}\,({\it{pt\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tk-period}$\;\;$
{\rm{tk-period}}\,({\it{pt\/}})\index{tk-period} $=$ {\rm{cadr}}\,({\it{pt\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{tk-duration}$\;\;$
{\rm{tk-duration}}\,({\it{pt\/}})\index{tk-duration} $=$ {\rm{caddr}}\,({\it{pt\/}})
\end{tabbing}

\begin{verbatim}; periodic task is a triple (name period duration)
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{periodic-taskp} \\  
\=\+{\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp} \\ 
$=$$\;\;\;\;$(\=\+{\rm{listp}}\,({\it{pt\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{litatom}}\,({\rm{tk-name}}\,({\it{pt\/}})\index{tk-name}) \\ 
$\wedge$$\;\;\;\;$({\rm{tk-name}}\,({\it{pt\/}})\index{tk-name} $\not=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\rm{tk-period}}\,({\it{pt\/}})\index{tk-period}) \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\rm{tk-duration}}\,({\it{pt\/}})\index{tk-duration}) \\ 
$\wedge$$\;\;\;\;$({\bf{nil}} $=$ {\rm{cdr}}\,({\rm{cdr}}\,({\rm{cdr}}\,({\it{pt\/}})))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{periodic-tasksp} \\  
\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{pts\/}}) \\ 
{\bf then }\=\+{\rm{periodic-taskp}}\,({\rm{car}}\,({\it{pts\/}}))\index{periodic-taskp} \\ 
$\wedge$$\;\;\;\;$($\neg$ {\rm{assoc}}\,({\rm{tk-name}}\,({\rm{car}}\,({\it{pts\/}}))\index{tk-name}, {\rm{cdr}}\,({\it{pts\/}}))) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\rm{cdr}}\,({\it{pts\/}}))\index{periodic-tasksp}\- \\ 
{\bf else }{\it{pts\/}} $=$ {\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};; a task request has the form (name request-time deadline-time duration)

;; generate the requests for a periodic task during a time period
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{periodic-task-requests} \\  
\=\+{\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{starting-time\/}}, {\it{ending-time\/}})\index{periodic-task-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp} \\ 
{\bf then }\=\+{\bf if }{\it{starting-time\/}} $<$ {\it{ending-time\/}} \\ 
{\bf then }{\rm{cons}}\,(\=\+{\rm{list}}\,(\=\+{\rm{tk-name}}\,({\it{pt\/}})\index{tk-name}, \\ 
{\it{starting-time\/}}, \\ 
{\it{starting-time\/}} $+$ {\rm{tk-period}}\,({\it{pt\/}})\index{tk-period}, \\ 
{\rm{tk-duration}}\,({\it{pt\/}})\index{tk-duration})\-, \\ 
{\rm{periodic-task-requests}}\,(\=\+{\it{pt\/}}, \\ 
{\it{starting-time\/}} $+$ {\rm{tk-period}}\,({\it{pt\/}})\index{tk-period}, \\ 
{\it{ending-time\/}})\-\index{periodic-task-requests})\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};; we generate a list of task request lists
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{periodic-tasks-requests} \\  
\=\+{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{starting-time\/}}, {\it{ending-time\/}})\index{periodic-tasks-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\it{pts\/}}) \\ 
{\bf then }{\rm{append}}\,(\=\+{\rm{periodic-task-requests}}\,(\=\+{\rm{car}}\,({\it{pts\/}}), \\ 
{\it{starting-time\/}}, \\ 
{\it{ending-time\/}})\-\index{periodic-task-requests}, \\ 
{\rm{periodic-tasks-requests}}\,(\=\+{\rm{cdr}}\,({\it{pts\/}}), \\ 
{\it{starting-time\/}}, \\ 
{\it{ending-time\/}})\-\index{periodic-tasks-requests})\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}
        
\begin{tabbing}{\sc Definition}:\index{repeat} \\  
\=\+{\rm{repeat}}\,({\it{n\/}}, {\it{val\/}})\index{repeat} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\it{val\/}}, {\rm{repeat}}\,({\it{n\/}} $-\;1$, {\it{val\/}})\index{repeat})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};; produce an "obvious" schedule of length c that consists of 
;; (duration/period)*c calls of each task in a periodic task list
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{substring-schedule} \\  
\=\+{\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{pts\/}}) \\ 
{\bf then }{\rm{append}}\,(\=\+{\rm{repeat}}\,(({\it{bigp\/}} $*$ {\rm{caddar}}\,({\it{pts\/}})) $\div$ {\rm{cadar}}\,({\it{pts\/}}), {\rm{caar}}\,({\it{pts\/}}))\index{repeat}, \\ 
{\rm{substring-schedule}}\,({\rm{cdr}}\,({\it{pts\/}}), {\it{bigp\/}})\index{substring-schedule})\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{make-length} \\  
\=\+{\rm{make-length}}\,({\it{length\/}}, {\it{list\/}}, {\it{fill\/}})\index{make-length} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{length\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{listp}}\,({\it{list\/}}) \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{list\/}}), {\rm{make-length}}\,({\it{length\/}} $-\;1$, {\rm{cdr}}\,({\it{list\/}}), {\it{fill\/}})\index{make-length}) \\ 
{\bf else }{\rm{cons}}\,({\it{fill\/}}, {\rm{make-length}}\,({\it{length\/}} $-\;1$, {\bf{nil}}, {\it{fill\/}})\index{make-length})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{repeat-list} \\  
\=\+{\rm{repeat-list}}\,({\it{list\/}}, {\it{times\/}})\index{repeat-list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{times\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{append}}\,({\it{list\/}}, {\rm{repeat-list}}\,({\it{list\/}}, {\it{times\/}} $-\;1$)\index{repeat-list})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{make-simple-schedule} \\  
\=\+{\rm{make-simple-schedule}}\,({\it{pts\/}}, {\it{bigp\/}}, {\it{length\/}})\index{make-simple-schedule} \\ 
$=$$\;\;\;\;${\rm{repeat-list}}\,(\=\+{\rm{make-length}}\,({\it{bigp\/}}, {\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule}, {\bf{nil}})\index{make-length}, \\ 
{\it{length\/}} $\div$ {\it{bigp\/}})\-\index{repeat-list}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{firstn} \\  
\=\+{\rm{firstn}}\,({\it{n\/}}, {\it{list\/}})\index{firstn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{list\/}}), {\rm{firstn}}\,({\it{n\/}} $-\;1$, {\rm{cdr}}\,({\it{list\/}}))\index{firstn})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{nth} \\  
\=\+{\rm{nth}}\,({\it{n\/}}, {\it{list\/}})\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{car}}\,({\it{list\/}}) \\ 
{\bf else }{\rm{nth}}\,({\it{n\/}} $-\;1$, {\rm{cdr}}\,({\it{list\/}}))\index{nth}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{nthcdr} \\  
\=\+{\rm{nthcdr}}\,({\it{n\/}}, {\it{list\/}})\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\it{list\/}} \\ 
{\bf else }{\rm{nthcdr}}\,({\it{n\/}} $-\;1$, {\rm{cdr}}\,({\it{list\/}}))\index{nthcdr}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{length} \\  
\=\+{\rm{length}}\,({\it{list\/}})\index{length} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{list\/}})$\;\;${\bf then }$1\;+$ {\rm{length}}\,({\rm{cdr}}\,({\it{list\/}}))\index{length} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-append \\ \index{length-append}
{\rm{length}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{length} $=$ ({\rm{length}}\,({\it{x\/}})\index{length} $+$ {\rm{length}}\,({\it{y\/}})\index{length})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-firstn \\ \index{length-firstn}
{\rm{length}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{list\/}})\index{firstn})\index{length} $=$ {\rm{fix}}\,({\it{n\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-nthcdr \\ \index{length-nthcdr}
{\rm{length}}\,({\rm{nthcdr}}\,({\it{n\/}}, {\it{list\/}})\index{nthcdr})\index{length} $=$ ({\rm{length}}\,({\it{list\/}})\index{length} $-$ {\it{n\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-length-0 \\ \index{equal-length-0}
({\rm{length}}\,({\it{x\/}})\index{length} $=$ {\tt{0}}) $=$ ($\neg$ {\rm{listp}}\,({\it{x\/}}))
\end{tabbing}

\begin{verbatim};; each task request period is a multiple of bigp, and bigp*duration
;; is a multiple of period

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{expanded-tasksp} \\  
\=\+{\rm{expanded-tasksp}}\,({\it{ts\/}}, {\it{p\/}})\index{expanded-tasksp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{ts\/}}) \\ 
{\bf then }\=\+(({\rm{cadar}}\,({\it{ts\/}}) ${}${\bf{mod}}${}$ {\it{p\/}}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\rm{caddar}}\,({\it{ts\/}}) ${}${\bf{mod}}${}$ {\it{p\/}}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$((({\it{p\/}} $*$ {\rm{caddar}}\,({\it{ts\/}})) ${}${\bf{mod}}${}$ {\rm{cadar}}\,({\it{ts\/}})) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;${\rm{expanded-tasksp}}\,({\rm{cdr}}\,({\it{ts\/}}), {\it{p\/}})\index{expanded-tasksp}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{plist} \\  
\=\+{\rm{plist}}\,({\it{list\/}})\index{plist} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{list\/}})$\;\;${\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{list\/}}), {\rm{plist}}\,({\rm{cdr}}\,({\it{list\/}}))\index{plist}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{name}$\;\;$
{\rm{name}}\,({\it{r\/}})\index{name} $=$ {\rm{car}}\,({\it{r\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{request-time}$\;\;$
{\rm{request-time}}\,({\it{r\/}})\index{request-time} $=$ {\rm{cadr}}\,({\it{r\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{deadline}$\;\;$
{\rm{deadline}}\,({\it{r\/}})\index{deadline} $=$ {\rm{caddr}}\,({\it{r\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{duration}$\;\;$
{\rm{duration}}\,({\it{r\/}})\index{duration} $=$ {\rm{cadddr}}\,({\it{r\/}})
\end{tabbing}


\noindent{\sc Event}:   Let us define the theory {\it{task-abbr}} to consist of the following events: name,
request-time,
deadline,
duration,
tk-name,
tk-duration,
tk-period.\index{task-abbr}

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{good-schedule} \\  
\=\+{\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{r\/}}) \\ 
{\bf then }\=\+(\=\+{\rm{occurrences}}\,(\=\+{\rm{name}}\,({\rm{car}}\,({\it{r\/}}))\index{name}, \\ 
{\rm{firstn}}\,(\=\+{\rm{deadline}}\,({\rm{car}}\,({\it{r\/}}))\index{deadline} $-$ {\rm{request-time}}\,({\rm{car}}\,({\it{r\/}}))\index{request-time}, \\ 
{\rm{nthcdr}}\,({\rm{request-time}}\,({\rm{car}}\,({\it{r\/}}))\index{request-time}, {\it{s\/}})\index{nthcdr})\-\index{firstn})\-\index{occurrences} \\ 
$=$$\;\;\;\;${\rm{duration}}\,({\rm{car}}\,({\it{r\/}}))\index{duration})\- \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\rm{cdr}}\,({\it{r\/}}))\index{good-schedule}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{big-period} \\  
\=\+{\rm{big-period}}\,({\it{pts\/}})\index{big-period} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{pts\/}})$\;\;${\bf then }{\rm{tk-period}}\,({\rm{car}}\,({\it{pts\/}}))\index{tk-period} $*$ {\rm{big-period}}\,({\rm{cdr}}\,({\it{pts\/}}))\index{big-period} \\ 
{\bf else }{\tt{1}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{active-task-requests} \\  
\=\+{\rm{active-task-requests}}\,({\it{time\/}}, {\it{r\/}})\index{active-task-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{r\/}}) \\ 
{\bf then }\=\+{\bf if }\=\+({\it{time\/}} $<$ {\rm{deadline}}\,({\rm{car}}\,({\it{r\/}}))\index{deadline}) \\ 
$\wedge$$\;\;\;\;$({\it{time\/}} $\not<$ {\rm{request-time}}\,({\rm{car}}\,({\it{r\/}}))\index{request-time})\- \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{r\/}}), {\rm{active-task-requests}}\,({\it{time\/}}, {\rm{cdr}}\,({\it{r\/}}))\index{active-task-requests}) \\ 
{\bf else }{\rm{active-task-requests}}\,({\it{time\/}}, {\rm{cdr}}\,({\it{r\/}}))\index{active-task-requests}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}
        
\begin{tabbing}{\sc Definition}:\index{unfulfilled} \\  
\=\+{\rm{unfulfilled}}\,({\it{time\/}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{r\/}}) \\ 
{\bf then }\=\+{\bf if }\=\+{\rm{occurrences}}\,(\=\+{\rm{name}}\,({\rm{car}}\,({\it{r\/}}))\index{name}, \\ 
{\rm{firstn}}\,(\=\+{\it{time\/}} $-$ {\rm{request-time}}\,({\rm{car}}\,({\it{r\/}}))\index{request-time}, \\ 
{\rm{nthcdr}}\,({\rm{request-time}}\,({\rm{car}}\,({\it{r\/}}))\index{request-time}, {\it{s\/}})\index{nthcdr})\-\index{firstn})\-\index{occurrences} \\ 
$=$$\;\;\;\;${\rm{duration}}\,({\rm{car}}\,({\it{r\/}}))\index{duration}\-$\;\;${\bf then }{\rm{unfulfilled}}\,({\it{time\/}}, {\it{s\/}}, {\rm{cdr}}\,({\it{r\/}}))\index{unfulfilled} \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{r\/}}), {\rm{unfulfilled}}\,({\it{time\/}}, {\it{s\/}}, {\rm{cdr}}\,({\it{r\/}}))\index{unfulfilled})$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};; return a task request with least deadline
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{least-deadline} \\  
\=\+{\rm{least-deadline}}\,({\it{r\/}})\index{least-deadline} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{r\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\rm{cdr}}\,({\it{r\/}})) \\ 
{\bf then }\=\+{\bf if }{\rm{deadline}}\,({\rm{car}}\,({\it{r\/}}))\index{deadline} $<$ {\rm{deadline}}\,({\rm{car}}\,({\rm{cdr}}\,({\it{r\/}})))\index{deadline} \\ 
{\bf then }{\rm{least-deadline}}\,({\rm{cons}}\,({\rm{car}}\,({\it{r\/}}), {\rm{cdr}}\,({\rm{cdr}}\,({\it{r\/}}))))\index{least-deadline} \\ 
{\bf else }{\rm{least-deadline}}\,({\rm{cdr}}\,({\it{r\/}}))\index{least-deadline}$\;${\bf  endif}\- \\ 
{\bf else }{\rm{car}}\,({\it{r\/}})$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};; return location of first instance of task in s no earlier than time
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{first-instance} \\  
\=\+{\rm{first-instance}}\,({\it{time\/}}, {\it{task\/}}, {\it{s\/}})\index{first-instance} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{time\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length} \\ 
{\bf then }\=\+{\bf if }{\rm{nth}}\,({\it{time\/}}, {\it{s\/}})\index{nth} $=$ {\it{task\/}}$\;\;${\bf then }{\it{time\/}} \\ 
{\bf else }{\rm{first-instance}}\,($1\;+$ {\it{time\/}}, {\it{task\/}}, {\it{s\/}})\index{first-instance}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{replace-nth} \\  
\=\+{\rm{replace-nth}}\,({\it{n\/}}, {\it{val\/}}, {\it{list\/}})\index{replace-nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{cons}}\,({\it{val\/}}, {\rm{cdr}}\,({\it{list\/}})) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{list\/}}), {\rm{replace-nth}}\,({\it{n\/}} $-\;1$, {\it{val\/}}, {\rm{cdr}}\,({\it{list\/}}))\index{replace-nth})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};; swap locations i and j in list
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{swap} \\  
\=\+{\rm{swap}}\,({\it{i\/}}, {\it{j\/}}, {\it{list\/}})\index{swap} \\ 
$=$$\;\;\;\;${\rm{replace-nth}}\,({\it{i\/}}, {\rm{nth}}\,({\it{j\/}}, {\it{list\/}})\index{nth}, {\rm{replace-nth}}\,({\it{j\/}}, {\rm{nth}}\,({\it{i\/}}, {\it{list\/}})\index{nth}, {\it{list\/}})\index{replace-nth})\index{replace-nth}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-replace-nth \\ \index{length-replace-nth}
\=\+{\rm{length}}\,({\rm{replace-nth}}\,({\it{i\/}}, {\it{val\/}}, {\it{list\/}})\index{replace-nth})\index{length} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{i\/}} $<$ {\rm{length}}\,({\it{list\/}})\index{length}$\;\;${\bf then }{\rm{length}}\,({\it{list\/}})\index{length} \\ 
{\bf else }$1\;+$ {\it{i\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-swap \\ \index{length-swap}
\=\+{\rm{length}}\,({\rm{swap}}\,({\it{i\/}}, {\it{j\/}}, {\it{list\/}})\index{swap})\index{length} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{i\/}} $<$ {\rm{length}}\,({\it{list\/}})\index{length} \\ 
{\bf then }\=\+{\bf if }{\it{j\/}} $<$ {\rm{length}}\,({\it{list\/}})\index{length}$\;\;${\bf then }{\rm{length}}\,({\it{list\/}})\index{length} \\ 
{\bf else }$1\;+$ {\it{j\/}}$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{i\/}} $<$ {\it{j\/}}$\;\;${\bf then }$1\;+$ {\it{j\/}} \\ 
{\bf else }$1\;+$ {\it{i\/}}$\;${\bf  endif}\-\-
\end{tabbing}
  
\begin{tabbing}{\sc Definition}:\index{make-element-edf} \\  
\=\+{\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{time\/}})\index{make-element-edf} \\ 
$=$$\;\;\;\;$\=\+{\bf let }\=\+{\it{unfulfilled\/}}{\bf $\;$ be$\;\;$}{\rm{unfulfilled}}\,({\it{time\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{time\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{first\/}}{\bf $\;$ be$\;\;$}{\rm{first-instance}}\,(\=\+{\it{time\/}}, \\ 
{\rm{car}}\,({\rm{least-deadline}}\,({\it{unfulfilled\/}})\index{least-deadline}), \\ 
{\it{s\/}})\-\index{first-instance}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{listp}}\,({\it{unfulfilled\/}}) $\wedge$ {\it{first\/}}$\;\;${\bf then }{\rm{swap}}\,({\it{time\/}}, {\it{first\/}}, {\it{s\/}})\index{swap} \\ 
{\bf else }{\it{s\/}}$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-first-instance \\ \index{lessp-first-instance}
{\rm{listp}}\,({\it{s\/}}) $\rightarrow$ ({\rm{first-instance}}\,({\it{time\/}}, {\it{task\/}}, {\it{s\/}})\index{first-instance} $<$ {\rm{length}}\,({\it{s\/}})\index{length})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-make-element-edf \\ \index{length-make-element-edf}
({\it{time\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) $\rightarrow$ ({\rm{length}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{time\/}})\index{make-element-edf})\index{length} $=$ {\rm{length}}\,({\it{s\/}})\index{length})
\end{tabbing}


\noindent{\sc Event}:   Disable make-element-edf.

\addvspace{18pt}

\begin{tabbing}{\sc Definition}:\index{make-schedule-edf} \\  
\=\+{\rm{make-schedule-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{first\/}})\index{make-schedule-edf} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{first\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length} \\ 
{\bf then }{\rm{make-schedule-edf}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{first\/}})\index{make-element-edf}, {\it{r\/}}, $1\;+$ {\it{first\/}})\index{make-schedule-edf} \\ 
{\bf else }{\it{s\/}}$\;${\bf  endif}\-\-
\end{tabbing}


\noindent{\sc Event}:   Enable make-element-edf.

\addvspace{18pt}


\begin{verbatim};;;;;;;;


\end{verbatim}\begin{tabbing}{\sc Theorem}:  plist-repeat-list \\ \index{plist-repeat-list}
{\rm{plist}}\,({\rm{repeat-list}}\,({\it{s\/}}, {\it{n\/}})\index{repeat-list})\index{plist} $=$ {\rm{repeat-list}}\,({\it{s\/}}, {\it{n\/}})\index{repeat-list}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-repeat-list \\ \index{length-repeat-list}
{\rm{length}}\,({\rm{repeat-list}}\,({\it{s\/}}, {\it{n\/}})\index{repeat-list})\index{length} $=$ ({\it{n\/}} $*$ {\rm{length}}\,({\it{s\/}})\index{length})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  append-nil \\ \index{append-nil}
{\rm{append}}\,({\it{list\/}}, {\bf{nil}}) $=$ {\rm{plist}}\,({\it{list\/}})\index{plist}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  good-schedule-append \\ \index{good-schedule-append}
\=\+{\rm{good-schedule}}\,({\it{s\/}}, {\rm{append}}\,({\it{r1\/}}, {\it{r2\/}}))\index{good-schedule} \\ 
$=$$\;\;\;\;$({\rm{good-schedule}}\,({\it{s\/}}, {\it{r1\/}})\index{good-schedule} $\wedge$ {\rm{good-schedule}}\,({\it{s\/}}, {\it{r2\/}})\index{good-schedule})\-
\end{tabbing}

\begin{verbatim};; introduce the useful notion of sublist
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{sublistp} \\  
\=\+{\rm{sublistp}}\,({\it{a\/}}, {\it{b\/}})\index{sublistp} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{b\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\it{a\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{car}}\,({\it{a\/}}) $=$ {\rm{car}}\,({\it{b\/}})$\;\;${\bf then }{\rm{sublistp}}\,({\rm{cdr}}\,({\it{a\/}}), {\rm{cdr}}\,({\it{b\/}}))\index{sublistp} \\ 
{\bf else }{\rm{sublistp}}\,({\it{a\/}}, {\rm{cdr}}\,({\it{b\/}}))\index{sublistp}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
{\bf else }{\it{a\/}} $\simeq\;${{\bf{nil}}}${}$$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{remove-until} \\  
\=\+{\rm{remove-until}}\,({\it{v\/}}, {\it{l\/}})\index{remove-until} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{l\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{v\/}} $=$ {\rm{car}}\,({\it{l\/}})$\;\;${\bf then }{\rm{cdr}}\,({\it{l\/}}) \\ 
{\bf else }{\rm{remove-until}}\,({\it{v\/}}, {\rm{cdr}}\,({\it{l\/}}))\index{remove-until}$\;${\bf  endif}\- \\ 
{\bf else }{\it{l\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  sublistp-cons-rewrite \\ \index{sublistp-cons-rewrite}
{\rm{sublistp}}\,({\rm{cons}}\,({\it{c\/}}, {\it{x\/}}), {\it{y\/}})\index{sublistp} $=$ (({\it{c\/}} $\in$ {\it{y\/}}) $\wedge$ {\rm{sublistp}}\,({\it{x\/}}, {\rm{remove-until}}\,({\it{c\/}}, {\it{y\/}})\index{remove-until})\index{sublistp})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-remove-until-means-listp \\ \index{listp-remove-until-means-listp}
{\rm{listp}}\,({\rm{remove-until}}\,({\it{a\/}}, {\it{z\/}})\index{remove-until}) $\rightarrow$ {\rm{listp}}\,({\it{z\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-remove-until \\ \index{lessp-remove-until}
({\rm{length}}\,({\rm{remove-until}}\,({\it{a\/}}, {\it{y\/}})\index{remove-until})\index{length} $<$ {\rm{length}}\,({\it{y\/}})\index{length}) $=$ {\rm{listp}}\,({\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remove-until-append \\ \index{remove-until-append}
\=\+{\rm{remove-until}}\,({\it{a\/}}, {\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{remove-until} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{a\/}} $\in$ {\it{x\/}}$\;\;${\bf then }{\rm{append}}\,({\rm{remove-until}}\,({\it{a\/}}, {\it{x\/}})\index{remove-until}, {\it{y\/}}) \\ 
{\bf else }{\rm{remove-until}}\,({\it{a\/}}, {\it{y\/}})\index{remove-until}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{list-until} \\  
\=\+{\rm{list-until}}\,({\it{v\/}}, {\it{l\/}})\index{list-until} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{l\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{v\/}} $=$ {\rm{car}}\,({\it{l\/}})$\;\;${\bf then }{\rm{list}}\,({\it{v\/}}) \\ 
{\bf else }{\rm{cons}}\,({\rm{car}}\,({\it{l\/}}), {\rm{list-until}}\,({\it{v\/}}, {\rm{cdr}}\,({\it{l\/}}))\index{list-until})$\;${\bf  endif}\- \\ 
{\bf else }{\it{l\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  append-remove-until-list-until \\ \index{append-remove-until-list-until}
{\rm{append}}\,({\rm{list-until}}\,({\it{v\/}}, {\it{l\/}})\index{list-until}, {\rm{remove-until}}\,({\it{v\/}}, {\it{l\/}})\index{remove-until}) $=$ {\it{l\/}}
\end{tabbing}

\begin{verbatim};; amazingly complex - easier way? (took me ~3 hours to prove this little guy)
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{sublistp-append-induct} \\  
\=\+{\rm{sublistp-append-induct}}\,({\it{a\/}}, {\it{b\/}}, {\it{y\/}}, {\it{z\/}})\index{sublistp-append-induct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{a\/}}) \\ 
{\bf then }{\rm{sublistp-append-induct}}\,(\=\+{\rm{cdr}}\,({\it{a\/}}), \\ 
{\it{b\/}}, \\ 
{\rm{append}}\,({\it{y\/}}, {\rm{list-until}}\,({\rm{car}}\,({\it{a\/}}), {\it{z\/}})\index{list-until}), \\ 
{\rm{remove-until}}\,({\rm{car}}\,({\it{a\/}}), {\it{z\/}})\index{remove-until})\-\index{sublistp-append-induct} \\ 
{\bf elseif }{\it{b\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf elseif }{\rm{listp}}\,({\it{y\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{car}}\,({\it{b\/}}) $\in$ {\it{y\/}} \\ 
{\bf then }{\rm{sublistp-append-induct}}\,(\=\+{\rm{list}}\,({\rm{car}}\,({\it{b\/}})), \\ 
{\rm{cdr}}\,({\it{b\/}}), \\ 
{\rm{remove-until}}\,({\rm{car}}\,({\it{b\/}}), {\it{y\/}})\index{remove-until}, \\ 
{\it{z\/}})\-\index{sublistp-append-induct} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-append \\ \index{member-append}
({\it{a\/}} $\in$ {\rm{append}}\,({\it{x\/}}, {\it{y\/}})) $=$ (({\it{a\/}} $\in$ {\it{x\/}}) $\vee$ ({\it{a\/}} $\in$ {\it{y\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-bagint-with-singleton-implies-member \\ \index{listp-bagint-with-singleton-imp!lies-member}
{\rm{listp}}\,({\rm{bagint}}\,({\it{y\/}}, {\rm{list}}\,({\it{z\/}}))\index{bagint}) $\rightarrow$ ({\it{z\/}} $\in$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  bagint-singleton \\ \index{bagint-singleton}
\=\+{\rm{bagint}}\,({\it{x\/}}, {\rm{list}}\,({\it{y\/}}))\index{bagint} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\in$ {\it{x\/}}$\;\;${\bf then }{\rm{list}}\,({\it{y\/}}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  transitivity-of-append \\ \index{transitivity-of-append}
{\rm{append}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}), {\it{c\/}}) $=$ {\rm{append}}\,({\it{a\/}}, {\rm{append}}\,({\it{b\/}}, {\it{c\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  sublistp-append \\ \index{sublistp-append}
{\rm{sublistp}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}), {\it{z\/}})\index{sublistp} $\rightarrow$ {\rm{sublistp}}\,({\it{b\/}}, {\rm{append}}\,({\it{y\/}}, {\it{z\/}}))\index{sublistp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  sublistp-cdr1 \\ \index{sublistp-cdr1}
{\rm{sublistp}}\,({\it{x\/}}, {\it{y\/}})\index{sublistp} $\rightarrow$ {\rm{sublistp}}\,({\rm{cdr}}\,({\it{x\/}}), {\it{y\/}})\index{sublistp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  sublistp-cdr2 \\ \index{sublistp-cdr2}
{\rm{sublistp}}\,({\it{x\/}}, {\rm{cdr}}\,({\it{y\/}}))\index{sublistp} $\rightarrow$ {\rm{sublistp}}\,({\it{x\/}}, {\it{y\/}})\index{sublistp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-big-period-sublist \\ \index{remainder-big-period-sublist}
\=\+({\rm{periodic-tasksp}}\,({\it{y\/}})\index{periodic-tasksp} $\wedge$ {\rm{sublistp}}\,({\it{x\/}}, {\it{y\/}})\index{sublistp}) \\ 
$\rightarrow$$\;\;\;\;$(({\rm{big-period}}\,({\it{y\/}})\index{big-period} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{x\/}})\index{big-period}) $=$ {\tt{0}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-big-period-cdr \\ \index{remainder-big-period-cdr}
(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $=$ {\tt{0}}) $\rightarrow$ (({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\rm{cdr}}\,({\it{pts\/}}))\index{big-period}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  repeat-list-plus \\ \index{repeat-list-plus}
{\rm{repeat-list}}\,({\it{l\/}}, {\it{a\/}} $+$ {\it{b\/}})\index{repeat-list} $=$ {\rm{append}}\,({\rm{repeat-list}}\,({\it{l\/}}, {\it{a\/}})\index{repeat-list}, {\rm{repeat-list}}\,({\it{l\/}}, {\it{b\/}})\index{repeat-list})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-append \\ \index{nthcdr-append}
\=\+{\rm{nthcdr}}\,({\it{n\/}}, {\rm{append}}\,({\it{l1\/}}, {\it{l2\/}}))\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\rm{length}}\,({\it{l1\/}})\index{length}$\;\;${\bf then }{\rm{append}}\,({\rm{nthcdr}}\,({\it{n\/}}, {\it{l1\/}})\index{nthcdr}, {\it{l2\/}}) \\ 
{\bf else }{\rm{nthcdr}}\,({\it{n\/}} $-$ {\rm{length}}\,({\it{l1\/}})\index{length}, {\it{l2\/}})\index{nthcdr}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-append \\ \index{firstn-append}
\=\+{\rm{firstn}}\,({\it{n\/}}, {\rm{append}}\,({\it{l1\/}}, {\it{l2\/}}))\index{firstn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{length}}\,({\it{l1\/}})\index{length} $<$ {\it{n\/}}$\;\;${\bf then }{\rm{append}}\,({\it{l1\/}}, {\rm{firstn}}\,({\it{n\/}} $-$ {\rm{length}}\,({\it{l1\/}})\index{length}, {\it{l2\/}})\index{firstn}) \\ 
{\bf else }{\rm{firstn}}\,({\it{n\/}}, {\it{l1\/}})\index{firstn}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{nthcdr-repeat-list-induct} \\  
\=\+{\rm{nthcdr-repeat-list-induct}}\,({\it{n1\/}}, {\it{n2\/}}, {\it{list\/}})\index{nthcdr-repeat-list-induct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n1\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\rm{nthcdr-repeat-list-induct}}\,({\it{n1\/}} $-\;1$, {\it{n2\/}} $-$ {\rm{length}}\,({\it{list\/}})\index{length}, {\it{list\/}})\index{nthcdr-repeat-list-induct}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-repeat-list \\ \index{nthcdr-repeat-list}
\=\+((({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{length}}\,({\it{list\/}})\index{length}) $=$ {\tt{0}}) $\wedge$ (({\it{n2\/}} $*$ {\rm{length}}\,({\it{list\/}})\index{length}) $\not<$ {\it{n1\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{nthcdr}}\,({\it{n1\/}}, {\rm{repeat-list}}\,({\it{list\/}}, {\it{n2\/}})\index{repeat-list})\index{nthcdr} \\ 
$=$$\;\;\;\;${\rm{repeat-list}}\,({\it{list\/}}, {\it{n2\/}} $-$ ({\it{n1\/}} $\div$ {\rm{length}}\,({\it{list\/}})\index{length}))\index{repeat-list})\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  length-make-length \\ \index{length-make-length}
{\rm{length}}\,({\rm{make-length}}\,({\it{n\/}}, {\it{list\/}}, {\it{fill\/}})\index{make-length})\index{length} $=$ {\rm{fix}}\,({\it{n\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-expanded \\ \index{member-expanded}
\=\+(({\it{tk\/}} $\in$ {\it{pts\/}}) $\wedge$ {\rm{expanded-tasksp}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expanded-tasksp}) \\ 
$\rightarrow$$\;\;\;\;$(({\rm{cadr}}\,({\it{tk\/}}) ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-length-list \\ \index{firstn-length-list}
{\rm{firstn}}\,({\rm{length}}\,({\it{x\/}})\index{length}, {\it{x\/}})\index{firstn} $=$ {\rm{plist}}\,({\it{x\/}})\index{plist}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-repeat-list \\ \index{firstn-repeat-list}
\=\+((({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{length}}\,({\it{list\/}})\index{length}) $=$ {\tt{0}}) $\wedge$ (({\it{n2\/}} $*$ {\rm{length}}\,({\it{list\/}})\index{length}) $\not<$ {\it{n1\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{firstn}}\,({\it{n1\/}}, {\rm{repeat-list}}\,({\it{list\/}}, {\it{n2\/}})\index{repeat-list})\index{firstn} \\ 
$=$$\;\;\;\;${\rm{repeat-list}}\,({\it{list\/}}, {\it{n1\/}} $\div$ {\rm{length}}\,({\it{list\/}})\index{length})\index{repeat-list})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-remainder-special \\ \index{lessp-remainder-special}
\=\+((({\it{x\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{y\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$(({\it{y\/}} $<$ ({\it{x\/}} $+$ {\it{z\/}})) $=$ (({\it{z\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $\not<$ {\it{y\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-difference-special \\ \index{lessp-difference-special}
\=\+((({\it{x\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}}) $\wedge$ (({\it{y\/}} ${}${\bf{mod}}${}$ {\it{z\/}}) $=$ {\tt{0}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{x\/}} $-$ {\it{y\/}}) $<$ {\it{z\/}}) $=$ (({\it{z\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{y\/}} $\not<$ {\it{x\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-append \\ \index{occurrences-append}
{\rm{occurrences}}\,({\it{a\/}}, {\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{occurrences} $=$ ({\rm{occurrences}}\,({\it{a\/}}, {\it{x\/}})\index{occurrences} $+$ {\rm{occurrences}}\,({\it{a\/}}, {\it{y\/}})\index{occurrences})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-repeat-list \\ \index{occurrences-repeat-list}
{\rm{occurrences}}\,({\it{v\/}}, {\rm{repeat-list}}\,({\it{list\/}}, {\it{n\/}})\index{repeat-list})\index{occurrences} $=$ ({\it{n\/}} $*$ {\rm{occurrences}}\,({\it{v\/}}, {\it{list\/}})\index{occurrences})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-make-length \\ \index{occurrences-make-length}
\=\+{\rm{occurrences}}\,({\it{v\/}}, {\rm{make-length}}\,({\it{size\/}}, {\it{list\/}}, {\it{fill\/}})\index{make-length})\index{occurrences} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{size\/}} $<$ {\rm{length}}\,({\it{list\/}})\index{length}$\;\;${\bf then }{\rm{occurrences}}\,({\it{v\/}}, {\rm{firstn}}\,({\it{size\/}}, {\it{list\/}})\index{firstn})\index{occurrences} \\ 
{\bf elseif }{\it{v\/}} $=$ {\it{fill\/}} \\ 
{\bf then }{\rm{occurrences}}\,({\it{v\/}}, {\it{list\/}})\index{occurrences} $+$ ({\it{size\/}} $-$ {\rm{length}}\,({\it{list\/}})\index{length}) \\ 
{\bf else }{\rm{occurrences}}\,({\it{v\/}}, {\it{list\/}})\index{occurrences}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-repeat \\ \index{occurrences-repeat}
\=\+{\rm{occurrences}}\,({\it{x\/}}, {\rm{repeat}}\,({\it{n\/}}, {\it{y\/}})\index{repeat})\index{occurrences} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $=$ {\it{y\/}}$\;\;${\bf then }{\rm{fix}}\,({\it{n\/}}) \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-repeat \\ \index{member-repeat}
({\it{x\/}} $\in$ {\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat}) $=$ (({\tt{0}} $<$ {\it{n\/}}) $\wedge$ ({\it{x\/}} $=$ {\it{v\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-substring-schedule \\ \index{member-substring-schedule}
\=\+({\rm{periodic-tasksp}}\,({\it{z\/}})\index{periodic-tasksp} $\wedge$ {\rm{expanded-tasksp}}\,({\it{z\/}}, {\it{bigp\/}})\index{expanded-tasksp} $\wedge$ ({\it{v\/}} $\not=$ {\bf{nil}})) \\ 
$\rightarrow$$\;\;\;\;$(({\it{v\/}} $\in$ {\rm{substring-schedule}}\,({\it{z\/}}, {\it{bigp\/}})\index{substring-schedule}) $\leftrightarrow$ {\rm{assoc}}\,({\it{v\/}}, {\it{z\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-car-x-x \\ \index{member-car-x-x}
({\rm{car}}\,({\it{x\/}}) $\in$ {\it{x\/}}) $=$ {\rm{listp}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-substring-schedule \\ \index{occurrences-substring-schedule}
\=\+(\=\+({\it{tk\/}} $\in$ {\it{pts\/}}) \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\it{bigp\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{expanded-tasksp}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expanded-tasksp})\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{occurrences}}\,({\rm{car}}\,({\it{tk\/}}), {\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule})\index{occurrences} \\ 
$=$$\;\;\;\;$(({\it{bigp\/}} $*$ {\rm{caddr}}\,({\it{tk\/}})) $\div$ {\rm{cadr}}\,({\it{tk\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-quotient-quotient-special \\ \index{times-quotient-quotient-special}
\=\+((({\it{x\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) $\wedge$ ((({\it{bigp\/}} $*$ {\it{y\/}}) ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}}) $\wedge$ ({\tt{0}} $<$ {\it{bigp\/}})) \\ 
$\rightarrow$$\;\;\;\;$((({\it{x\/}} $\div$ {\it{bigp\/}}) $*$ (({\it{bigp\/}} $*$ {\it{y\/}}) $\div$ {\it{x\/}})) $=$ {\rm{fix}}\,({\it{y\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  good-schedule-periodic-task-requests \\ \index{good-schedule-periodic-task-req!uests}
\=\+(\=\+({\it{tk\/}} $\in$ {\it{pts\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{expanded-tasksp}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expanded-tasksp} \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\it{bigp\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n2\/}} $\not<$ {\it{n1\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n2\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$(({\rm{cadr}}\,({\it{tk\/}}) ${}${\bf{mod}}${}$ {\it{bigp\/}}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$((({\it{bigp\/}} $*$ {\rm{caddr}}\,({\it{tk\/}})) ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{tk\/}})) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{tk\/}})) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{tk\/}})) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$({\it{bigp\/}} $\not<$ {\rm{length}}\,({\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule})\index{length}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{repeat-list}}\,(\=\+{\rm{make-length}}\,(\=\+{\it{bigp\/}}, \\ 
{\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule}, \\ 
{\bf{nil}})\-\index{make-length}, \\ 
{\it{n2\/}} $\div$ {\it{bigp\/}})\-\index{repeat-list}, \\ 
{\rm{periodic-task-requests}}\,({\it{tk\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\-\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-sublistp \\ \index{member-sublistp}
({\rm{sublistp}}\,({\it{x\/}}, {\it{y\/}})\index{sublistp} $\wedge$ ({\it{e\/}} $\in$ {\it{x\/}})) $\rightarrow$ ({\it{e\/}} $\in$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-expanded-tasksp-means \\ \index{member-expanded-tasksp-means}
\=\+({\rm{expanded-tasksp}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expanded-tasksp} $\wedge$ ({\it{tk\/}} $\in$ {\it{pts\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\rm{cadr}}\,({\it{tk\/}}) ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$((({\it{bigp\/}} $*$ {\rm{caddr}}\,({\it{tk\/}})) ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{tk\/}})) $=$ {\tt{0}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-period-if-remainder-big-period \\ \index{remainder-period-if-remainder-bi!g-period}
\=\+({\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} $\wedge$ ({\it{tk\/}} $\in$ {\it{pts\/}}) $\wedge$ (({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{tk\/}})) $=$ {\tt{0}})\-
\end{tabbing}
  
\begin{tabbing}{\sc Theorem}:  good-simple-schedule-sublist \\ \index{good-simple-schedule-sublist}
\=\+(\=\+({\it{bigp\/}} $\not<$ {\rm{length}}\,({\rm{substring-schedule}}\,({\it{pts2\/}}, {\it{bigp\/}})\index{substring-schedule})\index{length}) \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;${\rm{sublistp}}\,({\it{pts1\/}}, {\it{pts2\/}})\index{sublistp} \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts2\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{expanded-tasksp}}\,({\it{pts2\/}}, {\it{bigp\/}})\index{expanded-tasksp} \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\it{bigp\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n2\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts2\/}})\index{big-period}) $\simeq {\tt{0}}$))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{make-simple-schedule}}\,({\it{pts2\/}}, {\it{bigp\/}}, {\it{n2\/}})\index{make-simple-schedule}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts1\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  sublistp-x-x \\ \index{sublistp-x-x}
{\rm{sublistp}}\,({\it{x\/}}, {\it{x\/}})\index{sublistp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  periodic-tasks-requests-simple \\ \index{periodic-tasks-requests-simple}
({\it{n1\/}} $\not<$ {\it{n2\/}}) $\rightarrow$ ({\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests} $=$ {\bf{nil}})
\end{tabbing}

\begin{verbatim};; big theorem
\end{verbatim}\begin{tabbing}{\sc Theorem}:  good-simple-schedule \\ \index{good-simple-schedule}
\=\+(\=\+({\it{bigp\/}} $\not<$ {\rm{length}}\,({\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule})\index{length}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{expanded-tasksp}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expanded-tasksp} \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\it{bigp\/}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $\simeq {\tt{0}}$))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{make-simple-schedule}}\,({\it{pts\/}}, {\it{bigp\/}}, {\it{n\/}})\index{make-simple-schedule}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}


\begin{verbatim};;;;;;;;;;;;;;;;;;;;;;;;;;;;;

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{expand-tasks} \\  
\=\+{\rm{expand-tasks}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expand-tasks} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{pts\/}}) \\ 
{\bf then }{\rm{cons}}\,(\=\+{\rm{list}}\,({\rm{caar}}\,({\it{pts\/}}), {\it{bigp\/}} $*$ {\rm{cadar}}\,({\it{pts\/}}), {\it{bigp\/}} $*$ {\rm{caddar}}\,({\it{pts\/}})), \\ 
{\rm{expand-tasks}}\,({\rm{cdr}}\,({\it{pts\/}}), {\it{bigp\/}})\index{expand-tasks})\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim};;;; expanded-tasksp identifies expand-tasks
\end{verbatim}\begin{tabbing}{\sc Theorem}:  expanded-tasksp-expand-task-helper \\ \index{expanded-tasksp-expand-task-helpe!r}
\=\+((({\it{x\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts1\/}})\index{big-period}) $=$ {\tt{0}}) $\wedge$ ({\it{x\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;${\rm{expanded-tasksp}}\,({\rm{expand-tasks}}\,({\it{pts1\/}}, {\it{x\/}})\index{expand-tasks}, {\it{x\/}})\index{expanded-tasksp}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  zerop-big-period \\ \index{zerop-big-period}
{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} $\rightarrow$ ({\tt{0}} $<$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  expanded-tasksp-expand-task \\ \index{expanded-tasksp-expand-task}
\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\rightarrow$$\;\;\;\;${\rm{expanded-tasksp}}\,({\rm{expand-tasks}}\,({\it{pts\/}}, {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\index{expand-tasks}, {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\index{expanded-tasksp}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  assoc-expand-tasks \\ \index{assoc-expand-tasks}
{\rm{periodic-tasksp}}\,({\it{x\/}})\index{periodic-tasksp} $\rightarrow$ ({\rm{assoc}}\,({\it{v\/}}, {\rm{expand-tasks}}\,({\it{x\/}}, {\it{n\/}})\index{expand-tasks}) $\leftrightarrow$ {\rm{assoc}}\,({\it{v\/}}, {\it{x\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  periodic-tasksp-expand-tasks \\ \index{periodic-tasksp-expand-tasks}
\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{periodic-tasksp}}\,({\rm{expand-tasks}}\,({\it{pts\/}}, {\it{n\/}})\index{expand-tasks})\index{periodic-tasksp} \\ 
$=$$\;\;\;\;$(({\it{n\/}} $\not\simeq {\tt{0}}$) $\vee$ ($\neg$ {\rm{listp}}\,({\it{pts\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{non-overlapping-requests3} \\  
\=\+{\rm{non-overlapping-requests3}}\,({\it{request\/}}, {\it{request-list\/}})\index{non-overlapping-requests3} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{request-list\/}}) \\ 
{\bf then }\=\+(\=\+({\rm{car}}\,({\it{request\/}}) $\not=$ {\rm{caar}}\,({\it{request-list\/}})) \\ 
$\vee$$\;\;\;\;$({\rm{cadr}}\,({\it{request\/}}) $\not<$ {\rm{caddar}}\,({\it{request-list\/}})) \\ 
$\vee$$\;\;\;\;$({\rm{cadar}}\,({\it{request-list\/}}) $\not<$ {\rm{caddr}}\,({\it{request\/}})) \\ 
$\vee$$\;\;\;\;$({\rm{car}}\,({\it{request-list\/}}) $=$ {\it{request\/}}))\- \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests3}}\,({\it{request\/}}, {\rm{cdr}}\,({\it{request-list\/}}))\index{non-overlapping-requests3}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{non-overlapping-requests2} \\  
\=\+{\rm{non-overlapping-requests2}}\,({\it{r1\/}}, {\it{r2\/}})\index{non-overlapping-requests2} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{r1\/}}) \\ 
{\bf then }\=\+{\rm{non-overlapping-requests3}}\,({\rm{car}}\,({\it{r1\/}}), {\it{r2\/}})\index{non-overlapping-requests3} \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests2}}\,({\rm{cdr}}\,({\it{r1\/}}), {\it{r2\/}})\index{non-overlapping-requests2}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{non-overlapping-requests} \\  
{\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} $=$ {\rm{non-overlapping-requests2}}\,({\it{r\/}}, {\it{r\/}})\index{non-overlapping-requests2}
\end{tabbing}



\begin{verbatim};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{double-cdr-induction} \\  
\=\+{\rm{double-cdr-induction}}\,({\it{a\/}}, {\it{b\/}})\index{double-cdr-induction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{a\/}})$\;\;${\bf then }{\rm{double-cdr-induction}}\,({\rm{cdr}}\,({\it{a\/}}), {\rm{cdr}}\,({\it{b\/}}))\index{double-cdr-induction} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-firstn \\ \index{plist-firstn}
{\rm{plist}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn})\index{plist} $=$ {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cons-nth-nthcdr \\ \index{cons-nth-nthcdr}
({\it{n\/}} $<$ {\rm{length}}\,({\it{l\/}})\index{length}) $\rightarrow$ ({\rm{cons}}\,({\rm{nth}}\,({\it{n\/}}, {\it{l\/}})\index{nth}, {\rm{nthcdr}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{l\/}}))\index{nthcdr}) $=$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-append \\ \index{equal-append}
\=\+({\rm{append}}\,({\it{a\/}}, {\it{b\/}}) $=$ {\it{y\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{y\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }({\it{a\/}} $\simeq\;${{\bf{nil}}}${}$) $\wedge$ ({\it{b\/}} $=$ {\it{y\/}}) \\ 
{\bf else }\=\+({\rm{length}}\,({\it{y\/}})\index{length} $\not<$ {\rm{length}}\,({\it{a\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;$({\rm{firstn}}\,({\rm{length}}\,({\it{a\/}})\index{length}, {\it{y\/}})\index{firstn} $=$ {\rm{plist}}\,({\it{a\/}})\index{plist}) \\ 
$\wedge$$\;\;\;\;$({\rm{nthcdr}}\,({\rm{length}}\,({\it{a\/}})\index{length}, {\it{y\/}})\index{nthcdr} $=$ {\it{b\/}})\-$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  replace-nth-replace-nth \\ \index{replace-nth-replace-nth}
\=\+({\rm{fix}}\,({\it{i\/}}) $\not=$ {\rm{fix}}\,({\it{j\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{replace-nth}}\,({\it{i\/}}, {\it{x\/}}, {\rm{replace-nth}}\,({\it{j\/}}, {\it{y\/}}, {\it{l\/}})\index{replace-nth})\index{replace-nth} \\ 
$=$$\;\;\;\;${\rm{replace-nth}}\,({\it{j\/}}, {\it{y\/}}, {\rm{replace-nth}}\,({\it{i\/}}, {\it{x\/}}, {\it{l\/}})\index{replace-nth})\index{replace-nth})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  replace-nth-idempotent \\ \index{replace-nth-idempotent}
\=\+({\rm{fix}}\,({\it{i\/}}) $=$ {\rm{fix}}\,({\it{j\/}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{replace-nth}}\,({\it{i\/}}, {\it{x\/}}, {\rm{replace-nth}}\,({\it{j\/}}, {\it{y\/}}, {\it{l\/}})\index{replace-nth})\index{replace-nth} $=$ {\rm{replace-nth}}\,({\it{i\/}}, {\it{x\/}}, {\it{l\/}})\index{replace-nth})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-nth \\ \index{member-nth}
({\it{n\/}} $<$ {\rm{length}}\,({\it{list\/}})\index{length}) $\rightarrow$ ({\rm{nth}}\,({\it{n\/}}, {\it{list\/}})\index{nth} $\in$ {\it{list\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  swap-commutative \\ \index{swap-commutative}
{\rm{swap}}\,({\it{j\/}}, {\it{i\/}}, {\it{s\/}})\index{swap} $=$ {\rm{swap}}\,({\it{i\/}}, {\it{j\/}}, {\it{s\/}})\index{swap}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-replace-nth \\ \index{member-replace-nth}
\=\+({\it{x\/}} $\not\in$ {\it{l\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\it{x\/}} $\in$ {\rm{replace-nth}}\,({\it{i\/}}, {\it{v\/}}, {\it{l\/}})\index{replace-nth}) \\ 
$=$$\;\;\;\;$(({\it{x\/}} $=$ {\it{v\/}}) $\vee$ (({\it{x\/}} $=$ {\tt{0}}) $\wedge$ ({\rm{length}}\,({\it{l\/}})\index{length} $<$ {\it{i\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-replace-nth \\ \index{occurrences-replace-nth}
\=\+{\rm{occurrences}}\,({\it{x\/}}, {\rm{replace-nth}}\,({\it{n\/}}, {\it{v\/}}, {\it{list\/}})\index{replace-nth})\index{occurrences} \\ 
$=$$\;\;\;\;$(\=\+(\=\+{\rm{occurrences}}\,({\it{x\/}}, {\it{list\/}})\index{occurrences} \\ 
$+$$\;\;\;\;$\=\+{\bf if }{\it{v\/}} $=$ {\it{x\/}}$\;\;${\bf then }{\tt{1}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\- \\ 
$+$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $=$ {\tt{0}}$\;\;${\bf then }{\it{n\/}} $-$ {\rm{length}}\,({\it{list\/}})\index{length} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\- \\ 
$-$$\;\;\;\;$\=\+{\bf if }({\it{x\/}} $=$ {\rm{nth}}\,({\it{n\/}}, {\it{list\/}})\index{nth}) $\wedge$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{list\/}})\index{length})$\;\;${\bf then }{\tt{1}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-1 \\ \index{nthcdr-1}
{\rm{nthcdr}}\,({\tt{1}}, {\it{x\/}})\index{nthcdr} $=$ {\rm{cdr}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nlistp-nthcdr \\ \index{nlistp-nthcdr}
\=\+($\neg$ {\rm{listp}}\,({\it{s\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\it{s\/}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-firstn-plus \\ \index{nthcdr-firstn-plus}
\=\+({\rm{nthcdr}}\,({\it{n\/}}, {\rm{firstn}}\,({\it{n\/}} $+$ {\it{x\/}}, {\it{s\/}})\index{firstn})\index{nthcdr} $=$ {\rm{firstn}}\,({\it{x\/}}, {\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr})\index{firstn}) \\ 
$\wedge$$\;\;\;\;$({\rm{nthcdr}}\,({\it{n\/}}, {\rm{firstn}}\,({\it{x\/}} $+$ {\it{n\/}}, {\it{s\/}})\index{firstn})\index{nthcdr} $=$ {\rm{firstn}}\,({\it{x\/}}, {\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr})\index{firstn})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cdr-nthcdr-cons \\ \index{cdr-nthcdr-cons}
{\rm{cdr}}\,({\rm{nthcdr}}\,({\it{x\/}}, {\rm{cons}}\,({\it{a\/}}, {\it{b\/}}))\index{nthcdr}) $=$ {\rm{nthcdr}}\,({\it{x\/}}, {\it{b\/}})\index{nthcdr}
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{add1-sub1-induct} \\  
\=\+{\rm{add1-sub1-induct}}\,({\it{a\/}}, {\it{b\/}})\index{add1-sub1-induct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\rm{add1-sub1-induct}}\,($1\;+$ {\it{a\/}}, {\it{b\/}} $-\;1$)\index{add1-sub1-induct}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-nthcdr \\ \index{nth-nthcdr}
{\rm{nth}}\,({\it{n1\/}}, {\rm{nthcdr}}\,({\it{n2\/}}, {\it{s\/}})\index{nthcdr})\index{nth} $=$ {\rm{nth}}\,({\it{n1\/}} $+$ {\it{n2\/}}, {\it{s\/}})\index{nth}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-nthcdr \\ \index{nthcdr-nthcdr}
{\rm{nthcdr}}\,({\it{n1\/}}, {\rm{nthcdr}}\,({\it{n2\/}}, {\it{s\/}})\index{nthcdr})\index{nthcdr} $=$ {\rm{nthcdr}}\,({\it{n1\/}} $+$ {\it{n2\/}}, {\it{s\/}})\index{nthcdr}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-append-a-append-a \\ \index{equal-append-a-append-a}
({\rm{append}}\,({\it{a\/}}, {\it{x\/}}) $=$ {\rm{append}}\,({\it{a\/}}, {\it{y\/}})) $=$ ({\it{x\/}} $=$ {\it{y\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-replace-nth \\ \index{nthcdr-replace-nth}
\=\+{\rm{nthcdr}}\,({\it{n\/}}, {\rm{replace-nth}}\,({\it{i\/}}, {\it{v\/}}, {\it{l\/}})\index{replace-nth})\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{i\/}} $<$ {\it{n\/}}$\;\;${\bf then }{\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr} \\ 
{\bf else }{\rm{replace-nth}}\,({\it{i\/}} $-$ {\it{n\/}}, {\it{v\/}}, {\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr})\index{replace-nth}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-replace-nth \\ \index{firstn-replace-nth}
\=\+{\rm{firstn}}\,({\it{n\/}}, {\rm{replace-nth}}\,({\it{i\/}}, {\it{v\/}}, {\it{l\/}})\index{replace-nth})\index{firstn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{i\/}} $<$ {\it{n\/}}$\;\;${\bf then }{\rm{replace-nth}}\,({\it{i\/}}, {\it{v\/}}, {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn})\index{replace-nth} \\ 
{\bf else }{\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cdr-firstn-cons \\ \index{cdr-firstn-cons}
\=\+{\rm{cdr}}\,({\rm{firstn}}\,({\it{n\/}}, {\rm{cons}}\,({\it{a\/}}, {\it{b\/}}))\index{firstn}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{firstn}}\,({\it{n\/}} $-\;1$, {\it{b\/}})\index{firstn}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-firstn \\ \index{nth-firstn}
\=\+{\rm{nth}}\,({\it{n\/}}, {\rm{firstn}}\,({\it{n2\/}}, {\it{s\/}})\index{firstn})\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\it{n2\/}}$\;\;${\bf then }{\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-cons \\ \index{firstn-cons}
\=\+{\rm{firstn}}\,({\it{n\/}}, {\rm{cons}}\,({\it{a\/}}, {\it{b\/}}))\index{firstn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{cons}}\,({\it{a\/}}, {\rm{firstn}}\,({\it{n\/}} $-\;1$, {\it{b\/}})\index{firstn})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{double-sub1-induction} \\  
\=\+{\rm{double-sub1-induction}}\,({\it{a\/}}, {\it{b\/}})\index{double-sub1-induction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{a\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\rm{double-sub1-induction}}\,({\it{a\/}} $-\;1$, {\it{b\/}} $-\;1$)\index{double-sub1-induction}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-repeat-repeat \\ \index{equal-repeat-repeat}
\=\+({\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat} $=$ {\rm{repeat}}\,({\it{n2\/}}, {\it{v2\/}})\index{repeat}) \\ 
$=$$\;\;\;\;$(({\rm{fix}}\,({\it{n\/}}) $=$ {\rm{fix}}\,({\it{n2\/}})) $\wedge$ (({\it{v\/}} $=$ {\it{v2\/}}) $\vee$ ({\it{n\/}} $\simeq {\tt{0}}$)))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-too-big \\ \index{firstn-too-big}
\=\+({\rm{length}}\,({\it{x\/}})\index{length} $<$ {\it{n\/}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{firstn}}\,({\it{n\/}}, {\it{x\/}})\index{firstn} $=$ {\rm{append}}\,({\it{x\/}}, {\rm{repeat}}\,({\it{n\/}} $-$ {\rm{length}}\,({\it{x\/}})\index{length}, {\tt{0}})\index{repeat}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-firstn \\ \index{firstn-firstn}
\=\+{\rm{firstn}}\,({\it{a\/}}, {\rm{firstn}}\,({\it{b\/}}, {\it{x\/}})\index{firstn})\index{firstn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{b\/}} $<$ {\it{a\/}}$\;\;${\bf then }{\rm{append}}\,({\rm{firstn}}\,({\it{b\/}}, {\it{x\/}})\index{firstn}, {\rm{repeat}}\,({\it{a\/}} $-$ {\it{b\/}}, {\tt{0}})\index{repeat}) \\ 
{\bf else }{\rm{firstn}}\,({\it{a\/}}, {\it{x\/}})\index{firstn}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-repeat \\ \index{plist-repeat}
{\rm{plist}}\,({\rm{repeat}}\,({\it{n\/}}, {\it{x\/}})\index{repeat})\index{plist} $=$ {\rm{repeat}}\,({\it{n\/}}, {\it{x\/}})\index{repeat}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-1 \\ \index{firstn-1}
{\rm{firstn}}\,({\tt{1}}, {\it{s\/}})\index{firstn} $=$ {\rm{list}}\,({\rm{car}}\,({\it{s\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-cons-firstn \\ \index{nthcdr-cons-firstn}
\=\+{\rm{nthcdr}}\,({\it{w\/}}, {\rm{cons}}\,({\it{a\/}}, {\rm{firstn}}\,({\it{w\/}} $+$ {\it{x\/}}, {\it{b\/}})\index{firstn}))\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{w\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{cons}}\,({\it{a\/}}, {\rm{firstn}}\,({\it{x\/}}, {\it{b\/}})\index{firstn}) \\ 
{\bf else }{\rm{nthcdr}}\,({\it{w\/}} $-\;1$, {\rm{firstn}}\,({\it{w\/}} $+$ {\it{x\/}}, {\it{b\/}})\index{firstn})\index{nthcdr}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-sub1-firstn-plus \\ \index{nthcdr-sub1-firstn-plus}
\=\+({\it{w\/}} $\not\simeq {\tt{0}}$) \\ 
$\rightarrow$$\;\;\;\;$({\rm{nthcdr}}\,({\it{w\/}} $-\;1$, {\rm{firstn}}\,({\it{w\/}} $+$ {\it{x\/}}, {\it{b\/}})\index{firstn})\index{nthcdr} $=$ {\rm{firstn}}\,($1\;+$ {\it{x\/}}, {\rm{nthcdr}}\,({\it{w\/}} $-\;1$, {\it{b\/}})\index{nthcdr})\index{firstn})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-repeat \\ \index{nthcdr-repeat}
\=\+{\rm{nthcdr}}\,({\it{n1\/}}, {\rm{repeat}}\,({\it{n2\/}}, {\it{x\/}})\index{repeat})\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n2\/}} $<$ {\it{n1\/}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{repeat}}\,({\it{n2\/}} $-$ {\it{n1\/}}, {\it{x\/}})\index{repeat}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-nlistp \\ \index{firstn-nlistp}
({\it{l\/}} $\simeq\;${{\bf{nil}}}${}$) $\rightarrow$ ({\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn} $=$ {\rm{repeat}}\,({\it{n\/}}, {\tt{0}})\index{repeat})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{member-nth-firstn-induction} \\  
\=\+{\rm{member-nth-firstn-induction}}\,({\it{i\/}}, {\it{y\/}}, {\it{s\/}})\index{member-nth-firstn-induction} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{i\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\rm{member-nth-firstn-induction}}\,({\it{i\/}} $-\;1$, {\it{y\/}} $-\;1$, {\rm{cdr}}\,({\it{s\/}}))\index{member-nth-firstn-induction}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-nth-firstn \\ \index{member-nth-firstn}
({\it{i\/}} $<$ {\it{j\/}}) $\rightarrow$ ({\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth} $\in$ {\rm{firstn}}\,({\it{j\/}}, {\it{s\/}})\index{firstn})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-car-firstn \\ \index{member-car-firstn}
({\rm{car}}\,({\it{x\/}}) $\in$ {\rm{firstn}}\,({\it{n\/}}, {\it{x\/}})\index{firstn}) $=$ ({\it{n\/}} $\not\simeq {\tt{0}}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-nth-firstn-nthcdr \\ \index{member-nth-firstn-nthcdr}
(({\it{i\/}} $\not<$ {\it{y\/}}) $\wedge$ ({\it{i\/}} $<$ ({\it{x\/}} $+$ {\it{y\/}}))) $\rightarrow$ ({\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth} $\in$ {\rm{firstn}}\,({\it{x\/}}, {\rm{nthcdr}}\,({\it{y\/}}, {\it{s\/}})\index{nthcdr})\index{firstn})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests-means \\ \index{non-overlapping-requests-means}
{\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} $\rightarrow$ {\rm{non-overlapping-requests3}}\,({\rm{car}}\,({\it{r\/}}), {\rm{cdr}}\,({\it{r\/}}))\index{non-overlapping-requests3}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests2-cdr \\ \index{non-overlapping-requests2-cdr}
\=\+{\rm{non-overlapping-requests2}}\,({\it{r1\/}}, {\it{r2\/}})\index{non-overlapping-requests2} \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests2}}\,({\rm{cdr}}\,({\it{r1\/}}), {\rm{cdr}}\,({\it{r2\/}}))\index{non-overlapping-requests2}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests-cdr \\ \index{non-overlapping-requests-cdr}
{\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} $\rightarrow$ {\rm{non-overlapping-requests}}\,({\rm{cdr}}\,({\it{r\/}}))\index{non-overlapping-requests}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-firstn-only-if-member \\ \index{member-firstn-only-if-member}
({\it{x\/}} $\not\in$ {\it{l\/}}) $\rightarrow$ (({\it{x\/}} $\in$ {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn}) $=$ (({\it{x\/}} $=$ {\tt{0}}) $\wedge$ ({\rm{length}}\,({\it{l\/}})\index{length} $<$ {\it{n\/}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-nthcdr-only-if-member \\ \index{member-nthcdr-only-if-member}
({\it{x\/}} $\not\in$ {\it{l\/}}) $\rightarrow$ ({\it{x\/}} $\not\in$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-replace-nth \\ \index{nth-replace-nth}
\=\+{\rm{nth}}\,({\it{i\/}}, {\rm{replace-nth}}\,({\it{j\/}}, {\it{v\/}}, {\it{l\/}})\index{replace-nth})\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{fix}}\,({\it{i\/}}) $=$ {\rm{fix}}\,({\it{j\/}})$\;\;${\bf then }{\it{v\/}} \\ 
{\bf else }{\rm{nth}}\,({\it{i\/}}, {\it{l\/}})\index{nth}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-x-firstn-cons-x \\ \index{member-x-firstn-cons-x}
({\it{x\/}} $\in$ {\rm{firstn}}\,({\it{n\/}}, {\rm{cons}}\,({\it{x\/}}, {\it{y\/}}))\index{firstn}) $=$ ({\tt{0}} $<$ {\it{n\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{cars-non-nil-litatoms} \\  
\=\+{\rm{cars-non-nil-litatoms}}\,({\it{list\/}})\index{cars-non-nil-litatoms} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{list\/}}) \\ 
{\bf then }\=\+{\rm{litatom}}\,({\rm{caar}}\,({\it{list\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caar}}\,({\it{list\/}}) $\not=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\rm{cdr}}\,({\it{list\/}}))\index{cars-non-nil-litatoms}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  swap-preserves-good-schedule \\ \index{swap-preserves-good-schedule}
\=\+(\=\+{\rm{non-overlapping-requests3}}\,({\it{task-request-a\/}}, {\it{r\/}})\index{non-overlapping-requests3} \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests3}}\,({\it{task-request-b\/}}, {\it{r\/}})\index{non-overlapping-requests3} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $\not<$ {\rm{cadr}}\,({\it{task-request-a\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $\not<$ {\rm{cadr}}\,({\it{task-request-a\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $<$ {\rm{caddr}}\,({\it{task-request-a\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $<$ {\rm{caddr}}\,({\it{task-request-a\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $\not<$ {\rm{cadr}}\,({\it{task-request-b\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $\not<$ {\rm{cadr}}\,({\it{task-request-b\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $<$ {\rm{caddr}}\,({\it{task-request-b\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $<$ {\rm{caddr}}\,({\it{task-request-b\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth} $=$ {\rm{car}}\,({\it{task-request-a\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{nth}}\,({\it{j\/}}, {\it{s\/}})\index{nth} $=$ {\rm{car}}\,({\it{task-request-b\/}})) \\ 
$\wedge$$\;\;\;\;${\rm{litatom}}\,({\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth}) \\ 
$\wedge$$\;\;\;\;${\rm{litatom}}\,({\rm{nth}}\,({\it{j\/}}, {\it{s\/}})\index{nth}) \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule})\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,({\rm{swap}}\,({\it{i\/}}, {\it{j\/}}, {\it{s\/}})\index{swap}, {\it{r\/}})\index{good-schedule}\-
\end{tabbing}

\begin{verbatim}; return task request corresponding to task at time
\end{verbatim}\begin{tabbing}{\sc Definition}:\index{corresponding-request} \\  
\=\+{\rm{corresponding-request}}\,({\it{task\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{r\/}}) \\ 
{\bf then }\=\+{\bf if }\=\+({\rm{caar}}\,({\it{r\/}}) $=$ {\it{task\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{time\/}} $\not<$ {\rm{cadar}}\,({\it{r\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{time\/}} $<$ {\rm{caddar}}\,({\it{r\/}}))\-$\;\;${\bf then }{\rm{car}}\,({\it{r\/}}) \\ 
{\bf else }{\rm{corresponding-request}}\,({\it{task\/}}, {\it{time\/}}, {\rm{cdr}}\,({\it{r\/}}))\index{corresponding-request}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{f}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{all-non-nil-corresponding} \\  
\=\+{\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\it{time\/}})\index{all-non-nil-corresponding} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{time\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length} \\ 
{\bf then }\=\+(\=\+{\rm{corresponding-request}}\,({\rm{nth}}\,({\it{time\/}}, {\it{s\/}})\index{nth}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\vee$$\;\;\;\;$({\rm{nth}}\,({\it{time\/}}, {\it{s\/}})\index{nth} $=$ {\bf{nil}}))\- \\ 
$\wedge$$\;\;\;\;${\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, $1\;+$ {\it{time\/}})\index{all-non-nil-corresponding}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests2-member \\ \index{non-overlapping-requests2-membe!r}
\=\+({\rm{non-overlapping-requests2}}\,({\it{r1\/}}, {\it{r2\/}})\index{non-overlapping-requests2} $\wedge$ {\rm{sublistp}}\,({\it{r1\/}}, {\it{r2\/}})\index{sublistp} $\wedge$ ({\it{e\/}} $\in$ {\it{r1\/}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests3}}\,({\it{e\/}}, {\it{r2\/}})\index{non-overlapping-requests3}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests3-member \\ \index{non-overlapping-requests3-membe!r}
\=\+({\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} $\wedge$ ({\it{e\/}} $\in$ {\it{r\/}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests3}}\,({\it{e\/}}, {\it{r\/}})\index{non-overlapping-requests3}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-corresponding-request-nth \\ \index{member-corresponding-request-nt!h}
\=\+{\rm{corresponding-request}}\,({\it{task\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\rightarrow$$\;\;\;\;$({\rm{corresponding-request}}\,({\it{task\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request} $\in$ {\it{r\/}})\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{all-litatoms} \\  
\=\+{\rm{all-litatoms}}\,({\it{list\/}})\index{all-litatoms} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{list\/}})$\;\;${\bf then }{\rm{litatom}}\,({\rm{car}}\,({\it{list\/}})) $\wedge$ {\rm{all-litatoms}}\,({\rm{cdr}}\,({\it{list\/}}))\index{all-litatoms} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  litatom-nth \\ \index{litatom-nth}
{\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} $\rightarrow$ ({\rm{litatom}}\,({\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth}) $=$ ({\it{i\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-first-instance-s \\ \index{lessp-first-instance-s}
({\rm{first-instance}}\,({\it{time\/}}, {\it{task\/}}, {\it{s\/}})\index{first-instance} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) $=$ {\rm{listp}}\,({\it{s\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-nthcdr-from-cdr \\ \index{member-nthcdr-from-cdr}
\=\+(({\it{x\/}} $\not\in$ {\rm{nthcdr}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{s\/}}))\index{nthcdr}) $\wedge$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length})) \\ 
$\rightarrow$$\;\;\;\;$(({\it{x\/}} $\in$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr}) $=$ ({\it{x\/}} $=$ {\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-nthcdr \\ \index{listp-nthcdr}
{\rm{listp}}\,({\rm{nthcdr}}\,({\it{n\/}}, {\it{x\/}})\index{nthcdr}) $=$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{x\/}})\index{length})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  car-nthcdr \\ \index{car-nthcdr}
\=\+{\rm{car}}\,({\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\rm{length}}\,({\it{l\/}})\index{length}$\;\;${\bf then }{\rm{nth}}\,({\it{n\/}}, {\it{l\/}})\index{nth} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-first-instance-simple \\ \index{nth-first-instance-simple}
\=\+({\rm{nth}}\,({\rm{first-instance}}\,({\it{n\/}}, {\it{x\/}}, {\it{s\/}})\index{first-instance}, {\it{s\/}})\index{nth} $=$ {\it{x\/}}) \\ 
$=$$\;\;\;\;$(({\it{x\/}} $\in$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr}) $\vee$ ({\rm{car}}\,({\it{s\/}}) $=$ {\it{x\/}}))\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  equal-occurrences-firstn-nthcdr \\ \index{equal-occurrences-firstn-nthcdr}
\=\+({\it{n1\/}} $<$ {\it{n2\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+{\rm{occurrences}}\,({\it{x\/}}, {\rm{firstn}}\,({\it{n1\/}}, {\rm{nthcdr}}\,({\it{n\/}}, {\it{list\/}})\index{nthcdr})\index{firstn})\index{occurrences} \\ 
$=$$\;\;\;\;${\rm{occurrences}}\,({\it{x\/}}, {\rm{firstn}}\,({\it{n2\/}}, {\rm{nthcdr}}\,({\it{n\/}}, {\it{list\/}})\index{nthcdr})\index{firstn})\index{occurrences})\- \\ 
$=$$\;\;\;\;$({\it{x\/}} $\not\in$ {\rm{firstn}}\,({\it{n2\/}} $-$ {\it{n1\/}}, {\rm{nthcdr}}\,({\it{n\/}} $+$ {\it{n1\/}}, {\it{list\/}})\index{nthcdr})\index{firstn}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-firstn-lessp \\ \index{member-firstn-lessp}
(({\it{x\/}} $\in$ {\rm{firstn}}\,({\it{n1\/}}, {\it{l\/}})\index{firstn}) $\wedge$ ({\it{n2\/}} $\not<$ {\it{n1\/}})) $\rightarrow$ ({\it{x\/}} $\in$ {\rm{firstn}}\,({\it{n2\/}}, {\it{l\/}})\index{firstn})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-least-deadline \\ \index{member-least-deadline}
({\rm{least-deadline}}\,({\it{r\/}})\index{least-deadline} $\in$ {\it{r\/}}) $=$ {\rm{listp}}\,({\it{r\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-task-later-in-good-schedule \\ \index{unfulfilled-task-later-in-good-!schedule}
\=\+(\=\+{\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;${\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;$({\it{tr\/}} $\in$ {\rm{unfulfilled}}\,({\it{element\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{car}}\,({\it{tr\/}}) $\in$ {\rm{nthcdr}}\,({\it{element\/}}, {\it{s\/}})\index{nthcdr})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  car-corresponding-request \\ \index{car-corresponding-request}
\=\+{\rm{corresponding-request}}\,({\it{task\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\rightarrow$$\;\;\;\;$({\rm{car}}\,({\rm{corresponding-request}}\,({\it{task\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request}) $=$ {\it{task\/}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  active-task-has-later-deadline \\ \index{active-task-has-later-deadline}
({\it{tr\/}} $\in$ {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests}) $\rightarrow$ ({\it{element\/}} $<$ {\rm{caddr}}\,({\it{tr\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  sublistp-unfulfilled \\ \index{sublistp-unfulfilled}
{\rm{sublistp}}\,({\rm{unfulfilled}}\,({\it{e\/}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled}, {\it{r\/}})\index{sublistp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  least-deadline-has-later-deadline \\ \index{least-deadline-has-later-deadli!ne}
\=\+{\rm{listp}}\,({\rm{unfulfilled}}\,({\it{element\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\it{element\/}} $<$ {\rm{caddr}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{element\/}}, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{element\/}}, \\ 
{\it{r\/}})\-\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline})) \\ 
$=$$\;\;\;\;${\bf{t}})\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  active-task-hasnt-earlier-start \\ \index{active-task-hasnt-earlier-start}
({\it{tr\/}} $\in$ {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests}) $\rightarrow$ ({\it{element\/}} $\not<$ {\rm{cadr}}\,({\it{tr\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-corresponding-request-deadline \\ \index{lessp-corresponding-request-dea!dline}
\=\+{\rm{corresponding-request}}\,({\rm{nth}}\,({\it{element\/}}, {\it{s\/}})\index{nth}, {\it{element\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\it{element\/}} $<$ {\rm{caddr}}\,({\rm{corresponding-request}}\,({\rm{nth}}\,({\it{element\/}}, {\it{s\/}})\index{nth}, {\it{element\/}}, {\it{r\/}})\index{corresponding-request})) \\ 
$=$$\;\;\;\;${\bf{t}})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  least-deadline-hasnt-earlier-start \\ \index{least-deadline-hasnt-earlier-st!art}
\=\+{\rm{listp}}\,({\rm{unfulfilled}}\,({\it{element\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\it{element\/}} $<$ {\rm{cadr}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{element\/}}, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{element\/}}, \\ 
{\it{r\/}})\-\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline})) \\ 
$=$$\;\;\;\;${\bf{f}})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-corresponding-request-start \\ \index{lessp-corresponding-request-sta!rt}
\=\+{\rm{corresponding-request}}\,({\it{x\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\rightarrow$$\;\;\;\;$({\it{time\/}} $\not<$ {\rm{cadr}}\,({\rm{corresponding-request}}\,({\it{x\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-corresponding-request-deadline-linear \\ \index{lessp-corresponding-request-dea!dline-linear}
\=\+{\rm{corresponding-request}}\,({\it{x\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\rightarrow$$\;\;\;\;$({\it{time\/}} $<$ {\rm{caddr}}\,({\rm{corresponding-request}}\,({\it{x\/}}, {\it{time\/}}, {\it{r\/}})\index{corresponding-request}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  sublistp-active-task-requests \\ \index{sublistp-active-task-requests}
{\rm{sublistp}}\,({\rm{active-task-requests}}\,({\it{time\/}}, {\it{r\/}})\index{active-task-requests}, {\it{r\/}})\index{sublistp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-means-all-cars-not-litatoms \\ \index{member-means-all-cars-not-litat!oms}
(({\it{x\/}} $\in$ {\it{r\/}}) $\wedge$ ($\neg$ {\rm{litatom}}\,({\rm{car}}\,({\it{x\/}})))) $\rightarrow$ ($\neg$ {\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-least-deadline-unfulfilled \\ \index{member-least-deadline-unfulfille!d}
\=\+{\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\rightarrow$$\;\;\;\;$(\=\+(\=\+{\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{element\/}}, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline} \\ 
$\in$$\;\;\;\;${\it{r\/}})\- \\ 
$=$$\;\;\;\;${\rm{listp}}\,({\rm{unfulfilled}}\,({\it{element\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-numberp-corresponding \\ \index{not-numberp-corresponding}
\=\+({\it{element\/}} $\not\in\;${\bf{N}}${}$) \\ 
$\rightarrow$$\;\;\;\;$({\rm{corresponding-request}}\,({\it{x\/}}, {\it{element\/}}, {\it{r\/}})\index{corresponding-request} $=$ {\rm{corresponding-request}}\,({\it{x\/}}, {\tt{0}}, {\it{r\/}})\index{corresponding-request})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-firstn-means-lessp-first-instance \\ \index{member-firstn-means-lessp-first!-instance}
\=\+({\it{v\/}} $\in$ {\rm{firstn}}\,({\it{n\/}} $-$ {\it{time\/}}, {\rm{nthcdr}}\,({\it{time\/}}, {\it{s\/}})\index{nthcdr})\index{firstn}) \\ 
$\rightarrow$$\;\;\;\;$(({\rm{first-instance}}\,({\it{time\/}}, {\it{v\/}}, {\it{s\/}})\index{first-instance} $<$ {\it{n\/}}) $=$ {\bf{t}})\-
\end{tabbing}

   
\begin{tabbing}{\sc Theorem}:  first-instance-member-unfulfilled-not-past-deadline \\ \index{first-instance-member-unfulfille!d-not-past-deadline}
\=\+(\=\+{\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;$({\it{tr\/}} $\in$ {\rm{unfulfilled}}\,({\it{element\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}))\- \\ 
$\rightarrow$$\;\;\;\;$(({\rm{first-instance}}\,({\it{element\/}}, {\rm{car}}\,({\it{tr\/}}), {\it{s\/}})\index{first-instance} $<$ {\rm{caddr}}\,({\it{tr\/}})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-firstn-instance-time \\ \index{lessp-firstn-instance-time}
\=\+({\it{time\/}} $\not<$ {\it{n\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{first-instance}}\,({\it{time\/}}, {\it{v\/}}, {\it{s\/}})\index{first-instance} $<$ {\it{n\/}}) \\ 
$=$$\;\;\;\;$(({\it{v\/}} $\not\in$ {\rm{nthcdr}}\,({\it{time\/}}, {\it{s\/}})\index{nthcdr}) $\wedge$ ({\it{n\/}} $\not\simeq {\tt{0}}$)))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  first-instance-member-unfulfilled-not-before-start \\ \index{first-instance-member-unfulfille!d-not-before-start}
\=\+(\=\+{\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;$({\it{tr\/}} $\in$ {\rm{unfulfilled}}\,({\it{element\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}))\- \\ 
$\rightarrow$$\;\;\;\;$(({\rm{first-instance}}\,({\it{element\/}}, {\rm{car}}\,({\it{tr\/}}), {\it{s\/}})\index{first-instance} $<$ {\rm{cadr}}\,({\it{tr\/}})) $=$ {\bf{f}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-corresponding-request \\ \index{member-corresponding-request}
\=\+({\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} $\wedge$ {\rm{corresponding-request}}\,({\rm{nth}}\,({\it{element\/}}, {\it{s\/}})\index{nth}, {\it{element\/}}, {\it{r\/}})\index{corresponding-request}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{corresponding-request}}\,({\rm{nth}}\,({\it{element\/}}, {\it{s\/}})\index{nth}, {\it{element\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\in$$\;\;\;\;${\rm{unfulfilled}}\,({\it{element\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled})\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{member-deadline-induct} \\  
\=\+{\rm{member-deadline-induct}}\,({\it{x\/}}, {\it{l\/}})\index{member-deadline-induct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{l\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\rm{cdr}}\,({\it{l\/}})) \\ 
{\bf then }\=\+{\bf if }{\rm{caddar}}\,({\it{l\/}}) $<$ {\rm{caddadr}}\,({\it{l\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{x\/}} $=$ {\rm{cadr}}\,({\it{l\/}}) \\ 
{\bf then }{\rm{member-deadline-induct}}\,(\=\+{\rm{car}}\,({\it{l\/}}), \\ 
{\rm{cons}}\,({\rm{car}}\,({\it{l\/}}), {\rm{cddr}}\,({\it{l\/}})))\-\index{member-deadline-induct} \\ 
{\bf else }{\rm{member-deadline-induct}}\,(\=\+{\it{x\/}}, \\ 
{\rm{cons}}\,({\rm{car}}\,({\it{l\/}}), {\rm{cddr}}\,({\it{l\/}})))\-\index{member-deadline-induct}$\;${\bf  endif}\- \\ 
{\bf elseif }{\it{x\/}} $=$ {\rm{car}}\,({\it{l\/}}) \\ 
{\bf then }{\rm{member-deadline-induct}}\,({\rm{cadr}}\,({\it{l\/}}), {\rm{cons}}\,({\rm{cadr}}\,({\it{l\/}}), {\rm{cddr}}\,({\it{l\/}})))\index{member-deadline-induct} \\ 
{\bf else }{\rm{member-deadline-induct}}\,({\it{x\/}}, {\rm{cons}}\,({\rm{cadr}}\,({\it{l\/}}), {\rm{cddr}}\,({\it{l\/}})))\index{member-deadline-induct}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}
            

\begin{tabbing}{\sc Theorem}:  member-deadline-not-less-than-least-deadline \\ \index{member-deadline-not-less-than-le!ast-deadline}
({\it{x\/}} $\in$ {\it{l\/}}) $\rightarrow$ (({\rm{caddr}}\,({\it{x\/}}) $<$ {\rm{caddr}}\,({\rm{least-deadline}}\,({\it{l\/}})\index{least-deadline})) $=$ {\bf{f}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  first-instance-member-unfulfilled-not-past-deadline-better \\ \index{first-instance-member-unfulfille!d-not-past-deadline-better}
\=\+(\=\+{\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;$({\it{tr\/}} $\in$ {\rm{unfulfilled}}\,({\it{element\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{element\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}) \\ 
$\wedge$$\;\;\;\;$({\rm{caddr}}\,({\it{tr2\/}}) $\not<$ {\rm{caddr}}\,({\it{tr\/}})))\- \\ 
$\rightarrow$$\;\;\;\;$(({\rm{first-instance}}\,({\it{element\/}}, {\rm{car}}\,({\it{tr\/}}), {\it{s\/}})\index{first-instance} $<$ {\rm{caddr}}\,({\it{tr2\/}})) $=$ {\bf{t}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests3-simple \\ \index{non-overlapping-requests3-simple}
\=\+({\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} $\wedge$ ($\neg$ {\rm{listp}}\,({\it{tr\/}}))) \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests3}}\,({\it{tr\/}}, {\it{r\/}})\index{non-overlapping-requests3}\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  swap-preserves-good-schedule-simple \\ \index{swap-preserves-good-schedule-si!mple}
\=\+(\=\+{\rm{non-overlapping-requests3}}\,({\it{task-request\/}}, {\it{r\/}})\index{non-overlapping-requests3} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $\not<$ {\rm{cadr}}\,({\it{task-request\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $\not<$ {\rm{cadr}}\,({\it{task-request\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $<$ {\rm{caddr}}\,({\it{task-request\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{j\/}} $<$ {\rm{caddr}}\,({\it{task-request\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{nth}}\,({\it{j\/}}, {\it{s\/}})\index{nth} $=$ {\rm{car}}\,({\it{task-request\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth} $=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;${\rm{litatom}}\,({\rm{nth}}\,({\it{j\/}}, {\it{s\/}})\index{nth}) \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule})\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,({\rm{swap}}\,({\it{i\/}}, {\it{j\/}}, {\it{s\/}})\index{swap}, {\it{r\/}})\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-too-big \\ \index{nth-too-big}
({\it{i\/}} $\not<$ {\rm{length}}\,({\it{s\/}})\index{length}) $\rightarrow$ ({\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth} $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-corresponding-request-means-nil \\ \index{not-corresponding-request-means!-nil}
\=\+(\=\+{\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{all-non-nil-corresponding} \\ 
$\wedge$$\;\;\;\;$($\neg$ {\rm{corresponding-request}}\,({\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth}, {\it{i\/}}, {\it{r\/}})\index{corresponding-request}) \\ 
$\wedge$$\;\;\;\;$({\it{i\/}} $\not<$ {\it{n\/}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{nth}}\,({\it{i\/}}, {\it{s\/}})\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{i\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-)\-\-
\end{tabbing}


\begin{verbatim};; takes 1/2 hr without disable-theory t
\end{verbatim}\begin{tabbing}{\sc Theorem}:  make-element-edf-preserves-good-schedule \\ \index{make-element-edf-preserves-good!-schedule}
\=\+(\=\+({\it{element\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\tt{0}})\index{all-non-nil-corresponding} \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule})\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{element\/}})\index{make-element-edf}, {\it{r\/}})\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-litatoms-replace-nth \\ \index{all-litatoms-replace-nth}
\=\+{\rm{all-litatoms}}\,({\rm{replace-nth}}\,({\it{n\/}}, {\it{v\/}}, {\it{x\/}})\index{replace-nth})\index{all-litatoms} \\ 
$=$$\;\;\;\;$(\=\+{\rm{litatom}}\,({\it{v\/}}) \\ 
$\wedge$$\;\;\;\;$({\rm{length}}\,({\it{x\/}})\index{length} $\not<$ {\it{n\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{all-litatoms}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{x\/}})\index{firstn})\index{all-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-litatoms}}\,({\rm{nthcdr}}\,($1\;+$ {\it{n\/}}, {\it{x\/}})\index{nthcdr})\index{all-litatoms})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-litatoms-nthcdr \\ \index{all-litatoms-nthcdr}
{\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} $\rightarrow$ {\rm{all-litatoms}}\,({\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr})\index{all-litatoms}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-litatoms-repeat \\ \index{all-litatoms-repeat}
{\rm{all-litatoms}}\,({\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat})\index{all-litatoms} $=$ (({\it{n\/}} $\simeq {\tt{0}}$) $\vee$ {\rm{litatom}}\,({\it{v\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-litatoms-firstn \\ \index{all-litatoms-firstn}
{\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} $\rightarrow$ ({\rm{all-litatoms}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{s\/}})\index{firstn})\index{all-litatoms} $=$ ({\rm{length}}\,({\it{s\/}})\index{length} $\not<$ {\it{n\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  make-element-edf-preserves-all-litatoms \\ \index{make-element-edf-preserves-all-!litatoms}
\=\+(\=\+({\it{element\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\tt{0}})\index{all-non-nil-corresponding} \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule})\- \\ 
$\rightarrow$$\;\;\;\;${\rm{all-litatoms}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{element\/}})\index{make-element-edf})\index{all-litatoms}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-lessp-sub1x-y-x-y \\ \index{equal-lessp-sub1x-y-x-y}
((({\it{x\/}} $-\;1$) $<$ {\it{y\/}}) $=$ ({\it{x\/}} $<$ {\it{y\/}})) $=$ (({\it{x\/}} $\simeq {\tt{0}}$) $\vee$ ({\rm{fix}}\,({\it{x\/}}) $\not=$ {\rm{fix}}\,({\it{y\/}})))
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  all-non-nil-corresponding-replace-simple \\ \index{all-non-nil-corresponding-repla!ce-simple}
\=\+({\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{all-non-nil-corresponding} $\wedge$ ({\it{n1\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{all-non-nil-corresponding}}\,({\rm{replace-nth}}\,({\it{n1\/}}, {\it{v\/}}, {\it{s\/}})\index{replace-nth}, {\it{r\/}}, {\it{n\/}})\index{all-non-nil-corresponding} \\ 
$=$$\;\;\;\;$({\rm{corresponding-request}}\,({\it{v\/}}, {\it{n1\/}}, {\it{r\/}})\index{corresponding-request} $\vee$ ({\it{v\/}} $=$ {\bf{nil}}) $\vee$ ({\it{n1\/}} $<$ {\it{n\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  car-replace-nth \\ \index{car-replace-nth}
\=\+{\rm{car}}\,({\rm{replace-nth}}\,({\it{n\/}}, {\it{v\/}}, {\it{s\/}})\index{replace-nth}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\it{v\/}} \\ 
{\bf else }{\rm{car}}\,({\it{s\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-corresponding-request-means \\ \index{not-corresponding-request-means}
\=\+(\=\+($\neg$ {\rm{corresponding-request}}\,({\it{v1\/}}, {\it{n1\/}}, {\it{r\/}})\index{corresponding-request}) \\ 
$\wedge$$\;\;\;\;$({\it{v1\/}} $\not=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;$({\rm{nth}}\,({\it{n1\/}}, {\it{s\/}})\index{nth} $=$ {\it{v1\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $\not<$ {\it{n\/}}))\- \\ 
$\rightarrow$$\;\;\;\;$($\neg$ {\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{all-non-nil-corresponding})\-
\end{tabbing}
  
\begin{tabbing}{\sc Theorem}:  all-non-nil-corresponding-cons \\ \index{all-non-nil-corresponding-cons}
\=\+{\rm{all-non-nil-corresponding}}\,({\rm{cons}}\,({\it{a\/}}, {\it{b\/}}), {\it{r\/}}, {\it{n\/}})\index{all-non-nil-corresponding} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{all-non-nil-corresponding}}\,({\rm{cons}}\,({\it{x\/}}, {\it{b\/}}), {\it{r\/}}, {\it{n\/}})\index{all-non-nil-corresponding} \\ 
$=$$\;\;\;\;$(({\it{x\/}} $=$ {\bf{nil}}) $\vee$ {\rm{corresponding-request}}\,({\it{x\/}}, {\tt{0}}, {\it{r\/}})\index{corresponding-request} $\vee$ ({\it{n\/}} $\not\simeq {\tt{0}}$)))\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  all-non-nil-corresponding-replace-replace \\ \index{all-non-nil-corresponding-repla!ce-replace}
\=\+(\=\+{\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{all-non-nil-corresponding} \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;$({\it{n2\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{all-non-nil-corresponding}}\,(\=\+{\rm{replace-nth}}\,({\it{n2\/}}, {\it{v2\/}}, {\rm{replace-nth}}\,({\it{n1\/}}, {\it{v1\/}}, {\it{s\/}})\index{replace-nth})\index{replace-nth}, \\ 
{\it{r\/}}, \\ 
{\it{n\/}})\-\index{all-non-nil-corresponding} \\ 
$=$$\;\;\;\;$(\=\+(\=\+{\rm{corresponding-request}}\,({\it{v1\/}}, {\it{n1\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\vee$$\;\;\;\;$({\it{v1\/}} $=$ {\bf{nil}}) \\ 
$\vee$$\;\;\;\;$({\it{n1\/}} $<$ {\it{n\/}}) \\ 
$\vee$$\;\;\;\;$({\rm{fix}}\,({\it{n1\/}}) $=$ {\rm{fix}}\,({\it{n2\/}})))\- \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{corresponding-request}}\,({\it{v2\/}}, {\it{n2\/}}, {\it{r\/}})\index{corresponding-request} \\ 
$\vee$$\;\;\;\;$({\it{v2\/}} $=$ {\bf{nil}}) \\ 
$\vee$$\;\;\;\;$({\it{n2\/}} $<$ {\it{n\/}}))\-)\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-first-instance \\ \index{nth-first-instance}
({\it{v\/}} $\in$ {\rm{nthcdr}}\,({\it{time\/}}, {\it{s\/}})\index{nthcdr}) $\rightarrow$ ({\rm{nth}}\,({\rm{first-instance}}\,({\it{time\/}}, {\it{v\/}}, {\it{s\/}})\index{first-instance}, {\it{s\/}})\index{nth} $=$ {\it{v\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  car-corresponding-request-better \\ \index{car-corresponding-request-bette!r}
\=\+{\rm{car}}\,({\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request}$\;\;${\bf then }{\it{v\/}} \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equivalent-corresponding-requests \\ \index{equivalent-corresponding-request!s}
\=\+(\=\+{\rm{non-overlapping-requests3}}\,({\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request}, {\it{r\/}})\index{non-overlapping-requests3} \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $\not<$ {\rm{cadr}}\,({\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request})) \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $<$ {\rm{caddr}}\,({\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request})))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{corresponding-request}}\,({\it{v\/}}, {\it{n1\/}}, {\it{r\/}})\index{corresponding-request} $=$ {\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request})\-
\end{tabbing}
   

\begin{tabbing}{\sc Theorem}:  lessp-n-1 \\ \index{lessp-n-1}
({\it{n\/}} $<$ {\tt{1}}) $=$ ({\it{n\/}} $\simeq {\tt{0}}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-corresponding-request-simplify \\ \index{member-corresponding-request-si!mplify}
\=\+{\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request} $\in$ {\it{r\/}}) \\ 
$\leftrightarrow$$\;\;\;\;${\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-corresponding-request2 \\ \index{member-corresponding-request2}
\=\+(\=\+{\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\it{n1\/}})\index{all-non-nil-corresponding} \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $\not<$ {\it{n1\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;$({\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth} $\not=$ {\bf{nil}}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{corresponding-request}}\,({\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth}, {\it{n\/}}, {\it{r\/}})\index{corresponding-request} $\in$ {\it{r\/}})\-
\end{tabbing}


\begin{verbatim};;; the best thereom would be about make-element-edf's preserving
;;; all-non-nil-corresponding.  But we'll punt on that for now,
;;; and use the fact that periodic request schedules are "full"
;;; and thus all reasonable schedules have corresponding requests

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{all-nils-or-cars} \\  
\=\+{\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{r\/}})\index{all-nils-or-cars} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{s\/}}) \\ 
{\bf then }\=\+(({\rm{car}}\,({\it{s\/}}) $=$ {\bf{nil}}) $\vee$ {\rm{assoc}}\,({\rm{car}}\,({\it{s\/}}), {\it{r\/}})) \\ 
$\wedge$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\rm{cdr}}\,({\it{s\/}}), {\it{r\/}})\index{all-nils-or-cars}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  corresponding-request-append \\ \index{corresponding-request-append}
\=\+{\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\rm{append}}\,({\it{r1\/}}, {\it{r2\/}}))\index{corresponding-request} \\ 
$\leftrightarrow$$\;\;\;\;$({\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r1\/}})\index{corresponding-request} $\vee$ {\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\it{r2\/}})\index{corresponding-request})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  corresponding-request-different-name \\ \index{corresponding-request-different!-name}
\=\+({\rm{car}}\,({\it{pt\/}}) $\not=$ {\it{tk\/}}) \\ 
$\rightarrow$$\;\;\;\;$($\neg$ {\rm{corresponding-request}}\,({\it{tk\/}}, {\it{n\/}}, {\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{corresponding-request})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  corresponding-request-periodic-task \\ \index{corresponding-request-periodic-t!ask}
\=\+(\=\+{\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp} \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\it{n2\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $\not<$ {\it{n1\/}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{corresponding-request}}\,({\it{tk\/}}, {\it{n\/}}, {\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{corresponding-request} \\ 
$\leftrightarrow$$\;\;\;\;$({\rm{car}}\,({\it{pt\/}}) $=$ {\it{tk\/}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-nlistp \\ \index{all-nils-or-cars-nlistp}
\=\+($\neg$ {\rm{listp}}\,({\it{x\/}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{all-nils-or-cars}}\,({\it{l\/}}, {\it{x\/}})\index{all-nils-or-cars} $=$ ({\rm{plist}}\,({\it{l\/}})\index{plist} $=$ {\rm{repeat}}\,({\rm{length}}\,({\it{l\/}})\index{length}, {\bf{nil}})\index{repeat}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  assoc-nth-pts \\ \index{assoc-nth-pts}
\=\+(({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) $\wedge$ {\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{pts\/}})\index{all-nils-or-cars} $\wedge$ ({\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth} $\not=$ {\bf{nil}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{assoc}}\,({\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth}, {\it{pts\/}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  corresponding-request-periodic-tasks \\ \index{corresponding-request-periodic-t!asks}
\=\+(\=\+{\rm{assoc}}\,({\it{v\/}}, {\it{pts\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\rm{assoc}}\,({\it{v\/}}, {\it{pts\/}}))) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\it{n2\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $\not<$ {\it{n1\/}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{corresponding-request}}\,({\it{v\/}}, {\it{n\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests})\index{corresponding-request}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-replace-nth \\ \index{all-nils-or-cars-replace-nth}
\=\+({\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{r\/}})\index{all-nils-or-cars} $\wedge$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{all-nils-or-cars}}\,({\rm{replace-nth}}\,({\it{n\/}}, {\it{v\/}}, {\it{s\/}})\index{replace-nth}, {\it{r\/}})\index{all-nils-or-cars} \\ 
$=$$\;\;\;\;$(({\it{v\/}} $=$ {\bf{nil}}) $\vee$ {\rm{assoc}}\,({\it{v\/}}, {\it{r\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-non-nil-corresponding-periodic-requests \\ \index{all-non-nil-corresponding-perio!dic-requests}
\=\+(\=\+{\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$({\rm{fix}}\,({\it{n1\/}}) $=$ {\rm{length}}\,({\it{s\/}})\index{length}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n1\/}})\index{periodic-tasks-requests}, {\it{n\/}})\index{all-non-nil-corresponding}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{double-sub1-cdr-induct} \\  
\=\+{\rm{double-sub1-cdr-induct}}\,({\it{n1\/}}, {\it{n2\/}}, {\it{s\/}})\index{double-sub1-cdr-induct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n2\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\rm{double-sub1-cdr-induct}}\,({\it{n1\/}} $-\;1$, {\it{n2\/}} $-\;1$, {\rm{cdr}}\,({\it{s\/}}))\index{double-sub1-cdr-induct}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-replace-nth-replace-nth \\ \index{all-nils-or-cars-replace-nth-rep!lace-nth}
\=\+({\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{r\/}})\index{all-nils-or-cars} $\wedge$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) $\wedge$ ({\it{n2\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{all-nils-or-cars}}\,({\rm{replace-nth}}\,({\it{n\/}}, {\it{v\/}}, {\rm{replace-nth}}\,({\it{n2\/}}, {\it{v2\/}}, {\it{s\/}})\index{replace-nth})\index{replace-nth}, {\it{r\/}})\index{all-nils-or-cars} \\ 
$=$$\;\;\;\;$(\=\+(({\it{v\/}} $=$ {\bf{nil}}) $\vee$ {\rm{assoc}}\,({\it{v\/}}, {\it{r\/}})) \\ 
$\wedge$$\;\;\;\;$(\=\+({\it{v2\/}} $=$ {\bf{nil}}) \\ 
$\vee$$\;\;\;\;${\rm{assoc}}\,({\it{v2\/}}, {\it{r\/}}) \\ 
$\vee$$\;\;\;\;$({\rm{fix}}\,({\it{n\/}}) $=$ {\rm{fix}}\,({\it{n2\/}})))\-)\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-0-length-means-listp \\ \index{lessp-0-length-means-listp}
({\it{n\/}} $<$ {\rm{length}}\,({\it{l\/}})\index{length}) $\rightarrow$ {\rm{listp}}\,({\it{l\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-make-element-edf \\ \index{all-nils-or-cars-make-element-e!df}
\=\+({\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{pts\/}})\index{all-nils-or-cars} $\wedge$ {\rm{listp}}\,({\it{s\/}}) $\wedge$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length})) \\ 
$\rightarrow$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{pts1\/}}, {\it{n\/}})\index{make-element-edf}, {\it{pts\/}})\index{all-nils-or-cars}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  make-schedule-edf-preserves-good-schedule \\ \index{make-schedule-edf-preserves-goo!d-schedule}
\=\+(\=\+{\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\tt{0}})\index{all-non-nil-corresponding} \\ 
$\wedge$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;$({\it{r\/}} $=$ {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\rm{length}}\,({\it{s\/}})\index{length})\index{periodic-tasks-requests}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp})\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,({\rm{make-schedule-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-schedule-edf}, {\it{r\/}})\index{good-schedule}\-
\end{tabbing}

\begin{verbatim};;;;;;;;;;;

\end{verbatim}\begin{tabbing}{\sc Theorem}:  non-overlapping-requests2-append \\ \index{non-overlapping-requests2-appen!d}
\=\+{\rm{non-overlapping-requests2}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}), {\it{r\/}})\index{non-overlapping-requests2} \\ 
$=$$\;\;\;\;$({\rm{non-overlapping-requests2}}\,({\it{a\/}}, {\it{r\/}})\index{non-overlapping-requests2} $\wedge$ {\rm{non-overlapping-requests2}}\,({\it{b\/}}, {\it{r\/}})\index{non-overlapping-requests2})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-plist \\ \index{all-nils-or-cars-plist}
{\rm{all-nils-or-cars}}\,({\rm{plist}}\,({\it{a\/}})\index{plist}, {\it{pts\/}})\index{all-nils-or-cars} $=$ {\rm{all-nils-or-cars}}\,({\it{a\/}}, {\it{pts\/}})\index{all-nils-or-cars}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-append \\ \index{all-nils-or-cars-append}
\=\+{\rm{all-nils-or-cars}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}), {\it{pts\/}})\index{all-nils-or-cars} \\ 
$=$$\;\;\;\;$({\rm{all-nils-or-cars}}\,({\it{a\/}}, {\it{pts\/}})\index{all-nils-or-cars} $\wedge$ {\rm{all-nils-or-cars}}\,({\it{b\/}}, {\it{pts\/}})\index{all-nils-or-cars})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-repeat-list \\ \index{all-nils-or-cars-repeat-list}
\=\+{\rm{all-nils-or-cars}}\,({\rm{repeat-list}}\,({\it{l\/}}, {\it{n\/}})\index{repeat-list}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
$=$$\;\;\;\;$(({\it{n\/}} $\simeq {\tt{0}}$) $\vee$ {\rm{all-nils-or-cars}}\,({\it{l\/}}, {\it{pts\/}})\index{all-nils-or-cars})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-make-length \\ \index{all-nils-or-cars-make-length}
\=\+{\rm{all-nils-or-cars}}\,({\rm{make-length}}\,({\it{n\/}}, {\it{l\/}}, {\bf{nil}})\index{make-length}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\rm{length}}\,({\it{l\/}})\index{length}$\;\;${\bf then }{\rm{all-nils-or-cars}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
{\bf else }{\rm{all-nils-or-cars}}\,({\it{l\/}}, {\it{pts\/}})\index{all-nils-or-cars}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-repeat \\ \index{all-nils-or-cars-repeat}
\=\+{\rm{all-nils-or-cars}}\,({\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
$=$$\;\;\;\;$(({\it{v\/}} $=$ {\bf{nil}}) $\vee$ {\rm{assoc}}\,({\it{v\/}}, {\it{pts\/}}) $\vee$ ({\it{n\/}} $\simeq {\tt{0}}$))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-substring-schedule \\ \index{all-nils-or-cars-substring-sche!dule}
\=\+{\rm{cars-non-nil-litatoms}}\,({\it{pts\/}})\index{cars-non-nil-litatoms} \\ 
$\rightarrow$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\rm{substring-schedule}}\,({\it{pts\/}}, {\it{n\/}})\index{substring-schedule}, {\it{pts\/}})\index{all-nils-or-cars}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-firstn \\ \index{all-nils-or-cars-firstn}
\=\+({\rm{all-nils-or-cars}}\,({\it{l\/}}, {\it{pts\/}})\index{all-nils-or-cars} $\wedge$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{l\/}})\index{length})) \\ 
$\rightarrow$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn}, {\it{pts\/}})\index{all-nils-or-cars}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-make-simple-schedule \\ \index{all-nils-or-cars-make-simple-sc!hedule}
\=\+{\rm{cars-non-nil-litatoms}}\,({\it{pts\/}})\index{cars-non-nil-litatoms} \\ 
$\rightarrow$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\rm{make-simple-schedule}}\,({\it{pts\/}}, {\it{bigp\/}}, {\it{n\/}})\index{make-simple-schedule}, {\it{pts\/}})\index{all-nils-or-cars}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-make-simple-schedule \\ \index{length-make-simple-schedule}
\=\+(({\it{n\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{length}}\,({\rm{make-simple-schedule}}\,({\it{pts\/}}, {\it{bigp\/}}, {\it{n\/}})\index{make-simple-schedule})\index{length} $=$ {\rm{fix}}\,({\it{n\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  periodic-tasksp-means-cars-non-nil-litatoms \\ \index{periodic-tasksp-means-cars-non-!nil-litatoms}
{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} $\rightarrow$ {\rm{cars-non-nil-litatoms}}\,({\it{pts\/}})\index{cars-non-nil-litatoms}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-litatoms-append \\ \index{all-litatoms-append}
{\rm{all-litatoms}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}))\index{all-litatoms} $=$ ({\rm{all-litatoms}}\,({\it{a\/}})\index{all-litatoms} $\wedge$ {\rm{all-litatoms}}\,({\it{b\/}})\index{all-litatoms})
\end{tabbing}
    
\begin{tabbing}{\sc Theorem}:  all-litatoms-repeat-list \\ \index{all-litatoms-repeat-list}
{\rm{all-litatoms}}\,({\rm{repeat-list}}\,({\it{l\/}}, {\it{n\/}})\index{repeat-list})\index{all-litatoms} $=$ (({\it{n\/}} $\simeq {\tt{0}}$) $\vee$ {\rm{all-litatoms}}\,({\it{l\/}})\index{all-litatoms})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-litatoms-make-length \\ \index{all-litatoms-make-length}
\=\+{\rm{all-litatoms}}\,({\rm{make-length}}\,({\it{n\/}}, {\it{l\/}}, {\it{v\/}})\index{make-length})\index{all-litatoms} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{length}}\,({\it{l\/}})\index{length} $<$ {\it{n\/}}$\;\;${\bf then }{\rm{all-litatoms}}\,({\it{l\/}})\index{all-litatoms} $\wedge$ {\rm{litatom}}\,({\it{v\/}}) \\ 
{\bf else }{\rm{all-litatoms}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn})\index{all-litatoms}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-litatoms-substring-schedule \\ \index{all-litatoms-substring-schedule}
{\rm{cars-non-nil-litatoms}}\,({\it{pts\/}})\index{cars-non-nil-litatoms} $\rightarrow$ {\rm{all-litatoms}}\,({\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule})\index{all-litatoms}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-litatoms-make-simple-schedule \\ \index{all-litatoms-make-simple-schedu!le}
\=\+{\rm{cars-non-nil-litatoms}}\,({\it{pts\/}})\index{cars-non-nil-litatoms} \\ 
$\rightarrow$$\;\;\;\;${\rm{all-litatoms}}\,({\rm{make-simple-schedule}}\,({\it{pts\/}}, {\it{bigp\/}}, {\it{n\/}})\index{make-simple-schedule})\index{all-litatoms}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cars-non-nil-litatoms-periodic-tasks \\ \index{cars-non-nil-litatoms-periodic-t!asks}
\=\+{\rm{cars-non-nil-litatoms}}\,({\it{pts\/}})\index{cars-non-nil-litatoms} \\ 
$\rightarrow$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests})\index{cars-non-nil-litatoms}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{value-all-cars} \\  
\=\+{\rm{value-all-cars}}\,({\it{v\/}}, {\it{list\/}})\index{value-all-cars} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{list\/}}) \\ 
{\bf then }({\rm{caar}}\,({\it{list\/}}) $=$ {\it{v\/}}) $\wedge$ {\rm{value-all-cars}}\,({\it{v\/}}, {\rm{cdr}}\,({\it{list\/}}))\index{value-all-cars} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests3-append \\ \index{non-overlapping-requests3-appen!d}
\=\+{\rm{non-overlapping-requests3}}\,({\it{v\/}}, {\rm{append}}\,({\it{r1\/}}, {\it{r2\/}}))\index{non-overlapping-requests3} \\ 
$=$$\;\;\;\;$({\rm{non-overlapping-requests3}}\,({\it{v\/}}, {\it{r1\/}})\index{non-overlapping-requests3} $\wedge$ {\rm{non-overlapping-requests3}}\,({\it{v\/}}, {\it{r2\/}})\index{non-overlapping-requests3})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  value-all-cars-periodic-task-requests \\ \index{value-all-cars-periodic-task-req!uests}
\=\+{\rm{value-all-cars}}\,({\it{x\/}}, {\rm{periodic-task-requests}}\,({\it{req\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{value-all-cars} \\ 
$=$$\;\;\;\;$(($\neg$ {\rm{listp}}\,({\rm{periodic-task-requests}}\,({\it{req\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})) $\vee$ ({\it{x\/}} $=$ {\rm{car}}\,({\it{req\/}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests2-value-all-cars \\ \index{non-overlapping-requests2-value!-all-cars}
\=\+({\rm{value-all-cars}}\,({\it{v\/}}, {\it{list\/}})\index{value-all-cars} $\wedge$ ($\neg$ {\rm{assoc}}\,({\it{v\/}}, {\it{r\/}})) $\wedge$ {\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{non-overlapping-requests2}}\,({\it{r\/}}, {\rm{append}}\,({\it{list\/}}, {\it{r2\/}}))\index{non-overlapping-requests2} \\ 
$=$$\;\;\;\;${\rm{non-overlapping-requests2}}\,({\it{r\/}}, {\it{r2\/}})\index{non-overlapping-requests2})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  assoc-append \\ \index{assoc-append}
({\it{v\/}} $\not=$ {\tt{0}}) $\rightarrow$ ({\rm{assoc}}\,({\it{v\/}}, {\rm{append}}\,({\it{x\/}}, {\it{y\/}})) $\leftrightarrow$ ({\rm{assoc}}\,({\it{v\/}}, {\it{x\/}}) $\vee$ {\rm{assoc}}\,({\it{v\/}}, {\it{y\/}})))
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  assoc-periodic-task-requests \\ \index{assoc-periodic-task-requests}
({\it{v\/}} $\not=$ {\rm{car}}\,({\it{req\/}})) $\rightarrow$ ($\neg$ {\rm{assoc}}\,({\it{v\/}}, {\rm{periodic-task-requests}}\,({\it{req\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}))
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  assoc-periodic-tasks-requests \\ \index{assoc-periodic-tasks-requests}
\=\+(({\it{v\/}} $\not=$ {\tt{0}}) $\wedge$ ($\neg$ {\rm{assoc}}\,({\it{v\/}}, {\it{list\/}}))) \\ 
$\rightarrow$$\;\;\;\;$($\neg$ {\rm{assoc}}\,({\it{v\/}}, {\rm{periodic-tasks-requests}}\,({\it{list\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests}))\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  non-overlapping-requests2-append-arg2 \\ \index{non-overlapping-requests2-appen!d-arg2}
\=\+(\=\+($\neg$ {\rm{assoc}}\,({\rm{car}}\,({\it{req\/}}), {\it{list\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\it{req\/}}) $\not=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{list\/}})\index{cars-non-nil-litatoms})\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{non-overlapping-requests2}}\,(\=\+{\rm{periodic-tasks-requests}}\,({\it{list\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests}, \\ 
{\rm{append}}\,({\rm{periodic-task-requests}}\,({\it{req\/}}, {\it{n3\/}}, {\it{n4\/}})\index{periodic-task-requests}, {\it{y\/}}))\-\index{non-overlapping-requests2} \\ 
$=$$\;\;\;\;${\rm{non-overlapping-requests2}}\,(\=\+{\rm{periodic-tasks-requests}}\,({\it{list\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests}, \\ 
{\it{y\/}})\-\index{non-overlapping-requests2})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests3-periodic-task \\ \index{non-overlapping-requests3-perio!dic-task}
\=\+({\it{n1\/}} $\not<$ {\it{end\/}}) \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests3}}\,(\=\+{\rm{list}}\,({\it{tk\/}}, {\it{start\/}}, {\it{end\/}}, {\it{duration\/}}), \\ 
{\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\-\index{non-overlapping-requests3}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests3-task-name-difference \\ \index{non-overlapping-requests3-task-!name-difference}
\=\+({\rm{car}}\,({\it{pt\/}}) $\not=$ {\rm{car}}\,({\it{req\/}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests3}}\,({\it{req\/}}, {\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{non-overlapping-requests3}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests3-name-difference \\ \index{non-overlapping-requests3-name-!difference}
\=\+({\rm{litatom}}\,({\rm{car}}\,({\it{req\/}})) $\wedge$ ($\neg$ {\rm{assoc}}\,({\rm{car}}\,({\it{req\/}}), {\it{list\/}}))) \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests3}}\,({\it{req\/}}, {\rm{periodic-tasks-requests}}\,({\it{list\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests})\index{non-overlapping-requests3}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests2-cons-too-big \\ \index{non-overlapping-requests2-cons-t!oo-big}
\=\+({\it{n1\/}} $\not<$ {\rm{caddr}}\,({\it{req\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{non-overlapping-requests2}}\,(\=\+{\rm{periodic-task-requests}}\,({\it{tr\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}, \\ 
{\rm{cons}}\,({\it{req\/}}, {\it{r\/}}))\-\index{non-overlapping-requests2} \\ 
$=$$\;\;\;\;${\rm{non-overlapping-requests2}}\,({\rm{periodic-task-requests}}\,({\it{tr\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}, {\it{r\/}})\index{non-overlapping-requests2})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests2-periodic-task \\ \index{non-overlapping-requests2-perio!dic-task}
\=\+($\neg$ {\rm{assoc}}\,({\rm{car}}\,({\it{req\/}}), {\it{x\/}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests2}}\,(\=\+{\rm{periodic-task-requests}}\,({\it{req\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}, \\ 
{\rm{append}}\,(\=\+{\rm{periodic-task-requests}}\,({\it{req\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{x\/}}, {\it{n3\/}}, {\it{n4\/}})\index{periodic-tasks-requests})\-)\-\index{non-overlapping-requests2}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests2-periodic-tasks \\ \index{non-overlapping-requests2-perio!dic-tasks}
\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests2}}\,(\=\+{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{non-overlapping-requests2}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  non-overlapping-requests-periodic-tasks-requests \\ \index{non-overlapping-requests-periodi!c-tasks-requests}
\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\rightarrow$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\index{non-overlapping-requests}\-
\end{tabbing}


\begin{verbatim};;;; major lemma
\end{verbatim}\begin{tabbing}{\sc Theorem}:  edf-schedule-good-for-expanded \\ \index{edf-schedule-good-for-expanded}
\=\+(\=\+({\it{bigp\/}} $\not<$ {\rm{length}}\,({\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule})\index{length}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{expanded-tasksp}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expanded-tasksp} \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\it{bigp\/}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $\simeq {\tt{0}}$))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{make-schedule-edf}}\,(\=\+{\rm{make-simple-schedule}}\,({\it{pts\/}}, {\it{bigp\/}}, {\it{n\/}})\index{make-simple-schedule}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests}, \\ 
{\tt{0}})\-\index{make-schedule-edf}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}

\begin{verbatim};;;;;;;;;;;;;;;


\end{verbatim}\begin{tabbing}{\sc Definition}:\index{every-nth} \\  
\=\+{\rm{every-nth}}\,({\it{n\/}}, {\it{list\/}})\index{every-nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\rm{listp}}\,({\it{list\/}})$\;\;${\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{list\/}}), {\rm{every-nth}}\,({\it{n\/}}, {\rm{nthcdr}}\,({\it{n\/}}, {\it{list\/}})\index{nthcdr})\index{every-nth}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{expand-tasks-requests} \\  
\=\+{\rm{expand-tasks-requests}}\,({\it{tasks-requests\/}}, {\it{n\/}})\index{expand-tasks-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{tasks-requests\/}}) \\ 
{\bf then }{\rm{cons}}\,(\=\+{\rm{list}}\,(\=\+{\rm{caar}}\,({\it{tasks-requests\/}}), \\ 
{\it{n\/}} $*$ {\rm{cadar}}\,({\it{tasks-requests\/}}), \\ 
{\it{n\/}} $*$ {\rm{caddar}}\,({\it{tasks-requests\/}}), \\ 
{\it{n\/}} $*$ {\rm{cadddar}}\,({\it{tasks-requests\/}}))\-, \\ 
{\rm{expand-tasks-requests}}\,({\rm{cdr}}\,({\it{tasks-requests\/}}), {\it{n\/}})\index{expand-tasks-requests})\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  expand-tasks-requests-append \\ \index{expand-tasks-requests-append}
\=\+{\rm{expand-tasks-requests}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}), {\it{n\/}})\index{expand-tasks-requests} \\ 
$=$$\;\;\;\;${\rm{append}}\,({\rm{expand-tasks-requests}}\,({\it{a\/}}, {\it{n\/}})\index{expand-tasks-requests}, {\rm{expand-tasks-requests}}\,({\it{b\/}}, {\it{n\/}})\index{expand-tasks-requests})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-append \\ \index{listp-append}
{\rm{listp}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}})) $=$ ({\rm{listp}}\,({\it{a\/}}) $\vee$ {\rm{listp}}\,({\it{b\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-expand-tasks-requests \\ \index{listp-expand-tasks-requests}
{\rm{listp}}\,({\rm{expand-tasks-requests}}\,({\it{l\/}}, {\it{n\/}})\index{expand-tasks-requests}) $=$ {\rm{listp}}\,({\it{l\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-task-requests \\ \index{listp-task-requests}
\=\+{\rm{listp}}\,({\rm{periodic-task-requests}}\,({\it{task\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}) \\ 
$=$$\;\;\;\;$(({\it{n1\/}} $<$ {\it{n2\/}}) $\wedge$ {\rm{periodic-taskp}}\,({\it{task\/}})\index{periodic-taskp})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-expand-tasks-requests \\ \index{length-expand-tasks-requests}
{\rm{length}}\,({\rm{expand-tasks-requests}}\,({\it{l\/}}, {\it{n\/}})\index{expand-tasks-requests})\index{length} $=$ {\rm{length}}\,({\it{l\/}})\index{length}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  different-lengths-mean-different \\ \index{different-lengths-mean-different}
({\it{x\/}} $=$ {\it{y\/}}) $\rightarrow$ ({\rm{length}}\,({\it{x\/}})\index{length} $=$ {\rm{length}}\,({\it{y\/}})\index{length})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-nthcdr-x-x \\ \index{equal-nthcdr-x-x}
({\rm{nthcdr}}\,({\it{n\/}}, {\it{x\/}})\index{nthcdr} $=$ {\it{x\/}}) $=$ (({\it{n\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{x\/}} $=$ {\tt{0}}))
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{length-periodic-task-request-in!duct} \\  
\=\+{\rm{length-periodic-task-request-induct}}\,({\it{n1\/}}, {\it{period\/}}, {\it{bigp\/}}, {\it{n2\/}})\index{length-periodic-task-request-in!duct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\tt{0}} $<$ ({\it{bigp\/}} $*$ {\it{period\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{n1\/}} $<$ {\it{n2\/}} \\ 
{\bf then }{\rm{length-periodic-task-request-induct}}\,(\=\+{\it{n1\/}} $+$ ({\it{bigp\/}} $*$ {\it{period\/}}), \\ 
{\it{period\/}}, \\ 
{\it{bigp\/}}, \\ 
{\it{n2\/}})\-\index{length-periodic-task-request-in!duct} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}
      
\begin{tabbing}{\sc Theorem}:  length-periodic-task-requests \\ \index{length-periodic-task-requests}
\=\+(\=\+({\tt{0}} $<$ {\it{bigp\/}}) \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\it{period\/}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{length}}\,({\rm{periodic-task-requests}}\,(\=\+{\rm{list}}\,({\it{name\/}}, {\it{bigp\/}} $*$ {\it{period\/}}, {\it{duration\/}}), \\ 
{\it{n1\/}}, \\ 
{\it{n2\/}})\-\index{periodic-task-requests})\index{length} \\ 
$=$$\;\;\;\;${\rm{length}}\,({\rm{periodic-task-requests}}\,(\=\+{\rm{list}}\,({\it{name\/}}, {\it{period\/}}, {\it{duration\/}}), \\ 
{\it{n1\/}} $\div$ {\it{bigp\/}}, \\ 
{\it{n2\/}} $\div$ {\it{bigp\/}})\-\index{periodic-task-requests})\index{length})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-expand-tasks-requests \\ \index{plist-expand-tasks-requests}
{\rm{plist}}\,({\rm{expand-tasks-requests}}\,({\it{task\/}}, {\it{n\/}})\index{expand-tasks-requests})\index{plist} $=$ {\rm{expand-tasks-requests}}\,({\it{task\/}}, {\it{n\/}})\index{expand-tasks-requests}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-plist-nil \\ \index{equal-plist-nil}
({\rm{plist}}\,({\it{l\/}})\index{plist} $=$ {\bf{nil}}) $=$ ({\it{l\/}} $\simeq\;${{\bf{nil}}}${}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-cons \\ \index{length-cons}
{\rm{length}}\,({\rm{cons}}\,({\it{a\/}}, {\it{b\/}}))\index{length} $=$ ($1\;+$ {\rm{length}}\,({\it{b\/}})\index{length})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cons-append-hack \\ \index{cons-append-hack}
{\rm{cons}}\,({\it{a\/}}, {\rm{append}}\,({\it{b\/}}, {\it{c\/}})) $\not=$ {\it{c\/}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-append-b-append-b \\ \index{equal-append-b-append-b}
({\rm{append}}\,({\it{x\/}}, {\it{b\/}}) $=$ {\rm{append}}\,({\it{y\/}}, {\it{b\/}})) $=$ ({\rm{plist}}\,({\it{x\/}})\index{plist} $=$ {\rm{plist}}\,({\it{y\/}})\index{plist})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-periodic-task-requests \\ \index{plist-periodic-task-requests}
\=\+{\rm{plist}}\,({\rm{periodic-task-requests}}\,({\it{task\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{plist} \\ 
$=$$\;\;\;\;${\rm{periodic-task-requests}}\,({\it{task\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-equal-times-x-a-x \\ \index{lessp-equal-times-x-a-x}
(({\it{a\/}} $*$ {\it{b\/}}) $<$ {\it{a\/}}) $=$ (({\it{a\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{b\/}} $\simeq {\tt{0}}$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  periodic-task-requests-expand \\ \index{periodic-task-requests-expand}
\=\+(\=\+{\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp} \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\rm{cadr}}\,({\it{pt\/}}) ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\rm{caddr}}\,({\it{pt\/}}) ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $\in\;${\bf{N}}${}$))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests} \\ 
$=$$\;\;\;\;${\rm{expand-tasks-requests}}\,(\=\+{\rm{periodic-task-requests}}\,(\=\+{\rm{cons}}\,(\=\+{\rm{car}}\,({\it{pt\/}}), \\ 
{\rm{cons}}\,(\=\+\=\+{\rm{cadr}}\,({\it{pt\/}}) \\ 
$\div$$\;\;\;\;${\it{bigp\/}}\-, \\ 
{\rm{cons}}\,(\=\+\=\+{\rm{caddr}}\,({\it{pt\/}}) \\ 
$\div$$\;\;\;\;${\it{bigp\/}}\-, \\ 
{\rm{cdddr}}\,({\it{pt\/}}))\-)\-)\-, \\ 
{\it{n1\/}} $\div$ {\it{bigp\/}}, \\ 
{\it{n2\/}} $\div$ {\it{bigp\/}})\-\index{periodic-task-requests}, \\ 
{\it{bigp\/}})\-\index{expand-tasks-requests})\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  periodic-tasks-requests-expand \\ \index{periodic-tasks-requests-expand}
\=\+(\=\+(({\it{n1\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $\in\;${\bf{N}}${}$))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{periodic-tasks-requests}}\,({\rm{expand-tasks}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expand-tasks}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests} \\ 
$=$$\;\;\;\;${\rm{expand-tasks-requests}}\,(\=\+{\rm{periodic-tasks-requests}}\,(\=\+{\it{pts\/}}, \\ 
{\it{n1\/}} $\div$ {\it{bigp\/}}, \\ 
{\it{n2\/}} $\div$ {\it{bigp\/}})\-\index{periodic-tasks-requests}, \\ 
{\it{bigp\/}})\-\index{expand-tasks-requests})\-\-
\end{tabbing}

\begin{verbatim};;;;;

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{edf} \\  
\=\+{\rm{edf}}\,({\it{lengthschedule\/}}, {\it{r\/}})\index{edf} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{lengthschedule\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }\=\+{\bf let }\=\+{\it{s\/}}{\bf $\;$ be$\;\;$}{\rm{edf}}\,({\it{lengthschedule\/}} $-\;1$, {\it{r\/}})\index{edf}\- \\ 
{\bf in} \\ 
\=\+{\bf let }\=\+{\it{unfulfilled\/}}{\bf $\;$ be$\;\;$}{\rm{unfulfilled}}\,(\=\+{\it{lengthschedule\/}} $-\;1$, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{lengthschedule\/}} $-\;1$, \\ 
{\it{r\/}})\-\index{active-task-requests})\-\index{unfulfilled}\- \\ 
{\bf in} \\ 
\=\+{\bf if }{\rm{listp}}\,({\it{unfulfilled\/}}) \\ 
{\bf then }{\rm{append}}\,(\=\+{\it{s\/}}, \\ 
{\rm{list}}\,({\rm{name}}\,({\rm{least-deadline}}\,({\it{unfulfilled\/}})\index{least-deadline})\index{name}))\- \\ 
{\bf else }{\rm{append}}\,({\it{s\/}}, {\rm{list}}\,({\bf{nil}}))$\;${\bf  endif}\-$\;${\bf  endlet}\-$\;${\bf  endlet}\-$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-edf-simple \\ \index{length-edf-simple}
{\rm{length}}\,({\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf})\index{length} $=$ {\rm{fix}}\,({\it{n\/}})
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{valid-requests} \\  
\=\+{\rm{valid-requests}}\,({\it{reqs\/}})\index{valid-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{reqs\/}}) \\ 
{\bf then }\=\+{\rm{litatom}}\,({\rm{caar}}\,({\it{reqs\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{caar}}\,({\it{reqs\/}}) $\not=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;$({\rm{cadar}}\,({\it{reqs\/}}) $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$({\rm{caddar}}\,({\it{reqs\/}}) $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$({\tt{0}} $<$ {\rm{cadddar}}\,({\it{reqs\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{cddddar}}\,({\it{reqs\/}}) $=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\rm{cdr}}\,({\it{reqs\/}}))\index{valid-requests}\- \\ 
{\bf else }{\it{reqs\/}} $=$ {\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  valid-requests-periodic-task \\ \index{valid-requests-periodic-task}
\=\+{\rm{valid-requests}}\,({\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{valid-requests} \\ 
$=$$\;\;\;\;$(({\it{n1\/}} $\in\;${\bf{N}}${}$) $\vee$ ({\it{n1\/}} $\not<$ {\it{n2\/}}) $\vee$ ($\neg$ {\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  valid-requests-append \\ \index{valid-requests-append}
\=\+({\rm{plist}}\,({\it{a\/}})\index{plist} $=$ {\it{a\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{valid-requests}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}))\index{valid-requests} \\ 
$=$$\;\;\;\;$({\rm{valid-requests}}\,({\it{a\/}})\index{valid-requests} $\wedge$ {\rm{valid-requests}}\,({\it{b\/}})\index{valid-requests}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  valid-requests-periodic-tasks \\ \index{valid-requests-periodic-tasks}
\=\+{\rm{valid-requests}}\,({\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests})\index{valid-requests} \\ 
$=$$\;\;\;\;$(\=\+({\it{n1\/}} $\in\;${\bf{N}}${}$) \\ 
$\vee$$\;\;\;\;$({\it{n1\/}} $\not<$ {\it{n2\/}}) \\ 
$\vee$$\;\;\;\;$($\neg$ {\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp}) \\ 
$\vee$$\;\;\;\;$($\neg$ {\rm{listp}}\,({\it{pts\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-active-task-requests-0 \\ \index{listp-active-task-requests-0}
\=\+({\it{n\/}} $<$ {\it{n2\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{listp}}\,({\rm{active-task-requests}}\,({\it{n\/}}, {\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{active-task-requests}) \\ 
$=$$\;\;\;\;$({\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp} $\wedge$ ({\it{n\/}} $\not<$ {\it{n1\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  active-task-requests-append \\ \index{active-task-requests-append}
\=\+{\rm{active-task-requests}}\,({\it{n\/}}, {\rm{append}}\,({\it{r1\/}}, {\it{r2\/}}))\index{active-task-requests} \\ 
$=$$\;\;\;\;${\rm{append}}\,({\rm{active-task-requests}}\,({\it{n\/}}, {\it{r1\/}})\index{active-task-requests}, {\rm{active-task-requests}}\,({\it{n\/}}, {\it{r2\/}})\index{active-task-requests})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-active-task-requests-0-multiple \\ \index{listp-active-task-requests-0-mu!ltiple}
\=\+({\it{n\/}} $<$ {\it{n2\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{listp}}\,({\rm{active-task-requests}}\,({\it{n\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests})\index{active-task-requests}) \\ 
$=$$\;\;\;\;$({\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} $\wedge$ ({\it{n\/}} $\not<$ {\it{n1\/}}) $\wedge$ {\rm{listp}}\,({\it{pts\/}})))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-0 \\ \index{unfulfilled-0}
{\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} $\rightarrow$ ({\rm{unfulfilled}}\,({\tt{0}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled} $=$ {\it{r\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  valid-requests-active-task-requests \\ \index{valid-requests-active-task-reque!sts}
{\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} $\rightarrow$ {\rm{valid-requests}}\,({\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\index{valid-requests}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-0-length-means \\ \index{lessp-0-length-means}
({\tt{0}} $<$ {\rm{length}}\,({\it{l\/}})\index{length}) $=$ {\rm{listp}}\,({\it{l\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-repeat \\ \index{listp-repeat}
{\rm{listp}}\,({\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat}) $=$ ({\it{n\/}} $\not\simeq {\tt{0}}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-repeat \\ \index{length-repeat}
{\rm{length}}\,({\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat})\index{length} $=$ {\rm{fix}}\,({\it{n\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-append \\ \index{plist-append}
{\rm{plist}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{plist} $=$ {\rm{append}}\,({\it{x\/}}, {\rm{plist}}\,({\it{y\/}})\index{plist})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-plist \\ \index{length-plist}
{\rm{length}}\,({\rm{plist}}\,({\it{x\/}})\index{plist})\index{length} $=$ {\rm{length}}\,({\it{x\/}})\index{length}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-plist \\ \index{listp-plist}
{\rm{listp}}\,({\rm{plist}}\,({\it{x\/}})\index{plist}) $=$ {\rm{listp}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-edf-simple \\ \index{plist-edf-simple}
{\rm{plist}}\,({\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf})\index{plist} $=$ {\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf}
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  firstn-repeat \\ \index{firstn-repeat}
\=\+{\rm{firstn}}\,({\it{n1\/}}, {\rm{repeat}}\,({\it{n2\/}}, {\it{v\/}})\index{repeat})\index{firstn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n2\/}} $<$ {\it{n1\/}}$\;\;${\bf then }{\rm{append}}\,({\rm{repeat}}\,({\it{n2\/}}, {\it{v\/}})\index{repeat}, {\rm{repeat}}\,({\it{n1\/}} $-$ {\it{n2\/}}, {\tt{0}})\index{repeat}) \\ 
{\bf else }{\rm{repeat}}\,({\it{n1\/}}, {\it{v\/}})\index{repeat}$\;${\bf  endif}\-\-
\end{tabbing}
  
\begin{tabbing}{\sc Theorem}:  edf-simple-nlistp \\ \index{edf-simple-nlistp}
($\neg$ {\rm{listp}}\,({\it{r\/}})) $\rightarrow$ ({\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf} $=$ {\rm{repeat}}\,({\it{n\/}}, {\bf{nil}})\index{repeat})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  make-schedule-edf-nlistp \\ \index{make-schedule-edf-nlistp}
($\neg$ {\rm{listp}}\,({\it{r\/}})) $\rightarrow$ ({\rm{make-schedule-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-schedule-edf} $=$ {\it{s\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  replace-nth-nlistp \\ \index{replace-nth-nlistp}
({\it{l\/}} $\simeq\;${{\bf{nil}}}${}$) $\rightarrow$ ({\rm{replace-nth}}\,({\it{n\/}}, {\it{v\/}}, {\it{l\/}})\index{replace-nth} $=$ {\rm{append}}\,({\rm{repeat}}\,({\it{n\/}}, {\tt{0}})\index{repeat}, {\rm{cons}}\,({\it{v\/}}, {\tt{0}})))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-replace-nth2 \\ \index{plist-replace-nth2}
\=\+({\rm{plist}}\,({\rm{replace-nth}}\,({\it{n\/}}, {\it{v\/}}, {\it{s\/}})\index{replace-nth})\index{plist} $=$ {\rm{replace-nth}}\,({\it{n\/}}, {\it{v\/}}, {\it{s\/}})\index{replace-nth}) \\ 
$=$$\;\;\;\;$(({\rm{plist}}\,({\it{s\/}})\index{plist} $=$ {\it{s\/}}) $\wedge$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-swap \\ \index{plist-swap}
\=\+({\rm{plist}}\,({\rm{swap}}\,({\it{n1\/}}, {\it{n2\/}}, {\it{s\/}})\index{swap})\index{plist} $=$ {\rm{swap}}\,({\it{n1\/}}, {\it{n2\/}}, {\it{s\/}})\index{swap}) \\ 
$=$$\;\;\;\;$(({\rm{plist}}\,({\it{s\/}})\index{plist} $=$ {\it{s\/}}) $\wedge$ ({\it{n1\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) $\wedge$ ({\it{n2\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-make-element-edf \\ \index{plist-make-element-edf}
\=\+({\rm{plist}}\,({\it{s\/}})\index{plist} $=$ {\it{s\/}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{plist}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-element-edf})\index{plist} $=$ {\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-element-edf})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-make-schedule-edf \\ \index{length-make-schedule-edf}
{\rm{length}}\,({\rm{make-schedule-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-schedule-edf})\index{length} $=$ {\rm{length}}\,({\it{s\/}})\index{length}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-nthcdr-nthcdr-from-nthcdr-plus1 \\ \index{equal-nthcdr-nthcdr-from-nthcdr!-plus1}
\=\+(\=\+({\it{n\/}} $<$ {\rm{length}}\,({\it{s1\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\rm{length}}\,({\it{s2\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;$({\rm{nthcdr}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{s1\/}}))\index{nthcdr} $=$ {\rm{nthcdr}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{s2\/}}))\index{nthcdr}))\- \\ 
$\rightarrow$$\;\;\;\;$(({\rm{nthcdr}}\,({\it{n\/}}, {\it{s1\/}})\index{nthcdr} $=$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{s2\/}})\index{nthcdr}) $=$ ({\rm{nth}}\,({\it{n\/}}, {\it{s1\/}})\index{nth} $=$ {\rm{nth}}\,({\it{n\/}}, {\it{s2\/}})\index{nth}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-first-instance2 \\ \index{lessp-first-instance2}
{\rm{first-instance}}\,({\it{n2\/}}, {\it{v\/}}, {\it{l\/}})\index{first-instance} $\rightarrow$ ({\rm{first-instance}}\,({\it{n2\/}}, {\it{v\/}}, {\it{l\/}})\index{first-instance} $\not<$ {\it{n2\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-make-schedule-edf-simple \\ \index{nth-make-schedule-edf-simple}
({\it{n1\/}} $<$ {\it{n2\/}}) $\rightarrow$ ({\rm{nth}}\,({\it{n1\/}}, {\rm{make-schedule-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n2\/}})\index{make-schedule-edf})\index{nth} $=$ {\rm{nth}}\,({\it{n1\/}}, {\it{s\/}})\index{nth})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  car-append \\ \index{car-append}
\=\+{\rm{car}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}})) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{x\/}})$\;\;${\bf then }{\rm{car}}\,({\it{x\/}}) \\ 
{\bf else }{\rm{car}}\,({\it{y\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-edf-simple \\ \index{listp-edf-simple}
{\rm{listp}}\,({\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf}) $=$ ({\it{n\/}} $\not\simeq {\tt{0}}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-schedule-first-part-only \\ \index{unfulfilled-schedule-first-part!-only}
({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) $\rightarrow$ ({\rm{unfulfilled}}\,({\it{n\/}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled} $=$ {\rm{unfulfilled}}\,({\it{n\/}}, {\rm{firstn}}\,({\it{n\/}}, {\it{s\/}})\index{firstn}, {\it{r\/}})\index{unfulfilled})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-n-edf-simple-n \\ \index{firstn-n-edf-simple-n}
({\rm{fix}}\,({\it{n1\/}}) $=$ {\rm{fix}}\,({\it{n2\/}})) $\rightarrow$ ({\rm{firstn}}\,({\it{n1\/}}, {\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf})\index{firstn} $=$ {\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-edf-simple-regular \\ \index{firstn-edf-simple-regular}
({\it{n1\/}} $<$ {\it{n2\/}}) $\rightarrow$ ({\rm{firstn}}\,({\it{n1\/}}, {\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf})\index{firstn} $=$ {\rm{edf}}\,({\it{n1\/}}, {\it{r\/}})\index{edf})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-edf-simple-help \\ \index{firstn-edf-simple-help}
({\it{n2\/}} $\not<$ {\it{n1\/}}) $\rightarrow$ ({\rm{firstn}}\,({\it{n1\/}}, {\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf})\index{firstn} $=$ {\rm{edf}}\,({\it{n1\/}}, {\it{r\/}})\index{edf})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-edf-simple \\ \index{firstn-edf-simple}
\=\+{\rm{firstn}}\,({\it{n1\/}}, {\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf})\index{firstn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n2\/}} $<$ {\it{n1\/}}$\;\;${\bf then }{\rm{append}}\,({\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf}, {\rm{repeat}}\,({\it{n1\/}} $-$ {\it{n2\/}}, {\tt{0}})\index{repeat}) \\ 
{\bf else }{\rm{edf}}\,({\it{n1\/}}, {\it{r\/}})\index{edf}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-append \\ \index{nth-append}
\=\+{\rm{nth}}\,({\it{n\/}}, {\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\rm{length}}\,({\it{x\/}})\index{length}$\;\;${\bf then }{\rm{nth}}\,({\it{n\/}}, {\it{x\/}})\index{nth} \\ 
{\bf else }{\rm{nth}}\,({\it{n\/}} $-$ {\rm{length}}\,({\it{x\/}})\index{length}, {\it{y\/}})\index{nth}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{verbatim}; dangerous - must use in special rules
\end{verbatim}\begin{tabbing}{\sc Theorem}:  nth-edf-simple-simpler \\ \index{nth-edf-simple-simpler}
({\it{n\/}} $<$ {\it{n2\/}}) $\rightarrow$ ({\rm{nth}}\,({\it{n\/}}, {\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf})\index{nth} $=$ {\rm{nth}}\,({\it{n\/}}, {\rm{edf}}\,($1\;+$ {\it{n\/}}, {\it{r\/}})\index{edf})\index{nth})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  active-task-requests-nnumberp \\ \index{active-task-requests-nnumberp}
({\it{n\/}} $\not\in\;${\bf{N}}${}$) $\rightarrow$ ({\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests} $=$ {\rm{active-task-requests}}\,({\tt{0}}, {\it{r\/}})\index{active-task-requests})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-nnumberp \\ \index{unfulfilled-nnumberp}
({\it{n\/}} $\not\in\;${\bf{N}}${}$) $\rightarrow$ ({\rm{unfulfilled}}\,({\it{n\/}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled} $=$ {\rm{unfulfilled}}\,({\tt{0}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-edf-simple \\ \index{nth-edf-simple}
\=\+{\rm{nth}}\,({\it{n\/}}, {\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf})\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\it{n2\/}} \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\rm{unfulfilled}}\,({\it{n\/}}, {\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf}, {\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}) \\ 
{\bf then }{\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{n\/}}, \\ 
{\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf}, \\ 
{\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-cdr-cdr-means \\ \index{equal-cdr-cdr-means}
\=\+(({\rm{cdr}}\,({\it{x\/}}) $=$ {\rm{cdr}}\,({\it{y\/}})) $\wedge$ {\rm{listp}}\,({\it{x\/}}) $\wedge$ {\rm{listp}}\,({\it{y\/}})) \\ 
$\rightarrow$$\;\;\;\;$(({\it{x\/}} $=$ {\it{y\/}}) $=$ ({\rm{car}}\,({\it{x\/}}) $=$ {\rm{car}}\,({\it{y\/}})))\-
\end{tabbing}


\noindent{\sc Event}:   Disable equal-cdr-cdr-means.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  first-instance-same-as-member \\ \index{first-instance-same-as-member}
{\it{n\/}} $\rightarrow$ ({\rm{first-instance}}\,({\it{n\/}}, {\it{v\/}}, {\it{s\/}})\index{first-instance} $\leftrightarrow$ ({\it{v\/}} $\in$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-make-element-edf \\ \index{nth-make-element-edf}
{\it{n\/}} $\rightarrow$ (\=\+{\rm{nth}}\,({\it{n\/}}, {\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-element-edf})\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\rm{listp}}\,({\rm{unfulfilled}}\,({\it{n\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}) \\ 
$\wedge$$\;\;\;\;${\rm{first-instance}}\,(\=\+{\it{n\/}}, \\ 
{\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{n\/}}, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{n\/}}, \\ 
{\it{r\/}})\-\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline}), \\ 
{\it{s\/}})\-\index{first-instance}\- \\ 
{\bf then }{\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{n\/}}, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline}) \\ 
{\bf else }{\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth}$\;${\bf  endif}\-)\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-append \\ \index{unfulfilled-append}
\=\+{\rm{unfulfilled}}\,({\it{n\/}}, {\it{s\/}}, {\rm{append}}\,({\it{r1\/}}, {\it{r2\/}}))\index{unfulfilled} \\ 
$=$$\;\;\;\;${\rm{append}}\,({\rm{unfulfilled}}\,({\it{n\/}}, {\it{s\/}}, {\it{r1\/}})\index{unfulfilled}, {\rm{unfulfilled}}\,({\it{n\/}}, {\it{s\/}}, {\it{r2\/}})\index{unfulfilled})\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{no-unfulfilled-active-task-indu!ct} \\  
\=\+{\rm{no-unfulfilled-active-task-induct}}\,({\it{pts\/}}, {\it{oldpts\/}})\index{no-unfulfilled-active-task-indu!ct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{pts\/}} $\simeq\;${{\bf{nil}}}${}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\rm{no-unfulfilled-active-task-induct}}\,(\=\+{\rm{cdr}}\,({\it{pts\/}}), \\ 
{\rm{append}}\,(\=\+{\it{oldpts\/}}, \\ 
{\rm{list}}\,({\rm{car}}\,({\it{pts\/}})))\-)\-\index{no-unfulfilled-active-task-indu!ct}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  periodic-tasksp-append-car \\ \index{periodic-tasksp-append-car}
\=\+({\rm{periodic-tasksp}}\,({\rm{append}}\,({\it{x\/}}, {\it{y\/}}))\index{periodic-tasksp} $\wedge$ {\rm{listp}}\,({\it{y\/}})) \\ 
$\rightarrow$$\;\;\;\;${\rm{periodic-tasksp}}\,({\rm{append}}\,({\it{x\/}}, {\rm{list}}\,({\rm{car}}\,({\it{y\/}}))))\index{periodic-tasksp}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  assoc-plist \\ \index{assoc-plist}
{\rm{assoc}}\,({\it{v\/}}, {\rm{plist}}\,({\it{l\/}})\index{plist}) $=$ {\rm{assoc}}\,({\it{v\/}}, {\it{l\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  all-nils-or-cars-plist2 \\ \index{all-nils-or-cars-plist2}
{\rm{all-nils-or-cars}}\,({\it{l1\/}}, {\rm{plist}}\,({\it{l2\/}})\index{plist})\index{all-nils-or-cars} $=$ {\rm{all-nils-or-cars}}\,({\it{l1\/}}, {\it{l2\/}})\index{all-nils-or-cars}
\end{tabbing}

\begin{verbatim};; bad bad bad
\end{verbatim}\begin{tabbing}{\sc Theorem}:  assoc-append-simple \\ \index{assoc-append-simple}
\=\+(($\neg$ {\rm{assoc}}\,({\it{v\/}}, {\it{l\/}})) $\wedge$ {\rm{periodic-tasksp}}\,({\it{l\/}})\index{periodic-tasksp}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{assoc}}\,({\it{v\/}}, {\rm{append}}\,({\it{l\/}}, {\it{l2\/}})) $=$ {\rm{assoc}}\,({\it{v\/}}, {\it{l2\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-unfulfilled-if-schedule-contains \\ \index{listp-unfulfilled-if-schedule-c!ontains}
\=\+(\=\+{\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp} \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;$({\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth} $=$ {\rm{car}}\,({\it{pt\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\it{n2\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $\not<$ {\it{n1\/}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{listp}}\,({\rm{unfulfilled}}\,(\=\+{\it{n\/}}, \\ 
{\rm{firstn}}\,({\it{n\/}}, {\it{s\/}})\index{firstn}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{n\/}}, \\ 
{\rm{periodic-task-requests}}\,(\=\+{\it{pt\/}}, \\ 
{\it{n1\/}}, \\ 
{\it{n2\/}})\-\index{periodic-task-requests})\-\index{active-task-requests})\-\index{unfulfilled})\-
\end{tabbing}
    
\begin{tabbing}{\sc Theorem}:  no-unfulfilled-active-task-if-nil-help \\ \index{no-unfulfilled-active-task-if-ni!l-help}
\=\+(\=\+({\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth} $\not=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\rm{append}}\,({\it{oldpts\/}}, {\it{pts\/}}))\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{oldpts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\it{s\/}}, {\rm{append}}\,({\it{oldpts\/}}, {\it{pts\/}}))\index{all-nils-or-cars} \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\it{n2\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $\not<$ {\it{n1\/}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{listp}}\,({\rm{unfulfilled}}\,(\=\+{\it{n\/}}, \\ 
{\rm{firstn}}\,({\it{n\/}}, {\it{s\/}})\index{firstn}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{n\/}}, \\ 
{\rm{periodic-tasks-requests}}\,(\=\+{\it{pts\/}}, \\ 
{\it{n1\/}}, \\ 
{\it{n2\/}})\-\index{periodic-tasks-requests})\-\index{active-task-requests})\-\index{unfulfilled}) \\ 
$\vee$$\;\;\;\;${\rm{assoc}}\,({\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth}, {\it{oldpts\/}}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  no-unfulfilled-active-task-if-nil \\ \index{no-unfulfilled-active-task-if-ni!l}
\=\+(\=\+({\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth} $\not=$ {\bf{nil}}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\it{n2\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $\not<$ {\it{n1\/}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{listp}}\,({\rm{unfulfilled}}\,(\=\+{\it{n\/}}, \\ 
{\rm{firstn}}\,({\it{n\/}}, {\it{s\/}})\index{firstn}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{n\/}}, \\ 
{\rm{periodic-tasks-requests}}\,(\=\+{\it{pts\/}}, \\ 
{\it{n1\/}}, \\ 
{\it{n2\/}})\-\index{periodic-tasks-requests})\-\index{active-task-requests})\-\index{unfulfilled})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  replace-nth-first-instance-nnumberp \\ \index{replace-nth-first-instance-nnum!berp}
\=\+({\it{n\/}} $\not\in\;${\bf{N}}${}$) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{replace-nth}}\,({\rm{first-instance}}\,({\it{n\/}}, {\it{v\/}}, {\it{s\/}})\index{first-instance}, {\it{v2\/}}, {\it{l\/}})\index{replace-nth} \\ 
$=$$\;\;\;\;${\rm{replace-nth}}\,({\rm{first-instance}}\,({\tt{0}}, {\it{v\/}}, {\it{s\/}})\index{first-instance}, {\it{v2\/}}, {\it{l\/}})\index{replace-nth})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  make-element-nnumberp \\ \index{make-element-nnumberp}
({\it{n\/}} $\not\in\;${\bf{N}}${}$) $\rightarrow$ ({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-element-edf} $=$ {\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\tt{0}})\index{make-element-edf})
\end{tabbing}

\begin{verbatim};; versions of nth- theorems with n = 0

\end{verbatim}\begin{tabbing}{\sc Theorem}:  car-make-schedule-edf-simple \\ \index{car-make-schedule-edf-simple}
({\tt{0}} $<$ {\it{n2\/}}) $\rightarrow$ ({\rm{car}}\,({\rm{make-schedule-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n2\/}})\index{make-schedule-edf}) $=$ {\rm{car}}\,({\it{s\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  car-edf-simple \\ \index{car-edf-simple}
\=\+{\rm{car}}\,({\rm{edf}}\,({\it{n2\/}}, {\it{r\/}})\index{edf}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\tt{0}} $<$ {\it{n2\/}} \\ 
{\bf then }\=\+{\bf if }{\rm{listp}}\,({\rm{unfulfilled}}\,({\tt{0}}, {\rm{edf}}\,({\tt{0}}, {\it{r\/}})\index{edf}, {\rm{active-task-requests}}\,({\tt{0}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}) \\ 
{\bf then }{\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\tt{0}}, \\ 
{\rm{edf}}\,({\tt{0}}, {\it{r\/}})\index{edf}, \\ 
{\rm{active-task-requests}}\,({\tt{0}}, {\it{r\/}})\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\- \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  car-repeat \\ \index{car-repeat}
\=\+{\rm{car}}\,({\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\it{v\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  numberp-first-instance \\ \index{numberp-first-instance}
({\it{n\/}} $\in\;${\bf{N}}${}$) $\rightarrow$ (({\rm{first-instance}}\,({\it{n\/}}, {\it{v\/}}, {\it{l\/}})\index{first-instance} $\in\;${\bf{N}}${}$) $=$ ({\it{v\/}} $\in$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr}))
\end{tabbing}
   
\begin{tabbing}{\sc Theorem}:  nth-make-element-simple \\ \index{nth-make-element-simple}
({\it{n1\/}} $<$ {\it{n2\/}}) $\rightarrow$ ({\rm{nth}}\,({\it{n1\/}}, {\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n2\/}})\index{make-element-edf})\index{nth} $=$ {\rm{nth}}\,({\it{n1\/}}, {\it{s\/}})\index{nth})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  car-make-element-simple \\ \index{car-make-element-simple}
({\it{n\/}} $\not\simeq {\tt{0}}$) $\rightarrow$ ({\rm{car}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-element-edf}) $=$ {\rm{car}}\,({\it{s\/}}))
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  car-make-element-edf \\ \index{car-make-element-edf}
\=\+{\rm{car}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-element-edf}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+({\it{n\/}} $\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\rm{unfulfilled}}\,({\tt{0}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\tt{0}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}) \\ 
$\wedge$$\;\;\;\;${\rm{first-instance}}\,(\=\+{\tt{0}}, \\ 
{\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\tt{0}}, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,(\=\+{\tt{0}}, \\ 
{\it{r\/}})\-\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline}), \\ 
{\it{s\/}})\-\index{first-instance}\- \\ 
{\bf then }{\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,({\tt{0}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\tt{0}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled})\index{least-deadline}) \\ 
{\bf else }{\rm{car}}\,({\it{s\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-make-element-simple \\ \index{firstn-make-element-simple}
({\it{n2\/}} $\not<$ {\it{n1\/}}) $\rightarrow$ ({\rm{firstn}}\,({\it{n1\/}}, {\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n2\/}})\index{make-element-edf})\index{firstn} $=$ {\rm{firstn}}\,({\it{n1\/}}, {\it{s\/}})\index{firstn})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-sub1-cdr-make-element \\ \index{firstn-sub1-cdr-make-element}
\=\+({\it{n\/}} $\not\simeq {\tt{0}}$) \\ 
$\rightarrow$$\;\;\;\;$({\rm{firstn}}\,({\it{n\/}} $-\;1$, {\rm{cdr}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-element-edf}))\index{firstn} $=$ {\rm{firstn}}\,({\it{n\/}} $-\;1$, {\rm{cdr}}\,({\it{s\/}}))\index{firstn})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-n-cons-firstn-n \\ \index{nthcdr-n-cons-firstn-n}
\=\+{\rm{nthcdr}}\,({\it{n\/}}, {\rm{cons}}\,({\it{a\/}}, {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn}))\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\rm{list}}\,({\it{a\/}}) \\ 
{\bf else }{\rm{list}}\,({\rm{nth}}\,({\it{n\/}} $-\;1$, {\it{l\/}})\index{nth})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-make-element-edf-sub1 \\ \index{nth-make-element-edf-sub1}
\=\+({\it{n\/}} $\not\simeq {\tt{0}}$) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{nth}}\,({\it{n\/}} $-\;1$, {\rm{cdr}}\,({\rm{make-element-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-element-edf}))\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }\=\+{\rm{listp}}\,({\rm{unfulfilled}}\,({\it{n\/}}, {\it{s\/}}, {\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\index{unfulfilled}) \\ 
$\wedge$$\;\;\;\;${\rm{first-instance}}\,(\=\+{\it{n\/}}, \\ 
{\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{n\/}}, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{n\/}}, \\ 
{\it{r\/}})\-\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline}), \\ 
{\it{s\/}})\-\index{first-instance}\- \\ 
{\bf then }{\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{n\/}}, \\ 
{\it{s\/}}, \\ 
{\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\-\index{unfulfilled})\index{least-deadline}) \\ 
{\bf else }{\rm{nth}}\,({\it{n\/}}, {\it{s\/}})\index{nth}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-repeat-when-nil-not \\ \index{equal-repeat-when-nil-not}
({\rm{car}}\,({\it{s\/}}) $\not=$ {\it{v\/}}) $\rightarrow$ (({\it{s\/}} $=$ {\rm{repeat}}\,({\rm{length}}\,({\it{s\/}})\index{length}, {\it{v\/}})\index{repeat}) $=$ ({\it{s\/}} $=$ {\bf{nil}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-car-schedule \\ \index{member-car-schedule}
\=\+({\rm{good-schedule}}\,({\it{s\/}}, {\it{rs\/}})\index{good-schedule} $\wedge$ {\rm{valid-requests}}\,({\it{rs\/}})\index{valid-requests} $\wedge$ ({\it{r\/}} $\in$ {\it{rs\/}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{car}}\,({\it{r\/}}) $\in$ {\it{s\/}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  sublistp-remove-until \\ \index{sublistp-remove-until}
{\rm{sublistp}}\,({\it{x\/}}, {\rm{remove-until}}\,({\it{v\/}}, {\it{y\/}})\index{remove-until})\index{sublistp} $\rightarrow$ {\rm{sublistp}}\,({\it{x\/}}, {\it{y\/}})\index{sublistp}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-nil-periodic-task-requests \\ \index{member-nil-periodic-task-request!s}
{\bf{nil}} $\not\in$ {\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-nil-periodic-tasks-requests \\ \index{member-nil-periodic-tasks-reque!sts}
{\bf{nil}} $\not\in$ {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  member-least-deadline-better \\ \index{member-least-deadline-better}
\=\+({\rm{sublistp}}\,({\it{r1\/}}, {\it{r2\/}})\index{sublistp} $\wedge$ ({\bf{nil}} $\not\in$ {\it{r2\/}})) \\ 
$\rightarrow$$\;\;\;\;$(({\rm{least-deadline}}\,({\it{r1\/}})\index{least-deadline} $\in$ {\it{r2\/}}) $=$ {\rm{listp}}\,({\it{r1\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  make-schedule-edf-is-edf-simple \\ \index{make-schedule-edf-is-edf-simple}
\=\+(\=\+{\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\it{r\/}})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;$({\rm{plist}}\,({\it{s\/}})\index{plist} $=$ {\it{s\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{all-non-nil-corresponding}}\,({\it{s\/}}, {\it{r\/}}, {\tt{0}})\index{all-non-nil-corresponding} \\ 
$\wedge$$\;\;\;\;$({\it{r\/}} $=$ {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\rm{length}}\,({\it{s\/}})\index{length})\index{periodic-tasks-requests}) \\ 
$\wedge$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$({\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf} $=$ {\rm{firstn}}\,({\it{n\/}}, {\it{s\/}})\index{firstn}) \\ 
$\wedge$$\;\;\;\;$({\rm{length}}\,({\it{s\/}})\index{length} $\not<$ {\it{n\/}}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{nthcdr}}\,({\it{n\/}}, {\rm{make-schedule-edf}}\,({\it{s\/}}, {\it{r\/}}, {\it{n\/}})\index{make-schedule-edf})\index{nthcdr} $=$ {\rm{nthcdr}}\,({\it{n\/}}, {\rm{edf}}\,({\rm{length}}\,({\it{s\/}})\index{length}, {\it{r\/}})\index{edf})\index{nthcdr})\-
\end{tabbing}

\begin{verbatim};;; big lemma
\end{verbatim}\begin{tabbing}{\sc Theorem}:  make-schedule-edf-is-edf \\ \index{make-schedule-edf-is-edf}
\=\+(\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{cars-non-nil-litatoms}}\,({\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\rm{length}}\,({\it{s\/}})\index{length})\index{periodic-tasks-requests})\index{cars-non-nil-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{all-litatoms}}\,({\it{s\/}})\index{all-litatoms} \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,({\it{s\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\rm{length}}\,({\it{s\/}})\index{length})\index{periodic-tasks-requests})\index{good-schedule} \\ 
$\wedge$$\;\;\;\;$({\rm{plist}}\,({\it{s\/}})\index{plist} $=$ {\it{s\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{all-non-nil-corresponding}}\,(\=\+{\it{s\/}}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\rm{length}}\,({\it{s\/}})\index{length})\index{periodic-tasks-requests}, \\ 
{\tt{0}})\-\index{all-non-nil-corresponding} \\ 
$\wedge$$\;\;\;\;${\rm{all-nils-or-cars}}\,({\it{s\/}}, {\it{pts\/}})\index{all-nils-or-cars} \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$({\it{n\/}} $=$ {\rm{length}}\,({\it{s\/}})\index{length}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{make-schedule-edf}}\,({\it{s\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests}, {\tt{0}})\index{make-schedule-edf} \\ 
$=$$\;\;\;\;${\rm{edf}}\,({\rm{length}}\,({\it{s\/}})\index{length}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\rm{length}}\,({\it{s\/}})\index{length})\index{periodic-tasks-requests})\index{edf})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-make-simple-schedule \\ \index{plist-make-simple-schedule}
\=\+{\rm{plist}}\,({\rm{make-simple-schedule}}\,({\it{pts\/}}, {\it{bigp\/}}, {\it{length\/}})\index{make-simple-schedule})\index{plist} \\ 
$=$$\;\;\;\;${\rm{make-simple-schedule}}\,({\it{pts\/}}, {\it{bigp\/}}, {\it{length\/}})\index{make-simple-schedule}\-
\end{tabbing}


\begin{tabbing}{\sc Definition}:\index{cpu-utilization} \\  
\=\+{\rm{cpu-utilization}}\,({\it{pts\/}}, {\it{bigp\/}})\index{cpu-utilization} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{pts\/}}) \\ 
{\bf then }\=\+(({\it{bigp\/}} $*$ {\rm{tk-duration}}\,({\rm{car}}\,({\it{pts\/}}))\index{tk-duration}) $\div$ {\rm{tk-period}}\,({\rm{car}}\,({\it{pts\/}}))\index{tk-period}) \\ 
$+$$\;\;\;\;${\rm{cpu-utilization}}\,({\rm{cdr}}\,({\it{pts\/}}), {\it{bigp\/}})\index{cpu-utilization}\- \\ 
{\bf else }{\tt{0}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-substring-schedule \\ \index{length-substring-schedule}
\=\+({\rm{expanded-tasksp}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expanded-tasksp} $\wedge$ {\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{length}}\,({\rm{substring-schedule}}\,({\it{pts\/}}, {\it{bigp\/}})\index{substring-schedule})\index{length} $=$ {\rm{cpu-utilization}}\,({\it{pts\/}}, {\it{bigp\/}})\index{cpu-utilization})\-
\end{tabbing}

\begin{verbatim};; combine big lemmas
\end{verbatim}\begin{tabbing}{\sc Theorem}:  good-edf-for-expanded \\ \index{good-edf-for-expanded}
\=\+(\=\+{\rm{expanded-tasksp}}\,({\it{pts\/}}, {\it{bigp\/}})\index{expanded-tasksp} \\ 
$\wedge$$\;\;\;\;$({\it{bigp\/}} $\not<$ {\rm{cpu-utilization}}\,({\it{pts\/}}, {\it{bigp\/}})\index{cpu-utilization}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{edf}}\,({\it{n\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\index{edf}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}

\begin{verbatim};;;;;;;;;;;;;;;;;;;;;;;;;;;;;

\end{verbatim}\begin{tabbing}{\sc Definition}:\index{expand-list} \\  
\=\+{\rm{expand-list}}\,({\it{n\/}}, {\it{list\/}})\index{expand-list} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{list\/}}) \\ 
{\bf then }{\rm{append}}\,({\rm{repeat}}\,({\it{n\/}}, {\rm{car}}\,({\it{list\/}}))\index{repeat}, {\rm{expand-list}}\,({\it{n\/}}, {\rm{cdr}}\,({\it{list\/}}))\index{expand-list}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  expand-list-append \\ \index{expand-list-append}
\=\+{\rm{expand-list}}\,({\it{n\/}}, {\rm{append}}\,({\it{l1\/}}, {\it{l2\/}}))\index{expand-list} \\ 
$=$$\;\;\;\;${\rm{append}}\,({\rm{expand-list}}\,({\it{n\/}}, {\it{l1\/}})\index{expand-list}, {\rm{expand-list}}\,({\it{n\/}}, {\it{l2\/}})\index{expand-list})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-expand-list \\ \index{listp-expand-list}
{\rm{listp}}\,({\rm{expand-list}}\,({\it{n\/}}, {\it{list\/}})\index{expand-list}) $=$ (({\it{n\/}} $\not\simeq {\tt{0}}$) $\wedge$ {\rm{listp}}\,({\it{list\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  length-expand-list \\ \index{length-expand-list}
{\rm{length}}\,({\rm{expand-list}}\,({\it{n\/}}, {\it{list\/}})\index{expand-list})\index{length} $=$ ({\it{n\/}} $*$ {\rm{length}}\,({\it{list\/}})\index{length})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-expand-list \\ \index{plist-expand-list}
{\rm{plist}}\,({\rm{expand-list}}\,({\it{n\/}}, {\it{list\/}})\index{expand-list})\index{plist} $=$ {\rm{expand-list}}\,({\it{n\/}}, {\it{list\/}})\index{expand-list}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-is-nil \\ \index{nthcdr-is-nil}
({\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr} $=$ {\bf{nil}}) $=$ (({\rm{length}}\,({\it{l\/}})\index{length} $=$ {\rm{fix}}\,({\it{n\/}})) $\wedge$ ({\rm{plist}}\,({\it{l\/}})\index{plist} $=$ {\it{l\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  active-task-requests-expand-tasks-requests \\ \index{active-task-requests-expand-tas!ks-requests}
\=\+({\it{bigp\/}} $\not\simeq {\tt{0}}$) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{active-task-requests}}\,({\it{n\/}}, {\rm{expand-tasks-requests}}\,({\it{r\/}}, {\it{bigp\/}})\index{expand-tasks-requests})\index{active-task-requests} \\ 
$=$$\;\;\;\;${\rm{expand-tasks-requests}}\,({\rm{active-task-requests}}\,({\it{n\/}} $\div$ {\it{bigp\/}}, {\it{r\/}})\index{active-task-requests}, {\it{bigp\/}})\index{expand-tasks-requests})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  repeat-1 \\ \index{repeat-1}
{\rm{repeat}}\,({\tt{1}}, {\it{v\/}})\index{repeat} $=$ {\rm{list}}\,({\it{v\/}})
\end{tabbing}


\noindent{\sc Event}:   Disable lessp-difference-special.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  quotient-add1-plus-special \\ \index{quotient-add1-plus-special}
\=\+(($1\;+$ ({\it{z\/}} $+$ ({\it{bigp\/}} $*$ {\it{v\/}}))) $\div$ {\it{bigp\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{bigp\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\it{v\/}} $+$ (($1\;+$ {\it{z\/}}) $\div$ {\it{bigp\/}})$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-add1-plus-special \\ \index{remainder-add1-plus-special}
\=\+(($1\;+$ ({\it{z\/}} $+$ ({\it{bigp\/}} $*$ {\it{v\/}}))) ${}${\bf{mod}}${}$ {\it{bigp\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{bigp\/}} $\simeq {\tt{0}}$$\;\;${\bf then }$1\;+$ {\it{z\/}} \\ 
{\bf else }($1\;+$ {\it{z\/}}) ${}${\bf{mod}}${}$ {\it{bigp\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-nthcdr \\ \index{plist-nthcdr}
\=\+(({\rm{length}}\,({\it{l\/}})\index{length} $\not<$ {\it{n\/}}) $\wedge$ ({\rm{plist}}\,({\it{l\/}})\index{plist} $=$ {\it{l\/}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{plist}}\,({\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr})\index{plist} $=$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-plus-add1-hack \\ \index{remainder-plus-add1-hack}
\=\+((({\it{z\/}} $+$ ({\it{v\/}} $*$ {\it{z\/}})) ${}${\bf{mod}}${}$ ($1\;+$ {\it{v\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$((({\it{z\/}} $+$ ({\it{z\/}} $*$ {\it{v\/}})) ${}${\bf{mod}}${}$ ($1\;+$ {\it{v\/}})) $=$ {\tt{0}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-plus-add1-hack \\ \index{quotient-plus-add1-hack}
\=\+((({\it{z\/}} $+$ ({\it{v\/}} $*$ {\it{z\/}})) $\div$ ($1\;+$ {\it{v\/}})) $=$ {\rm{fix}}\,({\it{z\/}})) \\ 
$\wedge$$\;\;\;\;$((({\it{z\/}} $+$ ({\it{z\/}} $*$ {\it{v\/}})) $\div$ ($1\;+$ {\it{v\/}})) $=$ {\rm{fix}}\,({\it{z\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-remainder-sub1-0 \\ \index{equal-remainder-sub1-0}
\=\+(({\it{x\/}} ${}${\bf{mod}}${}$ {\it{y\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+(({\it{x\/}} $-\;1$) ${}${\bf{mod}}${}$ {\it{y\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf elseif }{\it{y\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\it{x\/}} $-\;1$ \\ 
{\bf elseif }{\it{y\/}} $=$ {\tt{1}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\it{y\/}} $-\;1$$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-round-means \\ \index{lessp-round-means}
\=\+(({\it{bigp\/}} $*$ ({\it{n\/}} $\div$ {\it{bigp\/}})) $<$ {\it{n\/}}) \\ 
$=$$\;\;\;\;$((({\it{n\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $\not=$ {\tt{0}}) $\vee$ (({\it{bigp\/}} $\simeq {\tt{0}}$) $\wedge$ ({\it{n\/}} $\not\simeq {\tt{0}}$)))\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  equal-repeat-nil \\ \index{equal-repeat-nil}
({\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat} $=$ {\bf{nil}}) $=$ ({\it{n\/}} $\simeq {\tt{0}}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  times-1-arg2 \\ \index{times-1-arg2}
({\it{x\/}} $*$ {\tt{1}}) $=$ {\rm{fix}}\,({\it{x\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-0 \\ \index{firstn-0}
{\rm{firstn}}\,({\tt{0}}, {\it{l\/}})\index{firstn} $=$ {\bf{nil}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-times-sub1-sub1 \\ \index{lessp-times-sub1-sub1}
\=\+(({\it{bigp\/}} $*$ (({\it{n\/}} $\div$ {\it{bigp\/}}) $-\;1$)) $<$ ({\it{n\/}} $-\;1$)) \\ 
$=$$\;\;\;\;$(({\tt{1}} $<$ {\it{n\/}}) $\wedge$ ({\it{bigp\/}} $\not=$ {\tt{1}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-cons-repeat \\ \index{equal-cons-repeat}
\=\+({\rm{cons}}\,({\it{a\/}}, {\it{b\/}}) $=$ {\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat}) \\ 
$=$$\;\;\;\;$(({\it{a\/}} $=$ {\it{v\/}}) $\wedge$ ({\it{n\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{b\/}} $=$ {\rm{repeat}}\,({\it{n\/}} $-\;1$, {\it{v\/}})\index{repeat}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-1-means \\ \index{lessp-1-means}
({\tt{1}} $<$ {\it{x\/}}) $=$ (({\it{x\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{x\/}} $\not=$ {\tt{1}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-sub1-plus-hack \\ \index{lessp-sub1-plus-hack}
({\it{n1\/}} $<$ (({\it{n2\/}} $+$ {\it{n1\/}}) $-\;1$)) $=$ ({\tt{1}} $<$ {\it{n2\/}})
\end{tabbing}

\begin{verbatim};; backwards
\end{verbatim}\begin{tabbing}{\sc Theorem}:  firstn-nthcdr \\ \index{firstn-nthcdr}
{\rm{firstn}}\,({\it{x\/}}, {\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr})\index{firstn} $=$ {\rm{nthcdr}}\,({\it{n\/}}, {\rm{firstn}}\,({\it{n\/}} $+$ {\it{x\/}}, {\it{s\/}})\index{firstn})\index{nthcdr}
\end{tabbing}


\noindent{\sc Event}:   Disable firstn-nthcdr.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  nthcdr-x-firstn-x \\ \index{nthcdr-x-firstn-x}
{\rm{nthcdr}}\,({\it{n\/}}, {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn})\index{nthcdr} $=$ {\bf{nil}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-x-edf-x \\ \index{nthcdr-x-edf-x}
{\rm{nthcdr}}\,({\it{n\/}}, {\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf})\index{nthcdr} $=$ {\bf{nil}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nth-cons \\ \index{nth-cons}
\=\+{\rm{nth}}\,({\it{n\/}}, {\rm{cons}}\,({\it{a\/}}, {\it{b\/}}))\index{nth} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\it{a\/}} \\ 
{\bf else }{\rm{nth}}\,({\it{n\/}} $-\;1$, {\it{b\/}})\index{nth}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-nthcdr-too-big \\ \index{firstn-nthcdr-too-big}
\=\+({\it{n\/}} $<$ {\rm{length}}\,({\it{l\/}})\index{length}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{firstn}}\,({\it{n\/}} $-$ {\it{z\/}}, {\rm{nthcdr}}\,({\it{z\/}}, {\it{l\/}})\index{nthcdr})\index{firstn} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\it{z\/}}$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{nthcdr}}\,({\it{z\/}}, {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn})\index{nthcdr}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-nthcdr-edf-plus \\ \index{firstn-nthcdr-edf-plus}
\=\+{\rm{firstn}}\,({\it{n1\/}} $-$ {\it{n2\/}}, {\rm{nthcdr}}\,({\it{n2\/}}, {\rm{edf}}\,({\it{z\/}} $+$ {\it{n1\/}}, {\it{r\/}})\index{edf})\index{nthcdr})\index{firstn} \\ 
$=$$\;\;\;\;${\rm{firstn}}\,({\it{n1\/}} $-$ {\it{n2\/}}, {\rm{nthcdr}}\,({\it{n2\/}}, {\rm{edf}}\,({\it{n1\/}}, {\it{r\/}})\index{edf})\index{nthcdr})\index{firstn}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{nthcdr-expand-induct} \\  
\=\+{\rm{nthcdr-expand-induct}}\,({\it{n\/}}, {\it{b\/}}, {\it{l\/}})\index{nthcdr-expand-induct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{l\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{b\/}} $<$ {\it{n\/}}$\;\;${\bf then }{\rm{nthcdr-expand-induct}}\,({\it{n\/}} $-$ {\it{b\/}}, {\it{b\/}}, {\rm{cdr}}\,({\it{l\/}}))\index{nthcdr-expand-induct} \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{t}}$\;${\bf  endif}\-\-
\end{tabbing}
        
\begin{tabbing}{\sc Theorem}:  nthcdr-expand-list \\ \index{nthcdr-expand-list}
\=\+(({\it{n\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{nthcdr}}\,({\it{n\/}}, {\rm{expand-list}}\,({\it{b\/}}, {\it{l\/}})\index{expand-list})\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\it{b\/}} $*$ {\rm{length}}\,({\it{l\/}})\index{length}) $<$ {\it{n\/}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{expand-list}}\,({\it{b\/}}, {\rm{nthcdr}}\,({\it{n\/}} $\div$ {\it{b\/}}, {\it{l\/}})\index{nthcdr})\index{expand-list}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  expand-list-repeat \\ \index{expand-list-repeat}
{\rm{expand-list}}\,({\it{b\/}}, {\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat})\index{expand-list} $=$ {\rm{repeat}}\,({\it{n\/}} $*$ {\it{b\/}}, {\it{v\/}})\index{repeat}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-expand-list \\ \index{firstn-expand-list}
\=\+(({\it{n\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{firstn}}\,({\it{n\/}}, {\rm{expand-list}}\,({\it{b\/}}, {\it{l\/}})\index{expand-list})\index{firstn} $=$ {\rm{expand-list}}\,({\it{b\/}}, {\rm{firstn}}\,({\it{n\/}} $\div$ {\it{b\/}}, {\it{l\/}})\index{firstn})\index{expand-list})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-expand-list \\ \index{occurrences-expand-list}
{\rm{occurrences}}\,({\it{v\/}}, {\rm{expand-list}}\,({\it{bigp\/}}, {\it{l\/}})\index{expand-list})\index{occurrences} $=$ ({\it{bigp\/}} $*$ {\rm{occurrences}}\,({\it{v\/}}, {\it{l\/}})\index{occurrences})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  expand-list-0 \\ \index{expand-list-0}
({\it{n\/}} $\simeq {\tt{0}}$) $\rightarrow$ ({\rm{expand-list}}\,({\it{n\/}}, {\it{l\/}})\index{expand-list} $=$ {\bf{nil}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  listp-firstn \\ \index{listp-firstn}
{\rm{listp}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn}) $=$ ({\it{n\/}} $\not\simeq {\tt{0}}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-nil-firstn \\ \index{equal-nil-firstn}
({\bf{nil}} $=$ {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn}) $=$ ({\it{n\/}} $\simeq {\tt{0}}$)
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-difference-plus-nthcdr \\ \index{firstn-difference-plus-nthcdr}
\=\+(({\rm{length}}\,({\it{l\/}})\index{length} $\not<$ ({\it{a\/}} $+$ {\it{b\/}})) $\wedge$ ({\it{b\/}} $\not<$ {\it{c\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{firstn}}\,(({\it{a\/}} $+$ {\it{b\/}}) $-$ {\it{c\/}}, {\rm{nthcdr}}\,({\it{c\/}}, {\it{l\/}})\index{nthcdr})\index{firstn} \\ 
$=$$\;\;\;\;${\rm{append}}\,({\rm{firstn}}\,({\it{b\/}} $-$ {\it{c\/}}, {\rm{nthcdr}}\,({\it{c\/}}, {\it{l\/}})\index{nthcdr})\index{firstn}, {\rm{firstn}}\,({\it{a\/}}, {\rm{nthcdr}}\,({\it{b\/}}, {\it{l\/}})\index{nthcdr})\index{firstn}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-occurrences-firstn \\ \index{lessp-occurrences-firstn}
{\it{n\/}} $\not<$ {\rm{occurrences}}\,({\it{v\/}}, {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn})\index{occurrences}
\end{tabbing}


\noindent{\sc Event}:   Disable lessp-occurrences-firstn.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  lessp-occurrences-edf \\ \index{lessp-occurrences-edf}
{\it{n\/}} $\not<$ {\rm{occurrences}}\,({\it{v\/}}, {\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf})\index{occurrences}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-times-hack \\ \index{equal-times-hack}
({\it{a\/}} $<$ {\it{b\/}}) $\rightarrow$ (({\it{a\/}} $=$ ({\it{b\/}} $*$ {\it{n\/}})) $=$ (({\it{a\/}} $=$ {\tt{0}}) $\wedge$ ({\it{b\/}} $\not\simeq {\tt{0}}$) $\wedge$ ({\it{n\/}} $\simeq {\tt{0}}$)))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-occurrences-firstn-times \\ \index{equal-occurrences-firstn-times}
\=\+({\it{z\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+({\rm{occurrences}}\,({\it{v\/}}, {\rm{firstn}}\,({\it{z\/}}, {\it{l\/}})\index{firstn})\index{occurrences} $=$ ({\it{b\/}} $*$ {\it{n\/}})) \\ 
$=$$\;\;\;\;$(({\it{n\/}} $\simeq {\tt{0}}$) $\wedge$ ({\rm{occurrences}}\,({\it{v\/}}, {\rm{firstn}}\,({\it{z\/}}, {\it{l\/}})\index{firstn})\index{occurrences} $\simeq {\tt{0}}$)))\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  firstn-plus \\ \index{firstn-plus}
{\rm{firstn}}\,({\it{a\/}} $+$ {\it{b\/}}, {\it{l\/}})\index{firstn} $=$ {\rm{append}}\,({\rm{firstn}}\,({\it{b\/}}, {\it{l\/}})\index{firstn}, {\rm{firstn}}\,({\it{a\/}}, {\rm{nthcdr}}\,({\it{b\/}}, {\it{l\/}})\index{nthcdr})\index{firstn})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-plus-times \\ \index{equal-plus-times}
\=\+({\it{z\/}} $<$ {\it{b\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+((({\it{b\/}} $*$ {\it{n\/}}) $+$ {\it{z\/}}) $=$ ({\it{b\/}} $*$ {\it{v\/}})) \\ 
$=$$\;\;\;\;$(({\it{z\/}} $\simeq {\tt{0}}$) $\wedge$ ({\rm{fix}}\,({\it{n\/}}) $=$ {\rm{fix}}\,({\it{v\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-noop \\ \index{firstn-noop}
({\rm{length}}\,({\it{l\/}})\index{length} $=$ {\rm{fix}}\,({\it{n\/}})) $\rightarrow$ ({\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn} $=$ {\rm{plist}}\,({\it{l\/}})\index{plist})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  lessp-x-x \\ \index{lessp-x-x}
({\it{x\/}} $<$ {\it{x\/}}) $=$ {\bf{f}}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  overlapping-non-overlapping3-means \\ \index{overlapping-non-overlapping3-me!ans}
\=\+(\=\+{\rm{non-overlapping-requests3}}\,({\it{r\/}}, {\it{r2\/}})\index{non-overlapping-requests3} \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $\not<$ {\rm{cadr}}\,({\it{r\/}})) \\ 
$\wedge$$\;\;\;\;$({\rm{car}}\,({\it{req\/}}) $=$ {\rm{car}}\,({\it{r\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $\not<$ {\rm{cadr}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $<$ {\rm{caddr}}\,({\it{r\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{req\/}} $\in$ {\it{r2\/}}))\- \\ 
$\rightarrow$$\;\;\;\;$(({\it{x\/}} $<$ {\rm{caddr}}\,({\it{req\/}})) $=$ ({\it{r\/}} $=$ {\it{req\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  assoc-unfulfilled-expanded-non-overlapping \\ \index{assoc-unfulfilled-expanded-non-!overlapping}
\=\+(\=\+({\it{r\/}} $\not\in$ {\it{r2\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests3}}\,({\it{r\/}}, {\it{r2\/}})\index{non-overlapping-requests3} \\ 
$\wedge$$\;\;\;\;$({\it{z\/}} $<$ {\it{b\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $<$ {\rm{caddr}}\,({\it{r\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $\not<$ {\rm{cadr}}\,({\it{r\/}})))\- \\ 
$\rightarrow$$\;\;\;\;$($\neg$ {\rm{assoc}}\,(\=\+{\rm{car}}\,({\it{r\/}}), \\ 
{\rm{unfulfilled}}\,(\=\+{\it{z\/}} $+$ ({\it{b\/}} $*$ {\it{x\/}}), \\ 
{\it{s\/}}, \\ 
{\rm{expand-tasks-requests}}\,(\=\+{\rm{active-task-requests}}\,(\=\+{\it{x\/}}, \\ 
{\it{r2\/}})\-\index{active-task-requests}, \\ 
{\it{b\/}})\-\index{expand-tasks-requests})\-\index{unfulfilled})\-)\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-assoc-car-req \\ \index{not-assoc-car-req}
\=\+(\=\+{\rm{valid-requests}}\,({\it{r2\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;$({\it{req\/}} $\in$ {\it{r2\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $<$ {\rm{caddr}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $\not<$ {\rm{cadr}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r2\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;$({\it{z\/}} $<$ {\it{b\/}}) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{occurrences}}\,(\=\+{\rm{car}}\,({\it{req\/}}), \\ 
{\rm{firstn}}\,(\=\+({\it{z\/}} $+$ ({\it{b\/}} $*$ {\it{x\/}})) $-$ ({\it{b\/}} $*$ {\rm{cadr}}\,({\it{req\/}})), \\ 
{\rm{nthcdr}}\,({\it{b\/}} $*$ {\rm{cadr}}\,({\it{req\/}}), {\it{s\/}})\index{nthcdr})\-\index{firstn})\-\index{occurrences} \\ 
$=$$\;\;\;\;$({\it{b\/}} $*$ {\rm{cadddr}}\,({\it{req\/}})))\-)\- \\ 
$\rightarrow$$\;\;\;\;$($\neg$ {\rm{assoc}}\,(\=\+{\rm{car}}\,({\it{req\/}}), \\ 
{\rm{unfulfilled}}\,(\=\+{\it{z\/}} $+$ ({\it{b\/}} $*$ {\it{x\/}}), \\ 
{\it{s\/}}, \\ 
{\rm{expand-tasks-requests}}\,(\=\+{\rm{active-task-requests}}\,(\=\+{\it{x\/}}, \\ 
{\it{r2\/}})\-\index{active-task-requests}, \\ 
{\it{b\/}})\-\index{expand-tasks-requests})\-\index{unfulfilled})\-)\-
\end{tabbing}
           
\begin{tabbing}{\sc Theorem}:  equal-car-car-hack \\ \index{equal-car-car-hack}
\=\+(\=\+({\it{e1\/}} $\in$ {\it{l\/}}) \\ 
$\wedge$$\;\;\;\;$($\neg$ {\rm{assoc}}\,({\rm{car}}\,({\it{e2\/}}), {\it{l\/}})) \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{l\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\it{e1\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\it{e2\/}}))\- \\ 
$\rightarrow$$\;\;\;\;$({\rm{car}}\,({\it{e1\/}}) $\not=$ {\rm{car}}\,({\it{e2\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-member-nthcdr-add1 \\ \index{not-member-nthcdr-add1}
\=\+({\it{v\/}} $\not\in$ {\rm{nthcdr}}\,($1\;+$ {\it{x\/}}, {\it{s\/}})\index{nthcdr}) \\ 
$\rightarrow$$\;\;\;\;$(({\it{v\/}} $\in$ {\rm{nthcdr}}\,({\it{x\/}}, {\it{s\/}})\index{nthcdr}) $=$ (({\it{x\/}} $<$ {\rm{length}}\,({\it{s\/}})\index{length}) $\wedge$ ({\it{v\/}} $=$ {\rm{nth}}\,({\it{x\/}}, {\it{s\/}})\index{nth})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-hack \\ \index{occurrences-hack}
\=\+(({\it{v\/}} $\not\in$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{s\/}})\index{nthcdr}) $\wedge$ ({\it{n\/}} $\not<$ {\it{b\/}}) $\wedge$ {\rm{litatom}}\,({\it{v\/}})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{occurrences}}\,({\it{v\/}}, {\rm{firstn}}\,(({\it{a\/}} $+$ {\it{n\/}}) $-$ {\it{b\/}}, {\rm{nthcdr}}\,({\it{b\/}}, {\it{s\/}})\index{nthcdr})\index{firstn})\index{occurrences} \\ 
$=$$\;\;\;\;${\rm{occurrences}}\,({\it{v\/}}, {\rm{firstn}}\,({\it{n\/}} $-$ {\it{b\/}}, {\rm{nthcdr}}\,({\it{b\/}}, {\it{s\/}})\index{nthcdr})\index{firstn})\index{occurrences})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-hack2 \\ \index{occurrences-hack2}
\=\+(({\it{v\/}} $\not\in$ {\rm{nthcdr}}\,({\it{n\/}}, {\it{l\/}})\index{nthcdr}) $\wedge$ ({\it{n\/}} $<$ {\rm{length}}\,({\it{l\/}})\index{length})) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{occurrences}}\,({\it{v\/}}, {\rm{nthcdr}}\,({\it{n1\/}}, {\it{l\/}})\index{nthcdr})\index{occurrences} \\ 
$=$$\;\;\;\;${\rm{occurrences}}\,({\it{v\/}}, {\rm{nthcdr}}\,({\it{n1\/}}, {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn})\index{nthcdr})\index{occurrences})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  valid-requests-unfulfilled \\ \index{valid-requests-unfulfilled}
{\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} $\rightarrow$ {\rm{valid-requests}}\,({\rm{unfulfilled}}\,({\it{n\/}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled})\index{valid-requests}
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  valid-requests-expand-tasks-requests \\ \index{valid-requests-expand-tasks-req!uests}
\=\+{\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{valid-requests}}\,({\rm{expand-tasks-requests}}\,({\it{r\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{valid-requests} \\ 
$=$$\;\;\;\;$(({\it{b\/}} $\not\simeq {\tt{0}}$) $\vee$ ($\neg$ {\rm{listp}}\,({\it{r\/}}))))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  litatom-caar \\ \index{litatom-caar}
{\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} $\rightarrow$ ({\rm{litatom}}\,({\rm{caar}}\,({\it{r\/}})) $=$ {\rm{listp}}\,({\it{r\/}}))
\end{tabbing}


\noindent{\sc Event}:   Disable litatom-caar.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  numberp-cadar \\ \index{numberp-cadar}
{\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} $\rightarrow$ ({\rm{cadar}}\,({\it{r\/}}) $\in\;${\bf{N}}${}$)
\end{tabbing}


\noindent{\sc Event}:   Disable numberp-cadar.

\addvspace{18pt}

\begin{tabbing}{\sc Theorem}:  not-equal-car-least-deadline \\ \index{not-equal-car-least-deadline}
\=\+(\=\+{\rm{valid-requests}}\,({\it{r2\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;$({\it{req\/}} $\in$ {\it{r2\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $<$ {\rm{caddr}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $\not<$ {\rm{cadr}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r2\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;$({\it{z\/}} $<$ {\it{b\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{b\/}} $\not\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;${\rm{litatom}}\,({\rm{car}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{occurrences}}\,(\=\+{\rm{car}}\,({\it{req\/}}), \\ 
{\rm{firstn}}\,(\=\+({\it{z\/}} $+$ ({\it{b\/}} $*$ {\it{x\/}})) $-$ ({\it{b\/}} $*$ {\rm{cadr}}\,({\it{req\/}})), \\ 
{\rm{nthcdr}}\,({\it{b\/}} $*$ {\rm{cadr}}\,({\it{req\/}}), {\it{s\/}})\index{nthcdr})\-\index{firstn})\-\index{occurrences} \\ 
$=$$\;\;\;\;$({\it{b\/}} $*$ {\rm{cadddr}}\,({\it{req\/}})))\-)\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{car}}\,({\it{req\/}}) \\ 
$\not=$$\;\;\;\;${\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{z\/}} $+$ ({\it{b\/}} $*$ {\it{x\/}}), \\ 
{\it{s\/}}, \\ 
{\rm{expand-tasks-requests}}\,(\=\+{\rm{active-task-requests}}\,(\=\+{\it{x\/}}, \\ 
{\it{r2\/}})\-\index{active-task-requests}, \\ 
{\it{b\/}})\-\index{expand-tasks-requests})\-\index{unfulfilled})\index{least-deadline}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  not-equal-car-least-deadline-special \\ \index{not-equal-car-least-deadline-spe!cial}
\=\+(\=\+{\rm{valid-requests}}\,({\it{r2\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;$({\it{req\/}} $\in$ {\it{r2\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $<$ {\rm{caddr}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $\not<$ {\rm{cadr}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r2\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;$({\it{b\/}} $\not\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;${\rm{litatom}}\,({\rm{car}}\,({\it{req\/}})) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{occurrences}}\,(\=\+{\rm{car}}\,({\it{req\/}}), \\ 
{\rm{firstn}}\,(\=\+({\it{b\/}} $*$ {\it{x\/}}) $-$ ({\it{b\/}} $*$ {\rm{cadr}}\,({\it{req\/}})), \\ 
{\rm{nthcdr}}\,({\it{b\/}} $*$ {\rm{cadr}}\,({\it{req\/}}), {\it{s\/}})\index{nthcdr})\-\index{firstn})\-\index{occurrences} \\ 
$=$$\;\;\;\;$({\it{b\/}} $*$ {\rm{cadddr}}\,({\it{req\/}})))\-)\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{car}}\,({\it{req\/}}) \\ 
$\not=$$\;\;\;\;${\rm{car}}\,({\rm{least-deadline}}\,({\rm{unfulfilled}}\,(\=\+{\it{b\/}} $*$ {\it{x\/}}, \\ 
{\it{s\/}}, \\ 
{\rm{expand-tasks-requests}}\,(\=\+{\rm{active-task-requests}}\,(\=\+{\it{x\/}}, \\ 
{\it{r2\/}})\-\index{active-task-requests}, \\ 
{\it{b\/}})\-\index{expand-tasks-requests})\-\index{unfulfilled})\index{least-deadline}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  occurrences-edf-satisfied \\ \index{occurrences-edf-satisfied}
\=\+(\=\+{\rm{listp}}\,({\it{r\/}}) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $<$ {\rm{caddar}}\,({\it{r\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $\not<$ {\rm{cadar}}\,({\it{r\/}})) \\ 
$\wedge$$\;\;\;\;$({\it{z\/}} $<$ {\it{b\/}}) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{expand-list}}\,({\it{b\/}}, {\rm{edf}}\,({\it{x\/}}, {\it{r2\/}})\index{edf})\index{expand-list} \\ 
$=$$\;\;\;\;${\rm{edf}}\,({\it{b\/}} $*$ {\it{x\/}}, {\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{edf})\- \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r2\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r2\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;${\rm{sublistp}}\,({\it{r\/}}, {\it{r2\/}})\index{sublistp} \\ 
$\wedge$$\;\;\;\;$({\it{b\/}} $\not=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{b\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$({\it{x\/}} $\in\;${\bf{N}}${}$) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{occurrences}}\,(\=\+{\rm{caar}}\,({\it{r\/}}), \\ 
{\rm{firstn}}\,({\it{x\/}} $-$ {\rm{cadar}}\,({\it{r\/}}), {\rm{nthcdr}}\,({\rm{cadar}}\,({\it{r\/}}), {\rm{edf}}\,({\it{x\/}}, {\it{r2\/}})\index{edf})\index{nthcdr})\index{firstn})\-\index{occurrences} \\ 
$=$$\;\;\;\;${\rm{cadddar}}\,({\it{r\/}}))\-)\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{occurrences}}\,(\=\+{\rm{caar}}\,({\it{r\/}}), \\ 
{\rm{firstn}}\,(\=\+{\it{z\/}}, \\ 
{\rm{nthcdr}}\,(\=\+{\it{b\/}} $*$ {\it{x\/}}, \\ 
{\rm{edf}}\,(\=\+{\it{z\/}} $+$ ({\it{b\/}} $*$ {\it{x\/}}), \\ 
{\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\-\index{edf})\-\index{nthcdr})\-\index{firstn})\-\index{occurrences} \\ 
$=$$\;\;\;\;${\tt{0}})\-\-
\end{tabbing}

                     
\begin{tabbing}{\sc Theorem}:  unfulfilled-expanded-on-line \\ \index{unfulfilled-expanded-on-line}
\=\+(\=\+({\it{z\/}} $<$ {\it{b\/}}) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{expand-list}}\,({\it{b\/}}, {\rm{edf}}\,({\it{x\/}}, {\it{r2\/}})\index{edf})\index{expand-list} \\ 
$=$$\;\;\;\;${\rm{edf}}\,({\it{x\/}} $*$ {\it{b\/}}, {\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{edf})\- \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r2\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r2\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;${\rm{sublistp}}\,({\it{r\/}}, {\it{r2\/}})\index{sublistp})\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{unfulfilled}}\,(\=\+{\it{z\/}} $+$ ({\it{x\/}} $*$ {\it{b\/}}), \\ 
{\rm{edf}}\,({\it{z\/}} $+$ ({\it{x\/}} $*$ {\it{b\/}}), {\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{edf}, \\ 
{\rm{expand-tasks-requests}}\,({\rm{active-task-requests}}\,({\it{x\/}}, {\it{r\/}})\index{active-task-requests}, {\it{b\/}})\index{expand-tasks-requests})\-\index{unfulfilled} \\ 
$=$$\;\;\;\;${\rm{unfulfilled}}\,(\=\+{\it{x\/}} $*$ {\it{b\/}}, \\ 
{\rm{edf}}\,({\it{z\/}} $+$ ({\it{x\/}} $*$ {\it{b\/}}), {\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{edf}, \\ 
{\rm{expand-tasks-requests}}\,({\rm{active-task-requests}}\,({\it{x\/}}, {\it{r\/}})\index{active-task-requests}, {\it{b\/}})\index{expand-tasks-requests})\-\index{unfulfilled})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-expand-list \\ \index{unfulfilled-expand-list}
\=\+({\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} $\wedge$ (({\it{n\/}} ${}${\bf{mod}}${}$ {\it{b\/}}) $=$ {\tt{0}}) $\wedge$ ({\it{b\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{unfulfilled}}\,({\it{n\/}}, {\rm{expand-list}}\,({\it{b\/}}, {\it{s\/}})\index{expand-list}, {\rm{expand-tasks-requests}}\,({\it{r\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{unfulfilled} \\ 
$=$$\;\;\;\;${\rm{expand-tasks-requests}}\,({\rm{unfulfilled}}\,({\it{n\/}} $\div$ {\it{b\/}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled}, {\it{b\/}})\index{expand-tasks-requests})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-nil-expand-list \\ \index{equal-nil-expand-list}
({\bf{nil}} $=$ {\rm{expand-list}}\,({\it{b\/}}, {\it{l\/}})\index{expand-list}) $=$ (({\it{b\/}} $\simeq {\tt{0}}$) $\vee$ ({\it{l\/}} $\simeq\;${{\bf{nil}}}${}$))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  valid-requests-sublistp \\ \index{valid-requests-sublistp}
\=\+({\rm{sublistp}}\,({\it{x\/}}, {\it{y\/}})\index{sublistp} $\wedge$ ({\rm{plist}}\,({\it{x\/}})\index{plist} $=$ {\it{x\/}}) $\wedge$ {\rm{valid-requests}}\,({\it{y\/}})\index{valid-requests}) \\ 
$\rightarrow$$\;\;\;\;${\rm{valid-requests}}\,({\it{x\/}})\index{valid-requests}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-sub1-expanded-on-line \\ \index{unfulfilled-sub1-expanded-on-li!ne}
\=\+(\=\+({\it{a\/}} $\not\simeq {\tt{0}}$) \\ 
$\wedge$$\;\;\;\;$({\it{a\/}} $<$ {\it{b\/}}) \\ 
$\wedge$$\;\;\;\;$(\=\+{\rm{expand-list}}\,({\it{b\/}}, {\rm{edf}}\,({\it{x\/}}, {\it{r2\/}})\index{edf})\index{expand-list} \\ 
$=$$\;\;\;\;${\rm{edf}}\,({\it{x\/}} $*$ {\it{b\/}}, {\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{edf})\- \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r2\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r2\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{sublistp}}\,({\it{r\/}}, {\it{r2\/}})\index{sublistp})\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{unfulfilled}}\,(\=\+({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{x\/}})) $-\;1$, \\ 
{\rm{edf}}\,(({\it{a\/}} $+$ ({\it{b\/}} $*$ {\it{x\/}})) $-\;1$, {\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{edf}, \\ 
{\rm{expand-tasks-requests}}\,({\rm{active-task-requests}}\,({\it{x\/}}, {\it{r\/}})\index{active-task-requests}, {\it{b\/}})\index{expand-tasks-requests})\-\index{unfulfilled} \\ 
$=$$\;\;\;\;${\rm{unfulfilled}}\,(\=\+{\it{x\/}} $*$ {\it{b\/}}, \\ 
{\rm{edf}}\,(\=\+({\it{a\/}} $+$ ({\it{x\/}} $*$ {\it{b\/}})) $-\;1$, \\ 
{\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\-\index{edf}, \\ 
{\rm{expand-tasks-requests}}\,({\rm{active-task-requests}}\,({\it{x\/}}, {\it{r\/}})\index{active-task-requests}, {\it{b\/}})\index{expand-tasks-requests})\-\index{unfulfilled})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-only-helper \\ \index{firstn-only-helper}
\=\+({\rm{firstn}}\,({\it{n\/}}, {\it{a\/}})\index{firstn} $=$ {\rm{firstn}}\,({\it{n\/}}, {\it{b\/}})\index{firstn}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{firstn}}\,({\it{n\/}} $-$ {\it{c\/}}, {\rm{nthcdr}}\,({\it{c\/}}, {\it{a\/}})\index{nthcdr})\index{firstn} $=$ {\rm{firstn}}\,({\it{n\/}} $-$ {\it{c\/}}, {\rm{nthcdr}}\,({\it{c\/}}, {\it{b\/}})\index{nthcdr})\index{firstn})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  firstn-nthcdr-edf-plus-simple \\ \index{firstn-nthcdr-edf-plus-simple}
\=\+{\rm{firstn}}\,({\it{n\/}} $-$ {\it{a\/}}, {\rm{nthcdr}}\,({\it{a\/}}, {\rm{edf}}\,({\it{b\/}} $+$ {\it{n\/}}, {\it{r\/}})\index{edf})\index{nthcdr})\index{firstn} \\ 
$=$$\;\;\;\;${\rm{firstn}}\,({\it{n\/}} $-$ {\it{a\/}}, {\rm{nthcdr}}\,({\it{a\/}}, {\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf})\index{nthcdr})\index{firstn}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-too-big \\ \index{unfulfilled-too-big}
{\rm{unfulfilled}}\,({\it{n\/}}, {\rm{edf}}\,({\it{a\/}} $+$ {\it{n\/}}, {\it{r1\/}})\index{edf}, {\it{r2\/}})\index{unfulfilled} $=$ {\rm{unfulfilled}}\,({\it{n\/}}, {\rm{edf}}\,({\it{n\/}}, {\it{r1\/}})\index{edf}, {\it{r2\/}})\index{unfulfilled}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-too-big-sub1 \\ \index{unfulfilled-too-big-sub1}
\=\+({\it{a\/}} $\not\simeq {\tt{0}}$) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{unfulfilled}}\,({\it{n\/}}, {\rm{edf}}\,(({\it{a\/}} $+$ {\it{n\/}}) $-\;1$, {\it{r1\/}})\index{edf}, {\it{r2\/}})\index{unfulfilled} \\ 
$=$$\;\;\;\;${\rm{unfulfilled}}\,({\it{n\/}}, {\rm{edf}}\,({\it{n\/}}, {\it{r1\/}})\index{edf}, {\it{r2\/}})\index{unfulfilled})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  car-least-deadline-expand-tasks-requests \\ \index{car-least-deadline-expand-tasks!-requests}
\=\+({\it{b\/}} $\not\simeq {\tt{0}}$) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{car}}\,({\rm{least-deadline}}\,({\rm{expand-tasks-requests}}\,({\it{r\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{least-deadline}) \\ 
$=$$\;\;\;\;${\rm{car}}\,({\rm{least-deadline}}\,({\it{r\/}})\index{least-deadline}))\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-hack \\ \index{remainder-hack}
\=\+(({\it{n\/}} ${}${\bf{mod}}${}$ {\it{p\/}}) $=$ {\tt{0}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+((({\it{x\/}} $+$ {\it{n\/}}) $-\;1$) ${}${\bf{mod}}${}$ {\it{p\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{x\/}} $\simeq {\tt{0}}$$\;\;${\bf then }({\it{n\/}} $-\;1$) ${}${\bf{mod}}${}$ {\it{p\/}} \\ 
{\bf else }({\it{x\/}} $-\;1$) ${}${\bf{mod}}${}$ {\it{p\/}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-car-least-deadline-nil \\ \index{equal-car-least-deadline-nil}
{\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} $\rightarrow$ ({\rm{car}}\,({\rm{least-deadline}}\,({\it{r\/}})\index{least-deadline}) $\not=$ {\bf{nil}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-0-expand-tasks-requests \\ \index{unfulfilled-0-expand-tasks-reque!sts}
\=\+({\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} $\wedge$ ({\it{b\/}} $\not\simeq {\tt{0}}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{unfulfilled}}\,({\tt{0}}, {\it{s\/}}, {\rm{expand-tasks-requests}}\,({\it{r\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{unfulfilled} \\ 
$=$$\;\;\;\;${\rm{expand-tasks-requests}}\,({\rm{unfulfilled}}\,({\tt{0}}, {\it{s\/}}, {\it{r\/}})\index{unfulfilled}, {\it{b\/}})\index{expand-tasks-requests})\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  unfulfilled-0-edf \\ \index{unfulfilled-0-edf}
{\rm{unfulfilled}}\,({\tt{0}}, {\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf}, {\it{r2\/}})\index{unfulfilled} $=$ {\rm{unfulfilled}}\,({\tt{0}}, {\bf{nil}}, {\it{r2\/}})\index{unfulfilled}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  unfulfilled-expanded-on-line-beginning \\ \index{unfulfilled-expanded-on-line-be!ginning}
\=\+(\=\+({\it{z\/}} $<$ {\it{b\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r2\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;$({\it{z\/}} $\not=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;${\rm{sublistp}}\,({\it{r\/}}, {\it{r2\/}})\index{sublistp} \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r2\/}})\index{valid-requests})\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{unfulfilled}}\,(\=\+{\it{z\/}}, \\ 
{\rm{edf}}\,({\it{z\/}}, {\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{edf}, \\ 
{\rm{expand-tasks-requests}}\,({\rm{active-task-requests}}\,({\tt{0}}, {\it{r\/}})\index{active-task-requests}, {\it{b\/}})\index{expand-tasks-requests})\-\index{unfulfilled} \\ 
$=$$\;\;\;\;${\rm{unfulfilled}}\,(\=\+{\tt{0}}, \\ 
{\rm{edf}}\,({\it{z\/}}, {\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{b\/}})\index{expand-tasks-requests})\index{edf}, \\ 
{\rm{expand-tasks-requests}}\,(\=\+{\rm{active-task-requests}}\,({\tt{0}}, {\it{r\/}})\index{active-task-requests}, \\ 
{\it{b\/}})\-\index{expand-tasks-requests})\-\index{unfulfilled})\-\-
\end{tabbing}

\begin{verbatim};(prove-lemma edf-simple-expand-tasks-requests (rewrite)
;  (implies
;   (and
;    (lessp 1 bigp)
;    (non-overlapping-requests r)
;    (valid-requests r))
;  (equal
;   (edf n (expand-tasks-requests r bigp))
;   (append
;    (expand-list bigp (edf (quotient n bigp) r))
;    (repeat (remainder n bigp)
;            (if (listp (unfulfilled 
;                        (quotient n bigp) 
;                        (edf (quotient n bigp) r)
;                        (active-task-requests (quotient n bigp) r)))
;                (car (least-deadline 
;                      (unfulfilled 
;                       (quotient n bigp)
;                       (edf (quotient n bigp) r)
;                       (active-task-requests (quotient n bigp) r))))
;              nil)))))
;  ((induct (plus n bigp))
;   (disable-theory t)
;   (enable-theory naturals ground-zero task-abbr)
;   (disable times-add1)
;   (enable edf expand-list listp-edf-simple listp-expand-list
;           valid-requests-unfulfilled unfulfilled-expanded-on-line-beginning
;           equal-car-least-deadline-nil
;           length-edf-simple length-expand-list plist-expand-list 
;           firstn-edf-simple equal-append equal-repeat-repeat
;           equal-cons-repeat lessp-1-means remainder-add1-plus-special
;           equal-repeat-nil  firstn-0 lessp-times-sub1-sub1 firstn
;           unfulfilled-sub1-expanded-on-line   unfulfilled-expanded-on-line 
;           sublistp-x-x unfulfilled-too-big
;           car-least-deadline-expand-tasks-requests
;           nthcdr-expand-list listp-expand-tasks-requests
;           valid-requests-active-task-requests
;           expand-list-repeat unfulfilled-too-big-sub1
;           firstn-expand-list unfulfilled-0-edf
;           remainder-hack unfulfilled-0-expand-tasks-requests
;           occurrences-expand-list
;           unfulfilled-expand-list
;           equal-remainder-sub1-0 lessp-sub1-plus-hack
;           active-task-requests-expand-tasks-requests append-nil
;           remainder-plus-add1-hack quotient-plus-add1-hack
;           firstn-append firstn-edf-simple length-nthcdr plist-repeat
;           plist-edf-simple listp-edf-simple lessp-round-means
;           firstn-repeat length-repeat nthcdr-repeat length
;           plist-expand-list quotient-add1-plus-special repeat-1
;           plist-nthcdr nthcdr-is-nil length-append expand-list-append
;           nlistp-nthcdr listp-nthcdr nthcdr-append nthcdr listp-repeat
;           equal-nil-expand-list
;           times-1-arg2
;           repeat expand-list)))

\end{verbatim}\begin{tabbing}{\sc Theorem}:  edf-simple-expand-tasks-requests \\ \index{edf-simple-expand-tasks-request!s}
\=\+(({\tt{1}} $<$ {\it{bigp\/}}) $\wedge$ {\rm{non-overlapping-requests}}\,({\it{r\/}})\index{non-overlapping-requests} $\wedge$ {\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{edf}}\,({\it{n\/}}, {\rm{expand-tasks-requests}}\,({\it{r\/}}, {\it{bigp\/}})\index{expand-tasks-requests})\index{edf} \\ 
$=$$\;\;\;\;${\rm{append}}\,(\=\+{\rm{expand-list}}\,({\it{bigp\/}}, {\rm{edf}}\,({\it{n\/}} $\div$ {\it{bigp\/}}, {\it{r\/}})\index{edf})\index{expand-list}, \\ 
\=\+{\bf let }\=\+{\it{undone\/}}{\bf $\;$ be$\;\;$}{\rm{unfulfilled}}\,(\=\+{\it{n\/}} $\div$ {\it{bigp\/}}, \\ 
{\rm{edf}}\,({\it{n\/}} $\div$ {\it{bigp\/}}, {\it{r\/}})\index{edf}, \\ 
{\rm{active-task-requests}}\,(\=\+{\it{n\/}} $\div$ {\it{bigp\/}}, \\ 
{\it{r\/}})\-\index{active-task-requests})\-\index{unfulfilled}\- \\ 
{\bf in} \\ 
{\rm{repeat}}\,(\=\+{\it{n\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}, \\ 
\=\+{\bf if }{\rm{listp}}\,({\it{undone\/}}) \\ 
{\bf then }{\rm{car}}\,({\rm{least-deadline}}\,({\it{undone\/}})\index{least-deadline}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-)\-\index{repeat}$\;${\bf  endlet}\-)\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  quotient-difference-special \\ \index{quotient-difference-special}
\=\+((({\it{a\/}} $*$ {\it{b\/}}) $-$ ({\it{a\/}} $*$ {\it{c\/}})) $\div$ {\it{a\/}}) \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{a\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\it{b\/}} $-$ {\it{c\/}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  good-schedule-expand-tasks-reduces \\ \index{good-schedule-expand-tasks-redu!ces}
\=\+(\=\+({\tt{1}} $<$ {\it{bigp\/}}) \\ 
$\wedge$$\;\;\;\;${\rm{non-overlapping-requests}}\,({\it{r1\/}})\index{non-overlapping-requests} \\ 
$\wedge$$\;\;\;\;${\rm{sublistp}}\,({\it{r2\/}}, {\it{r1\/}})\index{sublistp} \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r1\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;${\rm{valid-requests}}\,({\it{r2\/}})\index{valid-requests} \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\it{bigp\/}}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{edf}}\,({\it{n\/}}, {\rm{expand-tasks-requests}}\,({\it{r1\/}}, {\it{bigp\/}})\index{expand-tasks-requests})\index{edf}, \\ 
{\rm{expand-tasks-requests}}\,({\it{r2\/}}, {\it{bigp\/}})\index{expand-tasks-requests})\-\index{good-schedule})\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,({\rm{edf}}\,({\it{n\/}} $\div$ {\it{bigp\/}}, {\it{r1\/}})\index{edf}, {\it{r2\/}})\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  expand-tasks-1 \\ \index{expand-tasks-1}
{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} $\rightarrow$ ({\rm{expand-tasks}}\,({\it{pts\/}}, {\tt{1}})\index{expand-tasks} $=$ {\it{pts\/}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  cpu-utilization-expand-tasks \\ \index{cpu-utilization-expand-tasks}
\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{cpu-utilization}}\,({\rm{expand-tasks}}\,({\it{pts\/}}, {\it{n\/}})\index{expand-tasks}, {\it{n2\/}})\index{cpu-utilization} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{cpu-utilization}}\,({\it{pts\/}}, {\it{n2\/}})\index{cpu-utilization}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  big-period-expand-tasks \\ \index{big-period-expand-tasks}
\=\+{\rm{big-period}}\,({\rm{expand-tasks}}\,({\it{pts\/}}, {\it{n\/}})\index{expand-tasks})\index{big-period} \\ 
$=$$\;\;\;\;$({\rm{exp}}\,({\it{n\/}}, {\rm{length}}\,({\it{pts\/}})\index{length})\index{exp} $*$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-from-exp \\ \index{remainder-from-exp}
((({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{exp}}\,({\it{x\/}}, {\it{y\/}})\index{exp}) $=$ {\tt{0}}) $\wedge$ ({\it{y\/}} $\not\simeq {\tt{0}}$)) $\rightarrow$ (({\it{n\/}} ${}${\bf{mod}}${}$ {\it{x\/}}) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  good-edf-help \\ \index{good-edf-help}
\=\+(\=\+({\rm{big-period}}\,({\it{pts\/}})\index{big-period} $\not<$ {\rm{cpu-utilization}}\,({\it{pts\/}}, {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\index{cpu-utilization}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{listp}}\,({\it{pts\/}}) \\ 
$\wedge$$\;\;\;\;$({\tt{1}} $<$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{exp}}\,({\rm{big-period}}\,({\it{pts\/}})\index{big-period}, {\rm{length}}\,({\it{pts\/}})\index{length})\index{exp}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{edf}}\,({\it{n\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\index{edf}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  good-edf-with-remainder \\ \index{good-edf-with-remainder}
\=\+(\=\+({\rm{big-period}}\,({\it{pts\/}})\index{big-period} $\not<$ {\rm{cpu-utilization}}\,({\it{pts\/}}, {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\index{cpu-utilization}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$({\tt{1}} $<$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{exp}}\,({\rm{big-period}}\,({\it{pts\/}})\index{big-period}, {\rm{length}}\,({\it{pts\/}})\index{length})\index{exp}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{edf}}\,({\it{n\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\index{edf}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{requests-deadlines-not-greater} \\  
\=\+{\rm{requests-deadlines-not-greater}}\,({\it{r\/}}, {\it{time\/}})\index{requests-deadlines-not-greater} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{r\/}}) \\ 
{\bf then }\=\+{\bf if }{\it{time\/}} $<$ {\rm{caddar}}\,({\it{r\/}}) \\ 
{\bf then }{\rm{requests-deadlines-not-greater}}\,({\rm{cdr}}\,({\it{r\/}}), {\it{time\/}})\index{requests-deadlines-not-greater} \\ 
{\bf else }{\rm{cons}}\,(\=\+{\rm{car}}\,({\it{r\/}}), \\ 
{\rm{requests-deadlines-not-greater}}\,({\rm{cdr}}\,({\it{r\/}}), {\it{time\/}})\index{requests-deadlines-not-greater})\-$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{firstn-nthcdr-firstn-induct} \\  
\=\+{\rm{firstn-nthcdr-firstn-induct}}\,({\it{a\/}}, {\it{b\/}}, {\it{n\/}}, {\it{l\/}})\index{firstn-nthcdr-firstn-induct} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{a\/}} $\simeq {\tt{0}}$$\;\;${\bf then }{\bf{t}} \\ 
{\bf else }{\rm{firstn-nthcdr-firstn-induct}}\,({\it{a\/}} $-\;1$, {\it{b\/}} $-\;1$, {\it{n\/}} $-\;1$, {\it{l\/}})\index{firstn-nthcdr-firstn-induct}$\;${\bf  endif}\-\-
\end{tabbing}
      
\begin{tabbing}{\sc Theorem}:  firstn-nthcdr-firstn-simple \\ \index{firstn-nthcdr-firstn-simple}
\=\+({\it{n\/}} $\not<$ ({\it{a\/}} $+$ {\it{b\/}})) \\ 
$\rightarrow$$\;\;\;\;$({\rm{firstn}}\,({\it{a\/}}, {\rm{nthcdr}}\,({\it{b\/}}, {\rm{firstn}}\,({\it{n\/}}, {\it{l\/}})\index{firstn})\index{nthcdr})\index{firstn} $=$ {\rm{firstn}}\,({\it{a\/}}, {\rm{nthcdr}}\,({\it{b\/}}, {\it{l\/}})\index{nthcdr})\index{firstn})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  good-schedule-requests-not-greater \\ \index{good-schedule-requests-not-greate!r}
\=\+({\rm{good-schedule}}\,({\it{s\/}}, {\it{r\/}})\index{good-schedule} $\wedge$ {\rm{valid-requests}}\,({\it{r\/}})\index{valid-requests}) \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,({\rm{firstn}}\,({\it{n\/}}, {\it{s\/}})\index{firstn}, {\rm{requests-deadlines-not-greater}}\,({\it{r\/}}, {\it{n\/}})\index{requests-deadlines-not-greater})\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requests-deadlines-append \\ \index{requests-deadlines-append}
\=\+{\rm{requests-deadlines-not-greater}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}), {\it{time\/}})\index{requests-deadlines-not-greater} \\ 
$=$$\;\;\;\;${\rm{append}}\,(\=\+{\rm{requests-deadlines-not-greater}}\,({\it{a\/}}, {\it{time\/}})\index{requests-deadlines-not-greater}, \\ 
{\rm{requests-deadlines-not-greater}}\,({\it{b\/}}, {\it{time\/}})\index{requests-deadlines-not-greater})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-requests-deadlines \\ \index{plist-requests-deadlines}
\=\+{\rm{plist}}\,({\rm{requests-deadlines-not-greater}}\,({\it{a\/}}, {\it{time\/}})\index{requests-deadlines-not-greater})\index{plist} \\ 
$=$$\;\;\;\;${\rm{requests-deadlines-not-greater}}\,({\it{a\/}}, {\it{time\/}})\index{requests-deadlines-not-greater}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requests-deadlines-periodic-task-simple \\ \index{requests-deadlines-periodic-tas!k-simple}
\=\+({\it{n1\/}} $\not<$ {\it{n2\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{requests-deadlines-not-greater}}\,({\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n\/}})\index{periodic-task-requests}, {\it{n2\/}})\index{requests-deadlines-not-greater} \\ 
$=$$\;\;\;\;${\bf{nil}})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-nil-periodic-task-requests \\ \index{equal-nil-periodic-task-request!s}
\=\+({\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests} $=$ {\bf{nil}}) \\ 
$=$$\;\;\;\;$(($\neg$ {\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp}) $\vee$ ({\it{n1\/}} $\not<$ {\it{n2\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requests-deadlines-not-greater-periodic-task \\ \index{requests-deadlines-not-greater-pe!riodic-task}
\=\+(\=\+(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{requests-deadlines-not-greater}}\,({\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}, {\it{n\/}})\index{requests-deadlines-not-greater} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\it{n2\/}}$\;\;${\bf then }{\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n\/}})\index{periodic-task-requests} \\ 
{\bf else }{\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-remainder-big-period \\ \index{equal-remainder-big-period}
({\it{e\/}} $\in$ {\it{l\/}}) $\rightarrow$ (({\rm{big-period}}\,({\it{l\/}})\index{big-period} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{e\/}})) $=$ {\tt{0}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  remainder-period-0-if-big-period \\ \index{remainder-period-0-if-big-perio!d}
\=\+({\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} $\wedge$ (({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $=$ {\tt{0}}) $\wedge$ ({\it{pt\/}} $\in$ {\it{pts\/}})) \\ 
$\rightarrow$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-nil-periodic-tasks-requests \\ \index{equal-nil-periodic-tasks-request!s}
\=\+({\bf{nil}} $=$ {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests}) \\ 
$=$$\;\;\;\;$(({\it{pts\/}} $\simeq\;${{\bf{nil}}}${}$) $\vee$ ($\neg$ {\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp}) $\vee$ ({\it{n1\/}} $\not<$ {\it{n2\/}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requests-deadlines-not-greater-periodic-help \\ \index{requests-deadlines-not-greater-pe!riodic-help}
\=\+(\=\+{\rm{periodic-tasksp}}\,({\it{pts2\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;${\rm{sublistp}}\,({\it{pts1\/}}, {\it{pts2\/}})\index{sublistp} \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{n2\/}} $\not<$ {\it{n3\/}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts2\/}})\index{big-period}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n3\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts2\/}})\index{big-period}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{requests-deadlines-not-greater}}\,(\=\+{\rm{periodic-tasks-requests}}\,({\it{pts1\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests}, \\ 
{\it{n3\/}})\-\index{requests-deadlines-not-greater} \\ 
$=$$\;\;\;\;${\rm{periodic-tasks-requests}}\,({\it{pts1\/}}, {\it{n1\/}}, {\it{n3\/}})\index{periodic-tasks-requests})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requests-deadlines-not-greater-periodic-rewrite \\ \index{requests-deadlines-not-greater-pe!riodic-rewrite}
\=\+(\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{n2\/}} $\not<$ {\it{n3\/}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n3\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{requests-deadlines-not-greater}}\,({\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests}, {\it{n3\/}})\index{requests-deadlines-not-greater} \\ 
$=$$\;\;\;\;${\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\it{n1\/}}, {\it{n3\/}})\index{periodic-tasks-requests})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-active-task-requests \\ \index{plist-active-task-requests}
{\rm{plist}}\,({\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\index{plist} $=$ {\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests}
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  lessp-plus-times-hack \\ \index{lessp-plus-times-hack}
(({\it{x\/}} $+$ ({\it{x\/}} $*$ {\it{y\/}})) $<$ ({\it{x\/}} $*$ {\it{z\/}})) $=$ (({\it{x\/}} $\not\simeq {\tt{0}}$) $\wedge$ (($1\;+$ {\it{y\/}}) $<$ {\it{z\/}}))
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  periodic-task-requests-simple \\ \index{periodic-task-requests-simple}
({\it{n1\/}} $\not<$ {\it{n2\/}}) $\rightarrow$ ({\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests} $=$ {\bf{nil}})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  active-task-requests-periodic-task-requests-simple \\ \index{active-task-requests-periodic-t!ask-requests-simple}
\=\+({\it{n\/}} $<$ {\it{n1\/}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{active-task-requests}}\,({\it{n\/}}, {\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{active-task-requests} $=$ {\bf{nil}})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  active-task-requests-periodic-task-requests \\ \index{active-task-requests-periodic-t!ask-requests}
\=\+(\=\+(({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$({\it{n1\/}} $\in\;${\bf{N}}${}$))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{active-task-requests}}\,({\it{n\/}}, {\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests})\index{active-task-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }($\neg$ {\rm{periodic-taskp}}\,({\it{pt\/}})\index{periodic-taskp}) $\vee$ ({\it{n\/}} $<$ {\it{n1\/}}) $\vee$ ({\it{n\/}} $\not<$ {\it{n2\/}}) \\ 
{\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{list}}\,({\rm{list}}\,(\=\+{\rm{car}}\,({\it{pt\/}}), \\ 
{\rm{cadr}}\,({\it{pt\/}}) $*$ ({\it{n\/}} $\div$ {\rm{cadr}}\,({\it{pt\/}})), \\ 
\=\+{\rm{cadr}}\,({\it{pt\/}}) \\ 
$+$$\;\;\;\;$({\rm{cadr}}\,({\it{pt\/}}) $*$ ({\it{n\/}} $\div$ {\rm{cadr}}\,({\it{pt\/}})))\-, \\ 
{\rm{caddr}}\,({\it{pt\/}}))\-)$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  active-task-requests-not-greater \\ \index{active-task-requests-not-greate!r}
\=\+{\rm{active-task-requests}}\,({\it{n1\/}}, {\rm{requests-deadlines-not-greater}}\,({\it{r\/}}, {\it{n2\/}})\index{requests-deadlines-not-greater})\index{active-task-requests} \\ 
$=$$\;\;\;\;${\rm{requests-deadlines-not-greater}}\,({\rm{active-task-requests}}\,({\it{n1\/}}, {\it{r\/}})\index{active-task-requests}, {\it{n2\/}})\index{requests-deadlines-not-greater}\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{requests-starts-earlier} \\  
\=\+{\rm{requests-starts-earlier}}\,({\it{r\/}}, {\it{time\/}})\index{requests-starts-earlier} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\rm{listp}}\,({\it{r\/}}) \\ 
{\bf then }\=\+{\bf if }{\rm{cadar}}\,({\it{r\/}}) $<$ {\it{time\/}} \\ 
{\bf then }{\rm{cons}}\,({\rm{car}}\,({\it{r\/}}), {\rm{requests-starts-earlier}}\,({\rm{cdr}}\,({\it{r\/}}), {\it{time\/}})\index{requests-starts-earlier}) \\ 
{\bf else }{\rm{requests-starts-earlier}}\,({\rm{cdr}}\,({\it{r\/}}), {\it{time\/}})\index{requests-starts-earlier}$\;${\bf  endif}\- \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requests-starts-earlier-append \\ \index{requests-starts-earlier-append}
\=\+{\rm{requests-starts-earlier}}\,({\rm{append}}\,({\it{a\/}}, {\it{b\/}}), {\it{n\/}})\index{requests-starts-earlier} \\ 
$=$$\;\;\;\;${\rm{append}}\,({\rm{requests-starts-earlier}}\,({\it{a\/}}, {\it{n\/}})\index{requests-starts-earlier}, {\rm{requests-starts-earlier}}\,({\it{b\/}}, {\it{n\/}})\index{requests-starts-earlier})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  active-task-requests-requests-starts-earlier \\ \index{active-task-requests-requests-st!arts-earlier}
\=\+({\it{n\/}} $<$ {\it{n1\/}}) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{active-task-requests}}\,({\it{n\/}}, {\rm{requests-starts-earlier}}\,({\it{r\/}}, {\it{n1\/}})\index{requests-starts-earlier})\index{active-task-requests} \\ 
$=$$\;\;\;\;${\rm{active-task-requests}}\,({\it{n\/}}, {\it{r\/}})\index{active-task-requests})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  edf-requests-starts-earlier \\ \index{edf-requests-starts-earlier}
({\it{n1\/}} $\not<$ {\it{n\/}}) $\rightarrow$ ({\rm{edf}}\,({\it{n\/}}, {\rm{requests-starts-earlier}}\,({\it{r\/}}, {\it{n1\/}})\index{requests-starts-earlier})\index{edf} $=$ {\rm{edf}}\,({\it{n\/}}, {\it{r\/}})\index{edf})
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-requests-starts-earlier \\ \index{plist-requests-starts-earlier}
{\rm{plist}}\,({\rm{requests-starts-earlier}}\,({\it{r\/}}, {\it{n\/}})\index{requests-starts-earlier})\index{plist} $=$ {\rm{requests-starts-earlier}}\,({\it{r\/}}, {\it{n\/}})\index{requests-starts-earlier}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requests-starts-earlier-periodic-task \\ \index{requests-starts-earlier-periodi!c-task}
\=\+(\=\+(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{cadr}}\,({\it{pt\/}})) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{requests-starts-earlier}}\,({\rm{periodic-task-requests}}\,({\it{pt\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests}, {\it{n\/}})\index{requests-starts-earlier} \\ 
$=$$\;\;\;\;${\rm{periodic-task-requests}}\,(\=\+{\it{pt\/}}, \\ 
{\it{n1\/}}, \\ 
\=\+{\bf if }{\it{n\/}} $<$ {\it{n2\/}}$\;\;${\bf then }{\it{n\/}} \\ 
{\bf else }{\it{n2\/}}$\;${\bf  endif}\-)\-\index{periodic-task-requests})\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  requests-starts-earlier-periodic-tasks \\ \index{requests-starts-earlier-periodi!c-tasks}
\=\+(\=\+(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts2\/}})\index{big-period}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n1\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts2\/}})\index{big-period}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n2\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts2\/}})\index{big-period}) $=$ {\tt{0}}) \\ 
$\wedge$$\;\;\;\;${\rm{sublistp}}\,({\it{pts1\/}}, {\it{pts2\/}})\index{sublistp} \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts2\/}})\index{periodic-tasksp})\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{requests-starts-earlier}}\,({\rm{periodic-tasks-requests}}\,({\it{pts1\/}}, {\it{n1\/}}, {\it{n2\/}})\index{periodic-tasks-requests}, {\it{n\/}})\index{requests-starts-earlier} \\ 
$=$$\;\;\;\;${\rm{periodic-tasks-requests}}\,(\=\+{\it{pts1\/}}, \\ 
{\it{n1\/}}, \\ 
\=\+{\bf if }{\it{n\/}} $<$ {\it{n2\/}}$\;\;${\bf then }{\it{n\/}} \\ 
{\bf else }{\it{n2\/}}$\;${\bf  endif}\-)\-\index{periodic-tasks-requests})\-\-
\end{tabbing}
          
\begin{tabbing}{\sc Theorem}:  good-edf-almost \\ \index{good-edf-almost}
\=\+(\=\+({\rm{big-period}}\,({\it{pts\/}})\index{big-period} $\not<$ {\rm{cpu-utilization}}\,({\it{pts\/}}, {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\index{cpu-utilization}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$({\tt{1}} $<$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{edf}}\,({\it{n\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\index{edf}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  equal-plus-1 \\ \index{equal-plus-1}
\=\+(({\it{a\/}} $+$ {\it{b\/}}) $=$ {\tt{1}}) \\ 
$=$$\;\;\;\;$((({\it{a\/}} $\simeq {\tt{0}}$) $\wedge$ ({\it{b\/}} $=$ {\tt{1}})) $\vee$ (({\it{b\/}} $\simeq {\tt{0}}$) $\wedge$ ({\it{a\/}} $=$ {\tt{1}})))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-cpu-utilization-0 \\ \index{equal-cpu-utilization-0}
\=\+((({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{x\/}})\index{big-period}) $=$ {\tt{0}}) $\wedge$ ({\it{n\/}} $\not\simeq {\tt{0}}$) $\wedge$ {\rm{periodic-tasksp}}\,({\it{x\/}})\index{periodic-tasksp}) \\ 
$\rightarrow$$\;\;\;\;$(({\rm{cpu-utilization}}\,({\it{x\/}}, {\it{n\/}})\index{cpu-utilization} $=$ {\tt{0}}) $=$ ({\it{x\/}} $=$ {\bf{nil}}))\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  equal-1-big-period \\ \index{equal-1-big-period}
\=\+(\=\+({\rm{big-period}}\,({\it{pts\/}})\index{big-period} $\not<$ {\rm{cpu-utilization}}\,({\it{pts\/}}, {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\index{cpu-utilization}) \\ 
$\wedge$$\;\;\;\;$({\rm{big-period}}\,({\it{pts\/}})\index{big-period} $=$ {\tt{1}}))\- \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$=$$\;\;\;\;$(\=\+({\it{pts\/}} $=$ {\bf{nil}}) \\ 
$\vee$$\;\;\;\;$(\=\+({\rm{plist}}\,({\it{pts\/}})\index{plist} $=$ {\it{pts\/}}) \\ 
$\wedge$$\;\;\;\;$({\rm{length}}\,({\it{pts\/}})\index{length} $=$ {\tt{1}}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-taskp}}\,({\rm{car}}\,({\it{pts\/}}))\index{periodic-taskp} \\ 
$\wedge$$\;\;\;\;$({\rm{cadar}}\,({\it{pts\/}}) $=$ {\tt{1}}) \\ 
$\wedge$$\;\;\;\;$({\rm{caddar}}\,({\it{pts\/}}) $=$ {\tt{1}}))\-)\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Definition}:\index{simple-requests} \\  
\=\+{\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n2\/}})\index{simple-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n1\/}} $<$ {\it{n2\/}} \\ 
{\bf then }{\rm{cons}}\,({\rm{list}}\,({\it{v\/}}, {\it{n1\/}}, $1\;+$ {\it{n1\/}}, {\tt{1}}), {\rm{simple-requests}}\,({\it{v\/}}, $1\;+$ {\it{n1\/}}, {\it{n2\/}})\index{simple-requests}) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  periodic-task-requests-as-simple-requests \\ \index{periodic-task-requests-as-simple!-requests}
\=\+{\rm{periodic-task-requests}}\,({\rm{list}}\,({\it{v\/}}, {\tt{1}}, {\tt{1}}), {\it{n1\/}}, {\it{n2\/}})\index{periodic-task-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }($\neg$ {\rm{litatom}}\,({\it{v\/}})) $\vee$ ({\it{v\/}} $=$ {\bf{nil}})$\;\;${\bf then }{\bf{nil}} \\ 
{\bf else }{\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n2\/}})\index{simple-requests}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  active-task-requests-simple-requests \\ \index{active-task-requests-simple-req!uests}
\=\+(({\it{n1\/}} $\in\;${\bf{N}}${}$) $\wedge$ ({\it{n\/}} $\in\;${\bf{N}}${}$)) \\ 
$\rightarrow$$\;\;\;\;$(\=\+{\rm{active-task-requests}}\,({\it{n\/}}, {\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n2\/}})\index{simple-requests})\index{active-task-requests} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\it{n1\/}}$\;\;${\bf then }{\bf{nil}} \\ 
{\bf elseif }{\it{n\/}} $<$ {\it{n2\/}}$\;\;${\bf then }{\rm{list}}\,({\rm{list}}\,({\it{v\/}}, {\it{n\/}}, $1\;+$ {\it{n\/}}, {\tt{1}})) \\ 
{\bf else }{\bf{nil}}$\;${\bf  endif}\-)\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  nthcdr-cons-cons-repeat \\ \index{nthcdr-cons-cons-repeat}
\=\+{\rm{nthcdr}}\,({\it{n\/}}, {\rm{cons}}\,({\it{a\/}}, {\rm{cons}}\,({\it{a\/}}, {\rm{repeat}}\,({\it{m\/}}, {\it{a\/}})\index{repeat})))\index{nthcdr} \\ 
$=$$\;\;\;\;$\=\+{\bf if }({\tt{2}} $+$ {\it{m\/}}) $<$ {\it{n\/}}$\;\;${\bf then }{\tt{0}} \\ 
{\bf else }{\rm{repeat}}\,(({\tt{2}} $+$ {\it{m\/}}) $-$ {\it{n\/}}, {\it{a\/}})\index{repeat}$\;${\bf  endif}\-\-
\end{tabbing}


\begin{tabbing}{\sc Theorem}:  requests-starts-earlier-simple-requests \\ \index{requests-starts-earlier-simple-!requests}
\=\+{\rm{requests-starts-earlier}}\,({\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n2\/}})\index{simple-requests}, {\it{n\/}})\index{requests-starts-earlier} \\ 
$=$$\;\;\;\;$\=\+{\bf if }{\it{n\/}} $<$ {\it{n2\/}}$\;\;${\bf then }{\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n\/}})\index{simple-requests} \\ 
{\bf else }{\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n2\/}})\index{simple-requests}$\;${\bf  endif}\-\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  edf-simple-requests-too-big \\ \index{edf-simple-requests-too-big}
\=\+({\it{z\/}} $<$ {\it{n2\/}}) \\ 
$\rightarrow$$\;\;\;\;$({\rm{edf}}\,({\it{z\/}}, {\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n2\/}})\index{simple-requests})\index{edf} $=$ {\rm{edf}}\,({\it{z\/}}, {\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{z\/}})\index{simple-requests})\index{edf})\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  edf-n-simple-requests \\ \index{edf-n-simple-requests}
{\rm{edf}}\,({\it{n\/}}, {\rm{simple-requests}}\,({\it{v\/}}, {\tt{0}}, {\it{n\/}})\index{simple-requests})\index{edf} $=$ {\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  good-schedule-repeat-simple \\ \index{good-schedule-repeat-simple}
{\rm{good-schedule}}\,({\rm{repeat}}\,({\it{n\/}}, {\it{v\/}})\index{repeat}, {\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n\/}})\index{simple-requests})\index{good-schedule}
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  plist-simple-requests \\ \index{plist-simple-requests}
{\rm{plist}}\,({\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n2\/}})\index{simple-requests})\index{plist} $=$ {\rm{simple-requests}}\,({\it{v\/}}, {\it{n1\/}}, {\it{n2\/}})\index{simple-requests}
\end{tabbing}
   
\begin{tabbing}{\sc Theorem}:  good-edf-bigp-1 \\ \index{good-edf-bigp-1}
\=\+(\=\+({\rm{big-period}}\,({\it{pts\/}})\index{big-period} $\not<$ {\rm{cpu-utilization}}\,({\it{pts\/}}, {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\index{cpu-utilization}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$({\rm{big-period}}\,({\it{pts\/}})\index{big-period} $=$ {\tt{1}}) \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{edf}}\,({\it{n\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\index{edf}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}

\begin{tabbing}{\sc Theorem}:  good-edf-periodic \\ \index{good-edf-periodic}
\=\+(\=\+({\rm{big-period}}\,({\it{pts\/}})\index{big-period} $\not<$ {\rm{cpu-utilization}}\,({\it{pts\/}}, {\rm{big-period}}\,({\it{pts\/}})\index{big-period})\index{cpu-utilization}) \\ 
$\wedge$$\;\;\;\;${\rm{periodic-tasksp}}\,({\it{pts\/}})\index{periodic-tasksp} \\ 
$\wedge$$\;\;\;\;$(({\it{n\/}} ${}${\bf{mod}}${}$ {\rm{big-period}}\,({\it{pts\/}})\index{big-period}) $=$ {\tt{0}}))\- \\ 
$\rightarrow$$\;\;\;\;${\rm{good-schedule}}\,(\=\+{\rm{edf}}\,({\it{n\/}}, {\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\index{edf}, \\ 
{\rm{periodic-tasks-requests}}\,({\it{pts\/}}, {\tt{0}}, {\it{n\/}})\index{periodic-tasks-requests})\-\index{good-schedule}\-
\end{tabbing}



\noindent{\sc Event}:   Make the library {\tt{"scheduler"}} and compile it.

\addvspace{18pt}

%\end{list}
\printindex
\end{document}
