text:
Goldman Finds Unexpected Source Of Demand For 1 Million Bpd Of Oil
Having recently turned even more…
Has Big Oil Turned Its Back On Alaska?
Alaska recently attempted to auction…
Alan Mammoser
Alan Mammoser writes about energy, environment, cities, infrastructure and planning. He writes the weblog, www.warmearth.us
Europe's Leaked Hydrogen Strategy Is Very Ambitious
By Alan Mammoser - Jul 05, 2020, 10:00 AM CDT
In the panorama of renewable energy technologies, hydrogen's potential is seen in several sectors. It is what the IEA calls an 'integration' technology. It promises to play a cross-sectoral role throughout the energy system, contributing simultaneously to decarbonization in various ways. It can make clean energy sources more efficient and increase overall system flexibility. What has increased its appeal, beyond the basic need to address climate change, is the remarkable decline in the cost of renewable energy, which makes the large-scale production of low-carbon hydrogen more feasible. These factors have motivated a growing number of plans and pilot projects throughout the world, reaching a high point of announcements for new projects last year.
Now the outlines of how hydrogen will function in future energy systems, and the pathways to get there, are beginning to appear. One region of particular importance is northern Europe.
But it is a critical moment when momentum has slowed in large part due to the pandemic. With recovery, it is not certain that investment in low-carbon hydrogen applications will continue to grow. Strong and specific commitments from companies and governments will be required to spur demand and foster markets.
A shifting emphasis
The current actual worldwide production of low-carbon hydrogen is a tiny amount. However, there is a growing activity on several fronts, with new pilot and early commercial projects appearing with unprecedented momentum until this year. They suggest how government and business will give birth to clean hydrogen markets.
Experts have noticed a shift in emphasis. Up until recently, the transport sector has been the center of focus for clean hydrogen, with efforts to develop fuel cell electric vehicles (FCEVs) and hydrogen refueling stations. Some impressive gains have been made. According to the IEA, the FCEV market has continued to expand especially in China, Japan and Korea. And at the end of 2019, there were 470 hydrogen refueling stations in operation worldwide, an increase of more than 20% from 2018. There has even been production of two fuel cell trains by Alstom in Germany, with more coming next year.
But the area of activity is expanding beyond transport. Governments and companies are working together to ramp up green hydrogen with projects in key end-use technologies and low-carbon production. Although the starting point is low, new projects are for large scale deployment of electrolysers of a hundred megawatts. They have applications in heavy industry, chemical production, heat for cities, and the all-important area of energy storage.
A glance at a few major projects shows the extent of planning for large scale electrolysis, industrial applications, and the deployment of gas grids to carry hydrogen for multiple purposes. These appear in the IEA's Hydrogen Projects Database, which offers a comprehensive record of low-carbon hydrogen projects commissioned, in planning or construction worldwide for the past twenty years. The database can be accessed on-line.
North European nexus
The shifting emphasis can be seen especially in Northern Europe, where large concentrations of projects are now found. Renewable energy will power electrolysers to produce hydrogen for industries in northern industrial centers. Other projects focus on power and heat for urban districts. Key applications include large-scale electrolysis, carbon capture, utilization and storage (CCUS), and utilization of natural gas networks.
Related: Oil Glut At Sea Starts To Shrink A few notable projects are described briefly here.
Electrolysis: There are a number of planned projects for hydrogen electrolysers that would produce hydrogen from decarbonized electricity. German and French projects are leaders.
In Germany, a power-to-gas project in Emsland in the Ruhr region has been called 'Hybridge' for its capacity to couple electric and gas networks. In a partnership of transmission system operator Amprion and gas net operator Open Grid Europe (OGE), electricity from renewable energy will be converted, by means of electrolysis, into hydrogen and methane. The companies will deploy a 100 MW electrolyser, with the resulting hydrogen transported by an OGE hydrogen pipeline and the existing gas pipeline network throughout the Ruhr and beyond. The project is anticipated to start operation in 2023.
In France, in the Les Hauts de France region around Dunkirk, one of the world's most ambitious power-to-gas projects will build five 100 MW hydrogen electrolyser production units over five years. The project, a partnership of France's H2V Industry and Norway's HydrogenPro, will introduce hydrogen into the natural gas distribution network in order to decarbonize the natural gas used for heating and cooking as well as for transport.
These ambitious European projects have large-scale electrolysis counterparts in North America. Most notable is a project of the British Columbia-based Renewable Hydrogen Canada (RH2C), which is backed by a private sector utility and investors. The company is planning to build a large electrolysis plant in BC, to produce renewable hydrogen through water electrolysis powered by local hydropower and winds off the Rockies. Meanwhile, in the US, dedicated research on electrolysis to produce hydrogen from renewables is centered in the Department of Energy's Office of Energy Efficiency and Renewable Energy.
Industry: Most of the current demand for hydrogen is in oil refining, the chemical sector and steel manufacturing. Therefore the main near term opportunity to reduce emissions in the industrial sector is to displace fossil fuel hydrogen with electrolytic hydrogen produced from renewable sources ('green' hydrogen) or with CCUS ('blue' hydrogen). This is feasible in the production of chemicals such as ammonia and methanol and in oil refining. And electrolytic hydrogen is gaining momentum in steelmaking, with a large demonstration plant under construction in Sweden that is expected to be operational by 2025.
The development of infrastructure that couples conventional hydrogen production with CCUS is moving forward across a broad range of applications. According to the IEA, six projects with a total annual production of 350 000 metric tons of low-carbon hydrogen were in operation at the end of 2019. Moreover, more than 20 projects to be launched in the 2020s have been announced, for the most part in countries around the North Sea.
Related: U.S. Shale Needs To Rethink Its Strategy To Survive
One such project, known as H-vision, will establish blue hydrogen infrastructure in the Rotterdam harbor area in the Netherlands. It will consist of hydrogen production with CCUS in four steam-reforming plants, with a total capacity of 15-20 metric tons of hydrogen production per hour. They will produce hydrogen for industrial plants in the harbor, with the resultant CO2 to be sequestered in depleted gas fields under the North Sea or used in chemical production. The consortium contains 14 parties from within the harbor and others in the process chain. Starting from a 2019 feasibility study, their goal is to realize the complete project by 2030.
Gas grid: According to the IEA, several projects around the world are already injecting hydrogen into existing natural gas grids. It is possible to blend up to 20% hydrogen on a volumetric basis into a gas grid with minimal or even no modifications to the infrastructure or end-user home appliances.
An enormous pilot project to convert the gas networks to hydrogen in the north of England is being planned now. First announced in 2016, the H21 North of England (H21 NoE) project, is a collaboration of two British gas distributors, Northern Gas Networks and Cadent, and Norway's Equinor (formerly Statoil). They have produced a hydrogen blueprint that will utilize the existing natural gas distribution infrastructure serving a region of 5 million inhabitants including several large cities for domestic and industrial users, with applications including heat, power and transport.
The project's planners view it as a way to achieve the 'deep decarbonization' that could not be reached with renewable electric power alone. To do so will require carbon capture and storage (CCS). Equinor's role is to build a hydrogen production facility utilizing a standard reforming process with natural gas. The captured CO2 will be transported offshore to undersea storage. A specially built hydrogen transmission pipeline will link to the local gas distribution networks. The new transmission pipeline is required because injecting hydrogen into gas transmission pipelines is more difficult (although Italy's Snam has already demonstrated the feasibility of blending hydrogen up to 10% in gas transmission grids).
Project implementation is to occur between 2028 and 2034. It is anticipated to achieve deep decarbonization of 14% of the UK's heat demand by 2034. Its large scale and significant impact on carbon emissions will make H21 NoE the world's first at-scale hydrogen economy. Should it succeed, it will lay a basis for expanding such a system across the entire UK, decarbonizing a large percentage of domestic heat, transport and power by 2050. Indeed it will serve as a model for many other countries.
A more modest project in France is called GRHYD (Gestion des Réseaux par l'injection d'Hydrogène pour Décarboner les énergies, i.e., grid management through the injection of hydrogen for energy decarbonization). Launched in 2018, it is managed by the energy services firm Engie with local partners and support of the French government. The current phase is a power-to-gas project deploying renewable energy to blend up to 20% hydrogen into the natural gas grid for a district of Dunkirk. It is demonstrating the technical feasibility of this approach for domestic use.
A critical moment
Last month the IEA released its annual World Energy Outlook Special Report under the title 'Sustainable Recovery.' In it, the agency places hydrogen among six key sectors that governments should focus on for economic recovery, calling on them to 'boost innovation in crucial technology areas including hydrogen, batteries, CCUS, and small modular nuclear reactors.'
And in a recent Tracking Energy Integration 2020 report, the IEA calls hydrogen one of several integration technologies that are 'increasingly crucial' for a low-carbon energy transition. The report notes that important political momentum had been building through last year, listing ten international initiatives and national plans that appeared during 2019. These include top level G20 discussions and target-setting plans by Korea, Japan, Netherlands, Australia and Canada.
Clearly the hydrogen movement is at a critical moment when continuing innovation is required. The role of government will remain important as fledgling industries seek to gain scale and find markets. Governments will need to provide direct, targeted support for projects that can achieve technical and market advances. And they will need to help stimulate demand in sectors where good near-term opportunities appear.
Northern Europe, where low carbon hydrogen projects are just beginning to gain significant scale, will be an important region to watch. The work occurring across the region should produce technological improvements on a wide range of applications and expand hydrogen use to new applications. Success in this region will help other countries and regions continue to refine their hydrogen strategies and roadmaps and set realistic targets for the deployment of specific technologies.
By Alan Mammoser for Oilprice.com
Are Oil Bulls In For A Disappointing July?
Oil Rig Count Collapse Beginning To Slow
U.S. Shale Scrambles For Credit With Oil At $40
How Tesla Became More Valuable Than Exxon
Tesla's Ambitious Plan To Ditch Cobalt
The use of hydrogen in transport was the most promising prospect. Unfortunately, it has yet to take off judging by the very small number of hydrogen refuelling stations and the very minute number of fuel cell electric vehicles (FCEVs) not exceeding a few thousands round the world.
Furthermore, nothing can change the fact that we need energy to produce hydrogen and that the cheapest way to produce it is from natural gas. If this is the case, why waste energy producing hydrogen from natural gas when one can use natural gas directly to generate electricity. It amounts to cutting the middleman in trade transactions.
Natural gas will be the pivot for global energy transition well into the future.


Create that extra warmth within your log cabin by insulating the roof and floor with 25mm Celotex Insulation board. This product is foil lined so will help retain the heat in the winter and reflect the heat during the summer months.
Making your outdoor living experience not only creative but comfortable whatever the season.
25mm celotex insulation is fitted between the roof boards and 6mm external ply layer.


text:
namespace views {

namespace {
class MenuHostWindow;
}

///////////////////////////////////////////////////////////////////////////////
//
// Menu class
//
//   A wrapper around a Win32 HMENU handle that provides convenient APIs for
//   menu construction, display and subsequent command execution.
//
///////////////////////////////////////////////////////////////////////////////
class MenuWin : public Menu {
 public:
  // Construct a Menu using the specified controller to determine command
  // state.
  // delegate     A Menu::Delegate implementation that provides more
  //              information about the Menu presentation.
  // anchor       An alignment hint for the popup menu.
  // owner        The window that the menu is being brought up relative
  //              to. Not actually used for anything but must not be
  //              NULL.
  MenuWin(Delegate* d, AnchorPoint anchor, HWND owner);
  // Alternatively, a Menu object can be constructed wrapping an existing
  // HMENU. This can be used to use the convenience methods to insert
  // menu items and manage label string ownership. However this kind of
  // Menu object cannot use the delegate.
  explicit MenuWin(HMENU hmenu);
  virtual ~MenuWin();

  // Overridden from Menu:
  virtual void AddMenuItemWithIcon(int index,
                                   int item_id,
                                   const string16& label,
                                   const gfx::ImageSkia& icon) OVERRIDE;
  virtual Menu* AddSubMenuWithIcon(int index,
                                   int item_id,
                                   const string16& label,
                                   const gfx::ImageSkia& icon) OVERRIDE;
  virtual void AddSeparator(int index) OVERRIDE;
  virtual void EnableMenuItemByID(int item_id, bool enabled) OVERRIDE;
  virtual void EnableMenuItemAt(int index, bool enabled) OVERRIDE;
  virtual void SetMenuLabel(int item_id, const string16& label) OVERRIDE;
  virtual bool SetIcon(const gfx::ImageSkia& icon, int item_id) OVERRIDE;
  virtual void RunMenuAt(int x, int y) OVERRIDE;
  virtual void Cancel() OVERRIDE;
  virtual int ItemCount() OVERRIDE;

  virtual HMENU GetMenuHandle() const {
    return menu_;
  }

  // Gets the Win32 TPM alignment flags for the specified AnchorPoint.
  DWORD GetTPMAlignFlags() const;

 protected:
  virtual void AddMenuItemInternal(int index,
                                   int item_id,
                                   const string16& label,
                                   const gfx::ImageSkia& icon,
                                   MenuItemType type) OVERRIDE;

 private:
  friend class MenuHostWindow;

  // The data of menu items needed to display.
  struct ItemData;

  void AddMenuItemInternal(int index,
                           int item_id,
                           const string16& label,
                           const gfx::ImageSkia& icon,
                           HMENU submenu,
                           MenuItemType type);

  explicit MenuWin(MenuWin* parent);

  // Sets menu information before displaying, including sub-menus.
  void SetMenuInfo();

  // Get all the state flags for the |fState| field of MENUITEMINFO for the
  // item with the specified id. |delegate| is consulted if non-NULL about
  // the state of the item in preference to |controller_|.
  UINT GetStateFlagsForItemID(int item_id) const;

  // The Win32 Menu Handle we wrap
  HMENU menu_;

  // The window that would receive WM_COMMAND messages when the user selects
  // an item from the menu.
  HWND owner_;

  // This list is used to store the default labels for the menu items.
  // We may use contextual labels when RunMenu is called, so we must save
  // a copy of default ones here.
  std::vector<string16> labels_;

  // A flag to indicate whether this menu will be drawn by the Menu class.
  // If it's true, all the menu items will be owner drawn. Otherwise,
  // all the drawing will be done by Windows.
  bool owner_draw_;

  // This list is to store the string labels and icons to display. It's used
  // when owner_draw_ is true. We give MENUITEMINFO pointers to these
  // structures to specify what we'd like to draw. If owner_draw_ is false,
  // we only give MENUITEMINFO pointers to the labels_.
  // The label member of the ItemData structure comes from either labels_ or
  // the GetContextualLabel.
  std::vector<ItemData*> item_data_;

  // Our sub-menus, if any.
  std::vector<MenuWin*> submenus_;

  // Whether the menu is visible.
  bool is_menu_visible_;

  DISALLOW_COPY_AND_ASSIGN(MenuWin);
};

}  // namespace views

#endif  // UI_VIEWS_CONTROLS_MENU_MENU_WIN_H_

redpajama_set_name: RedPajamaGithub


text:
\section*{Introduction}

The main subjects in the study of differential graded homological algebra are DG algebras and the DG modules over them.  These structures can be viewed as algebras and their modules, each possessing a differential that `cooperates' with the action of the algebra.  Such differential graded objects arise naturally, for example, in the form of Koszul complexes and certain singular cohomology rings.  Furthermore, the literature abounds with conditions for their existence as (minimal) projective resolutions \citelist{\cite{BucEis77}\cite{KuMil80}\cite{KuMil83}\cite{Sla93}\cite{Sri89}}.

Our interest in differential graded homological algebra lies in understanding the richness of the derived category $\Der\DG(A)$ of DG modules over a fixed DG algebra $A$.  This category can be thought of as a localization of the homotopy category of DG $A$-modules.  Specifically, we focus on the relation between $\DG(A)$ and the category $\Ch\Gr(A)$ of complexes of graded modules over the underlying graded algebra of $A$.  When $A$ is arbitrary, it is not difficult to see that the objects of $\DG(A)$ have a more complicated structure than those of $\Ch\Gr(A)$.  However, over a DG algebra with trivial differential, the same observation is not immediate.

In order to compare the categories over such a DG algebra, we study the totaling functor between them, $\Tot:\Ch\Gr(A)\to\DG(A)$.  One nice characteristic of this functor is its preservation of quasiisomorphisms---that is, chain maps which induce isomorphism in homology.  Such chain maps define the concept of isomorphism in the derived category; we can thus extend the totaling functor.
\[
\Tot:\Der\Gr(A)\to\Der\DG(A)
\]
In this work, we investigate the image of the totaling functor in the case that $A$ is a polynomial ring over a field.

The paper is organized as follows.  In Section 1, we define the preliminary concepts and categories.  Section 2, which contains our results, is outlined in three subsections.  In Section 2.1, we study the image of $\Tot$ over a polynomial ring in at least two variables.  These results naturally motivate the subject of Section 2.2, wherein we define, for an arbitrary DG algebra $A$ with trivial differential, a special class of DG modules which lies in the image of $\Tot$.  Finally, in Section 2.3 we investigate the image of $\Tot$ over a polynomial ring in one variable.

\section{Background}

\numberwithin{theorem}{subsection}
\numberwithin{equation}{theorem}

Throughout, let $k$ denote a field and $R$ a commutative ring with identity.  Unless otherwise noted, all modules are assumed to be left modules. Furthermore, when $\NN$ is used as an indexing set, it shall contain zero.

\subsection{Complexes}\label{subsec:complexes}

A \emph{chain complex} of $R$-modules given by
\[
\cdots\to X_{i+2}\xra{\dell^X_{i+2}}X_{i+1}\xra{\dell^X_{i+1}}X_i\xra{\dell^X_i}X_{i-1}\xra{\dell^X_{i-1}}X_{i-2}\to\cdots
\]
shall be denoted $X=(X^\natural,\dell^X)$, where $X^\natural$ represents the underlying graded $R$-module of the complex, or simply $(X^\natural,\dell)$ when there is no risk of confusion.  With the convention that $X^d=X_{-d}$, we define similarly the \emph{cochain complex} $X$, given by:
\[
\cdots\to X^{i-2}\xra{\dell_X^{i-2}}X^{i-1}\xra{\dell_X^{i-1}}X^i\xra{\dell_X^i}X^{i+1}\xra{\dell_X^{i+1}}X^{i+2}\to\cdots
\]
The notions of chain and cochain complexes are one and the same; the definitions which follow will be stated in terms of chain complexes.  As per clarity, we shall utilize both types of complexes in the sequel.

For a complex $X$, we use $\Z(X)$ and $\B(X)$ to denote the graded $R$-modules of \emph{cycles} and \emph{boundaries}, respectively, of $X$.  They are defined as follows.
\begin{align*}
\Z_i(X)&=\ker\dell^X_i\\
\B_i(X)&=\im\dell^X_{i+1}
\end{align*}
Hence the graded \emph{homology} module of $X$ is given by $\HH(X)=\bigoplus_{i\in\ZZ}\HH_i(X)$, where
\[
\HH_i(X)=\Z_i(X)/\B_i(X).
\]
If $\HH_i(X)=0$ for all $|i|\gg 0$, we say that $X$ is \emph{homologically bounded}.

For a given complex $X$ of $R$-modules, the $d\expth$ \emph{shift} of $X$ is the complex $\shift^d X$ of $R$-modules whose underlying graded module is given by
\[
(\shift^d X)_i=X_{i-d}
\]
for each $i\in\ZZ$.  Furthermore, for every $x\in X$, we denote by $\susp^d(x)$ its image in $\shift^dX$.  With this notation, we now define the differential on the complex $\shift^dX$ to be given by
\[
\dell^{\shift^d X}_i(\susp^dx)=(-1)^d\susp^d\left(\dell^X_{i-d}(x)\right)
\]
for each $\susp^dx\in(\shift^d X)_i$ and all $i\in\ZZ$.  For simplicity, we set $\shift X=\shift^1 X$.

A homomorphism $\mu:X\to Y$ of complexes of $R$-modules is called a \emph{chain map} provided that
\[
\dell^Y\circ\mu=(-1)^{|\mu|}\mu\circ\dell^X
\]
where $|\mu|$ denotes the degree of $\mu$.  Moreover, $\mu$ is a \emph{morphism} of complexes if $|\mu|=0$.

\begin{remarks}
(1) The map $\susp^d:X\to\shift^dX$ is a bijective chain map of complexes; it is called the \emph{suspension map}.

(2) If $X$ has a trivial differential, it represents a graded $R$-module; in this case we define similarly the $d\expth$ shift $\shift^d X$ of $X$ and the $d\expth$ suspension map $\susp^d:X\to\shift^d X$ on $X$.
\end{remarks}

\begin{definition}
Given two morphisms $\mu,\lambda:X\to Y$ of complexes of $R$-modules, a \emph{homotopy} between $\mu$ and $\lambda$ is a degree $+1$ homomorphism of complexes $\sigma:X\to Y$ such that
\[
\mu-\lambda=\dell^Y\circ \sigma+\sigma\circ\dell^X.
\]
This condition is illustrated by the following diagram:
\[
\xymatrixrowsep{3pc} \xymatrixcolsep{4pc} \xymatrix{ \cdots
\ar@{->}[r] & X_{i+1} \ar@{->}[r]^{\dell_{i+1}^X}
\ar@<-.5ex>[d]_{\mu_{i+1}} \ar@<.5ex>[d]^{\lambda_{i+1}} & X_i
\ar@{->}[r]^{\dell_i^X} \ar@{-->}[dl]_{\sigma_i}
\ar@<-.5ex>[d]_{\mu_i} \ar@<.5ex>[d]^{\lambda_i} & X_{i-1} \ar@{->}[r]
\ar@{-->}[dl]_{\sigma_{i-1}} \ar@<-.5ex>[d]_{\mu_{i-1}}
\ar@<.5ex>[d]^{\lambda_{i-1}} & \cdots
\\
\cdots \ar@{->}[r] & Y_{i+1} \ar@{->}[r]_{\dell_{i+1}^Y} & Y_i
\ar@{->}[r]_{\dell_i^Y} & Y_{i-1} \ar@{->}[r] & \cdots }
\]

In the case that such a $\sigma$ exists, we say that $\mu$ and $\lambda$ are \emph{homotopic}.  A chain map $\mu:X\to Y$ is
said to be \emph{null homotopic} if it is homotopic to the zero map.
\end{definition}

\begin{fact}\label{fact:inducedmorph}
If $\mu:X\to Y$ is a morphism of complexes of $R$-modules, then $\mu$ induces a degree zero homomorphism of graded
$R$-modules
\[
\HH(\mu):\HH(X)\to\HH(Y).
\]
Moreover, if $\lambda:X\to Y$ is a morphism which is homotopic to $\mu$, then $\HH(\mu)=\HH(\lambda)$.
\end{fact}

\begin{definition}\label{def:quism}
A morphism $\mu:X\to Y$ of complexes of $R$-modules is called a \emph{quasiisomorphism} if $\HH(\mu):\HH(X)\to\HH(Y)$ is an
isomorphism of graded $R$-modules.  Furthermore $X$ and $Y$ are said to be \emph{quasiisomorphic}, denoted $X\simeq Y$, if there exists a
sequence of chain maps linking $X$ and $Y$, each of which is a quasiisomorphism.
\end{definition}

\begin{remark}
It is important to note that if $X$ and $Y$ are complexes of $R$-modules such that $\HH(X)\cong\HH(Y)$, it is not necessarily true that $X\simeq Y$.
\end{remark}

\subsection{Differential graded algebra}

In this section, all tensor products are assumed to be taken over $R$.

A complex $A$ of $R$-modules is called a \emph{differential graded algebra} (or \emph{DG algebra}) over $R$ if there exist morphisms
\begin{align*}
\mu^A&:A\otimes A\to A\\
\eta^A&:R\to A
\end{align*}
called the \emph{product} and \emph{structure map}, respectively, such that the following diagrams commute.
\[
\xymatrixrowsep{3pc}
\xymatrixcolsep{3pc}
\xymatrix{
A\otimes A\otimes A\ar@{->}[r]^{A\otimes\mu^A}\ar@{->}[d]_{\mu^A\otimes A} & A\otimes A\ar@{->}[d]^{\mu^A} & & A\otimes A\ar@{->}[d]^{\mu^A} & \\
A\otimes A\ar@{->}[r]_{\mu^A} & A & R\otimes A\ar@{=}[r]\ar@{->}[ur]^{\eta^A\otimes A} & A\ar@{=}[r] & A\otimes R\ar@{->}[ul]_{A\otimes\eta^A}
}
\]

The maps $\mu^A$ and $\eta^A$ are usually suppressed from notation, in the following sense: the product $\mu^A(a\otimes a')$ is denoted $aa'$, and $\eta^A(1)$ is denoted 1 and is called the \emph{unit} of $A$.  Furthermore, as the product is a morphism of complexes, it must satisfy the Leibniz rule.  That is,
\[
\dell(aa')=\dell(a)a'+(-1)^{|a|}a\dell(a')
\]
for each $a,a'\in A$.  A morphism $\varphi:A\to B$ of complexes is moreover a \emph{morphism} of DG algebras if $\varphi(aa')=\varphi(a)\varphi(a')$ and $\varphi(1)=1$.

\begin{remark}
If $A=A^\natural$ has trivial differential, then $A$ is merely a graded $R$-algebra.
\end{remark}

A complex $M$ of $R$-modules is called a \emph{differential graded module} (or \emph{DG module}) over $A$ if there exists a morphism
\[
\mu^{AM}:A\otimes M\to M
\]
called the \emph{action} of $A$, such that the following diagrams commute.
\[
\xymatrixrowsep{3pc}
\xymatrixcolsep{3pc}
\xymatrix{
A\otimes A\otimes M\ar@{->}[r]^{A\otimes\mu^{AM}}\ar@{->}[d]_{\mu^A\otimes M} & A\otimes M\ar@{->}[d]^{\mu^{AM}} & & A\otimes M\ar@{->}[d]^{\mu^{AM}}\\
A\otimes M\ar@{->}[r]_{\mu^{AM}} & M & R\otimes M\ar@{=}[r]\ar@{->}[ur]^{\eta^A\otimes M} & M
}
\]

As before, we denote $\mu^{AM}(a\otimes m)$ by $am$, and we require that for each $a\in A$ and $m\in M$, the Leibniz rule is satisfied:
\[
\dell^M(am)=\dell^A(a)m+(-1)^{|a|}a\dell^M(m)
\]

A subcomplex $N\subseteq M$ is called a \emph{DG submodule} if $\mu^{AM}(A\otimes N)\subseteq N$.

\begin{remarks}
(1) Notice that the product in an arbitrary DG algebra $A$ is not necessarily commutative.  Therefore, unless otherwise stated, a DG $A$-module $M$ shall be assumed to have a left $A$-module structure.

(2) All of the definitions and results of Section \ref{subsec:complexes} can be analogously stated for a DG module $M$ when thought of as a complex over $R$.

(3) If $A=A^\natural$ is a DG algebra with trivial differential, then it is merely a graded algebra.  In this case, the action of $A$ on any DG $A$-module is that of a chain map of degree $|a|$.
\end{remarks}

\subsection{Semifreeness}

In this section, let $A$ denote a DG algebra and $M$ denote a DG $A$-module.  A subset $E\subseteq M^\natural$ is called a \emph{semibasis} of $M$ if
\begin{itemize}
\item[(\emph{i})] $E$ is a basis of $M^\natural$ over $A^\natural$, and
\item[(\emph{ii})] $E=\bigsqcup_{d\in\NN}E_d$, as a disjoint union, such that
\[
\dell(E_d)\subseteq A\left(\bigsqcup_{i<d}E_i\right)
\]
for all $d\in\NN$.
\end{itemize}
A DG module that possesses such a semibasis is said to be \emph{semifree}.

\begin{proposition}\label{lem:semifree}\cite{AvFoxHal}*{8.2.3}
Let $A$ be a DG algebra and $M$ be a DG $A$-module.  The following are equivalent.
\begin{enumerate}
\item $M$ is semifree.
\item $M^\natural$ has a well-ordered basis $E$ over $A^\natural$ such that for each $e\in E$
\[
\dell(e)\in A\left(\{e'\in E\var e'<e\}\right).
\]
\end{enumerate}
\end{proposition}

\begin{proof}
$(1)\Rightarrow(2)$  Let $E=\bigsqcup_{d\in\NN}E_d$ be a semibasis for $M$ over $A$.  For each $d\in\NN$, impose an ordering on $E_d$, and further suppose that whenever $d'<d$, $e'<e$ for every $e'\in E_{d'}$ and $e\in E_d$.  This implies that $E$ has an ordering with the desired property.

$(2)\Rightarrow(1)$  Suppose that $E$ is a well-ordered basis for $M^\natural$ over $A^\natural$ such that $\dell(e)\in A\left(\{e'\in E\var
e'<e\}\right)$ for every $e\in E$.  Set $E_{-1}=\varnothing$ and $M_{-1}=\{0\}$, and for each $d\in\NN$, recursively define $E_d$ and $M_d$ in the following manner:
\begin{align*}
E_d&=\left\{e\in E\setminus\textstyle{\bigcup_{i<d}E_i}\var\dell(e)\in M_{d-1}\right\}\\
M_d&=A\left(\bigcup_{i\leq d}E_i\right)
\end{align*}
By this construction, the $E_d$ are mutually disjoint.  Furthermore, the well-ordering of $E$ implies that $E=\bigsqcup_{d\in\NN}E_d$, and the result follows.
\end{proof}

\begin{definition}
Let $M$ be a DG module over a DG algebra $A$. A \emph{semifree resolution} of $M$ is a quasiisomorphism $\pi:F\to M$ of DG $A$-modules, where $F$ is semifree.
\end{definition}

The following is a result of Avramov, Foxby, and Halperin \cite{AvFoxHal}*{8.3.3 and 8.3.4} concerning the abundance of semifree modules.  For the reader's convenience, we shall sketch their proof below.

\begin{theorem}\label{thm:semifreeres}
Every DG module has a semifree resolution.
\end{theorem}

\begin{proof}
Let $M$ be a DG $A$-module.  Our goal is to construct, by induction on $d\in\NN$, a sequence of inclusions of DG $A$-modules $F^{d-1}\subseteq F^{d}$ and of morphisms $\varepsilon^d:F^d\to M$ of DG $A$-modules such that $\varepsilon^d|_{F^{d-1}}=\varepsilon^{d-1}$.  With this accomplished, we will demonstrate that $F=\bigcup_{d\in\NN}F^d$ is semifree and that $\varepsilon=\varinjlim\varepsilon^d:F\to M$ is a quasiisomorphism.

First we consider the case when $d=0$.  Let $Z^0\subseteq M$ consist of cycles, chosen such that $\cls(Z^0)$ generates $\HH(M)$ over $\HH(A)$.  Further, let
\[
E^0=\{e_z\mid |e_z|=|z|\text{ for $z\in Z^0$}\}
\]
be linearly independent over $A^\natural$, and define the DG $A$-module $F^0$, whose underlying graded module is given by $(F^0)^\natural=A^\natural E^0$, and whose differential is given by
\[
\dell^{F^0}\left(\sum_{z\in Z^0}a_z e_z\right)=\sum_{z\in Z^0}\dell^A(a_z)e_z.
\]
Furthermore, we note that
\[
\varepsilon^0\left(\sum_{z\in Z^0}a_z e_z\right)=\sum_{z\in Z^0} a_z z
\]
defines a morphism $L^0\to M$ of DG $A$-modules.

Now, suppose that $d>0$ and that $F^{d-1}$ and $\varepsilon^{d-1}:F^{d-1}\to M$ have been defined.  Let $Z^d\subseteq F^{d-1}$ consist of cycles such that $\cls(Z^d)$ generates $\ker\HH(\varepsilon^{d-1})$ over $\HH(A)$.  Now let
\[
E^d=\{e_z\mid |e_z|=|z|+1\text{ for $z\in Z^{d}$}\}
\]
be linearly independent over $A^\natural$, and define the DG $A$-module $F^d$ by
\[
(F^d)^\natural=A^\natural E^d\oplus (F^{d-1})^\natural
\]
and
\[
\dell^{F^d}\left(\sum_{z\in Z^d}a_z e_z+f\right)=\sum_{z\in Z^d}\dell^A(a_z)e_z+\sum_{z\in Z^d}(-1)^{|a_z|}a_z z+\dell^{F^{d-1}}(f).
\]
It is easily seen that $F^{d-1}$, when identified with its image in $F^d$, is a DG submodule of $F^d$.  Notice that by construction, for any $z\in Z^d$ there exists $x_z\in M$ such that $\varepsilon^{d-1}(z)=\dell(x_z)$.  Therefore, define
\[
\varepsilon^{d}\left(\sum_{z\in Z^d}a_z e_z+f\right)=\sum_{z\in Z^d}a_z x_z+\varepsilon^{d-1}(f).
\]
One can check that $\varepsilon^d:F^d\to M$ defines a morphism of DG $A$-modules, and that $\varepsilon^d|_{F^{d-1}}=\varepsilon^{d-1}$.  Therefore $F=\bigcup_{d\in\NN}F^d$ is a semifree DG $A$-module with semibasis $E=\bigsqcup_{d\in\NN}E^d$.  We will now show that the morphism $\varepsilon=\varinjlim\varepsilon^d:F\to M$ is a quasiisomorphism of DG $A$-modules.

To this end, notice that, for every $d\in\NN$, we have the following commutative diagram of $A^\natural$-linear homomorphisms of graded $A^\natural$-modules.
\[
\xymatrixcolsep{0.5in}
\xymatrixrowsep{.35in}
\xymatrix
{
\HH(F^0)\ar[r]\ar[dr]_{\HH(\varepsilon^0)} & \HH(F^d)\ar[r]\ar[d]_(0.4){\HH(\varepsilon^d)} & \HH(F)\ar[dl]^{\HH(\varepsilon)}\\
& \HH(M)
}
\]
By the way we constructed $\varepsilon^0$, it follows that $\HH(\varepsilon^0)$ is surjective.  This implies that $\HH(\varepsilon^d)$ and $\HH(\varepsilon)$ are surjective as well.  To see that $\HH(\varepsilon)$ is also injective, choose a cycle $z'\in F$ such that $\cls(z')\in\ker\HH(\varepsilon)$, and let $d'\in\NN$ be such that $z'\in F^{d'}$ and $\cls(z')\in\ker\HH(\varepsilon^{d'})$.  We are guaranteed that such a $d'$ exists by virtue of the fact that $\HH(\varepsilon)=\HH(\varinjlim\varepsilon^d)=\varinjlim\HH(\varepsilon^d)$, cf.\ \cite{AvFoxHal}*{Theorem 4.6.9}.  Now since we chose $Z^{d'+1}$ so that $\cls(Z^{d'+1})$ generates the $\HH(A)$-module $\ker\HH(\varepsilon^{d'})$, we can write
\[
z'=\sum_{z\in Z^{d'+1}} \zeta_z z+\dell^{F^{d'}}(f)
\]
for some cycles $\zeta_z\in\HH(A)$, only finitely many of which are nonzero, and for some $f\in F^{d'}$.  By construction, given any $z\in Z^{d'+1}$, there exists an $e_z\in F^{d'+1}$ such that $z=\dell^{F^{d'+1}}(e_z)$.  Thus,
\[
z'=\dell^{F^{d'+1}}\left(\sum_{z\in Z^{d'}}(-1)^{|\zeta_z|}\zeta_z e_z+f\right)
\]
which is contained in $F^{d'+1}\subseteq F$.  Since $\cls(z')=0$ in $\HH(F)$, it follows that $\HH(\varepsilon)$ is injective, and thus $\varepsilon$ is a quasiisomorphism.
\end{proof}

This result forms the differential graded analog of the abundance of projective modules, therefore making possible the study of differential graded homological algebra.

\subsection{The Categories}

For an arbitrary abelian category $\mathcal{A}$, the derived category $\Der\mathcal{A}$ is constructed in three steps.  First, we form the category $\Ch\mathcal{A}$ of complexes over $\mathcal{A}$ and the degree zero `chain maps' between them.  Next we pass to the homotopy category $\K\mathcal{A}$ wherein homotopic morphisms in $\Ch\mathcal{A}$ are equated.  Finally, through a localization of $\K\mathcal{A}$ which formally inverts quasiisomorphisms, we arrive at the derived category $\Der\mathcal{A}$ (for details, see \cite{Wei94}*{Chapter 10}).

We are now equipped to define the categories which we study.  To this end, fix an arbitrary DG algebra $A$.  The DG $A$-modules, along with the degree zero chain maps between them, are the objects and morphisms, respectively, of the category $\DG(A)$.  Because of the fact that any DG $A$-module is \emph{a priori} a complex, forming the category $\Ch\DG(A)$ en route to the derived category is unnecessary.  For this reason, and in lieu of Theorem \ref{thm:semifreeres}, the derived category $\Der\DG(A)$ can be viewed as the category whose objects are semifree DG $A$-modules, and whose morphisms are homotopy classes of chain maps between such DG modules.

On the other hand, notice that an arbitrary DG algebra $A$ can be viewed in terms of the underlying graded algebra $A^\natural$.  With this in mind, the graded $A^\natural$-modules are precisely the objects of the category $\Gr(A^\natural)$, whose morphisms are the degree zero graded $A^\natural$-linear homomorphisms of such modules.  As $\Gr(A^\natural)$ is abelian, we can speak of its category $\Ch\Gr(A^\natural)$ of complexes.  In particular, the homologically bounded complexes in this category, along with their morphisms, form a full subcategory of $\Ch\Gr(A^\natural)$, which we denote by $\Ch^b\Gr(A^\natural)$.

\begin{lemma}\label{lem:semifreequism}
Let $A$ be a graded algebra.  For every complex $X$ in $\Ch\Gr(A)$, there exists a complex $F$ of graded free $A$-modules such that $X\simeq F$ in $\Ch\Gr(A)$.  Moreover, if $X$ is in $\Ch^b\Gr(A)$, then $F_i=0$ for all $i\ll 0$.
\end{lemma}

\noindent As a result of this lemma, the derived category $\Der\Gr(A)$ can be constructed as the category whose objects are complexes of graded free $A^\natural$-modules, and whose morphisms are the homotopy classes of morphisms of these complexes.

\begin{remark}
Given a DG algebra $A=A^\natural$ with trivial differential, there is no harm in denoting the category of graded $A$-modules by $\Gr(A)$.  We shall also frequently use this convention for the respective complex and derived categories.
\end{remark}

It is clear that over an arbitrary DG algebra $A$, the derived categories $\Der\DG(A)$ and $\Der\Gr(A^\natural)$ are quite different.  Indeed, the objects of $\Der\DG(A)$ have a richer structure than those of $\Der\Gr(A^\natural)$.  To see this, notice that the objects of $\DG(A)$ incorporate two differentials: one belonging to $A$, and another which is inherent of the particular DG $A$-module.  However, the situation is not so transparent in the case that $A$ is simply a graded algebra.  It is in this setting that we are interested in determining when the category $\Der\DG(A)$ can be naturally obtained from the category $\Der\Gr(A)$.

\subsection{Totaling}

We now introduce a natural functor with which we will compare the derived categories of interest. Throughout this section, we suppose that $A$ is a graded algebra.\footnote{Indeed, $\Tot$ can be defined on the category $\Ch\DG(A)$ over an arbitrary DG algebra $A$ (see \cite{AvFoxHal}*{Section 7.2} for details).  However, for the purposes of our work, it suffices to define the functor in the present setting.}

Let $X$ be a cochain complex in $\Ch\Gr(A)$, and denote the internal grading of each $X^i$ with a subscript; that is, $X^i=\bigoplus_{j\in\ZZ} X_j^i$.  We define the \emph{totaling} of $X$ to be the complex $\Tot X=\left((\Tot X)^\natural,\dell^{\Tot X}\right)$, whose underlying graded structure is given by
\[
\left(\Tot X\right)^\natural=\bigoplus_{i\in\ZZ}\shift^{-i} X^i.
\]
Therefore, the $d\expth$ homological component of $\Tot X$ is given by
\[
(\Tot X)_d=\bigoplus_{i\in\ZZ}X^i_{d+i}
\]
and we define the $A$-module structure on $\Tot X$ by
\[
a(\susp^{-i}x^i)_{i\in\ZZ}=\left(\susp^{-i}((-1)^{|a|i}ax^i)\right)_{i\in\ZZ}
\]
for each $a\in A$ and $(\susp^{-i}x^i)_{i\in\ZZ}\in\Tot X$.  Moreover, the differential on $\Tot X$ is defined to be
\[
\dell^{\Tot X}\!\left((\susp^{-i} x^i)_{i\in\ZZ}\right)=\left(\susp^{-i-1}\dell_X^{i}(x^{i})\right)_{i\in\ZZ}
\]
for each $(\susp^{-i}x^i)_{i\in\ZZ}\in\Tot X$.

It is now easy to check that $\Tot X$ is in fact a DG module over $A$.  Indeed, for any $a\in A$ and $(\susp^{-i} x^i)_{i\in\ZZ}\in\Tot X$, we have
\begin{align*}
\dell^{\Tot X}\!\left(a(\susp^{-i} x^i)_{i\in\ZZ}\right)&=\dell^{\Tot X}\!\left(\left(\susp^{-i}((-1)^{|a|i}ax^i)\right)_{i\in\ZZ}\right)\\
&=\left(\susp^{-i-1}\dell_X^{i}((-1)^{|a|i}ax^{i})\right)_{i\in\ZZ}\\
&=\left((-1)^{|a|i}\susp^{-i-1}(a\,\dell_X^{i}(x^{i}))\right)_{i\in\ZZ}\\
&=\left((-1)^{|a|i}(-1)^{|a|(i+1)}a\,\susp^{-i-1}\dell_X^i(x^i)\right)_{i\in\ZZ}\\
&=(-1)^{|a|}a\left(\susp^{-i-1}\dell_X^{i}(x^{i})\right)_{i\in\ZZ}\\
&=(-1)^{|a|}a\,\dell^{\Tot X}\left((\susp^{-i}x^i)_{i\in\ZZ}\right)
\end{align*}
so that the Leibniz rule is satisfied.

If $\mu:X\to Y$ is a morphism of complexes of graded $A$-modules, we define a map:
\begin{align*}
\Tot\mu:\Tot X &\to\Tot Y\\
(\susp^{-i}x^i)_{i\in\ZZ}&\mapsto(\susp^{-i}\mu^i(x^i))_{i\in\ZZ}
\end{align*}
To see that $\Tot\mu$ is a morphism of DG $A$-modules, note that for each $x^i\in X^i_j$, $\mu^i(x^i)\in Y^i_j$.  Therefore, totaling defines a functor $\Tot:\Ch\Gr(A)\to\DG(A)$.

\begin{remark}
In order to define the totaling of a \emph{chain} complex in $\Ch\Gr(A)$, one should note that $\bigoplus_{i\in\ZZ}\shift^{-i}X^i\cong\bigoplus_{i\in\ZZ}\shift^i X_i$.
\end{remark}

We now state and prove several results that demonstrate some nice properties of the totaling functor.

\begin{fact}\label{lem:semifreetot}
Let $A$ be a graded algebra.  If $X\in\Ch\Gr(A)$ is such that each $X_i$ is free as a graded left $A$-module and $X_i=0$ for all $i\ll 0$, then $\Tot X$ is
semifree in $\DG(A)$.
\end{fact}

\begin{proof}
Let $\ell\in\ZZ$ be such that $X_i=0$ for all $i<\ell$.  Now, for every $j\geq \ell$, let $E_j$ be a well-ordered basis for
$X_j$ over $A$, and define
\[
E=\bigsqcup_{j=\ell}^\infty\shift^jE_j.
\]
For $e_j\in E_j$ and $e_{j'}\in E_{j'}$, let $\susp^j e_j<\susp^{j'} e_{j'}$ if either $j<j'$, or $j=j'$ and
$e_j<e_{j'}$ in $E_j=E_{j'}$.  Then, clearly, $E$ defines a well-ordered basis for $(\Tot X)^\natural$ over $A$.  Furthermore, for each $e_j\in E_j$ we have
\[
\dell^{\Tot X}(\susp^j e_j)=\susp^{j-1}\dell^X_j(e_j)\subseteq\susp^{j-1} A(\{e_{j-1}\in E_{j-1}\})
\]
which certainly implies that $E$ is a semibasis of $\Tot X$ over $A$.
\end{proof}

Below we will illustrate the behavior of $\Tot$ with respect to tensor products.  First, however, we discuss general facts about tensor products of the respective objects.

\theoremstyle{definition}
\newtheorem{facts_local}[theorem]{Facts}

\begin{facts_local}
Let $A$ be an arbitrary DG algebra, and suppose that $X$ and $Y$ are (cochain) complexes of $A^\natural$-modules such that $X$ admits an $A^\natural$-bimodule structure.  Recall that the tensor product $X\otimes_{A^\natural}Y$ is also a complex of $A^\natural$-modules, defined by
\begin{align*}
(X\otimes_{A^\natural}Y)^i&=\bigoplus_{j+\ell =i}(X^j\otimes_{A^\natural} Y^\ell )\\
\dell^i_{X\otimes Y}(x\otimes y)&=\dell_X^j(x)\otimes y+(-1)^{j}x\otimes\dell^\ell _Y(y)
\end{align*}
for each $x\in X^j$ and $y\in Y^\ell $.  Moreover, the following hold.
\begin{enumerate}
\item If $X^j$ and $Y^\ell $ are graded $A^\natural$-modules, for each $j,\ell \in\ZZ$, then $X\otimes_{A^\natural}Y$ is a complex of graded $A^\natural$-modules.  Note that each homological degree of this complex is actually a graded tensor product.  That is, for each $j,\ell \in\ZZ$, $X^j\otimes_{A^\natural}Y^\ell $ is a tensor product on the internal grading of $X^j$ and $Y^\ell $.  To avoid confusion, we shall denote this tensor product by $\otimes_{\Gr(A^\natural)}$.  Furthermore, the tensor product at the complex level shall be represented with the symbol $\otimes_{\Ch\Gr(A^\natural)}$.\\[-0.1in]
\item If $M$ and $N$ are  DG $A$-modules, then the action of $A$ on the underlying complex $M\otimes_{A^\natural}N$ defined by
\[
a(m\otimes n)=(am)\otimes n
\]
for each $a\in A$ and $m\otimes n\in M\otimes_{A^\natural}N$, endows $M\otimes_{A^\natural}N$ with the structure of a DG $A$-module.  So as not to allow confusion, when we wish for the tensor product of DG $A$-modules to possess the same amount of structure, we shall use the symbol $\otimes_{\DG(A)}$ to denote it.
    \end{enumerate}
\end{facts_local}

\begin{proposition}\label{prop:tottensor}
Let $A$ be a graded algebra, and suppose that $X,Y\in\Ch\Gr(A)$, where $X$ has an $A$-bimodule structure. Then there exists a natural isomorphism
\[
\Tot\left(X\otimes_{\Ch\Gr(A)} Y\right)\cong\Tot X\otimes_{\DG(A)}\Tot Y
\]
of DG $A$-modules.
\end{proposition}

\begin{proof}

Consider the degree zero chain map of DG $A$-modules defined by the family
\begin{align*}
\lambda_d:\Tot(X\otimes_{\Ch\Gr(A)} Y)_d&\to\left(\Tot X\otimes_{\DG(A)}\Tot Y\right)_d\\
\susp^{-j-\ell }(x\otimes y)&\mapsto(-1)^{\ell |x|}\susp^{-j}x\otimes\susp^{-\ell }y
\end{align*}
for each $x\in X^j$, $y\in Y^\ell $, and all $j,\ell \in\ZZ$.  Clearly, each $\lambda_d$ is an isomorphism of graded $A$-modules.  To see that $\lambda=(\lambda_d)$ is furthermore a morphism, we show that the following square commutes for each $d\in\ZZ$.
\[
\xymatrixrowsep{2pc}
\xymatrixcolsep{5pc}
\xymatrix{
\Tot(X\otimes_{\Ch\Gr(A)} Y)_d\ar@{->}[r]^{\dell^{\Tot(X\otimes Y)}_d}\ar@{->}[d]_{\lambda_d}&\Tot(X\otimes_{\Ch\Gr(A)} Y)_{d-1}\ar@{->}[d]^{\lambda_{d-1}}\\
(\Tot X\otimes_{\DG(A)}\Tot Y)_d\ar@{->}[r]^{\dell^{\Tot X\otimes\Tot Y}_d}&(\Tot X\otimes_{\DG(A)}\Tot Y)_{d-1}
}
\]
Fixing $j,\ell \in\ZZ$, we have the following for all $x\in X^j$ and $y\in Y^\ell $:
\begin{align*}
&\lambda_{d-1}\circ\dell_d^{\Tot(X\otimes Y)}(\susp^{-j-\ell }(x\otimes y))\\
&=\lambda_{d-1}\left(\susp^{-j-\ell -1}\dell^{j+\ell }_{X\otimes Y}(x\otimes y)\right)\\
&=\lambda_{d-1}\left(\susp^{-j-\ell -1}\left(\dell_X^j(x)\otimes y+(-1)^{j}x\otimes\dell_Y^\ell (y)\right)\right)\\
&=\lambda_{d-1}\left(\susp^{-j-\ell -1}\left(\dell_X^j(x)\otimes y\right)+(-1)^j\susp^{-j-\ell -1}\left(x\otimes\dell_Y^\ell (y)\right)\right)\\
&=(-1)^{\ell |x|}\susp^{-j-1}\dell_X^j(x)\otimes\susp^{-\ell }y+(-1)^{j+(\ell +1)|x|}\susp^{-j}x\otimes\susp^{-\ell -1}\dell_Y^\ell (y)
\end{align*}
Furthermore, for the same choice of $x$ and $y$, the alternate composition yields:
\begin{align*}
&\dell_d^{\Tot X\otimes\Tot Y}\circ\lambda_d(\susp^{-j-\ell }(x\otimes y))\\
&=\dell_d^{\Tot X\otimes\Tot Y}((-1)^{\ell |x|}\susp^{-j}x\otimes\susp^{-\ell }y)\\
&=(-1)^{\ell |x|}\left(\dell^{\Tot X}_{|x|+j}(\susp^{-j}x)\otimes\susp^{-\ell }y+(-1)^{|x|+j}\susp^{-j}x\otimes\dell^{\Tot Y}_{|y|+\ell }(\susp^{-\ell }y)\right)\\
&=(-1)^{\ell |x|}\left(\susp^{-j-1}\dell_X^j(x)\otimes\susp^{-\ell }y+(-1)^{|x|+j}\susp^{-j}x\otimes\susp^{-\ell -1}\dell_Y^\ell (y)\right)\\
&=(-1)^{\ell |x|}\susp^{-j-1}\dell_X^j(x)\otimes\susp^{-\ell }y+(-1)^{j+(\ell +1)|x|}\susp^{-j}x\otimes\susp^{-\ell -1}\dell_Y^\ell (y)
\end{align*}
The result is immediate.
\end{proof}

\begin{proposition}\label{fact:tordecompose}
Let $A$ be a graded algebra, and furthermore suppose that $X\in\Ch\Gr(A)$ and $Y\in\Ch^b\Gr(A)$. If $X$ admits an $A$-bimodule structure, then for each $j\in\ZZ$, there exists an isomorphism
\[
\Tor^{\DG(A)}_j\left(\Tot X,\Tot Y\right)\cong\bigoplus_{i\in\ZZ}\Tor^{\Ch\Gr(A)}_i(X,Y)_{j-i}.
\]
\end{proposition}

\begin{proof}
By Lemma \ref{lem:semifreequism}, there exists a chain complex $F$ of graded free $A$-modules, with $F_i=0$ for all $i\ll 0$, such that $F\simeq Y$.  Then Lemma \ref{lem:semifreetot} implies that $\Tot F$ is semifree, and thus a projective object in $\DG(A)$. This, along with Proposition \ref{prop:tottensor}, yield the following isomorphisms:
\begin{align*}
\Tor^{\DG(A)}_j\left(\Tot X,\Tot Y\right)&\cong\HH_j\left(\Tot X\otimes_{\DG(A)}\Tot F\right)\\
&\cong\HH_j\left(\Tot(X\otimes_{\Ch\Gr(A)} F)\right)\\
&\cong\bigoplus_{i\in\ZZ}\HH_i\left(X\otimes_{\Ch\Gr(A)} F\right)_{j-i}\\
&\cong\bigoplus_{i\in\ZZ}\Tor^{\Ch\Gr(A)}_i(X,Y)_{j-i}
\end{align*}
\end{proof}

\begin{fact}\label{fact:totquism}
The functor $\Tot$ preserves quasiisomorphism, and therefore  extends to a functor of derived categories
\[
\Tot:\Der\Gr(A)\to\Der\DG(A)
\]
for any graded algebra $A$.
\end{fact}

\begin{proof}
Let $\mu:X\to Y$ be a quasiisomorphism of cochain complexes in $\Ch\Gr(A)$.  Then passing the induced morphism $\Tot\mu:\Tot X\to\Tot Y$ of DG $A$-modules to homology yields the map
\[
\HH(\Tot\mu):\bigoplus_{i\in\ZZ}\shift^{-i}\HH^i(X)\to\bigoplus_{i\in\ZZ}\shift^{-i}\HH^i(Y)
\]
which is defined by $(\susp^{-i}z^i)_{i\in\ZZ}\to(\susp^{-i}\mu(z^i))_{i\in\ZZ}$ for each cycle $z^i\in\HH^i(X)$.  Since $\HH\mu$ is an isomorphism of graded $A$-modules, so is $\HH(\Tot\mu)$.  The result follows.
\end{proof}

\section{The Image of Tot}

\numberwithin{theorem}{subsection}
\numberwithin{equation}{theorem}

In this section, we turn our attention to the image of the totaling functor on the derived categories.  Until otherwise stated, we shall assume that $A$ is a graded algebra.  Furthermore, all polynomial rings shall be standard graded.

\begin{lemma}\label{lem:isohomcomplex}
Let $A$ be an arbitrary DG algebra, and $X\in\Ch\Gr(A^\natural)$.  If $\HH(X)=\HH_n(X)$ for some $n\in\ZZ$, then $X\simeq\HH(X)$.
\end{lemma}

\begin{proof}
Consider the following commutative diagram of complexes and chain maps between them
\[
\xymatrixcolsep{3pc}\xymatrixrowsep{2pc}\xymatrix {\cdots\ar@{->}[r]
&X_{d+1}\ar@{->}[r]^{\dell_{d+1}}\ar@{=}[d]&X_d\ar@{->}[r]^{\dell_d}\ar@{<-_{)}}[d]^{\iota}&X_{d-1}\ar@{->}[r]
\ar@{<-}[d]&\cdots\\\cdots\ar@{->}[r]&X_{d+1}\ar@{->}[r]^{\dell_{d+1}}\ar@{->}[d]&\Z_d(X)
\ar@{->}[r]\ar@{->>}[d]^{\pi}&0\ar@{->}[r]\ar@{->}[d]&\cdots\\\cdots\ar@{->}[r]&0
\ar@{->}[r]&\HH_d(X)\ar@{->}[r]&0\ar@{->}[r]&\cdots}
\]
where $\iota$ and $\pi$ are the obvious inclusion and projection maps, respectively.  Clearly, these chain maps induce an isomorphism in homology; thus $X\simeq\HH(X)$.
\end{proof}

The following lemma is a result of Avramov and Jorgensen.  For the reader's convenience, we include the proof.

\begin{lemma}\label{lem:rank}\cite{AvJo}
Let $A$ be an augmented non-negatively graded $k$-algebra, and suppose that $M$ is a semifree DG $A$-module with $\dell(M_i)\subseteq A M_{i-1}$ such that $M\simeq\Tot X$ for some chain complex $X$ of graded $A$-modules. If $\HH(M)$ is indecomposable over $A$, then
\[
\rank_A M=\sum_{i\in\NN}\beta_i^{\HH(M)}
\]
where $\beta_i^{\HH(M)}$ is the $i\expth$ total Betti number of $\HH(M)$; that is, $\beta_i^{\HH(M)}=\sum_{j\in\ZZ}\beta_{i,j}$ for a minimal graded free resolution
\[
\cdots\to\bigoplus_{j\in\ZZ}\shift^jA^{\beta_{2,j}}\to\bigoplus_{j\in\ZZ}\shift^jA^{\beta_{1,j}}\to\bigoplus_{j\in\ZZ}\shift^jA^{\beta_{0,j}}\to\HH(M)\to 0
\]
of $\HH(M)$ over $A$.
\end{lemma}

\begin{proof}
The fact that $M\simeq\Tot X$ produces the following isomorphisms of graded $A$-modules.
\[
\HH(M)\cong\HH(\Tot X)\cong\bigoplus_{i\in\ZZ}\shift^{i}\HH_i(X)
\]

Now since we have assumed that $\HH(M)$ does not decompose over $A$, it follows that $\HH(X)\cong\HH_d(X)$ for some $d\in\ZZ$, and therefore $X\simeq\HH(X)$ by Lemma \ref{lem:isohomcomplex}.  Furthermore recalling that totaling preserves quasiisomorphism, the following holds.
\begin{equation}\label{eq:quism}
M\simeq\Tot X\simeq\Tot\HH(X)
\end{equation}
Since the homology of $X$ is concentrated in degree $d$, we obtain
\begin{equation}\label{eq:iso}
\Tot\HH(X)\cong\Tot\HH_d(X)=\shift^{n}\HH_d(X)\cong\HH(M).
\end{equation}

However, noting that the terms in \eqref{eq:iso} are merely graded $A$-modules, we have that $\Tot\HH(X)\simeq\HH(M)$.  Combining this fact with \eqref{eq:quism} yields $M\simeq\HH(M)$.  This quasiisomorphism and Proposition \ref{fact:tordecompose} account for the isomorphisms below; the first equality follows from the minimality of $M$, and the second is a consequence of the semifreeness of $M$.
\begin{align*}
M\otimes_{\DG(A)} k&=\HH(M\otimes_{\DG(A)} k)\\
&=\bigoplus_{j\in\ZZ}\Tor^{\DG(A)}_j(M,k)\\
&\cong\bigoplus_{j\in\ZZ}\Tor^{\DG(A)}_j\left(\HH(M),k\right)\\
&\cong\bigoplus_{i,j\in\ZZ}\Tor^{\Ch\Gr(A)}_i\left(\HH(M),k\right)_{j-i}
\end{align*}
Hence, we arrive at
\begin{align*}
\rank_A M&=\rank_k(M\otimes_{\DG(A)} k)\\
&=\sum_{i,j\in\ZZ}\rank_k\Tor^{\DG(A)}_j(\HH(M),k)_{j-i}\\
&=\sum_{i\in\ZZ}\beta_i^{\HH(M)}
\end{align*}
which is what was to be proved.
\end{proof}

\subsection{Over $A=k[x_1,\ldots,x_d]$}

We shall now investigate the image of $\Tot$ on the derived categories in the case that $A$ is a polynomial ring in more than one variable.

\begin{theorem}\label{thm:geq2var}
Let $A=k[x_1,\ldots,x_d]$ where $d\geq 2$. Then the functor
\[
\Tot:\Der\Gr(A)\to\Der\DG(A)
\]
is not onto.
\end{theorem}

\begin{proof}
Consider the rank four semifree DG module $M$ over $A=k[x_1,\ldots,x_d]$, where $d\geq 2$, given by
$M^\natural=Ae_1\oplus Ae_2\oplus Ae_3\oplus Ae_4$ such that $|e_1|=0$, $|e_2|=3$, $|e_3|=4$, $|e_4|=8$, and
\begin{align*}
&\dell(e_1)=0\\
&\dell(e_2)=x_1x_2e_1\\
&\dell(e_3)=x_2^3e_1\\
&\dell(e_4)=x_1^7e_1-x_2^4e_2+x_1x_2^2e_3.
\end{align*}

We will show that there does not exist a complex of graded $A$-modules whose totaling is quasiisomorphic to $M$.

First, note that minimal generating sets of $\Z(M)$ and $\B(M)$ over $A$ are $\{e_1,x_2^2e_2-x_1e_3\}$ and
$\{x_1x_2e_1,x_2^3e_1,x_1^7e_1-x_2^4e_2+x_1x_2^2e_3\}$, respectively. Thus, a presentation matrix of $\HH(M)$ is given by the following.
\[
\left
\begin{array}{ccr}
x_1x_2 & x_2^3 & x_1^7\\[0.02in]
0 & 0 & -x_2^2
\end{array
\right]
\]
One can now check that $\HH(M)$ is indecomposable over $A$.  Writing down the deleted minimal graded free resolution of $\HH(M)$ over $A$ yields
\[0\to\shift^{4}A\xra{
\left
\footnotesize{\begin{array}{@{}r@{\hspace{0.25em}}}
x_2^2\\[0.02in]-x_1\\[0.02in]0
\end{array}
\right] }\shift^{2}A\oplus\shift^{3}A\oplus\shift^{7}A\xra{
\left
\footnotesize{\begin{array}{@{\hspace{0.25em}}c@{\hspace{1em}}c@{\hspace{1em}}r@{\hspace{0.25em}}}
x_1x_2 & x_2^3 & x_1^7\\[0.02in]
0 & 0 & -x_2^2
\end{array}
\right] }A\oplus\shift^{5}A\to 0
\]
whence we arrive at
\[
\sum_{i\in\ZZ}\beta_i^{\HH(M)}=2+3+1=6\neq 4=\rank_A(M).
\]
The result follows by Lemma \ref{lem:rank}.
\end{proof}

It is now natural to wonder what characteristic of the DG module in the previous proof causes it to fall outside of the image of $\Tot$.  A partial answer to this question is given in the following section, where we shall furthermore define a special class of semifree DG modules over an arbitrary DG algebra with trivial differential which are always contained in the image of $\Tot$.

\subsection{Crossing}

In this section, we discuss a particular class of DG $A$-modules which are characterized by the structure of their cycles.

\begin{definition}
Let $A$ be an arbitrary DG algebra, and $M$ a semifree DG module with semibasis $E$ over $A$. Define a family of disjoint sets recursively by
\begin{align}\label{eq:crossing}
\begin{split}
&\mathcal{E}_0=\{e\in E\mid\dell(e)=0\}\\
&\mathcal{E}_\ell=\left\{e\in E\mid 0\neq\dell(e)\in A\mathcal{E}_{\ell-1}\right\}
\end{split}
\end{align}
for all $\ell\in\ZZ^+$.  Notice that since $M$ is semifree, $\mathcal{E}_0$ is nonempty.  Now consider the following containment of sets.
\begin{equation}\label{eq:crossingineq}
\bigsqcup_{\ell\in\NN}\mathcal{E}_\ell\subseteq E
\end{equation}
If the containment in \eqref{eq:crossingineq} is strict, we say that $E$ \emph{has crossing}; otherwise, we say that $E$ \emph{has no crossing}.
\end{definition}

To illustrate this concept, we provide two examples.

\begin{example}
Let $A=k[x,y,z]$ and consider the rank four semifree DG $A$-module $M$ with semibasis $E=\{e_1,e_2,e_3,e_4\}$ such that $|e_1|=0$, $|e_2|=2$, $|e_3|=3$, $|e_4|=5$, and
\begin{align*}
&\dell(e_1)=0\\
&\dell(e_2)=xe_1\\
&\dell(e_3)=yze_1\\
&\dell(e_4)=xz^3e_1+yze_2-xe_3.
\end{align*}
Then $\mathcal{E}_0=\{e_1\}$, $\mathcal{E}_1=\{e_2,e_3\}$, and $\mathcal{E}_\ell=\varnothing$ for $\ell\geq 2$. Thus, the strict containment
\[
\bigsqcup_{\ell\in\NN}\mathcal{E}_\ell\subsetneq E
\]
implies that $E$ has crossing.
\end{example}

\begin{example}\label{ex:nocrossing}
Let $A$ and $M$ be as in the previous example; however, express $M$ in terms of the semibasis $E'$ defined by $e'_i=e_i$ for $1\leq i\leq 3$ and $e'_4=e_4-z^3e_2$.  The action of $\dell^M$ on $E'$ is given by
 \begin{align*}
&\dell(e'_1)=0\\
&\dell(e'_2)=xe'_1\\
&\dell(e'_3)=yze'_1\\
&\dell(e'_4)=yze'_2-xe'_3.
\end{align*}
In this case, we obtain $\mathcal{E}_0=\{e'_1\}$, $\mathcal{E}_1=\{e'_2,e'_3\}$, $\mathcal{E}_2=\{e'_4\}$, and $\mathcal{E}_\ell=\varnothing$ for $\ell\geq 3$. Therefore, we have an equality of sets
\[
\bigsqcup_{\ell\in\NN}\mathcal{E}_\ell=E'
\]
which implies that $E$ has no crossing.
\end{example}

\begin{remark}
The DG module exhibited in the previous two examples might lead one to believe that any DG module can be expressed in terms of a semibasis which has no crossing; however, this is not the case.  Consider, for example, the DG module illustrated in the proof of Theorem \ref{thm:geq2var}.  The following result shows that it is impossible to express this DG module in terms of a semibasis which is devoid of crossing.
\end{remark}

\begin{theorem}\label{thm:crossing}
Let $M$ be a semifree DG module over a graded algebra $A$.  Then $M$ possesses a semibasis without crossing if and only if there exists a complex $X$ of graded free $A$-modules such that $\Tot X=M$.
\end{theorem}

\begin{proof}
Let $E=\bigsqcup_{d\in\NN}E_d$ be a semibasis of $M$ over $A$.  First we suppose that $E$ has no crossing, implying that $E=\bigsqcup_{\ell\in\NN}\mathcal{E}_\ell$, where
\begin{align*}
&\mathcal{E}_0=\{e\in E\var\dell^M(e)=0\}\\
&\mathcal{E}_\ell=\left\{e\in E\var0\neq\dell^M(e)\in A\mathcal{E}_{\ell-1}\right\}
\end{align*}
for all $\ell\in\ZZ^+$.  Now define a (possibly infinite) sequence $X$ of homomorphisms of graded $A$-modules by
\[
X:\qquad\cdots\to\shift^{-2}A\mathcal{E}_2\xra{\dell^X_2}\shift^{-1}A\mathcal{E}_1\xra{\dell^X_1}A\mathcal{E}_0\to 0
\]
where, for each $\ell\in\NN$ and $e\in\mathcal{E}_\ell$, we have that
\[
\dell^{X}_\ell\big((0,\ldots,0,\susp^{-\ell}e,0,\ldots,0)\big)=\susp^{-\ell+1}\dell^M(e)\subseteq\shift^{-\ell+1}A\mathcal{E}_{\ell-1}.
\]
By construction, $\dell^{X}_{\ell+1}\circ\dell^{X}_\ell=0$ for all $\ell\in\NN$, implying that $X\in\Ch\Gr(A)$. To see that $\Tot X=M$, notice that
\begin{align*}
(\Tot X)^\natural&=\bigoplus_{\ell\in\NN}\shift^{\ell}X_\ell\\
&=\bigoplus_{\ell\in\NN}\!\shift^{\ell}\shift^{-\ell}A\mathcal{E}_\ell\\
&\cong\bigoplus_{\ell\in\NN}A\mathcal{E}_\ell\\
&=M^\natural
\end{align*}
and that
\begin{align*}
\dell^{\Tot X}(\susp^{\ell}\susp^{-\ell}e)&=\susp^{\ell-1}\dell^X_\ell(\susp^{-\ell}e)\\
&=\susp^{\ell-1}\left(\susp^{-\ell+1}\dell^M(e)\right)\\
&=\dell^M(e)
\end{align*}
for all $\ell\in\NN$ and $e\in\mathcal{E}_\ell$.  The result follows.

On the other hand, suppose that $X$, expressed below, is a chain complex of graded free $A$-modules such that $\Tot X=M$.
\[
X:\quad \cdots\to X_{i+1}\xra{\dell_{i+1}^X} X_i\xra{\dell_i^X} X_{i-1}\to\cdots
\]
Then we can write
\[
A\left(\bigsqcup_{d\in\NN}E_d\right)=AE=M^\natural=(\Tot X)^\natural=\bigoplus_{i\in\ZZ}\shift^{i}X_i.
\]
Notice that since $M$ is semifree, it must be true that $\dell^M(A E_0)=0$.  This implies that the quantity given by
\[
n=\max\{\ell\in\ZZ\mid\dell^X_i\mbox{ acts trivially for all }i\leq\ell\}
\]
is certainly well-defined whenever $\dell^X\not\equiv 0$.

Now let $\bigsqcup_{\ell\in\NN}\mathcal{E}_\ell$ be a partitioning of $E$ such that the following holds.
\[
A\mathcal{E}_\ell=\left\{\begin{array}{ll}\displaystyle{\bigoplus_{i\in\NN}\shift^{n-i} X_{n-i}}\quad & \mbox{ for } \ell=0\\[0.2in] \shift^{n+\ell} X_{n+\ell}\quad & \mbox{ for } \ell>0\end{array}\right.
\]
It suffices to show that $\bigsqcup_{\ell\in\NN}\mathcal{E}_\ell$ satisfies the conditions of \eqref{eq:crossing}.  It is obvious that $\mathcal{E}_0$ fits the bill.  Thus, let $\ell\in\ZZ^+$, and notice that for each $e\in\mathcal{E}_\ell$, $\dell^{M}(e)=\susp^{\ell-1}\dell^{X}(e)$.  This yields
\[
\mathcal{E}_\ell=\left\{e\in E\mid\dell^M(e)=\susp^{\ell-1}\dell^X(e)\in\shift^{\ell-1}X_{\ell-1}=A\mathcal{E}_{\ell-1}\right\}
\]
and the result follows.
\end{proof}

This result demonstrates precisely when a semifree module is in the image of $\Tot:\Ch\Gr(A)\to\DG(A)$ whenever $A$ is a graded algebra.  We shall illustrate with an example.

\begin{example}
Let $M$ be the rank four semifree DG module with semibasis $E$ over $A=k[x,y,z]$ defined in Example \ref{ex:nocrossing}.  As $E$ has no crossing, the construction in the previous proof yields a complex
\[
X:\qquad 0\to\shift^{-2}Ae_4\xra{
\left[\footnotesize{\begin{array}{@{}r@{\hspace{0.25em}}} yz\\[0.02in]-x
\end{array}}\right]
}\shift^{-1}(Ae_2\oplus Ae_3)\xra{ \left[\footnotesize{\begin{array}{@{\hspace{0.25em}}c@{\hspace{1em}}c@{\hspace{0.25em}}} x&yz
\end{array}}\right]
}Ae_1\to 0
\]
of graded $A$-modules such that $\Tot X=M$.
\end{example}

\begin{corollary}
Let $A$ be a graded domain, and suppose that $M$ is a semifree DG $A$-module.  If $\rank_A M\leq 3$ then there exists a complex $X$ of graded $A$-modules such that $\Tot X=M$.
\end{corollary}

\begin{proof}
Let $E=\{e_1,\ldots,e_d\}$ be a well-ordered for $M^\natural$ over $A$.  Since $M$ is semifree, we obtain the following possible (non-trivial) forms for its
differential, where $a_{ij}\in A$ for each $i,j$.
\begin{center}
\begin{tabular}{lllllll}
$d=1$&$\Rightarrow$&$\dell(e_1)=0$\\[.2cm]
$d=2$&$\Rightarrow$&$\dell(e_1)=0$\\[0.1cm]
&&$\dell(e_2)= a_{12}e_1$\\[.2cm]
$d=3$&$\Rightarrow$&$\dell(e_1)=0$&&&&$\dell(e_1)=0$\\[0.1cm]
&&$\dell(e_2)= a_{12}e_1$&& or &&$\dell(e_2)=0$\\[0.1cm]
&&$\dell(e_3)= a_{13}e_1$&&&&$\dell(e_3)= a_{13}e_1+ a_{23}e_2$
\end{tabular}
\end{center}
Note that in each case, $E$ has no crossing. The result follows by Theorem \ref{thm:crossing}.
\end{proof}

\subsection{Over $A=k[x]$}

We now turn our attention to the image of $\Tot:\Der\Gr(A)\to\Der\DG(A)$ in the case that $A$ is a polynomial ring in one variable.

\begin{lemma}\label{lem:resh}
Let $M$ be a DG module which is $n$-generated over $A=k[x]$.  Then there exist integers $0\leq s\leq d$ and $1\leq t\leq d$ such that $\HH(M)$ has a graded minimal free resolution over $A$ given by
\[
0\to\bigoplus_{j=1}^s\shift^{c_j}A\xra{
\left[\begin{array}{ccc}
h_1&&\text{\huge{$0$}}\\
&\ddots\\
\text{\huge{$0$}}&&h_s\\[.5pc]
\hline\\
&\text{\huge{$0$}}
\end{array}\right]}
\bigoplus_{i=1}^t\shift^{r_i}A\to\HH(M)\to 0
\]
for some integers $r_i,c_j$ for $1\leq i\leq t$ and $1\leq j\leq s$, and where each $h_i=x^{c_i-r_i}\in Ax$ for each $1\leq i\leq s$.
\end{lemma}

\begin{proof}
Notice that we can assume that $\HH(M)$ is not a free $A$-module, since otherwise $s=0$ and the result is obvious.  Now, since $\B(M)\subseteq\Z(M)$ are submodules of a finitely generated module over a principal ideal domain, it follows that $\Z(M)$ and $\B(M)$ are finitely generated $A$-modules; the same must also be true of $\HH(M)$.  By Hilbert's syzygy theorem, any minimal free resolution of $\HH(M)$ has at most length one. Therefore, consider the following minimal free resolution of $\HH(M)$ over $A$
\[
F:\quad 0\to\bigoplus_{j=1}^s\shift^{\tilde{c}_j}A\xra{\varphi}\bigoplus_{i=1}^t
\shift^{\tilde{r}_i}A\to\HH(M)\to 0
\]
where $\tilde{r}_i$ is the degree of the $i\expth$ minimal generator of $\HH(M)$.  The exactness of $F$ tells us
that $s\leq t$.  Furthermore, the minimality of $F$ and homogeneity of $\varphi$ yield that each nonzero entry of $\varphi=(f_{i,j})$ is such that $\tilde{r}_i-\tilde{c}_j=|f_{i,j}|\geq 1$.  Manipulation of the indices in this relation reveals that
\begin{align*}
|f_{i+1,j}|-|f_{i,j}|&=|f_{i+1,j+1}|-|f_{i,j+1}|\\
|f_{i,j+1}|-|f_{i,j}|&=|f_{i+1,j+1}|-|f_{i+1,j}|
\end{align*}
for each $i,j$.  Therefore, it follows that we can rearrange the rows and columns of $\varphi$ so that its nonzero entries satisfy
\begin{equation}\label{eq:ordfs}
|f_{i,j}|\leq|f_{i',j}|\quad\text{and}\quad|f_{i,j}|\leq|f_{i,j'}|
\end{equation}
for all $i\leq i'$ and $j\leq j'$. That is, it suffices to assume that any nonzero entry of $\varphi$ has only zeros and entries of higher degree in each spot below and to the right of it.

The proof will continue recursively for $1\leq\ell\leq s$. Notice that by the minimality of $F$, there exists a nonzero entry in column $\ell$; let $i'$ be the smallest integer such that $f_{i',\ell}\neq 0$.  Shift the rows of $\varphi$ so that $f_{i',\ell}\mapsto f_{\ell,\ell}$ and $f_{i,\ell}\mapsto f_{i+1,\ell}$ for $\ell\leq i<i'$.  Now we have that $f_{\ell,\ell}\neq 0$, and each nonzero entry below and to the right of it is of equal or higher degree.  Using $f_{\ell,\ell}$ as a pivot entry, we perform elementary row and column operations on $\varphi$ to eliminate all entries below and to the right, so that $f_{i,\ell}=f_{\ell,j}=0$ for all $i,j>\ell$.  Notice that the homogeneity of $\varphi$ guarantees that at each step, the property in \eqref{eq:ordfs} is preserved.  Continuing this process, $\varphi$ is reduced to an $t\times s$ matrix of the form
\[
\left[\begin{array}{ccc}
f_{1,1}&&\mbox{\huge{0}}\\
&\ddots\\
\mbox{\huge{0}}&&f_{s,s}\\[.5pc]
\hline\\
&\mbox{\huge{0}}
\end{array}\right]
\]
where, for each $1\leq i\leq s$, $f_{i,i}=\alpha_ix^{c_i-r_i}$ for some $\alpha_i\in k$ and some positive integers $c_i,r_i$. Letting $h_i=(\alpha_i)^{-1}f_{i,i}$, the result follows.
\end{proof}

\begin{theorem}\label{thm:1var}
Every semifree DG module of finite rank over $A=k[x]$ is in the image of $\Tot:\Der\Gr(A)\to\Der\DG(A)$.
\end{theorem}

\begin{proof}
Let $M$ be a rank $d$ semifree DG module over $A=k[x]$.  By Lemma \ref{lem:resh}, we can assume the homology of $M$ to have the form
\begin{equation}\label{eq:homiso}
\HH(M)\cong\bigoplus_{i=1}^s\frac{\shift^{r_i}A}{h_i\shift^{c_i}A}
\oplus\bigoplus_{i=s+1}^t\shift^{r_i}A
\end{equation}
for some $1\leq t\leq d$ and $0\leq s\leq t$, and positive integers $r_i,c_j$.  (Of course, $s=0$ corresponds to the case that $\HH(M)$ is a free $A$-module.) Consider the deleted minimal graded free resolution $F$ of $\HH(M)$ given by the following:
\[
\qquad\qquad\qquad F:\hspace{-1in}
\begin{split}
\xymatrixcolsep{2pc}\xymatrixrowsep{0pc}\xymatrix{
0\ar@{->}[r]&\shift^{c_1}A\ar@{->}[r]^{h_1}&\shift^{r_1}A\ar@{->}[r]&0\\
&\oplus&\oplus\\
&\vdots&\vdots\\
&\oplus&\oplus\\
0\ar@{->}[r]&\shift^{c_s}A\ar@{->}[r]^{h_s}&\shift^{r_s}A\ar@{->}[r]&0\\
&\oplus&\oplus\\
&0\ar@{->}[r]&\shift^{r_{s+1}}A\ar@{->}[r]&0\\
&\oplus&\oplus\\
&\vdots&\vdots\\
&\oplus&\oplus\\
&0\ar@{->}[r]&\shift^{r_t}A\ar@{->}[r]&0\\}
\end{split}
\]
Notice that this resolution is precisely the one given in the statement of Lemma \ref{lem:resh}.

To complete the proof, we will show that $\Tot F\simeq M$.  While it is clear that $\HH(\Tot F)\cong\HH(M)$, it remains to exhibit a chain map (or sequence thereof) which induces this isomorphism.  To this end, for each $1\leq i\leq t$, let $G_i$ be the subcomplex which is given by the $i\expth$ summand of $F$.  Namely:
\[
G_i:\qquad\left\{
\begin{array}{ll}
0\to\shift^{c_i}A\xra{h_i}\shift^{r_i}A\to 0 &\qquad 1\leq i\leq s\\[0.1cm]
0\to\shift^{r_i}A\to 0 &\qquad s<i\leq t
\end{array}\right.
\]
Our goal is to define a family of chain maps $\mu^i:\Tot G_i\to M$ such that the chain map $\mu:\Tot F\to M$ given by
\begin{equation}\label{eq:mu}
\mu=(\mu^i):\bigoplus^t_{i=1}\Tot G_i\to M
\end{equation}
induces an isomorphism in homology.  In particular, for each $1\leq i\leq t$, we define $\mu^i$ by a family $\mu^i_j:(\Tot G_i)_{j}\to M_j$ of homomorphisms of vector spaces over $k$ in such a way that each $\mu^i$ is $A$-linear and furthermore commutes with the differentials of $\Tot G_i$ and $M$.

In order for the reader to better understand the action of $\mu^i$ on $\Tot G_i$, we include the following diagram for $1\leq i\leq s$, wherein complexes are written vertically.  Note that the diagonal maps represent the nontrivial component of $\dell^{\Tot G_i}$.

\begin{equation}\label{eq:XtoTotdiag}
\begin{split}\xymatrixcolsep{0.025pc}\xymatrixrowsep{0.5pc}
\xymatrix{
\vdots & & \vdots & & & & & & & & \vdots\ar@{->}[dd]\\
\oplus & & \oplus\\
(\shift^{c_i+1}A)_{c_i+2}\ar@{->}[ddrr]^{h_i} & \oplus & (\shift^{r_i}A)_{c_i+2} & & & & & & & & M_{c_i+2}\ar@{->}[dd]^{\dell^M_{c_i+2}}\ar@{<-}[llllllll]_{\mu^i_{c_i+2}}\\
\oplus & & \oplus\\
(\shift^{c_i+1}A)_{c_i+1}\ar@{->}[ddrr]^{h_i} & \oplus & (\shift^{r_i}A)_{c_i+1} & & & & & & & & M_{c_i+1}\ar@{->}[dd]^{\dell^M_{c_i+1}}\ar@{<-}[llllllll]_{\mu^i_{c_i+1}}\\
\oplus & & \oplus\\
0 & \oplus & (\shift^{r_i}A)_{c_i} & & & & & & & & M_{c_i}\ar@{->}[dd]^{\dell^M_{c_i}}\ar@{<-}[llllllll]_{\mu^i_{c_i}}\\
\oplus & & \oplus\\
\vdots & & \vdots & & & & & & & & \vdots\ar@{->}[dd]^{\dell^M_{r_i-1}}\\
& & \oplus\\
& & (\shift^{r_i}A)_{r_i} & & & & & & & & M_{r_i}\ar@{->}[dd]^{\dell^M_{r_i}}\ar@{<-}[llllllll]_{\mu^i_{r_i}}\\
& & \oplus\\
& & 0 & & & & & & & & M_{r_i-1}\ar@{->}[dd]\ar@{<-}[llllllll]_{\mu^i_{r_i-1}}\\
& & \oplus\\
& & \vdots & & & & & & & & \vdots
}\end{split}
\end{equation}

\medskip

Although this diagram only depicts the chain map for $1\leq i\leq s$, the situation is straightforward for larger values of $i$; certainly, these cases represent the torsion-free part of $\HH(M)$.  Thus, for $s<i\leq t$, we have the following:
\[
\mu^i_j:\left\{\begin{array}{ll}0\to M_j & \qquad j<r_i\\[0.1cm]
(\shift^{r_i}A)_j\to M_j & \qquad j\geq r_i
\end{array}\right.
\]

Now consider the following isomorphism of graded $A$-modules:
\[
\varphi:\bigoplus_{i=1}^s\frac{\shift^{r_i}A}{h_i\shift^{c_i}A}\oplus\bigoplus_{i=s+1}^t\shift^{r_i}A\to\HH(M)
\]
Fix $1\leq i\leq t$ and let $0\ne z_i\in M_{r_i}$ be a cycle defined such that $\varphi\left(\susp^{r_i}1\right)=\cls(z_i)\in\HH_{r_i}(M)$.  Since $\varphi$ is $A$-linear, $\varphi\left(x^\ell\susp^{r_i}1\right)=\cls(x^\ell z_i)$ for each nonnegative integer $\ell$.  Notice that, for small enough values of $\ell$, these classes are nonzero.  To be precise, $\cls(x^\ell z_i)=0$ if and only if $1\leq i\leq s$ and $\ell\geq c_i-r_i$.  Therefore, for each $1\leq i\leq s$, there exists $m_i\in M_{c_i+1}$ such that $\dell^M_{c_i+1}(m_i)=x^{c_i-r_i}z_i$.

We shall now proceed to define, for each $i$ and $j$, a basis $U^i_j$ for $(\Tot G_i)_j$ over $k$.
\[
U^i_j\supseteq\left\{
\begin{array}{ll}
\{x^{j-r_i}\susp^{r_i}1,\,(-1)^{j-c_i-1}x^{j-c_i-1}\susp^{c_i+1}1\}\quad & \mbox{$1\leq i\leq s$ and $j> c_i$}\\[0.02in]
\{x^{j-r_i}\susp^{r_i}1\} & \mbox{otherwise}
\end{array}
\right.
\]

Finally, we define the map $\mu^i_j:(\Tot G_i)_j\to M_j$ in the following way:
\[
\mu^i_j(u)=\left\{\begin{array}{ll}
x^{j-r_i}z_i&\qquad u=x^{j-r_i}\susp^{r_i}1\\[0.1cm]
x^{j-c_i-1}m_i&\qquad u=(-1)^{j-c_i-1}x^{j-c_i-1}\susp^{c_i+1}1\\[0.1cm]
0&\qquad\hbox{otherwise}
\end{array}\right.
\]
By construction, $\mu^i=(\mu^i_j)$ is an $A$-linear degree zero chain map between $\Tot G_i$ and $M$.  Further, one can easily check that the Leibniz rule is satisfied, so that the map $\mu:\Tot F\to M$ given in \eqref{eq:mu} is a morphism of DG modules.  The above construction also guarantees that $\mu$ establishes a one-to-one correspondence between the generators of homology of $\Tot F=\bigoplus_{i=1}^m\Tot G_i$ and that of $M$.  The result follows.
\end{proof}

Now we will illustrate the practical use of the theorem with an example.

\begin{example}
Let $M$ be the rank five semifree DG module over $A=k[x]$ with a basis $\{e_1,e_2,e_3,e_4,e_5\}$ such that $|e_1|=0$, $|e_2|=2$, $|e_3|=4$, $|e_4|=8$, $|e_5|=9$, and where differential of $M$ is given by the following.
\begin{align*}
&\dell(e_1)=0\\
&\dell(e_2)=0\\
&\dell(e_3)=0\\
&\dell(e_4)=x^7e_1+x^5e_2\\
&\dell(e_5)=x^4e_3
\end{align*}
We obtain the following decomposition in homology
\begin{align}\label{eq:decomhom}
\HH(M)&=\frac{Ae_1\oplus Ae_2\oplus Ae_3}{A(x^7e_1+x^5e_2)\oplus Ax^4e_3}\notag\\[0.1in]
&\cong\frac{A(x^2e_1+e_2)}{A(x^7e_1+x^5e_2)}\oplus\frac{Ae_3}{Ax^4e_3}\oplus Ae_1
\end{align}
whence we obtain a deleted minimal free resolution $F$ of $\HH(M)$, given by:
\[\xymatrixcolsep{2pc}\xymatrixrowsep{0pc}\xymatrix{
0\ar@{->}[r]&\shift^7A\ar@{->}[r]^{x^5}&\shift^2A\ar@{->}[r]&0\\
&\oplus&\oplus\\
0\ar@{->}[r]&\shift^8A\ar@{->}[r]^{x^4}&\shift^4A\ar@{->}[r]&0\\
&\oplus&\oplus\\
&0\ar@{->}[r]&A\ar@{->}[r]&0}
\]

We will utilize the proof of Theorem \ref{thm:1var} to show that $\Tot F\simeq M$.  From $F$ we obtain the subcomplexes:
\begin{align*}
G_1:\quad&0\to\shift^7A\xra{x^5}\shift^2A\to 0\\
G_2:\quad&0\to\shift^8A\xra{x^4}\shift^4A\to 0\\[0.05in]
G_3:\quad&0\to A\to 0
\end{align*}
Now, referring to the decomposition of homology in \eqref{eq:decomhom}, we have that the cycles generating $\HH(M)$ over $A$ are $z_1=x^2e_1+e_2$, $z_2=e_3$, and $z_3=e_1$.  Clearly, for each $j\in\NN$, the basis $U^1_j$ of $(\Tot G_3)_j$ over $k$ must be chosen to contain $\{x^j\susp^{0}\}$.  Furthermore, the respective bases of $(\Tot G_1)_j$ and $(\Tot G_2)_j$ over $k$ are given as follows.
\[
\begin{array}{l}
U^1_j\supseteq\left\{
\begin{array}{ll}
\{x^{j-2}\susp^2 1\}\qquad & j<8\\[0.02in]
\{x^{j-2}\susp^2 1,(-1)^{j-8}x^{j-8}\susp^8 1\} & j\geq 8
\end{array}
\right.\\[0.15in]
U^2_j\supseteq\left\{
\begin{array}{ll}
\{x^{j-4}\susp^4 1\}\qquad & j<9\\[0.02in]
\{x^{j-4}\susp^4 1,(-1)^{j-9}x^{j-9}\susp^9 1\} & j\geq 9
\end{array}
\right.
\end{array}
\]

We can now exploit these bases in order to define chain maps $\mu^i=(\mu^i_j):(\Tot G_i)_{j}\to M_j$.  We have
\begin{align*}
\mu^1_j(u)&=\left\{\begin{array}{p{1in}l}
$x^je_1+x^{j-2}e_2$&u=x^{j-2}\susp^{2}1\\[0.1cm]
$x^{j-8}e_4$&u=(-1)^{j-8}x^{j-8}\susp^{8}1\\[0.1cm]
$0$&\hbox{otherwise}
\end{array}\right.\\[0.15cm]
\mu^2_j(u)&=\left\{\begin{array}{p{1in}l}
$x^{j-4}e_3$&u=x^{j-4}\susp^{4}1\\[0.1cm]
$x^{j-9}e_5$&u=(-1)^{j-9}x^{j-9}\susp^{9}1\\[0.1cm]
$0$&\hbox{otherwise}
\end{array}\right.\\[0.15cm]
\mu^3_j(u)&=\left\{\begin{array}{p{1in}l}
$x^je_1$&u=x^{j}\susp^0 1\\[0.1cm]
$0$&\hbox{otherwise}
\end{array}\right.
\end{align*}
so that $\mu:\Tot F\to M$ is given by $\mu(x)=\left(\mu^1(x),\mu^2(x),\mu^3(x)\right)$ for each $x\in\Tot F$.
\end{example}

\section*{Acknowledgments}

The author would like to thank her thesis advisor, Dave Jorgensen, for many insightful conversations about DG algebra.

\bibliographystyle{amsxport}

redpajama_set_name: RedPajamaArXiv


Parkinson's disease (PD) is a neurodegenerative disorder characterized by typical motor features that result from dopamine (DA) depletion in the striatum. DA replacement therapy with L-DOPA is the most efficacious symptomatic treatment, but causes complications that limit its utility, in particular, L-DOPA-induced dyskinesia (LID). LID is primarily caused by pre-synaptic and post-synaptic changes in DA neurotransmission, although it also depends on altered glutamatergic transmission at several nodes of the cortico-basal ganglia-thalamocortical network. The important functional interplay between dopaminergic and glutamatergic systems has stimulated an interest in metabotropic glutamate receptors (mGluRs) as potential therapeutic targets in PD and LID. We here review the antiparkinsonian and antidyskinetic potential of modulating group I, II, and III mGluRs in several preclinical models of PD. We also provide an update on clinical trials evaluating mGluR5 or mGluR4 ligands in PD.


text:
#include <string.h>
#include <stdio.h>
#include "py/nlr.h"
#include "py/gc.h"
#include "py/mphal.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "pendsv.h"

#include "imlib.h"
#if MICROPY_PY_SENSOR
#include "cambus.h"
#include "sensor.h"
#endif
#include "framebuffer.h"
#include "ff.h"
#include "usbdbg.h"
#include "omv_boardconfig.h"
#include "py_image.h"

static int xfer_bytes;
static int xfer_length;
static enum usbdbg_cmd cmd;

static volatile bool script_ready;
static volatile bool script_running;
static volatile bool irq_enabled;
static vstr_t script_buf;
static mp_obj_t mp_const_ide_interrupt = MP_OBJ_NULL;

// These functions must be implemented in MicroPython CDC driver.
extern uint32_t usb_cdc_buf_len();
extern uint32_t usb_cdc_get_buf(uint8_t *buf, uint32_t len);

void usbdbg_init()
{
    cmd = USBDBG_NONE;
    script_ready=false;
    script_running=false;
    irq_enabled = false;
    vstr_init(&script_buf, 32);
    mp_const_ide_interrupt = mp_obj_new_exception_msg(&mp_type_Exception, MP_ERROR_TEXT("IDE interrupt"));
}

void usbdbg_wait_for_command(uint32_t timeout)
{
    for (mp_uint_t ticks = mp_hal_ticks_ms(); ((mp_hal_ticks_ms() - ticks) < timeout) && (cmd != USBDBG_NONE); );
}

bool usbdbg_script_ready()
{
    return script_ready;
}

vstr_t *usbdbg_get_script()
{
    return &script_buf;
}

void usbdbg_set_script_running(bool running)
{
    script_running = running;
}

inline void usbdbg_set_irq_enabled(bool enabled)
{
    if (enabled) {
        NVIC_EnableIRQ(OMV_USB_IRQN);
    } else {
        NVIC_DisableIRQ(OMV_USB_IRQN);
    }
    __DSB(); __ISB();
    irq_enabled = enabled;
}

bool usbdbg_get_irq_enabled()
{
    return irq_enabled;
}

void usbdbg_data_in(void *buffer, int length)
{
    switch (cmd) {
        case USBDBG_FW_VERSION: {
            uint32_t *ver_buf = buffer;
            ver_buf[0] = FIRMWARE_VERSION_MAJOR;
            ver_buf[1] = FIRMWARE_VERSION_MINOR;
            ver_buf[2] = FIRMWARE_VERSION_PATCH;
            cmd = USBDBG_NONE;
            break;
        }

        case USBDBG_TX_BUF_LEN: {
            uint32_t tx_buf_len = usb_cdc_buf_len();
            memcpy(buffer, &tx_buf_len, sizeof(tx_buf_len));
            cmd = USBDBG_NONE;
            break;
        }

        case USBDBG_SENSOR_ID: {
            int sensor_id = 0xFF;
            #if MICROPY_PY_SENSOR
            if (sensor_is_detected() == true) {
                sensor_id = sensor_get_id();
            }
            #endif
            memcpy(buffer, &sensor_id, 4);
            cmd = USBDBG_NONE;
            break;
        }

        case USBDBG_TX_BUF: {
            xfer_bytes += usb_cdc_get_buf(buffer, length);
            if (xfer_bytes == xfer_length) {
                cmd = USBDBG_NONE;
            }
            break;
        }

        case USBDBG_FRAME_SIZE:
            // Return 0 if FB is locked or not ready.
            ((uint32_t*)buffer)[0] = 0;
            // Try to lock FB. If header size == 0 frame is not ready
            if (mutex_try_lock_alternate(&JPEG_FB()->lock, MUTEX_TID_IDE)) {
                // If header size == 0 frame is not ready
                if (JPEG_FB()->size == 0) {
                    // unlock FB
                    mutex_unlock(&JPEG_FB()->lock, MUTEX_TID_IDE);
                } else {
                    // Return header w, h and size/bpp
                    ((uint32_t*)buffer)[0] = JPEG_FB()->w;
                    ((uint32_t*)buffer)[1] = JPEG_FB()->h;
                    ((uint32_t*)buffer)[2] = JPEG_FB()->size;
                }
            }
            cmd = USBDBG_NONE;
            break;

        case USBDBG_FRAME_DUMP:
            if (xfer_bytes < xfer_length) {
                memcpy(buffer, JPEG_FB()->pixels+xfer_bytes, length);
                xfer_bytes += length;
                if (xfer_bytes == xfer_length) {
                    cmd = USBDBG_NONE;
                    JPEG_FB()->w = 0; JPEG_FB()->h = 0; JPEG_FB()->size = 0;
                    mutex_unlock(&JPEG_FB()->lock, MUTEX_TID_IDE);
                }
            }
            break;

        case USBDBG_ARCH_STR: {
            unsigned int uid[3] = {
            #if (OMV_UNIQUE_ID_SIZE == 2)
                0U,
            #else
                *((unsigned int *) (OMV_UNIQUE_ID_ADDR + 8)),
            #endif
                *((unsigned int *) (OMV_UNIQUE_ID_ADDR + 4)),
                *((unsigned int *) (OMV_UNIQUE_ID_ADDR + 0)),
            };
            snprintf((char *) buffer, 64, "%s [%s:%08X%08X%08X]",
                    OMV_ARCH_STR, OMV_BOARD_TYPE, uid[0], uid[1], uid[2]);
            cmd = USBDBG_NONE;
            break;
        }

        case USBDBG_SCRIPT_RUNNING: {
            uint32_t *buf = buffer;
            buf[0] = (uint32_t) script_running;
            cmd = USBDBG_NONE;
            break;
        }
        default: /* error */
            break;
    }
}

void usbdbg_data_out(void *buffer, int length)
{
    switch (cmd) {
        case USBDBG_FB_ENABLE: {
            uint32_t enable = *((int32_t*)buffer);
            JPEG_FB()->enabled = enable;
            if (enable == 0) {
                // When disabling framebuffer, the IDE might still be holding FB lock.
                // If the IDE is not the current lock owner, this operation is ignored.
                mutex_unlock(&JPEG_FB()->lock, MUTEX_TID_IDE);
            }
            cmd = USBDBG_NONE;
            break;
        }

        case USBDBG_SCRIPT_EXEC:
            // check if GC is locked before allocating memory for vstr. If GC was locked
            // at least once before the script is fully uploaded xfer_bytes will be less
            // than the total length (xfer_length) and the script will Not be executed.
            if (!script_running && !gc_is_locked()) {
                vstr_add_strn(&script_buf, buffer, length);
                xfer_bytes += length;
                if (xfer_bytes == xfer_length) {
                    // Set script ready flag
                    script_ready = true;

                    // Set script running flag
                    script_running = true;

                    // Disable IDE IRQ (re-enabled by pyexec or main).
                    usbdbg_set_irq_enabled(false);

                    // Clear interrupt traceback
                    mp_obj_exception_clear_traceback(mp_const_ide_interrupt);

                    // Remove the BASEPRI masking (if any)
                    __set_BASEPRI(0);

                    // Interrupt running REPL
                    // Note: setting pendsv explicitly here because the VM is probably
                    // waiting in REPL and the soft interrupt flag will not be checked.
                    pendsv_nlr_jump(mp_const_ide_interrupt);
                }
            }
            break;

        case USBDBG_TEMPLATE_SAVE: {
            #if defined(IMLIB_ENABLE_IMAGE_FILE_IO)
            image_t image;
            framebuffer_init_image(&image);

            // null terminate the path
            length = (length == 64) ? 63:length;
            ((char*)buffer)[length] = 0;

            rectangle_t *roi = (rectangle_t*)buffer;
            char *path = (char*)buffer+sizeof(rectangle_t);

            imlib_save_image(&image, path, roi, 50);

            // raise a flash IRQ to flush image
            //NVIC->STIR = FLASH_IRQn;
            #endif  //IMLIB_ENABLE_IMAGE_FILE_IO
            break;
        }

        case USBDBG_DESCRIPTOR_SAVE: {
            #if defined(IMLIB_ENABLE_IMAGE_FILE_IO)\
                && defined(IMLIB_ENABLE_KEYPOINTS)
            image_t image;
            framebuffer_init_image(&image);

            // null terminate the path
            length = (length == 64) ? 63:length;
            ((char*)buffer)[length] = 0;

            rectangle_t *roi = (rectangle_t*)buffer;
            char *path = (char*)buffer+sizeof(rectangle_t);

            py_image_descriptor_from_roi(&image, path, roi);
            #endif  //IMLIB_ENABLE_IMAGE_FILE_IO && IMLIB_ENABLE_KEYPOINTS
            cmd = USBDBG_NONE;
            break;
        }

        case USBDBG_ATTR_WRITE: {
            #if MICROPY_PY_SENSOR
            /* write sensor attribute */
            int32_t attr= *((int32_t*)buffer);
            int32_t val = *((int32_t*)buffer+1);
            switch (attr) {
                case ATTR_CONTRAST:
                    sensor_set_contrast(val);
                    break;
                case ATTR_BRIGHTNESS:
                    sensor_set_brightness(val);
                    break;
                case ATTR_SATURATION:
                    sensor_set_saturation(val);
                    break;
                case ATTR_GAINCEILING:
                    sensor_set_gainceiling(val);
                    break;
                default:
                    break;
            }
            #endif
            cmd = USBDBG_NONE;
            break;
        }

        default: /* error */
            break;
    }
}

void usbdbg_control(void *buffer, uint8_t request, uint32_t length)
{
    cmd = (enum usbdbg_cmd) request;
    switch (cmd) {
        case USBDBG_FW_VERSION:
            xfer_bytes = 0;
            xfer_length = length;
            break;

        case USBDBG_FRAME_SIZE:
            xfer_bytes = 0;
            xfer_length = length;
            break;

        case USBDBG_FRAME_DUMP:
            xfer_bytes = 0;
            xfer_length = length;
            break;

        case USBDBG_ARCH_STR:
            xfer_bytes = 0;
            xfer_length = length;
            break;

        case USBDBG_SCRIPT_EXEC:
            xfer_bytes = 0;
            xfer_length = length;
            vstr_reset(&script_buf);
            break;

        case USBDBG_SCRIPT_STOP:
            if (script_running) {
                // Set script running flag
                script_running = false;

                // Disable IDE IRQ (re-enabled by pyexec or main).
                usbdbg_set_irq_enabled(false);

                // interrupt running code by raising an exception
                mp_obj_exception_clear_traceback(mp_const_ide_interrupt);

                // Remove the BASEPRI masking (if any)
                __set_BASEPRI(0);

                pendsv_nlr_jump(mp_const_ide_interrupt);
            }
            cmd = USBDBG_NONE;
            break;

        case USBDBG_SCRIPT_SAVE:
            // TODO: save running script
            cmd = USBDBG_NONE;
            break;

        case USBDBG_SCRIPT_RUNNING:
            xfer_bytes = 0;
            xfer_length =length;
            break;

        case USBDBG_TEMPLATE_SAVE:
        case USBDBG_DESCRIPTOR_SAVE:
            /* save template */
            xfer_bytes = 0;
            xfer_length =length;
            break;

        case USBDBG_ATTR_WRITE:
            xfer_bytes = 0;
            xfer_length =length;
            break;

        case USBDBG_SYS_RESET:
            NVIC_SystemReset();
            break;

        case USBDBG_SYS_RESET_TO_BL:{
            #if defined(MICROPY_RESET_TO_BOOTLOADER)
            MICROPY_RESET_TO_BOOTLOADER();
            #else
            NVIC_SystemReset();
            #endif
            break;
        }

        case USBDBG_FB_ENABLE: {
            xfer_bytes = 0;
            xfer_length = length;
            break;
        }

        case USBDBG_TX_BUF:
        case USBDBG_TX_BUF_LEN:
            xfer_bytes = 0;
            xfer_length = length;
            break;

        case USBDBG_SENSOR_ID:
            xfer_bytes = 0;
            xfer_length = length;
            break;

        default: /* error */
            cmd = USBDBG_NONE;
            break;
    }
}


text:
Dublin's pub guide
0 Resources Add
post-title 6 Dublin pubs showing all (or most) of The Women's World Cup.
6 Dublin pubs showing all (or most) of The Women's World Cup.
Home / 2019 / 6 Dublin pubs showing all (or most) of The Women's World Cup.
Alas, Ireland didn't qualify for this World Cup, but there's still plenty of entertainment to be had from the Women's World Cup being hosted by France.
6 Dublin pubs have indicated that they'll be showing all or most of the games from the Women's World Cup. They are…
The Back Page are going all in on the World Cup and are showing every game on their many many screens. Play some mini golf at half time and enjoy one of their sports themed pizzas during the match. Link.
The Square Ball
The Square Ball is a sister bar to The Back Page and will also be showing all the games, bar those happening on Monday when they don't open. The pub has a few screens and does some amazing chicken for your nourishing enjoyment. Link.
It's a hat trick for Bodytonic venues showing the World Cup in Dublin. Wigwam show all sorts of sports and even allow you to compete on their ping pong table. They're taking reservations for lots of games. Link.
Buskers on the Ball
Buskers on the Ball advertise on their website that they'll be showing loads of the WWC games. This is a bar that attracts a lot of supporters from abroad who are living in Dublin so there should be a good amount of support for the teams playing. Link.
The Living Room could be said to have the most and biggest screens in the city in their main bar and their outdoor area. You can check to see exactly which games they'll be showing, but it looks to us to be fairly comprehensive. Link.
The Woolshed
The Woolshed is another pub that will be attracting people from the competing nations of the world.
If you want to catch up on all the highlights from the competition so far, FIFA have a playlist of them on youtube. LINK.
johnlepo 13th June 2019
Articles, Blog, Lists
About johnlepo
View all posts by johnlepo →
We offer private and bespoke Pub Crawls for groups, corporate events, and parties.
Let us know what you're looking for and we'll come up with a route around some of Dublin's best pubs.
Dublin pubs that accept One4All vouchers.
One4All vouchers are handy gifts for Christmas and there's a lot of businesses that give them o
Northside Dublin pubs to watch the 6 nations matches.
The 6 Nations kicks off in early February and people are already booking tables for crucial games.
Dublin pubs have some incredible pizza options. Here's where to get the best.
It's not so long ago that the pizza offering in some pubs was a pre-made pizza in a toaster oven. D
Your guide to pub quizzes in Dublin.
The humble pub quiz can be one of the most enjoyable ways to spend an evening in a pub. A group
30th? 40th? Engagement? Or just a get together. The Bridge has 2 rooms to celebrate a party.
The River Room The Bridge 1859 will likely be familiar to you if you've attended a rugby match i
Publin pub crawl
You can book private pub crawls through Publin! Groups big and small for all occasions. Experienced guides who know Dublin's pubs inside out.
Click the image for more details.
Tweets by @publinie
The 100 things to do in Dublin pubs.
12 pubs that do cheap pints in Dublin
16 signature dishes to try in Dublin pubs.
Cheap cocktail deals in Dublin
Where to get a late bite to eat in Dublin pubs.
17 beer pitcher deals in Dublin pubs
12 of the best sports bars in Dublin.
Dog friendly pubs in Dublin
Contact us via publinie@gmail.com

redpajama_set_name: RedPajamaCommonCrawl


Christmas is here and we are so excited that how much elation it would bring to our homes. We will have a fun time with family and friends; we can send away beautiful gifts to folks before Christmas day. My today's post will highlight 10 Christmas gifts & gadgets designers would love to receive. So if you have got some close designer friends, this post of Christmas gifts is totally apt for you to make an abrupt choice for gifts & presents for designer' friends.
Designers usually have a lot of data to keep with them, so naturally they want more storage in that way, mini 4 bay storage will be the best choice to accommodate a designer so he can keep tons and tons of his files with him. This mini storage protects all the data in the memory, very handy, easy to use and very efficient to respond quickly. Drobo Mini is equipped with dual Thunderbolt ports for daisy chaining. Connect up to six Thunderbolt devices and/or a non-Thunderbolt monitor at the end of the chain. This allows even the most portable laptop computers access to high-performance storage while retaining connectivity to other devices and an external monitor.
For email and network security FIDO u2F security key is the awesome device for a designer because no matter where he is, he can easily access to his account with no fear of the account getting hacked. Unlimited number of web accounts can be supported and the privacy is preserved in such a way that no information (including use) is shared between sites with proper security feasibility.
Designers keep their own big DSLR camera with them so it becomes hard to keep a laptop, a big camera, some important document etc. all in once place. For this, the camera+ laptop backpack is designed for designers so they can travel all the way with ease having no burden on their shoulders.
No more tensions of where to place your lens cap. Sometimes designers and photographers miss out on their lens cover because there is no way to keep them. This camera buckle lens cap holder is the stunning thing for the designers & photographers. Stop getting your lens cap fall off here and there and keep them safe in the cap holder.
Designers are not only involved in their tasks on daily basis, they also like to keep themselves fit and healthy so the better they can perform in official works. This smartwatch can really be effective for all fitness freaks, it tells warning to take the stroll, fitness measures, daily activity, calories burned, steps taken, time of day and activity feedback on 85 LED display, plus monitors sleep patterns.
Designers get tired of the shortage of ports and slots' deficiency because they have a lot of devices to be inserted all the time. This USB is compatible with all versions of Windows, MAC and Linux systems. It includes Plug & Play, compact sleek design and 3 Power switches, 9 Led Indicators, 9 ports in one side to reduce cable clutter.
Designers are always roaming around, to meet the owners of the companies and to see the clients so they need portable projector that is handy, easy to use and effective to display his tasks in a professional way. This pocket size projector will be amazing possession of a designer for sure.
Designer are always absorbed in their routine tasks, they are stick to their seats and cannot get up again and again at the door knock. This Bluetooth lock for room is truly an apt consideration for designers, who do not have to get up to answer the doorbell. This door lock for room is associated with iPhone application. It can be used when security is needed. For use on exterior doors where keyed entry and security is desired, this door lock will be the best choice.
Designers love coffee, they don't mind drinking it whole day long, because it stirs up their imagination and boost up their mental energies. Coffee helps to keep a mind fresh and that is mandatory thing for designer. This coffee machine is very easy to use. It can be put on the table and coffee can easily be made sitting with ease.
The best of all gifts is Wacom pen and touch small tablet. It is very effective for designers, now they can design the every little and big task on the tablet with pen which is not at all time consuming.
All these gifts are just like blessings for designers. So don't forget to gift any of them, it will be appreciated by your designer friends.


Join us for a morning time pajama party! Just $20 per toddler (ages 5 and under) for one hour of jumping plus one hour of activities, crafts and snack. SkySocks included; valid waiver required. Parents may assist for free!
August 12th-16th only! Enjoy a fun-filled week of awesome healthy fun this summer! Session includes daily jump time, SkySocks, games, crafts, a healthy snack and drinks.Plus complimentary Bounce Back Pass and water bottle!


For more than 130 years the Busch-Jaeger brand has been providing our customers and partners with innovative products and excellent services. The trust we are given is a responsibility and motivation for a common, guaranteed future. The wholesaler is our link to the customer and therefore an important partner in the communication with the electrician.
The specification texts for each product are available for you as download in different formats in the Online-Catalogue at www.busch-jaeger-catalogue.com. Simply select the desired article and add it to your personal selection of specification texts via the "Specification texts" button. You can then download them via menu item "Specification texts" in the navigation as package in the formats GAEB 1990(*.d81), GAEB 2000 (*.p81) and Rich Text (*.rft).
Do you require the matching picture material for specifications, layouts and plans? No problem. Pictures of products, articles, interiors and much more are available for you in different formats in the Busch-Jaeger media database as download.
In overview Catalogue/brochures you can find all brochures and catalogues as scrolling catalogues or for viewing/downloading as PDF file.
Pay us a visit at the numerous trade fairs and events around the world. We look forward to welcoming you!