The mini-cas Reference Manual

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

(See accompanying file LICENSE_1_0.txt or copy at

** 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

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

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
Source

basic-ops.lisp (file)

Function: cas+ &rest ARGS
Package
Source

basic-ops.lisp (file)

Function: cas- ARG
Package
Source

basic-ops.lisp (file)

Function: cas-cos X
Package
Source

basic-ops.lisp (file)

Function: cas-sin X
Package
Source

basic-ops.lisp (file)

Function: cas/ NUM DEN
Package
Source

basic-ops.lisp (file)

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

5.1.2 Generic functions

Generic Function: full-derivative FORM VAR
Package
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
Source

full-derivative.lisp (file)

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

5.2.2 Macros

Macro: check FORM EXPECTED
Package
Source

test.lisp (file)

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

5.2.3 Functions

Function: /den QUOTIENT
Package
Source

basic-ops.lisp (file)

Function: /num QUOTIENT
Package
Source

basic-ops.lisp (file)

Function: cas*? FORM
Package
Source

basic-ops.lisp (file)

Function: cas+? FORM
Package
Source

basic-ops.lisp (file)

Function: cas-? FORM
Package
Source

basic-ops.lisp (file)

Function: cas-cos? FORM
Package
Source

basic-ops.lisp (file)

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

basic-ops.lisp (file)

Function: cas-sin? FORM
Package
Source

basic-ops.lisp (file)

Function: cas/? FORM
Package
Source

basic-ops.lisp (file)

Function: full-simplify FORM

Keep simplifying the form until a fixed point is reached.

Package
Source

simplify.lisp (file)

Function: test-full-derivative ()
Package
Source

test.lisp (file)

Function: test-simplification ()
Package
Source

test.lisp (file)

Function: transpose ARRAY
Package
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
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
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
Source

simplify.lisp (file)

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

simplify.lisp (file)

Methods
Method: canonic-order (FORM list)
Method: canonic-order FORM
Generic Function: canonic-order-list CAR CDR
Package
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
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
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
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
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
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
Source

full-derivative.lisp (file)

Methods
Method: partial-derivative FORM VAR
Generic Function: simplify FORM
Package
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
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

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

A.2 Functions

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

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

A.3 Variables

Index Entry Section `*partial*`: Internal special variables `Special Variable, *partial*`: Internal special variables