From 9fb26d710b0b22cc6a7fd27de9cab4552b8e85a3 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 14 Feb 2011 01:23:00 +0000 Subject: Remove explicit call to autoCoerce --- src/algebra/groebf.spad.pamphlet | 6 ++++-- src/algebra/rep2.spad.pamphlet | 12 ++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/algebra/groebf.spad.pamphlet b/src/algebra/groebf.spad.pamphlet index f4b7c397..9d7c70a3 100644 --- a/src/algebra/groebf.spad.pamphlet +++ b/src/algebra/groebf.spad.pamphlet @@ -212,8 +212,10 @@ GroebnerFactorizationPackage(Dom, Expon, VarSet, Dpol): T == C where stopDividing := false until stopDividing repeat nPq := nP exquo q - stopDividing := (nPq case "failed") - if not stopDividing then nP := autoCoerce nPq + if nPq case Dpol then + nP := nPq@Dpol + else + stopDividing := true stopDividing := stopDividing or zero? degree nP zero? degree nP => diff --git a/src/algebra/rep2.spad.pamphlet b/src/algebra/rep2.spad.pamphlet index acd317dc..ed4e7b0b 100644 --- a/src/algebra/rep2.spad.pamphlet +++ b/src/algebra/rep2.spad.pamphlet @@ -398,8 +398,7 @@ RepresentationPackage2(R): public == private where transitionMatrix : M R := _ transpose completeEchelonBasis submodule messagePrint " Transition matrix computed" - inverseTransitionMatrix : M R := _ - autoCoerce(inverse transitionMatrix)$Union(M R,"failed") + inverseTransitionMatrix := inverse(transitionMatrix)::M(R) messagePrint " The inverse of the transition matrix computed" messagePrint " Now transform the matrices" for i in 1..maxIndex algebraGenerators repeat @@ -453,8 +452,7 @@ RepresentationPackage2(R): public == private where for i in 1..maxIndex result repeat for j in 1..maxIndex (result.i) repeat mat : M R := result.i.j - result.i.j := _ - transpose autoCoerce(inverse mat)$Union(M R,"failed") + result.i.j := transpose(inverse(mat)::M(R)) else messagePrint " Representation is not irreducible, use meatAxe to split" -- if "split?" then dual representation interchange factor @@ -543,8 +541,7 @@ RepresentationPackage2(R): public == private where result := false -- can assume that dimensions of cyclic submodules are equal (ncols baseChange0) = n => -- full dimension - transitionM := baseChange0 * _ - autoCoerce(inverse baseChange1)$Union(M R,"failed") + transitionM := baseChange0 * (inverse(baseChange1)::M(R)) foundResult := true result := true for j in 1..numberOfGenerators while result repeat @@ -639,8 +636,7 @@ RepresentationPackage2(R): public == private where transitionMatrix : M R := _ transpose completeEchelonBasis submodule messagePrint " Transition matrix computed" - inverseTransitionMatrix : M R := - autoCoerce(inverse transitionMatrix)$Union(M R,"failed") + inverseTransitionMatrix := inverse(transitionMatrix)::M(R) messagePrint " The inverse of the transition matrix computed" messagePrint " Now transform the matrices" for i in 1..maxIndex algebraGenerators repeat -- cgit v1.2.3