close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 100


Ignore:
Timestamp:
2015-06-05T11:59:36-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/mx-grobner.lisp

    r99 r100  
    3232;;FUNCTS is loaded because it contains the definition of LCM
    3333($load "functs")
    34 
    35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    36 ;;
    37 ;; Coefficient ring operations
    38 ;;
    39 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    40 ;;
    41 ;; These are ALL operations that are performed on the coefficients by
    42 ;; the package, and thus the coefficient ring can be changed by merely
    43 ;; redefining these operations.
    44 ;;
    45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    46 
    47 (defstruct (ring)
    48   (parse #'identity :type function)
    49   (unit #'identity :type function)
    50   (zerop #'identity :type function)
    51   (add #'identity :type function)
    52   (sub #'identity :type function)
    53   (uminus #'identity :type function)
    54   (mul #'identity :type function)
    55   (div #'identity :type function)
    56   (lcm #'identity :type function)
    57   (ezgcd #'identity :type function)
    58   (gcd #'identity :type function))
    59 
    60 (defparameter *ring-of-integers*
    61     (make-ring
    62      :parse #'identity
    63      :unit #'(lambda () 1)
    64      :zerop #'zerop
    65      :add #'+
    66      :sub #'-
    67      :uminus #'-
    68      :mul #'*
    69      :div #'/
    70      :lcm #'lcm
    71      :ezgcd #'(lambda (x y &aux (c (gcd x y))) (values c (/ x c) (/ y c)))
    72      :gcd #'gcd)
    73   "The ring of integers.")
    74 
    75 
    76 
    77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    78 ;;
    79 ;; This is how we perform operations on coefficients
    80 ;; using Maxima functions.
    81 ;;
    82 ;; Functions and macros dealing with internal representation structure
    83 ;;
    84 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    8534
    8635
Note: See TracChangeset for help on using the changeset viewer.