
(/VERSIONCHECK 2) 

(DEFUN |LSQM;conv| (|v| $)
  (PROG (|z| #1=#:G1806 |j| #2=#:G1805 |i| |cond|)
    (RETURN
     (SEQ
      (LETT |cond|
            (SPADCALL (QREFELT $ 6) (QREFELT $ 6) (|spadConstant| $ 10)
                      (QREFELT $ 13))
            . #3=(|LSQM;conv|))
      (LETT |z| 0 . #3#)
      (SEQ (LETT |i| 1 . #3#) (LETT #2# (QREFELT $ 6) . #3#) G190
           (COND ((QSGREATERP |i| #2#) #4=(GO G191)))
           (SEQ
            (EXIT
             (SEQ (LETT |j| 1 . #3#) (LETT #1# (QREFELT $ 6) . #3#) G190
                  (COND ((QSGREATERP |j| #1#) #4#))
                  (SEQ (LETT |z| (+ |z| 1) . #3#)
                       (EXIT
                        (SPADCALL |cond| |i| |j|
                                  (SPADCALL |v| |z| (QREFELT $ 16))
                                  (QREFELT $ 17))))
                  (LETT |j| (QSADD1 |j|) . #3#) #5=(GO G190) G191 (EXIT NIL))))
           (LETT |i| (QSADD1 |i|) . #3#) #5# G191 (EXIT NIL))
      (EXIT (SPADCALL |cond| (QREFELT $ 19))))))) 

(DEFUN |LSQM;coordinates;$VV;2| (|a| |b| $)
  (PROG (|z| #1=#:G1813 |j| #2=#:G1812 |i| |res|)
    (RETURN
     (SEQ
      (LETT |res| (MAKEARR1 (QREFELT $ 9) (|spadConstant| $ 10))
            . #3=(|LSQM;coordinates;$VV;2|))
      (LETT |z| 0 . #3#)
      (SEQ (LETT |i| 1 . #3#) (LETT #2# (QREFELT $ 6) . #3#) G190
           (COND ((QSGREATERP |i| #2#) #4=(GO G191)))
           (SEQ
            (EXIT
             (SEQ (LETT |j| 1 . #3#) (LETT #1# (QREFELT $ 6) . #3#) G190
                  (COND ((QSGREATERP |j| #1#) #4#))
                  (SEQ (LETT |z| (+ |z| 1) . #3#)
                       (EXIT
                        (SPADCALL |res| |z|
                                  (SPADCALL |a| |i| |j| (QREFELT $ 20))
                                  (QREFELT $ 22))))
                  (LETT |j| (QSADD1 |j|) . #3#) #5=(GO G190) G191 (EXIT NIL))))
           (LETT |i| (QSADD1 |i|) . #3#) #5# G191 (EXIT NIL))
      (EXIT |res|))))) 

(DEFUN |LSQM;convDM| (|v| $)
  (PROG (|sq|)
    (RETURN
     (SEQ (LETT |sq| (|LSQM;conv| |v| $) |LSQM;convDM|)
          (EXIT (SPADCALL |sq| (QREFELT $ 25))))))) 

(DEFUN |LSQM;basis;V;4| ($)
  (PROG (|res| |ldp| #1=#:G1816 #2=#:G1822 |i| #3=#:G1821)
    (RETURN
     (SEQ (SETELT $ 9 (* (QREFELT $ 6) (QREFELT $ 6)))
          (LETT |ldp|
                (PROGN
                 (LETT #3# NIL . #4=(|LSQM;basis;V;4|))
                 (SEQ (LETT |i| 1 . #4#) (LETT #2# (QREFELT $ 9) . #4#) G190
                      (COND ((QSGREATERP |i| #2#) (GO G191)))
                      (SEQ
                       (EXIT
                        (LETT #3#
                              (CONS
                               (SPADCALL
                                (PROG1 (LETT #1# |i| . #4#)
                                  (|check-subtype| (> #1# 0)
                                                   '(|PositiveInteger|) #1#))
                                (QREFELT $ 27))
                               #3#)
                              . #4#)))
                      (LETT |i| (QSADD1 |i|) . #4#) (GO G190) G191
                      (EXIT (NREVERSE0 #3#))))
                . #4#)
          (EXIT
           (LETT |res|
                 (SPADCALL
                  (SPADCALL (CONS (|function| |LSQM;convDM|) $) |ldp|
                            (QREFELT $ 32))
                  (QREFELT $ 34))
                 . #4#)))))) 

(DEFUN |LSQM;someBasis;V;5| ($) (SPADCALL (QREFELT $ 35))) 

(DEFUN |LSQM;rank;Pi;6| ($) (* (QREFELT $ 6) (QREFELT $ 6))) 

(DEFUN |LieSquareMatrix| (&REST #1=#:G1850)
  (PROG ()
    (RETURN
     (PROG (#2=#:G1851)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (|devaluateList| #1#)
                                           (HGET |$ConstructorCache|
                                                 '|LieSquareMatrix|)
                                           '|domainEqualList|)
                . #3=(|LieSquareMatrix|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT
              (PROG1 (APPLY (|function| |LieSquareMatrix;|) #1#)
                (LETT #2# T . #3#))
            (COND
             ((NOT #2#) (HREM |$ConstructorCache| '|LieSquareMatrix|))))))))))) 

(DEFUN |LieSquareMatrix;| (|#1| |#2|)
  (PROG (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|LieSquareMatrix|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|LieSquareMatrix| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 71) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (|HasCategory| |#2|
                                                         '(|PartialDifferentialRing|
                                                           (|Symbol|)))
                                          (|HasCategory| |#2|
                                                         '(|DifferentialRing|))
                                          (|HasCategory| |#2|
                                                         '(|CommutativeRing|))
                                          (|HasCategory| |#2|
                                                         '(|LinearlyExplicitRingOver|
                                                           (|Integer|)))
                                          (|HasCategory| |#2|
                                                         '(|RetractableTo|
                                                           (|Fraction|
                                                            (|Integer|))))
                                          (|HasCategory| |#2|
                                                         '(|RetractableTo|
                                                           (|Integer|)))
                                          (|HasCategory| |#2| '(|Finite|))
                                          (|HasCategory| |#2|
                                                         '(|EuclideanDomain|))
                                          (|HasCategory| |#2| '(|SetCategory|))
                                          (|HasCategory| |#2| '(|Field|))
                                          (|HasCategory| |#2|
                                                         '(|IntegralDomain|))
                                          (AND
                                           (|HasCategory| |#2|
                                                          (LIST '|Evalable|
                                                                (|devaluate|
                                                                 |#2|)))
                                           (|HasCategory| |#2|
                                                          '(|SetCategory|)))
                                          (OR
                                           (AND
                                            (|HasCategory| |#2|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#2|)))
                                            (|HasCategory| |#2|
                                                           '(|LinearlyExplicitRingOver|
                                                             (|Integer|))))
                                           (AND
                                            (|HasCategory| |#2|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#2|)))
                                            (|HasCategory| |#2|
                                                           '(|PartialDifferentialRing|
                                                             (|Symbol|))))
                                           (AND
                                            (|HasCategory| |#2|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#2|)))
                                            (|HasCategory| |#2|
                                                           '(|CommutativeRing|)))
                                           (AND
                                            (|HasCategory| |#2|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#2|)))
                                            (|HasCategory| |#2|
                                                           '(|DifferentialRing|)))
                                           (AND
                                            (|HasCategory| |#2|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#2|)))
                                            (|HasCategory| |#2| '(|Finite|)))
                                           (AND
                                            (|HasCategory| |#2|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#2|)))
                                            (|HasCategory| |#2|
                                                           '(|SetCategory|))))))
                      . #1#))
      (|haddProp| |$ConstructorCache| '|LieSquareMatrix| (LIST DV$1 DV$2)
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (AND (|HasCategory| $ '(|shallowlyMutable|))
           (|augmentPredVector| $ 8192))
      (AND (|HasCategory| $ '(|finiteAggregate|))
           (|augmentPredVector| $ 16384))
      (AND (|HasCategory| |#2| '(|SetCategory|))
           (|HasCategory| $ '(|finiteAggregate|))
           (|augmentPredVector| $ 32768))
      (QSETREFV $ 8 (|AssociatedLieAlgebra| |#2| (|SquareMatrix| |#1| |#2|)))
      (QSETREFV $ 9 (* |#1| |#1|))
      $)))) 

(MAKEPROP '|LieSquareMatrix| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL (|AssociatedLieAlgebra| 7 18) (|local| |#1|)
              (|local| |#2|) '|Rep| '|n2| (0 . |Zero|) (|NonNegativeInteger|)
              (|Matrix| 7) (4 . |new|) (|Integer|) (|DirectProduct| 9 7)
              (11 . |elt|) (17 . |setelt|) (|SquareMatrix| 6 7)
              (25 . |squareMatrix|) (30 . |elt|) (|Vector| 7) (37 . |setelt|)
              (|Vector| $) |LSQM;coordinates;$VV;2| (44 . |coerce|)
              (|PositiveInteger|) (49 . |unitVector|) (|List| $$)
              (|Mapping| $$ 15) (|List| 15) (|ListFunctions2| 15 $$)
              (54 . |map|) (|Vector| $$) (60 . |vector|) |LSQM;basis;V;4|
              |LSQM;someBasis;V;5| |LSQM;rank;Pi;6| (|Boolean|) (|List| 7)
              (|List| 41) (|Equation| 7) (|Mapping| 38 7) (|Mapping| 7 7)
              (|List| 63) (|SparseUnivariatePolynomial| (|Polynomial| 7))
              (|Union| $ '"failed") (|List| $) (|List| 21)
              (|SparseUnivariatePolynomial| 7)
              (|Record| (|:| |particular| $) (|:| |basis| 47))
              (|Union| 50 '"failed")
              (|Record| (|:| |mat| 54) (|:| |vec| (|Vector| 14))) (|Matrix| $)
              (|Matrix| 14) (|List| 56) (|Symbol|) (|List| 11) (|Fraction| 14)
              (|Union| 58 '#1="failed") (|Union| 14 '#1#)
              (|List| (|Polynomial| 7)) (|Vector| 12) (|DirectProduct| 6 7)
              (|Record| (|:| |mat| 12) (|:| |vec| 21)) (|Union| 7 '#1#)
              (|List| 39) (|Mapping| 7 7 7) (|SingleInteger|) (|String|)
              (|OutputForm|))
           '#(~= 65 |zero?| 71 |unit| 76 |trace| 80 |symmetric?| 85
              |subtractIfCan| 90 |structuralConstants| 96 |square?| 105
              |someBasis| 110 |size?| 114 |size| 120 |scalarMatrix| 124
              |sample| 129 |rowEchelon| 133 |row| 138 |rightUnits| 144
              |rightUnit| 148 |rightTraceMatrix| 152 |rightTrace| 161
              |rightRegularRepresentation| 166 |rightRecip| 177
              |rightRankPolynomial| 182 |rightPower| 186 |rightNorm| 192
              |rightMinimalPolynomial| 197 |rightDiscriminant| 202
              |rightCharacteristicPolynomial| 211 |rightAlternative?| 216
              |retractIfCan| 220 |retract| 235 |represents| 250 |reducedSystem|
              261 |recip| 283 |rank| 288 |random| 297 |qelt| 301
              |powerAssociative?| 308 |plenaryPower| 312 |parts| 318 |one?| 323
              |nullity| 328 |nullSpace| 333 |nrows| 338
              |noncommutativeJordanAlgebra?| 343 |ncols| 347 |more?| 352
              |minordet| 358 |minRowIndex| 363 |minColIndex| 368 |members| 373
              |member?| 378 |maxRowIndex| 384 |maxColIndex| 389 |matrix| 394
              |map!| 399 |map| 405 |lookup| 418 |listOfLists| 423 |lieAlgebra?|
              428 |lieAdmissible?| 432 |less?| 436 |leftUnits| 442 |leftUnit|
              446 |leftTraceMatrix| 450 |leftTrace| 459
              |leftRegularRepresentation| 464 |leftRecip| 475
              |leftRankPolynomial| 480 |leftPower| 484 |leftNorm| 490
              |leftMinimalPolynomial| 495 |leftDiscriminant| 500
              |leftCharacteristicPolynomial| 509 |leftAlternative?| 514 |latex|
              518 |jordanAlgebra?| 523 |jordanAdmissible?| 527
              |jacobiIdentity?| 531 |inverse| 535 |index| 540 |hash| 545
              |flexible?| 550 |exquo| 554 |every?| 560 |eval| 566 |eq?| 592
              |enumerate| 598 |empty?| 602 |empty| 607 |elt| 611
              |differentiate| 632 |diagonalProduct| 682 |diagonalMatrix| 687
              |diagonal?| 692 |diagonal| 697 |determinant| 702 |count| 707
              |copy| 719 |coordinates| 724 |convert| 746
              |conditionsForIdempotents| 756 |commutator| 765 |commutative?|
              771 |columnSpace| 775 |column| 780 |coerce| 786 |characteristic|
              811 |basis| 815 |associatorDependence| 819 |associator| 823
              |associative?| 830 |apply| 834 |any?| 840 |antisymmetric?| 846
              |antiCommutator| 851 |antiCommutative?| 857 |antiAssociative?|
              861 |alternative?| 865 ^ 869 |Zero| 887 |Pfaffian| 891 |One| 896
              D 900 = 950 / 956 - 962 + 973 * 979 |#| 1027)
           'NIL
           (CONS
            (|makeByteWordVec2| 13
                                '(0 0 0 0 0 0 0 3 0 0 1 2 4 0 0 0 0 0 0 0 0 0 0
                                  0 0 0 0 0 0 0 7 0 0 0 13 0 0 0 0 0 0 0 5 6
                                  13))
            (CONS
             '#(|FramedNonAssociativeAlgebra&| |SquareMatrixCategory&|
                |FiniteRankNonAssociativeAlgebra&| |DifferentialExtension&|
                |NonAssociativeAlgebra&| |FullyLinearlyExplicitRingOver&|
                |RectangularMatrixCategory&| |Algebra&| NIL |Module&|
                |PartialDifferentialRing&| |DifferentialRing&| NIL |Ring&| NIL
                |NonAssociativeRng&| NIL NIL NIL NIL |AbelianGroup&| NIL NIL
                |AbelianMonoid&| |Monoid&| NIL |Monad&| |HomogeneousAggregate&|
                |SemiGroup&| |AbelianSemiGroup&| |Finite&|
                |FullyRetractableTo&| |Aggregate&| |SetCategory&| |Evalable&|
                NIL |RetractableTo&| NIL NIL NIL |BasicType&| NIL
                |RetractableTo&| |RetractableTo&| |InnerEvalable&|)
             (CONS
              '#((|FramedNonAssociativeAlgebra| 7)
                 (|SquareMatrixCategory| 6 7 (|DirectProduct| 6 7)
                                         (|DirectProduct| 6 7))
                 (|FiniteRankNonAssociativeAlgebra| 7)
                 (|DifferentialExtension| 7) (|NonAssociativeAlgebra| 7)
                 (|FullyLinearlyExplicitRingOver| 7)
                 (|RectangularMatrixCategory| 6 6 7 (|DirectProduct| 6 7)
                                              (|DirectProduct| 6 7))
                 (|Algebra| 7) (|LinearlyExplicitRingOver| 7) (|Module| 7)
                 (|PartialDifferentialRing| 56) (|DifferentialRing|)
                 (|LinearlyExplicitRingOver| 14) (|Ring|) (|BiModule| 7 7)
                 (|NonAssociativeRng|) (|Rng|) (|RightModule| 7)
                 (|LeftModule| 7) (|LeftModule| $$) (|AbelianGroup|)
                 (|CancellationAbelianMonoid|) (|SemiRing|) (|AbelianMonoid|)
                 (|Monoid|) (|SemiRng|) (|Monad|) (|HomogeneousAggregate| 7)
                 (|SemiGroup|) (|AbelianSemiGroup|) (|Finite|)
                 (|FullyRetractableTo| 7) (|Aggregate|) (|SetCategory|)
                 (|Evalable| 7) (|CoercibleTo| (|Matrix| 7))
                 (|RetractableTo| 7) (|finiteAggregate|) (|Type|)
                 (|unitsKnown|) (|BasicType|) (|CoercibleTo| 70)
                 (|RetractableTo| 58) (|RetractableTo| 14)
                 (|InnerEvalable| 7 7))
              (|makeByteWordVec2| 70
                                  '(0 7 0 10 3 12 0 11 11 7 13 2 15 7 0 14 16 4
                                    12 7 0 14 14 7 17 1 18 0 12 19 3 0 7 0 14
                                    14 20 3 21 7 0 14 7 22 1 8 0 18 25 1 15 0
                                    26 27 2 31 28 29 30 32 1 33 0 28 34 2 0 38
                                    0 0 1 1 0 38 0 1 0 11 46 1 1 0 7 0 1 1 0 38
                                    0 1 2 0 46 0 0 1 1 0 62 23 1 0 0 62 1 1 0
                                    38 0 1 0 0 23 36 2 0 38 0 11 1 0 7 11 1 1 0
                                    0 7 1 0 0 0 1 1 8 0 0 1 2 0 63 0 14 1 0 11
                                    51 1 0 11 46 1 1 0 12 23 1 0 0 12 1 1 0 7 0
                                    1 2 0 12 0 23 1 1 0 12 0 1 1 11 46 0 1 0 10
                                    45 1 2 0 0 0 26 1 1 0 7 0 1 1 11 49 0 1 1 0
                                    7 23 1 0 0 7 1 1 0 49 0 1 0 0 38 1 1 5 59 0
                                    1 1 6 60 0 1 1 0 65 0 1 1 5 58 0 1 1 6 14 0
                                    1 1 0 7 0 1 2 0 0 21 23 1 1 0 0 21 1 2 4 52
                                    53 23 1 1 4 54 53 1 2 0 64 53 23 1 1 0 12
                                    53 1 1 0 46 0 1 1 11 11 0 1 0 0 26 37 0 7 0
                                    1 3 0 7 0 14 14 1 0 0 38 1 2 0 0 0 26 1 1
                                    15 39 0 1 1 0 38 0 1 1 11 11 0 1 1 11 44 0
                                    1 1 0 11 0 1 0 0 38 1 1 0 11 0 1 2 0 38 0
                                    11 1 1 3 7 0 1 1 0 14 0 1 1 0 14 0 1 1 15
                                    39 0 1 2 16 38 7 0 1 1 0 14 0 1 1 0 14 0 1
                                    1 0 0 66 1 2 14 0 43 0 1 2 0 0 43 0 1 3 0 0
                                    67 0 0 1 1 7 26 0 1 1 0 66 0 1 0 0 38 1 0 0
                                    38 1 2 0 38 0 11 1 0 11 51 1 0 11 46 1 1 0
                                    12 23 1 0 0 12 1 1 0 7 0 1 2 0 12 0 23 1 1
                                    0 12 0 1 1 11 46 0 1 0 10 45 1 2 0 0 0 26 1
                                    1 0 7 0 1 1 11 49 0 1 1 0 7 23 1 0 0 7 1 1
                                    0 49 0 1 0 0 38 1 1 0 69 0 1 0 0 38 1 0 0
                                    38 1 0 0 38 1 1 10 46 0 1 1 7 0 26 1 1 0 68
                                    0 1 0 0 38 1 2 11 46 0 7 1 2 15 38 42 0 1 3
                                    12 0 0 39 39 1 3 12 0 0 7 7 1 2 12 0 0 40 1
                                    2 12 0 0 41 1 2 0 38 0 0 1 0 7 47 1 1 0 38
                                    0 1 0 0 0 1 2 0 7 0 14 1 3 0 7 0 14 14 20 4
                                    0 7 0 14 14 7 1 1 2 0 0 1 2 2 0 0 11 1 2 1
                                    0 0 55 1 2 1 0 0 56 1 3 1 0 0 56 11 1 3 1 0
                                    0 55 57 1 3 0 0 0 43 11 1 2 0 0 0 43 1 1 0
                                    7 0 1 1 0 0 39 1 1 0 38 0 1 1 0 63 0 1 1 3
                                    7 0 1 2 16 11 7 0 1 2 15 11 42 0 1 1 0 0 0
                                    1 2 0 21 0 23 24 2 0 12 23 23 1 1 0 21 0 1
                                    1 0 12 23 1 1 0 21 0 1 1 0 0 21 1 1 0 61 23
                                    1 0 0 61 1 2 0 0 0 0 1 0 0 38 1 1 8 44 0 1
                                    2 0 63 0 14 1 1 5 0 58 1 1 0 12 0 1 1 0 0 7
                                    1 1 0 0 14 1 1 0 70 0 1 0 0 11 1 0 0 23 35
                                    0 11 48 1 3 0 0 0 0 0 1 0 0 38 1 2 0 0 12 0
                                    1 2 15 38 42 0 1 1 0 38 0 1 2 0 0 0 0 1 0 0
                                    38 1 0 0 38 1 0 0 38 1 2 10 0 0 14 1 2 0 0
                                    0 11 1 2 0 0 0 26 1 0 0 0 1 1 3 7 0 1 0 0 0
                                    1 1 2 0 0 1 2 2 0 0 11 1 2 1 0 0 56 1 2 1 0
                                    0 55 1 3 1 0 0 55 57 1 3 1 0 0 56 11 1 3 0
                                    0 0 43 11 1 2 0 0 0 43 1 2 0 38 0 0 1 2 10
                                    0 0 7 1 1 0 0 0 1 2 0 0 0 0 1 2 0 0 0 0 1 2
                                    0 63 63 0 1 2 0 63 0 63 1 2 0 0 0 7 1 2 0 0
                                    7 0 1 2 0 0 0 0 1 2 0 0 14 0 1 2 0 0 11 0 1
                                    2 0 0 26 0 1 1 15 11 0 1)))))
           '|lookupComplete|)) 
