The mini-cas Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The mini-cas Reference Manual

This is the mini-cas Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:17:14 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

MINI-CAS, a MINImal Computer Algebra System

Copyright (c) 2011 Daniel Herring
Distributed under the Boost Software License, Version 1.0.
   (See accompanying file LICENSE_1_0.txt or copy at
         http://www.boost.org/LICENSE_1_0.txt)


** Install **

What?!?  Not much to do.  I provide an ASDF system definition for convenience.


** What it does **
symbolic math
(sufficient for deriving my robot kinematic and dynamic equations)
(hopefully without introducing bugs)


** Why another CAS **
This is a hard question.  Good CAS software is hard to write, there are numerous mature systems, etc.

I was looking for
- a Common Lisp CAS library (for integration with other code)
- basic ops: + - * / sin cos
- matrix support
- derivatives

Original plan was to use [Open]Axiom/Fricas or Maxima; but these require glue code to generate and parse "human-style" input, spawn subprocesses, etc.  Not to mention their massive size.

Then I tried modernizing Mock-MMA.  Not fun.  Got the obvious things fixed; but there were still major issues (and no matrix support).

Where are the CL CAS libraries?  Not finding them, I slapped this together.

Anyone wanting to make a real CAS out of this should read some CAS books or at least know abstract algebra.  

Joel Cohen wrote a set of practical CAS books; most others focus on details such as polynomial factorization, Groebner bases, etc.
http://web.cs.du.edu/~jscohen/
Computer Algebra and Symbolic Computation: Elementary Algorithms, AK Peters Ltd., 2002
Computer Algebra and Symbolic Computation: Mathematical Methods, AK Peters Ltd., 2003


** License **

Normal disclaimers apply.  I only spot-checked the math; hopefully the simplifications are simple enough to not introduce bugs.  License described at http://www.boost.org/users/license.html


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 mini-cas

Source

mini-cas.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 mini-cas.asd

Location

mini-cas.asd

Systems

mini-cas (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 mini-cas/mini-cas.lisp

Parent

mini-cas (system)

Location

mini-cas.lisp

Packages

mini-cas


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 mini-cas/basic-ops.lisp

Dependency

mini-cas.lisp (file)

Parent

mini-cas (system)

Location

basic-ops.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 mini-cas/full-derivative.lisp

Dependency

basic-ops.lisp (file)

Parent

mini-cas (system)

Location

full-derivative.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 mini-cas/simplify.lisp

Dependency

full-derivative.lisp (file)

Parent

mini-cas (system)

Location

simplify.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.6 mini-cas/arrays.lisp

Dependency

simplify.lisp (file)

Parent

mini-cas (system)

Location

arrays.lisp

Exported Definitions

full-derivative (method)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.7 mini-cas/substitute.lisp

Dependency

arrays.lisp (file)

Parent

mini-cas (system)

Location

substitute.lisp

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.8 mini-cas/test.lisp

Dependency

substitute.lisp (file)

Parent

mini-cas (system)

Location

test.lisp

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 mini-cas

Source

mini-cas.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: cas* &rest ARGS
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas+ &rest ARGS
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas- ARG
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas-cos X
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas-sin X
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas/ NUM DEN
Package

mini-cas

Source

basic-ops.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: full-derivative FORM VAR
Package

mini-cas

Source

full-derivative.lisp (file)

Methods
Method: full-derivative (FORM array) VAR
Source

arrays.lisp (file)

Method: full-derivative (FORM list) VAR
Method: full-derivative (FORM number) VAR
Method: full-derivative (FORM symbol) VAR
Method: full-derivative FORM VAR

Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *partial*

set true to enable partial derivatives

Package

mini-cas

Source

full-derivative.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: check FORM EXPECTED
Package

mini-cas

Source

test.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: /den QUOTIENT
Package

mini-cas

Source

basic-ops.lisp (file)

Function: /num QUOTIENT
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas*? FORM
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas+? FORM
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas-? FORM
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas-cos? FORM
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas-list-pred CAR FORM &optional LENGTH
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas-sin? FORM
Package

mini-cas

Source

basic-ops.lisp (file)

Function: cas/? FORM
Package

mini-cas

Source

basic-ops.lisp (file)

Function: full-simplify FORM

Keep simplifying the form until a fixed point is reached.

Package

mini-cas

Source

simplify.lisp (file)

Function: test-full-derivative ()
Package

mini-cas

Source

test.lisp (file)

Function: test-simplification ()
Package

mini-cas

Source

test.lisp (file)

Function: transpose ARRAY
Package

mini-cas

Source

arrays.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Generic functions

Generic Function: *reduce A B

Methods for reducing added pairs - return nil or the sum

Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: *reduce A (B array)
Source

arrays.lisp (file)

Method: *reduce (A array) (B array)
Source

arrays.lisp (file)

Method: *reduce (A number) (B number)
Method: *reduce (A (eql 0)) B
Method: *reduce (A (eql 1)) B
Method: *reduce A B
Generic Function: +reduce A B

Methods for reducing added pairs - return nil or the sum

Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: +reduce (A array) (B array)
Source

arrays.lisp (file)

Method: +reduce (A number) (B number)
Method: +reduce (A (eql 0)) B
Method: +reduce A B
Generic Function: /reduce A B

Methods for reducing a/b. Return nil if no reduction is possible.

Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: /reduce (A number) (B number)
Method: /reduce A B
Generic Function: canonic-order FORM
Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: canonic-order (FORM list)
Method: canonic-order FORM
Generic Function: canonic-order-list CAR CDR
Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: canonic-order-list (CAR (eql *)) CDR
Method: canonic-order-list (CAR (eql +)) CDR
Method: canonic-order-list CAR CDR
Generic Function: canonic-order-pred A B

predicate for sorting terms, extend for entries in the same class

Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: canonic-order-pred (A list) (B list)
Method: canonic-order-pred A B
Method: canonic-order-pred (A number) (B number)
Method: canonic-order-pred (A symbol) (B symbol)
Generic Function: canonic-order-rank FORM

ordering of form types

Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: canonic-order-rank (FORM number)
Method: canonic-order-rank (FORM symbol)
Method: canonic-order-rank (FORM list)
Method: canonic-order-rank (FORM array)
Generic Function: cas-equal A B
Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: cas-equal (A array) (B array)
Method: cas-equal (A list) (B list)
Method: cas-equal A B
Generic Function: cas-substitute NEW OLD FORM

Like CL:substitute, but do a deep recursive replacement.

Package

mini-cas

Source

substitute.lisp (file)

Methods
Method: cas-substitute NEW OLD (FORM array)
Method: cas-substitute NEW OLD (FORM list)
Method: cas-substitute NEW OLD FORM
Generic Function: full-derivative-list CAR CDR VAR
Package

mini-cas

Source

full-derivative.lisp (file)

Methods
Method: full-derivative-list (CAR (eql cos)) CDR VAR
Method: full-derivative-list (CAR (eql sin)) CDR VAR
Method: full-derivative-list (CAR (eql /)) CDR VAR
Method: full-derivative-list (CAR (eql *)) CDR VAR
Method: full-derivative-list (CAR (eql -)) CDR VAR
Method: full-derivative-list (CAR (eql +)) CDR VAR
Method: full-derivative-list CAR CDR VAR
Generic Function: partial-derivative FORM VAR
Package

mini-cas

Source

full-derivative.lisp (file)

Methods
Method: partial-derivative FORM VAR
Generic Function: simplify FORM
Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: simplify (FORM array)
Source

arrays.lisp (file)

Method: simplify (FORM list)
Method: simplify FORM
Generic Function: simplify-list CAR CDR
Package

mini-cas

Source

simplify.lisp (file)

Methods
Method: simplify-list (CAR (eql cos)) CDR
Method: simplify-list (CAR (eql sin)) CDR
Method: simplify-list (CAR (eql d)) CDR
Method: simplify-list (CAR (eql /)) CDR
Method: simplify-list (CAR (eql -)) CDR
Method: simplify-list (CAR (eql *)) CDR
Method: simplify-list (CAR (eql +)) CDR
Method: simplify-list CAR CDR

Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M  
Index Entry  Section

F
File, Lisp, mini-cas.asd: The mini-cas<dot>asd file
File, Lisp, mini-cas/arrays.lisp: The mini-cas/arrays<dot>lisp file
File, Lisp, mini-cas/basic-ops.lisp: The mini-cas/basic-ops<dot>lisp file
File, Lisp, mini-cas/full-derivative.lisp: The mini-cas/full-derivative<dot>lisp file
File, Lisp, mini-cas/mini-cas.lisp: The mini-cas/mini-cas<dot>lisp file
File, Lisp, mini-cas/simplify.lisp: The mini-cas/simplify<dot>lisp file
File, Lisp, mini-cas/substitute.lisp: The mini-cas/substitute<dot>lisp file
File, Lisp, mini-cas/test.lisp: The mini-cas/test<dot>lisp file

L
Lisp File, mini-cas.asd: The mini-cas<dot>asd file
Lisp File, mini-cas/arrays.lisp: The mini-cas/arrays<dot>lisp file
Lisp File, mini-cas/basic-ops.lisp: The mini-cas/basic-ops<dot>lisp file
Lisp File, mini-cas/full-derivative.lisp: The mini-cas/full-derivative<dot>lisp file
Lisp File, mini-cas/mini-cas.lisp: The mini-cas/mini-cas<dot>lisp file
Lisp File, mini-cas/simplify.lisp: The mini-cas/simplify<dot>lisp file
Lisp File, mini-cas/substitute.lisp: The mini-cas/substitute<dot>lisp file
Lisp File, mini-cas/test.lisp: The mini-cas/test<dot>lisp file

M
mini-cas.asd: The mini-cas<dot>asd file
mini-cas/arrays.lisp: The mini-cas/arrays<dot>lisp file
mini-cas/basic-ops.lisp: The mini-cas/basic-ops<dot>lisp file
mini-cas/full-derivative.lisp: The mini-cas/full-derivative<dot>lisp file
mini-cas/mini-cas.lisp: The mini-cas/mini-cas<dot>lisp file
mini-cas/simplify.lisp: The mini-cas/simplify<dot>lisp file
mini-cas/substitute.lisp: The mini-cas/substitute<dot>lisp file
mini-cas/test.lisp: The mini-cas/test<dot>lisp file

Jump to:   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   *   +   /  
C   F   G   M   P   S   T  
Index Entry  Section

*
*reduce: Internal generic functions
*reduce: Internal generic functions
*reduce: Internal generic functions
*reduce: Internal generic functions
*reduce: Internal generic functions
*reduce: Internal generic functions
*reduce: Internal generic functions

+
+reduce: Internal generic functions
+reduce: Internal generic functions
+reduce: Internal generic functions
+reduce: Internal generic functions
+reduce: Internal generic functions

/
/den: Internal functions
/num: Internal functions
/reduce: Internal generic functions
/reduce: Internal generic functions
/reduce: Internal generic functions

C
canonic-order: Internal generic functions
canonic-order: Internal generic functions
canonic-order: Internal generic functions
canonic-order-list: Internal generic functions
canonic-order-list: Internal generic functions
canonic-order-list: Internal generic functions
canonic-order-list: Internal generic functions
canonic-order-pred: Internal generic functions
canonic-order-pred: Internal generic functions
canonic-order-pred: Internal generic functions
canonic-order-pred: Internal generic functions
canonic-order-pred: Internal generic functions
canonic-order-rank: Internal generic functions
canonic-order-rank: Internal generic functions
canonic-order-rank: Internal generic functions
canonic-order-rank: Internal generic functions
canonic-order-rank: Internal generic functions
cas*: Exported functions
cas*?: Internal functions
cas+: Exported functions
cas+?: Internal functions
cas-: Exported functions
cas-?: Internal functions
cas-cos: Exported functions
cas-cos?: Internal functions
cas-equal: Internal generic functions
cas-equal: Internal generic functions
cas-equal: Internal generic functions
cas-equal: Internal generic functions
cas-list-pred: Internal functions
cas-sin: Exported functions
cas-sin?: Internal functions
cas-substitute: Internal generic functions
cas-substitute: Internal generic functions
cas-substitute: Internal generic functions
cas-substitute: Internal generic functions
cas/: Exported functions
cas/?: Internal functions
check: Internal macros

F
full-derivative: Exported generic functions
full-derivative: Exported generic functions
full-derivative: Exported generic functions
full-derivative: Exported generic functions
full-derivative: Exported generic functions
full-derivative: Exported generic functions
full-derivative-list: Internal generic functions
full-derivative-list: Internal generic functions
full-derivative-list: Internal generic functions
full-derivative-list: Internal generic functions
full-derivative-list: Internal generic functions
full-derivative-list: Internal generic functions
full-derivative-list: Internal generic functions
full-derivative-list: Internal generic functions
full-simplify: Internal functions
Function, /den: Internal functions
Function, /num: Internal functions
Function, cas*: Exported functions
Function, cas*?: Internal functions
Function, cas+: Exported functions
Function, cas+?: Internal functions
Function, cas-: Exported functions
Function, cas-?: Internal functions
Function, cas-cos: Exported functions
Function, cas-cos?: Internal functions
Function, cas-list-pred: Internal functions
Function, cas-sin: Exported functions
Function, cas-sin?: Internal functions
Function, cas/: Exported functions
Function, cas/?: Internal functions
Function, full-simplify: Internal functions
Function, test-full-derivative: Internal functions
Function, test-simplification: Internal functions
Function, transpose: Internal functions

G
Generic Function, *reduce: Internal generic functions
Generic Function, +reduce: Internal generic functions
Generic Function, /reduce: Internal generic functions
Generic Function, canonic-order: Internal generic functions
Generic Function, canonic-order-list: Internal generic functions
Generic Function, canonic-order-pred: Internal generic functions
Generic Function, canonic-order-rank: Internal generic functions
Generic Function, cas-equal: Internal generic functions
Generic Function, cas-substitute: Internal generic functions
Generic Function, full-derivative: Exported generic functions
Generic Function, full-derivative-list: Internal generic functions
Generic Function, partial-derivative: Internal generic functions
Generic Function, simplify: Internal generic functions
Generic Function, simplify-list: Internal generic functions

M
Macro, check: Internal macros
Method, *reduce: Internal generic functions
Method, *reduce: Internal generic functions
Method, *reduce: Internal generic functions
Method, *reduce: Internal generic functions
Method, *reduce: Internal generic functions
Method, *reduce: Internal generic functions
Method, +reduce: Internal generic functions
Method, +reduce: Internal generic functions
Method, +reduce: Internal generic functions
Method, +reduce: Internal generic functions
Method, /reduce: Internal generic functions
Method, /reduce: Internal generic functions
Method, canonic-order: Internal generic functions
Method, canonic-order: Internal generic functions
Method, canonic-order-list: Internal generic functions
Method, canonic-order-list: Internal generic functions
Method, canonic-order-list: Internal generic functions
Method, canonic-order-pred: Internal generic functions
Method, canonic-order-pred: Internal generic functions
Method, canonic-order-pred: Internal generic functions
Method, canonic-order-pred: Internal generic functions
Method, canonic-order-rank: Internal generic functions
Method, canonic-order-rank: Internal generic functions
Method, canonic-order-rank: Internal generic functions
Method, canonic-order-rank: Internal generic functions
Method, cas-equal: Internal generic functions
Method, cas-equal: Internal generic functions
Method, cas-equal: Internal generic functions
Method, cas-substitute: Internal generic functions
Method, cas-substitute: Internal generic functions
Method, cas-substitute: Internal generic functions
Method, full-derivative: Exported generic functions
Method, full-derivative: Exported generic functions
Method, full-derivative: Exported generic functions
Method, full-derivative: Exported generic functions
Method, full-derivative: Exported generic functions
Method, full-derivative-list: Internal generic functions
Method, full-derivative-list: Internal generic functions
Method, full-derivative-list: Internal generic functions
Method, full-derivative-list: Internal generic functions
Method, full-derivative-list: Internal generic functions
Method, full-derivative-list: Internal generic functions
Method, full-derivative-list: Internal generic functions
Method, partial-derivative: Internal generic functions
Method, simplify: Internal generic functions
Method, simplify: Internal generic functions
Method, simplify: Internal generic functions
Method, simplify-list: Internal generic functions
Method, simplify-list: Internal generic functions
Method, simplify-list: Internal generic functions
Method, simplify-list: Internal generic functions
Method, simplify-list: Internal generic functions
Method, simplify-list: Internal generic functions
Method, simplify-list: Internal generic functions
Method, simplify-list: Internal generic functions

P
partial-derivative: Internal generic functions
partial-derivative: Internal generic functions

S
simplify: Internal generic functions
simplify: Internal generic functions
simplify: Internal generic functions
simplify: Internal generic functions
simplify-list: Internal generic functions
simplify-list: Internal generic functions
simplify-list: Internal generic functions
simplify-list: Internal generic functions
simplify-list: Internal generic functions
simplify-list: Internal generic functions
simplify-list: Internal generic functions
simplify-list: Internal generic functions
simplify-list: Internal generic functions

T
test-full-derivative: Internal functions
test-simplification: Internal functions
transpose: Internal functions

Jump to:   *   +   /  
C   F   G   M   P   S   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*partial*: Internal special variables

S
Special Variable, *partial*: Internal special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   M   P   S  
Index Entry  Section

M
mini-cas: The mini-cas system
mini-cas: The mini-cas package

P
Package, mini-cas: The mini-cas package

S
System, mini-cas: The mini-cas system

Jump to:   M   P   S