00001 #ifndef _DERIVE_H_ 00002 #define _DERIVE_H_ 00003 00004 #include "algebras.H" 00005 #include "multipoly.H" 00006 #include "multigrobner.H" 00007 #include <map> 00008 #include <string> 00009 #include <sstream> 00010 using namespace std; 00011 00013 00073 class DerivationAnalyzer { 00074 public: 00076 GradedAlgebra<F_2> *source; 00078 GradedAlgebra<F_2> squares; 00080 AffineHomomorphism<F_2> sq_inclusion; 00082 Tuple< multiPolynomial<F_2> > d; 00084 GradedAlgebra<F_2> constants; 00086 AffineHomomorphism<F_2> cs_inclusion; 00087 00089 00092 Tuple< Polynomial<F_2> > mod_gens; 00094 map< PowProd, long > index_of; 00096 00106 void setup(GradedAlgebra<F_2> *thesource); 00108 00126 void write_gens(list< Polynomial<F_2> >& result, 00127 long ext, long first, long last); 00128 00129 virtual multiPolynomial<F_2> coords_of(PowProd P); 00131 virtual multiPolynomial<F_2> coords_of(const Polynomial<F_2>& P); 00133 00168 void constant_subalgebra(string prefix, long offset); 00170 virtual ~DerivationAnalyzer(){}; 00171 }; 00172 00174 00237 class MilnorAnalyzer : public DerivationAnalyzer { 00238 public: 00240 UnstableAlgebra* A; 00242 GradedAlgebra<F_2> ans; 00244 00250 AffineHomomorphism<F_2> inclusion; 00252 00261 AffineHomomorphism<F_2> ans_inclusion; 00262 00264 00269 bool done(); 00271 00279 AbstractHomomorphism<F_2> newvar_squared; 00281 00290 long n_cs_vars; 00292 GradedAlgebra<F_2> alg; 00293 virtual multiPolynomial<F_2> coords_of(PowProd P); 00294 virtual multiPolynomial<F_2> coords_of(const Polynomial<F_2>& P); 00296 void start(UnstableAlgebra *A); 00298 00301 void setup_for_Sq1(); 00303 00308 void re_setup(long k); 00309 00310 }; 00311 00312 00313 #endif