/usr/include/eclib/homspace.h is in libec-dev 2013-01-01-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | // FILE HOMSPACE.H: Declaration of class homspace
//////////////////////////////////////////////////////////////////////////
//
// Copyright 1990-2012 John Cremona
//
// This file is part of the mwrank/g0n package.
//
// mwrank is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at your
// option) any later version.
//
// mwrank is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License
// along with mwrank; if not, write to the Free Software Foundation,
// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
//
//////////////////////////////////////////////////////////////////////////
class mat22; // fully defined below
class matop; // fully defined below
#include "svector.h"
class homspace :public symbdata {
//private:
public:
int *coordindex,*needed,*freegens;
long rk,denom1,denom2;
ssubspace kern; // kernel(delta) basis
smat tkernbas; // transpose of kernel(delta) basis
modsym *freemods;
public:
vector<svec> coord_vecs;
mat projcoord; // # cols = # newforms after they are found
long dimension, denom3, ncusps, ncusps2;
int cuspidal; // if 1 then compute cuspidal homology
public:
// Constructor (does all the work):
homspace(long n, // the level
int hp, // plus-space flag (0 or 1 or -1)
int hcusp, // cuspidal flag (0 or 1)
int verbose // verbosity (0 : no output
// 1 : basic short output
// 2 : lots of detail)
);
~homspace();
long h1cuspdim() const {return dim(kern);}
long h1dim() const {return dimension;} // No confusion with subspace::dim
long h1denom() const {return denom1;}
long h1cdenom() const {return denom3;}
long h1ncusps() const {return ncusps;}
vector<long> eigrange(long i);
long op_prime(int i); // the i'th operator prime for Tp or Wq
mat opmat(int i, int dual, int verb=0);
mat opmat_restricted(int i,const subspace& s, int dual, int verb=0);
// versions returning an smat:
smat s_opmat(int i,int dual,int verb=0);
smat s_opmat_restricted(int i,const ssubspace& s, int dual,int verb=0);
// Extend a dual vector of length rk to one of length nsymb:
vec extend_coords(const vec& v);
// Contract a dual vector of length nsymb to one of length rk:
vec contract_coords(const vec& v);
public:
// The next functions express M- & modular symbols in terms of the
// basis for H_1(X_0(N);cusps;Z) of dimension rk
svec chain(const symb& s) const;
void add_chain(svec& v, const symb& s) const;
svec chaincd(long c, long d) const;
void add_chaincd(svec& v, long c, long d) const;
svec chain(long nn, long dd) const;
svec chain(const rational& r) const
{return chain(num(r),den(r));}
void add_chain(svec& v, long nn, long dd) const;
void add_chain(svec& v, const rational& r) const
{add_chain(v,num(r),den(r));}
// The next functions express M- & modular symbols in terms of the
// basis of a (dual) subspace of the whole space
// The "projcoord" default (which requires the initialization of the
// projcoord matrix as done in newforms::createfromscratch()) which
// has one column for each newform
// NB these operate on vecs and not svecs
// The "nf" versions give scalars and instead of a matrix take a
// vector = unique column of a matrix, such as a newform's coordplus
// vector.
vec projchaincd(long c, long d, const mat& m) const;
vec projchaincd(long c, long d) const {return projchaincd(c,d,projcoord);}
long nfprojchaincd(long c, long d, const vec& bas) const;
void add_projchaincd(vec& v, long c, long d, const mat& m) const;
void add_projchaincd(vec& v, long c, long d) const {add_projchaincd(v,c,d,projcoord);}
void add_nfprojchaincd(long& a, long c, long d, const vec& bas) const;
vec projchain(long n, long d, const mat& m) const;
vec projchain(long n, long d) const {return projchain(n,d,projcoord);}
long nfprojchain(long n, long d, const vec& bas) const;
void add_projchain(vec& v, long n, long d, const mat& m) const;
void add_projchain(vec& v, long n, long d) const {add_projchain(v,n,d,projcoord);}
void add_nfprojchain(long& aa, long n, long d, const vec& bas) const;
vec cuspidalpart(const vec& v) const
{return v[pivots(kern)];}
#if(0) //no longer used
vec cycle(long n, long d) const
{
vec v = chain(n,d).as_vec();
if (cuspidal) return cuspidalpart(v); else return v;
}
vec cycle(const rational& r) const
{
vec v = chain(num(r),den(r)).as_vec();
if (cuspidal) return cuspidalpart(v); else return v;
}
vec cycle(const modsym& m) const
{
vec v = (chain(m.beta())-chain(m.alpha())).as_vec();
if (cuspidal) return cuspidalpart(v); else return v;
}
#endif // no longer used
svec applyop(const matop& mlist, const rational& q) const;
svec applyop(const matop& mlist, const modsym& m) const
{return applyop(mlist,m.beta())-applyop(mlist,m.alpha());}
mat calcop(string opname, long p, const matop& mlist, int dual, int display=0) const;
mat calcop_restricted(string opname, long p, const matop& mlist, const subspace& s, int dual, int display=0) const;
smat s_calcop(string opname, long p, const matop& mlist, int dual, int display=0) const;
smat s_calcop_restricted(string opname, long p, const matop& mlist, const ssubspace& s, int dual, int display=0) const;
public:
mat heckeop(long p, int dual, int display=0) const;
mat heckeop_restricted(long p, const subspace& s, int dual, int display=0) const;
smat s_heckeop(long p, int dual, int display=0) const;
smat s_heckeop_restricted(long p, const ssubspace& s, int dual, int display=0) const;
mat newheckeop(long p, int dual, int display=0) const;
mat wop(long q, int dual, int display=0) const;
smat s_wop(long q, int dual, int display=0) const;
mat fricke(int dual, int display=0) const;
mat conj(int dual,int display=0) const;
mat conj_restricted(const subspace& s, int dual,int display=0) const;
smat s_conj(int dual, int display=0) const;
smat s_conj_restricted(const ssubspace& s, int dual, int display=0) const;
vec maninvector(long p) const;
vec projmaninvector(long p) const;
vec projmaninvector(long p, const mat& m) const;
vec manintwist(long p) const;
vec newhecke(long p, long n, long d) const;
//
friend class jumps;
friend class newforms;
};
class mat22 { //2x2 matrix for linear fractional transformations
friend class homspace;
private:
long a,b,c,d;
public:
mat22(long ia=0, long ib=0, long ic=0, long id=0)
:a(ia),b(ib),c(ic),d(id){;}
mat22(const mat22& m) :a(m.a),b(m.b),c(m.c),d(m.d)
{;}
void operator=(const mat22& m)
{a=m.a; b=m.b; c=m.c; d=m.d;}
void show(ostream& s) const
{s << "[" << a << "," << b << ";"<< c << "," << d << "]";}
rational operator()(const rational& q)const
{
long n=num(q),de=den(q);
return rational(a*n+b*de,c*n+d*de);
}
svec operator()(const symb& s, const homspace* h)const
{
long u=s.ceered(),v=s.deered();
return h->chaincd(a*u+c*v,b*u+d*v);
}
vec operator()(const symb& s, const homspace* h, const mat& m)const
{
long u=s.cee(),v=s.dee();
return h->projchaincd(a*u+c*v,b*u+d*v,m);
}
};
class matop { // formal sum of 2x2 matrices
private: vector<mat22> mats;
public:
matop(long p, long n); // constructor for hecke ops
matop(long p); // constructor for heilbronn matrices
matop(long a, long b, long c, long d); // constructor for a single matrix
long size() const {return mats.size();}
mat22 operator[](long i) const {return mats[i];}
friend matop degen_mat(long d);
};
inline matop degen_mat(long d)
{
return matop(d,0,0,1);
}
inline ostream& operator<< (ostream& s, const mat22& m)
{
m.show(s);
return s;
}
|